SlideShare a Scribd company logo
Facet Building Web Pages With SPARQL SWIG-UK Event, HP Labs November 23 rd  2007 Leigh Dodds Chief Technology Officer, Ingenta
Problem Statement
Where’s my RDF-native Web Framework?! There is no good system for integrating RDF repositories with existing an web framework (in Java)
Design Constraints
 
 
 
 
 
 
 
 
Design Constraints A web page presents data that is a sub-graph (i.e. a view) over a larger RDF store, (the  data model) The extent of the sub-graph may vary for different presentations of the data, and may contain arbitrary properties The description of the sub-graph (a  lens)  should be declarative That sub-graph is “rooted” on a single  primary resource  (e.g. a Journal) The identifier of the  primary resource  can be derived from the request URL, e.g. by rewriting the URI. And vice versa Therefore, we don’t support blank nodes as  primary resources Or fragment identifiers in URIs! The sub-graph should be  serializable  into an object graph for presentation to the templating system
Facet Request Handling To return a response we need to answer three questions… What  lens  are we going to apply? What  data model  are we going to apply it to? What’s the identifier of the  primary resource ?
Lenses Describing views of RDF data
A Simple Lens PREFIX dc:  <http://purl.org/dc/elements/1.1/> CONSTRUCT { ?item  dc:title ?title . ?item  dc:language ?language . }  WHERE { ?item  dc:title ?title . OPTIONAL { ?item dc:language ?language . }  }
Configuring Lenses <rdf:RDF  xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;  xmlns:ja=&quot;http://jena.hpl.hp.com/2005/11/Assembler#&quot;   xmlns:view=&quot;http://metastore.ingenta.com/facet/lens/&quot;> <rdf:Description  rdf:about=&quot;http://metastore.ingenta.com/facet/lens/Sparql&quot;>  <ja:assembler>com.ingenta.facet….</ja:assembler> </rdf:Description> <view:Sparql  rdf:about=&quot; http://oecd.metastore.ingenta.com/views/just-the-title &quot;> <view:query> sparql/just-the-title.rq </view:query> </view:Sparql> </rdf:RDF>
Data Model Configuring RDF graphs
Data Model Configuration Jena Assembler API Add notion of application level default data model Uses well-known URI Lenses may be configured to apply to a specific data model Allows “sharding” of data models <view:Sparql  rdf:about=&quot; http://oecd.metastore.ingenta.com/views/just-the-title &quot;> <view:appliesTo rdf:resource=“…”/> </view:Sparql>
Resource Identifiers
Mapping Resource Identifiers In a RESTful application, each resource should have a single primary location Allows resource identifiers to be derived using URL rewriting http://test.sourceoecd.org/oecd/content/journal/18168116 http://oecd.metastore.ingenta.com/content/journal/18168116
Serialization Mapping an RDF sub-graph to a Java object model
Serialization Primary resource is a  ContentItem Has an identifier and  Map  of properties Walk through graph, beginning at “root” resource, mapping RDF statements to Map entries Mapping of property names is configurable. Default based on namespace prefix, E.g.  dc_title Mapping of objects of each statement to a suitable Java object ContentItem, Map, List, Integer ,  etc
Serialization (special cases) Multilingual properties Special casing (i.e. a hack!) to modify naming, e.g.  dc_title_fr Repeated properties, e.g.  dc:subject Use schema annotation to indicate these, and then Serialize to a List XML Literals & Multi-lingual data E.g. multi-lingual abstracts ( dc:description ) that contain XHTML markup Use schema annotation, parse and create separate Map entries
Additional Features “ MultiLens”, applying multiple queries in series to build results Automatic availability of URL parameters as SPARQL query parameters Integral API support RDF output for free; JSON output trivial Simple content lifecycle, mapping to HTTP resource statuses E.g. Content Not Found, Moved, Gone Add type ( life:Deleted ) and properties ( life:newLocation ) to data Support for URL Aliasing based on property values /content/issn/1234-5678 -> /content/journal/abcdef <prism:issn>
Summary Pros By embracing a few limitations on RDF modelling, e.g. identifiers provides a very flexible means of building web pages from an RDF repository Reliance on SPARQL and Jena API features provides great deal of configuration options Good integration with existing web templating environments Quick to learn Cons Model limitations mean its not suited to all RDF “in the wild”

More Related Content

What's hot (20)

PPT
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
rumito
 
