TCs updated according to the new DM and R2RML specs - second round of changes - R2RML default mappings included
--- a/D005-1table3columns3rows2duplicates/manifest.ttl Tue May 08 17:30:39 2012 +0200
+++ b/D005-1table3columns3rows2duplicates/manifest.ttl Tue May 29 01:55:13 2012 +0200
@@ -7,7 +7,7 @@
dcterms:title "One table, three columns, three rows, two duplicate tuples, no primary key" ;
dcterms:identifier "D005-1table3columns3rows2duplicates" ;
rdb2rdftest:sqlScriptFile "create.sql";
- rdb2rdftest:relatedTestCase <dg0005>, <tc0005a> ;
+ rdb2rdftest:relatedTestCase <dg0005>, <tc0005a>, <tc0005b> ;
.
<dg0005> a rdb2rdftest:DirectMapping ;
@@ -33,3 +33,14 @@
rdb2rdftest:mappingDocument "r2rmla.ttl" ;
.
+<tc0005b> a rdb2rdftest:R2RML ;
+ dcterms:title "Default mapping" ;
+ dcterms:identifier "R2RMLTC0005b" ;
+ test:purpose "Tests the generation of a default mapping for tables without a primary key" ;
+ test:specificationReference "#default-mappings" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d005> ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D005-1table3columns3rows2duplicates/mappedb.nq Tue May 29 01:55:13 2012 +0200
@@ -0,0 +1,9 @@
+_:Bob-Smith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob-Smith <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob-Smith <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob-Smith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue-Jones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue-Jones <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue-Jones <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue-Jones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D005-1table3columns3rows2duplicates/r2rmlb.ttl Tue May 29 01:55:13 2012 +0200
@@ -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#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "\"IOUs\"" ];
+
+ rr:subjectMap [ rr:template "{\"fname\"}-{\"lname\"}";
+ rr:class <IOUs>;
+ rr:termType rr:BlankNode; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#fname> ;
+ rr:objectMap [ rr:column "\"fname\""; ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#lname> ;
+ rr:objectMap [ rr:column "\"lname\""; ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#amount> ;
+ rr:objectMap [ rr:column "\"amount\""; ]
+ ];
+ .
--- a/D009-2tables1primarykey1foreignkey/manifest.ttl Tue May 08 17:30:39 2012 +0200
+++ b/D009-2tables1primarykey1foreignkey/manifest.ttl Tue May 29 01:55:13 2012 +0200
@@ -7,7 +7,7 @@
dcterms:title "Two tables, a primary key, a foreign key" ;
dcterms:identifier "D009-2tables1primarykey1foreignkey" ;
rdb2rdftest:sqlScriptFile "create.sql";
- rdb2rdftest:relatedTestCase <dg0009>, <tc0009a>, <tc0009b>, <tc0009d> ; #<tc0009c>,
+ rdb2rdftest:relatedTestCase <dg0009>, <tc0009a>, <tc0009b>, <tc0009c>, <tc0009d> ;
.
<dg0009> a rdb2rdftest:DirectMapping ;
@@ -45,17 +45,16 @@
rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
.
-#<tc0009c> a rdb2rdftest:R2RML ;
-# dcterms:title "Unamed column in a logical table" ;
-# dcterms:identifier "R2RMLTC0009c" ;
-# test:purpose "Test a logical table with unamed column." ;
-# test:specificationReference "#dfn-sql-query" ;
-# test:reviewStatus test:unreviewed ;
-# rdb2rdftest:database <d009> ;
-# rdb2rdftest:hasExpectedOutput false ;
-# rdb2rdftest:failMessage "non-conforming R2RML mapping";
-# rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
-#.
+<tc0009c> a rdb2rdftest:R2RML ;
+ dcterms:title "Unnamed column in a logical table" ;
+ dcterms:identifier "R2RMLTC0009c" ;
+ test:purpose "Test a logical table with unnamed column." ;
+ test:specificationReference "#dfn-sql-query" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d009> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
<tc0009d> a rdb2rdftest:R2RML ;
dcterms:title "Named column in logical table" ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D009-2tables1primarykey1foreignkey/mappedc.nq Tue May 29 01:55:13 2012 +0200
@@ -0,0 +1,3 @@
+<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" .
+
--- a/D012-2tables2duplicates0nulls/manifest.ttl Tue May 08 17:30:39 2012 +0200
+++ b/D012-2tables2duplicates0nulls/manifest.ttl Tue May 29 01:55:13 2012 +0200
@@ -8,7 +8,7 @@
dcterms:title "Two tables, two duplicate records, zero nulls, no primary key" ;
dcterms:identifier "D012-2tables2duplicates0nulls" ;
rdb2rdftest:sqlScriptFile "create.sql";
- rdb2rdftest:relatedTestCase <dg0012>, <tc0012a>, <tc0012b>, <tc0012c>, <tc0012d> ;
+ rdb2rdftest:relatedTestCase <dg0012>, <tc0012a>, <tc0012b>, <tc0012c>, <tc0012d>, <tc0012e> ;
.
<dg0012> a rdb2rdftest:DirectMapping ;
@@ -68,3 +68,15 @@
rdb2rdftest:failMessage "non-conforming R2RML mapping";
rdb2rdftest:mappingDocument "r2rmld.ttl" ;
.
+
+<tc0012e> a rdb2rdftest:R2RML ;
+ dcterms:title "Default mapping" ;
+ dcterms:identifier "R2RMLTC0012e" ;
+ test:purpose "Tests the generation of a default mapping for tables without a primary key." ;
+ test:specificationReference " #default-mappings" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d012> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:mappingDocument "r2rmle.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D012-2tables2duplicates0nulls/mappede.nq Tue May 29 01:55:13 2012 +0200
@@ -0,0 +1,17 @@
+_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
+_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#amount> "Madrid" .
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D012-2tables2duplicates0nulls/r2rmle.ttl Tue May 29 01:55:13 2012 +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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@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:predicateObjectMap [
+ rr:predicate rdf:type;
+ rr:objectMap <IOUs>;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#fname> ;
+ rr:objectMap [ rr:column "\"fname\""; ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#lname> ;
+ rr:objectMap [ rr:column "\"lname\""; ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#amount> ;
+ rr:objectMap [ rr:column "\"amount\""; ]
+ ];
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "\"Lives\"" ];
+
+ rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"city\"}"; rr:termType rr:BlankNode; ];
+
+ rr:predicateObjectMap [
+ rr:predicate rdf:type;
+ rr:objectMap <Lives>;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#fname> ;
+ rr:objectMap [ rr:column "\"fname\""; ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#lname> ;
+ rr:objectMap [ rr:column "\"lname\""; ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicate <IOUs#city> ;
+ rr:objectMap [ rr:column "\"city\""; ]
+ ];
+ .
\ No newline at end of file
Binary file ts1.zip has changed