SlideShare a Scribd company logo
Describing LDP Applications
with the Hydra Core Vocabulary
Nandana Mihindukulasooriya, and Raúl García-Castro
Ontology Engineering Group (OEG)
Facultad de Informática
Universidad Politécnica de Madrid
Linked Data Platform 1.0
2Nandana Mihindukulasooriya, OEG
An example application
3Nandana Mihindukulasooriya, OEG
• An address book – for managing contacts
• Contacts
• Create, List, Update, Delete
• User
• Retrieve
Alice
<<user>>
Alice’s
Address Book Alice’s
Contacts
Address Book
4Nandana Mihindukulasooriya, OEG
Address Book
Application
Address Book
Client
Domain Model
5Nandana Mihindukulasooriya, OEG
AddressBook Contact
•email
•fullName
•telephone
•url
User
•name •title
Schema Restrictions
• Data types
• Cardinalities
LDP Model
6Nandana Mihindukulasooriya, OEG
«BasicContainer»
AddressBook
/{personId}/contacts/
«LDPResource»
Contact
ldp:contains
/{personId}/contacts/{contactId}
«LDPResource»
User
/{personId}/
foaf:
primaryTopic
vcard:Email
vcard:Voice
rdfs:Resource
vcard:hasURL
xsd:string
vcard:hasEmail
vcard:hasTelephone
vcard:fn
xsd:string
foaf:name
Application
7Nandana Mihindukulasooriya, OEG
Address Book
Application
Address Book
Client
LDP Container - GET
8Nandana Mihindukulasooriya, OEG
GET /alice/contacts/ HTTP/1.1
Host: example.org
Accept: text/turtle
HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type',
<http://www.w3.org/ns/ldp#Resource>; rel='type’
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: text/turtle, application/ld+json
Content-Length: 250
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dc: <http://example.org/vocab#> .
<http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
LDP Container - GET
9Nandana Mihindukulasooriya, OEG
GET /alice/contacts/ HTTP/1.1
Host: example.org
Accept: text/turtle
HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type',
<http://www.w3.org/ns/ldp#Resource>; rel='type’
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: text/turtle
Content-Length: 250
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dc: <http://example.org/vocab#> .
<http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
supports LDP Basic Container interactions
LDP Container - GET
10Nandana Mihindukulasooriya, OEG
GET /alice/contacts/ HTTP/1.1
Host: example.org
Accept: text/turtle
HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type',
<http://www.w3.org/ns/ldp#Resource>; rel='type’
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: text/turtle, application/ld+json
Content-Length: 250
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dc: <http://example.org/vocab#> .
<http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
supports the mentioned HTTP operations on this resource
LDP Container - GET
11Nandana Mihindukulasooriya, OEG
GET /alice/contacts/ HTTP/1.1
Host: example.org
Accept: text/turtle
HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type',
<http://www.w3.org/ns/ldp#Resource>; rel='type’
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: text/turtle, application/ld+json
Content-Length: 250
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dc: <http://example.org/vocab#> .
<http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
Turtle and JSON-LD media types are accepted on POST
12Nandana Mihindukulasooriya, OEG
http://kristenbloggen.net/wp-content/uploads/good.jpg
LDP Container - POST
13Nandana Mihindukulasooriya, OEG
POST /nandana/contacts/ HTTP/1.1
Host: example.org
Slug: jane
Link: <http://www.w3.org/ns/ldp#Resource>; rel='type'
Content-Type: text/turtle
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
< > a ex:Contact, vcard:Individual;
vcard:hasURL <http://example.org/jane#me> ;
vcard:hasEmail <mailto:jane@example.com>;
vcard:fn “Jane Doe";
vcard:hasTelephone [ a vcard:Home, vcard:Voice;
vcard:hasValue <tel:+34655555555> ] .
expected Input
(vocabulary,
cardinalities)
supports Slug header
LDP Container - GET
14Nandana Mihindukulasooriya, OEG
GET /alice/contacts/ HTTP/1.1
Host: example.org
Accept: text/turtle
HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type',
<http://www.w3.org/ns/ldp#Resource>; rel='type’
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: text/turtle, application/ld+json
Accept-Patch: text/ldpatch
Content-Length: 250
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dc: <http://example.org/vocab#> .
<http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
Hypermedia controls
15Nandana Mihindukulasooriya, OEG
http://www.teresacommunicates.com/wp-content/uploads/2014/01/i-can-do-this.jpg
LDP Container - GET
16Nandana Mihindukulasooriya, OEG
GET /alice/contacts/ HTTP/1.1
Host: example.org
Accept: application/vnd.ldp.addressbook+turtle
HTTP/1.1 200 OK
Content-Type: application/vnd.ldp.addressbook+turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type',
<http://www.w3.org/ns/ldp#Resource>; rel='type’
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: application/vnd.ldp.contact+turtle;
Accept-Patch: text/ldpatch
Content-Length: 250
@prefix ldp: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dc: <http://example.org/vocab#> .
<http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
LDP Container V1 - GET
17Nandana Mihindukulasooriya, OEG
GET /alice/contacts/ HTTP/1.1
Host: example.org
Accept: application/vnd.ldp.addressbook.v1+turtle
HTTP/1.1 200 OK
Content-Type: application/vnd.ldp.addressbook.v1+turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type',
<http://www.w3.org/ns/ldp#Resource>; rel='type’
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: application/vnd.ldp.contact.v1+turtle;
Accept-Patch: text/ldpatch
Content-Length: 250
@prefix ldp: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dc: <http://example.org/vocab#> .
<http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
18Nandana Mihindukulasooriya, OEG
Hydra Core Vocabulary
19Nandana Mihindukulasooriya, OEG
LDP Container – GET /w Hydra API Link relation
20Nandana Mihindukulasooriya, OEG
HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=“type”,
<http://www.w3.org/ns/ldp#Resource>; rel=“type”
Link: <http://example.com/doc/>;
rel="http://www.w3.org/ns/hydra/core#apiDocumentation"
ETag: W/'123456711'
Allow: OPTIONS, HEAD, GET, POST
Accept-Post: text/turtle, application/ld+json
Accept-Patch: text/ldpatch
Content-Length: 250
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dc: <http://purl.org/dc/terms/> .
<http://example.org/contacts/> a ldp:BasicContainer;
foaf:primaryTopic <http://example.org/alice>;
ldp:contains <bob>, <jim> .
API Documentation
21Nandana Mihindukulasooriya, OEG
{
"@context": [
"http://www.w3.org/ns/hydra/context.jsonld",
{…}
],
"@id": "http://example.org/docs/",
"@type": "ApiDocumentation",
"title": "LDP Address Book API",
"entrypoint": "http://example.org/contacts/",
"supportedClass": [
{
"@id": "ex:AddressBook",
"@type": "hydra:Class",
"subClassOf": "ldp:BasicContainer",
"label": "An example address book",
…
},
….
],
…
API Documentation
22Nandana Mihindukulasooriya, OEG
{
"supportedClass": [
{
"@id": "ex:AddressBook",
"@type": "hydra:Class",
"subClassOf": "ldp:BasicContainer",
"label": "An example address book",
"supportedOperation": [
{
"@id": "_:create_new_contact",
"@type": "hydra:Operation",
"method": "POST",
"label": "creates a new contact in the address book",
"description": null,
"expects": “ex:Contact",
"returns": null,
"statusCodes": [
…
]
},
API Documentation
23Nandana Mihindukulasooriya, OEG
{
"supportedClass": [
{
"@id": "ex:AddressBook",
"@type": "hydra:Class",
"subClassOf": "ldp:BasicContainer",
"label": "An example address book",
"supportedOperation": [
{
"@id": "_:create_new_contact",
"@type": "hydra:Operation",
"method": "POST",
"label": "creates a new contact in the address book",
"description": null,
"expects": “ex:Contact",
"returns": null,
"statusCodes": [
…
]
},
API Documentation
24Nandana Mihindukulasooriya, OEG
{
"supportedClass": [
…..
{
"@id": "ex:Contact",
"@type": "hydra:Class",
"subClassOf": “vcard:Individual",
"label": “A contact",
" supportedProperty": [
{
"property": “vcard:hasEmail",
"hydra:title": “Email”,
"hydra:description": “Email of the contact",
"required": true,
"readable": true,
"writable": false,
},
Potential Conflicts
• Similar concepts in LDP and Hydra
• LDP Containers Vs Hydra Collections
• LDP Paging Vs Hydra Paged Collections
25Nandana Mihindukulasooriya, OEG
Collections vs Containers
26Nandana Mihindukulasooriya, OEG
@prefix hydra: <http://www.w3.org/ns/hydra/core#>
<http://example.org/alice/contacts> a hydra:Collection ;
hydra:member <http://example.org/alice/contacts/bob>,
<http://example.org/alice/contacts/jane> .
• Hydra Collection
• LDP Container
@prefix ldp: <http://www.w3.org/ns/ldp#> .
<http://example.org/alice/contacts> a ldp:BasicContainer ;
ldp:contains <http://example.org/alice/contacts/bob>,
<http://example.org/alice/contacts/jane> .
Hydra collection as an LDP Direct Container
27Nandana Mihindukulasooriya, OEG
@prefix hydra: <http://www.w3.org/ns/hydra/core#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
<http://example.org/alice/contacts> a hydra:Collection, ldp:DirectContainer;
ldp:membershipResource <>;
ldp:hasMemberRelation hydra:member;
ldp:contains <http://example.org/alice/contacts/bob>,
<http://example.org/alice/contacts/jane> ;
hydra:member <http://example.org/alice/contacts/bob>,
<http://example.org/alice/contacts/jane> ;
LDP Paging
28Nandana Mihindukulasooriya, OEG
GET /nandana?page2 HTTP/1.1
Host: example.org
Accept: text/turtle
Prefer: return=representation; max-triple-count="500"
HTTP/1.1 200 OK
Content-Type: text/turtle
ETag: "_87e52ce291112"
Link: <http://www.w3.org/ns/ldp#Resource>; rel="type",
<http://www.w3.org/ns/ldp#Page>; rel="type"
Link: <http://example.org/alice/contacts?p=3>; rel="next"
Link: <http://example.org/alice/contacts>; rel="canonical"; etag="_87e5"
Link: <http://example.org/alice/contacts?page1>; rel="first"
Link: <http://example.org/alice/contacts?p=4>; rel="last"
Link: <http://example.org/alice/contacts?page1>; rel="prev"
Allow: GET,OPTIONS,HEAD
Hydra PagedCollection
29Nandana Mihindukulasooriya, OEG
@prefix hydra: <http://www.w3.org/ns/hydra/core#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
{
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
"@id": "http://example.org/alice/contacts?page=3",
"@type": "PagedCollection",
"totalItems": “50",
"itemsPerPage": "10",
"firstPage": "http://example.org/alice/contacts?page=1",
"nextPage": " http://example.org/alice/contacts?page=4",
"previousPage": "http://example.org/alice/contacts?page=2",
"lastPage": "http://example.org/alice/contacts?page=5",
"member": [
... the members of this PagedCollection ...
]
}
Conclusions
• LDP needs mechanisms for vocabulary and
affordance discovery
• Hydra Core vocabulary can be used describe LDP
application
• Why not just Hydra?
• There are overlaps in some areas
• Overlaps with the W3C RDF Shapes WG
30Nandana Mihindukulasooriya, OEG

More Related Content

PPTX
Introduction to W3C Linked Data Platform
PPTX
Learning W3C Linked Data Platform with examples
PPTX
Introduction to Linked Data Platform (LDP)
PPTX
LDP4j: A framework for the development of interoperable read-write Linked Da...
PPTX
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...
PDF
WWW2014 Overview of W3C Linked Data Platform 20140410
PPT
W3C Linked Data Platform Overview
PPTX
REST meets Semantic Web
Introduction to W3C Linked Data Platform
Learning W3C Linked Data Platform with examples
Introduction to Linked Data Platform (LDP)
LDP4j: A framework for the development of interoperable read-write Linked Da...
Linked Data (in low-resource) Platforms: a mapping for Constrained Applicatio...
WWW2014 Overview of W3C Linked Data Platform 20140410
W3C Linked Data Platform Overview
REST meets Semantic Web

What's hot (20)

PPTX
Scaling up Linked Data
PDF
Crossref XML and tools for small publishers (EASE Conference 2018)
PDF
Approaching Join Index: Presented by Mikhail Khludnev, Grid Dynamics
PPTX
Querying Linked Data
PPTX
PPT
Do the LOCAH-Motion: How to Make Bibliographic and Archival Linked Data
PDF
morph-LDP: An R2RML-based Linked Data Platform implementation
PPTX
Application integration with the W3C Linked Data standards
PPTX
Technical Background
ODP
DC-2008 Tutorial 3 - Dublin Core and other metadata schemas
ODP
Slug: A Semantic Web Crawler
PPTX
The Semantic Web #4 - RDF (1)
PPT
Open for Business Open Archives, OpenURL, RSS and the Dublin Core
PPT
Open for Business - Open Archives, OpenURL, RSS and the Dublin Core
PPTX
Introduction to Web Services
PPTX
Approaching Join Index - Lucene/Solr Revolution 2014
PPT
Linked data and voyager
PDF
Mikhail khludnev: approaching-join index for lucene
PDF
Poster GraphQL-LD: Linked Data Querying with GraphQL
PPT
2007 03 12 Swecr 2
Scaling up Linked Data
Crossref XML and tools for small publishers (EASE Conference 2018)
Approaching Join Index: Presented by Mikhail Khludnev, Grid Dynamics
Querying Linked Data
Do the LOCAH-Motion: How to Make Bibliographic and Archival Linked Data
morph-LDP: An R2RML-based Linked Data Platform implementation
Application integration with the W3C Linked Data standards
Technical Background
DC-2008 Tutorial 3 - Dublin Core and other metadata schemas
Slug: A Semantic Web Crawler
The Semantic Web #4 - RDF (1)
Open for Business Open Archives, OpenURL, RSS and the Dublin Core
Open for Business - Open Archives, OpenURL, RSS and the Dublin Core
Introduction to Web Services
Approaching Join Index - Lucene/Solr Revolution 2014
Linked data and voyager
Mikhail khludnev: approaching-join index for lucene
Poster GraphQL-LD: Linked Data Querying with GraphQL
2007 03 12 Swecr 2
Ad

Similar to Describing LDP Applications with the Hydra Core Vocabulary (7)

PPTX
Best of Marketing
PDF
Introduction to LDP in Apache Marmotta
PPTX
JavaOne2013 Leveraging Linked Data and OSLC
PPT
Deploying RDF Linked Data via Virtuoso Universal Server
KEY
I got 99 problems, but ReST ain't one
KEY
Creating web applications with LODSPeaKr
PDF
Semantic Web & TYPO3
Best of Marketing
Introduction to LDP in Apache Marmotta
JavaOne2013 Leveraging Linked Data and OSLC
Deploying RDF Linked Data via Virtuoso Universal Server
I got 99 problems, but ReST ain't one
Creating web applications with LODSPeaKr
Semantic Web & TYPO3
Ad

More from Nandana Mihindukulasooriya (20)

PPTX
A Framework for Linked Data Quality based on Data Profiling and RDF Shape Ind...
PPTX
Leveraging Semantic Parsing for Relation Linking over Knowledge Bases
PPTX
ISWC 2020 - Semantic Answer Type Prediction
PDF
Fitur - HackaTrips 2018!
PDF
A Distributed Transaction Model for Read-Write Linked Data Applications
PDF
Repairing Hidden Links in Linked Data
PPTX
Loupe API - A Linked Data Profiling Service for Quality Assessment
PDF
Research Poster Design
PPTX
Collaborative Ontology Evolution and Data Quality - An Empirical Analysis
PPTX
Erasmus+ promotional event - Kandy, Sri Lanka
PPTX
Loupe model - Use Cases and Requirements
PPTX
4V - WP3 Progress Report (TIN2013-46238)
PPTX
A Two-Fold Quality Assurance Approach for Dynamic Knowledge Bases : The 3cixt...
PPTX
An analysis of the quality issues of the properties available in the Spanish ...
PPTX
Linked data platform adapter for bugzilla poster
PPTX
Linked Data Platform as a novel approach for Enterprise Application Integra...
PPTX
ALM iStack - Application Lifecycle Management using Linked Data
PPTX
PPTX
Erasmus Mundus - Overview, Opportunities, and Details
A Framework for Linked Data Quality based on Data Profiling and RDF Shape Ind...
Leveraging Semantic Parsing for Relation Linking over Knowledge Bases
ISWC 2020 - Semantic Answer Type Prediction
Fitur - HackaTrips 2018!
A Distributed Transaction Model for Read-Write Linked Data Applications
Repairing Hidden Links in Linked Data
Loupe API - A Linked Data Profiling Service for Quality Assessment
Research Poster Design
Collaborative Ontology Evolution and Data Quality - An Empirical Analysis
Erasmus+ promotional event - Kandy, Sri Lanka
Loupe model - Use Cases and Requirements
4V - WP3 Progress Report (TIN2013-46238)
A Two-Fold Quality Assurance Approach for Dynamic Knowledge Bases : The 3cixt...
An analysis of the quality issues of the properties available in the Spanish ...
Linked data platform adapter for bugzilla poster
Linked Data Platform as a novel approach for Enterprise Application Integra...
ALM iStack - Application Lifecycle Management using Linked Data
Erasmus Mundus - Overview, Opportunities, and Details

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
A Presentation on Artificial Intelligence
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Big Data Technologies - Introduction.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
A Presentation on Artificial Intelligence
“AI and Expert System Decision Support & Business Intelligence Systems”
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
Big Data Technologies - Introduction.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation_ Review paper, used for researhc scholars
KodekX | Application Modernization Development

Describing LDP Applications with the Hydra Core Vocabulary

  • 1. Describing LDP Applications with the Hydra Core Vocabulary Nandana Mihindukulasooriya, and Raúl García-Castro Ontology Engineering Group (OEG) Facultad de Informática Universidad Politécnica de Madrid
  • 2. Linked Data Platform 1.0 2Nandana Mihindukulasooriya, OEG
  • 3. An example application 3Nandana Mihindukulasooriya, OEG • An address book – for managing contacts • Contacts • Create, List, Update, Delete • User • Retrieve Alice <<user>> Alice’s Address Book Alice’s Contacts
  • 4. Address Book 4Nandana Mihindukulasooriya, OEG Address Book Application Address Book Client
  • 5. Domain Model 5Nandana Mihindukulasooriya, OEG AddressBook Contact •email •fullName •telephone •url User •name •title Schema Restrictions • Data types • Cardinalities
  • 6. LDP Model 6Nandana Mihindukulasooriya, OEG «BasicContainer» AddressBook /{personId}/contacts/ «LDPResource» Contact ldp:contains /{personId}/contacts/{contactId} «LDPResource» User /{personId}/ foaf: primaryTopic vcard:Email vcard:Voice rdfs:Resource vcard:hasURL xsd:string vcard:hasEmail vcard:hasTelephone vcard:fn xsd:string foaf:name
  • 7. Application 7Nandana Mihindukulasooriya, OEG Address Book Application Address Book Client
  • 8. LDP Container - GET 8Nandana Mihindukulasooriya, OEG GET /alice/contacts/ HTTP/1.1 Host: example.org Accept: text/turtle HTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type’ ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: text/turtle, application/ld+json Content-Length: 250 @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix dc: <http://purl.org/dc/terms/> . @prefix dc: <http://example.org/vocab#> . <http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> .
  • 9. LDP Container - GET 9Nandana Mihindukulasooriya, OEG GET /alice/contacts/ HTTP/1.1 Host: example.org Accept: text/turtle HTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type’ ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: text/turtle Content-Length: 250 @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix dc: <http://purl.org/dc/terms/> . @prefix dc: <http://example.org/vocab#> . <http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> . supports LDP Basic Container interactions
  • 10. LDP Container - GET 10Nandana Mihindukulasooriya, OEG GET /alice/contacts/ HTTP/1.1 Host: example.org Accept: text/turtle HTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type’ ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: text/turtle, application/ld+json Content-Length: 250 @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix dc: <http://purl.org/dc/terms/> . @prefix dc: <http://example.org/vocab#> . <http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> . supports the mentioned HTTP operations on this resource
  • 11. LDP Container - GET 11Nandana Mihindukulasooriya, OEG GET /alice/contacts/ HTTP/1.1 Host: example.org Accept: text/turtle HTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type’ ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: text/turtle, application/ld+json Content-Length: 250 @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix dc: <http://purl.org/dc/terms/> . @prefix dc: <http://example.org/vocab#> . <http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> . Turtle and JSON-LD media types are accepted on POST
  • 13. LDP Container - POST 13Nandana Mihindukulasooriya, OEG POST /nandana/contacts/ HTTP/1.1 Host: example.org Slug: jane Link: <http://www.w3.org/ns/ldp#Resource>; rel='type' Content-Type: text/turtle @prefix vcard: <http://www.w3.org/2006/vcard/ns#> . < > a ex:Contact, vcard:Individual; vcard:hasURL <http://example.org/jane#me> ; vcard:hasEmail <mailto:jane@example.com>; vcard:fn “Jane Doe"; vcard:hasTelephone [ a vcard:Home, vcard:Voice; vcard:hasValue <tel:+34655555555> ] . expected Input (vocabulary, cardinalities) supports Slug header
  • 14. LDP Container - GET 14Nandana Mihindukulasooriya, OEG GET /alice/contacts/ HTTP/1.1 Host: example.org Accept: text/turtle HTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type’ ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: text/turtle, application/ld+json Accept-Patch: text/ldpatch Content-Length: 250 @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix dc: <http://purl.org/dc/terms/> . @prefix dc: <http://example.org/vocab#> . <http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> . Hypermedia controls
  • 16. LDP Container - GET 16Nandana Mihindukulasooriya, OEG GET /alice/contacts/ HTTP/1.1 Host: example.org Accept: application/vnd.ldp.addressbook+turtle HTTP/1.1 200 OK Content-Type: application/vnd.ldp.addressbook+turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type’ ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: application/vnd.ldp.contact+turtle; Accept-Patch: text/ldpatch Content-Length: 250 @prefix ldp: <http://xmlns.com/foaf/0.1/> . @prefix dc: <http://purl.org/dc/terms/> . @prefix dc: <http://example.org/vocab#> . <http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> .
  • 17. LDP Container V1 - GET 17Nandana Mihindukulasooriya, OEG GET /alice/contacts/ HTTP/1.1 Host: example.org Accept: application/vnd.ldp.addressbook.v1+turtle HTTP/1.1 200 OK Content-Type: application/vnd.ldp.addressbook.v1+turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel='type', <http://www.w3.org/ns/ldp#Resource>; rel='type’ ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: application/vnd.ldp.contact.v1+turtle; Accept-Patch: text/ldpatch Content-Length: 250 @prefix ldp: <http://xmlns.com/foaf/0.1/> . @prefix dc: <http://purl.org/dc/terms/> . @prefix dc: <http://example.org/vocab#> . <http://example.org/contacts/> a ex:AddressBook, ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> .
  • 19. Hydra Core Vocabulary 19Nandana Mihindukulasooriya, OEG
  • 20. LDP Container – GET /w Hydra API Link relation 20Nandana Mihindukulasooriya, OEG HTTP/1.1 200 OK Content-Type: text/turtle; charset=UTF-8 Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=“type”, <http://www.w3.org/ns/ldp#Resource>; rel=“type” Link: <http://example.com/doc/>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation" ETag: W/'123456711' Allow: OPTIONS, HEAD, GET, POST Accept-Post: text/turtle, application/ld+json Accept-Patch: text/ldpatch Content-Length: 250 @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix dc: <http://purl.org/dc/terms/> . <http://example.org/contacts/> a ldp:BasicContainer; foaf:primaryTopic <http://example.org/alice>; ldp:contains <bob>, <jim> .
  • 21. API Documentation 21Nandana Mihindukulasooriya, OEG { "@context": [ "http://www.w3.org/ns/hydra/context.jsonld", {…} ], "@id": "http://example.org/docs/", "@type": "ApiDocumentation", "title": "LDP Address Book API", "entrypoint": "http://example.org/contacts/", "supportedClass": [ { "@id": "ex:AddressBook", "@type": "hydra:Class", "subClassOf": "ldp:BasicContainer", "label": "An example address book", … }, …. ], …
  • 22. API Documentation 22Nandana Mihindukulasooriya, OEG { "supportedClass": [ { "@id": "ex:AddressBook", "@type": "hydra:Class", "subClassOf": "ldp:BasicContainer", "label": "An example address book", "supportedOperation": [ { "@id": "_:create_new_contact", "@type": "hydra:Operation", "method": "POST", "label": "creates a new contact in the address book", "description": null, "expects": “ex:Contact", "returns": null, "statusCodes": [ … ] },
  • 23. API Documentation 23Nandana Mihindukulasooriya, OEG { "supportedClass": [ { "@id": "ex:AddressBook", "@type": "hydra:Class", "subClassOf": "ldp:BasicContainer", "label": "An example address book", "supportedOperation": [ { "@id": "_:create_new_contact", "@type": "hydra:Operation", "method": "POST", "label": "creates a new contact in the address book", "description": null, "expects": “ex:Contact", "returns": null, "statusCodes": [ … ] },
  • 24. API Documentation 24Nandana Mihindukulasooriya, OEG { "supportedClass": [ ….. { "@id": "ex:Contact", "@type": "hydra:Class", "subClassOf": “vcard:Individual", "label": “A contact", " supportedProperty": [ { "property": “vcard:hasEmail", "hydra:title": “Email”, "hydra:description": “Email of the contact", "required": true, "readable": true, "writable": false, },
  • 25. Potential Conflicts • Similar concepts in LDP and Hydra • LDP Containers Vs Hydra Collections • LDP Paging Vs Hydra Paged Collections 25Nandana Mihindukulasooriya, OEG
  • 26. Collections vs Containers 26Nandana Mihindukulasooriya, OEG @prefix hydra: <http://www.w3.org/ns/hydra/core#> <http://example.org/alice/contacts> a hydra:Collection ; hydra:member <http://example.org/alice/contacts/bob>, <http://example.org/alice/contacts/jane> . • Hydra Collection • LDP Container @prefix ldp: <http://www.w3.org/ns/ldp#> . <http://example.org/alice/contacts> a ldp:BasicContainer ; ldp:contains <http://example.org/alice/contacts/bob>, <http://example.org/alice/contacts/jane> .
  • 27. Hydra collection as an LDP Direct Container 27Nandana Mihindukulasooriya, OEG @prefix hydra: <http://www.w3.org/ns/hydra/core#> . @prefix ldp: <http://www.w3.org/ns/ldp#> . <http://example.org/alice/contacts> a hydra:Collection, ldp:DirectContainer; ldp:membershipResource <>; ldp:hasMemberRelation hydra:member; ldp:contains <http://example.org/alice/contacts/bob>, <http://example.org/alice/contacts/jane> ; hydra:member <http://example.org/alice/contacts/bob>, <http://example.org/alice/contacts/jane> ;
  • 28. LDP Paging 28Nandana Mihindukulasooriya, OEG GET /nandana?page2 HTTP/1.1 Host: example.org Accept: text/turtle Prefer: return=representation; max-triple-count="500" HTTP/1.1 200 OK Content-Type: text/turtle ETag: "_87e52ce291112" Link: <http://www.w3.org/ns/ldp#Resource>; rel="type", <http://www.w3.org/ns/ldp#Page>; rel="type" Link: <http://example.org/alice/contacts?p=3>; rel="next" Link: <http://example.org/alice/contacts>; rel="canonical"; etag="_87e5" Link: <http://example.org/alice/contacts?page1>; rel="first" Link: <http://example.org/alice/contacts?p=4>; rel="last" Link: <http://example.org/alice/contacts?page1>; rel="prev" Allow: GET,OPTIONS,HEAD
  • 29. Hydra PagedCollection 29Nandana Mihindukulasooriya, OEG @prefix hydra: <http://www.w3.org/ns/hydra/core#> . @prefix ldp: <http://www.w3.org/ns/ldp#> . { "@context": "http://www.w3.org/ns/hydra/context.jsonld", "@id": "http://example.org/alice/contacts?page=3", "@type": "PagedCollection", "totalItems": “50", "itemsPerPage": "10", "firstPage": "http://example.org/alice/contacts?page=1", "nextPage": " http://example.org/alice/contacts?page=4", "previousPage": "http://example.org/alice/contacts?page=2", "lastPage": "http://example.org/alice/contacts?page=5", "member": [ ... the members of this PagedCollection ... ] }
  • 30. Conclusions • LDP needs mechanisms for vocabulary and affordance discovery • Hydra Core vocabulary can be used describe LDP application • Why not just Hydra? • There are overlaps in some areas • Overlaps with the W3C RDF Shapes WG 30Nandana Mihindukulasooriya, OEG