--- a/D011-M2MRelations/mapped.nq Fri Jul 29 16:01:10 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<http://example.com/110Tennis> <http://example.com/description> "Tennis" .
-<http://example.com/110Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://example.com/10VenusWilliams> <http://example.com/plays> <http://example.com/110Tennis> .
-<http://example.com/10VenusWilliams> <http://xmlns.com/foaf/0.1/lastName> "Williams" .
-<http://example.com/10VenusWilliams> <http://xmlns.com/foaf/0.1/firstName> "Venus" .
-<http://example.com/10VenusWilliams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://example.com/111Football> <http://example.com/description> "Football" .
-<http://example.com/111Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://example.com/12DavidVilla> <http://example.com/plays> <http://example.com/111Football> .
-<http://example.com/12DavidVilla> <http://xmlns.com/foaf/0.1/lastName> "Villa" .
-<http://example.com/12DavidVilla> <http://xmlns.com/foaf/0.1/firstName> "David" .
-<http://example.com/12DavidVilla> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://example.com/112Formula1> <http://example.com/description> "Formula1" .
-<http://example.com/112Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
-<http://example.com/11FernandoAlonso> <http://example.com/plays> <http://example.com/112Formula1> .
-<http://example.com/11FernandoAlonso> <http://example.com/plays> <http://example.com/111Football> .
-<http://example.com/11FernandoAlonso> <http://xmlns.com/foaf/0.1/lastName> "Alonso" .
-<http://example.com/11FernandoAlonso> <http://xmlns.com/foaf/0.1/firstName> "Fernando" .
-<http://example.com/11FernandoAlonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D011-M2MRelations/mappeda.nq Fri Jul 29 16:03:56 2011 +0100
@@ -0,0 +1,19 @@
+<http://example.com/110Tennis> <http://example.com/description> "Tennis" .
+<http://example.com/110Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10VenusWilliams> <http://example.com/plays> <http://example.com/110Tennis> .
+<http://example.com/10VenusWilliams> <http://xmlns.com/foaf/0.1/lastName> "Williams" .
+<http://example.com/10VenusWilliams> <http://xmlns.com/foaf/0.1/firstName> "Venus" .
+<http://example.com/10VenusWilliams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/111Football> <http://example.com/description> "Football" .
+<http://example.com/111Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/12DavidVilla> <http://example.com/plays> <http://example.com/111Football> .
+<http://example.com/12DavidVilla> <http://xmlns.com/foaf/0.1/lastName> "Villa" .
+<http://example.com/12DavidVilla> <http://xmlns.com/foaf/0.1/firstName> "David" .
+<http://example.com/12DavidVilla> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/112Formula1> <http://example.com/description> "Formula1" .
+<http://example.com/112Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11FernandoAlonso> <http://example.com/plays> <http://example.com/112Formula1> .
+<http://example.com/11FernandoAlonso> <http://example.com/plays> <http://example.com/111Football> .
+<http://example.com/11FernandoAlonso> <http://xmlns.com/foaf/0.1/lastName> "Alonso" .
+<http://example.com/11FernandoAlonso> <http://xmlns.com/foaf/0.1/firstName> "Fernando" .
+<http://example.com/11FernandoAlonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D011-M2MRelations/mappedb.nq Fri Jul 29 16:03:56 2011 +0100
@@ -0,0 +1,22 @@
+<http://example.com/student/10> <http://xmlns.com/foaf/0.1/lastName> "Williams" .
+<http://example.com/student/10> <http://xmlns.com/foaf/0.1/firstName> "Venus" .
+<http://example.com/student/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/student/12> <http://xmlns.com/foaf/0.1/lastName> "Villa" .
+<http://example.com/student/12> <http://xmlns.com/foaf/0.1/firstName> "David" .
+<http://example.com/student/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/student/11> <http://xmlns.com/foaf/0.1/lastName> "Alonso" .
+<http://example.com/student/11> <http://xmlns.com/foaf/0.1/firstName> "Fernando" .
+<http://example.com/student/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/110> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
--- a/D011-M2MRelations/r2rml.ttl Fri Jul 29 16:01:10 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-@prefix rr: <http://www.w3.org/ns/r2rml#> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix ex: <http://example.com/> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
-
-<TriplesMap1>
- a rr:TriplesMap;
-
- rr:logicalTable [ rr:sqlQuery """
- SELECT Student.ID as ID,
- Student.FirstName as FirstName,
- Student.LastName as LastName,
- Sport.Description as Description,
- Sport.ID as Sport_ID
- FROM Student,Sport,Student_Sport
- WHERE Student.ID = Student_Sport.ID_Student
- AND Sport.ID = Student_Sport.ID_Sport;
- """; ];
-
- rr:subjectMap [ rr:template "http://example.com/{ID}{FirstName}{LastName}" ];
-
- rr:predicateObjectMap
- [
- rr:predicateMap [ rr:predicate ex:id ];
- rr:objectMap [ rr:column "ID"; rr:datatype xsd:integer ]
- ];
-
- rr:predicateObjectMap
- [
- rr:predicateMap [ rr:predicate foaf:firstName ];
- rr:objectMap [ rr:column "FirstName" ]
- ];
-
- rr:predicateObjectMap
- [
- rr:predicateMap [ rr:predicate foaf:lastName ];
- rr:objectMap [ rr:column "LastName" ]
- ];
-
- rr:predicateObjectMap
- [
- rr:predicateMap [ rr:predicate ex:plays ];
- rr:objectMap [ rr:template "http://example.com/{Sport_ID}{Description}" ]
- ]
- .
-
-<TriplesMap2>
- a rr:TriplesMap;
-
- rr:logicalTable [ rr:tableName "Sport" ];
-
- rr:subjectMap [ rr:template "http://example.com/{ID}{Description}" ];
-
- rr:predicateObjectMap
- [
- rr:predicateMap [ rr:predicate ex:id ];
- rr:objectMap [ rr:column "ID"; rr:datatype xsd:integer ]
- ];
-
- rr:predicateObjectMap
- [
- rr:predicateMap [ rr:predicate ex:description ];
- rr:objectMap [ rr:column "Description" ]
- ]
- .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D011-M2MRelations/r2rmla.ttl Fri Jul 29 16:03:56 2011 +0100
@@ -0,0 +1,69 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:sqlQuery """
+ SELECT Student.ID as ID,
+ Student.FirstName as FirstName,
+ Student.LastName as LastName,
+ Sport.Description as Description,
+ Sport.ID as Sport_ID
+ FROM Student,Sport,Student_Sport
+ WHERE Student.ID = Student_Sport.ID_Student
+ AND Sport.ID = Student_Sport.ID_Sport;
+ """; ];
+
+ rr:subjectMap [ rr:template "http://example.com/{ID}{FirstName}{LastName}" ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate ex:id ];
+ rr:objectMap [ rr:column "ID"; rr:datatype xsd:integer ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate foaf:firstName ];
+ rr:objectMap [ rr:column "FirstName" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate foaf:lastName ];
+ rr:objectMap [ rr:column "LastName" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate ex:plays ];
+ rr:objectMap [ rr:template "http://example.com/{Sport_ID}{Description}" ]
+ ]
+ .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Sport" ];
+
+ rr:subjectMap [
+ rr:template "http://example.com/{ID}{Description}";
+ rr:class ex:Sport;
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate ex:id ];
+ rr:objectMap [ rr:column "ID"; rr:datatype xsd:integer ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate ex:description ];
+ rr:objectMap [ rr:column "Description" ]
+ ]
+ .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D011-M2MRelations/r2rmlb.ttl Fri Jul 29 16:03:56 2011 +0100
@@ -0,0 +1,56 @@
+@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>
+ rr:logicalTable [ rr:tableName "Student"; ]
+ rr:subjectMap [
+ rr:template "http://example.com/student/{ID}";
+ rr:class ex:Student;
+ ];
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate foaf:firstName ];
+ rr:objectMap [ rr:column "FirstName" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate foaf:lastName ];
+ rr:objectMap [ rr:column "LastName" ]
+ ]
+ .
+
+<TriplesMap2>
+ rr:logicalTable [ rr:tableName "Sport"; ]
+ rr:subjectMap [
+ rr:template "http://example.com/sport/{ID}";
+ rr:class ex:Sport;
+ ];
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate ex:id ];
+ rr:objectMap [ rr:column "ID"; rr:datatype xsd:integer ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate ex:description ];
+ rr:objectMap [ rr:column "Description" ]
+ ]
+ .
+
+<LinkMap_1_2>
+
+ rr:logicalTable [ rr:tableName "Student_Sport" ];
+
+ rr:subjectMap [ rr:template "http://example.com/student/{ID_Student}" ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:predicate ex:plays ];
+ rr:objectMap [ rr:template "http://example.com/sport/{ID_Sport}" ];
+ ].
+
+