New R2RML TC included and reviewed
authorBoris Villazon-Terrazas <bvillazon@fi.upm.es>
Tue, 25 Oct 2011 19:59:48 +0200
changeset 31 6664f10b3c5e
parent 30 5c92d0690d24
child 32 a0d067996b1a
New R2RML TC included and reviewed
D000-1table0rows/r2rml.ttl
D001-1table1row/r2rmla.ttl
D001-1table1row/r2rmlb.ttl
D002-1table2columns1row/r2rmla.ttl
D002-1table2columns1row/r2rmlb.ttl
D002-1table2columns1row/r2rmlc.ttl
D002-1table2columns1row/r2rmld.ttl
D002-1table2columns1row/r2rmle.ttl
D002-1table2columns1row/r2rmlf.ttl
D002-1table2columns1row/r2rmlg.ttl
D002-1table2columns1row/r2rmlh.ttl
D002-1table2columns1row/r2rmli.ttl
D003-1table3columns1row/r2rmla.ttl
D003-1table3columns1row/r2rmlb.ttl
D003-1table3columns1row/r2rmlc.ttl
D003-1table3columns1row/r2rmld.ttl
D004-1table2columnsprojection/r2rmla.ttl
D004-1table2columnsprojection/r2rmlb.ttl
D005-2duplicates0nulls/manifest.ttl
D005-2duplicates0nulls/mappeda.nq
D005-2duplicates0nulls/r2rmla.ttl
D006-1table1primarykey1column1row/manifest.ttl
D006-1table1primarykey1column1row/mappeda.nq
D006-1table1primarykey1column1row/r2rmla.ttl
D006-1table1primarykey1column1row/r2rmla.txt
D008-1table1compositeprimarykey3columns1row/manifest.ttl
D008-1table1compositeprimarykey3columns1row/mappeda.nq
D008-1table1compositeprimarykey3columns1row/r2rmla.ttl
D009-2tables1primarykey1foreingkey/manifest.ttl
D009-2tables1primarykey1foreingkey/mappeda.nq
D009-2tables1primarykey1foreingkey/mappedb.nq
D009-2tables1primarykey1foreingkey/r2rmla.ttl
D009-2tables1primarykey1foreingkey/r2rmlb.ttl
D010-SpecialChars/r2rmla.ttl
D010-SpecialChars/r2rmlb.ttl
D010-SpecialChars/r2rmlc.ttl
D011-M2MRelations/r2rmla.ttl
D011-M2MRelations/r2rmlb.ttl
D012-2tables2duplicates0nulls/r2rmla.ttl
D012-2tables2duplicates0nulls/r2rmlb.ttl
D012-2tables2duplicates0nulls/r2rmlc.ttl
D012-2tables2duplicates0nulls/r2rmld.ttl
D013-1table3columns2rows1nullvalue/manifest.ttl
D013-1table3columns2rows1nullvalue/mappeda.nq
D013-1table3columns2rows1nullvalue/r2rmla.ttl
D014-3tablesExample/r2rmla.ttl
D014-3tablesExample/r2rmlb.ttl
D014-3tablesExample/r2rmlc.ttl
D014-3tablesExample/r2rmld.ttl
D016-1tableSQLdatatypes/create.sql
D016-1tableSQLdatatypes/manifest.ttl
D016-1tableSQLdatatypes/mappeda.nq
D016-1tableSQLdatatypes/mappedb.nq
D016-1tableSQLdatatypes/mappedc.nq
D016-1tableSQLdatatypes/mappedd.nq
D016-1tableSQLdatatypes/mappede.nq
D016-1tableSQLdatatypes/r2rmla.ttl
D016-1tableSQLdatatypes/r2rmlb.ttl
D016-1tableSQLdatatypes/r2rmlc.ttl
D016-1tableSQLdatatypes/r2rmld.ttl
D016-1tableSQLdatatypes/r2rmle.ttl
--- a/D000-1table0rows/r2rml.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D000-1table0rows/r2rml.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,13 +7,13 @@
 <TriplesMap1>
     a rr:TriplesMap;
         
-	rr:logicalTable [ rr:tableName "Student"; ] ;
+    rr:logicalTable [ rr:tableName "Student"; ] ;
 	
     rr:subjectMap [ rr:template "http://example.com/{Name}" ]; 
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
\ No newline at end of file
--- a/D001-1table1row/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D001-1table1row/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,13 +7,13 @@
 <TriplesMap1>
     a rr:TriplesMap;
     
