introduction to w3c linked data platform

26
Introduction to W3C Linked Data Platform (LDP) Nandana Mihindukulasooriya, W3C Linked Data Platform WG, Ontology Engineering Group, Universidad Politécnica de Madrid, Spain. @ nandanamihindu LDAC 2016 - June 21 st , 2016 – Madrid, Spain

Upload: nandana-mihindukulasooriya

Post on 13-Jan-2017

312 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Introduction to W3C Linked Data Platform

Introduction to

W3C Linked Data Platform (LDP)

Nandana Mihindukulasooriya, W3C Linked Data Platform WG,

Ontology Engineering Group,Universidad Politécnica de Madrid,

Spain.

@nandanamihindu

LDAC 2016 - June 21st, 2016 – Madrid, Spain

Page 2: Introduction to W3C Linked Data Platform

2

From static web pages …

1991

Page 3: Introduction to W3C Linked Data Platform

3

To Web 2.0, Web APIs, etc …

2004

Page 4: Introduction to W3C Linked Data Platform

4

Linked Data

Linked Data principles

• Use URIs as names for things

• Use HTTP URIs so that people can look up those names

• When someone looks up a URI, provide useful information, using the standards (RDF*, SPARQL)

• Include links to other URIs, so that they can discover more things

Tim Berners-Lee. Linked data-design issues (2006) http://www. w3.org/DesignIssues/LinkedData.htmlLeo Sauermann and Richard Cyganiak. Cool URIs for the Semantic Web (2008) http://www.w3.org/TR/cooluris/Tom Heath and Christian Bizer. Linked Data: Evolving the Web into a Global Data Space (2011) http://linkeddatabook.com/

2006

Page 5: Introduction to W3C Linked Data Platform

5

Let’s see an example

FI - UPMBloque 5

GET /data/building/bloque3#it HTTP/1.1Host: fi.upm.es

HTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8Content-Length: 250

@prefix dc: <http://purl.org/dc/terms/> .@prefix dbo: <http://dbpedia.org/ontology/> .@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .@prefix ifc: <http://ifcowl.openbimstandards.org/IFC4#> .

<http://fi.upm.es/data/bloque3#it> a ifc:IfcBuilding; ifc:buildingAddress_IfcBuilding _:address; geo:long "-116.175869655195683"^^xsd:decimal ; geo:lat "43.544840771226816"^^xsd:decimal ; dbo:city <http://dbpedia.org/resource/Madrid>; dbo:owningOrganisation <http://fi.upm.es> .

(1)

(3)

(4)

(2) http://fi.upm.es/data/bloque3#it

Page 6: Introduction to W3C Linked Data Platform

6

Linked Data Platform 1.0 http://www.w3.org/2012/ldp/

• RESTful protocol for Read / Write Linked Data

• Extensions to HTTP protocol • Pagination, ordering, partial updates, introspection, creation factories, collections

• Standardization focused of interoperability

• Developed by W3C Linked Data Platform Working Group• 54 participants from 32 organizations

• Industry: IBM, Oracle, EMC, Fujitsu, OpenLink Software, Base22, …• Academia: Universidad Politécnica de Madrid, MIT, University of Oxford,

DERI, Université de Lyon, INRIA, …

• Progress:• W3C LDP WG created, 18 June 2012,• W3C Candidate Recommendation 19 June 2014,• W3C Proposed Recommendation 18 November 2014• W3C Recomendation, 26 February 2015 2012

Page 7: Introduction to W3C Linked Data Platform

7

Outcomes

Page 8: Introduction to W3C Linked Data Platform

8

LDP Implementations

• 22 implementations• https://www.w3.org/wiki/LDP_Implementations• https://www.w3.org/2012/ldp/hg/tests/reports/ldp.html

Page 9: Introduction to W3C Linked Data Platform

9

LDP4j

• Java-based framework for the development of read-write Linked Data applications• Motto: Focus on your business logic, we will take care of the rest• License: Apache License, v2.0

• Features:• Simplified business object handling:

• Lifting from and lowering to an intermediate representation that can be automatically unmarshalled from or marshalled to RDF, respectively.

• LDP support• Protocol conversation control• Transparent metadata management

• REST aware• Transparent publication of RDF URIRefs.

• HTTP compliant• The framework takes care of fulfilling the requirements prescribed by the HTTP

related RFCs (i.e., conditional requests processing, content negotiation, entity tag handling,…) www.ldp4j.org

https://github.com/ldp4j/ldp4j @LDP4j

[email protected]

Page 10: Introduction to W3C Linked Data Platform

10

Other related initiatives

• W3C Hydra Community Group• https://www.w3.org/community/hydra/

• W3C Read Write Web Community Group• https://www.w3.org/community/rww/

• W3C RDF Shapes Working Group• https://www.w3.org/2014/data-shapes/charter

• W3C Permissions & Obligations Expression Working Group• https://www.w3.org/2016/poe/charter

• WebID Community Group• https://www.w3.org/community/webid/

Page 11: Introduction to W3C Linked Data Platform

LDAC2016 11

What’s next?

Page 12: Introduction to W3C Linked Data Platform

LDP IN USELDP high-level overview

12

Page 13: Introduction to W3C Linked Data Platform

13

LDP Terminology

Page 14: Introduction to W3C Linked Data Platform

14

Common LDP scenarios

• Looking up a Linked Data resource • Paging

• Modifying a Linked Data resource• Creating Linked Data resources

• Basic Container / Direct Containers / Indirect containers

