Understanding the Semantic Web and Drupal, DrupalCon Chicago 2011

Post on 02-Nov-2014

1487 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

Transcript

1

Semantic Web benefits

2

Semantic Web benefits

Programs and sites can exchange information

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.org

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

Search engines can display more relevant information in results

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

Search engines can display more relevant information in results

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

Search engines can display more relevant information in results

Data mashers can combine data from different datasets to find new and astounding things

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

Search engines can display more relevant information in results

Data mashers can combine data from different datasets to find new and astounding things

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

+

Search engines can display more relevant information in results

Data mashers can combine data from different datasets to find new and astounding things

2

Semantic Web benefits

Programs and sites can exchange information

my-site.net your-site.orgcompany.com

+

Search engines can display more relevant information in results

Data mashers can combine data from different datasets to find new and astounding things

2

Key (confusing) terms

3

Key (confusing) terms

Machine Understandable

3

Key (confusing) terms

RDF

Machine Understandable

3

Key (confusing) terms

RDF

Machine UnderstandableLinked Data

3

Key (confusing) terms

RDF

Machine UnderstandableLinked Data

SPARQL

3

Key (confusing) terms

RDF

Machine UnderstandableLinked Data

SPARQLFederated Dataset

3

Key (confusing) terms

RDF

Machine UnderstandableLinked Data

SPARQLFederated DatasetGiant

GlobalGraph

3

Machine Understandable

4

Machine Understandable

4

Machine Understandable

4

Machine Understandable

4

Machine Understandable

4

Machine Understandable

4

Machine Understandable

4

Machine Understandable

The Semantic Web helps machines understand what the information on a Web page is...

4

Machine Understandable

The Semantic Web helps machines understand what the information on a Web page is...

4

Machine Understandable

The Semantic Web helps machines understand what the information on a Web page is...

Lin Clarkis a name

4

Machine Understandable

Lin Clarkis a name

4

Machine Understandable

and the relationships between different pieces of information.

Lin Clarkis a name

4

Machine Understandable

and the relationships between different pieces of information.

4

Machine Understandable

and the relationships between different pieces of information.

linclark.jpgis a pictureof a person

named Lin Clark

4

RDF

RDF

esource

escription

ramework

5

RDF

Everything is a resource

6

RDF

Everything is a resourceA resource is a named thing

6

RDF

Everything is a resourceA resource is a named thing

this

6

RDF

Everything is a resource

this

6

RDF

Everything is a resource

6

RDF

Everything is a resource

http://lin-clark.com/page.html#this

6

RDF

Everything is a resource

http://lin-clark.com/page.html#this

URI

6

RDF

Everything is a resource

http://lin-clark.com/page.html#this

6

RDF

Everything is a resource

6

RDF

Everything is a resource

lin:this

6

RDF

Everything is a resource

lin:this

Namespacexmlns:lin=”http://lin-clark.com/page.html#

6

RDF

Everything is a resource

lin:this

CURIENamespacexmlns:lin=”http://lin-clark.com/page.html#

6

RDF

A resource can be a document

dblp:this

7

RDF

A resource can be a document

dblp:this

foaf:Document

7

RDF

A resource can be a company

deri:this

8

RDF

A resource can be a company

deri:this

foaf:Organization

8

RDF

A resource can even be a person

lin:me

9

RDF

A resource can even be a person

lin:me

foaf:Person

9

RDF

You can describe properties of that person...

lin:me

10

RDF

You can describe properties of that person...

lin:me

foaf:name Lin Clark

10

RDF

You can describe properties of that person...

lin:me

foaf:name Lin Clark

foaf:mbox lin.clark@deri.org

10

RDF

You can describe properties of that person...

lin:me

foaf:name Lin Clark

foaf:mbox lin.clark@deri.org

foaf:birthday 07-01

10

RDF

and describe how that person is related to other resources

lin:me

deri:thisdblp:this

swrc:employsfoaf:made

11

SVO

12

SVO

12

SVO

Subject

12

SVO

Subject Verb

12

SVO

Subject Verb Object

12

SVO

13

SVO

SVO

13

SVO

SVO

My

13

SVO

SVO

My name is

13

SVO

SVO

My name is Lin Clark

13

SVO

SVO

<http://lin-clark.com/#me>

My name is Lin Clark

13

SVO

SVO

<http://lin-clark.com/#me>

<http://xmlns.com/foaf/0.1/name>

My name is Lin Clark

13

SVO

SVO

<http://lin-clark.com/#me>