PDF
RDFa: introduction, comparison with microdata and microformats and how to use it
Jose Luis Lopez Pino
 
PDF
RDF APIs for .NET Framework
Adriana Ivanciu
 
PPT
Getting Started With The Talis Platform
Leigh Dodds
 
PPTX
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
Rob Vesse
 
PPT
RDF Views of SQL Data Power Point Presentation - 1
rumito
 
PDF
Querying Linked Data with SPARQL
Olaf Hartig
 
PDF
Tabular Data on the Web
Gregg Kellogg
 
PPTX
Introduction to dotNetRDF
Tomek Pluskiewicz
 
PDF
Spark SQL - 10 Things You Need to Know
Kristian Alexander
 
KEY
Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP
Pieter De Leenheer
 
PPTX
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Diego López-de-Ipiña González-de-Artaza
 
PPT
Semantic Web
hardchiu
 
PDF
Is multi-model the future of NoSQL?
Max Neunhöffer
 
PDF
DataBearings: A semantic platform for data integration on IoT, Artem Katasonov
VTT Technical Research Centre of Finland Ltd
 
PDF
ArangoDB - Using JavaScript in the database
ArangoDB Database
 
PPT
Catacomb Apachecon Fast Feather 2008
Markus Litz
 
PPT
Slick Data Sharding: Slides from DrupalCon London
Phase2
 
ODP
Data Integration And Visualization
Ivan Ermilov
 
Virtuoso Sponger - RDFizer Middleware for creating RDF from non RDF Data Sources
rumito
 
RDFa: introduction, comparison with microdata and microformats and how to use it
Jose Luis Lopez Pino
 
RDF APIs for .NET Framework
Adriana Ivanciu
 
Getting Started With The Talis Platform
Leigh Dodds
 
dotNetRDF - A Semantic Web/RDF Library for .Net Developers
Rob Vesse
 
RDF Views of SQL Data Power Point Presentation - 1
rumito
 
Querying Linked Data with SPARQL
Olaf Hartig
 
Tabular Data on the Web
Gregg Kellogg
 
Introduction to dotNetRDF
Tomek Pluskiewicz
 
Spark SQL - 10 Things You Need to Know
Kristian Alexander
 
Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP
Pieter De Leenheer
 
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Diego López-de-Ipiña González-de-Artaza
 
Semantic Web
hardchiu
 
Is multi-model the future of NoSQL?
Max Neunhöffer
 
DataBearings: A semantic platform for data integration on IoT, Artem Katasonov
VTT Technical Research Centre of Finland Ltd
 
ArangoDB - Using JavaScript in the database
ArangoDB Database
 
Catacomb Apachecon Fast Feather 2008
Markus Litz
 
Slick Data Sharding: Slides from DrupalCon London
Phase2
 
Data Integration And Visualization
Ivan Ermilov
 

Similar to Facet: Building Web Pages with SPARQL (20)

ODP
Linked opendata parisemantique.fr - 24062011
Loïc Dias Da Silva
 
PPTX
Sem webmaubeuge
Jose Emilio Labra Gayo
 
PPTX
Triplestore and SPARQL
Lino Valdivia
 
PDF
Knowledge graph construction with a façade - The SPARQL Anything Project
Enrico Daga
 
PPT
Semantic Web Applications
Julian Higman
 
PPT
Introduction to RDF
Narni Rajesh
 
PDF
The SPARQL Anything project
Enrico Daga
 
PPTX
One day workshop Linked Data and Semantic Web
Victor de Boer
 
ODP
State of the Semantic Web
Ivan Herman
 
PPT
2007 03 12 Swecr 2
kiyoshi_tezuka
 
PDF
Graphs, Stores and API
Bart Hanssens
 
PPTX
Hack U Barcelona 2011
Peter Mika
 
ODP
Gist od2-feb-2011
ianibbo
 
PPTX
Madrid SPARQL handson
Victor de Boer
 
PDF
RDF and Java
Constantin Stan
 
PPT
From SQL to SPARQL
George Roth
 
PDF
SPARQL and Linked Data
Fulvio Corno
 
PDF
Find your way in Graph labyrinths
Daniel Camarda
 
PPT
Ks2007 Semanticweb In Action
Rinke Hoekstra
 
PDF
Linked Open Graph: browsing multiple SPARQL entry points to build your own LO...
Paolo Nesi
 
Linked opendata parisemantique.fr - 24062011
Loïc Dias Da Silva
 
