--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/create.sql Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,21 @@
+CREATE TABLE DEPT (
+ deptno INTEGER UNIQUE,
+ dname VARCHAR(30),
+ loc VARCHAR(100));
+INSERT INTO DEPT (deptno, dname, loc) VALUES (10, "APPSERVER", "NEW YORK");
+
+CREATE TABLE EMP (
+ empno INTEGER PRIMARY KEY,
+ ename VARCHAR(100),
+ job VARCHAR(30),
+ deptno INTEGER REFERENCES DEPT (deptno),
+ etype VARCHAR(30));
+INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, "SMITH", "CLERK", 10, "PART_TIME");
+
+CREATE TABLE LIKES (
+ id INTEGER,
+ likeType VARCHAR(30),
+ likedObj VARCHAR(100));
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, "Playing", "Soccer");
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, "Watching", "Basketball");
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/manifest.ttl Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,73 @@
+@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/> .
+
+<d014> a rdb2rdftest:DataBase;
+ dcterms:title "3 tables extended example" ;
+ dcterms:identifier "D014-3tablesExample" ;
+ rdb2rdftest:sqlScriptFile "create.sql";
+ rdb2rdftest:relatedTestCase <tc0014a> ;
+ rdb2rdftest:relatedTestCase <tc0014b> ;
+ rdb2rdftest:relatedTestCase <tc0014c> ;
+ rdb2rdftest:relatedTestCase <tc0014d> ;
+ rdb2rdftest:relatedTestCase <tc0014e> ;
+.
+
+<tc0014a> a rdb2rdftest:R2RML ;
+ dcterms:title "3 tables extended example" ;
+ dcterms:identifier "R2RMLTC014a" ;
+ test:purpose "Tests a logicaltable with sqlQuery" ;
+ test:specificationReference "#dfn-output-dataset" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappeda.nq" ;
+ rdb2rdftest:mappingDocument "r2rmla.ttl" ;
+.
+
+<tc0014b> a rdb2rdftest:R2RML ;
+ dcterms:title "3 tables extended example" ;
+ dcterms:identifier "R2RMLTC014b" ;
+ test:purpose "Mapping specification using SQL-based logical table definition" ;
+ test:specificationReference "#dfn-output-dataset" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput true ;
+ rdb2rdftest:output "mappedb.nq" ;
+ rdb2rdftest:mappingDocument "r2rmlb.ttl" ;
+.
+
+<tc0014c> a rdb2rdftest:R2RML ;
+ dcterms:title "3 tables extended example" ;
+ dcterms:identifier "R2RMLTC014c" ;
+ test:purpose "Mapping specification using table name based logical table definition" ;
+ test:specificationReference "#dfn-output-dataset" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput false ;
+ rdb2rdftest:mappingDocument "r2rmlc.ttl" ;
+.
+
+<tc0014d> a rdb2rdftest:R2RML ;
+ dcterms:title "3 tables extended example" ;
+ dcterms:identifier "R2RMLTC014d" ;
+ test:purpose "Mapping specification showing reuse of ObjectMap elements" ;
+ test:specificationReference "#dfn-output-dataset" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput false ;
+ rdb2rdftest:mappingDocument "r2rmld.ttl" ;
+.
+
+<tc0014e> a rdb2rdftest:R2RML ;
+ dcterms:title "3 tables extended example" ;
+ dcterms:identifier "R2RMLTC014e" ;
+ test:purpose "Mapping Specification for the LIKES Table" ;
+ test:specificationReference "#dfn-output-dataset" ;
+ test:reviewStatus test:unreviewed ;
+ rdb2rdftest:database <d014> ;
+ rdb2rdftest:hasExpectedOutput false ;
+ rdb2rdftest:mappingDocument "r2rmld.ttl" ;
+.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/mappeda.nq Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,5 @@
+_:Department10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#dept> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#deptno> "10"^^<http://www.w3.org/2001/XMLSchema#positiveInteger> <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#name> "APPSERVER" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#location> "NEW YORK" <http://example.com/ns#DeptGraph> .
+_:Department10 <http://example.com/dept#COMPANY> "EXAMPLE Corporation" <http://example.com/ns#DeptGraph> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/mappedb.nq Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,12 @@
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#emp> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#jobtype> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#emptype> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#empno> "7369"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#job> "CLERK" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#deptNum> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#etype> "PART TIME" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#c_ref_deptno> _:Department10 <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/emp#empNameGraph> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/mappedc.nq Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,12 @@
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#emp> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#jobtype> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#emptype> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#empno> "7369"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#job> "CLERK" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#deptNum> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#etype> "PART TIME" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#c_ref_deptno> _:Department10 <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/emp#empNameGraph> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/mappedd.nq Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,12 @@
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ns#emp> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#jobtype> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/job/CLERK> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#emptype> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/emp/etype/PART_TIME> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#empno> "7369"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#job> "CLERK" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#deptNum> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#etype> "PART TIME" <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#c_ref_deptno> _:Department10 <http://example.com/graph/CLERK/PART_TIME> .
+<http://example.com/emp/7369> <http://example.com/emp#name> "SMITH" <http://example.com/emp#empNameGraph> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/mappede.nq Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,2 @@
+<http://example.com/emp/7369> <http://example.com/emp/likes/Playing> "Soccer" <http://example.com/ns#LikesGraph> .
+<http://example.com/emp/7369> <http://example.com/emp/likes/Watching> "Basketball" <http://example.com/ns#LikesGraph> .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/r2rmla.ttl Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,47 @@
+@prefix rr: <http://www.w3.org/ns/r2rml#> .
+@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/> .
+
+<TriplesMap1>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('Department' || "deptno") AS "deptId"
+ , "deptno"
+ , "dname"
+ , "loc"
+ from SCOTT.DEPT
+ """ ];
+
+ rr:subjectMap [ rr:column "deptId"; rr:termType rr:BlankNode;
+ rr:class ex:dept;
+ rr:graphMap [ rr:graph ex:DeptGraph; ];
+ rr:inverseExpression "{deptno} = substr({deptId},length('Department')+1)"];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate dept:deptno ];
+ rr:objectMap [ rr:column "deptno"; rr:datatype xsd:positiveInteger ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate dept:name ];
+ rr:objectMap [ rr:column "dname" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate dept:location ];
+ rr:objectMap [ rr:column "loc" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate dept:COMPANY ];
+ rr:objectMap [ rr:object "EXAMPLE Corporation" ]
+ ]
+.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/r2rmlb.ttl Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,94 @@
+@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/> .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('http://example.com/emp/' || "empno") AS "empURI"
+ , "empno"
+ , "ename"
+ , ('http://example.com/emp/job/'|| "job") AS "jobTypeURI"
+ , "job"
+ , "deptno"
+ , ('http://example.com/emp/etype/'|| "etype") AS "empTypeURI"
+ , "etype"
+ , ('http://example.com/graph/'|| "job" || '/' || "etype") AS "graphURI"
+ from SCOTT.EMP
+ """ ];
+
+ rr:subjectMap [ rr:column "empURI";
+ rr:class ex:emp;
+ rr:graphMap [ rr:column "graphURI" ]; ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:jobtype ];
+ rr:objectMap [ rr:column "jobTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate rdf:type ];
+ rr:objectMap [ rr:column "jobTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:emptype ];
+ rr:objectMap [ rr:column "empTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [rdf:predicate rdf:type ];
+ rr:objectMap [ rr:column "empTypeURI" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:empno ];
+ rr:objectMap [ rr:column "empno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:name ];
+ rr:objectMap [ rr:column "ename" ];
+ rr:graphMap [ rr:graph emp:empNameGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:job ];
+ rr:objectMap [ rr:column "job" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:deptNum ];
+ rr:objectMap [ rr:column "deptno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:etype ];
+ rr:objectMap [ rr:column "etype" ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:predicate emp:c_ref_deptno ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <#TriplesMap1>;
+ rr:joinCondition [
+ rr:child "deptno";
+ rr:parent "deptno";
+ ];
+ ];
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/r2rmlc.ttl Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,85 @@
+@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/> .
+
+<TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "SCOTT.EMP" ];
+
+ rr:subjectMap [ rr:template "http://example.com/emp/{empno}";
+ rr:class ex:emp;
+ rr:graphMap [ rr:template "http://example.com/graph/{job}/{etype}"; ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:jobtype ];
+ rr:objectMap [ rr:template "http://example.com/emp/job/{job}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate rdf:type ];
+ rr:objectMap [ rr:template "http://example.com/emp/job/{job}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:emptype ];
+ rr:objectMap [ rr:template "http://example.com/emp/etype/{etype}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate rdf:type ];
+ rr:objectMap [ rr:template "http://example.com/emp/etype/{etype}" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:empno ];
+ rr:objectMap [ rr:column "empno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:name ];
+ rr:objectMap [ rr:column "ename" ];
+ rr:graphMap [ rr:graph emp:empNameGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:job ];
+ rr:objectMap [ rr:column "job" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:deptNum ];
+ rr:objectMap [ rr:column "deptno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:etype ];
+ rr:objectMap [ rr:column "etype" ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:predicate emp:c_ref_deptno ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <#TriplesMap1>;
+ rr:joinCondition [
+ rr:child "deptno";
+ rr:parent "deptno";
+ ];
+ ];
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/r2rmld.ttl Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,95 @@
+@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/> .
+
+<#jobtypeObjectMap>
+ a rr:ObjectMap;
+ rr:template "http://example.com/emp/job/{job}"
+ .
+
+<#emptypeObjectMap>
+ a rr:ObjectMap;
+ rr:template "http://example.com/emp/etype/{etype}"
+ .
+
+<#TriplesMap2>
+ a rr:TriplesMap;
+
+ rr:logicalTable [ rr:tableName "SCOTT.EMP" ];
+
+ rr:subjectMap [ rr:template "http://example.com/emp/{empno}";
+ rr:class ex:emp;
+ rr:graphMap [ rr:template "http://example.com/graph/{job}/{etype}"; ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:jobtype ];
+ rr:objectMap <#jobtypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate rdf:type ];
+ rr:objectMap <#jobtypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:emptype ];
+ rr:objectMap <#emptypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate rdf:type ];
+ rr:objectMap <#emptypeObjectMap>
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:empno ];
+ rr:objectMap [ rr:column "empno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:name ];
+ rr:objectMap [ rr:column "ename" ];
+ rr:graphMap [ rr:graph emp:empNameGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:job ];
+ rr:objectMap [ rr:column "job" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:deptNum ];
+ rr:objectMap [ rr:column "deptno" ]
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:predicate emp:etype ];
+ rr:objectMap [ rr:column "etype" ]
+ ];
+
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:predicate emp:c_ref_deptno ];
+ rr:refObjectMap [
+ rr:parentTriplesMap <#TriplesMap1>;
+ rr:joinCondition [
+ rr:child "deptno";
+ rr:parent "deptno";
+ ];
+ ];
+ ]
+ .
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/D014-3tablesExample/r2rmle.ttl Mon Jul 25 13:05:52 2011 +0100
@@ -0,0 +1,29 @@
+@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/> .
+
+<TriplesMap3>
+ a rr:TriplesMap;
+ rr:logicalTable [ rr:sqlQuery """
+ Select ('http://example.com/emp/' || "id") AS "empId"
+ , ('http://example.com/emp/likes/' || "likeType") AS "empLikes"
+ , "likedObj"
+ from SCOTT.LIKES
+ """ ];
+
+ rr:subjectMap [
+ rr:column "empId";
+ rr:graphMap [ rr:graph ex:LikesGraph ];
+ ];
+
+ rr:predicateObjectMap
+ [
+ rr:predicateMap [ rr:column "empLikes" ];
+ rr:objectMap [ rr:column "likedObj" ]
+ ]
+ .
\ No newline at end of file