<http://xmlns.com/foaf/0.1/name>

“Lin Clark”

My name is Lin Clark

13

SVO

SVO

My name is Lin Clark

<http://lin-clark.com/#me>

<http://xmlns.com/foaf/0.1/name>

“Lin Clark”

14

SVO

SVO

My name is Lin Clark

<http://lin-clark.com/#me>

<http://xmlns.com/foaf/0.1/name>

prefix=”lin: http://lin-clark.com/#”

“Lin Clark”

14

SVO

SVO

My name is Lin Clark

<http://xmlns.com/foaf/0.1/name>

prefix=”lin: http://lin-clark.com/#”

“Lin Clark”

14

SVO

SVO

My name is Lin Clark

<http://xmlns.com/foaf/0.1/name>

prefix=”lin: http://lin-clark.com/#”

lin:me

“Lin Clark”

14

SVO

SVO

My name is Lin Clark

<http://xmlns.com/foaf/0.1/name>

prefix=”lin: http://lin-clark.com/#”

lin:me

prefix=”foaf : http://xmlns.com/foaf/

“Lin Clark”

14

SVO

SVO

My name is Lin Clark

prefix=”lin: http://lin-clark.com/#”

lin:me

prefix=”foaf : http://xmlns.com/foaf/

“Lin Clark”

14

SVO

SVO

My name is Lin Clark

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

“Lin Clark”

14

SVO

SVO

My name is Lin Clark

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

14

SVO

SVO

My name is Lin Clark

“Lin Clark”

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

14

SVO

SVO

My name is Lin Clark

“Lin Clark”

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

I know Stéphane

15

SVO

SVO

My name is Lin Clark

“Lin Clark”

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

I know Stéphane

lin:me

15

SVO

SVO

My name is Lin Clark

“Lin Clark”

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

I know Stéphane

lin:me foaf:knows

15

SVO

SVO

My name is Lin Clark

“Lin Clark”

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

I know Stéphane

lin:me foaf:knows scor:me

15

SVO

SVO

My name is Lin Clark

“Lin Clark”

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

I know Stéphane

} Literal

lin:me foaf:knows scor:me

15

SVO

SVO

My name is Lin Clark

“Lin Clark”

prefix=”lin: http://lin-clark.com/#”

lin:me foaf:name

prefix=”foaf : http://xmlns.com/foaf/

I know Stéphane

} Literal

} Resourcelin:me foaf:knows scor:me

15

Federated Dataset

lin:me

deri:thisdblp:this

swrc:employsfoaf:made

16

Federated Dataset

Because we are using http URIs,these resources don’t need to be in the same database

lin:me

deri:thisdblp:this

swrc:employsfoaf:made

16

Federated Dataset

the resources can be distributed across the Webin a federated way

17

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

And when all resources are described this way,the Web becomes one giant database...

18

Giant Global Graph

18

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graphusing SQL?

19

SPARQL

Find and retrieve information from the graph

19

SPARQL

Find and retrieve information from the graphusing SPARQL

19

The Semantic Web

20

The Semantic Web

Machine Understandable

20

The Semantic Web

RDF

Machine Understandable

20

The Semantic Web

RDF

Machine UnderstandableLinked Data

20

The Semantic Web

RDF

Machine UnderstandableLinked Data

SPARQL

20

The Semantic Web

RDF

Machine UnderstandableLinked Data

SPARQLFederated Dataset

20

The Semantic Web

RDF

Machine UnderstandableLinked Data

SPARQLFederated DatasetGiant

GlobalGraph

20

Why Drupal?

21

Why Drupal?

Similarities

21

Why Drupal?

Similarities

•Both have structured data

21

Why Drupal?

Similarities

•Both have structured data

•Data is structured in a similar way—instances of types with properties and relationships

21

Why Drupal?

22

Why Drupal?

Differences

22

Why Drupal?

Differences

•Drupal’s structure stays hidden in the database, RDF structure is exposed on the page

22

Why Drupal?

Differences

•Drupal’s structure stays hidden in the database, RDF structure is exposed on the page

•Drupal’s field names are unique to the site and not explicitly defined,RDF terms are universally dereferencable and explicitly defined

22

