SPARQL enabling Roller

1 view
Skip to first unread message

Henry Story

unread,
Sep 20, 2006, 8:51:17 AM9/20/06
to atom...@googlegroups.com, bloged, Bizer Chris, Cyganiak Richard
Some ideas of how one could d2rq [0] Roller [1] (and other blog
platforms, but this is the one we are currently using at Sun). D2RQ
is a framework that allows one to map any relational database to RDF,
and then query the relational database using SPARQL. The idea is to
keep things as simple as possible to start off with, as everything is
still very new, and needs to be tested. Therefore the idea is to add
to the database only things that Roller can be secure in knowing are
true. Ie: we don't want to extract metadata from web pages (other
than image or hyperlink references, or things that can be known to be
factually true), as that gets one into problems of whether the
information is reliable.

This functionality could then be extended and be used by much larger
services such as Technorati. But it is easier to start off on a lower
traffic site such a blogs.sun.com .

I am not yet sending this to the Roller list, as I wish to get some
feedback first. Also one would have to introduce semantic web notions
on that list, which is more work. So I have limited myself to lists
that understand this well.
I will prepare a presentation for the Roller community when I have
worked out the details and if this turns out to make sense.

The Information Available
-------------------------

- Use the AtomOwl ontology to describe:
+ entries
+ feeds
+ categories
+ links
+ content

- Use foaf to describe people

- externalize every link that appears in a web page (so one can find
out quickly what blogs point to where)
every blog contains links to other entries. We could have
a :pointsTo link that relates a :Content to a url.

- a relation for trackbacks and referrers

- a relation for comments (will come in Atom Owl probably)


Use cases
---------

I think a huge number of use cases would pop up as soon as the
information is available.
Currently I need to think of a few that would be of use to a Blog
Editor/News Reader

- It would make it easy to find any other blogs that point to the
pages one is linking to, when one is writing en entry