-    rr:logicalTable [ rr:tableName "boricles.Student" ];
+    rr:logicalTable [ rr:tableName "Student" ];
 
     rr:subjectMap [ rr:template "http://example.com/{Name}" ]; 
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D001-1table1row/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D001-1table1row/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,13 +7,13 @@
 <TriplesMap1>
     a rr:TriplesMap;
     
-    rr:logicalTable [ rr:tableName "boricles.Student" ];
+    rr:logicalTable [ rr:tableName "Student" ];
 
     rr:subjectMap [ rr:column "Name"; rr:termType rr:BlankNode ]; 
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D002-1table2columns1row/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -14,13 +14,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
-	]
+    ]
     .
--- a/D002-1table2columns1row/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -9,10 +9,10 @@
     
     rr:logicalTable [ 
                      rr:sqlQuery """
-                       Select ('Student' || ID ) AS StudentId
-                            , ID
-                            , Name
-                         from boricles.Student
+                       Select ('Student' || "ID" ) AS StudentId
+                            , "ID"
+                            , "Name"
+                         from Student
                        """
                        ];
 
@@ -20,13 +20,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D002-1table2columns1row/r2rmlc.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmlc.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -14,13 +14,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "IDs"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
 	]
     .
--- a/D002-1table2columns1row/r2rmld.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmld.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -9,10 +9,10 @@
     
     rr:logicalTable [ 
                      rr:sqlQuery """
-                       Select ('Student' || ID ) AS StudentId
+                       Select ('Student' || "ID" ) AS StudentId
                             , "ID"
                             , "Name"
-                         from "boricles.Student"
+                         from "SA.Student"
                        """
                        ];
 
@@ -20,13 +20,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D002-1table2columns1row/r2rmle.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmle.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -14,13 +14,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
 	]
     .
--- a/D002-1table2columns1row/r2rmlf.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmlf.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,20 +7,20 @@
 <TriplesMap1>
     a rr:TriplesMap;
     
-    rr:logicalTable [ rr:tableName "boricles.Student" ];
+    rr:logicalTable [ rr:tableName "SA.Student" ];
 
     rr:subjectMap [ rr:template "http://example.com/{ID}{Name}";
                     rr:class foaf:Person ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
 	]
     .
--- a/D002-1table2columns1row/r2rmlg.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmlg.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -9,10 +9,10 @@
     
     rr:logicalTable [ 
                      rr:sqlQuery """
-                       Select ('Student' || ID ) AS StudentId
+                       Select ('Student' || "ID" ) AS StudentId
                             , "ID"
                             , "Name"
-                         "boricles.Student"
+                         "SA.Student"
                        """
                        ];
 
@@ -20,13 +20,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D002-1table2columns1row/r2rmlh.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmlh.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -12,7 +12,7 @@
                        Select ('Student' || ID ) AS StudentId
                             , "ID"
                             , "Name"
-			, "ID"
+					, "ID"
                        from "boricles.Student"
                        """
                        ];
@@ -21,13 +21,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D002-1table2columns1row/r2rmli.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D002-1table2columns1row/r2rmli.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -25,13 +25,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D003-1table3columns1row/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D003-1table3columns1row/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,26 +7,26 @@
 <TriplesMap1>
      a rr:TriplesMap;
 
-     rr:logicalTable [ rr:tableName "boricles.Student" ];
+     rr:logicalTable [ rr:tableName "SA.Student" ];
 
     rr:subjectMap [ rr:template "http://example.com/Student{ID}{FirstName}{LastName}";
                     rr:class foaf:Person  ];
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:firstName ]; 
+      rr:predicateMap [ rr:constant foaf:firstName ]; 
       rr:objectMap    [ rr:column "FirstName" ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:lastName ]; 
+      rr:predicateMap [ rr:constant foaf:lastName ]; 
       rr:objectMap    [ rr:column "LastName" ]
     ]
     .
--- a/D003-1table3columns1row/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D003-1table3columns1row/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -9,11 +9,11 @@
 
      rr:logicalTable [ 
                      rr:sqlQuery """