• Creating Linked Data Platform containers• Deleting a Linked Data resource

Page 15: Introduction to W3C Linked Data Platform

15

Looking up a Linked Data resource

• a simple HTTP GET with • additional guarantees

• LDP mandates some features that are optional in HTTP • e.g., e-tags, HEAD, OPTIONS

GET

200 OK

GET

Page 16: Introduction to W3C Linked Data Platform

16

LDP Paging

• Some resources are too large • Clients may not be able to handle the complete resource• Alternatives

• Server-driven• Client-driven

• Client preferences• max-triple-count, max-kbyte-count, max-member-count

• Page links• next, canonical, first, last,

Page 17: Introduction to W3C Linked Data Platform

17

Modifying a Linked Data resource

200 OK

PUT/PATCH

ETag: “123456789”

If-Match: W/'123456789'

GET

204 No Content

GET

Modify

• uses HTTP PUT or PATCH operations• encourages conditional requests to avoid “lost update”

problem

Page 18: Introduction to W3C Linked Data Platform

18

LDP Containers

• a special type of Linked Data resource that acts as • an enumeration of a collection of linked documents• a creation factory

• Handles resource management and clean up• Flexible and configurable• Three types of LDP containers

• Direct container• Direct container • Indirect container

Page 19: Introduction to W3C Linked Data Platform

19

LDP Basic Container - Creating an LDPR

Contact List<<Basic Container>>

Raul’sContact

Miguel’sContact

ldp:contains

ldp:contains

Fernando’sContact

POST

Page 20: Introduction to W3C Linked Data Platform

20

LDP Basic Container - Creating an LDPR

Raul’sContact

Miguel’sContact

ldp:contains

ldp:contains

Fernando’sContact

POST

Fernando’sContact

ldp:contains

Contact List<<Basic Container>>

Page 21: Introduction to W3C Linked Data Platform

LDP IN USELDP4j in practice

21

Page 22: Introduction to W3C Linked Data Platform

morph-LDP

22

• Exposes relational databases as read-write Linked Data

Oegmembers Table

id fname lname

asun Asunción Gómez Pérez

fpriyatna Freddy Priyatna

mesteban Miguel Estebam

nmihindu Nandana Mihindukulas

ocorcho Oscar Corcho

rgarcia Raul Garcia Castro

@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; ]; ];…

http://example.org/oeg/members/fpriyatna

RegistrationOffice

morph-LDP Web App

Relational Database

Library

Legacy Applications

configures

exposes

TabulatorOpenLink Data Explorer

ldspider LDIF

Freddy Priyatna

dereferences to

GET /oeg/members/ HTTP/1.1Host: example.orgAccept: text/turtle

200 OKHTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8Link: <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> .

Read-write LDMorph-LDPDatabase + R2RML mappings

Mihindukulasooriya, N., Priyatna, F., Corcho, O., Garcıa-Castro, R., Esteban-Gutiérrez, M.: morph-LDP: An R2RML-based Linked Data Platform implementation. Demo at the 11th Extended Semantic Web Conference, Crete, Greece (May 2014)

Page 23: Introduction to W3C Linked Data Platform

The Bugzilla LDP adapter

23

• Exposes Bugzilla as an LDP-enabled application

RDF HTTP Headers

LDP Clients

Bugzilla LDP Adapter

XML-RPC Native data model

ALM iStack ontology

POST /ita/containers/bugs HTTP/1.1Host: localhostContent-Type: text/turtle

@prefix ai: <http://delicias.dia.fi.upm.es/ontologies/alm-istack#> .

…rest of the namespace declarations are omitted for brevity.

<> a ai:ClientDefect;

dcterms:creator <http://localhost/ita/ldp/resources/users/9> ;

dcterms:title "Bugzilla adapter build is broken"^^xsd:string;

dcterms:description "Bugzilla adapter build fails due to a

test failure"^^xsd:string;

oslc_asset:relatedAsset <http://localhost/ita/ldp/resources/versions/16> ;

ai:relatedIncident <https://bugzilla.mozilla.org/show_bug.cgi?id=730698> .

HTTP/1.1 201 CreatedLocation: http://localhost/ita/ldp/resources/bugs/12Link: <http://www.w3.org/ns/ldp#Resource>; rel='type'Content-Length: 0

An example of bug creation

Mihindukulasooriya, N., Esteban-Gutiérrez, M., García-Castro, R.: A Linked Data Platform adapter for the Bugzilla issue tracker. Demo at the 13th International Semantic Web Conference, Riva del Garda, Italy (Oct 2014)

Page 24: Introduction to W3C Linked Data Platform

24

Smart Developer Hub

• integration of heterogeneous ALM tools and the provision of tool-independent metrics

Page 25: Introduction to W3C Linked Data Platform

25

References

• Linked Data Platform 1.0• http://www.w3.org/TR/ldp/

• Linked Data Platform 1.0 Primer• http://www.w3.org/TR/ldp-primer/

• Linked Data Platform Best Practices and Guidelines• http://www.w3.org/TR/ldp-bp/

• Linked Data Platform Paging 1.0• http://www.w3.org/TR/ldp-paging/

• Linked Data Patch Format• http://www.w3.org/TR/ldpatch/

Page 26: Introduction to W3C Linked Data Platform

Questions?

Nandana Mihindukulasooriya, W3C Linked Data Platform WG,

Ontology Engineering Group,Universidad Politécnica de Madrid,

Spain.

@nandanamihindu