RDF in Drupal 7 core

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="XHTML+RDFa 1.0" xml:lang="en">

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Lin-Clark | Pittsburgh-based Web developer</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/admin_menu/admin_menu.css?8" /><link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/views/css/views.css?8" /><link type="text/css" rel="stylesheet" media="all" href="/sites/default/files/css/css_92e513ffd2110f82d787173e8b07d9c7.css" /><link type="text/css" rel="stylesheet" media="print" href="/sites/default/files/css/css_9c70a5072a56f4bc83a718ec42481c1a.css" /><!--[if IE]><link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/zen/zen/ie.css?8" /><![endif]--> <script type="text/javascript" src="/sites/default/files/js/js_f68bf536b867998e80bb0bd586727a4a.js"></script><script type="text/javascript"><!--//--><![CDATA[//><!--jQuery.extend(Drupal.settings, { "basePath": "/", "admin_menu": { "margin_top": 1, "position_fixed": 1 }, "cobalt": { "state": "1", "path": "node/33", "bindings": [ "Alt+space", "Ctrl+space" ], "nodes_current": "33" }, "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip" }, "jcarousel": { "#viewscarousel-Site-Screenshots-block-1": { "scroll": 1, "visible": 1, "animation": "slow", "auto": 6, "wrap": "both", "skin": "ie7" } } });//--><!]]></script></head><body class="front logged-in node-type-page one-sidebar sidebar-right">

<div id="page"><div id="page-inner"><a id="navigation-top"></a> <div id="header"><div id="header-inner" class="clear-block">

23

RDF in Drupal 7 core

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="XHTML+RDFa 1.0" xml:lang="en">

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Lin-Clark | Pittsburgh-based Web developer</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/admin_menu/admin_menu.css?8" /><link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/views/css/views.css?8" /><link type="text/css" rel="stylesheet" media="all" href="/sites/default/files/css/css_92e513ffd2110f82d787173e8b07d9c7.css" /><link type="text/css" rel="stylesheet" media="print" href="/sites/default/files/css/css_9c70a5072a56f4bc83a718ec42481c1a.css" /><!--[if IE]><link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/zen/zen/ie.css?8" /><![endif]--> <script type="text/javascript" src="/sites/default/files/js/js_f68bf536b867998e80bb0bd586727a4a.js"></script><script type="text/javascript"><!--//--><![CDATA[//><!--jQuery.extend(Drupal.settings, { "basePath": "/", "admin_menu": { "margin_top": 1, "position_fixed": 1 }, "cobalt": { "state": "1", "path": "node/33", "bindings": [ "Alt+space", "Ctrl+space" ], "nodes_current": "33" }, "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip" }, "jcarousel": { "#viewscarousel-Site-Screenshots-block-1": { "scroll": 1, "visible": 1, "animation": "slow", "auto": 6, "wrap": "both", "skin": "ie7" } } });//--><!]]></script></head><body class="front logged-in node-type-page one-sidebar sidebar-right">

<div id="page"><div id="page-inner"><a id="navigation-top"></a> <div id="header"><div id="header-inner" class="clear-block">

23

Universities in RDFRDF in Drupal 7 core

Submitted by Lin on Sat, 2009-05-02 10:28

24

Universities in RDFRDF in Drupal 7 core

Submitted by Lin on Sat, 2009-05-02 10:28

<div class="submitted"> Submitted by <a href="/user/1">Lin</a> on Sat, 2009-05-02 10:28</div>

24

Universities in RDFRDF in Drupal 7 core

Submitted by Lin on Sat, 2009-05-02 10:28

24

Universities in RDFRDF in Drupal 7 core

Submitted by Lin on Sat, 2009-05-02 10:28

<div class="submitted"> Submitted by <span rel="sioc:has_creator"><a href="/user/1">Lin</a></span> on Sat, 2009-05-02 10:28</div>

24

Universities in RDFRDF in Drupal 7 core

Submitted by Lin on Sat, 2009-05-02 10:28

24

Universities in RDFRDF in Drupal 7 core

Submitted by Lin on Sat, 2009-05-02 10:28

<div class="submitted"> Submitted by <span rel="sioc:has_creator"><a href="/user/1" typeof="sioc:User" property="foaf:name">Lin</a></span> on Sat, 2009-05-02 10:28</div>

24

?25

25

25

Microformats

26

Microformats

Bring structured data to HTML

26

Microformats

Bring structured data to HTML

26

Microformats

Bring structured data to HTML

Limitations

26

Microformats

Bring structured data to HTML

Limitations

•Not extensible — if your use case doesn’t match the existing formats, you can’t make your own

26

Microformats

Bring structured data to HTML

Limitations

•Not extensible — if your use case doesn’t match the existing formats, you can’t make your own

•Not scopable — properties set on child elements get misinterpreted as properties of parents

26

RDFa and Microdata

27