-                     SELECT ID,
-                            (FirstName || ' ' || LastName) AS Name,
-                            FirstName,
-                            LastName
-                     FROM Student
+                     SELECT "ID",
+                            ("FirstName" || ' ' || "LastName") AS Name,
+                            "FirstName",
+                            "LastName"
+                     FROM "Student"
                      """
                      ];
 
@@ -22,13 +22,13 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
--- a/D003-1table3columns1row/r2rmlc.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D003-1table3columns1row/r2rmlc.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -21,20 +21,20 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:firstName ]; 
+      rr:predicateMap [ rr:constant foaf:firstName ]; 
       rr:objectMap    [ rr:column "FirstName";
 						rr:termType rr:Literal ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:lastName ]; 
+      rr:predicateMap [ rr:constant foaf:lastName ]; 
       rr:objectMap    [ rr:column "LastName";
 						rr:termType rr:Literal ]
     ]
--- a/D003-1table3columns1row/r2rmld.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D003-1table3columns1row/r2rmld.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -21,20 +21,20 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:firstName ]; 
+      rr:predicateMap [ rr:constant ex:firstName ]; 
       rr:objectMap    [ rr:template "http://example.com/data/{FirstName}";
 						rr:termType rr:IRI ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:lastName ]; 
+      rr:predicateMap [ rr:constant ex:lastName ]; 
       rr:objectMap    [ rr:template "http://example.com/data/{LastName}";
 						rr:termType rr:IRI ]
     ]
--- a/D004-1table2columnsprojection/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D004-1table2columnsprojection/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -14,7 +14,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Student" ]
     ]
     .
@@ -29,7 +29,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Sport" ]
     ]
 	.
\ No newline at end of file
--- a/D004-1table2columnsprojection/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D004-1table2columnsprojection/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -18,7 +18,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Student" ]
     ]
     .
@@ -36,7 +36,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ rr:column "Sport" ]
     ]
 	.
\ No newline at end of file
--- a/D005-2duplicates0nulls/manifest.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D005-2duplicates0nulls/manifest.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,7 +7,7 @@
 	dcterms:title "Duplicate tuples, no primary key" ;
 	dcterms:identifier "D005-2duplicates0nulls" ;
 	rdb2rdftest:sqlScriptFile "create.sql";
-	rdb2rdftest:relatedTestCase <dg0005> ;
+	rdb2rdftest:relatedTestCase <dg0005>, <tc0005a> ;
 .
 
 <dg0005> a rdb2rdftest:DirectMapping ;	
@@ -20,3 +20,16 @@
 	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-2duplicates0nulls/mappeda.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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-2duplicates0nulls/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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/manifest.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D006-1table1primarykey1column1row/manifest.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,7 +7,7 @@
 	dcterms:title "One table, one column, one primary key" ;
 	dcterms:identifier "D006-1table1primarykey1column1row" ;
 	rdb2rdftest:sqlScriptFile "create.sql";
-	rdb2rdftest:relatedTestCase <dg0006> ;
+	rdb2rdftest:relatedTestCase <dg0006>, <tc0006a> ;
 .
 
 <dg0006> a rdb2rdftest:DirectMapping ;	
@@ -20,3 +20,15 @@
 	rdb2rdftest:hasExpectedOutput true ;
 	rdb2rdftest:output "directGraph.nt" ;
 .
+
+<tc0006a> a rdb2rdftest:R2RML ;	
+	dcterms:title "One column mapping, one primary key" ; 
+	dcterms:identifier "R2RMLTC0006a" ;
+	test:purpose "Tests one column mapping with one primary key and rr:template" ;
+	test:specificationReference "#dfn-template-valued-term-map" ;
+	test:reviewStatus test:unreviewed ;
+	rdb2rdftest:database <d006> ;
+	rdb2rdftest:output "mappeda.nq" ;
+	rdb2rdftest:hasExpectedOutput true ;
+	rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D006-1table1primarykey1column1row/mappeda.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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/D006-1table1primarykey1column1row/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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/D006-1table1primarykey1column1row/r2rmla.txt	Tue Oct 25 19:59:48 2011 +0200
@@ -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" ]
+    ]
+    .
--- a/D008-1table1compositeprimarykey3columns1row/manifest.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D008-1table1compositeprimarykey3columns1row/manifest.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,7 +7,7 @@
 	dcterms:title "Composite primary key" ;
 	dcterms:identifier "D008-1table1compositeprimarykey3columns1row" ;
 	rdb2rdftest:sqlScriptFile "create.sql";
-	rdb2rdftest:relatedTestCase <dg0008> ;
+	rdb2rdftest:relatedTestCase <dg0008>, <tc008a> ;
 .
 
 <dg0008> a rdb2rdftest:DirectMapping ;	
@@ -20,3 +20,17 @@
 	rdb2rdftest:hasExpectedOutput true ;
 	rdb2rdftest:output "directGraph.nt" ;
 .
+
+
+<tc008a> a rdb2rdftest:R2RML ;	
+	dcterms:title "Table with datatypes" ; 
+	dcterms:identifier "R2RMLTC008a" ;
+	test:purpose "Test that results of the mapping can be directed to a target graph." ;
+	test:specificationReference "#named-graphs" ;
+	test:reviewStatus test:unreviewed ;
+	rdb2rdftest:database <d008> ;
+	rdb2rdftest:hasExpectedOutput true ;
+	rdb2rdftest:output "mappeda.nq" ;
+	rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D008-1table1compositeprimarykey3columns1row/mappeda.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -0,0 +1,5 @@
+<http://example.com/Student10Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+<http://example.com/Student10Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student10Venus%20Williams> .
+<http://example.com/Student10Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student10Venus%20Williams> . 
+<http://example.com/Student10Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student10Venus%20Williams> . 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D008-1table1compositeprimarykey3columns1row/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -0,0 +1,42 @@
+@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 "Student" ];
+
+    rr:subjectMap [ rr:template "http://example.com/Student{ID}{Name}"; 
+					rr:graphMap [ rr:template "http://example.com/graph/Student{ID}{Name}"; ]
+	];
+	
+    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:Sport; ];
+      rr:objectMap    [ rr:column "Sport" ]
+    ]
+	
+    .
--- a/D009-2tables1primarykey1foreingkey/manifest.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D009-2tables1primarykey1foreingkey/manifest.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,7 +7,7 @@
 	dcterms:title "Two tables 1 primary key 1 foreing key" ;
 	dcterms:identifier "D009-2tables1primarykey1foreingkey" ;
 	rdb2rdftest:sqlScriptFile "create.sql";
-	rdb2rdftest:relatedTestCase <dg0009>, <tc0009>;
+	rdb2rdftest:relatedTestCase <dg0009>, <tc0009a>, <tc0009b> ;
 .
 
 <dg0009> a rdb2rdftest:DirectMapping ;	
@@ -21,14 +21,26 @@
 	rdb2rdftest:output "directGraph.nt" ;
 .
 
-<tc0009> a rdb2rdftest:R2RML ;	
+<tc0009a> a rdb2rdftest:R2RML ;	
+	dcterms:title "Two tables to 1 primary key 1 foreing key" ; 
+	dcterms:identifier "R2RMLTC009a" ;
+	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 "R2RMLTC009" ;
+	dcterms:identifier "R2RMLTC009b" ;
 	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 "mapped.nq" ;
+	rdb2rdftest:output "mappedb.nq" ;
 	rdb2rdftest:hasExpectedOutput true ;
-	rdb2rdftest:mappingDocument "r2rml.ttl" ;
+	rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
 .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreingkey/mappeda.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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-2tables1primarykey1foreingkey/mappedb.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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-2tables1primarykey1foreingkey/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -0,0 +1,63 @@
+@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:refPredicateObjectMap
+    [ 
+      rr:refPredicateMap [ rr:constant <http://example.com/ontology/practises> ]; 
+      rr:refObjectMap    [ 
+           rr:parentTriplesMap <TriplesMap2>;
+           rr:joinCondition [
+				rr:child "Sport" ;
+				rr:parent "ID" ;
+		   ]
+      ];
+    ];
+    .
+
+<TriplesMap2>
+    a rr:TriplesMapClass;
+        
+		
+	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-2tables1primarykey1foreingkey/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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:graph <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:graph <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:graph <http://example.com/graph/practise> ];
+    ];
+    .
+
+<TriplesMap2>
+    a rr:TriplesMapClass;
+        
+		
+	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:graph <http://example.com/graph/sports> ];
+    ]; 
+	
+    rr:predicateObjectMap
+    [ 
+      rr:predicateMap [ rr:constant rdfs:label ]; 
+      rr:objectMap    [ 
+             rr:column "Name"; 
+             rr:termType rr:Literal;
+      ];
+      rr:graphMap [ rr:graph <http://example.com/graph/sports> ];
+    ];
+	.
\ No newline at end of file
--- a/D010-SpecialChars/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D010-SpecialChars/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -13,7 +13,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:name ]; 
+      rr:predicateMap [ rr:constant ex:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
\ No newline at end of file
--- a/D010-SpecialChars/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D010-SpecialChars/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -13,7 +13,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:name ]; 
+      rr:predicateMap [ rr:constant ex:name ]; 
       rr:objectMap    [ rr:column "Name" ]
     ]
     .
\ No newline at end of file
--- a/D010-SpecialChars/r2rmlc.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D010-SpecialChars/r2rmlc.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -13,7 +13,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:code ]; 
+      rr:predicateMap [ rr:constant ex:code ]; 
       rr:objectMap    [ rr:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}" ]
     ]
     .
\ No newline at end of file
--- a/D011-M2MRelations/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D011-M2MRelations/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -22,25 +22,25 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:firstName ]; 
+      rr:predicateMap [ rr:constant foaf:firstName ]; 
       rr:objectMap    [ rr:column "FirstName" ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:lastName ]; 
+      rr:predicateMap [ rr:constant foaf:lastName ]; 
       rr:objectMap    [ rr:column "LastName" ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:plays ]; 
+      rr:predicateMap [ rr:constant ex:plays ]; 
       rr:objectMap    [ rr:template "http://example.com/{Sport_ID}{Description}" ]
     ]
     .
@@ -57,13 +57,13 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:description ]; 
+      rr:predicateMap [ rr:constant ex:description ]; 
       rr:objectMap    [ rr:column "Description" ]
     ]
     .
--- a/D011-M2MRelations/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D011-M2MRelations/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -12,13 +12,13 @@
     ];
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:firstName ]; 
+      rr:predicateMap [ rr:constant foaf:firstName ]; 
       rr:objectMap    [ rr:column "FirstName" ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:lastName ]; 
+      rr:predicateMap [ rr:constant foaf:lastName ]; 
       rr:objectMap    [ rr:column "LastName" ]
     ]
 	.	
@@ -31,13 +31,13 @@
     ];
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:id ]; 
+      rr:predicateMap [ rr:constant ex:id ]; 
       rr:objectMap    [ rr:column "ID"; rr:datatype xsd:integer ]
     ];
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:description ]; 
+      rr:predicateMap [ rr:constant ex:description ]; 
       rr:objectMap    [ rr:column "Description" ]
     ]
 	.
@@ -49,7 +49,7 @@
    rr:subjectMap [ rr:template "http://example.com/student/{ID_Student}" ];
    
    rr:predicateObjectMap [
-       rr:predicateMap [ rr:predicate ex:plays ];
+       rr:predicateMap [ rr:constant ex:plays ];
        rr:objectMap [ rr:template "http://example.com/sport/{ID_Sport}" ];
    ].
    
--- a/D012-2tables2duplicates0nulls/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D012-2tables2duplicates0nulls/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -17,7 +17,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ 
             rr:template "{fname} {lname}";
             rr:termType rr:Literal ;
@@ -26,7 +26,7 @@
     
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:amount ]; 
+      rr:predicateMap [ rr:constant ex:amount ]; 
       rr:objectMap    [ 
             rr:column "amount";
             rr:termType rr:Literal ;
--- a/D012-2tables2duplicates0nulls/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D012-2tables2duplicates0nulls/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -17,7 +17,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ 
             rr:template "{fname} {lname}";
             rr:termType rr:Literal ;
@@ -37,7 +37,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:city ]; 
+      rr:predicateMap [ rr:constant ex:city ]; 
       rr:objectMap    [ 
             rr:column "city";
             rr:termType rr:Literal ; 
--- a/D012-2tables2duplicates0nulls/r2rmlc.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D012-2tables2duplicates0nulls/r2rmlc.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -11,7 +11,7 @@
 	
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ 
             rr:template "{fname} {lname}";
             rr:termType rr:Literal ;
@@ -20,7 +20,7 @@
     
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:amount ]; 
+      rr:predicateMap [ rr:constant ex:amount ]; 
       rr:objectMap    [ 
             rr:column "amount";
             rr:termType rr:Literal ;
--- a/D012-2tables2duplicates0nulls/r2rmld.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D012-2tables2duplicates0nulls/r2rmld.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -23,7 +23,7 @@
 	  
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:predicateMap [ rr:constant foaf:name ]; 
       rr:objectMap    [ 
             rr:template "{fname} {lname}";
             rr:termType rr:Literal ;
@@ -32,7 +32,7 @@
     
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate ex:amount ]; 
+      rr:predicateMap [ rr:constant ex:amount ]; 
       rr:objectMap    [ 
             rr:column "amount";
             rr:termType rr:Literal ;
--- a/D013-1table3columns2rows1nullvalue/manifest.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D013-1table3columns2rows1nullvalue/manifest.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,7 +7,7 @@
 	dcterms:title "Table with null value" ;
 	dcterms:identifier "D013-1table3columns2rows1nullvalue" ;
 	rdb2rdftest:sqlScriptFile "create.sql";
-	rdb2rdftest:relatedTestCase <dg0013> ;
+	rdb2rdftest:relatedTestCase <dg0013>, <tc0013a> ;
 .
 
 <dg0013> a rdb2rdftest:DirectMapping ;	
@@ -20,3 +20,15 @@
 	rdb2rdftest:hasExpectedOutput true ;
 	rdb2rdftest:output "directGraph.nt" ;
 .
+
+<tc0013a> a rdb2rdftest:R2RML ;	
+	dcterms:title "Duplicate tuples generate same blank node" ; 
+	dcterms:identifier "R2RMLTC013a" ;
+	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-1table3columns2rows1nullvalue/mappeda.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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-1table3columns2rows1nullvalue/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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" ]
+    ]
+	
+    .
--- a/D014-3tablesExample/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D014-3tablesExample/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -23,25 +23,25 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate dept:deptno ]; 
+      rr:predicateMap [ rr:constant dept:deptno ]; 
       rr:objectMap    [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:name ]; 
+      rr:predicateMap [ rr:constant dept:name ]; 
       rr:objectMap    [ rr:column "dname" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:location ]; 
+      rr:predicateMap [ rr:constant dept:location ]; 
       rr:objectMap    [ rr:column "loc" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:COMPANY ]; 
+      rr:predicateMap [ rr:constant dept:COMPANY ]; 
       rr:objectMap    [ rr:object "EXAMPLE Corporation" ]
     ]
 .
\ No newline at end of file
--- a/D014-3tablesExample/r2rmlb.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D014-3tablesExample/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -25,25 +25,25 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate dept:deptno ]; 
+      rr:predicateMap [ rr:constant dept:deptno ]; 
       rr:objectMap    [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:name ]; 
+      rr:predicateMap [ rr:constant dept:name ]; 
       rr:objectMap    [ rr:column "dname" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:location ]; 
+      rr:predicateMap [ rr:constant dept:location ]; 
       rr:objectMap    [ rr:column "loc" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:COMPANY ]; 
+      rr:predicateMap [ rr:constant dept:COMPANY ]; 
       rr:objectMap    [ rr:object "EXAMPLE Corporation" ]
     ]
 .
@@ -69,61 +69,61 @@
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:jobtype ]; 
-      rr:objectMap    [ rr:column "jobTypeURI" ]
-    ];
-
-    rr:predicateObjectMap 
-    [ 
-      rr:predicateMap [ rr:predicate rdf:type ]; 
+      rr:predicateMap [ rr:constant emp:jobtype ]; 
       rr:objectMap    [ rr:column "jobTypeURI" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:emptype ]; 
+      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 [rdf:predicate rdf:type ]; 
+      rr:predicateMap [ rr:constant rdf:type ]; 
       rr:objectMap    [ rr:column "empTypeURI" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:empno ]; 
+      rr:predicateMap [ rr:constant emp:empno ]; 
       rr:objectMap    [ rr:column "empno" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:name ]; 
+      rr:predicateMap [ rr:constant emp:name ]; 
       rr:objectMap    [ rr:column "ename" ]; 
       rr:graphMap     [ rr:graph emp:empNameGraph ];
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:job ]; 
+      rr:predicateMap [ rr:constant emp:job ]; 
       rr:objectMap    [ rr:column "job" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:deptNum ]; 
+      rr:predicateMap [ rr:constant emp:deptNum ]; 
       rr:objectMap    [ rr:column "deptno" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:etype ]; 
+      rr:predicateMap [ rr:constant emp:etype ]; 
       rr:objectMap    [ rr:column "etype" ]
     ];
 
     rr:predicateObjectMap [
-      rr:predicateMap [ rr:predicate emp:c_ref_deptno ];
+      rr:predicateMap [ rr:constant emp:c_ref_deptno ];
       rr:refObjectMap    [
         rr:parentTriplesMap <TriplesMap1>;
         rr:joinCondition [
--- a/D014-3tablesExample/r2rmlc.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D014-3tablesExample/r2rmlc.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -26,25 +26,25 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate dept:deptno ]; 
+      rr:predicateMap [ rr:constant dept:deptno ]; 
       rr:objectMap    [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:name ]; 
+      rr:predicateMap [ rr:constant dept:name ]; 
       rr:objectMap    [ rr:column "dname" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:location ]; 
+      rr:predicateMap [ rr:constant dept:location ]; 
       rr:objectMap    [ rr:column "loc" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:COMPANY ]; 
+      rr:predicateMap [ rr:constant dept:COMPANY ]; 
       rr:objectMap    [ rr:object "EXAMPLE Corporation" ]
     ]
 .
@@ -61,61 +61,61 @@
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:jobtype ]; 
-      rr:objectMap    [ rr:template "http://example.com/emp/job/{job}" ]
-    ];
-
-    rr:predicateObjectMap 
-    [ 
-      rr:predicateMap [ rr:predicate rdf:type ]; 
+      rr:predicateMap [ rr:constant emp:jobtype ]; 
       rr:objectMap    [ rr:template "http://example.com/emp/job/{job}" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:emptype ]; 
+      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:predicate rdf:type ]; 
+      rr:predicateMap [ rr:constant rdf:type ]; 
       rr:objectMap    [ rr:template "http://example.com/emp/etype/{etype}" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:empno ]; 
+      rr:predicateMap [ rr:constant emp:empno ]; 
       rr:objectMap    [ rr:column "empno" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:name ]; 
+      rr:predicateMap [ rr:constant emp:name ]; 
       rr:objectMap    [ rr:column "ename" ]; 
       rr:graphMap     [ rr:graph emp:empNameGraph ];
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:job ]; 
+      rr:predicateMap [ rr:constant emp:job ]; 
       rr:objectMap    [ rr:column "job" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:deptNum ]; 
+      rr:predicateMap [ rr:constant emp:deptNum ]; 
       rr:objectMap    [ rr:column "deptno" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:etype ]; 
+      rr:predicateMap [ rr:constant emp:etype ]; 
       rr:objectMap    [ rr:column "etype" ]
     ];
 
     rr:predicateObjectMap [
-      rr:predicateMap [ rr:predicate emp:c_ref_deptno ];
+      rr:predicateMap [ rr:constant emp:c_ref_deptno ];
       rr:refObjectMap    [
         rr:parentTriplesMap <TriplesMap1>;
         rr:joinCondition [
--- a/D014-3tablesExample/r2rmld.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D014-3tablesExample/r2rmld.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -24,36 +24,36 @@
 
     rr:predicateObjectMap
     [ 
-      rr:predicateMap [ rr:predicate dept:deptno ]; 
+      rr:predicateMap [ rr:constant dept:deptno ]; 
       rr:objectMap    [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:name ]; 
+      rr:predicateMap [ rr:constant dept:name ]; 
       rr:objectMap    [ rr:column "dname" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:location ]; 
+      rr:predicateMap [ rr:constant dept:location ]; 
       rr:objectMap    [ rr:column "loc" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate dept:COMPANY ]; 
+      rr:predicateMap [ rr:constant dept:COMPANY ]; 
       rr:objectMap    [ rr:object "EXAMPLE Corporation" ]
     ]
 .
 
 
-<#jobtypeObjectMap>
+<jobtypeObjectMap>
     a rr:ObjectMap;
     rr:template "http://example.com/emp/job/{job}"
     .
 
-<#emptypeObjectMap>
+<emptypeObjectMap>
     a rr:ObjectMap;
     rr:template "http://example.com/emp/etype/{etype}"
     .
@@ -70,61 +70,61 @@
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:jobtype ]; 
-      rr:objectMap    <#jobtypeObjectMap>
-    ];
-
-    rr:predicateObjectMap 
-    [ 
-      rr:predicateMap [ rr:predicate rdf:type ]; 
-      rr:objectMap    <#jobtypeObjectMap>
+      rr:predicateMap [ rr:constant emp:jobtype ]; 
+      rr:objectMap    <jobtypeObjectMap>
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:emptype ]; 
-      rr:objectMap    <#emptypeObjectMap>
+      rr:predicateMap [ rr:constant rdf:type ]; 
+      rr:objectMap    <jobtypeObjectMap>
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate rdf:type ]; 
-      rr:objectMap    <#emptypeObjectMap>
+      rr:predicateMap [ rr:constant emp:emptype ]; 
+      rr:objectMap    <emptypeObjectMap>
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:empno ]; 
+      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:predicate emp:name ]; 
+      rr:predicateMap [ rr:constant emp:name ]; 
       rr:objectMap    [ rr:column "ename" ]; 
       rr:graphMap     [ rr:graph emp:empNameGraph ];
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:job ]; 
+      rr:predicateMap [ rr:constant emp:job ]; 
       rr:objectMap    [ rr:column "job" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:deptNum ]; 
+      rr:predicateMap [ rr:constant emp:deptNum ]; 
       rr:objectMap    [ rr:column "deptno" ]
     ];
 
     rr:predicateObjectMap 
     [ 
-      rr:predicateMap [ rr:predicate emp:etype ]; 
+      rr:predicateMap [ rr:constant emp:etype ]; 
       rr:objectMap    [ rr:column "etype" ]
     ];
 
     rr:predicateObjectMap [
-      rr:predicateMap [ rr:predicate emp:c_ref_deptno ];
+      rr:predicateMap [ rr:constant emp:c_ref_deptno ];
       rr:refObjectMap    [
         rr:parentTriplesMap <TriplesMap1>;
         rr:joinCondition [
--- a/D016-1tableSQLdatatypes/create.sql	Tue Oct 11 02:54:10 2011 +0200
+++ b/D016-1tableSQLdatatypes/create.sql	Tue Oct 25 19:59:48 2011 +0200
@@ -8,12 +8,13 @@
 "BirthDate" DATE,
 "EntranceDate" TIMESTAMP,
 "PaidInAdvance" BOOLEAN,
+"Photo" BINARY(20),
 PRIMARY KEY ("ID")
 );
 
-INSERT INTO "Patient" ("ID", "FirstName","LastName","Sex","Weight","Height","BirthDate","EntranceDate","PaidInAdvance") 
-VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22','FALSE');
-INSERT INTO "Patient" ("ID", "FirstName","LastName","Sex","Weight","Height","BirthDate","EntranceDate","PaidInAdvance") 
-VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44','TRUE');
-INSERT INTO "Patient" ("ID", "FirstName","LastName","Sex","Weight","Height","BirthDate","EntranceDate","PaidInAdvance") 
-VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14','TRUE');
+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)));
--- a/D016-1tableSQLdatatypes/manifest.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D016-1tableSQLdatatypes/manifest.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -7,13 +7,13 @@
 	dcterms:title "Table with datatypes" ;
 	dcterms:identifier "D016-1tableSQLdatatypes" ;
 	rdb2rdftest:sqlScriptFile "create.sql";
-	rdb2rdftest:relatedTestCase <tc0016a> ;
+	rdb2rdftest:relatedTestCase <tc0016a>, <tc0016b>, <tc0016c>, <tc0016d>, <tc0016e> ;
 .
 
 <tc0016a> a rdb2rdftest:R2RML ;	
 	dcterms:title "Table with datatypes" ; 
 	dcterms:identifier "R2RMLTC016a" ;
-	test:purpose "Tests the rr:termtype  and datatype conversions: integer, real, float, date, timestamp and boolean" ;
+	test:purpose "Tests the rr:termtype  and datatype conversions: string and integer" ;
 	test:specificationReference "#datatype-conversions" ;
 	test:reviewStatus test:unreviewed ;
 	rdb2rdftest:database <d016> ;
@@ -22,3 +22,51 @@
 	rdb2rdftest:mappingDocument "r2rmla.ttl" ;
 .
 
+<tc0016b> a rdb2rdftest:R2RML ;	
+	dcterms:title "Table with datatypes" ; 
+	dcterms:identifier "R2RMLTC016b" ;
+	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 "R2RMLTC016c" ;
+	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 "R2RMLTC016d" ;
+	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 "R2RMLTC016e" ;
+	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" ;
+.
+
--- a/D016-1tableSQLdatatypes/mappeda.nq	Tue Oct 11 02:54:10 2011 +0200
+++ b/D016-1tableSQLdatatypes/mappeda.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -3,29 +3,14 @@
 <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/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/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/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/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/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/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/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/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> .
-<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> .
-<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> .
-<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-1tableSQLdatatypes/mappedb.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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-1tableSQLdatatypes/mappedc.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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-1tableSQLdatatypes/mappedd.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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-1tableSQLdatatypes/mappede.nq	Tue Oct 25 19:59:48 2011 +0200
@@ -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> .
+
--- a/D016-1tableSQLdatatypes/r2rmla.ttl	Tue Oct 11 02:54:10 2011 +0200
+++ b/D016-1tableSQLdatatypes/r2rmla.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -43,34 +43,4 @@
       rr:objectMap    [ rr:column "Sex"; rr:datatype xsd:string ]
     ];
 
-    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 ]
-    ];
-
-    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 ]
-    ];
-
-    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-1tableSQLdatatypes/r2rmlb.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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-1tableSQLdatatypes/r2rmlc.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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-1tableSQLdatatypes/r2rmld.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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-1tableSQLdatatypes/r2rmle.ttl	Tue Oct 25 19:59:48 2011 +0200
@@ -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 ]
+    ];
+
+    .