Upload
nandana-mihindukulasooriya
View
464
Download
1
Embed Size (px)
DESCRIPTION
The W3C Linked Data Platform (LDP) candidate recommendation defines a standard HTTP-based protocol for read/write Linked Data. The W3C R2RML recommendation defines a language to map relational databases (RDBs) and RDF. This paper presents morph-LDP, a novel system that combines these two W3C standardization initiatives to expose relational data as read/write Linked Data for LDP-aware applications, whilst allowing legacy applications to continue using their relational databases.
Citation preview
morph-LDP: An R2RML-based
Linked Data Platform implementation
Nandana Mihindukulasooriya1,2, Freddy Priyatna2,
Oscar Corcho2, Raúl García Castro1,2, and Miguel Esteban Gutiérrez1,2
1Center for Open Middleware 2Ontology Engineering Group, Facultad de Informática
Universidad Politécnica de Madrid, Spain
{nmihindu,fpriyatna,ocorcho,rgarcia,mesteban}@fi.upm.es
Objective: To expose relational databases as read / write Linked Data applications
Challenges: (i) Converting RDB to RDF and vice versa; (ii) Exposing RDF as read/write Linked Data
Approach: Combining the W3C Linked Data Platform (LDP) and W3C R2RML standards
Linked Data Platform
morph-LDP Use Case and Solution
An example – Retrieving the list of group members
R2RML Mapping Language
LDP4j morph-RDB
http://example.org/oeg/members/fpriyatna
identifies
Registration
Office
morph-LDP
Web App
Relational
Database
Library
Legacy Applications
configures
exposes
consumes Tabulator
OpenLink Data Explorer
ldspider LDIF
represents
Freddy
Priyatna
dereferences toLDP Request
Handler
LDP4j
Template Matcher
Morph Proxy
Morph Engine
Query Translator
R2RML Processor
Data Translator
A set of rules for
generating RDF
triples from database
rows/values.
A RESTful protocol
for HTTP-based
read/write
Linked Data.
Sta
ndard
s
Impl.
http://ldp4j.org https://github.com/fpriyatna/morph
• An open-source R2RML Engine implementation
• Data and query translator
• Beyond the R2RML specification
• support for read / write access
• An open-source Java LDP implementation
• Middleware layer for building LDP applications
• Beyond the LDP specification
• support for vocabulary management
LDP Resource (LDPR)
Non-RDF
Source
(LDP-NR)
RDF Source (LDP-NR)
LDP Container (LDPC)
Basic Container
Direct Container
Indirect Container
GET /oeg/members/ HTTP/1.1
Host: example.org
Accept: text/turtle
200 OK
HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
ETag: W/"195482449"
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
<> a ldp:BasicContainer;
dcterms:title "Members of OEG, UPM";
ldp:contains <http://example.org/oeg/members/asun> ;
ldp:contains <http://example.org/oeg/members/fpriyatna> ;
ldp:contains <http://example.org/oeg/members/mesteban>;
ldp:contains <http://example.org/oeg/members/nmihindu>;
ldp:contains <http://example.org/oeg/members/ocorcho> ;
ldp:contains <http://example.org/oeg/members/rgarcia> .
HTTP Request
HTTP Response
Mapping LDP and R2RML Concepts
R2RML Mapping
TriplesMap
LogicalTable
PredicateObjectMap
PredicateMap
ObjectMap
SubjectMap
RefObjectMap
SELECT ?s WHERE { ?s a foaf:Person .
FILTER (REGEX(STR(?s), "^http://example.org/oeg/members/")) }
SPARQL Query 3
1
10
SELECT id FROM oegmembers
5 SQL
LDP Request Handler
Query Translator
HTTP Request
ResultSet
Data Translator
-http://example.org/oeg/members/asun
-http://example.org/oeg/members/fpriyatna
-http://example.org/oeg/members/mesteban
-http://example.org/oeg/members/nmihindu
-http://example.org/oeg/members/ocorcho
-http://example.org/oeg/members/rgarcia
LDP Request Handler
-asun
-fpriyatna
-mesteban
-nmihindu
-ocorcho
-rgarcia
1
HTTP Response
23
45
7
8
9
10
M
D
6
SQL Query
oegmembers
id fname lname website email phone asun Asunción Gómez Pérez http://delici.. [email protected] +34913367417
fpriyatna Freddy Priyatna http://delici.. fpriyatna@f +34913363670
mesteban Miguel Esteban Gutierrez http://delici.. mesteban@ +34913363671
nmihindu Nandana Mihindukulasoori http://www. nmihindu +34913363670
ocorcho Oscar Corcho http://delici.. ocorcho@ +34913366605
rgarcia Raul Garcia Castro http://delici.. rgarcia@fi +34913366596
D
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<TriplesMapPerson>
a rr:TriplesMap;
rr:logicalTable [ rr:tableName "oegmembers" ];
rr:subjectMap [ a rr:Subject; rr:class foaf:Person;
rr:template “http://example.org/oeg/members/{id}";
rr:termType rr:IRI; ];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant foaf:firstName ];
rr:objectMap [ rr:column “fname"; rr:termType rr:Literal; ]; ];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant foaf:lastName ];
rr:objectMap [ rr:column “lname"; rr:termType rr:Literal; ]; ];
…
M