diff --git a/test-cases/RMLTC0000-RDB/README.md b/test-cases/RMLTC0000-RDB/README.md new file mode 100644 index 0000000..b6df6f1 --- /dev/null +++ b/test-cases/RMLTC0000-RDB/README.md @@ -0,0 +1,52 @@ +## RMLTC0000-RDB + +**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: . +@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" . + +``` + +**Output** +``` +# empty database + +``` + diff --git a/test-cases/RMLTC0000-RDB/mapping.ttl b/test-cases/RMLTC0000-RDB/mapping.ttl new file mode 100644 index 0000000..8de3276 --- /dev/null +++ b/test-cases/RMLTC0000-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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/test-cases/RMLTC0000-RDB/output.nq b/test-cases/RMLTC0000-RDB/output.nq new file mode 100644 index 0000000..ca0b991 --- /dev/null +++ b/test-cases/RMLTC0000-RDB/output.nq @@ -0,0 +1 @@ +# empty database diff --git a/test-cases/RMLTC0000-RDB/resource.sql b/test-cases/RMLTC0000-RDB/resource.sql new file mode 100644 index 0000000..ea537fa --- /dev/null +++ b/test-cases/RMLTC0000-RDB/resource.sql @@ -0,0 +1,4 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "Name" VARCHAR(50) +); \ No newline at end of file diff --git a/test-cases/RMLTC0001a-RDB/README.md b/test-cases/RMLTC0001a-RDB/README.md new file mode 100644 index 0000000..3aa5f33 --- /dev/null +++ b/test-cases/RMLTC0001a-RDB/README.md @@ -0,0 +1,54 @@ +## RMLTC0001a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus" . + +``` + diff --git a/test-cases/RMLTC0001a-RDB/mapping.ttl b/test-cases/RMLTC0001a-RDB/mapping.ttl new file mode 100644 index 0000000..8de3276 --- /dev/null +++ b/test-cases/RMLTC0001a-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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/test-cases/RMLTC0001a-RDB/output.nq b/test-cases/RMLTC0001a-RDB/output.nq new file mode 100644 index 0000000..efbb554 --- /dev/null +++ b/test-cases/RMLTC0001a-RDB/output.nq @@ -0,0 +1 @@ + "Venus" . diff --git a/test-cases/RMLTC0001a-RDB/resource.sql b/test-cases/RMLTC0001a-RDB/resource.sql new file mode 100644 index 0000000..21c51c3 --- /dev/null +++ b/test-cases/RMLTC0001a-RDB/resource.sql @@ -0,0 +1,5 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "Name" VARCHAR(50) +); +INSERT INTO student values ('Venus'); diff --git a/test-cases/RMLTC0001b-RDB/README.md b/test-cases/RMLTC0001b-RDB/README.md new file mode 100644 index 0000000..41607d1 --- /dev/null +++ b/test-cases/RMLTC0001b-RDB/README.md @@ -0,0 +1,54 @@ +## RMLTC0001b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus" . + +``` + diff --git a/test-cases/RMLTC0001b-RDB/mapping.ttl b/test-cases/RMLTC0001b-RDB/mapping.ttl new file mode 100644 index 0000000..8c3670d --- /dev/null +++ b/test-cases/RMLTC0001b-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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 "{name}"; + rml:termType rml:BlankNode + ] . + + a d2rq:Database; + d2rq:jdbcDSN "CONNECTIONDSN"; + d2rq:jdbcDriver "org.postgresql.Driver"; + d2rq:password ""; + d2rq:username "postgres" . diff --git a/test-cases/RMLTC0001b-RDB/output.nq b/test-cases/RMLTC0001b-RDB/output.nq new file mode 100644 index 0000000..082a16c --- /dev/null +++ b/test-cases/RMLTC0001b-RDB/output.nq @@ -0,0 +1,2 @@ +_:Venus "Venus" . + diff --git a/test-cases/RMLTC0001b-RDB/resource.sql b/test-cases/RMLTC0001b-RDB/resource.sql new file mode 100644 index 0000000..601449a --- /dev/null +++ b/test-cases/RMLTC0001b-RDB/resource.sql @@ -0,0 +1,5 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + name VARCHAR(50) +); +INSERT INTO student values ('Venus'); diff --git a/test-cases/RMLTC0002a-RDB/README.md b/test-cases/RMLTC0002a-RDB/README.md new file mode 100644 index 0000000..f17a34b --- /dev/null +++ b/test-cases/RMLTC0002a-RDB/README.md @@ -0,0 +1,65 @@ +## RMLTC0002a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus" . + "10"^^ . + . + +``` + diff --git a/test-cases/RMLTC0002a-RDB/mapping.ttl b/test-cases/RMLTC0002a-RDB/mapping.ttl new file mode 100644 index 0000000..7a5f9e9 --- /dev/null +++ b/test-cases/RMLTC0002a-RDB/mapping.ttl @@ -0,0 +1,32 @@ +@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/test-cases/RMLTC0002a-RDB/output.nq b/test-cases/RMLTC0002a-RDB/output.nq new file mode 100644 index 0000000..224747a --- /dev/null +++ b/test-cases/RMLTC0002a-RDB/output.nq @@ -0,0 +1,3 @@ + "Venus" . + "10"^^ . + . diff --git a/test-cases/RMLTC0002a-RDB/resource.sql b/test-cases/RMLTC0002a-RDB/resource.sql new file mode 100644 index 0000000..2b4b5be --- /dev/null +++ b/test-cases/RMLTC0002a-RDB/resource.sql @@ -0,0 +1,7 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); + diff --git a/test-cases/RMLTC0002b-RDB/README.md b/test-cases/RMLTC0002b-RDB/README.md new file mode 100644 index 0000000..4238fc0 --- /dev/null +++ b/test-cases/RMLTC0002b-RDB/README.md @@ -0,0 +1,56 @@ +## RMLTC0002b-RDB + +**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: . +@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" . + +``` + +**Output** +``` +_:students10 "Venus" . + +``` + diff --git a/test-cases/RMLTC0002b-RDB/mapping.ttl b/test-cases/RMLTC0002b-RDB/mapping.ttl new file mode 100644 index 0000000..0cb4555 --- /dev/null +++ b/test-cases/RMLTC0002b-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0002b-RDB/output.nq b/test-cases/RMLTC0002b-RDB/output.nq new file mode 100644 index 0000000..407dd74 --- /dev/null +++ b/test-cases/RMLTC0002b-RDB/output.nq @@ -0,0 +1 @@ +_:students10 "Venus" . diff --git a/test-cases/RMLTC0002b-RDB/resource.sql b/test-cases/RMLTC0002b-RDB/resource.sql new file mode 100644 index 0000000..8095775 --- /dev/null +++ b/test-cases/RMLTC0002b-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0002c-RDB/README.md b/test-cases/RMLTC0002c-RDB/README.md new file mode 100644 index 0000000..a6c2647 --- /dev/null +++ b/test-cases/RMLTC0002c-RDB/README.md @@ -0,0 +1,49 @@ +## RMLTC0002c-RDB + +**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: . +@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/test-cases/RMLTC0002c-RDB/mapping.ttl b/test-cases/RMLTC0002c-RDB/mapping.ttl new file mode 100644 index 0000000..397c267 --- /dev/null +++ b/test-cases/RMLTC0002c-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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/test-cases/RMLTC0002c-RDB/resource.sql b/test-cases/RMLTC0002c-RDB/resource.sql new file mode 100644 index 0000000..8095775 --- /dev/null +++ b/test-cases/RMLTC0002c-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0002d-RDB/README.md b/test-cases/RMLTC0002d-RDB/README.md new file mode 100644 index 0000000..65d9f05 --- /dev/null +++ b/test-cases/RMLTC0002d-RDB/README.md @@ -0,0 +1,56 @@ +## RMLTC0002d-RDB + +**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: . +@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" . + +``` + +**Output** +``` +_:Student10 "Venus". + +``` + diff --git a/test-cases/RMLTC0002d-RDB/mapping.ttl b/test-cases/RMLTC0002d-RDB/mapping.ttl new file mode 100644 index 0000000..2b20b14 --- /dev/null +++ b/test-cases/RMLTC0002d-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0002d-RDB/output.nq b/test-cases/RMLTC0002d-RDB/output.nq new file mode 100644 index 0000000..c9ce3cd --- /dev/null +++ b/test-cases/RMLTC0002d-RDB/output.nq @@ -0,0 +1 @@ +_:Student10 "Venus". diff --git a/test-cases/RMLTC0002d-RDB/resource.sql b/test-cases/RMLTC0002d-RDB/resource.sql new file mode 100644 index 0000000..b6377ea --- /dev/null +++ b/test-cases/RMLTC0002d-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + ID INTEGER, + Name VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0002e-RDB/README.md b/test-cases/RMLTC0002e-RDB/README.md new file mode 100644 index 0000000..9089578 --- /dev/null +++ b/test-cases/RMLTC0002e-RDB/README.md @@ -0,0 +1,49 @@ +## RMLTC0002e-RDB + +**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: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:referenceFormulation rml:SQL2008Table; + rml:source ; + rml:iterator "\"Students\"" + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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/test-cases/RMLTC0002e-RDB/mapping.ttl b/test-cases/RMLTC0002e-RDB/mapping.ttl new file mode 100644 index 0000000..83dcdae --- /dev/null +++ b/test-cases/RMLTC0002e-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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 "ID" + ]; + 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/test-cases/RMLTC0002e-RDB/resource.sql b/test-cases/RMLTC0002e-RDB/resource.sql new file mode 100644 index 0000000..8095775 --- /dev/null +++ b/test-cases/RMLTC0002e-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0002f-RDB/README.md b/test-cases/RMLTC0002f-RDB/README.md new file mode 100644 index 0000000..3984877 --- /dev/null +++ b/test-cases/RMLTC0002f-RDB/README.md @@ -0,0 +1,56 @@ +## RMLTC0002f-RDB + +**Title**: Two columns mapping, delimited identifiers referenced as regular identifiers + +**Description**: Tests the presence of delimited identifiers referenced as regular identifiers + +**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: . +@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/test-cases/RMLTC0002f-RDB/mapping.ttl b/test-cases/RMLTC0002f-RDB/mapping.ttl new file mode 100644 index 0000000..6fa6990 --- /dev/null +++ b/test-cases/RMLTC0002f-RDB/mapping.ttl @@ -0,0 +1,32 @@ +@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/test-cases/RMLTC0002f-RDB/resource.sql b/test-cases/RMLTC0002f-RDB/resource.sql new file mode 100644 index 0000000..3edc982 --- /dev/null +++ b/test-cases/RMLTC0002f-RDB/resource.sql @@ -0,0 +1,6 @@ +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/test-cases/RMLTC0002g-RDB/README.md b/test-cases/RMLTC0002g-RDB/README.md new file mode 100644 index 0000000..ef4fa10 --- /dev/null +++ b/test-cases/RMLTC0002g-RDB/README.md @@ -0,0 +1,49 @@ +## RMLTC0002g-RDB + +**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: . +@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 "ID" + ]; + 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/test-cases/RMLTC0002g-RDB/mapping.ttl b/test-cases/RMLTC0002g-RDB/mapping.ttl new file mode 100644 index 0000000..065458a --- /dev/null +++ b/test-cases/RMLTC0002g-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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 "ID" + ]; + 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/test-cases/RMLTC0002g-RDB/resource.sql b/test-cases/RMLTC0002g-RDB/resource.sql new file mode 100644 index 0000000..8095775 --- /dev/null +++ b/test-cases/RMLTC0002g-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0002h-RDB/README.md b/test-cases/RMLTC0002h-RDB/README.md new file mode 100644 index 0000000..58a7083 --- /dev/null +++ b/test-cases/RMLTC0002h-RDB/README.md @@ -0,0 +1,49 @@ +## RMLTC0002h-RDB + +**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: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT ('Student' || \"ID\") AS \"StudentId\", \"ID\", \"Name\", 1 AS \"ID\" FROM student"; + rml:referenceFormulation rml:SQL2008Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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/test-cases/RMLTC0002h-RDB/mapping.ttl b/test-cases/RMLTC0002h-RDB/mapping.ttl new file mode 100644 index 0000000..4e1f69b --- /dev/null +++ b/test-cases/RMLTC0002h-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@prefix d2rq: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT ('Student' || \"ID\") AS \"StudentId\", \"ID\", \"Name\", 1 AS \"ID\" FROM student"; + rml:referenceFormulation rml:SQL2008Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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/test-cases/RMLTC0002h-RDB/resource.sql b/test-cases/RMLTC0002h-RDB/resource.sql new file mode 100644 index 0000000..8095775 --- /dev/null +++ b/test-cases/RMLTC0002h-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0002i-RDB/README.md b/test-cases/RMLTC0002i-RDB/README.md new file mode 100644 index 0000000..62155b8 --- /dev/null +++ b/test-cases/RMLTC0002i-RDB/README.md @@ -0,0 +1,55 @@ +## RMLTC0002i-RDB + +**Title**: Two columns mapping, SQL Version identifier + +**Description**: Tests the presence of a SQL Version identifier + +**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: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT \"ID\", \"Name\" FROM student"; + rml:referenceFormulation rml:SQL2008Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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" . + +``` + +**Output** +``` + "10"^^ . + +``` + diff --git a/test-cases/RMLTC0002i-RDB/mapping.ttl b/test-cases/RMLTC0002i-RDB/mapping.ttl new file mode 100644 index 0000000..c15075b --- /dev/null +++ b/test-cases/RMLTC0002i-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@prefix d2rq: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT \"ID\", \"Name\" FROM student"; + rml:referenceFormulation rml:SQL2008Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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/test-cases/RMLTC0002i-RDB/output.nq b/test-cases/RMLTC0002i-RDB/output.nq new file mode 100644 index 0000000..49091bc --- /dev/null +++ b/test-cases/RMLTC0002i-RDB/output.nq @@ -0,0 +1 @@ + "10"^^ . diff --git a/test-cases/RMLTC0002i-RDB/resource.sql b/test-cases/RMLTC0002i-RDB/resource.sql new file mode 100644 index 0000000..8095775 --- /dev/null +++ b/test-cases/RMLTC0002i-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0002j-RDB/README.md b/test-cases/RMLTC0002j-RDB/README.md new file mode 100644 index 0000000..38d2a09 --- /dev/null +++ b/test-cases/RMLTC0002j-RDB/README.md @@ -0,0 +1,55 @@ +## RMLTC0002j-RDB + +**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?** 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: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT student.\"ID\", student.\"Name\" FROM student"; + rml:referenceFormulation rml:SQL2008Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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" . + +``` + +**Output** +``` + "10"^^ . + +``` + diff --git a/test-cases/RMLTC0002j-RDB/mapping.ttl b/test-cases/RMLTC0002j-RDB/mapping.ttl new file mode 100644 index 0000000..67f0c0c --- /dev/null +++ b/test-cases/RMLTC0002j-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@prefix d2rq: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT student.\"ID\", student.\"Name\" FROM student"; + rml:referenceFormulation rml:SQL2008Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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/test-cases/RMLTC0002j-RDB/output.nq b/test-cases/RMLTC0002j-RDB/output.nq new file mode 100644 index 0000000..49091bc --- /dev/null +++ b/test-cases/RMLTC0002j-RDB/output.nq @@ -0,0 +1 @@ + "10"^^ . diff --git a/test-cases/RMLTC0002j-RDB/resource.sql b/test-cases/RMLTC0002j-RDB/resource.sql new file mode 100644 index 0000000..8095775 --- /dev/null +++ b/test-cases/RMLTC0002j-RDB/resource.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS student CASCADE ; +CREATE TABLE student ( + "ID" INTEGER, + "Name" VARCHAR(50) +); +INSERT INTO student values ('10', 'Venus'); diff --git a/test-cases/RMLTC0003a-RDB/README.md b/test-cases/RMLTC0003a-RDB/README.md new file mode 100644 index 0000000..ab9ff3c --- /dev/null +++ b/test-cases/RMLTC0003a-RDB/README.md @@ -0,0 +1,50 @@ +## RMLTC0003a-RDB + +**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: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT \"ID\", (\"FirstName\" || ' ' || \"LastName\") AS \"Name\" FROM student"; + rml:referenceFormulation rml:SQL2000Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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/test-cases/RMLTC0003a-RDB/mapping.ttl b/test-cases/RMLTC0003a-RDB/mapping.ttl new file mode 100644 index 0000000..caa7858 --- /dev/null +++ b/test-cases/RMLTC0003a-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@prefix d2rq: . +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ + rml:iterator "SELECT \"ID\", (\"FirstName\" || ' ' || \"LastName\") AS \"Name\" FROM student"; + rml:referenceFormulation rml:SQL2000Query; + rml:source + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" + ]; + 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/test-cases/RMLTC0003a-RDB/resource.sql b/test-cases/RMLTC0003a-RDB/resource.sql new file mode 100644 index 0000000..339e52c --- /dev/null +++ b/test-cases/RMLTC0003a-RDB/resource.sql @@ -0,0 +1,7 @@ +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/test-cases/RMLTC0003b-RDB/README.md b/test-cases/RMLTC0003b-RDB/README.md new file mode 100644 index 0000000..ae47975 --- /dev/null +++ b/test-cases/RMLTC0003b-RDB/README.md @@ -0,0 +1,56 @@ +## RMLTC0003b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "VenusWilliams" . +``` + diff --git a/test-cases/RMLTC0003b-RDB/mapping.ttl b/test-cases/RMLTC0003b-RDB/mapping.ttl new file mode 100644 index 0000000..12ae8dd --- /dev/null +++ b/test-cases/RMLTC0003b-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0003b-RDB/output.nq b/test-cases/RMLTC0003b-RDB/output.nq new file mode 100644 index 0000000..4ba0d6f --- /dev/null +++ b/test-cases/RMLTC0003b-RDB/output.nq @@ -0,0 +1 @@ + "VenusWilliams" . \ No newline at end of file diff --git a/test-cases/RMLTC0003b-RDB/resource.sql b/test-cases/RMLTC0003b-RDB/resource.sql new file mode 100644 index 0000000..c9b8535 --- /dev/null +++ b/test-cases/RMLTC0003b-RDB/resource.sql @@ -0,0 +1,7 @@ +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/test-cases/RMLTC0003c-RDB/README.md b/test-cases/RMLTC0003c-RDB/README.md new file mode 100644 index 0000000..b5f0bde --- /dev/null +++ b/test-cases/RMLTC0003c-RDB/README.md @@ -0,0 +1,57 @@ +## RMLTC0003c-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus Williams" . + +``` + diff --git a/test-cases/RMLTC0003c-RDB/mapping.ttl b/test-cases/RMLTC0003c-RDB/mapping.ttl new file mode 100644 index 0000000..d4c7bea --- /dev/null +++ b/test-cases/RMLTC0003c-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0003c-RDB/output.nq b/test-cases/RMLTC0003c-RDB/output.nq new file mode 100644 index 0000000..180f90c --- /dev/null +++ b/test-cases/RMLTC0003c-RDB/output.nq @@ -0,0 +1 @@ + "Venus Williams" . diff --git a/test-cases/RMLTC0003c-RDB/resource.sql b/test-cases/RMLTC0003c-RDB/resource.sql new file mode 100644 index 0000000..339e52c --- /dev/null +++ b/test-cases/RMLTC0003c-RDB/resource.sql @@ -0,0 +1,7 @@ +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/test-cases/RMLTC0004a-RDB/README.md b/test-cases/RMLTC0004a-RDB/README.md new file mode 100644 index 0000000..de7ba34 --- /dev/null +++ b/test-cases/RMLTC0004a-RDB/README.md @@ -0,0 +1,78 @@ +## RMLTC0004a-RDB + +**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** +``` +DROP TABLE IF EXISTS student_sport; + +CREATE TABLE student_sport ( + "Student" VARCHAR(50), + "Sport" VARCHAR(50) +); +INSERT INTO student_sport values ('Venus', 'Tennis'); + +``` + +**Mapping** +``` +@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" . + +``` + +**Output** +``` + "Venus" . + . + "Tennis" . + . + +``` + diff --git a/test-cases/RMLTC0004a-RDB/mapping.ttl b/test-cases/RMLTC0004a-RDB/mapping.ttl new file mode 100644 index 0000000..b1f8ac4 --- /dev/null +++ b/test-cases/RMLTC0004a-RDB/mapping.ttl @@ -0,0 +1,44 @@ +@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/test-cases/RMLTC0004a-RDB/output.nq b/test-cases/RMLTC0004a-RDB/output.nq new file mode 100644 index 0000000..ab10283 --- /dev/null +++ b/test-cases/RMLTC0004a-RDB/output.nq @@ -0,0 +1,4 @@ + "Venus" . + . + "Tennis" . + . diff --git a/test-cases/RMLTC0004a-RDB/resource.sql b/test-cases/RMLTC0004a-RDB/resource.sql new file mode 100644 index 0000000..e3fbd52 --- /dev/null +++ b/test-cases/RMLTC0004a-RDB/resource.sql @@ -0,0 +1,7 @@ +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/test-cases/RMLTC0004b-RDB/README.md b/test-cases/RMLTC0004b-RDB/README.md new file mode 100644 index 0000000..f959c4f --- /dev/null +++ b/test-cases/RMLTC0004b-RDB/README.md @@ -0,0 +1,49 @@ +## RMLTC0004b-RDB + +**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: . +@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/test-cases/RMLTC0004b-RDB/mapping.ttl b/test-cases/RMLTC0004b-RDB/mapping.ttl new file mode 100644 index 0000000..7e30b9e --- /dev/null +++ b/test-cases/RMLTC0004b-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0004b-RDB/resource.sql b/test-cases/RMLTC0004b-RDB/resource.sql new file mode 100644 index 0000000..67e5510 --- /dev/null +++ b/test-cases/RMLTC0004b-RDB/resource.sql @@ -0,0 +1,5 @@ +DROP TABLE IF EXISTS student; +CREATE TABLE student ( + "Name" VARCHAR(50) +); +INSERT INTO student values ('Venus'); diff --git a/test-cases/RMLTC0005a-RDB/README.md b/test-cases/RMLTC0005a-RDB/README.md new file mode 100644 index 0000000..63fe06a --- /dev/null +++ b/test-cases/RMLTC0005a-RDB/README.md @@ -0,0 +1,63 @@ +## RMLTC0005a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "30.0"^^ . + . + "20.0"^^ . + + +``` + diff --git a/test-cases/RMLTC0005a-RDB/mapping.ttl b/test-cases/RMLTC0005a-RDB/mapping.ttl new file mode 100644 index 0000000..f929dda --- /dev/null +++ b/test-cases/RMLTC0005a-RDB/mapping.ttl @@ -0,0 +1,27 @@ +@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/test-cases/RMLTC0005a-RDB/output.nq b/test-cases/RMLTC0005a-RDB/output.nq new file mode 100644 index 0000000..6f8638d --- /dev/null +++ b/test-cases/RMLTC0005a-RDB/output.nq @@ -0,0 +1,5 @@ + . + "30.0"^^ . + . + "20.0"^^ . + diff --git a/test-cases/RMLTC0005a-RDB/resource.sql b/test-cases/RMLTC0005a-RDB/resource.sql new file mode 100644 index 0000000..3276780 --- /dev/null +++ b/test-cases/RMLTC0005a-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0005b-RDB/README.md b/test-cases/RMLTC0005b-RDB/README.md new file mode 100644 index 0000000..ad57a7e --- /dev/null +++ b/test-cases/RMLTC0005b-RDB/README.md @@ -0,0 +1,76 @@ +## RMLTC0005b-RDB + +**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: . +@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" . + +``` + +**Output** +``` +_:Bob_Smith . +_:Bob_Smith "Bob" . +_:Bob_Smith "Smith" . +_:Bob_Smith "30.0"^^ . +_:Sue_Jones . +_:Sue_Jones "Sue" . +_:Sue_Jones "Jones" . +_:Sue_Jones "20.0"^^ . + + +``` + diff --git a/test-cases/RMLTC0005b-RDB/mapping.ttl b/test-cases/RMLTC0005b-RDB/mapping.ttl new file mode 100644 index 0000000..a579675 --- /dev/null +++ b/test-cases/RMLTC0005b-RDB/mapping.ttl @@ -0,0 +1,36 @@ +@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/test-cases/RMLTC0005b-RDB/output.nq b/test-cases/RMLTC0005b-RDB/output.nq new file mode 100644 index 0000000..292e4f8 --- /dev/null +++ b/test-cases/RMLTC0005b-RDB/output.nq @@ -0,0 +1,9 @@ +_:Bob_Smith . +_:Bob_Smith "Bob" . +_:Bob_Smith "Smith" . +_:Bob_Smith "30.0"^^ . +_:Sue_Jones . +_:Sue_Jones "Sue" . +_:Sue_Jones "Jones" . +_:Sue_Jones "20.0"^^ . + diff --git a/test-cases/RMLTC0005b-RDB/resource.sql b/test-cases/RMLTC0005b-RDB/resource.sql new file mode 100644 index 0000000..3276780 --- /dev/null +++ b/test-cases/RMLTC0005b-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0006a-RDB/README.md b/test-cases/RMLTC0006a-RDB/README.md new file mode 100644 index 0000000..2e6a37c --- /dev/null +++ b/test-cases/RMLTC0006a-RDB/README.md @@ -0,0 +1,61 @@ +## RMLTC0006a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Bad Student" . +``` + diff --git a/test-cases/RMLTC0006a-RDB/mapping.ttl b/test-cases/RMLTC0006a-RDB/mapping.ttl new file mode 100644 index 0000000..2a8f540 --- /dev/null +++ b/test-cases/RMLTC0006a-RDB/mapping.ttl @@ -0,0 +1,30 @@ +@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/test-cases/RMLTC0006a-RDB/output.nq b/test-cases/RMLTC0006a-RDB/output.nq new file mode 100644 index 0000000..4e6fd3e --- /dev/null +++ b/test-cases/RMLTC0006a-RDB/output.nq @@ -0,0 +1 @@ + "Bad Student" . \ No newline at end of file diff --git a/test-cases/RMLTC0006a-RDB/resource.sql b/test-cases/RMLTC0006a-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0006a-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007a-RDB/README.md b/test-cases/RMLTC0007a-RDB/README.md new file mode 100644 index 0000000..b698ffe --- /dev/null +++ b/test-cases/RMLTC0007a-RDB/README.md @@ -0,0 +1,57 @@ +## RMLTC0007a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + + +``` + diff --git a/test-cases/RMLTC0007a-RDB/mapping.ttl b/test-cases/RMLTC0007a-RDB/mapping.ttl new file mode 100644 index 0000000..af254a4 --- /dev/null +++ b/test-cases/RMLTC0007a-RDB/mapping.ttl @@ -0,0 +1,24 @@ +@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/test-cases/RMLTC0007a-RDB/output.nq b/test-cases/RMLTC0007a-RDB/output.nq new file mode 100644 index 0000000..76f87f8 --- /dev/null +++ b/test-cases/RMLTC0007a-RDB/output.nq @@ -0,0 +1,2 @@ + . + diff --git a/test-cases/RMLTC0007a-RDB/resource.sql b/test-cases/RMLTC0007a-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007a-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007b-RDB/README.md b/test-cases/RMLTC0007b-RDB/README.md new file mode 100644 index 0000000..3124fa5 --- /dev/null +++ b/test-cases/RMLTC0007b-RDB/README.md @@ -0,0 +1,65 @@ +## RMLTC0007b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus" . + . + + +``` + diff --git a/test-cases/RMLTC0007b-RDB/mapping.ttl b/test-cases/RMLTC0007b-RDB/mapping.ttl new file mode 100644 index 0000000..cf2eea0 --- /dev/null +++ b/test-cases/RMLTC0007b-RDB/mapping.ttl @@ -0,0 +1,31 @@ +@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/test-cases/RMLTC0007b-RDB/output.nq b/test-cases/RMLTC0007b-RDB/output.nq new file mode 100644 index 0000000..5c4eb26 --- /dev/null +++ b/test-cases/RMLTC0007b-RDB/output.nq @@ -0,0 +1,3 @@ + "Venus" . + . + diff --git a/test-cases/RMLTC0007b-RDB/resource.sql b/test-cases/RMLTC0007b-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007b-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007c-RDB/README.md b/test-cases/RMLTC0007c-RDB/README.md new file mode 100644 index 0000000..b20e2db --- /dev/null +++ b/test-cases/RMLTC0007c-RDB/README.md @@ -0,0 +1,68 @@ +## RMLTC0007c-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus" . + "10"^^ . + . + . + + +``` + diff --git a/test-cases/RMLTC0007c-RDB/mapping.ttl b/test-cases/RMLTC0007c-RDB/mapping.ttl new file mode 100644 index 0000000..9d146a3 --- /dev/null +++ b/test-cases/RMLTC0007c-RDB/mapping.ttl @@ -0,0 +1,32 @@ +@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/test-cases/RMLTC0007c-RDB/output.nq b/test-cases/RMLTC0007c-RDB/output.nq new file mode 100644 index 0000000..ae78ddf --- /dev/null +++ b/test-cases/RMLTC0007c-RDB/output.nq @@ -0,0 +1,5 @@ + "Venus" . + "10"^^ . + . + . + diff --git a/test-cases/RMLTC0007c-RDB/resource.sql b/test-cases/RMLTC0007c-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007c-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007d-RDB/README.md b/test-cases/RMLTC0007d-RDB/README.md new file mode 100644 index 0000000..c42be47 --- /dev/null +++ b/test-cases/RMLTC0007d-RDB/README.md @@ -0,0 +1,74 @@ +## RMLTC0007d-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus" . + "10"^^ . + . + . + + +``` + diff --git a/test-cases/RMLTC0007d-RDB/mapping.ttl b/test-cases/RMLTC0007d-RDB/mapping.ttl new file mode 100644 index 0000000..f05bf2e --- /dev/null +++ b/test-cases/RMLTC0007d-RDB/mapping.ttl @@ -0,0 +1,38 @@ +@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/test-cases/RMLTC0007d-RDB/output.nq b/test-cases/RMLTC0007d-RDB/output.nq new file mode 100644 index 0000000..ae78ddf --- /dev/null +++ b/test-cases/RMLTC0007d-RDB/output.nq @@ -0,0 +1,5 @@ + "Venus" . + "10"^^ . + . + . + diff --git a/test-cases/RMLTC0007d-RDB/resource.sql b/test-cases/RMLTC0007d-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007d-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007e-RDB/README.md b/test-cases/RMLTC0007e-RDB/README.md new file mode 100644 index 0000000..74db93f --- /dev/null +++ b/test-cases/RMLTC0007e-RDB/README.md @@ -0,0 +1,68 @@ +## RMLTC0007e-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "10"^^ . + "Venus" . + . + + +``` + diff --git a/test-cases/RMLTC0007e-RDB/mapping.ttl b/test-cases/RMLTC0007e-RDB/mapping.ttl new file mode 100644 index 0000000..93f0b13 --- /dev/null +++ b/test-cases/RMLTC0007e-RDB/mapping.ttl @@ -0,0 +1,33 @@ +@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/test-cases/RMLTC0007e-RDB/output.nq b/test-cases/RMLTC0007e-RDB/output.nq new file mode 100644 index 0000000..c5ea4c4 --- /dev/null +++ b/test-cases/RMLTC0007e-RDB/output.nq @@ -0,0 +1,4 @@ + "10"^^ . + "Venus" . + . + diff --git a/test-cases/RMLTC0007e-RDB/resource.sql b/test-cases/RMLTC0007e-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007e-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007f-RDB/README.md b/test-cases/RMLTC0007f-RDB/README.md new file mode 100644 index 0000000..9c90e9c --- /dev/null +++ b/test-cases/RMLTC0007f-RDB/README.md @@ -0,0 +1,71 @@ +## RMLTC0007f-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "Venus" . + "10"^^ . + + +``` + diff --git a/test-cases/RMLTC0007f-RDB/mapping.ttl b/test-cases/RMLTC0007f-RDB/mapping.ttl new file mode 100644 index 0000000..67b94e7 --- /dev/null +++ b/test-cases/RMLTC0007f-RDB/mapping.ttl @@ -0,0 +1,36 @@ +@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/test-cases/RMLTC0007f-RDB/output.nq b/test-cases/RMLTC0007f-RDB/output.nq new file mode 100644 index 0000000..fb6a536 --- /dev/null +++ b/test-cases/RMLTC0007f-RDB/output.nq @@ -0,0 +1,4 @@ + . + "Venus" . + "10"^^ . + diff --git a/test-cases/RMLTC0007f-RDB/resource.sql b/test-cases/RMLTC0007f-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007f-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007g-RDB/README.md b/test-cases/RMLTC0007g-RDB/README.md new file mode 100644 index 0000000..0e1c980 --- /dev/null +++ b/test-cases/RMLTC0007g-RDB/README.md @@ -0,0 +1,59 @@ +## RMLTC0007g-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus" . + + +``` + diff --git a/test-cases/RMLTC0007g-RDB/mapping.ttl b/test-cases/RMLTC0007g-RDB/mapping.ttl new file mode 100644 index 0000000..bb47312 --- /dev/null +++ b/test-cases/RMLTC0007g-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0007g-RDB/output.nq b/test-cases/RMLTC0007g-RDB/output.nq new file mode 100644 index 0000000..6c29bcc --- /dev/null +++ b/test-cases/RMLTC0007g-RDB/output.nq @@ -0,0 +1,2 @@ + "Venus" . + diff --git a/test-cases/RMLTC0007g-RDB/resource.sql b/test-cases/RMLTC0007g-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007g-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0007h-RDB/README.md b/test-cases/RMLTC0007h-RDB/README.md new file mode 100644 index 0000000..f8490c5 --- /dev/null +++ b/test-cases/RMLTC0007h-RDB/README.md @@ -0,0 +1,55 @@ +## RMLTC0007h-RDB + +**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: . +@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:graphMap [ + rml:reference "ID"; + 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/test-cases/RMLTC0007h-RDB/mapping.ttl b/test-cases/RMLTC0007h-RDB/mapping.ttl new file mode 100644 index 0000000..8fb7057 --- /dev/null +++ b/test-cases/RMLTC0007h-RDB/mapping.ttl @@ -0,0 +1,29 @@ +@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:graphMap [ + rml:reference "ID"; + 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/test-cases/RMLTC0007h-RDB/resource.sql b/test-cases/RMLTC0007h-RDB/resource.sql new file mode 100644 index 0000000..b5c63bc --- /dev/null +++ b/test-cases/RMLTC0007h-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0008a-RDB/README.md b/test-cases/RMLTC0008a-RDB/README.md new file mode 100644 index 0000000..47a837c --- /dev/null +++ b/test-cases/RMLTC0008a-RDB/README.md @@ -0,0 +1,80 @@ +## RMLTC0008a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "Venus Williams" . + "10"^^ . + "Tennis" . + + + +``` + diff --git a/test-cases/RMLTC0008a-RDB/mapping.ttl b/test-cases/RMLTC0008a-RDB/mapping.ttl new file mode 100644 index 0000000..f84e053 --- /dev/null +++ b/test-cases/RMLTC0008a-RDB/mapping.ttl @@ -0,0 +1,43 @@ +@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/test-cases/RMLTC0008a-RDB/output.nq b/test-cases/RMLTC0008a-RDB/output.nq new file mode 100644 index 0000000..8c3c01f --- /dev/null +++ b/test-cases/RMLTC0008a-RDB/output.nq @@ -0,0 +1,6 @@ + . + "Venus Williams" . + "10"^^ . + "Tennis" . + + diff --git a/test-cases/RMLTC0008a-RDB/resource.sql b/test-cases/RMLTC0008a-RDB/resource.sql new file mode 100644 index 0000000..3ad893a --- /dev/null +++ b/test-cases/RMLTC0008a-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0008b-RDB/README.md b/test-cases/RMLTC0008b-RDB/README.md new file mode 100644 index 0000000..cbe5b3d --- /dev/null +++ b/test-cases/RMLTC0008b-RDB/README.md @@ -0,0 +1,94 @@ +## RMLTC0008b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "Venus Williams" . + "10"^^ . + . + . + + + +``` + diff --git a/test-cases/RMLTC0008b-RDB/mapping.ttl b/test-cases/RMLTC0008b-RDB/mapping.ttl new file mode 100644 index 0000000..0a068c2 --- /dev/null +++ b/test-cases/RMLTC0008b-RDB/mapping.ttl @@ -0,0 +1,56 @@ +@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/test-cases/RMLTC0008b-RDB/output.nq b/test-cases/RMLTC0008b-RDB/output.nq new file mode 100644 index 0000000..9271c2c --- /dev/null +++ b/test-cases/RMLTC0008b-RDB/output.nq @@ -0,0 +1,7 @@ + . + "Venus Williams" . + "10"^^ . + . + . + + diff --git a/test-cases/RMLTC0008b-RDB/resource.sql b/test-cases/RMLTC0008b-RDB/resource.sql new file mode 100644 index 0000000..3ad893a --- /dev/null +++ b/test-cases/RMLTC0008b-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0008c-RDB/README.md b/test-cases/RMLTC0008c-RDB/README.md new file mode 100644 index 0000000..e4c126e --- /dev/null +++ b/test-cases/RMLTC0008c-RDB/README.md @@ -0,0 +1,60 @@ +## RMLTC0008c-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus Williams" . + "Venus Williams" . + + +``` + diff --git a/test-cases/RMLTC0008c-RDB/mapping.ttl b/test-cases/RMLTC0008c-RDB/mapping.ttl new file mode 100644 index 0000000..21bc9fb --- /dev/null +++ b/test-cases/RMLTC0008c-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0008c-RDB/output.nq b/test-cases/RMLTC0008c-RDB/output.nq new file mode 100644 index 0000000..d36f700 --- /dev/null +++ b/test-cases/RMLTC0008c-RDB/output.nq @@ -0,0 +1,3 @@ + "Venus Williams" . + "Venus Williams" . + diff --git a/test-cases/RMLTC0008c-RDB/resource.sql b/test-cases/RMLTC0008c-RDB/resource.sql new file mode 100644 index 0000000..3ad893a --- /dev/null +++ b/test-cases/RMLTC0008c-RDB/resource.sql @@ -0,0 +1,8 @@ +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/test-cases/RMLTC0009a-RDB/README.md b/test-cases/RMLTC0009a-RDB/README.md new file mode 100644 index 0000000..621b318 --- /dev/null +++ b/test-cases/RMLTC0009a-RDB/README.md @@ -0,0 +1,95 @@ +## RMLTC0009a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus Williams" . + "Demi Moore" . + "Tennis" . + . + +``` + diff --git a/test-cases/RMLTC0009a-RDB/mapping.ttl b/test-cases/RMLTC0009a-RDB/mapping.ttl new file mode 100644 index 0000000..b2be366 --- /dev/null +++ b/test-cases/RMLTC0009a-RDB/mapping.ttl @@ -0,0 +1,51 @@ +@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/test-cases/RMLTC0009a-RDB/note.md b/test-cases/RMLTC0009a-RDB/note.md new file mode 100644 index 0000000..7c87bd8 --- /dev/null +++ b/test-cases/RMLTC0009a-RDB/note.md @@ -0,0 +1,4 @@ +## Change note + +Changes `Sport.ID` column from `INTEGER` to `VARCHAR` since postgres does not support joining on +columns of different types. diff --git a/test-cases/RMLTC0009a-RDB/output.nq b/test-cases/RMLTC0009a-RDB/output.nq new file mode 100644 index 0000000..b0b89f8 --- /dev/null +++ b/test-cases/RMLTC0009a-RDB/output.nq @@ -0,0 +1,4 @@ + "Venus Williams" . + "Demi Moore" . + "Tennis" . + . diff --git a/test-cases/RMLTC0009a-RDB/resource.sql b/test-cases/RMLTC0009a-RDB/resource.sql new file mode 100644 index 0000000..0f67456 --- /dev/null +++ b/test-cases/RMLTC0009a-RDB/resource.sql @@ -0,0 +1,17 @@ +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/test-cases/RMLTC0009b-RDB/README.md b/test-cases/RMLTC0009b-RDB/README.md new file mode 100644 index 0000000..81fa891 --- /dev/null +++ b/test-cases/RMLTC0009b-RDB/README.md @@ -0,0 +1,105 @@ +## RMLTC0009b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore" . + . + "Tennis" . + . + . + +``` + diff --git a/test-cases/RMLTC0009b-RDB/mapping.ttl b/test-cases/RMLTC0009b-RDB/mapping.ttl new file mode 100644 index 0000000..b04272f --- /dev/null +++ b/test-cases/RMLTC0009b-RDB/mapping.ttl @@ -0,0 +1,57 @@ +@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/test-cases/RMLTC0009b-RDB/note.md b/test-cases/RMLTC0009b-RDB/note.md new file mode 100644 index 0000000..7c87bd8 --- /dev/null +++ b/test-cases/RMLTC0009b-RDB/note.md @@ -0,0 +1,4 @@ +## Change note + +Changes `Sport.ID` column from `INTEGER` to `VARCHAR` since postgres does not support joining on +columns of different types. diff --git a/test-cases/RMLTC0009b-RDB/output.nq b/test-cases/RMLTC0009b-RDB/output.nq new file mode 100644 index 0000000..aef6b08 --- /dev/null +++ b/test-cases/RMLTC0009b-RDB/output.nq @@ -0,0 +1,8 @@ + . + "Venus Williams" . + . + "Demi Moore" . + . + "Tennis" . + . + . diff --git a/test-cases/RMLTC0009b-RDB/resource.sql b/test-cases/RMLTC0009b-RDB/resource.sql new file mode 100644 index 0000000..be02147 --- /dev/null +++ b/test-cases/RMLTC0009b-RDB/resource.sql @@ -0,0 +1,17 @@ +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/test-cases/RMLTC0009c-RDB/README.md b/test-cases/RMLTC0009c-RDB/README.md new file mode 100644 index 0000000..0bd0231 --- /dev/null +++ b/test-cases/RMLTC0009c-RDB/README.md @@ -0,0 +1,76 @@ +## RMLTC0009c-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus Williams" . + "Demi Moore" . + + + +``` + diff --git a/test-cases/RMLTC0009c-RDB/mapping.ttl b/test-cases/RMLTC0009c-RDB/mapping.ttl new file mode 100644 index 0000000..ac18f54 --- /dev/null +++ b/test-cases/RMLTC0009c-RDB/mapping.ttl @@ -0,0 +1,29 @@ +@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/test-cases/RMLTC0009c-RDB/output.nq b/test-cases/RMLTC0009c-RDB/output.nq new file mode 100644 index 0000000..f789cbf --- /dev/null +++ b/test-cases/RMLTC0009c-RDB/output.nq @@ -0,0 +1,4 @@ + "Venus Williams" . + "Demi Moore" . + + diff --git a/test-cases/RMLTC0009c-RDB/resource.sql b/test-cases/RMLTC0009c-RDB/resource.sql new file mode 100644 index 0000000..068f4d8 --- /dev/null +++ b/test-cases/RMLTC0009c-RDB/resource.sql @@ -0,0 +1,20 @@ +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/test-cases/RMLTC0009d-RDB/README.md b/test-cases/RMLTC0009d-RDB/README.md new file mode 100644 index 0000000..e26b32f --- /dev/null +++ b/test-cases/RMLTC0009d-RDB/README.md @@ -0,0 +1,85 @@ +## RMLTC0009d-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Venus Williams" . + "1"^^ . + "Demi Moore" . + "0"^^ . + + + + +``` + diff --git a/test-cases/RMLTC0009d-RDB/mapping.ttl b/test-cases/RMLTC0009d-RDB/mapping.ttl new file mode 100644 index 0000000..a701020 --- /dev/null +++ b/test-cases/RMLTC0009d-RDB/mapping.ttl @@ -0,0 +1,35 @@ +@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/test-cases/RMLTC0009d-RDB/output.nq b/test-cases/RMLTC0009d-RDB/output.nq new file mode 100644 index 0000000..9ecd9fc --- /dev/null +++ b/test-cases/RMLTC0009d-RDB/output.nq @@ -0,0 +1,7 @@ + "Venus Williams" . + "1"^^ . + "Demi Moore" . + "0"^^ . + + + diff --git a/test-cases/RMLTC0009d-RDB/resource.sql b/test-cases/RMLTC0009d-RDB/resource.sql new file mode 100644 index 0000000..d8ba927 --- /dev/null +++ b/test-cases/RMLTC0009d-RDB/resource.sql @@ -0,0 +1,20 @@ +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/test-cases/RMLTC0010a-RDB/README.md b/test-cases/RMLTC0010a-RDB/README.md new file mode 100644 index 0000000..34087ba --- /dev/null +++ b/test-cases/RMLTC0010a-RDB/README.md @@ -0,0 +1,62 @@ +## RMLTC0010a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + + +``` + diff --git a/test-cases/RMLTC0010a-RDB/mapping.ttl b/test-cases/RMLTC0010a-RDB/mapping.ttl new file mode 100644 index 0000000..2c3734e --- /dev/null +++ b/test-cases/RMLTC0010a-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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/test-cases/RMLTC0010a-RDB/output.nq b/test-cases/RMLTC0010a-RDB/output.nq new file mode 100644 index 0000000..29911d6 --- /dev/null +++ b/test-cases/RMLTC0010a-RDB/output.nq @@ -0,0 +1,4 @@ + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + diff --git a/test-cases/RMLTC0010a-RDB/resource.sql b/test-cases/RMLTC0010a-RDB/resource.sql new file mode 100644 index 0000000..12f1652 --- /dev/null +++ b/test-cases/RMLTC0010a-RDB/resource.sql @@ -0,0 +1,10 @@ +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/test-cases/RMLTC0010b-RDB/README.md b/test-cases/RMLTC0010b-RDB/README.md new file mode 100644 index 0000000..bbca889 --- /dev/null +++ b/test-cases/RMLTC0010b-RDB/README.md @@ -0,0 +1,62 @@ +## RMLTC0010b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + + +``` + diff --git a/test-cases/RMLTC0010b-RDB/mapping.ttl b/test-cases/RMLTC0010b-RDB/mapping.ttl new file mode 100644 index 0000000..195c6fb --- /dev/null +++ b/test-cases/RMLTC0010b-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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/test-cases/RMLTC0010b-RDB/output.nq b/test-cases/RMLTC0010b-RDB/output.nq new file mode 100644 index 0000000..c92a08b --- /dev/null +++ b/test-cases/RMLTC0010b-RDB/output.nq @@ -0,0 +1,4 @@ + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + diff --git a/test-cases/RMLTC0010b-RDB/resource.sql b/test-cases/RMLTC0010b-RDB/resource.sql new file mode 100644 index 0000000..12f1652 --- /dev/null +++ b/test-cases/RMLTC0010b-RDB/resource.sql @@ -0,0 +1,10 @@ +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/test-cases/RMLTC0010c-RDB/README.md b/test-cases/RMLTC0010c-RDB/README.md new file mode 100644 index 0000000..483a980 --- /dev/null +++ b/test-cases/RMLTC0010c-RDB/README.md @@ -0,0 +1,63 @@ +## RMLTC0010c-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "{{{ BO }}}" . + "{{{ IE }}}" . + "{{{ MF }}}" . + + +``` + diff --git a/test-cases/RMLTC0010c-RDB/mapping.ttl b/test-cases/RMLTC0010c-RDB/mapping.ttl new file mode 100644 index 0000000..932ed73 --- /dev/null +++ b/test-cases/RMLTC0010c-RDB/mapping.ttl @@ -0,0 +1,26 @@ +@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/test-cases/RMLTC0010c-RDB/output.nq b/test-cases/RMLTC0010c-RDB/output.nq new file mode 100644 index 0000000..5c7e108 --- /dev/null +++ b/test-cases/RMLTC0010c-RDB/output.nq @@ -0,0 +1,4 @@ + "{{{ BO }}}" . + "{{{ IE }}}" . + "{{{ MF }}}" . + diff --git a/test-cases/RMLTC0010c-RDB/resource.sql b/test-cases/RMLTC0010c-RDB/resource.sql new file mode 100644 index 0000000..12f1652 --- /dev/null +++ b/test-cases/RMLTC0010c-RDB/resource.sql @@ -0,0 +1,10 @@ +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/test-cases/RMLTC0011a-RDB/README.md b/test-cases/RMLTC0011a-RDB/README.md new file mode 100644 index 0000000..bf6f4a0 --- /dev/null +++ b/test-cases/RMLTC0011a-RDB/README.md @@ -0,0 +1,148 @@ +## RMLTC0011a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Tennis" . + "110"^^ . + . + "Williams" . + "Venus" . + "10"^^ . + "Football" . + "111"^^ . + . + "Villa" . + "David" . + "12"^^ . + "Formula1" . + "112"^^ . + "Alonso" . + "Fernando" . + "11"^^ . + . + . + + +``` + diff --git a/test-cases/RMLTC0011a-RDB/mapping.ttl b/test-cases/RMLTC0011a-RDB/mapping.ttl new file mode 100644 index 0000000..00faefd --- /dev/null +++ b/test-cases/RMLTC0011a-RDB/mapping.ttl @@ -0,0 +1,72 @@ +@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/test-cases/RMLTC0011a-RDB/output.nq b/test-cases/RMLTC0011a-RDB/output.nq new file mode 100644 index 0000000..8d0bda9 --- /dev/null +++ b/test-cases/RMLTC0011a-RDB/output.nq @@ -0,0 +1,20 @@ + "Tennis" . + "110"^^ . + . + "Williams" . + "Venus" . + "10"^^ . + "Football" . + "111"^^ . + . + "Villa" . + "David" . + "12"^^ . + "Formula1" . + "112"^^ . + "Alonso" . + "Fernando" . + "11"^^ . + . + . + diff --git a/test-cases/RMLTC0011a-RDB/resource.sql b/test-cases/RMLTC0011a-RDB/resource.sql new file mode 100644 index 0000000..a256aa3 --- /dev/null +++ b/test-cases/RMLTC0011a-RDB/resource.sql @@ -0,0 +1,33 @@ +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/test-cases/RMLTC0011b-RDB/README.md b/test-cases/RMLTC0011b-RDB/README.md new file mode 100644 index 0000000..250f86b --- /dev/null +++ b/test-cases/RMLTC0011b-RDB/README.md @@ -0,0 +1,138 @@ +## RMLTC0011b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Williams" . + "Venus" . + "Villa" . + "David" . + "Alonso" . + "Fernando" . + "Tennis" . + "110"^^ . + "Football" . + "111"^^ . + "Formula1" . + "112"^^ . + . + . + . + . + + +``` + diff --git a/test-cases/RMLTC0011b-RDB/mapping.ttl b/test-cases/RMLTC0011b-RDB/mapping.ttl new file mode 100644 index 0000000..6accd44 --- /dev/null +++ b/test-cases/RMLTC0011b-RDB/mapping.ttl @@ -0,0 +1,67 @@ +@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/test-cases/RMLTC0011b-RDB/output.nq b/test-cases/RMLTC0011b-RDB/output.nq new file mode 100644 index 0000000..6a82565 --- /dev/null +++ b/test-cases/RMLTC0011b-RDB/output.nq @@ -0,0 +1,17 @@ + "Williams" . + "Venus" . + "Villa" . + "David" . + "Alonso" . + "Fernando" . + "Tennis" . + "110"^^ . + "Football" . + "111"^^ . + "Formula1" . + "112"^^ . + . + . + . + . + diff --git a/test-cases/RMLTC0011b-RDB/resource.sql b/test-cases/RMLTC0011b-RDB/resource.sql new file mode 100644 index 0000000..acdc4aa --- /dev/null +++ b/test-cases/RMLTC0011b-RDB/resource.sql @@ -0,0 +1,31 @@ +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/test-cases/RMLTC0012a-RDB/README.md b/test-cases/RMLTC0012a-RDB/README.md new file mode 100644 index 0000000..2866f22 --- /dev/null +++ b/test-cases/RMLTC0012a-RDB/README.md @@ -0,0 +1,78 @@ +## RMLTC0012a-RDB + +**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: . +@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" . + +``` + +**Output** +``` +_:Bob_Smith_30 "30"^^ . +_:Bob_Smith_30 "Bob Smith" . +_:Sue_Jones_20 "20"^^ . +_:Sue_Jones_20 "Sue Jones" . + + +``` + diff --git a/test-cases/RMLTC0012a-RDB/mapping.ttl b/test-cases/RMLTC0012a-RDB/mapping.ttl new file mode 100644 index 0000000..e126236 --- /dev/null +++ b/test-cases/RMLTC0012a-RDB/mapping.ttl @@ -0,0 +1,33 @@ +@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/test-cases/RMLTC0012a-RDB/output.nq b/test-cases/RMLTC0012a-RDB/output.nq new file mode 100644 index 0000000..10e4040 --- /dev/null +++ b/test-cases/RMLTC0012a-RDB/output.nq @@ -0,0 +1,5 @@ +_:Bob_Smith_30 "30"^^ . +_:Bob_Smith_30 "Bob Smith" . +_:Sue_Jones_20 "20"^^ . +_:Sue_Jones_20 "Sue Jones" . + diff --git a/test-cases/RMLTC0012a-RDB/resource.sql b/test-cases/RMLTC0012a-RDB/resource.sql new file mode 100644 index 0000000..af98da7 --- /dev/null +++ b/test-cases/RMLTC0012a-RDB/resource.sql @@ -0,0 +1,17 @@ +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/test-cases/RMLTC0012b-RDB/README.md b/test-cases/RMLTC0012b-RDB/README.md new file mode 100644 index 0000000..f58ee5a --- /dev/null +++ b/test-cases/RMLTC0012b-RDB/README.md @@ -0,0 +1,94 @@ +## RMLTC0012b-RDB + +**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: . +@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 "password"; + d2rq:username "postgres" . + +``` + +**Output** +``` +_:BobSmith "London" . +_:BobSmith "Bob Smith" . +_:SueJones "Madrid" . +_:SueJones "Sue Jones" . + + +``` + diff --git a/test-cases/RMLTC0012b-RDB/mapping.ttl b/test-cases/RMLTC0012b-RDB/mapping.ttl new file mode 100644 index 0000000..4b2bc1b --- /dev/null +++ b/test-cases/RMLTC0012b-RDB/mapping.ttl @@ -0,0 +1,45 @@ +@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 "password"; + d2rq:username "postgres" . diff --git a/test-cases/RMLTC0012b-RDB/output.nq b/test-cases/RMLTC0012b-RDB/output.nq new file mode 100644 index 0000000..0d556bb --- /dev/null +++ b/test-cases/RMLTC0012b-RDB/output.nq @@ -0,0 +1,5 @@ +_:BobSmith "London" . +_:BobSmith "Bob Smith" . +_:SueJones "Madrid" . +_:SueJones "Sue Jones" . + diff --git a/test-cases/RMLTC0012b-RDB/resource.sql b/test-cases/RMLTC0012b-RDB/resource.sql new file mode 100644 index 0000000..2761bf6 --- /dev/null +++ b/test-cases/RMLTC0012b-RDB/resource.sql @@ -0,0 +1,21 @@ +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/test-cases/RMLTC0012c-RDB/README.md b/test-cases/RMLTC0012c-RDB/README.md new file mode 100644 index 0000000..c26687b --- /dev/null +++ b/test-cases/RMLTC0012c-RDB/README.md @@ -0,0 +1,65 @@ +## RMLTC0012c-RDB + +**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: . +@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/test-cases/RMLTC0012c-RDB/mapping.ttl b/test-cases/RMLTC0012c-RDB/mapping.ttl new file mode 100644 index 0000000..c09a8c0 --- /dev/null +++ b/test-cases/RMLTC0012c-RDB/mapping.ttl @@ -0,0 +1,29 @@ +@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/test-cases/RMLTC0012c-RDB/resource.sql b/test-cases/RMLTC0012c-RDB/resource.sql new file mode 100644 index 0000000..46e386f --- /dev/null +++ b/test-cases/RMLTC0012c-RDB/resource.sql @@ -0,0 +1,18 @@ +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/test-cases/RMLTC0012d-RDB/README.md b/test-cases/RMLTC0012d-RDB/README.md new file mode 100644 index 0000000..5813328 --- /dev/null +++ b/test-cases/RMLTC0012d-RDB/README.md @@ -0,0 +1,63 @@ +## RMLTC0012d-RDB + +**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: . +@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/test-cases/RMLTC0012d-RDB/mapping.ttl b/test-cases/RMLTC0012d-RDB/mapping.ttl new file mode 100644 index 0000000..c8aa2a0 --- /dev/null +++ b/test-cases/RMLTC0012d-RDB/mapping.ttl @@ -0,0 +1,27 @@ +@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/test-cases/RMLTC0012d-RDB/resource.sql b/test-cases/RMLTC0012d-RDB/resource.sql new file mode 100644 index 0000000..46e386f --- /dev/null +++ b/test-cases/RMLTC0012d-RDB/resource.sql @@ -0,0 +1,18 @@ +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/test-cases/RMLTC0012e-RDB/README.md b/test-cases/RMLTC0012e-RDB/README.md new file mode 100644 index 0000000..b5e26c5 --- /dev/null +++ b/test-cases/RMLTC0012e-RDB/README.md @@ -0,0 +1,128 @@ +## RMLTC0012e-RDB + +**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: . +@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" . + +``` + +**Output** +``` +_:Bob_Smith_30 . +_:Bob_Smith_30 "Bob" . +_:Bob_Smith_30 "Smith" . +_:Bob_Smith_30 "30.0"^^ . +_:Sue_Jones_20 . +_:Sue_Jones_20 "Sue" . +_:Sue_Jones_20 "Jones" . +_:Sue_Jones_20 "20.0"^^ . +_: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/test-cases/RMLTC0012e-RDB/mapping.ttl b/test-cases/RMLTC0012e-RDB/mapping.ttl new file mode 100644 index 0000000..b143e99 --- /dev/null +++ b/test-cases/RMLTC0012e-RDB/mapping.ttl @@ -0,0 +1,69 @@ +@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/test-cases/RMLTC0012e-RDB/output.nq b/test-cases/RMLTC0012e-RDB/output.nq new file mode 100644 index 0000000..f7d95a2 --- /dev/null +++ b/test-cases/RMLTC0012e-RDB/output.nq @@ -0,0 +1,18 @@ +_:Bob_Smith_30 . +_:Bob_Smith_30 "Bob" . +_:Bob_Smith_30 "Smith" . +_:Bob_Smith_30 "30.0"^^ . +_:Sue_Jones_20 . +_:Sue_Jones_20 "Sue" . +_:Sue_Jones_20 "Jones" . +_:Sue_Jones_20 "20.0"^^ . +_: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/test-cases/RMLTC0012e-RDB/resource.sql b/test-cases/RMLTC0012e-RDB/resource.sql new file mode 100644 index 0000000..46e386f --- /dev/null +++ b/test-cases/RMLTC0012e-RDB/resource.sql @@ -0,0 +1,18 @@ +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/test-cases/RMLTC0013a-RDB/README.md b/test-cases/RMLTC0013a-RDB/README.md new file mode 100644 index 0000000..6e68729 --- /dev/null +++ b/test-cases/RMLTC0013a-RDB/README.md @@ -0,0 +1,62 @@ +## RMLTC0013a-RDB + +**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: . +@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 "password"; + d2rq:username "postgres" . + +``` + +**Output** +``` + "September, 2010" . + + + +``` + diff --git a/test-cases/RMLTC0013a-RDB/mapping.ttl b/test-cases/RMLTC0013a-RDB/mapping.ttl new file mode 100644 index 0000000..9b0ca79 --- /dev/null +++ b/test-cases/RMLTC0013a-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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 "password"; + d2rq:username "postgres" . diff --git a/test-cases/RMLTC0013a-RDB/note.md b/test-cases/RMLTC0013a-RDB/note.md new file mode 100644 index 0000000..026df64 --- /dev/null +++ b/test-cases/RMLTC0013a-RDB/note.md @@ -0,0 +1,3 @@ +## Change note + +Changed resource.sql to use quotes for column identifiers to use case-sensitive references. diff --git a/test-cases/RMLTC0013a-RDB/output.nq b/test-cases/RMLTC0013a-RDB/output.nq new file mode 100644 index 0000000..4b1bf1f --- /dev/null +++ b/test-cases/RMLTC0013a-RDB/output.nq @@ -0,0 +1,3 @@ + "September, 2010" . + + diff --git a/test-cases/RMLTC0013a-RDB/resource.sql b/test-cases/RMLTC0013a-RDB/resource.sql new file mode 100644 index 0000000..03a372d --- /dev/null +++ b/test-cases/RMLTC0013a-RDB/resource.sql @@ -0,0 +1,11 @@ +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/test-cases/RMLTC0014d-RDB/README.md b/test-cases/RMLTC0014d-RDB/README.md new file mode 100644 index 0000000..c1a3a24 --- /dev/null +++ b/test-cases/RMLTC0014d-RDB/README.md @@ -0,0 +1,79 @@ +## RMLTC0014d-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + +``` + diff --git a/test-cases/RMLTC0014d-RDB/mapping.ttl b/test-cases/RMLTC0014d-RDB/mapping.ttl new file mode 100644 index 0000000..2710809 --- /dev/null +++ b/test-cases/RMLTC0014d-RDB/mapping.ttl @@ -0,0 +1,31 @@ +@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/test-cases/RMLTC0014d-RDB/output.nq b/test-cases/RMLTC0014d-RDB/output.nq new file mode 100644 index 0000000..a1025c8 --- /dev/null +++ b/test-cases/RMLTC0014d-RDB/output.nq @@ -0,0 +1 @@ + . diff --git a/test-cases/RMLTC0014d-RDB/resource.sql b/test-cases/RMLTC0014d-RDB/resource.sql new file mode 100644 index 0000000..8457022 --- /dev/null +++ b/test-cases/RMLTC0014d-RDB/resource.sql @@ -0,0 +1,24 @@ +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/test-cases/RMLTC0015a-RDB/README.md b/test-cases/RMLTC0015a-RDB/README.md new file mode 100644 index 0000000..d93a036 --- /dev/null +++ b/test-cases/RMLTC0015a-RDB/README.md @@ -0,0 +1,92 @@ +## RMLTC0015a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "Bolivia, Plurinational State of"@en . + "Estado Plurinacional de Bolivia"@es . + "Ireland"@en . + "Irlanda"@es . + + + +``` + diff --git a/test-cases/RMLTC0015a-RDB/mapping.ttl b/test-cases/RMLTC0015a-RDB/mapping.ttl new file mode 100644 index 0000000..a25b190 --- /dev/null +++ b/test-cases/RMLTC0015a-RDB/mapping.ttl @@ -0,0 +1,51 @@ +@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/test-cases/RMLTC0015a-RDB/output.nq b/test-cases/RMLTC0015a-RDB/output.nq new file mode 100644 index 0000000..a80dd6a --- /dev/null +++ b/test-cases/RMLTC0015a-RDB/output.nq @@ -0,0 +1,6 @@ + "Bolivia, Plurinational State of"@en . + "Estado Plurinacional de Bolivia"@es . + "Ireland"@en . + "Irlanda"@es . + + diff --git a/test-cases/RMLTC0015a-RDB/resource.sql b/test-cases/RMLTC0015a-RDB/resource.sql new file mode 100644 index 0000000..5640c8f --- /dev/null +++ b/test-cases/RMLTC0015a-RDB/resource.sql @@ -0,0 +1,12 @@ +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/test-cases/RMLTC0015b-RDB/README.md b/test-cases/RMLTC0015b-RDB/README.md new file mode 100644 index 0000000..4cc1fdf --- /dev/null +++ b/test-cases/RMLTC0015b-RDB/README.md @@ -0,0 +1,81 @@ +## RMLTC0015b-RDB + +**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: . +@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 = 'ES'; + """; + 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/test-cases/RMLTC0015b-RDB/mapping.ttl b/test-cases/RMLTC0015b-RDB/mapping.ttl new file mode 100644 index 0000000..d4edc4e --- /dev/null +++ b/test-cases/RMLTC0015b-RDB/mapping.ttl @@ -0,0 +1,51 @@ +@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 = 'ES'; + """; + 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/test-cases/RMLTC0015b-RDB/resource.sql b/test-cases/RMLTC0015b-RDB/resource.sql new file mode 100644 index 0000000..5640c8f --- /dev/null +++ b/test-cases/RMLTC0015b-RDB/resource.sql @@ -0,0 +1,12 @@ +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/test-cases/RMLTC0016a-RDB/README.md b/test-cases/RMLTC0016a-RDB/README.md new file mode 100644 index 0000000..af43288 --- /dev/null +++ b/test-cases/RMLTC0016a-RDB/README.md @@ -0,0 +1,111 @@ +## RMLTC0016a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "10"^^ . + "Monica" . + "Geller" . + "female" . + . + "11"^^ . + "Rachel" . + "Green" . + "female" . + . + "12"^^ . + "Chandler" . + "Bing" . + "male" . + + +``` + diff --git a/test-cases/RMLTC0016a-RDB/mapping.ttl b/test-cases/RMLTC0016a-RDB/mapping.ttl new file mode 100644 index 0000000..18ede22 --- /dev/null +++ b/test-cases/RMLTC0016a-RDB/mapping.ttl @@ -0,0 +1,45 @@ +@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/test-cases/RMLTC0016a-RDB/output.nq b/test-cases/RMLTC0016a-RDB/output.nq new file mode 100644 index 0000000..c854ecf --- /dev/null +++ b/test-cases/RMLTC0016a-RDB/output.nq @@ -0,0 +1,16 @@ + . + "10"^^ . + "Monica" . + "Geller" . + "female" . + . + "11"^^ . + "Rachel" . + "Green" . + "female" . + . + "12"^^ . + "Chandler" . + "Bing" . + "male" . + diff --git a/test-cases/RMLTC0016a-RDB/resource.sql b/test-cases/RMLTC0016a-RDB/resource.sql new file mode 100644 index 0000000..3fa73e6 --- /dev/null +++ b/test-cases/RMLTC0016a-RDB/resource.sql @@ -0,0 +1,27 @@ +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/test-cases/RMLTC0016b-RDB/README.md b/test-cases/RMLTC0016b-RDB/README.md new file mode 100644 index 0000000..a6a0580 --- /dev/null +++ b/test-cases/RMLTC0016b-RDB/README.md @@ -0,0 +1,94 @@ +## RMLTC0016b-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "80.25"^^ . + "1.65"^^ . + . + "70.22"^^ . + "1.7"^^ . + . + "90.31"^^ . + "1.76"^^ . + +``` + diff --git a/test-cases/RMLTC0016b-RDB/mapping.ttl b/test-cases/RMLTC0016b-RDB/mapping.ttl new file mode 100644 index 0000000..14b93e7 --- /dev/null +++ b/test-cases/RMLTC0016b-RDB/mapping.ttl @@ -0,0 +1,35 @@ +@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/test-cases/RMLTC0016b-RDB/output.nq b/test-cases/RMLTC0016b-RDB/output.nq new file mode 100644 index 0000000..9edbacd --- /dev/null +++ b/test-cases/RMLTC0016b-RDB/output.nq @@ -0,0 +1,9 @@ + . + "80.25"^^ . + "1.65"^^ . + . + "70.22"^^ . + "1.7"^^ . + . + "90.31"^^ . + "1.76"^^ . diff --git a/test-cases/RMLTC0016b-RDB/resource.sql b/test-cases/RMLTC0016b-RDB/resource.sql new file mode 100644 index 0000000..3fa73e6 --- /dev/null +++ b/test-cases/RMLTC0016b-RDB/resource.sql @@ -0,0 +1,27 @@ +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/test-cases/RMLTC0016c-RDB/README.md b/test-cases/RMLTC0016c-RDB/README.md new file mode 100644 index 0000000..780c2ef --- /dev/null +++ b/test-cases/RMLTC0016c-RDB/README.md @@ -0,0 +1,94 @@ +## RMLTC0016c-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "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/test-cases/RMLTC0016c-RDB/mapping.ttl b/test-cases/RMLTC0016c-RDB/mapping.ttl new file mode 100644 index 0000000..b7eba2d --- /dev/null +++ b/test-cases/RMLTC0016c-RDB/mapping.ttl @@ -0,0 +1,35 @@ +@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/test-cases/RMLTC0016c-RDB/output.nq b/test-cases/RMLTC0016c-RDB/output.nq new file mode 100644 index 0000000..020b5b7 --- /dev/null +++ b/test-cases/RMLTC0016c-RDB/output.nq @@ -0,0 +1,9 @@ + . + "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/test-cases/RMLTC0016c-RDB/resource.sql b/test-cases/RMLTC0016c-RDB/resource.sql new file mode 100644 index 0000000..3fa73e6 --- /dev/null +++ b/test-cases/RMLTC0016c-RDB/resource.sql @@ -0,0 +1,27 @@ +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/test-cases/RMLTC0016d-RDB/README.md b/test-cases/RMLTC0016d-RDB/README.md new file mode 100644 index 0000000..6ac6e34 --- /dev/null +++ b/test-cases/RMLTC0016d-RDB/README.md @@ -0,0 +1,86 @@ +## RMLTC0016d-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + "false"^^ . + . + "true"^^ . + . + "true"^^ . + +``` + diff --git a/test-cases/RMLTC0016d-RDB/mapping.ttl b/test-cases/RMLTC0016d-RDB/mapping.ttl new file mode 100644 index 0000000..5105f9a --- /dev/null +++ b/test-cases/RMLTC0016d-RDB/mapping.ttl @@ -0,0 +1,30 @@ +@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/test-cases/RMLTC0016d-RDB/output.nq b/test-cases/RMLTC0016d-RDB/output.nq new file mode 100644 index 0000000..578b074 --- /dev/null +++ b/test-cases/RMLTC0016d-RDB/output.nq @@ -0,0 +1,6 @@ + . + "false"^^ . + . + "true"^^ . + . + "true"^^ . diff --git a/test-cases/RMLTC0016d-RDB/resource.sql b/test-cases/RMLTC0016d-RDB/resource.sql new file mode 100644 index 0000000..3fa73e6 --- /dev/null +++ b/test-cases/RMLTC0016d-RDB/resource.sql @@ -0,0 +1,27 @@ +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/test-cases/RMLTC0016e-RDB/README.md b/test-cases/RMLTC0016e-RDB/README.md new file mode 100644 index 0000000..b2b531b --- /dev/null +++ b/test-cases/RMLTC0016e-RDB/README.md @@ -0,0 +1,86 @@ +## RMLTC0016e-RDB + +**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: . +@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" . + +``` + +**Output** +``` + . + . + . + . + . + . + +``` + diff --git a/test-cases/RMLTC0016e-RDB/mapping.ttl b/test-cases/RMLTC0016e-RDB/mapping.ttl new file mode 100644 index 0000000..f6d99e5 --- /dev/null +++ b/test-cases/RMLTC0016e-RDB/mapping.ttl @@ -0,0 +1,30 @@ +@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/test-cases/RMLTC0016e-RDB/output.nq b/test-cases/RMLTC0016e-RDB/output.nq new file mode 100644 index 0000000..789a3e3 --- /dev/null +++ b/test-cases/RMLTC0016e-RDB/output.nq @@ -0,0 +1,6 @@ + . + . + . + . + . + . diff --git a/test-cases/RMLTC0016e-RDB/resource.sql b/test-cases/RMLTC0016e-RDB/resource.sql new file mode 100644 index 0000000..51e63e7 --- /dev/null +++ b/test-cases/RMLTC0016e-RDB/resource.sql @@ -0,0 +1,27 @@ +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/test-cases/RMLTC0019a-RDB/README.md b/test-cases/RMLTC0019a-RDB/README.md new file mode 100644 index 0000000..35679bf --- /dev/null +++ b/test-cases/RMLTC0019a-RDB/README.md @@ -0,0 +1,64 @@ +## RMLTC0019a-RDB + +**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: . +@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" . + +``` + +**Output** +``` + "http://example.com/ns#Jhon" . + "Carlos" . + +``` + diff --git a/test-cases/RMLTC0019a-RDB/mapping.ttl b/test-cases/RMLTC0019a-RDB/mapping.ttl new file mode 100644 index 0000000..0a57c29 --- /dev/null +++ b/test-cases/RMLTC0019a-RDB/mapping.ttl @@ -0,0 +1,29 @@ +@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/test-cases/RMLTC0019a-RDB/output.nq b/test-cases/RMLTC0019a-RDB/output.nq new file mode 100644 index 0000000..4a97fdf --- /dev/null +++ b/test-cases/RMLTC0019a-RDB/output.nq @@ -0,0 +1,2 @@ + "http://example.com/ns#Jhon" . + "Carlos" . diff --git a/test-cases/RMLTC0019a-RDB/resource.sql b/test-cases/RMLTC0019a-RDB/resource.sql new file mode 100644 index 0000000..ae78dc8 --- /dev/null +++ b/test-cases/RMLTC0019a-RDB/resource.sql @@ -0,0 +1,10 @@ +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/test-cases/RMLTC0019b-RDB/README.md b/test-cases/RMLTC0019b-RDB/README.md new file mode 100644 index 0000000..979129f --- /dev/null +++ b/test-cases/RMLTC0019b-RDB/README.md @@ -0,0 +1,51 @@ +## RMLTC0019b-RDB + +**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 (30,'Juan Daniel','Crespo'); + +``` + +**Mapping** +``` +@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/test-cases/RMLTC0019b-RDB/mapping.ttl b/test-cases/RMLTC0019b-RDB/mapping.ttl new file mode 100644 index 0000000..e7f00f3 --- /dev/null +++ b/test-cases/RMLTC0019b-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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/test-cases/RMLTC0019b-RDB/resource.sql b/test-cases/RMLTC0019b-RDB/resource.sql new file mode 100644 index 0000000..78519c1 --- /dev/null +++ b/test-cases/RMLTC0019b-RDB/resource.sql @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS Employee; + +CREATE TABLE Employee ( +ID INTEGER, +FirstName VARCHAR(50), +LastName VARCHAR(50) +); +INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo'); diff --git a/test-cases/RMLTC0020a-RDB/README.md b/test-cases/RMLTC0020a-RDB/README.md new file mode 100644 index 0000000..c7f5caf --- /dev/null +++ b/test-cases/RMLTC0020a-RDB/README.md @@ -0,0 +1,64 @@ +## RMLTC0020a-RDB + +**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: . +@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 "password"; + d2rq:username "postgres" . + +``` + +**Output** +``` + . + . + . + . + . + +``` + diff --git a/test-cases/RMLTC0020a-RDB/mapping.ttl b/test-cases/RMLTC0020a-RDB/mapping.ttl new file mode 100644 index 0000000..5b5e1d9 --- /dev/null +++ b/test-cases/RMLTC0020a-RDB/mapping.ttl @@ -0,0 +1,25 @@ +@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 "password"; + d2rq:username "postgres" . diff --git a/test-cases/RMLTC0020a-RDB/output.nq b/test-cases/RMLTC0020a-RDB/output.nq new file mode 100644 index 0000000..d2b4b5f --- /dev/null +++ b/test-cases/RMLTC0020a-RDB/output.nq @@ -0,0 +1,5 @@ + . + . + . + . + . diff --git a/test-cases/RMLTC0020a-RDB/resource.sql b/test-cases/RMLTC0020a-RDB/resource.sql new file mode 100644 index 0000000..0bee316 --- /dev/null +++ b/test-cases/RMLTC0020a-RDB/resource.sql @@ -0,0 +1,11 @@ +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/test-cases/RMLTC0021a-RDB/README.md b/test-cases/RMLTC0021a-RDB/README.md new file mode 100644 index 0000000..a185002 --- /dev/null +++ b/test-cases/RMLTC0021a-RDB/README.md @@ -0,0 +1,70 @@ +## RMLTC0021a-RDB + +**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: . +@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}" + ] . + +``` + +**Output** +``` + . + . + . + . + . + + + +``` + diff --git a/test-cases/RMLTC0021a-RDB/mapping.ttl b/test-cases/RMLTC0021a-RDB/mapping.ttl new file mode 100644 index 0000000..7d2dff2 --- /dev/null +++ b/test-cases/RMLTC0021a-RDB/mapping.ttl @@ -0,0 +1,30 @@ +@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/test-cases/RMLTC0021a-RDB/output.nq b/test-cases/RMLTC0021a-RDB/output.nq new file mode 100644 index 0000000..4488c58 --- /dev/null +++ b/test-cases/RMLTC0021a-RDB/output.nq @@ -0,0 +1,7 @@ + . + . + . + . + . + + diff --git a/test-cases/RMLTC0021a-RDB/resource.sql b/test-cases/RMLTC0021a-RDB/resource.sql new file mode 100644 index 0000000..9e31d74 --- /dev/null +++ b/test-cases/RMLTC0021a-RDB/resource.sql @@ -0,0 +1,10 @@ +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/test-cases/descriptions.csv b/test-cases/descriptions.csv index 7ee3132..af9a012 100644 --- a/test-cases/descriptions.csv +++ b/test-cases/descriptions.csv @@ -1,8 +1,8 @@ -ID,Title,Purpose,"Error -expected?",Input ,"Output -default","Output -1","Output -2","Output +ID,Title,Purpose,"Error +expected?",Input ,"Output +default","Output +1","Output +2","Output 3",Comment RMLIOREGTC0001a,Access CSV file and read column value,Access CSV file in a RML Logical Source,no,,,,,, RMLIOREGTC0001b,Missing CSV column,Handle missing CSV column in rml:reference,yes,,,,,, @@ -106,4 +106,63 @@ RMLIOREGTC0012e,CSVW comment,Ignore lines with comment prefix ,no,,,,,, RMLIOREGTC0012f,CSVW encoding,Use UTF-16 encoding instead when reading the CSV,no,,,,,, RMLIOREGTC0012g,CSVW tabs,TSV tabs,no,,,,,, RMLIOREGTC0012h,CSVW BOM,BOM value in CSV,no,,,,,, -RMLIOREGTC0012i,CSVW Quote Character,Define quote character for columns,no,,,,,, \ No newline at end of file +RMLIOREGTC0012i,CSVW Quote Character,Define quote character for columns,no,,,,,, +RMLTC0000-RDB,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0001a-RDB,"One column mapping, subject URI generation by using rr:template",Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property,no,,,,,, +RMLTC0001b-RDB,"One column mapping, generation of a BlankNode subject by using rr:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property,no,,,,,, +RMLTC0002a-RDB,"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,,,,,, +RMLTC0002b-RDB,"Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property",no,,,,,, +RMLTC0002c-RDB,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002d-RDB,"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-RDB,"Two columns mapping, an undefined rr:tableName",Tests the presence of an undefined rr:tableName,yes,,,,,, +RMLTC0002f-RDB,"Two columns mapping, delimited identifiers referenced as regular identifiers",Tests the presence of delimited identifiers referenced as regular identifiers,yes,,,,,, +RMLTC0002g-RDB,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, +RMLTC0002h-RDB,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, +RMLTC0002i-RDB,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, +RMLTC0002j-RDB,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, +RMLTC0003a-RDB,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, +RMLTC0003b-RDB,"Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery",no,,,,,, +RMLTC0003c-RDB,"Three columns mapping, by using a rr:template to produce literal",Tests: (1) three column mapping; and (2) the use of rr:template to produce literal,no,,,,,, +RMLTC0004a-RDB,"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 rr:class",no,,,,,, +RMLTC0004b-RDB,"One column mapping, presence of rr:termType rr:Literal on rr:subjectMap","Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid",yes,,,,,, +RMLTC0005a-RDB,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005b-RDB,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, +RMLTC0006a-RDB,"Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap","Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap",no,,,,,, +RMLTC0007a-RDB,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007b-RDB,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007c-RDB,"One row mapping, using rr:class","Tests subjectmap with more than one class IRIs, rr:class",no,,,,,, +RMLTC0007d-RDB,"One column mapping, specifying an rr:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007e-RDB,"One column mapping, using rr:graphMap and rr:class",Tests subjectmap with rr:graphMap and rr:class,no,,,,,, +RMLTC0007f-RDB,"One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type",Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007g-RDB,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007h-RDB,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-RDB,Generation of triples to a target graph by using rr:graphMap and rr:template,Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template,no,,,,,, +RMLTC0008b-RDB,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008c-RDB,Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap,no,,,,,, +RMLTC0009a-RDB,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009b-RDB,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009c-RDB,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, +RMLTC0009d-RDB,Named column in logical table,Test a logical table named column.,no,,,,,, +RMLTC0010a-RDB,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010b-RDB,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010c-RDB,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-RDB,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, +RMLTC0011b-RDB,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0012a-RDB,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-RDB,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,,,,,, +RMLTC0012c-RDB,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012d-RDB,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012e-RDB,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0013a-RDB,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,,,,,, +RMLTC0014d-RDB,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0015a-RDB,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015b-RDB,"Generation of language tags from a table with language information, and a term map with invalid rr:language value","Tests a term map with an invalid rr:language value, which is an error",yes,,,,,, +RMLTC0016a-RDB,Table with datatypes: string and integer,Tests the rr:termtype and datatype conversions: string and integer,no,,,,,, +RMLTC0016b-RDB,Table with datatypes: real and float,Tests the rr:termtype and datatype conversions: real and float,no,,,,,, +RMLTC0016c-RDB,Table with datatypes: date and timestamp,Tests the rr:termtype and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016d-RDB,"Table with datatypes, boolean conversions",Tests the rr:termtype and datatype conversions: boolean,no,,,,,, +RMLTC0016e-RDB,"Table with datatypes, binary column",Tests the rr:termtype and datatype conversions: binary,no,,,,,, +RMLTC0019a-RDB,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019b-RDB,"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)",yes,,,,,, +RMLTC0020a-RDB,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0021a-RDB,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, diff --git a/test-cases/dev.html b/test-cases/dev.html index cd6aca9..352b381 100644 --- a/test-cases/dev.html +++ b/test-cases/dev.html @@ -196,6 +196,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test-cases/manifest.ttl b/test-cases/manifest.ttl index e5a4678..d25ab4e 100644 --- a/test-cases/manifest.ttl +++ b/test-cases/manifest.ttl @@ -1,1104 +1,1760 @@ - "mapping.ttl" . - . - "RMLIOREGTC0012g" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "student.csv" . - "text/csv" . - . + . + "RMLIOREGTC0001a" . + "false"^^ . + "mapping.ttl" . + . + . + "student.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0001b" . + "true"^^ . + "mapping.ttl" . + . + . + "student.csv" . + "text.csv" . + . + "RMLIOREGTC0002a" . + "false"^^ . + "mapping.ttl" . + . + . + "student.json" . + "application/json" . + . + . "output.nq" . "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005a/Friends.json" . - "application/json" . - . - "mapping.ttl" . + . + "RMLIOREGTC0002b" . + "true"^^ . + "mapping.ttl" . + . + . + "student.json" . + "application/json" . + . + "RMLIOREGTC0002c" . + "true"^^ . + "mapping.ttl" . + . + . + "student.json" . + "application/json" . + . + "RMLIOREGTC0002d" . + "false"^^ . + "mapping.ttl" . + . + . + "student.json" . + "application/json" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0003a" . + "false"^^ . + "mapping.ttl" . + . + . + "student.xml" . + "application/xml" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0003b" . + "true"^^ . + "mapping.ttl" . + . + . + "student.xml" . + "application/xml" . + . + "RMLIOREGTC0003c" . + "true"^^ . + "mapping.ttl" . + . + . + "student.xml" . + "application/xml" . + . + "RMLIOREGTC0003d" . + "false"^^ . + "mapping.ttl" . + . + . + "student.xml" . + "application/xml" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0003e" . + "false"^^ . + "mapping.ttl" . + . + . + "student.xml" . + "application/xml" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004a" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004b" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0004c" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004d" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0004e" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0004f" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004g" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . "RMLIOREGTC0004h" . - . "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005s" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - "RMLIOREGTC0006i" . - . - "true"^^ . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005m/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006t/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0002a/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005h/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004u" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005k" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006a" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0004i" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0004j" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0004k" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . "output.nq" . "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0006v" . - . - "false"^^ . - . - "student.csv" . - "text/csv" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0011a" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005c/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006v/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005o/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0001a" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0003b" . - . - "true"^^ . - . - "mapping.ttl" . + . + "RMLIOREGTC0004l" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . "RMLIOREGTC0004m" . - . "true"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0005c" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005x" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0006n" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0002c/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005j/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0012d" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004c/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006q/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0002d" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0004e" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0004z" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005p" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006f" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005e/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006x/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005q/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006s/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004r" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - "RMLIOREGTC0005h" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006s" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004e/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005l/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0012i" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005g/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0010a/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006z/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005s/Friends.json" . - "application/json" . - . - "mapping.ttl" . - "RMLIOREGTC0004j" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005u" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006k" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0007a" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0012a" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005n/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004g/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005z/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0002a" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0004b" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0004w" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0005m" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006c" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006x" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005i/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004b/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005u/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0003d" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004o" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0005e" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005z" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006p" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005p/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004i/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0012f" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005k/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004d/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - "RMLIOREGTC0004g" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005r" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0006h" . - . - "true"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004p/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005w/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005r/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004k/Friends.json" . - "application/json" . - . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0004n" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . "output.nq" . "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004t" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0005j" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006u" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0008a" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004f/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0007a/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005y/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004r/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0012g/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0003a" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0009a/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004l" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0005b" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005w" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0006m" . - . - "true"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004a/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005t/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0012c" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004m/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006a/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - "RMLIOREGTC0002c" . - . - "true"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0004d" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0004y" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005o" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0006e" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006z" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004h/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0003a/Friends.json" . - "application/json" . - . - "student.csv" . - "text/csv" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004t/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006h/Friends.json" . - "application/json" . - . + . + "RMLIOREGTC0004o" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . "output.nq" . "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0012i/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . + . + "RMLIOREGTC0004p" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . "RMLIOREGTC0004q" . - . "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0005g" . - . - "true"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004o/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0006r" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005v/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006c/Friends.json" . - "application/json" . - . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004r" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004s" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . "output.nq" . "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0012h" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004j/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0003c/Friends.json" . - "application/json" . - . - "student.csv" . - "text/csv" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004v/Friends.json" . - "application/json" . - . - "mapping.ttl" . - "RMLIOREGTC0004i" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005t" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0006j" . - . - "true"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006j/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0009a" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005x/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004q/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006e/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004a" . - . - "false"^^ . - . - "mapping.ttl" . - . + . + "RMLIOREGTC0004t" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004u" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . "RMLIOREGTC0004v" . - . "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005l" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - "RMLIOREGTC0006b" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006w" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004l/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0003e/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0012a/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004x/Friends.json" . - "application/json" . - . - "student.csv" . - "text/csv" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006l/Friends.json" . - "application/json" . - . - "mapping.ttl" . - "RMLIOREGTC0001b" . - . - "true"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0003c" . - . - "true"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004n" . - . - "false"^^ . - . - "mapping.ttl" . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004w" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004x" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004y" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0004z" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005a" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005b" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005c" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . "RMLIOREGTC0005d" . - . "true"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0005y" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004s/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006g/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0011a/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0012e" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0012h/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004f" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004n/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005e" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005f" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005g" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005h" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005i" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005j" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005k" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005l" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005m" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0005n" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005o" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005p" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . "RMLIOREGTC0005q" . - . "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0006g" . - . - "true"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004z/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006b/Friends.json" . - "application/json" . - . - "student.csv" . - "text/csv" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006n/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0003b/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004u/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006i/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004s" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0005i" . - . - "true"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005b/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0006t" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006u/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005r" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . "output.nq" . "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0002b/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006d/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006p/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004k" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005a" . - . - "false"^^ . - . - "mapping.ttl" . - . + . + "RMLIOREGTC0005s" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005t" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005u" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . "RMLIOREGTC0005v" . - . "false"^^ . - . - "mapping.ttl" . - . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005w" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005x" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005y" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0005z" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006a" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006b" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006c" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006d" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006e" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006f" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006g" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006h" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006i" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006j" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006k" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . "RMLIOREGTC0006l" . - . "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0003d/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0010a" . - . - "false"^^ . - . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006m" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLIOREGTC0006n" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006p" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006q" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006r" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006s" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006t" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006u" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006v" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006w" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006x" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006y" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0006z" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0007a" . + "false"^^ . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0008a" . + "false"^^ . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0009a" . + "false"^^ . + "mapping.ttl" . + . + . + "student.json" . + "application/json" . + . + . "output.nq" . "application/n-quads" . - . - "mapping.ttl" . - . + . + "RMLIOREGTC0010a" . + "false"^^ . + "mapping.ttl" . + . + . + "student.json" . + "application/json" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0011a" . + "false"^^ . + "mapping.ttl" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0012a" . + "false"^^ . + "mapping.ttl" . + . + . + "Friends.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . "RMLIOREGTC0012b" . - . "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004w/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006k/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005d/Friends.json" . - "application/json" . - . + "mapping.ttl" . + . + . + "student.csv" . + "text.csv" . + . + . "output.nq" . "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006w/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - "RMLIOREGTC0002b" . - . - "true"^^ . - . - "student.csv" . - "text/csv" . + . + "RMLIOREGTC0012c" . + "false"^^ . + "mapping.ttl" . + . + . + "student.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0012d" . + "false"^^ . + "mapping.ttl" . + . + . + "student.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0012e" . + "false"^^ . + "mapping.ttl" . + . + . + "student.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0012f" . + "false"^^ . + "mapping.ttl" . + . . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0004c" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0004x" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005n" . - . - "false"^^ . - . - "mapping.ttl" . - "RMLIOREGTC0006d" . - . - "true"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0006y" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0002d/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006f/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006r/Friends.json" . - "application/json" . - . - "mapping.ttl" . - . - "RMLIOREGTC0003e" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0004p" . - . - "false"^^ . - . - "mapping.ttl" . - . - "RMLIOREGTC0005f" . - . - "false"^^ . - . - "output.nq" . - "application/n-quads" . - . - "mapping.ttl" . - . - "RMLIOREGTC0006q" . - . - "false"^^ . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0004y/Friends.json" . - "application/json" . - . - "output.nq" . - "application/n-quads" . - . - "output.nq" . - "application/n-quads" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0005f/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006m/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0008a/Friends.json" . - "application/json" . - . - "http://w3id.org/rml/resources/rml-io/RMLIOREGTC0006y/Friends.json" . - "application/json" . - . + "student.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0012g" . + "false"^^ . + "mapping.ttl" . + . + . + "student.tsv" . + "text/tab-separated-values" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0012h" . + "false"^^ . + "mapping.ttl" . + . + . + "data.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLIOREGTC0012i" . + "false"^^ . + "mapping.ttl" . + . + . + "Friends.csv" . + "text.csv" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0000-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0001a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0001b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0002a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0002b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0002c-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0002d-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0002e-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0002f-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0002g-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0002h-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0002i-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0002j-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0003a-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0003b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0003c-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0004a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0004b-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0005a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0005b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0006a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007c-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007d-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007e-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007f-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007g-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0007h-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0008a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0008b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0008c-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0009a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0009b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0009c-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0009d-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0010a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0010b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0010c-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0011a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0011b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0012a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0012b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0012c-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0012d-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0012e-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0013a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0014d-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0015a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0015b-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0016a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0016b-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0016c-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0016d-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0016e-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0019a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0019b-RDB" . + "true"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + "RMLTC0020a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . + . + "RMLTC0021a-RDB" . + "false"^^ . + "mapping.ttl" . + . + . + "resource.sql" . + "application/sql" . + . + . + "output.nq" . + "application/n-quads" . diff --git a/test-cases/metadata.csv b/test-cases/metadata.csv index a71f581..1aafce5 100644 --- a/test-cases/metadata.csv +++ b/test-cases/metadata.csv @@ -1,103 +1,162 @@ ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error -RMLIOREGTC0006a,Access SQLServer database and column,Access a SQLServer database with D2RQ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005h,"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",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0004p,MySQL: Unnamed column in a logical table,Test a logical table with unnamed column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0012g,CSVW tabs,TSV tabs,json,mapping.ttl,text/tab-separated-values,,,application/n-quads,,,student.tsv,,,output.nq,,,false -RMLIOREGTC0012h,CSVW BOM,BOM value in CSV,json,mapping.ttl,text.csv,,,application/n-quads,,,data.csv,,,output.nq,,,false -RMLIOREGTC0005c,PostgreSQL NULL,Handle PostgreSQL NULL value,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006q,SQLServer: Named column in logical table,Test a logical table named column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0012e,CSVW comment,Ignore lines with comment prefix ,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false -RMLIOREGTC0004j,"MySQL: Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0001a,Access CSV file and read column value,Access CSV file in a RML Logical Source,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLIOREGTC0001b,Missing CSV column,Handle missing CSV column in rml:reference,json,mapping.ttl,text.csv,,,,,,student.csv,,,,,,true +RMLIOREGTC0002a,Access JSON file and a JSON value,Access JSON file in a RML Logical Source,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLIOREGTC0002b,Missing JSON value,Handle missing JSON value in rml:reference,json,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLIOREGTC0002c,Invalid JSONpath,Handle invalid JSONPath (unparseable),json,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLIOREGTC0002d,JSON null,Skip JSON null values,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLIOREGTC0003a,Access XML file and XML value,Access XML file in a RML Logical Source,json,mapping.ttl,application/xml,,,application/n-quads,,,student.xml,,,output.nq,,,false RMLIOREGTC0003b,Missing XML value,Handle missing XML value in rml:reference,json,mapping.ttl,application/xml,,,,,,student.xml,,,,,,true -RMLIOREGTC0005b,Missing PostgreSQL column,Handle missing PostgreSQL column in rml:reference,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0012c,CSVW delimiter,Use tab as delimiter for CSV file,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLIOREGTC0003c,Invalid XPath expression,Handle invalid XPath (unparseable),json,mapping.ttl,application/xml,,,,,,student.xml,,,,,,true +RMLIOREGTC0003d,XML Namespace,Handle XML namespaces in expressions,json,mapping.ttl,application/xml,,,application/n-quads,,,student.xml,,,output.nq,,,false +RMLIOREGTC0003e,XML attributes selection,Test generation of triples with selected XML attributes,json,mapping.ttl,application/xml,,,application/n-quads,,,student.xml,,,output.nq,,,false RMLIOREGTC0004a,Access MySQL database and column,Access a MySQL database with D2RQ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006h,"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",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0004z,"MySQL: Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004b,Missing MySQL column,Handle missing MySQL column in rml:reference,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006d,SQLServer table invalid,Handle invalid table for SQLServer,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0011a,Access a SPARQL triplestore,Access a SPARQL triple story using a SPARQL query,json,mapping.ttl,,,,application/n-quads,,,,,,output.nq,,,false -RMLIOREGTC0004v,MySQL: Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006c,SQLServer NULL,Handle SQLServer NULL value,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005j,"PostgreSQL: Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0005z,"PostgreSQL: Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0012d,CSVW trim,Apply trimming on CSV values,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false -RMLIOREGTC0004s,"MySQL: M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0012f,CSVW encoding,Use UTF-16 encoding instead when reading the CSV,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false -RMLIOREGTC0002d,JSON null,Skip JSON null values,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLIOREGTC0009a,Access a JSON over Kafka,Access a Kafka stream with JSON data,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLIOREGTC0006i,"SQLServer: Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0005e,PostgreSQL query invalid,Handle invalid SQL query for PostgreSQL,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006r,"SQLServer: M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005x,PostgreSQL: Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006w,SQLServer: Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006v,SQLServer: Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006l,"SQLServer: Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0004n,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006u,"SQLServer: three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0004i,"MySQL: Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0005m,"PostgreSQL: Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006m,"SQLServer: Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006y,"SQLServer: Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006x,SQLServer: Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0004o,MySQL: Default mapping,Tests the generation of a default mapping for tables without a primary key,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0012b,CSVW null value,Apply csvw:null as NULL value for the CSV file,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false -RMLIOREGTC0012i,CSVW Quote Character,Define quote character for columns,json,mapping.ttl,text.csv,,,application/n-quads,,,Friends.csv,,,output.nq,,,false -RMLIOREGTC0006f,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004c,MySQL NULL,Handle MySQL NULL value,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004d,MySQL invalid table,Handle invalid SQL table for MySQL,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0005l,"PostgreSQL: Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005u,"PostgreSQL: three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004e,MySQL query invalid,Handle invalid SQL query for MySQL,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0004f,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004g,"MySQL: Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0012a,Access a CSVW file,Access a CSV file described with CSVW,json,mapping.ttl,text.csv,,,application/n-quads,,,Friends.csv,,,output.nq,,,false -RMLIOREGTC0005t,PostgreSQL: Default mapping,Tests the generation of a default mapping for tables without a primary key.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005n,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0007a,Access JSON file as DCAT Dataset,Access a JSON file via IRI with DCAT Dataset,json,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,output.nq,,,false -RMLIOREGTC0005a,Access PostgreSQL database and column,Access a PostgreSQL database with D2RQ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0001b,Missing CSV column,Handle missing CSV column in rml:reference,json,mapping.ttl,text.csv,,,,,,student.csv,,,,,,true -RMLIOREGTC0003a,Access XML file and XML value,Access XML file in a RML Logical Source,json,mapping.ttl,application/xml,,,application/n-quads,,,student.xml,,,output.nq,,,false -RMLIOREGTC0004c,MySQL NULL,Handle MySQL NULL value,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004h,"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",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006k,"SQLServer: Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0004t,MySQL: Default mapping,Tests the generation of a default mapping for tables without a primary key.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005s,"PostgreSQL: M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005y,"PostgreSQL: Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005v,PostgreSQL: Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004i,"MySQL: Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0004j,"MySQL: Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true RMLIOREGTC0004k,"MySQL: Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005k,"PostgreSQL: Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004l,"MySQL: Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004m,"MySQL: Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006t,SQLServer: Default mapping,Tests the generation of a default mapping for tables without a primary key.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0010a,Access a JSON over MQTT,Access a MQTT stream with JSON data,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLIOREGTC0004x,MySQL: Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0001a,Access CSV file and read column value,Access CSV file in a RML Logical Source,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false -RMLIOREGTC0006g,"SQLServer: Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0004r,"MySQL: M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005w,PostgreSQL: Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0002a,Access JSON file and a JSON value,Access JSON file in a RML Logical Source,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLIOREGTC0006j,"SQLServer: Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0008a,Access JSON API over HTTP,Access a JSON hosted as a HTTP Web API,json,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,output.nq,,,false +RMLIOREGTC0004n,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004o,MySQL: Default mapping,Tests the generation of a default mapping for tables without a primary key,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004p,MySQL: Unnamed column in a logical table,Test a logical table with unnamed column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004q,MySQL: Named column in logical table,Test a logical table named column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0003e,XML attributes selection,Test generation of triples with selected XML attributes,json,mapping.ttl,application/xml,,,application/n-quads,,,student.xml,,,output.nq,,,false -RMLIOREGTC0006n,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0006e,SQLServer query invalid,Handle invalid SQL query for SQLServer,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006b,Missing SQLServer column,Handle missing SQLServer column in rml:reference,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006z,"SQLServer: Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0004f,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005q,PostgreSQL: Named column in logical table,Test a logical table named column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0003d,XML Namespace,Handle XML namespaces in expressions,json,mapping.ttl,application/xml,,,application/n-quads,,,student.xml,,,output.nq,,,false -RMLIOREGTC0002b,Missing JSON value,Handle missing JSON value in rml:reference,json,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLIOREGTC0004e,MySQL query invalid,Handle invalid SQL query for MySQL,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0006s,"SQLServer: M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004r,"MySQL: M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004s,"MySQL: M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004t,MySQL: Default mapping,Tests the generation of a default mapping for tables without a primary key.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004u,"MySQL: three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005r,"PostgreSQL: M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005g,"PostgreSQL: Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0002c,Invalid JSONpath,Handle invalid JSONPath (unparseable),json,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLIOREGTC0005d,PostgreSQL table invalid,Handle invalid table for PostgreSQL,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true -RMLIOREGTC0005o,PostgreSQL: Default mapping,Tests the generation of a default mapping for tables without a primary key,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004v,MySQL: Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004w,MySQL: Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0003c,Invalid XPath expression,Handle invalid XPath (unparseable),json,mapping.ttl,application/xml,,,,,,student.xml,,,,,,true -RMLIOREGTC0006p,SQLServer: Unnamed column in a logical table,Test a logical table with unnamed column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005p,PostgreSQL: Unnamed column in a logical table,Test a logical table with unnamed column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0004x,MySQL: Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false RMLIOREGTC0004y,"MySQL: Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0004l,"MySQL: Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false -RMLIOREGTC0005i,"PostgreSQL: Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0004z,"MySQL: Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005a,Access PostgreSQL database and column,Access a PostgreSQL database with D2RQ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005b,Missing PostgreSQL column,Handle missing PostgreSQL column in rml:reference,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005c,PostgreSQL NULL,Handle PostgreSQL NULL value,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005d,PostgreSQL table invalid,Handle invalid table for PostgreSQL,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005e,PostgreSQL query invalid,Handle invalid SQL query for PostgreSQL,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true RMLIOREGTC0005f,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005g,"PostgreSQL: Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005h,"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",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005i,"PostgreSQL: Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005j,"PostgreSQL: Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005k,"PostgreSQL: Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005l,"PostgreSQL: Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005m,"PostgreSQL: Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0005n,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005o,PostgreSQL: Default mapping,Tests the generation of a default mapping for tables without a primary key,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005p,PostgreSQL: Unnamed column in a logical table,Test a logical table with unnamed column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005q,PostgreSQL: Named column in logical table,Test a logical table named column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005r,"PostgreSQL: M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005s,"PostgreSQL: M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005t,PostgreSQL: Default mapping,Tests the generation of a default mapping for tables without a primary key.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005u,"PostgreSQL: three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005v,PostgreSQL: Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005w,PostgreSQL: Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005x,PostgreSQL: Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005y,"PostgreSQL: Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0005z,"PostgreSQL: Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006a,Access SQLServer database and column,Access a SQLServer database with D2RQ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006b,Missing SQLServer column,Handle missing SQLServer column in rml:reference,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006c,SQLServer NULL,Handle SQLServer NULL value,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006d,SQLServer table invalid,Handle invalid table for SQLServer,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006e,SQLServer query invalid,Handle invalid SQL query for SQLServer,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006f,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006g,"SQLServer: Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006h,"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",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006i,"SQLServer: Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006j,"SQLServer: Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006k,"SQLServer: Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006l,"SQLServer: Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006m,"SQLServer: Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLIOREGTC0006n,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006p,SQLServer: Unnamed column in a logical table,Test a logical table with unnamed column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006q,SQLServer: Named column in logical table,Test a logical table named column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006r,"SQLServer: M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006s,"SQLServer: M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006t,SQLServer: Default mapping,Tests the generation of a default mapping for tables without a primary key.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006u,"SQLServer: three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006v,SQLServer: Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006w,SQLServer: Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006x,SQLServer: Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006y,"SQLServer: Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0006z,"SQLServer: Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLIOREGTC0007a,Access JSON file as DCAT Dataset,Access a JSON file via IRI with DCAT Dataset,json,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,output.nq,,,false +RMLIOREGTC0008a,Access JSON API over HTTP,Access a JSON hosted as a HTTP Web API,json,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,output.nq,,,false +RMLIOREGTC0009a,Access a JSON over Kafka,Access a Kafka stream with JSON data,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLIOREGTC0010a,Access a JSON over MQTT,Access a MQTT stream with JSON data,json,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLIOREGTC0011a,Access a SPARQL triplestore,Access a SPARQL triple story using a SPARQL query,json,mapping.ttl,,,,application/n-quads,,,,,,output.nq,,,false +RMLIOREGTC0012a,Access a CSVW file,Access a CSV file described with CSVW,json,mapping.ttl,text.csv,,,application/n-quads,,,Friends.csv,,,output.nq,,,false +RMLIOREGTC0012b,CSVW null value,Apply csvw:null as NULL value for the CSV file,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLIOREGTC0012c,CSVW delimiter,Use tab as delimiter for CSV file,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLIOREGTC0012d,CSVW trim,Apply trimming on CSV values,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLIOREGTC0012e,CSVW comment,Ignore lines with comment prefix ,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLIOREGTC0012f,CSVW encoding,Use UTF-16 encoding instead when reading the CSV,json,mapping.ttl,text.csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLIOREGTC0012g,CSVW tabs,TSV tabs,json,mapping.ttl,text/tab-separated-values,,,application/n-quads,,,student.tsv,,,output.nq,,,false +RMLIOREGTC0012h,CSVW BOM,BOM value in CSV,json,mapping.ttl,text.csv,,,application/n-quads,,,data.csv,,,output.nq,,,false +RMLIOREGTC0012i,CSVW Quote Character,Define quote character for columns,json,mapping.ttl,text.csv,,,application/n-quads,,,Friends.csv,,,output.nq,,,false +RMLTC0000-RDB,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0001a-RDB,"One column mapping, subject URI generation by using rr:template",Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0001b-RDB,"One column mapping, generation of a BlankNode subject by using rr:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0002a-RDB,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0002b-RDB,"Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0002c-RDB,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0002d-RDB,"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",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0002e-RDB,"Two columns mapping, an undefined rr:tableName",Tests the presence of an undefined rr:tableName,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0002f-RDB,"Two columns mapping, delimited identifiers referenced as regular identifiers",Tests the presence of delimited identifiers referenced as regular identifiers,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0002g-RDB,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0002h-RDB,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0002i-RDB,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0002j-RDB,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0003a-RDB,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0003b-RDB,"Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0003c-RDB,"Three columns mapping, by using a rr:template to produce literal",Tests: (1) three column mapping; and (2) the use of rr:template to produce literal,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0004a-RDB,"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 rr:class",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0004b-RDB,"One column mapping, presence of rr:termType rr:Literal on rr:subjectMap","Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0005a-RDB,Typing of resources,Tests the typing of resources,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0005b-RDB,Default mapping,Tests the generation of a default mapping for tables without a primary key,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0006a-RDB,"Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap","Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007a-RDB,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007b-RDB,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007c-RDB,"One row mapping, using rr:class","Tests subjectmap with more than one class IRIs, rr:class",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007d-RDB,"One column mapping, specifying an rr:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007e-RDB,"One column mapping, using rr:graphMap and rr:class",Tests subjectmap with rr:graphMap and rr:class,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007f-RDB,"One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type",Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007g-RDB,Assigning triples to the default graph,Tests the generation of triples to the default graph,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0007h-RDB,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0008a-RDB,Generation of triples to a target graph by using rr:graphMap and rr:template,Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0008b-RDB,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0008c-RDB,Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0009a-RDB,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0009b-RDB,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0009c-RDB,Unnamed column in a logical table,Test a logical table with unnamed column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0009d-RDB,Named column in logical table,Test a logical table named column.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0010a-RDB,Template with table column with special chars,Tests a template with blank space in column value,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0010b-RDB,Template with table columns with special chars,Tests a template with special chars in column value,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0010c-RDB,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0011a-RDB,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0011b-RDB,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0012a-RDB,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.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0012b-RDB,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.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0012c-RDB,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0012d-RDB,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0012e-RDB,Default mapping,Tests the generation of a default mapping for tables without a primary key.,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0013a-RDB,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0014d-RDB,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0015a-RDB,Generation of language tags from a table with language information,Generation of language tags from a table with language information,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0015b-RDB,"Generation of language tags from a table with language information, and a term map with invalid rr:language value","Tests a term map with an invalid rr:language value, which is an error",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0016a-RDB,Table with datatypes: string and integer,Tests the rr:termtype and datatype conversions: string and integer,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0016b-RDB,Table with datatypes: real and float,Tests the rr:termtype and datatype conversions: real and float,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0016c-RDB,Table with datatypes: date and timestamp,Tests the rr:termtype and datatype conversions: date and timestamp,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0016d-RDB,"Table with datatypes, boolean conversions",Tests the rr:termtype and datatype conversions: boolean,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0016e-RDB,"Table with datatypes, binary column",Tests the rr:termtype and datatype conversions: binary,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0019a-RDB,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0019b-RDB,"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)",json,mapping.ttl,application/sql,,,,,,resource.sql,,,,,,true +RMLTC0020a-RDB,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false +RMLTC0021a-RDB,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,json,mapping.ttl,application/sql,,,application/n-quads,,,resource.sql,,,output.nq,,,false