SELECT ?id ?alt
WHERE {
[ a :Entry;
:id ?id;
iana:alternate [ :href ?alt ];
:content [ :pointsTo <http://sun.com/thumper/> ]
] .
}

The editor could make one aware of this, so that one can see what
others may have posted on the subject before continuing.

- One could find out how many people have read one's page. Now that
would make me more effective! I can imagine a small OSX widget that
would show the last referers and the number count for the day. (Don't
have a SPARQL query for this because I am not sure what the best way
to model this would be)

- keep track of comments to blogs one has read

SELECT ?comment
WHERE {
[ a :Entry;
:id <http://blogs.sun.com/bblfish/entry/
aperture_to_the_semantic_web>;
:comment [ :href ?comment ];
] .
}

if :trackback is a subproperty of :comment one also gets the
trackbacks

- find all entries that were published on a particular date, say Sep
11 2001

SELECT ?id
WHERE {
[] a :Entry;
:id ?id;
:updated ?dt .
FILTER ( ?dt > 2001-09-10T00:00:00Z"^^xsd:dateTime && ?dt >
2001-09-12T00:00:00Z"^^xsd:dateTime )
}

- list all entries written by a certain person

SELECT ?id
WHERE {
[] a :Entry;
:id ?id;
:author [ :email <mailto:henry...@sun.com> ] .
}

- find all categories being used

SELECT ?cat
WHERE {
[] a :Entry;
:category [ :term ?cat ] .
}

- What blogroll one is part of

SELECT ?feedId
WHERE {
[] a :Feed;
:id ?feedId;
:blogroll [ :link <http://blogs.sun.com/bblfish> ] .
}

- What pictures someone has published

SELECT ?picUrl
WHERE {
[] a :Feed;
:id <http://blogs.sun.com/bblfish>;
:entry [ :content [ :containsImage ?picUrl ]] .
}

This is just what I managed to think of just now. Any other ideas?

As more metadata becomes available in roller, such as delicious tags
perhaps (other ?), a lot more interesting queries will spring to mind.

Henry

[0] http://www.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/resources/
d2r-server-slides-www2006.pdf
[1] http://rollerweblogger.org/project/
[2] http://bblfish.net/work/atom-owl/2006-06-06/AtomOwl.html

Home page: http://bblfish.net/
Sun Blog: http://blogs.sun.com/bblfish/
Foaf name: http://bblfish.net/people/henry/card#me

Elias Torres

unread,
Sep 20, 2006, 1:37:44 PM9/20/06
to atom...@googlegroups.com, bloged, Bizer Chris, Cyganiak Richard
Henry,

A few months back I made the same connection, coincidentally after
meeting you in Cannes. I was chatting with Dan Connolly and we thought
this would be a good place to bridge the Atom/Blogs+SemWeb.

I think that at the time I wasn't fully aware of the maturity of
D2RQ/SquirrelRDF work and didn't find something to trivially convert
Roller custom schema to AtomOWL. But maybe now we find sometime to do it
given that both technologies have matured in the recent months.

Anybody interested in helping? I'm a committer on Apache Roller and
would gladly help anyone getting familiarized with the code base.

http://www.nabble.com/Roller-%2B-SPARQL-tf1292954s12275.html#a3440939

-Elias

Chris Bizer

unread,
Sep 21, 2006, 8:58:10 AM9/21/06
to Elias Torres, atom...@googlegroups.com, bloged, Cyganiak Richard
Hi Elias and Henry,

Richard Cyganiak wrote a D2R mapping for the WordPress database for the D2R
Server demo at WWW2006. This mapping might be a good starting point for
mapping the Roller database to AtomOWL. It is available at

http://www.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/mappings/wordpress.ttl

I think blogs are a cool application domain for SPARQL. If you run into any
problems while mapping the Roller database to RDF, just let Richard or me
know and we are happy to help where we can.

Cheers

Chris

> -----Ursprüngliche Nachricht-----
> Von: Elias Torres [mailto:eli...@gmail.com] Im Auftrag von Elias Torres
> Gesendet: Mittwoch, 20. September 2006 19:38
> An: atom...@googlegroups.com
> Cc: bloged; Bizer Chris; Cyganiak Richard
> Betreff: Re: SPARQL enabling Roller


--
Chris Bizer
Freie Universität Berlin
Phone: +49 30 838 54057
Mail: ch...@bizer.de
Web: www.bizer.de

Henry Story

unread,
Sep 21, 2006, 10:26:36 AM9/21/06
to atom...@googlegroups.com, Elias Torres, bloged, Cyganiak Richard
Ok I like it: the mapping is in turtle :-)

Looks like this could in fact be quite fun to do.

I found the D2RQ spec here: http://www.wiwiss.fu-berlin.de/suhl/bizer/
D2RQ/spec/
and all the relevant software here: http://www.wiwiss.fu-berlin.de/
suhl/bizer/d2r-server/
The ISWC example database is very nice.

On the Roller side, what version should I use? I imagine that one
that is close to becoming the next release for the Sun web site would
be nice - as that would give it some chance of being used soon. Also
is there a document that explains the table structure of the Roller
database, or is it thought to be self evident?

I have to go off to Salzburg in a couple of hours for a wedding, but
I'll be looking into this next week.

Henry

Elias Torres

unread,
Sep 21, 2006, 10:32:14 AM9/21/06
to Henry Story, atom...@googlegroups.com, bloged, Cyganiak Richard
This is the 3.0 RC2 branch

https://svn.apache.org/repos/asf/incubator/roller/branches/roller_3.0/

This is the 2.3 Install Guide but it's pretty much the same

http://rollerweblogger.org/docs/installguide/generated/roller-install-guide.html

Let me know if you run into any problems setting it up.

-Elias

>> --Chris Bizer

Henry Story

unread,
Sep 29, 2006, 9:58:09 AM9/29/06
to atom...@googlegroups.com
That mapping file is no longer available btw.

Henry


On 21 Sep 2006, at 14:58, Chris Bizer wrote:

Bizer, Christian

unread,
Sep 29, 2006, 10:04:20 AM9/29/06
to Henry Story, atom...@googlegroups.com
Hi Henry,

there were some changes made on our server and .ttl files are not served any more :-(

So new URL http://sites.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/mappings/wordpress.txt

Cheers

Chris


-----Ursprüngliche Nachricht-----
Von: Henry Story [mailto:henry...@bblfish.net]
Gesendet: Freitag, 29. September 2006 15:58
An: atom...@googlegroups.com
Betreff: Re: AW: SPARQL enabling Roller

Reply all
Reply to author
Forward
0 new messages