RDFa and Microdata

RDFa

27

RDFa and Microdata

RDFa

•about

27

RDFa and Microdata

RDFa

•about

•property, rel

27

RDFa and Microdata

RDFa

•about

•property, rel

•typeof

27

RDFa and Microdata

RDFa

•about

•property, rel

•typeof

Microdata

27

RDFa and Microdata

RDFa

•about

•property, rel

•typeof

Microdata

• itemid

27

RDFa and Microdata

RDFa

•about

•property, rel

•typeof

Microdata

• itemid

• itemprop

27

RDFa and Microdata

RDFa

•about

•property, rel

•typeof

Microdata

• itemid

• itemprop

• itemtype

27

RDFa and Microdata

RDFa

•about

•property, rel

•typeof

Microdata

• itemid

• itemprop

• itemtype

27

A closer look at the RDF that Drupal 7 includes out of the box

28

RDF for free in Drupal 7•All entity types:

node comment

user file

term vocabulary

29

RDF for free in Drupal 7•Attributes:

title date (created, updated)

all fields* comment count

reply of (comment) creator

* provided a mapping has been defined for it

30

Drupal 7 entities “cool URIs”•All entities have their own URI

•node/3

•comment/6#comment-6

•user/2

•taxonomy/term/5

http://www.w3.org/TR/cooluris/31

Drupal 7 RDFa goodness•FOAF, SIOC, SKOS, DC “out of the box”

•All users have a WebID URI

user/3#me => foaf:Person

32

Drupal 7 default mappings

nodesioc:Item,

foaf:Document

titledc:title

creation datedc:created, dc:date

bodycontent:encoded

usersioc:UserAccount

sioc:has_creator

user name

termskos:Concept

dc:subject

descriptionskos:definition

nameskos:prefLabel,rdfs:label

foaf:name

commentsioc:Post,

sioct:Comment

sioc:reply_of

sioc:reply_of

modification datedc:modified

number repliessioc:num_replies

vocabularyskos:Concept

Scheme

skos:inScheme

skos:broader

term descriptionrdfs:comment

namedc:title

homepage

foaf:page

titledc:title

creation datedc:created, dc:date

bodycontent:encoded

modification datedc:modified

sioc:has_creator

33

RDFa demo: how machines see Drupal pages

•Ubiquity RDFa

•Sig.ma - Semantic Information Mashup

http://ubiquity-rdfa.googlecode.com/svn/trunk/ubiquity-loader.js

34

35

History of Semantics in Drupal•rdf.php (2000, Dries)

•FOAF, vCard (2004, walkah)

•Relationship (2005, dman)

•Semantic Search (2006, hendler)

36

History of Semantics in Drupal•RDF (2007, Arto)

•OpenCalais (febbraro, 2008)

•RDF CCK (2008, scor)

•and more...

37

RDF in Drupal 7 - the story so far

38

May 2009DERI, Galway

RDF in Drupal 7 - the story so far

39

RDF in Drupal 7 - the story so far•61 issues in total

•11 months of coding

•401 lines of code

•372 lines of documentation

•537 lines of tests

40

RDFa growth

•fastest growing data format on the Web

•3.6% of the pages in the Web

•510% growth in the last year

http://tripletalk.wordpress.com/2011/01/25/rdfa-deployment-across-the-web/41

http://rdfa.info/2009/12/11/best-buy-and-rdfa/

RDFa and e-Commerce: BestBuy•GoodRelations

•30 % percent increase in traffic

•Yahoo observes a 15% increase in the Click-through-Rate

42

Why RDF and RDFa?•W3C standards

•BBC, New York Times, Reuters, Facebook

•Google, Yahoo!

43

RDF in contrib

44

RDF in contribRDF Mapping User Interface for site administrators to customize mappings

44

RDF in contrib

45

SPARQL Endpoint: anyone can query your site data with SPARQL queries

RDF in contrib

45

SPARQL Endpoint: anyone can query your site data with SPARQL queries

Figure 3.6: A list of SPARQL results (left) and an RDF SPARQL Proxy profile form(right).

a vocabulary page containing some general information about the vocabulary, followedby the descriptions of all its classes and properties.

Editor. After a vocabulary maintainer logs in, additional links become visible onthe vocabulary page and allow adding new terms, as well as editing of existing terms.Terms are created and edited through a web form (Figure 3.8). The form allows entryof an ID (to become part of the term’s URI), label, comment, subclasses, subproperties,domain, range, disjoint classes, inverse properties, and marking a property as functionalor inverse functional. Authenticated users can also create new vocabularies and modifythe vocabulary metadata.

