Include new TCs
authorBoris Villazon-Terrazas <bvillazon@fi.upm.es>
Mon, 27 Feb 2012 17:41:30 +0100
changeset 50 dbe75535575f
parent 49 987f64298b48
child 51 782d18996917
Include new TCs
D008-1table1compositeprimarykey3columns1row/manifest.ttl
D008-1table1compositeprimarykey3columns1row/mappedb.nq
D008-1table1compositeprimarykey3columns1row/mappedc.nq
D008-1table1compositeprimarykey3columns1row/r2rmlb.ttl
D008-1table1compositeprimarykey3columns1row/r2rmlc.ttl
D010-1table1primarykey3colums3rows/manifest.ttl
D014-3tables1primarykey1foreignkey/manifest.ttl
D014-3tables1primarykey1foreignkey/mappedf.nq
D014-3tables1primarykey1foreignkey/r2rmlf.ttl
ts1.zip
--- a/D008-1table1compositeprimarykey3columns1row/manifest.ttl	Mon Feb 27 01:15:44 2012 +0100
+++ b/D008-1table1compositeprimarykey3columns1row/manifest.ttl	Mon Feb 27 17:41:30 2012 +0100
@@ -7,7 +7,7 @@
 	dcterms:title "One table, a composite primary key, three columns, one row" ;
 	dcterms:identifier "D008-1table1compositeprimarykey3columns1row" ;
 	rdb2rdftest:sqlScriptFile "create.sql";
-	rdb2rdftest:relatedTestCase <dg0008>, <tc0008a> ;
+	rdb2rdftest:relatedTestCase <dg0008>, <tc0008a>, <tc0008b>, <tc0008c>  ;
 .
 
 <dg0008> a rdb2rdftest:DirectMapping ;	
@@ -21,7 +21,6 @@
 	rdb2rdftest:output "directGraph.nt" ;
 .
 
-
 <tc0008a> a rdb2rdftest:R2RML ;	
 	dcterms:title "Generation of triples to a target graph" ; 
 	dcterms:identifier "R2RMLTC0008a" ;
@@ -34,3 +33,26 @@
 	rdb2rdftest:mappingDocument "r2rmla.ttl" ;
 .
 
+<tc0008b> a rdb2rdftest:R2RML ;	
+	dcterms:title "Generation of triples referencing object map" ; 
+	dcterms:identifier "R2RMLTC0008b" ;
+	test:purpose "Tests the mapping specification referencing object map without join" ;
+	test:specificationReference "#dfn-referencing-object-map" ;
+	test:reviewStatus test:unreviewed ;
+	rdb2rdftest:database <d008> ;
+	rdb2rdftest:hasExpectedOutput true ;
+	rdb2rdftest:output "mappedb.nq" ;
+	rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
+
+<tc0008c> a rdb2rdftest:R2RML ;	
+	dcterms:title "Generation of triples by using multiple predicateObjectMap predicates referencing to the same logical table" ; 
+	dcterms:identifier "R2RMLTC0008c" ;
+	test:purpose "Tests the generation of triples by using multiple predicateObjectMap predicates referencing to the same logical table" ;
+	test:specificationReference "#dfn-referencing-object-map" ;
+	test:reviewStatus test:unreviewed ;
+	rdb2rdftest:database <d008> ;
+	rdb2rdftest:hasExpectedOutput true ;
+	rdb2rdftest:output "mappedc.nq" ;
+	rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D008-1table1compositeprimarykey3columns1row/mappedb.nq	Mon Feb 27 17:41:30 2012 +0100
@@ -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/Student10Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student10Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student10Venus%20Williams> <http://example.com/Sport> "Tennis"  . 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D008-1table1compositeprimarykey3columns1row/mappedc.nq	Mon Feb 27 17:41:30 2012 +0100
@@ -0,0 +1,6 @@
+<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/Student10Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student10Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+<http://example.com/Student10Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student10Venus%20Williams> <http://example.com/Sport> "Tennis"  . 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D008-1table1compositeprimarykey3columns1row/r2rmlb.ttl	Mon Feb 27 17:41:30 2012 +0100
@@ -0,0 +1,50 @@
+@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: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    <RefObjectMap1>
+    ]
+    
+ .
+
+ 
+<RefObjectMap1>
+	a rr:RefObjectMap;
+	rr:parentTriplesMap <TriplesMap1> ;
+	rr:column "Sport"  ;
+.
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D008-1table1compositeprimarykey3columns1row/r2rmlc.ttl	Mon Feb 27 17:41:30 2012 +0100
@@ -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: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:predicateMap [ rr:constant ex:name; ];
+      rr:objectMap    [ rr:column "Name" ]
+    ];
+
+    rr:predicateObjectMap
+    [ 
+      rr:predicateMap [ rr:constant ex:Sport; ];
+      rr:objectMap    [ rr:column "Sport" ]
+    ]
+	
+    .
--- a/D010-1table1primarykey3colums3rows/manifest.ttl	Mon Feb 27 01:15:44 2012 +0100
+++ b/D010-1table1primarykey3colums3rows/manifest.ttl	Mon Feb 27 17:41:30 2012 +0100
@@ -56,3 +56,5 @@
 	rdb2rdftest:output "mappedc.nq" ;
 	rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
 .
+
+
--- a/D014-3tables1primarykey1foreignkey/manifest.ttl	Mon Feb 27 01:15:44 2012 +0100
+++ b/D014-3tables1primarykey1foreignkey/manifest.ttl	Mon Feb 27 17:41:30 2012 +0100
@@ -61,8 +61,8 @@
 <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:purpose "Mapping specification referencing object map" ;
+	test:specificationReference "#dfn-referencing-object-map" ;
 	test:reviewStatus test:unreviewed ;
 	rdb2rdftest:database <d014> ;
 	rdb2rdftest:hasExpectedOutput true ;
@@ -81,3 +81,15 @@
 	rdb2rdftest:output "mappede.nq" ;	
 	rdb2rdftest:mappingDocument "r2rmle.ttl" ;
 .
+
+<tc0014f> a rdb2rdftest:R2RML ;	
+	dcterms:title "Database type codes to IRIs" ; 
+	dcterms:identifier "R2RMLTC0014f" ;
+	test:purpose "Test the translation of database type codes to IRIs" ;
+	test:specificationReference "#example-translationtable" ;
+	test:reviewStatus test:unreviewed ;
+	rdb2rdftest:database <d014> ;
+	rdb2rdftest:hasExpectedOutput true ;
+	rdb2rdftest:output "mappedf.nq" ;	
+	rdb2rdftest:mappingDocument "r2rmlf.ttl" ;
+.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/mappedf.nq	Mon Feb 27 17:41:30 2012 +0100
@@ -0,0 +1,1 @@
+<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tables1primarykey1foreignkey/r2rmlf.ttl	Mon Feb 27 17:41:30 2012 +0100
@@ -0,0 +1,27 @@
+@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/> .
+
+<TriplesMap4>
+    rr:logicalTable [ rr:sqlQuery """
+
+        SELECT *, (CASE JOB
+            WHEN 'CLERK' THEN 'general-office'
+            WHEN 'NIGHTGUARD' THEN 'security'
+            WHEN 'ENGINEER' THEN 'engineering'
+        END) ROLE FROM EMP
+
+        """ ];
+    rr:subjectMap [
+        rr:template "http://data.example.com/employee/{EMPNO}";
+    ];
+    rr:predicateObjectMap [
+        rr:predicate ex:role;
+        rr:objectMap [ rr:template "http://data.example.com/roles/{ROLE}" ];
+    ].
+    
\ No newline at end of file
Binary file ts1.zip has changed