Upload
gauravkumar87
View
7.610
Download
3
Tags:
Embed Size (px)
Citation preview
Semantic DrupalRDF in Drupal 7 and what it means for the web at
large
Gaurav Kumar
Gaurav Kumar• Team Lead at Blisstering Solutions• With Drupal for 3 years• Lead Architect of m2Serve, a multi-modal
Drupal based platform• Maintainer of the mailalias module on
drupal.org• Works with multiple technologies – Mobile,
Voice, Web
Explosionof
Social networks
and collaborative applications
Need a way to connect these
People can move from one to another and
bring their data.
People can make sense out of data.
“On the Internet, nobody knows you’re a dog”
Semantic Web
Semantic Web Benefits• Programs and sites can
exchange information• Search engines can display
more relevant information in results
• Data mashers can combine data from different datasets to find new and astounding things
Key Terms
Machine understandableRDF
Linked DataSPARQL
Global Giant Graph
Federated Dataset
Machine Understandable
RDF
Resource
Description
Framework
RDFEverything is a resource
A resource is a named thing
this
www.example.com#thisexample:this CURIE
RDFA resource can be a Document
A resource can be an organizationA resource can be a person
foaf:Document foaf:Organization foaf:person
foaf:name - Gauravfoaf:mail - [email protected]:birthday – 25/10/1987
RDFand describe how that person is related to other resources
dplp:this blisstering:this
gaurav:me
swrc:employeefoaf:made
RDF<?xml version="1.0"?>
<rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="http://www.google.com">
<dc:creator>Larry Page</dc:creator> </rdf:Description>
</rdf:RDF>
RDF Triples (N3)
vendor1:productX dc:title "Cool-O-Matic" . vendor1:productX retail:price "$50.75" .
vendor1:productX vendor1:partno "TTK583" . vendor1:productY dc:title "Fluffertron" . vendor1:productY retail:price "$26.50" .
vendor1:productY vendor1:partno "AAL132" .
RDF Graphs
RDF Vocabularies
RDF Schema Web Ontology Language
Dublin Core Friend of a Friend
Simple Knowledge Organization System vCard RDF Encoding
RDF and RDFa
RDFa = RDF in attributesProvides a way to use RDF with HTML
RDF and RDFa
<div xmlns:dcmi="http://purl.org/dc/elements/1.1">
<h1 property="dcmi:title">OSI Days</h1> <h3 property="dcmi:creator">Gaurav
Kumar</h3>
Giant Global Graph
ONE GIANT DATABASE
SPARQLQuery the Giant Global Graph
using SQL?
SPARQL
Key Terms
Machine understandableRDF
Linked DataSPARQL
Global Giant Graph
Federated Dataset
Drupal and RDF – A good match?
• Both maintain structured data• Drupal’s structure is in the Database• Drupal’s field names are unique to the website• Both maintain structured data in similar ways
RDF in Drupal
• rdf.php (Dries, 2000)• FOAF, vCard (walkah, 2004)• Relationship (dman, 2005)• Semantic Search (hendler, 2006)• RDF (Arto, 2007)• OpenCalais (febbraro, 2008)• RDF CCK (scor, 2008)
Why RDF ?
• W3C Standards• BBC, New York Times, Reuters, Facebook,
Linkedin• Google, Yahoo• Don’t Repeat Yourself
RDF in Drupal 7
• In Core!!!• FOAF, SIOC, SKOC, DC “out of the box”• All users have a web ID user/3#me• All entities have a unique ID
RDF in Drupal 7 : The Spices• Entity Types
node comment user
File Term Vocabulary
RDF in Drupal 7 : The Spices• Attributes
title date All fields
Comment count Reply of creator
Drupal 7 : Default Mappings
Use Cases
Rich Search Result
Use Cases
RDF web page :
http://openspring.net/blog/2009/05/12/half-way-through-the-rdf-code-sprint-google-announces-support-for-rdfa
Inspection :
http://inspector.sindice.com/inspect?url=http://openspring.net/blog/2009/05/12/half-way-through-the-rdf-code-sprint-google-announces-support-for-rdfa#GRAPH
Web at Large and Drupal
• Drupal = Pioneer CMS• Platform of choice for many use cases• Influence the Trends• More RDF data on the web
The time to adopt RDF is NOW!
What’s coming up
• RDF Mapping User Interface• SPARQL Endpoint• RDF Proxy
Modify / Create RDF Mappings/*** Implements hook_rdf_namespace();*/
function myrdfmodule_rdf_namespace(){
return array(‘gr’ => ‘http://purl.org/goodrelations/w1#’‘product’ => ‘http://search.yahoo.com/searchmonkey/product/”
http://drupal.org/node/622170
Modify / Create RDF Mappingsfunction node_rdf_mapping() { return array( array( 'type' => 'node', 'bundle' => RDF_DEFAULT_BUNDLE, 'mapping' => array( 'rdftype' => array('sioc:Item', 'foaf:Document'), 'title' => array( 'predicates' => array('dc:title'), ),...
Some Resources
•http://groups.drupal.org/semantic-web•http://semantic-drupal.com/•http://www.w3.org/RDF/
Thank you.
Contact me:• [email protected]•Linkedin.com/in/gauravkumar87We’re hiring!!!• Write to [email protected]• or come find me at the conference