Two new test cases included
authorBoris Villazon-Terrazas <bvillazon@fi.upm.es>
Fri, 22 Jul 2011 11:30:35 +0100
changeset 14 c00709408076
parent 13 968a8d3f7993
child 15 4684c4ed3b1b
Two new test cases included
- R2RMLTC012c: TriplesMap without subjectMap
- R2RMLTC012d: TriplesMap with two subjectMap
D012-2tables2duplicates0nulls/manifest.ttl
D012-2tables2duplicates0nulls/r2rmlc.ttl
D012-2tables2duplicates0nulls/r2rmld.ttl
--- a/D012-2tables2duplicates0nulls/manifest.ttl	Wed Jul 20 20:47:37 2011 +0100
+++ b/D012-2tables2duplicates0nulls/manifest.ttl	Fri Jul 22 11:30:35 2011 +0100
@@ -1,6 +1,7 @@
 @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/> .
 
 <d012> a rdb2rdftest:DataBase;
@@ -9,6 +10,8 @@
 	rdb2rdftest:sqlScriptFile "create.sql";
 	rdb2rdftest:relatedTestCase <tc0012a> ;
 	rdb2rdftest:relatedTestCase <tc0012b> ;
+	rdb2rdftest:relatedTestCase <tc0012c> ;	
+	rdb2rdftest:relatedTestCase <tc0012d> ;		
 .
 
 <tc0012a> a rdb2rdftest:R2RML ;	
@@ -18,6 +21,7 @@
 	test:specificationReference "#dfn-output-dataset" ;
 	test:reviewStatus test:unreviewed ;
 	rdb2rdftest:database <d012> ;
+	rdb2rdftest:hasExpectedOutput "true"^^xsd:boolean ;		
 	rdb2rdftest:output "mappeda.nq" ;
 	rdb2rdftest:mappingDocument "r2rmla.ttl" ;
 .
@@ -29,8 +33,29 @@
 	test:specificationReference "#dfn-output-dataset" ;
 	test:reviewStatus test:unreviewed ;
 	rdb2rdftest:database <d012> ;
-	rdb2rdftest:output "mappeda.nq" ;
+	rdb2rdftest:hasExpectedOutput "true"^^xsd:boolean ;	
+	rdb2rdftest:output "mappedb.nq" ;
 	rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
 .
 
+<tc0012c> a rdb2rdftest:R2RML ;	
+	dcterms:title "TriplesMap without subjectMap" ; 
+	dcterms:identifier "R2RMLTC012c" ;
+	test:purpose "Tests a R2RML with missing information, TriplesMap without subjectMap." ;
+	test:specificationReference "#dfn-output-dataset" ;
+	test:reviewStatus test:unreviewed ;
+	rdb2rdftest:database <d012> ;
+	rdb2rdftest:hasExpectedOutput "false"^^xsd:boolean ;
+	rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
 
+<tc0012d> a rdb2rdftest:R2RML ;	
+	dcterms:title "TriplesMap with two subjectMap" ; 
+	dcterms:identifier "R2RMLTC012d" ;
+	test:purpose "Tests a R2RML with wrong information, TriplesMap with two subjectMap." ;
+	test:specificationReference "#dfn-output-dataset" ;
+	test:reviewStatus test:unreviewed ;
+	rdb2rdftest:database <d012> ;
+	rdb2rdftest:hasExpectedOutput "false"^^xsd:boolean ;
+	rdb2rdftest:mappingDocument "r2rmld.ttl" ;
+.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D012-2tables2duplicates0nulls/r2rmlc.ttl	Fri Jul 22 11:30:35 2011 +0100
@@ -0,0 +1,30 @@
+@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:predicateObjectMap
+    [ 
+      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:objectMap    [ 
+            rr:template "{fname} {lname}";
+            rr:termtype rr:Literal ;
+      ]
+    ];
+    
+    rr:predicateObjectMap
+    [ 
+      rr:predicateMap [ rr:predicate ex:amount ]; 
+      rr:objectMap    [ 
+            rr:column "amount";
+            rr:termtype rr:Literal ;
+            rr:datatype xsd:float ;
+      ]
+    ];
+	.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/D012-2tables2duplicates0nulls/r2rmld.ttl	Fri Jul 22 11:30:35 2011 +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#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+    a rr:TriplesMap;
+
+	rr:logicalTable [ rr:tableName  "IOUs" ];
+	
+    rr:subjectMap [
+            rr:template "{fname}_{lname}_{amount}"; 
+            rr:termtype rr:BlankNode;
+            rr:class ex:IOU; 
+      ];
+
+    rr:subjectMap [
+            rr:template "{amount}_{fname}_{lname}"; 
+            rr:termtype rr:BlankNode;
+            rr:class ex:IOU; 
+      ];
+	  
+    rr:predicateObjectMap
+    [ 
+      rr:predicateMap [ rr:predicate foaf:name ]; 
+      rr:objectMap    [ 
+            rr:template "{fname} {lname}";
+            rr:termtype rr:Literal ;
+      ]
+    ];
+    
+    rr:predicateObjectMap
+    [ 
+      rr:predicateMap [ rr:predicate ex:amount ]; 
+      rr:objectMap    [ 
+            rr:column "amount";
+            rr:termtype rr:Literal ;
+            rr:datatype xsd:float ;
+      ]
+    ];
+	.
\ No newline at end of file