RDFS output, URIs and content negotiation. The URIs identifying classes andproperties are always generated by appending the hash character and the term’s ID tothe URI of the vocabulary page. This makes sure that the vocabulary page is returnedwhen these URIs are resolved. HTTP requests to the vocabulary page are subject tocontent negotiation. Web browsers will see the HTML variant shown in Figure 3.7.RDF-aware clients will receive the RDFS/OWL specification, either in RDF/XML orN3 syntax. In a nutshell, Neologism publishes standards-compliant vocabularies on theWeb without requiring any additional effort on the part of vocabulary maintainers.

Implementation. Neologism is implemented in PHP as a Drupal module. Drupalreduces development time by providing many features for free, such as account man-agement, database abstraction layer and content managemement. It also makes inte-gration with a larger Drupal-based site very easy, for example to provide a news blogand discussion forum for each vocabulary built with Neologism. All data is stored ina MySQL database. RAP13 is used to serialize RDF/XML and N3. The PHP ContentNegotiation library14 is used instead of the usual Apache rules to implement contentnegotiation, and Vapour15 was used to validate its correctness. The overview diagram

13http://www4.wiwiss.fu-berlin.de/bizer/rdfapi/14http://ptlis.net/source/php-content-negotiation/15http://vapour.sourceforge.net/

43

RDF in contrib

45

What’s coming up

RDF in contrib

46

What’s coming upSPARQL Views: A way of connecting to external RDF sources and displaying the results within the context of your site, using different styles as appropriate.

RDF in contrib

46

What’s coming upSPARQL Views: A way of connecting to external RDF sources and displaying the results within the context of your site, using different styles as appropriate.

my-site.net your-site.orgcompany.com

RDF in contrib

46

RDF in Drupal 7 for developershttp://api.drupal.org/api/group/rdf/7

47

RDF namespaces declaration

48

3 ways to set RDF mappings1. Entity type level defaults:

hook_rdf_mappings() 'bundle' => RDF_DEFAULT_BUNDLE,

2. Content type / bundle level override:

hook_rdf_mappings() 'bundle' => my_content_type,

3. Alter mappings for existing bundles:

rdf_mapping_save()

49

Entity type level RDF mappings

50

Entity type level RDF mappings

nodesioc:Item,

foaf:Document

titledc:title

creation datedc:created, dc:date

bodycontent:encoded

usersioc:UserAccount

sioc:has_creator

user name

termskos:Concept

dc:subject

descriptionskos:definition

nameskos:prefLabel,rdfs:label

foaf:name

commentsioc:Post,

sioct:Comment

sioc:reply_of

sioc:reply_of

modification datedc:modified

number repliessioc:num_replies

vocabularyskos:Concept

Scheme

skos:inScheme

skos:broader

term descriptionrdfs:comment

namedc:title

homepage

foaf:page

titledc:title

creation datedc:created, dc:date

bodycontent:encoded

modification datedc:modified

sioc:has_creator

51

Content type / bundle level RDF mappings

52

Content type / bundle level RDF mappings

53

Custom mappings with rdf_mapping_save()

54

Custom mappings with rdf_mapping_save()

55

Drupal 7 RDFa internals•Mappings cached with entity info (fast)

•RDFa markup added via the theme layer. Impacts performance on pages with many comments: turn on page cache.

56

CreditsMark Birbeck

Alex Bronstein

John Breslin

Benjamin Doherty

Stefan Freudenberg

Rolf Guescini

Daniel F. Kudwien

Florian Lorétan

Frédéric Marand

Benjamin Melançon

John Morahan

Dries Buytaert

Angie Byron

catch

chx

Peter Wolanin

Barry Jaspan

yched

Christopher Ruppel

Kanok Ausawawaranun

John Breslin

Scriptall

cocoate

Frank Febbraro

Dirk Ruediger

Lin Clark

Prometheus

William Hayes

Christopher Albrecht

Roundabout Publications

Aris Vidalis

Gerard Roos

Ludovico Fischer

Johannes Keizer

Hobury

Benjamin Doherty

Giorgos Kontopoulos

Thomas Speer

Łukasz Kowalski

Raul Pedro Fernandes Santos

Alexander Langer

Robert Douglass

Rob Loach

Andrew Kennedy

Knud Möller

Udo Gerhards

Kevin Bridges

Peter Galiba

57

Sponsored by

58

http://cph2010.drupal.org/node/14733

59

top related