Sem webmaubeuge
Jose Emilio Labra Gayo
 
Triplestore and SPARQL
Lino Valdivia
 
Knowledge graph construction with a façade - The SPARQL Anything Project
Enrico Daga
 
Semantic Web Applications
Julian Higman
 
Introduction to RDF
Narni Rajesh
 
The SPARQL Anything project
Enrico Daga
 
One day workshop Linked Data and Semantic Web
Victor de Boer
 
State of the Semantic Web
Ivan Herman
 
2007 03 12 Swecr 2
kiyoshi_tezuka
 
Graphs, Stores and API
Bart Hanssens
 
Hack U Barcelona 2011
Peter Mika
 
Gist od2-feb-2011
ianibbo
 
Madrid SPARQL handson
Victor de Boer
 
RDF and Java
Constantin Stan
 
From SQL to SPARQL
George Roth
 
SPARQL and Linked Data
Fulvio Corno
 
Find your way in Graph labyrinths
Daniel Camarda
 
Ks2007 Semanticweb In Action
Rinke Hoekstra
 
Linked Open Graph: browsing multiple SPARQL entry points to build your own LO...
Paolo Nesi
 
Ad

More from Leigh Dodds (20)

PDF
Being a data magpie
Leigh Dodds
 
PDF
How you (yes, you!) can contribute to open data
Leigh Dodds
 
ODP
Accessible Bath Training
Leigh Dodds
 
ODP
Accessible Bath
Leigh Dodds
 
PDF
Cheap bots done quick lightning talk
Leigh Dodds
 
PDF
Open data in bath
Leigh Dodds
 
PDF
Bath: Hacked Learning Night: Introduction to CartoDB
Leigh Dodds
 
ODP
Dungeons and Dragons and Data
Leigh Dodds
 
ODP
Love the Environment Pre-Meetup
Leigh Dodds
 
PPT
Why I love open data and you should too
Leigh Dodds
 
ODP
Introduction to Open Data & Bath: Hacked
Leigh Dodds
 
ODP
Bath: Hacked: open data, the arts and cultural heritage
Leigh Dodds
 
PDF
Introduction to Open Data & Linked Data
Leigh Dodds
 
PDF
Time Travelling with Open Data
Leigh Dodds
 
PPT
Ignite for Good: Why I Love Open Data and You Should Too
Leigh Dodds
 
ODP
Oil and Water: When Data Licences Don't Mix
Leigh Dodds
 
PDF
Linked Data Patterns
Leigh Dodds
 
PDF
Digital Grafitti for Digital Cities
Leigh Dodds
 
PDF
Layered Data: An Example
Leigh Dodds
 
PDF
Data Foundations for Digital Cities
Leigh Dodds
 
Being a data magpie
Leigh Dodds
 
How you (yes, you!) can contribute to open data
Leigh Dodds
 
Accessible Bath Training
Leigh Dodds
 
Accessible Bath
Leigh Dodds
 
Cheap bots done quick lightning talk
Leigh Dodds
 
Open data in bath
Leigh Dodds
 
Bath: Hacked Learning Night: Introduction to CartoDB
Leigh Dodds
 
Dungeons and Dragons and Data
Leigh Dodds
 
Love the Environment Pre-Meetup
Leigh Dodds
 
Why I love open data and you should too
Leigh Dodds
 
Introduction to Open Data & Bath: Hacked
Leigh Dodds
 
Bath: Hacked: open data, the arts and cultural heritage
Leigh Dodds
 
Introduction to Open Data & Linked Data
Leigh Dodds
 
Time Travelling with Open Data
Leigh Dodds
 
Ignite for Good: Why I Love Open Data and You Should Too
Leigh Dodds
 
Oil and Water: When Data Licences Don't Mix
Leigh Dodds
 
Linked Data Patterns
Leigh Dodds
 
Digital Grafitti for Digital Cities
Leigh Dodds
 
Layered Data: An Example
Leigh Dodds
 
Data Foundations for Digital Cities
Leigh Dodds
 
Ad

Recently uploaded (20)

PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PDF
“A Re-imagination of Embedded Vision System Design,” a Presentation from Imag...
Edge AI and Vision Alliance
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PDF
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
PPTX
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
“A Re-imagination of Embedded Vision System Design,” a Presentation from Imag...
Edge AI and Vision Alliance
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Kubernetes - Architecture & Components.pdf
geethak285
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 

