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)

PPT
Understanding RDF: the Resource Description Framework in Context (1999)
Dan Brickley
 
PPT
Data in RDF
Emanuele Della Valle
 
PPT
RESTful Services
Kurt Cagle
 
PPTX
Triplestore and SPARQL
Lino Valdivia
 
ODP
State of the Semantic Web
Ivan Herman
 
PDF
Spark and scala course content | Spark and scala course online training
Selfpaced
 
ODP
Creating APIs over RDF
Leigh Dodds
 
ODP
Creating APIs over RDF
Leigh Dodds
 
ODP
Slug: A Semantic Web Crawler
Leigh Dodds
 
PDF
A Hands On Overview Of The Semantic Web
Shamod Lacoul
 
PDF
Deploying PHP applications using Virtuoso as Application Server
webhostingguy
 
PPT
A hands on overview of the semantic web
Marakana Inc.
 
PPTX
A Little SPARQL in your Analytics
Dr. Neil Brittliff
 
PPT
Lee Iverson - How does the web connect content?
Museums Computer Group
 
PPT
Improving Human–Semantic Web Interaction: The Rhizomer Experience
Roberto García
 
PDF
RDFauthor (EKAW)
Norman Heino
 
PPTX
A year on the Semantic Web @ W3C
Ivan Herman
 
PPT
Linked Data Tutorial
Sören Auer
 
DOC
Spatial approximate string search Doc
Sudha Hari Tech Solution Pvt ltd
 
PPTX
Technical Background
Nikolaos Konstantinou
 
Understanding RDF: the Resource Description Framework in Context (1999)
Dan Brickley
 
RESTful Services
Kurt Cagle
 
Triplestore and SPARQL
Lino Valdivia
 
State of the Semantic Web
Ivan Herman
 
Spark and scala course content | Spark and scala course online training
Selfpaced
 
Creating APIs over RDF
Leigh Dodds
 
Creating APIs over RDF
Leigh Dodds
 
Slug: A Semantic Web Crawler
Leigh Dodds
 
A Hands On Overview Of The Semantic Web
Shamod Lacoul
 
Deploying PHP applications using Virtuoso as Application Server
webhostingguy
 
A hands on overview of the semantic web
Marakana Inc.
 
A Little SPARQL in your Analytics
Dr. Neil Brittliff
 
Lee Iverson - How does the web connect content?
Museums Computer Group
 
Improving Human–Semantic Web Interaction: The Rhizomer Experience
Roberto García
 
RDFauthor (EKAW)
Norman Heino
 
A year on the Semantic Web @ W3C
Ivan Herman
 
Linked Data Tutorial
Sören Auer
 
Spatial approximate string search Doc
Sudha Hari Tech Solution Pvt ltd
 
Technical Background
Nikolaos Konstantinou
 
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
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 

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”