--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D000-1table1column0rows/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,3 @@
+CREATE TABLE "Student" (
+ "Name" varchar(50)
+);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D000-1table1column0rows/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,1 @@
+# empty graph
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D000-1table1column0rows/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,34 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d000> a rdb2rdftest:DataBase;
+ dcterms:title "Empty table" ;
+ dcterms:identifier "D000-1table1column0rows" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0000>, <tc0000>;
+.
+
+<dg0000> a rdb2rdftest:DirectMapping;
+ dcterms:title "one table, one column, zero rows";
+ dcterms:identifier "Direct Graph TC0000" ;
+ test:purpose "Tests if an empty table produces an empty RDF graph" ;
+ test:specificationReference "#rules_table_triples" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:database <d000> ;
+ rdb2rdftest:output "directGraph.nt" ;
+.
+
+<tc0000> a rdb2rdftest:R2RML ;
+ dcterms:title "one table, one column, zero rows" ;
+ dcterms:identifier "R2RMLTC0000" ;
+ test:purpose "Tests if an empty table produces an empty RDF graph" ;
+ test:specificationReference "#physical-tables" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:database <d000> ;
+ rdb2rdftest:output "mapped.nq" ;
+ rdb2rdftest:mappingDocument "r2rml.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D000-1table1column0rows/mapped.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,1 @@
+# empty database
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D000-1table1column0rows/r2rml.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,19 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Student"; ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Name}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rr:column "Name" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D001-1table1column1row/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,4 @@
+CREATE TABLE Student (
+Name varchar(50)
+);
+INSERT INTO Student (Name) VALUES ('Venus');
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D001-1table1column1row/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,2 @@
+_:a <Student#Name> "Venus".
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D001-1table1column1row/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,46 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d001> a rdb2rdftest:DataBase;
+ dcterms:title "One table, one column, one row" ;
+ dcterms:identifier "D001-1table1column1row" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0001>, <tc0001a>, <tc0001b> ;
+.
+
+<dg0001> a rdb2rdftest:DirectMapping;
+ dcterms:title "One table, one column, one row";
+ dcterms:identifier "Direct Graph TC0001" ;
+ test:purpose "Tests: (1) one column mapping, no primary key; (2) generation of a \"BlankNode\" subject; (3) one column to one property" ;
+ test:specificationReference "#rules_table_triples" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d001> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.nt" ;
+.
+
+<tc0001a> a rdb2rdftest:R2RML ;
+ dcterms:title "One column mapping" ;
+ dcterms:identifier "R2RMLTC0001a" ;
+ test:purpose "Tests: (1) one column mapping, no primary key; (2) subject URI generation by using one single column; (3) one column to one property" ;
+ test:specificationReference "#dfn-template-valued-term-map" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d001> ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0001b> a rdb2rdftest:R2RML ;
+ dcterms:title "One column mapping" ;
+ dcterms:identifier "R2RMLTC0001b" ;
+ test:purpose "Tests: (1) one column mapping, no primary key; (2) generation of a \"BlankNode\" subject; (3) one column to one property" ;
+ test:specificationReference "#termtype" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d001> ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D001-1table1column1row/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,1 @@
+<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D001-1table1column1row/mappedb.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,1 @@
+_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D001-1table1column1row/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,19 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Student" ];
+
+ rr:subjectMap [ rr:template "http://example.com/{Name}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rr:column "Name" ]
+ ]
+ .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D001-1table1column1row/r2rmlb.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,19 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Student" ];
+
+ rr:subjectMap [ rr:column "Name"; rr:termType rr:BlankNode ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rr:column "Name" ]
+ ]
+ .
--- a/D003-1table3columns1row/manifest.ttl Fri Feb 10 19:44:24 2012 +0100
+++ b/D003-1table3columns1row/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -4,16 +4,16 @@
@base <http://mappingpedia.org/rdb2rdf/tc/> .
<d003> a rdb2rdftest:DataBase;
- dcterms:title "One table, two columns, one row" ;
+ dcterms:title "One table, three columns, one row" ;
dcterms:identifier "D003-1table3columns1row" ;
rdb2rdftest:sqlScriptFile "create.sql";
rdb2rdftest:relatedTestCase <dg0003>, <tc0003a>, <tc0003b>, <tc0003c>, <tc0003d> ;
.
<dg0003> a rdb2rdftest:DirectMapping ;
- dcterms:title "Two columns mapping" ;
+ dcterms:title "Three columns mapping" ;
dcterms:identifier "Direct Graph TC0003" ;
- test:purpose "Tests: (1) two columns mapping, no primary key; (2) generation of a \"BlankNode\" subject; (3) one column to one property" ;
+ test:purpose "Tests: (1) three columns mapping, no primary key; (2) generation of a \"BlankNode\" subject; (3) one column to one property" ;
test:specificationReference "#rules_table_triples" ;
test:reviewStatus test:unreviewed ;
rdb2rdftest:database <d003> ;
@@ -22,9 +22,9 @@
.
<tc0003a> a rdb2rdftest:R2RML ;
- dcterms:title "Two columns mapping" ;
+ dcterms:title "Three columns mapping" ;
dcterms:identifier "R2RMLTC0003a" ;
- test:purpose "Tests: (1) two column mapping, no primary key; (2) subject URI generated by concatenation of two column values; (3) one column to one property" ;
+ test:purpose "Tests: (1) three column mapping, no primary key; (2) subject URI generated by concatenation of two column values; (3) one column to one property" ;
test:specificationReference "#from-column" ;
test:reviewStatus test:unreviewed ;
rdb2rdftest:database <d003> ;
@@ -34,9 +34,9 @@
.
<tc0003b> a rdb2rdftest:R2RML ;
- dcterms:title "Two columns mapping" ;
+ dcterms:title "Three columns mapping" ;
dcterms:identifier "R2RMLTC0003b" ;
- test:purpose "Tests: (1) two column mapping, no primary key; (2) one column to one property and (3) from template feature" ;
+ test:purpose "Tests: (1) three column mapping, no primary key; (2) one column to one property and (3) from template feature" ;
test:specificationReference "#from-template" ;
test:reviewStatus test:unreviewed ;
rdb2rdftest:database <d003> ;
@@ -46,7 +46,7 @@
.
<tc0003c> a rdb2rdftest:R2RML ;
- dcterms:title "Two columns mapping" ;
+ dcterms:title "Three columns mapping" ;
dcterms:identifier "R2RMLTC0003c" ;
test:purpose "Tests rr:termType rr:BlankNode and rr:Literal" ;
test:specificationReference "#termtype" ;
@@ -58,7 +58,7 @@
.
<tc0003d> a rdb2rdftest:R2RML ;
- dcterms:title "Two columns mapping" ;
+ dcterms:title "Three columns mapping" ;
dcterms:identifier "R2RMLTC0003d" ;
test:purpose "Tests rr:termType rr:IRI" ;
test:specificationReference "#from-template" ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D004-1table2columns1rowprojection/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,5 @@
+CREATE TABLE "Student_Sport"(
+ "Student" varchar(50),
+ "Sport" varchar(50)
+);
+INSERT INTO "Student_Sport" ("Student","Sport") VALUES ('Venus', 'Tennis');
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D004-1table2columns1rowprojection/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,3 @@
+_:a a <Student_Sport> .
+_:a <Student_Sport#Student> "Venus" .
+_:a <Student_Sport#Sport> "Tennis" .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D004-1table2columns1rowprojection/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,46 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d004> a rdb2rdftest:DataBase;
+ dcterms:title "One table, two columns, one row, projection" ;
+ dcterms:identifier "D004-1table2columns1rowprojection" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0004>, <tc0004a>, <tc0004b> ;
+.
+
+<dg0004> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Two column mapping";
+ dcterms:identifier "Direct Graph TC0004" ;
+ test:purpose "Tests: (1) two column mapping, no primary key, (2) generation of a \"BlankNode\" subject; (3) from one row table to two different triples" ;
+ test:specificationReference "#rules_table_triples" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d004> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.nt" ;
+.
+
+<tc0004a> a rdb2rdftest:R2RML ;
+ dcterms:title "Projection" ;
+ dcterms:identifier "R2RMLTC0004a" ;
+ test:purpose "Tests: (1) two column mapping, no primary key, (2) subject URI generated by a column value; (3) from one row table to two different triples" ;
+ test:specificationReference "#typing" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d004> ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0004b> a rdb2rdftest:R2RML ;
+ dcterms:title "Projection" ;
+ dcterms:identifier "R2RMLTC0004b" ;
+ test:purpose "Tests: (1) two column mapping, no primary key, (2) generation of a \"BlankNode\" subject; (3) from one row table to two different triples" ;
+ test:specificationReference "#r2rml-views" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d004> ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D004-1table2columns1rowprojection/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,4 @@
+<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D004-1table2columns1rowprojection/mappedb.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,4 @@
+_:AX2dX38ec05dcX3aX131488bea58X3aXX2dX7ff6 <http://xmlns.com/foaf/0.1/name> "Tennis" .
+_:AX2dX38ec05dcX3aX131488bea58X3aXX2dX7ff6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+_:AX2dX38ec05dcX3aX131488bea58X3aXX2dX7ff7 <http://xmlns.com/foaf/0.1/name> "Venus" .
+_:AX2dX38ec05dcX3aX131488bea58X3aXX2dX7ff7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D004-1table2columns1rowprojection/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,35 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Student_Sport" ];
+
+ rr:subjectMap [ rr:template "http://example.com/{Student}";
+ rr:class ex:Student ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rr:column "Student" ]
+ ]
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Student_Sport" ];
+
+ rr:subjectMap [ rr:template "http://example.com/{Sport}";
+ rr:class ex:Sport ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rr:column "Sport" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D004-1table2columns1rowprojection/r2rmlb.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,45 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('Student' || Student) AS StudentId,
+ Student
+ from Student_Sport
+ """;
+ ] ;
+
+ rr:subjectMap [ rr:column "StudentId"; rr:termType rr:BlankNode;
+ rr:class ex:Student ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rr:column "Student" ]
+ ]
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('Sport' || Sport) AS SportId,
+ Sport
+ from Student_Sport
+ """;
+ ];
+
+ rr:subjectMap [ rr:column "SportId"; rr:termType rr:BlankNode;
+ rr:class ex:Sport ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rr:column "Sport" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D005-1table3columns3rows2duplicates/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,7 @@
+CREATE TABLE "IOUs" (
+ "fname" CHAR(20),
+ "lname" CHAR(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);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D005-1table3columns3rows2duplicates/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,15 @@
+_:a a <IOUs> .
+_:a <IOUs#fname> "Bob" .
+_:a <IOUs#lname> "Smith" .
+_:a <IOUs#amount> "30"^^<http://www.w3.org/2001/XMLSchema#float> .
+
+_:b a <IOUs> .
+_:b <IOUs#fname> "Sue" .
+_:b <IOUs#lname> "Jones" .
+_:b <IOUs#amount> "20"^^<http://www.w3.org/2001/XMLSchema#float> .
+
+_:c a <IOUs> .
+_:c <IOUs#fname> "Bob" .
+_:c <IOUs#lname> "Smith" .
+_:c <IOUs#amount> "30"^^<http://www.w3.org/2001/XMLSchema#float> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D005-1table3columns3rows2duplicates/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,35 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d005> a rdb2rdftest:DataBase;
+ dcterms:title "One table, three columns, three rows, two duplicate tuples" ;
+ dcterms:identifier "D005-1table3columns3rows2duplicates" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0005>, <tc0005a> ;
+.
+
+<dg0005> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Duplicate tuples, no primary key";
+ dcterms:identifier "Direct Graph TC0005" ;
+ test:purpose "Tests the generation of Blank Nodes for duplicate tuples" ;
+ test:specificationReference "#rules_table_triples" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d005> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.nt" ;
+.
+
+<tc0005a> a rdb2rdftest:R2RML ;
+ dcterms:title "Duplicate tuples, no primary key" ;
+ dcterms:identifier "R2RMLTC0005a" ;
+ test:purpose "Tests the generation of duplicate triples and the typing of resources" ;
+ test:specificationReference "#typing" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d005> ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D005-1table3columns3rows2duplicates/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,6 @@
+<http://example.com/Bob-Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob-Smith> <http://example.com/owes> "30"^^<http://www.w3.org/2001/XMLSchema#float> .
+<http://example.com/Sue-Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue-Jones> <http://example.com/owes> "20"^^<http://www.w3.org/2001/XMLSchema#float> .
+<http://example.com/Bob-Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob-Smith> <http://example.com/owes> "30"^^<http://www.w3.org/2001/XMLSchema#float> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D005-1table3columns3rows2duplicates/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,21 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "IOUs" ];
+
+ rr:subjectMap [ rr:template "http://example.com/{fname}-{lname}";
+ rr:class foaf:Person ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:owes ];
+ rr:objectMap [ rr:column "amount"; rr:datatype xsd:float ]
+ ];
+
+ .
--- a/D006-1table1primarykey1column1row/directGraph.nt Fri Feb 10 19:44:24 2012 +0100
+++ b/D006-1table1primarykey1column1row/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -1,3 +1,3 @@
-<Student/Name.Venus#_> <Student#Name> "Venus" .
-<Student/Name.Venus#_> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
+<Student/Name-Venus> <Student#Name> "Venus" .
+<Student/Name-Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
--- a/D006-1table1primarykey1column1row/manifest.ttl Fri Feb 10 19:44:24 2012 +0100
+++ b/D006-1table1primarykey1column1row/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -4,14 +4,14 @@
@base <http://mappingpedia.org/rdb2rdf/tc/> .
<d006> a rdb2rdftest:DataBase;
- dcterms:title "One table, one column, one primary key" ;
+ dcterms:title "One table, one primary key, one column, one row" ;
dcterms:identifier "D006-1table1primarykey1column1row" ;
rdb2rdftest:sqlScriptFile "create.sql";
rdb2rdftest:relatedTestCase <dg0006>, <tc0006a> ;
.
<dg0006> a rdb2rdftest:DirectMapping ;
- dcterms:title "One table, one column, one primary key";
+ dcterms:title "One table, one primary key, one column, one row";
dcterms:identifier "Direct Graph TC0006" ;
test:purpose "Tests a table with a column that is a primary key" ;
test:specificationReference "#rules_table_triples" ;
--- a/D007-1table1primarykey2columns1row/directGraph.nt Fri Feb 10 19:44:24 2012 +0100
+++ b/D007-1table1primarykey2columns1row/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -1,3 +1,3 @@
-<Student/ID.10#_> <Student#ID> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<Student/ID.10#_> <Student#Name> "Venus" .
-<Student/ID.10#_> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
+<Student/ID-10> <Student#ID> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<Student/ID-10> <Student#Name> "Venus" .
+<Student/ID-10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
--- a/D007-1table1primarykey2columns1row/manifest.ttl Fri Feb 10 19:44:24 2012 +0100
+++ b/D007-1table1primarykey2columns1row/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -4,16 +4,16 @@
@base <http://mappingpedia.org/rdb2rdf/tc/> .
<d007> a rdb2rdftest:DataBase;
- dcterms:title "One table, one column, one primary key" ;
+ dcterms:title "One table, one primary key, two columns, one row" ;
dcterms:identifier "D007-1table1primarykey2columns1row" ;
rdb2rdftest:sqlScriptFile "create.sql";
rdb2rdftest:relatedTestCase <dg0007>, <tc0007a>, <tc0007b>, <tc0007c>, <tc0007d>, <tc0007e>, <tc0007f>, <tc0007g> ;
.
<dg0007> a rdb2rdftest:DirectMapping ;
- dcterms:title "A table with a primary key and 2 columns";
+ dcterms:title "A table with a primary key and two columns";
dcterms:identifier "Direct Graph TC0007" ;
- test:purpose "Tests a table with a primary key and 2 columns" ;
+ test:purpose "Tests a table with a primary key and two columns" ;
test:specificationReference "#rules_table_triples" ;
test:reviewStatus test:unreviewed ;
rdb2rdftest:database <d007> ;
--- a/D008-1table1compositeprimarykey3columns1row/directGraph.nt Fri Feb 10 19:44:24 2012 +0100
+++ b/D008-1table1compositeprimarykey3columns1row/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -1,5 +1,5 @@
-<Student/ID.10_Name.Venus+Williams#_> <Student#ID> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<Student/ID.10_Name.Venus+Williams#_> <Student#Name> "Venus Williams" .
-<Student/ID.10_Name.Venus+Williams#_> <Student#Sport> "Tennis" .
-<Student/ID.10_Name.Venus+Williams#_> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
+<Student/ID-10.Name-Venus+Williams> <Student#ID> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<Student/ID-10.Name-Venus+Williams> <Student#Name> "Venus Williams" .
+<Student/ID-10.Name-Venus+Williams> <Student#Sport> "Tennis" .
+<Student/ID-10.Name-Venus+Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
--- a/D008-1table1compositeprimarykey3columns1row/manifest.ttl Fri Feb 10 19:44:24 2012 +0100
+++ b/D008-1table1compositeprimarykey3columns1row/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -4,7 +4,7 @@
@base <http://mappingpedia.org/rdb2rdf/tc/> .
<d008> a rdb2rdftest:DataBase;
- dcterms:title "Composite primary key" ;
+ dcterms:title "One table, a composite primary key, three columns, one row" ;
dcterms:identifier "D008-1table1compositeprimarykey3columns1row" ;
rdb2rdftest:sqlScriptFile "create.sql";
rdb2rdftest:relatedTestCase <dg0008>, <tc0008a> ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,18 @@
+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);
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,12 @@
+<Student/ID-20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
+<Student/ID-20> <Student#ID> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<Student/ID-20> <Student#Name> "Demi Moore" .
+<Student/ID-10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Student> .
+<Student/ID-10> <Student#ID> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<Student/ID-10> <Student#Name> "Venus Williams" .
+<Student/ID-10> <Student#Sport> 100 .
+<Student/ID-10> <Student#ref-Sport> <Sport/ID-100> .
+<Sport/ID-100> <Sport#ID> "100"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<Sport/ID-100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Sport> .
+<Sport/ID-100> <Sport#Name> "Tennis" .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,70 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d009> a rdb2rdftest:DataBase;
+ dcterms:title "Two tables, a primary key, a foreign key" ;
+ dcterms:identifier "D009-2tables1primarykey1foreignkey" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0009>, <tc0009a>, <tc0009b>, <tc0009c>, <tc0009d> ;
+.
+
+<dg0009> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Two tables 1 primary key 1 foreign key";
+ dcterms:identifier "Direct Graph TC0009" ;
+ test:purpose "Tests two tables with a primary key and a foreign key" ;
+ test:specificationReference "#rules_table_triples" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d009> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.nt" ;
+.
+
+<tc0009a> a rdb2rdftest:R2RML ;
+ dcterms:title "Two tables to 1 primary key 1 foreign key" ;
+ dcterms:identifier "R2RMLTC0009a" ;
+ test:purpose "Test foreign key relationships among logical tables" ;
+ test:specificationReference "#foreign-key" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d009> ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0009b> a rdb2rdftest:R2RML ;
+ dcterms:title "Two tables to multiple graphs" ;
+ dcterms:identifier "R2RMLTC0009b" ;
+ test:purpose "Test that results from distinct parts of the mapping can be directed to different target graphs." ;
+ test:specificationReference "#named-graphs" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d009> ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
+
+<tc0009c> a rdb2rdftest:R2RML ;
+ dcterms:title "Unamed column in logical table" ;
+ dcterms:identifier "R2RMLTC0009c" ;
+ test:purpose "Test a logical table with unamed column." ;
+ test:specificationReference "#dfn-logical-table" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d009> ;
+ rdb2rdftest:output "mappedc.nq" ;
+ rdb2rdftest:hasExpectedOutput false ;
+ rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
+
+<tc0009d> a rdb2rdftest:R2RML ;
+ dcterms:title "Named column in logical table" ;
+ dcterms:identifier "R2RMLTC0009d" ;
+ test:purpose "Test a logical table named column." ;
+ test:specificationReference "#dfn-logical-table" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d009> ;
+ rdb2rdftest:output "mappedd.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmld.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,7 @@
+<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/mappedb.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,7 @@
+<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.org/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.org/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.org/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.org/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.org/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.org/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.org/graph/practise> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/mappedd.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,8 @@
+<http://example.com/resource/student_Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> .
+<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/resource/student_Demi%20Moore> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> .
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" .
+<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,62 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Student" ];
+
+ rr:subjectMap
+ [
+ rr:template "http://example.com/resource/student_{ID}";
+ rr:termType rr:IRI;
+ rr:class <http://example.com/ontology/Student>;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rr:column "Name";
+ rr:termType rr:Literal;
+ ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant <http://example.com/ontology/practises> ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <TriplesMap2>;
+ rr:joinCondition [
+ rr:child "Sport" ;
+ rr:parent "ID" ;
+ ]
+ ];
+ ];
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Sport" ];
+
+ rr:subjectMap
+ [
+ rr:template "http://example.com/resource/sport_{ID}";
+ rr:termType rr:IRI;
+ rr:class <http://example.com/ontology/Sport>;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdfs:label ];
+ rr:objectMap [
+ rr:column "Name";
+ rr:termType rr:Literal;
+ ];
+ ];
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/r2rmlb.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,68 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Student" ];
+
+ rr:subjectMap
+ [
+ rr:template "http://example.com/resource/student_{ID}";
+ rr:termType rr:IRI;
+ rr:class <http://example.com/ontology/Student>;
+ rr:graphMap [ rr:constant <http://example.com/graph/students> ] ;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rr:column "Name";
+ rr:termType rr:Literal;
+ ];
+ rr:graphMap [ rr:constant <http://example.com/graph/students> ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant <http://example.com/ontology/practises> ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <TriplesMap2>;
+ rr:joinCondition [
+ rr:child "Sport" ;
+ rr:parent "ID" ;
+ ]
+ ];
+ rr:graphMap [ rr:constant <http://example.com/graph/practise> ];
+ ];
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+
+ rr:logicalTable [ rr:tableName "Sport" ];
+
+ rr:subjectMap
+ [
+ rr:template "http://example.com/resource/sport_{ID}";
+ rr:termType rr:IRI;
+ rr:class <http://example.com/ontology/Sport>;
+ rr:graphMap [ rr:constant <http://example.com/graph/sports> ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdfs:label ];
+ rr:objectMap [
+ rr:column "Name";
+ rr:termType rr:Literal;
+ ];
+
+ ];
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/r2rmlc.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,33 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ SELECT Name, COUNT(Sport)
+ FROM Student
+ GROUP BY Name
+ """ ];
+
+ rr:subjectMap
+ [
+ rr:template "http://example.com/resource/student_{Name}";
+ rr:termType rr:IRI;
+ rr:class <http://example.com/ontology/Student>;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rr:column "Name";
+ rr:termType rr:Literal;
+ ];
+ ];
+ .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/r2rmld.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,42 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ SELECT Name, COUNT(Sport) as SPORTCOUNT
+ FROM Student
+ GROUP BY Name
+ """ ];
+
+ rr:subjectMap
+ [
+ rr:template "http://example.com/resource/student_{Name}";
+ rr:termType rr:IRI;
+ rr:class <http://example.com/ontology/Student>;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rr:column "Name";
+ rr:termType rr:Literal;
+ ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:numSport ];
+ rr:objectMap [
+ rr:column "SPORTCOUNT";
+ rr:datatype xsd:integer;
+ ];
+ ];
+ .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,8 @@
+CREATE TABLE "Country Info" (
+ "Country Code" INTEGER PRIMARY KEY,
+ "Name" CHAR(100),
+ "ISO 3166" CHAR(10)
+);
+INSERT INTO "Country Info" ("Country Code", "Name", "ISO 3166") VALUES (1, 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO "Country Info" ("Country Code", "Name", "ISO 3166") VALUES (2, 'Ireland', 'IE');
+INSERT INTO "Country Info" ("Country Code", "Name", "ISO 3166") VALUES (3, 'Saint Martin (French part)', 'MF');
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,47 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d010> a rdb2rdftest:DataBase;
+ dcterms:title "One table, a primary key, three columns, three rows" ;
+ dcterms:identifier "D010-1table1primarykey3colums3rows" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <tc0010a>, <tc0010b>, <tc0010c> ;
+.
+
+<tc0010a> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with special chars" ;
+ dcterms:identifier "R2RMLTC0010a" ;
+ test:purpose "Tests a template with blank space in column value" ;
+ test:specificationReference "#dfn-template-valued-term-map" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d010> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0010b> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with Special Chars" ;
+ dcterms:identifier "R2RMLTC0010b" ;
+ test:purpose "Tests a template with special chars in column value" ;
+ test:specificationReference "#dfn-template-valued-term-map" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d010> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
+
+<tc0010c> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with Special Chars" ;
+ dcterms:identifier "R2RMLTC0010c" ;
+ test:purpose "Tests a template with special chars in column value and backslash escapes in string templates" ;
+ test:specificationReference "#dfn-template-valued-term-map" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d010> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedc.nq" ;
+ rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,3 @@
+<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/mappedb.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,3 @@
+<http://example.com/1Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3Saint%20Martin%20(French%20part)> <http://example.com/name> "Saint Martin (French part)" .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/mappedc.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,3 @@
+<http://example.com/1Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3Saint%20Martin%20(French%20part)> <http://example.com/code> "{{{ MF }}}" .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,19 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Country Info"; ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Country Code}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:name ];
+ rr:objectMap [ rr:column "Name" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/r2rmlb.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,19 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Country Info"; ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Country Code}{Name}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:name ];
+ rr:objectMap [ rr:column "Name" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D010-1table1primarykey3colums3rows/r2rmlc.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,19 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Country Info"; ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Country Code}{Name}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:code ];
+ rr:objectMap [ rr:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}" ]
+ ]
+ .
\ No newline at end of file
--- a/D011-M2MRelations/directGraph.nt Fri Feb 10 19:44:24 2012 +0100
+++ b/D011-M2MRelations/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -1,44 +1,48 @@
-<Student/ID.12#_> <rdf:type> <Student> .
-<Student/ID.12#_> <Student#FirstName> "David".
-<Student/ID.12#_> <Student#ID> 12 .
-<Student/ID.12#_> <Student#LastName> "Villa" .
+<Student/ID-12> <rdf:type> <Student> .
+<Student/ID-12> <Student#FirstName> "David".
+<Student/ID-12> <Student#ID> 12 .
+<Student/ID-12> <Student#LastName> "Villa" .
<Student_Sport/ID_Student.10,ID_Sport.110#_> <rdf:type> <Student_Sport> .
<Student_Sport/ID_Student.10,ID_Sport.110#_> <Student_Sport#ID_Sport> <Sport/ID.110#_> .
<Student_Sport/ID_Student.10,ID_Sport.110#_> <Student_Sport#ID_Student> <Student/ID.10#_> .
-<Student/ID.11#_> <rdf:type> <Student> .
-<Student/ID.11#_> <Student#FirstName> "Fernando" .
-<Student/ID.11#_> <Student#ID> 11 .
-<Student/ID.11#_> <Student#LastName> "Alonso" .
-
-<Sport/ID.111#_> <rdf:type> <Sport>.
-<Sport/ID.111#_> <Sport#Description> "Football" .
-<Sport/ID.111#_> <Sport#ID> 111 .
-
-<Sport/ID.110#_> <rdf:type> <Sport> .
-<Sport/ID.110#_> <Sport#Description> "Tennis" .
-<Sport/ID.110#_> <Sport#ID> 110 .
-
-<Student_Sport/ID_Student.12,ID_Sport.111#_> <rdf:type> <Student_Sport> .
-<Student_Sport/ID_Student.12,ID_Sport.111#_> <Student_Sport#ID_Sport> <Sport/ID.111#_> .
-<Student_Sport/ID_Student.12,ID_Sport.111#_> <Student_Sport#ID_Student> <Student/ID.12#_> .
+<Student/ID-11> <rdf:type> <Student> .
+<Student/ID-11> <Student#FirstName> "Fernando" .
+<Student/ID-11> <Student#ID> 11 .
+<Student/ID-11> <Student#LastName> "Alonso" .
-<Student_Sport/ID_Student.11,ID_Sport.111#_> <rdf:type> <Student_Sport> .
-<Student_Sport/ID_Student.11,ID_Sport.111#_> <Student_Sport#ID_Sport> <Sport/ID.111#_> .
-<Student_Sport/ID_Student.11,ID_Sport.111#_> <Student_Sport#ID_Student> <Student/ID.11#_> .
-
-<Student_Sport/ID_Student.11,ID_Sport.112#_> <rdf:type> <Student_Sport> .
-<Student_Sport/ID_Student.11,ID_Sport.112#_> <Student_Sport#ID_Sport> <Sport/ID.112#_> .
-<Student_Sport/ID_Student.11,ID_Sport.112#_> <Student_Sport#ID_Student> <Student/ID.11#_> .
+<Sport/ID-111> <rdf:type> <Sport> .
+<Sport/ID-111> <Sport#Description> "Football" .
+<Sport/ID-111> <Sport#ID> 111 .
-<Sport/ID.112#_> <rdf:type> <Sport> .
-<Sport/ID.112#_> <Sport#Description> "Formula1" .
-<Sport/ID.112#_> <Sport#ID> 112 .
+<Sport/ID-110> <rdf:type> <Sport> .
+<Sport/ID-110> <Sport#Description> "Tennis" .
+<Sport/ID-110> <Sport#ID> 110 .
-<Student/ID.10#_> <rdf:type> <Student> .
-<Student/ID.10#_> <Student#FirstName> "Venus" .
-<Student/ID.10#_> <Student#ID> 10 .
-<Student/ID.10#_> <Student#LastName> "Williams" .
+<Student_Sport/ID_Student-12.ID_Sport-111> <rdf:type> <Student_Sport> .
+<Student_Sport/ID_Student-12.ID_Sport-111> <Student_Sport#ID_Sport> <Sport/ID-111> .
+<Student_Sport/ID_Student-12.ID_Sport-111> <Student_Sport#ref-ID_Sport> <Sport/ID-111> .
+<Student_Sport/ID_Student-12.ID_Sport-111> <Student_Sport#ID_Student> <Student/ID-12> .
+<Student_Sport/ID_Student-12.ID_Sport-111> <Student_Sport#ref-ID_Student> <Student/ID-12> .
+<Student_Sport/ID_Student-11.ID_Sport-111> <rdf:type> <Student_Sport> .
+<Student_Sport/ID_Student-11.ID_Sport-111> <Student_Sport#ID_Sport> <Sport/ID-111> .
+<Student_Sport/ID_Student-11.ID_Sport-111> <Student_Sport#ref-ID_Sport> <Sport/ID-111> .
+<Student_Sport/ID_Student-11.ID_Sport-111> <Student_Sport#ID_Student> <Student/ID-11> .
+<Student_Sport/ID_Student-11.ID_Sport-111> <Student_Sport#ref-ID_Student> <Student/ID-11> .
+<Student_Sport/ID_Student-11.ID_Sport-112> <rdf:type> <Student_Sport> .
+<Student_Sport/ID_Student-11.ID_Sport-112> <Student_Sport#ID_Sport> <Sport/ID-112> .
+<Student_Sport/ID_Student-11.ID_Sport-112> <Student_Sport#ref-ID_Sport> <Sport/ID-112> .
+<Student_Sport/ID_Student-11.ID_Sport-112> <Student_Sport#ID_Student> <Student/ID-11> .
+<Student_Sport/ID_Student-11.ID_Sport-112> <Student_Sport#ref-ID_Student> <Student/ID-11> .
+
+<Sport/ID-112> <rdf:type> <Sport> .
+<Sport/ID-112> <Sport#Description> "Formula1" .
+<Sport/ID-112> <Sport#ID> 112 .
+
+<Student/ID-10> <rdf:type> <Student> .
+<Student/ID-10> <Student#FirstName> "Venus" .
+<Student/ID-10> <Student#ID> 10 .
+<Student/ID-10> <Student#LastName> "Williams" .
\ No newline at end of file
--- a/D011-M2MRelations/manifest.ttl Fri Feb 10 19:44:24 2012 +0100
+++ b/D011-M2MRelations/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -4,7 +4,7 @@
@base <http://mappingpedia.org/rdb2rdf/tc/> .
<d011> a rdb2rdftest:DataBase;
- dcterms:title "Many to Many relations" ;
+ dcterms:title "Database with many to many relations" ;
dcterms:identifier "D011-M2MRelations" ;
rdb2rdftest:sqlScriptFile "create.sql";
rdb2rdftest:relatedTestCase <dg0011>, <tc0011a>, <tc0011b>;
@@ -22,9 +22,9 @@
.
<tc0011a> a rdb2rdftest:R2RML ;
- dcterms:title "M to N relation, by using a SQL query" ;
+ dcterms:title "M to M relation, by using a SQL query" ;
dcterms:identifier "R2RMLTC0011a" ;
- test:purpose "Tests, M to N relations, by using a SQL query" ;
+ test:purpose "Tests, M to M relations, by using a SQL query" ;
test:specificationReference "#r2rml-views" ;
test:reviewStatus test:unreviewed ;
rdb2rdftest:database <d011> ;
@@ -34,9 +34,9 @@
.
<tc0011b> a rdb2rdftest:R2RML ;
- dcterms:title "M to N relation, by using an additional Triples Map" ;
+ dcterms:title "M to M relation, by using an additional Triples Map" ;
dcterms:identifier "R2RMLTC0011b" ;
- test:purpose "Tests, M to N relations, by using an additional Triples Map" ;
+ test:purpose "Tests, M to M relations, by using an additional Triples Map" ;
test:specificationReference "#termtype" ;
test:reviewStatus test:unreviewed ;
rdb2rdftest:database <d011> ;
--- a/D012-2tables2duplicates0nulls/manifest.ttl Fri Feb 10 19:44:24 2012 +0100
+++ b/D012-2tables2duplicates0nulls/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -5,7 +5,7 @@
@base <http://mappingpedia.org/rdb2rdf/tc/> .
<d012> a rdb2rdftest:DataBase;
- dcterms:title "Two tables two duplicates zero nulls" ;
+ dcterms:title "Two tables, two duplicate records, zero nulls" ;
dcterms:identifier "D012-2tables2duplicates0nulls" ;
rdb2rdftest:sqlScriptFile "create.sql";
rdb2rdftest:relatedTestCase <tc0012a>, <tc0012b>, <tc0012c>, <tc0012d> ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D013-1table1primarykey3columns2rows1nullvalue/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,8 @@
+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');
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D013-1table1primarykey3columns2rows1nullvalue/directGraph.nt Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,10 @@
+<Person#ID> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> .
+<Person#Name> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> .
+<Person#DateOfBirth> <http://www.w3.org/2000/01/rdf-schema#domain> <Person> .
+
+<Person/ID-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> .
+<Person/ID-1> <Person#Name> "Alice" .
+
+<Person/ID-2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <Person> .
+<Person/ID-2> <Person#Name> "Bob" .
+<Person/ID-2> <Person#DateOfBirth> "September, 2010" .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D013-1table1primarykey3columns2rows1nullvalue/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,34 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d013> a rdb2rdftest:DataBase;
+ dcterms:title "Table with null value" ;
+ dcterms:identifier "D013-1table1primarykey3columns2rows1nullvalue" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <dg0013>, <tc0013a> ;
+.
+
+<dg0013> a rdb2rdftest:DirectMapping ;
+ dcterms:title "Direct Graph of a table with NULL values";
+ dcterms:identifier "Direct Graph TC0013" ;
+ test:purpose "Tests Direct Graph of table with NULL values" ;
+ test:specificationReference "#rules_table_triples" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d013> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "directGraph.nt" ;
+.
+
+<tc0013a> a rdb2rdftest:R2RML ;
+ dcterms:title "Duplicate tuples generate same blank node" ;
+ dcterms:identifier "R2RMLTC0013a" ;
+ test:purpose "Tests the presence of null values in a template valued term map" ;
+ test:specificationReference "#dfn-template-valued-term-map" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d013> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D013-1table1primarykey3columns2rows1nullvalue/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,8 @@
+<http://example.com/Person1Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person1Alice> <http://example.com/id> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Person1Alice> <http://xmlns.com/foaf/0.1/name> "Alice" .
+<http://example.com/Person2BobSeptember%2C%202010> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person2BobSeptember%2C%202010> <http://example.com/id> "2"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Person2BobSeptember%2C%202010> <http://xmlns.com/foaf/0.1/name> "Bob" .
+<http://example.com/Person2BobSeptember%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D013-1table1primarykey3columns2rows1nullvalue/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,40 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Person" ];
+
+ rr:subjectMap [ rr:template "http://example.com/Person{ID}{Name}{DateOfBirth}"; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdf:type; ];
+ rr:objectMap [ rr:constant foaf:Person; ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:id; ];
+ rr:objectMap [ rr:column "ID"; rr:datatype xsd:integer ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant foaf:name; ];
+ rr:objectMap [ rr:column "Name" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:BirthDay; ];
+ rr:objectMap [ rr:column "DateOfBirth" ]
+ ]
+
+ .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,20 @@
+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');
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,72 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d014> a rdb2rdftest:DataBase;
+ dcterms:title "3 tables extended example" ;
+ dcterms:identifier "D014-3tables1primarykey1foreignkey" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <tc0014a>, <tc0014b>, <tc0014c>, <tc0014d>, <tc0014e> ;
+.
+
+<tc0014a> a rdb2rdftest:R2RML ;
+ dcterms:title "three tables, one primary key, one foreign key" ;
+ dcterms:identifier "R2RMLTC0014a" ;
+ test:purpose "Tests a logicaltable with sqlQuery" ;
+ test:specificationReference "#dfn-graph-map" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0014b> a rdb2rdftest:R2RML ;
+ dcterms:title "three tables, one primary key, one foreign key" ;
+ dcterms:identifier "R2RMLTC0014b" ;
+ test:purpose "Mapping specification using SQL-based logical table definition" ;
+ test:specificationReference "#inverse" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
+
+<tc0014c> a rdb2rdftest:R2RML ;
+ dcterms:title "three tables, one primary key, one foreign key" ;
+ dcterms:identifier "R2RMLTC0014c" ;
+ test:purpose "Mapping specification using table name based logical table definition" ;
+ test:specificationReference "#foreign-key" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:output "mappedc.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
+
+<tc0014d> a rdb2rdftest:R2RML ;
+ dcterms:title "three tables, one primary key, one foreign key" ;
+ dcterms:identifier "R2RMLTC0014d" ;
+ test:purpose "Mapping specification showing reuse of ObjectMap elements" ;
+ test:specificationReference "#foreign-key" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedd.nq" ;
+ rdb2rdftest:mappingDocument "r2rmld.ttl" ;
+.
+
+<tc0014e> a rdb2rdftest:R2RML ;
+ dcterms:title "three tables, one primary key, one foreign key" ;
+ dcterms:identifier "R2RMLTC0014e" ;
+ test:purpose "Mapping Specification for the LIKES Table" ;
+ test:specificationReference "#dfn-output-dataset" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappede.nq" ;
+ rdb2rdftest:mappingDocument "r2rmle.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,5 @@
+_:Department10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#deptno> "10"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#name> "APPSERVER" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#location> "NEW YORK" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#COMPANY> "EXAMPLE Corporation" <http://example.com/ns#DeptGraph> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/mappedb.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,17 @@
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#emp> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#jobtype> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#emptype> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#empno> "7369"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#job> "CLERK" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#deptNum> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#etype> "PART TIME" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#c_ref_deptno> _:Department10 <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/emp#empNameGraph> .
+_:Department10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#deptno> "10"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#name> "APPSERVER" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#location> "NEW YORK" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#COMPANY> "EXAMPLE Corporation" <http://example.com/ns#DeptGraph> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/mappedc.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,17 @@
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#emp> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#jobtype> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#emptype> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#empno> "7369"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#job> "CLERK" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#deptNum> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#etype> "PART TIME" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#c_ref_deptno> _:Department10 <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/emp#empNameGraph> .
+_:Department10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#deptno> "10"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#name> "APPSERVER" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#location> "NEW YORK" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#COMPANY> "EXAMPLE Corporation" <http://example.com/ns#DeptGraph> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/mappedd.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,17 @@
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#emp> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#jobtype> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#emptype> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#empno> "7369"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#job> "CLERK" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#deptNum> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#etype> "PART TIME" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#c_ref_deptno> _:Department10 <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/emp#empNameGraph> .
+_:Department10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#deptno> "10"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#name> "APPSERVER" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#location> "NEW YORK" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#COMPANY> "EXAMPLE Corporation" <http://example.com/ns#DeptGraph> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/mappede.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,2 @@
+<http://example.com/emp/7369> <http://example.com/emp/likes/Playing> "Soccer" <http://example.com/ns#LikesGraph> .
+<http://example.com/emp/7369> <http://example.com/emp/likes/Watching> "Basketball" <http://example.com/ns#LikesGraph> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,47 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix emp: <http://example.com/emp#> .
+@prefix dept: <http://example.com/dept#> .
+@prefix likes: <http://example.com/likes#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('Department' || "deptno") AS "deptId"
+ , "deptno"
+ , "dname"
+ , "loc"
+ from SA.DEPT
+ """ ];
+
+ rr:subjectMap [ rr:column "deptId"; rr:termType rr:BlankNode;
+ rr:class ex:dept;
+ rr:graphMap [ rr:graph ex:DeptGraph; ];
+ rr:inverseExpression "{deptno} = substr({deptId},length('Department')+1)"];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:deptno ];
+ rr:objectMap [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:name ];
+ rr:objectMap [ rr:column "dname" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:location ];
+ rr:objectMap [ rr:column "loc" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:COMPANY ];
+ rr:objectMap [ rr:object "EXAMPLE Corporation" ]
+ ]
+.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/r2rmlb.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,135 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix emp: <http://example.com/emp#> .
+@prefix dept: <http://example.com/dept#> .
+@prefix likes: <http://example.com/likes#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('Department' || deptno) AS deptId
+ , deptno
+ , dname
+ , loc
+ from SA.DEPT
+ """ ];
+
+ rr:subjectMap [ rr:column "deptId"; rr:termType rr:BlankNode;
+ rr:class ex:dept;
+ rr:graphMap [ rr:constant ex:DeptGraph; ];
+ rr:inverseExpression "{deptno} = substr({deptId},length('Department')+1)"];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:deptno ];
+ rr:objectMap [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:name ];
+ rr:objectMap [ rr:column "dname" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:location ];
+ rr:objectMap [ rr:column "loc" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:COMPANY ];
+ rr:objectMap [ rr:constant "EXAMPLE Corporation" ]
+ ]
+.
+
+<TriplesMap2>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('http://example.com/emp/' || empno) AS empURI
+ , empno
+ , ename
+ , ('http://example.com/emp/job/'|| job) AS jobTypeURI
+ , job
+ , deptno
+ , ('http://example.com/emp/etype/'|| etype) AS empTypeURI
+ , etype
+ , ('http://example.com/graph/'|| job || '/' || etype) AS graphURI
+ from SA.EMP
+ """ ];
+
+ rr:subjectMap [ rr:column "empURI";
+ rr:class ex:emp;
+ rr:graphMap [ rr:column "graphURI" ]; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:jobtype ];
+ rr:objectMap [ rr:column "jobTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdf:type ];
+ rr:objectMap [ rr:column "jobTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:emptype ];
+ rr:objectMap [ rr:column "empTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdf:type ];
+ rr:objectMap [ rr:column "empTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:empno ];
+ rr:objectMap [ rr:column "empno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:name ];
+ rr:objectMap [ rr:column "ename" ];
+ rr:graphMap [ rr:constant emp:empNameGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:job ];
+ rr:objectMap [ rr:column "job" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:deptNum ];
+ rr:objectMap [ rr:column "deptno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:etype ];
+ rr:objectMap [ rr:column "etype" ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant emp:c_ref_deptno ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <TriplesMap1>;
+ rr:joinCondition [
+ rr:child "deptno";
+ rr:parent "deptno";
+ ];
+ ];
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/r2rmlc.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,127 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix emp: <http://example.com/emp#> .
+@prefix dept: <http://example.com/dept#> .
+@prefix likes: <http://example.com/likes#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('Department' || deptno) AS deptId
+ , deptno
+ , dname
+ , loc
+ from DEPT
+ """ ];
+
+ rr:subjectMap [ rr:column "deptId"; rr:termType rr:BlankNode;
+ rr:class ex:dept;
+ rr:graphMap [ rr:constant ex:DeptGraph; ];
+ rr:inverseExpression "{deptno} = substr({deptId},length('Department')+1)"];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:deptno ];
+ rr:objectMap [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:name ];
+ rr:objectMap [ rr:column "dname" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:location ];
+ rr:objectMap [ rr:column "loc" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:COMPANY ];
+ rr:objectMap [ rr:constant "EXAMPLE Corporation" ]
+ ]
+.
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "SA.EMP" ];
+
+ rr:subjectMap [ rr:template "http://example.com/emp/{empno}";
+ rr:class ex:emp;
+ rr:graphMap [ rr:template "http://example.com/graph/{job}/{etype}"; ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:jobtype ];
+ rr:objectMap [ rr:template "http://example.com/emp/job/{job}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdf:type ];
+ rr:objectMap [ rr:template "http://example.com/emp/job/{job}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:emptype ];
+ rr:objectMap [ rr:template "http://example.com/emp/etype/{etype}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdf:type ];
+ rr:objectMap [ rr:template "http://example.com/emp/etype/{etype}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:empno ];
+ rr:objectMap [ rr:column "empno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:name ];
+ rr:objectMap [ rr:column "ename" ];
+ rr:graphMap [ rr:constant emp:empNameGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:job ];
+ rr:objectMap [ rr:column "job" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:deptNum ];
+ rr:objectMap [ rr:column "deptno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:etype ];
+ rr:objectMap [ rr:column "etype" ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant emp:c_ref_deptno ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <TriplesMap1>;
+ rr:joinCondition [
+ rr:child "deptno";
+ rr:parent "deptno";
+ ];
+ ];
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/r2rmld.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,136 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix emp: <http://example.com/emp#> .
+@prefix dept: <http://example.com/dept#> .
+@prefix likes: <http://example.com/likes#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('Department' || deptno) AS deptId
+ , deptno
+ , dname
+ , loc
+ from DEPT
+ """ ];
+
+ rr:subjectMap [ rr:column "deptId"; rr:termType rr:BlankNode;
+ rr:class ex:dept;
+ rr:graphMap [ rr:constant ex:DeptGraph; ];
+ rr:inverseExpression "{deptno} = substr({deptId},length('Department')+1)"];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:deptno ];
+ rr:objectMap [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:name ];
+ rr:objectMap [ rr:column "dname" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:location ];
+ rr:objectMap [ rr:column "loc" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant dept:COMPANY ];
+ rr:objectMap [ rr:constant "EXAMPLE Corporation" ]
+ ]
+.
+
+
+<jobtypeObjectMap>
+ a rr:ObjectMap;
+ rr:template "http://example.com/emp/job/{job}"
+ .
+
+<emptypeObjectMap>
+ a rr:ObjectMap;
+ rr:template "http://example.com/emp/etype/{etype}"
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "SA.EMP" ];
+
+ rr:subjectMap [ rr:template "http://example.com/emp/{empno}";
+ rr:class ex:emp;
+ rr:graphMap [ rr:template "http://example.com/graph/{job}/{etype}"; ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:jobtype ];
+ rr:objectMap <jobtypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdf:type ];
+ rr:objectMap <jobtypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:emptype ];
+ rr:objectMap <emptypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant rdf:type ];
+ rr:objectMap <emptypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:empno ];
+ rr:objectMap [ rr:column "empno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:name ];
+ rr:objectMap [ rr:column "ename" ];
+ rr:graphMap [ rr:constant emp:empNameGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:job ];
+ rr:objectMap [ rr:column "job" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:deptNum ];
+ rr:objectMap [ rr:column "deptno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant emp:etype ];
+ rr:objectMap [ rr:column "etype" ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant emp:c_ref_deptno ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <TriplesMap1>;
+ rr:joinCondition [
+ rr:child "deptno";
+ rr:parent "deptno";
+ ];
+ ];
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/r2rmle.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,29 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix emp: <http://example.com/emp#> .
+@prefix dept: <http://example.com/dept#> .
+@prefix likes: <http://example.com/likes#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap3>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('http://example.com/emp/' || id) AS empId
+ , ('http://example.com/emp/likes/' || likeType) AS empLikes
+ , likedObj
+ from LIKES
+ """ ];
+
+ rr:subjectMap [
+ rr:column "empId";
+ rr:graphMap [ rr:constant ex:LikesGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:column "empLikes" ];
+ rr:objectMap [ rr:column "likedObj" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D015-1table3columns1composityeprimarykey3rows2languages/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,11 @@
+CREATE TABLE "Country" (
+ "Code" CHAR(2),
+ "Name" CHAR(100),
+ "Lan" CHAR(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');
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D015-1table3columns1composityeprimarykey3rows2languages/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,34 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d015> a rdb2rdftest:DataBase;
+ dcterms:title "Table with language information" ;
+ dcterms:identifier "D015-1table3columns1composityeprimarykey3rows2languages" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <tc0015a>, <tc0015b> ;
+.
+
+<tc0015a> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with language information" ;
+ dcterms:identifier "R2RMLTC0015a" ;
+ test:purpose "Tests the language tag" ;
+ test:specificationReference "#language-tags" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d015> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0015b> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with language information" ;
+ dcterms:identifier "R2RMLTC0015b" ;
+ test:purpose "Tests a term map with rr:language where the value isn't a valid language, which is an error" ;
+ test:specificationReference "#language-tags" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d015> ;
+ rdb2rdftest:hasExpectedOutput false ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D015-1table3columns1composityeprimarykey3rows2languages/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,5 @@
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D015-1table3columns1composityeprimarykey3rows2languages/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,43 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ SELECT "Code", "Name", "Lan"
+ FROM "Country"
+ WHERE "Lan" = 'EN';
+ """ ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Code}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdfs:label;
+ rr:objectMap [ rr:column "Name"; rr:language "en" ]
+ ]
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ SELECT "Code", "Name", "Lan"
+ FROM "Country"
+ WHERE "Lan" = 'ES';
+ """ ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Code}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdfs:label;
+ rr:objectMap [ rr:column "Name"; rr:language "es" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D015-1table3columns1composityeprimarykey3rows2languages/r2rmlb.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,43 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ SELECT "Code", "Name", "Lan"
+ FROM "Country"
+ WHERE "Lan" = 'EN';
+ """ ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Code}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdfs:label;
+ rr:objectMap [ rr:column "Name"; rr:language "english" ]
+ ]
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ SELECT "Code", "Name", "Lan"
+ FROM "Country"
+ WHERE "Lan" = 'ES';
+ """ ] ;
+
+ rr:subjectMap [ rr:template "http://example.com/{Code}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdfs:label;
+ rr:objectMap [ rr:column "Name"; rr:language "spanish" ]
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/create.sql Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,20 @@
+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" BINARY(20),
+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',CAST('monica' as BINARY(20)) );
+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',CAST('rachel' as BINARY(20)));
+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',CAST('chandler' as BINARY(20)));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/manifest.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,72 @@
+@prefix test: <http://www.w3.org/2006/03/test-description#> .
+@prefix dcterms: <http://purl.org/dc/elements/1.1/> .
+@prefix rdb2rdftest: <http://purl.org/NET/rdb2rdf-test#> .
+@base <http://mappingpedia.org/rdb2rdf/tc/> .
+
+<d016> a rdb2rdftest:DataBase;
+ dcterms:title "Table with datatypes" ;
+ dcterms:identifier "D016-1table1primarykey10columns3rowsSQLdatatypes" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <tc0016a>, <tc0016b>, <tc0016c>, <tc0016d>, <tc0016e> ;
+.
+
+<tc0016a> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with datatypes" ;
+ dcterms:identifier "R2RMLTC0016a" ;
+ test:purpose "Tests the rr:termtype and datatype conversions: string and integer" ;
+ test:specificationReference "#datatype-conversions" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d016> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0016b> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with datatypes" ;
+ dcterms:identifier "R2RMLTC0016b" ;
+ test:purpose "Tests the rr:termtype and datatype conversions: real and float" ;
+ test:specificationReference "#datatype-conversions" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d016> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
+
+<tc0016c> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with datatypes" ;
+ dcterms:identifier "R2RMLTC0016c" ;
+ test:purpose "Tests the rr:termtype and datatype conversions: date and timestamp" ;
+ test:specificationReference "#datatype-conversions" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d016> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedc.nq" ;
+ rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
+
+<tc0016d> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with datatypes" ;
+ dcterms:identifier "R2RMLTC0016d" ;
+ test:purpose "Tests the rr:termtype and datatype conversions: boolean" ;
+ test:specificationReference "#datatype-conversions" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d016> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedd.nq" ;
+ rdb2rdftest:mappingDocument "r2rmld.ttl" ;
+.
+
+<tc0016e> a rdb2rdftest:R2RML ;
+ dcterms:title "Table with datatypes" ;
+ dcterms:identifier "R2RMLTC0016e" ;
+ test:purpose "Tests the rr:termtype and datatype conversions: binary" ;
+ test:specificationReference "#datatype-conversions" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d016> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappede.nq" ;
+ rdb2rdftest:mappingDocument "r2rmle.ttl" ;
+.
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/mappeda.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,16 @@
+<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient10> <http://xmlns.com/foaf/0.1/firstName> "Monica"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient10> <http://xmlns.com/foaf/0.1/lastName> "Geller"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient10> <http://xmlns.com/foaf/0.1/gender> "female"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient11> <http://xmlns.com/foaf/0.1/firstName> "Rachel"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient11> <http://xmlns.com/foaf/0.1/lastName> "Green"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient11> <http://xmlns.com/foaf/0.1/gender> "female"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient12> <http://xmlns.com/foaf/0.1/firstName> "Chandler"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient12> <http://xmlns.com/foaf/0.1/lastName> "Bing"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Patient12> <http://xmlns.com/foaf/0.1/gender> "male"^^<http://www.w3.org/2001/XMLSchema#string> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/mappedb.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,10 @@
+<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/weight> "80.25"^^<http://www.w3.org/2001/XMLSchema#real> .
+<http://example.com/Patient10> <http://example.com/height> "1.65"^^<http://www.w3.org/2001/XMLSchema#float> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/weight> "70.22"^^<http://www.w3.org/2001/XMLSchema#real> .
+<http://example.com/Patient11> <http://example.com/height> "1.70"^^<http://www.w3.org/2001/XMLSchema#float> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/weight> "90.31"^^<http://www.w3.org/2001/XMLSchema#real> .
+<http://example.com/Patient12> <http://example.com/height> "1.76"^^<http://www.w3.org/2001/XMLSchema#float> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/mappedc.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,10 @@
+<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10 12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12 09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12 02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/mappedd.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,7 @@
+<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/mappede.nq Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,7 @@
+<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/id> "eILK"^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/id> "utH1"^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/id> "0bfl+w=="^^<http://www.w3.org/2001/XMLSchema#base64Binary> .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/r2rmla.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,46 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Patient" ];
+
+ rr:subjectMap [ rr:template "http://example.com/Patient{ID}"; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdf:type;
+ rr:object foaf:Person;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:constant ex:id; ];
+ rr:objectMap [ rr:column "ID"; rr:datatype xsd:integer ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate foaf:firstName;
+ rr:objectMap [ rr:column "FirstName"; rr:datatype xsd:string ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate foaf:lastName;
+ rr:objectMap [ rr:column "LastName"; rr:datatype xsd:string ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate foaf:gender;
+ rr:objectMap [ rr:column "Sex"; rr:datatype xsd:string ]
+ ];
+
+ .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/r2rmlb.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,34 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Patient" ];
+
+ rr:subjectMap [ rr:template "http://example.com/Patient{ID}"; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdf:type;
+ rr:object foaf:Person;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate ex:weight;
+ rr:objectMap [ rr:column "Weight"; rr:datatype xsd:real ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate ex:height;
+ rr:objectMap [ rr:column "Height"; rr:datatype xsd:float ]
+ ];
+
+ .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/r2rmlc.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,34 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Patient" ];
+
+ rr:subjectMap [ rr:template "http://example.com/Patient{ID}"; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdf:type;
+ rr:object foaf:Person;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate ex:birthdate;
+ rr:objectMap [ rr:column "BirthDate"; rr:datatype xsd:date ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate ex:entrancedate;
+ rr:objectMap [ rr:column "EntranceDate"; rr:datatype xsd:dateTime ]
+ ];
+
+ .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/r2rmld.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,28 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Patient" ];
+
+ rr:subjectMap [ rr:template "http://example.com/Patient{ID}"; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdf:type;
+ rr:object foaf:Person;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate ex:paid;
+ rr:objectMap [ rr:column "PaidInAdvance"; rr:datatype xsd:boolean ]
+ ];
+
+ .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D016-1table1primarykey10columns3rowsSQLdatatypes/r2rmle.ttl Mon Feb 13 02:24:05 2012 +0100
@@ -0,0 +1,28 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Patient" ];
+
+ rr:subjectMap [ rr:template "http://example.com/Patient{ID}"; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate rdf:type;
+ rr:object foaf:Person;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate ex:photo;
+ rr:objectMap [ rr:column "Photo"; rr:datatype xsd:base64Binary ]
+ ];
+
+ .