Facet: Building Web Pages with SPARQL

  • 1. Facet Building Web Pages With SPARQL SWIG-UK Event, HP Labs November 23 rd 2007 Leigh Dodds Chief Technology Officer, Ingenta
  • 3. Where’s my RDF-native Web Framework?! There is no good system for integrating RDF repositories with existing an web framework (in Java)
  • 5.  
  • 6.  
  • 7.  
  • 8.  
  • 9.  
  • 10.  
  • 11.  
  • 12.  
  • 13. Design Constraints A web page presents data that is a sub-graph (i.e. a view) over a larger RDF store, (the data model) The extent of the sub-graph may vary for different presentations of the data, and may contain arbitrary properties The description of the sub-graph (a lens) should be declarative That sub-graph is “rooted” on a single primary resource (e.g. a Journal) The identifier of the primary resource can be derived from the request URL, e.g. by rewriting the URI. And vice versa Therefore, we don’t support blank nodes as primary resources Or fragment identifiers in URIs! The sub-graph should be serializable into an object graph for presentation to the templating system
  • 14. Facet Request Handling To return a response we need to answer three questions… What lens are we going to apply? What data model are we going to apply it to? What’s the identifier of the primary resource ?
  • 15. Lenses Describing views of RDF data
  • 16. A Simple Lens PREFIX dc: <http://purl.org/dc/elements/1.1/> CONSTRUCT { ?item dc:title ?title . ?item dc:language ?language . } WHERE { ?item dc:title ?title . OPTIONAL { ?item dc:language ?language . } }
  • 17. Configuring Lenses <rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:ja=&quot;http://jena.hpl.hp.com/2005/11/Assembler#&quot; xmlns:view=&quot;http://metastore.ingenta.com/facet/lens/&quot;> <rdf:Description rdf:about=&quot;http://metastore.ingenta.com/facet/lens/Sparql&quot;> <ja:assembler>com.ingenta.facet….</ja:assembler> </rdf:Description> <view:Sparql rdf:about=&quot; http://oecd.metastore.ingenta.com/views/just-the-title &quot;> <view:query> sparql/just-the-title.rq </view:query> </view:Sparql> </rdf:RDF>
  • 19. Data Model Configuration Jena Assembler API Add notion of application level default data model Uses well-known URI Lenses may be configured to apply to a specific data model Allows “sharding” of data models <view:Sparql rdf:about=&quot; http://oecd.metastore.ingenta.com/views/just-the-title &quot;> <view:appliesTo rdf:resource=“…”/> </view:Sparql>
  • 21. Mapping Resource Identifiers In a RESTful application, each resource should have a single primary location Allows resource identifiers to be derived using URL rewriting http://test.sourceoecd.org/oecd/content/journal/18168116 http://oecd.metastore.ingenta.com/content/journal/18168116
  • 22. Serialization Mapping an RDF sub-graph to a Java object model
  • 23. Serialization Primary resource is a ContentItem Has an identifier and Map of properties Walk through graph, beginning at “root” resource, mapping RDF statements to Map entries Mapping of property names is configurable. Default based on namespace prefix, E.g. dc_title Mapping of objects of each statement to a suitable Java object ContentItem, Map, List, Integer , etc
  • 24. Serialization (special cases) Multilingual properties Special casing (i.e. a hack!) to modify naming, e.g. dc_title_fr Repeated properties, e.g. dc:subject Use schema annotation to indicate these, and then Serialize to a List XML Literals & Multi-lingual data E.g. multi-lingual abstracts ( dc:description ) that contain XHTML markup Use schema annotation, parse and create separate Map entries
  • 25. Additional Features “ MultiLens”, applying multiple queries in series to build results Automatic availability of URL parameters as SPARQL query parameters Integral API support RDF output for free; JSON output trivial Simple content lifecycle, mapping to HTTP resource statuses E.g. Content Not Found, Moved, Gone Add type ( life:Deleted ) and properties ( life:newLocation ) to data Support for URL Aliasing based on property values /content/issn/1234-5678 -> /content/journal/abcdef <prism:issn>
  • 26. Summary Pros By embracing a few limitations on RDF modelling, e.g. identifiers provides a very flexible means of building web pages from an RDF repository Reliance on SPARQL and Jena API features provides great deal of configuration options Good integration with existing web templating environments Quick to learn Cons Model limitations mean its not suited to all RDF “in the wild”