--- a/D000-1table0rows/r2rml.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D000-1table0rows/r2rml.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -5,11 +5,10 @@
@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
<TriplesMap1>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
- rr:tableOwner "boricles";
- rr:tableName "Student";
-
+ rr:logicalTable [ rr:tableName "Student"; ] ;
+
rr:subjectMap [ rr:template "http://example.com/{Name}" ];
rr:predicateObjectMap
--- a/D001-1table1row/r2rmlb.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D001-1table1row/r2rmlb.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -9,7 +9,7 @@
rr:logicalTable [ rr:tableName "boricles.Student" ];
- rr:subjectMap [ rr:column "Name"; rr:termType "BlankNode" ];
+ rr:subjectMap [ rr:column "Name"; rr:termType rr:BlankNode ];
rr:predicateObjectMap
[
--- a/D002-1table2columns1row/r2rmla.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D002-1table2columns1row/r2rmla.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -7,7 +7,7 @@
<TriplesMap1>
a rr:TriplesMap;
- rr:logicalTable [ rr:tableName "boricles.Student" ];
+ rr:logicalTable [ rr:tableName "Student" ];
rr:subjectMap [ rr:template "http://example.com/{ID}{Name}";
rr:class foaf:Person ];
--- a/D002-1table2columns1row/r2rmlb.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D002-1table2columns1row/r2rmlb.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -16,7 +16,7 @@
"""
];
- rr:subjectMap [ rr:column "StudentId"; rr:termType "BlankNode"; rr:class foaf:Person ];
+ rr:subjectMap [ rr:column "StudentId"; rr:termType rr:BlankNode; rr:class foaf:Person ];
rr:predicateObjectMap
[
--- a/D003-1table3columns1row/r2rmlc.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D003-1table3columns1row/r2rmlc.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -17,7 +17,7 @@
"""
];
- rr:subjectMap [ rr:column "StudentID"; rr:termType "BlankNode";
+ rr:subjectMap [ rr:column "StudentID"; rr:termType rr:BlankNode;
rr:class foaf:Person ];
rr:predicateObjectMap
--- a/D003-1table3columns1row/r2rmld.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D003-1table3columns1row/r2rmld.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -16,7 +16,7 @@
"""
];
- rr:subjectMap [ rr:column "StudentID"; rr:termType "BlankNode";
+ rr:subjectMap [ rr:column "StudentID"; rr:termType rr:BlankNode;
rr:class foaf:Person ];
rr:predicateObjectMap
--- a/D004-1table2columnsprojection/r2rmla.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D004-1table2columnsprojection/r2rmla.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -5,11 +5,10 @@
@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
<TriplesMap1>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
- rr:tableOwner "boricles";
- rr:tableName "Student_Sport";
-
+ rr:logicalTable [ rr:tableName "Student_Sport" ];
+
rr:subjectMap [ rr:template "http://example.com/{Student}";
rr:class ex:Student ];
@@ -21,11 +20,10 @@
.
<TriplesMap2>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
- rr:tableOwner "boricles";
- rr:tableName "Student_Sport";
-
+ rr:logicalTable [ rr:tableName "Student_Sport" ];
+
rr:subjectMap [ rr:template "http://example.com/{Sport}";
rr:class ex:Sport ];
@@ -34,3 +32,4 @@
rr:predicateMap [ rr:predicate foaf:name ];
rr:objectMap [ rr:column "Sport" ]
]
+ .
\ No newline at end of file
--- a/D004-1table2columnsprojection/r2rmlb.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D004-1table2columnsprojection/r2rmlb.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -5,14 +5,15 @@
@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
<TriplesMap1>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
- rr:SQLQuery """
+ rr:logicalTable [ rr:SQLQuery """
Select ('Student' || Student) AS StudentId
from Student_Sport
""";
+ ] ;
- rr:subjectMap [ rr:column "StudentId"; rr:termtype "BlankNode";
+ rr:subjectMap [ rr:column "StudentId"; rr:termtype rr:BlankNode;
rr:class ex:Student ];
rr:predicateObjectMap
@@ -23,14 +24,14 @@
.
<TriplesMap2>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
rr:SQLQuery """
Select ('Sport' || Sport) AS SportId
from Student_Sport
""";
- rr:subjectMap [ rr:column "SportId"; rr:termtype "BlankNode";
+ rr:subjectMap [ rr:column "SportId"; rr:termtype rr:BlankNode;
rr:class ex:Sport ];
rr:predicateObjectMap
--- a/D009-2tables1primarykey1foreingkey/create.sql Wed Jul 20 19:27:24 2011 +0100
+++ b/D009-2tables1primarykey1foreingkey/create.sql Wed Jul 20 20:47:37 2011 +0100
@@ -1,3 +1,9 @@
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
CREATE TABLE Student (
ID integer,
Name varchar(50),
@@ -6,12 +12,7 @@
FOREIGN KEY(Sport) REFERENCES Sport(ID)
);
-CREATE TABLE Sport (
-ID integer,
-Name varchar (50),
-PRIMARY KEY (ID)
-);
-
+INSERT INTO Sport (ID, Name) VALUES (100,"Tennis");
INSERT INTO Student (ID, Name, Sport) VALUES (10,"Venus Williams", 100);
INSERT INTO Student (ID, Name, Sport) VALUES (20,"Demi Moore", NULL);
-INSERT INTO Sport (ID, Name) VALUES (100,"Tennis");
+
--- a/D009-2tables1primarykey1foreingkey/r2rml.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D009-2tables1primarykey1foreingkey/r2rml.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -2,20 +2,20 @@
@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:TriplesMapClass;
+ a rr:TriplesMap;
- rr:tableOwner "alex";
- rr:tableName "Student";
-
+ rr:logicalTable [ rr:tableName "Student" ];
+
rr:subjectMap
[
rr:template "http://example.com/resource/student_{ID}";
- rr:termType "IRI";
+ rr:termType rr:IRI;
rr:class <http://example.com/ontology/Student>;
- rr.graph <http://example.com/graph/students>;
+ rr:graphMap [ rr:graph <http://example.com/graph/students> ] ;
];
rr:predicateObjectMap
@@ -23,43 +23,46 @@
rr:predicateMap [ rr:predicate foaf:name ];
rr:objectMap [
rr:column "Name";
- rr:termType "Literal";
+ rr:termType rr:Literal;
];
- rr.graph <http://example.com/graph/students>;
+ rr:graphMap [ rr:graph <http://example.com/graph/students> ];
];
rr:refPredicateObjectMap
[
- rr:refPredicateMap [ rr:predicate ex:ontology/practises ];
+ rr:refPredicateMap [ rr:predicate <http://example.com/ontology/practises> ];
rr:refObjectMap [
rr:parentTriplesMap <TriplesMap2>;
- rr:joinCondition "child.{Sport} = parent.{ID}".
+ rr:joinCondition [
+ rr:child "Sport" ;
+ rr:parent "ID" ;
+ ]
];
- rr.graph <http://example.com/graph/practise>;
+ rr:graphMap [ rr:graph <http://example.com/graph/practise> ];
];
.
<TriplesMap2>
a rr:TriplesMapClass;
- rr:tableOwner "alex";
- rr:tableName "Sport";
+
+ rr:logicalTable [ rr:tableName "Sport" ];
rr:subjectMap
[
rr:template "http://example.com/resource/sport_{ID}";
- rr:termType "IRI";
+ rr:termType rr:IRI;
rr:class <http://example.com/ontology/Sport>;
- rr.graph <http://example.com/graph/sports>;
+ rr:graphMap [ rr:graph <http://example.com/graph/sports> ];
];
rr:predicateObjectMap
[
- rr:predicateMap [ rr:predicate rdf:label ];
+ rr:predicateMap [ rr:predicate rdfs:label ];
rr:objectMap [
rr:column "Name";
- rr:termType "Literal";
+ rr:termType rr:Literal;
];
- rr.graph <http://example.com/graph/sports>;
+ rr:graphMap [ rr:graph <http://example.com/graph/sports> ];
];
.
\ No newline at end of file
--- a/D011-M2MRelations/r2rml.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D011-M2MRelations/r2rml.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -5,9 +5,9 @@
@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
<TriplesMap1>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
- rr:SQLquery """
+ rr:logicalTable [ rr:sqlQuery """
SELECT Student.ID as ID,
Student.FirstName as FirstName,
Student.LastName as LastName,
@@ -16,7 +16,7 @@
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}" ];
@@ -46,11 +46,10 @@
.
<TriplesMap2>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
- rr:tableOwner "boricles";
- rr:tableName "Sport";
-
+ rr:logicalTable [ rr:tableName "Sport" ];
+
rr:subjectMap [ rr:template "http://example.com/{ID}{Description}" ];
rr:predicateObjectMap
--- a/D012-2tables2duplicates0nulls/create.sql Wed Jul 20 19:27:24 2011 +0100
+++ b/D012-2tables2duplicates0nulls/create.sql Wed Jul 20 20:47:37 2011 +0100
@@ -1,29 +1,15 @@
-CREATE TABLE Student (
-ID integer PRIMARY KEY,
-FirstName varchar(50),
-LastName varchar(50)
-);
-CREATE TABLE Sport (
-ID integer PRIMARY KEY,
-Description varchar(50)
-);
-CREATE TABLE Student_Sport (
-ID_Student integer,
-ID_Sport integer,
-PRIMARY KEY (ID_Student,ID_Sport),
-FOREIGN KEY (ID_Student) REFERENCES Student(ID),
-FOREIGN KEY (ID_Sport) REFERENCES Sport(ID)
-);
+CREATE TABLE IOUs (
+ fname CHAR(20),
+ lname CHAR(20),
+ amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ("Bob", "Smith", 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ("Sue", "Jones", 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ("Bob", "Smith", 30);
-INSERT INTO Student (ID,FirstName,LastName) VALUES (10,"Venus", "Williams");
-INSERT INTO Student (ID,FirstName,LastName) VALUES (11,"Fernando", "Alonso");
-INSERT INTO Student (ID,FirstName,LastName) VALUES (12,"David", "Villa");
-
-INSERT INTO Sport (ID, Description) VALUES (110,"Tennis");
-INSERT INTO Sport (ID, Description) VALUES (111,"Football");
-INSERT INTO Sport (ID, Description) VALUES (112,"Formula1");
-
-INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110);
-INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111);
-INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112);
-INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111);
+CREATE TABLE Lives (
+ fname CHAR(20),
+ lname CHAR(20),
+ city CHAR(20));
+INSERT INTO IOUs (fname, lname, amount) VALUES ("Bob", "Smith", "London");
+INSERT INTO IOUs (fname, lname, amount) VALUES ("Sue", "Jones", "Madrid");
+INSERT INTO IOUs (fname, lname, amount) VALUES ("Bob", "Smith", "London");
--- a/D012-2tables2duplicates0nulls/r2rmla.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D012-2tables2duplicates0nulls/r2rmla.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -5,11 +5,13 @@
@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
<TriplesMap1>
- a rr:TriplesMapClass;
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:tableName "IOUs" ];
+
rr:subjectMap [
rr:template "{fname}_{lname}_{amount}";
- rr:termtype "BlankNode";
+ rr:termtype rr:BlankNode;
rr:class ex:IOU;
];
@@ -18,7 +20,7 @@
rr:predicateMap [ rr:predicate foaf:name ];
rr:objectMap [
rr:template "{fname} {lname}";
- rr:termtype "Literal"
+ rr:termtype rr:Literal ;
]
];
@@ -27,8 +29,8 @@
rr:predicateMap [ rr:predicate ex:amount ];
rr:objectMap [
rr:column "amount";
- rr:termtype "Literal";
- rr:datatype xsd:float;
+ rr:termtype rr:Literal ;
+ rr:datatype xsd:float ;
]
];
.
\ No newline at end of file
--- a/D012-2tables2duplicates0nulls/r2rmlb.ttl Wed Jul 20 19:27:24 2011 +0100
+++ b/D012-2tables2duplicates0nulls/r2rmlb.ttl Wed Jul 20 20:47:37 2011 +0100
@@ -5,13 +5,13 @@
@base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
<TriplesMap1>
- a rr:TriplesMapClass;
- rr:tableName "IOUs"
- rr:tableOwner "alex"
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:tableName "IOUs" ];
+
rr:subjectMap [
rr:template "{fname}_{lname}";
- rr:termtype "BlankNode";
+ rr:termtype rr:BlankNode ;
rr:class ex:IOU;
];
@@ -20,18 +20,18 @@
rr:predicateMap [ rr:predicate foaf:name ];
rr:objectMap [
rr:template "{fname} {lname}";
- rr:termtype "Literal"
+ rr:termtype rr:Literal ;
]
];
.
<TriplesMap2>
- a rr:TriplesMapClass;
- rr:tableName "Lives"
- rr:tableOwner "alex"
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "Lives" ];
rr:subjectMap [
rr:template "{fname}_{lname}";
- rr:termtype "BlankNode";
+ rr:termtype rr:BlankNode;
rr:class ex:IOU;
];
@@ -40,7 +40,7 @@
rr:predicateMap [ rr:predicate ex:city ];
rr:objectMap [
rr:column "city";
- rr:termtype "Literal"
+ rr:termtype rr:Literal ;
]
];
.
\ No newline at end of file