DownloadsBNFjavadocreadmeDemosInstallationHow to make queriesKnown BugsSquish-dev archives |
Contact: Libby Miller <libby.miller@bristol.ac.uk>
Full version, right out of CVS (sorry no anonymous
access available)
How to create...:
Create a codepiction database
This demonstrator uses the Postgres backend database to store RDF files
which describe images with people in them. It's based on an
idea by
danbri.
It uses queries like this one:
SELECT ?thumb, ?name, ?dd, ?mbox, ?uri WHERE (foaf::depiction ?x ?uri) (foaf::depiction ?z ?uri) (foaf::mbox ?x mailto:libby.miller@bristol.ac.uk) (foaf::mbox ?z ?mbox) (foaf::name ?z ?name) (foaf::thumbnail ?uri ?thumb) (dc::description ?uri ?dd) USING foaf for http://xmlns.com/foaf/0.1/ "+ dc for http://purl.org/dc/elements/1.1/ Have a look at Photo metadata: the co-depiction experiment to read more about it. Installation summary: install Postgres and Jakarta-Tomcat;
Longer/DIY version:
Install postgresDownload InklingAdd data to the databaseCreate a small schemas database
Installation summary: install Postgres and Jakarta-Tomcat;
Create an RSS 1.0 searcherThe example used here is content from the RDF Interest Group irc channel blogger, the 'chump', which produces an RSS 1.0 channel every day.
Installation summary: install Postgres and Jakarta-Tomcat;
Create a tiny in-memory demoThis tiny demo shows how you might make an in-memory query and format the results.
Installation summary: to create something similar, download and
install
Jakarta-Tomcat;
Create a tiny portalThis tiny demo shows how you might create an RSS-based portal using Inkling. RSS 1.0 is a simple, extensible XML/RDF format, originally for syndication of news stories. In its simplest form, it consists of a list of links in a container (a 'channel') with an associated logo, name, description, and url. RSS 1.0, unlike earlier versions, is extensible - you can Add 'modules' to describe different types of object: webpages (Dublin Core); events (events module). A portal-like interface can be built be displaying the RSS feeds from different sources, as the Sosig-grapevine system does.
The first thing you need to do is build a list of the RSS feeds you are
interested in, like this one,
for example.
This is a very simple list of RSS feeds classified according to their
subject. Then you can get a list of feeds you want to display by asking a
SquishQL query like this one:
select ?feedUrl, ?title where (dc::subject ?feedUrl ?subject) (rss::title ?feedUrl ?title) and ?subject ~ 'economics' using rss for http://purl.org/rss/1.0/ dc for http://purl.org/dc/elements/1.1 This technique is very useful if you would like to personalize the feed display according to subject. You could also personalize it according to the user id of a person, using a similar technique. Then you need to display the content of the RSS feeds themselves. The code for a JSP which does this is here.
This is the query it asks:
select ?item, ?ti, ?li where (rss::items http://chewbacca.ilrt.bris.ac.uk/events/events.xml ?seq) (?contains ?seq ?item) (rss::title ?item ?ti) (rss::link ?item ?li) using rss for http://purl.org/rss/1.0/ RSS 1.0 can be extended by adding modules, such as the events module. This means that simple RSS readers (like a Perl regex) can still display a RSS feed, because they ignore the parts they don't understand. More complex displayers can do interesting things with the new information. Some examples showing display in a calendar format are here and here. Inkling can do this by adding to the query. The query immediately below is the original query to get the RSS feed item titles, and links. The query below that asks for their startdate, enddate and location as well. select ?item, ?title, ?link where (rss::items http://chewbacca.ilrt.bris.ac.uk/events/events.xml ?seq) (?contains ?seq ?item) (rss::title ?item ?title) (rss::link ?item ?link) using rss for http://purl.org/rss/1.0/ select ?title, ?link, ?start, ?end, ?location where (rss::items http://chewbacca.ilrt.bris.ac.uk/events/events.xml ?seq) (?contains ?seq ?item) (rss::title ?item ?title) (rss::link ?item ?link) (ev::startdate ?item ?start) (ev::enddate ?item ?end) (ev::location ?item ?location) using rss for http://purl.org/rss/1.0/ ev for http://purl.org/rss/1.0/modules/event/
Installation summary: to create something similar to this, download
and install
Jakarta-Tomcat;
Create a calendar viewer using RSS 1.0+events channelsThis RSS+events calendar viewer is an in-memory demonstrator.
Installation summary: to create something similar, download and
install
Jakarta-Tomcat;
You can display a single RSS events module, or use a configuration file such as this one.
The demo uses the following queries:
SELECT ?event, ?desc, ?datee, ?dates
WHERE
(rss::title ?event ?desc)
(ical::startdate ?event ?dates)
(ical::enddate ?event ?datee)
and ?dates ~ '2002-07'
USING ical FOR http://purl.org/rss/1.0/modules/event/
foaf FOR http://xmlns.com/foaf/0.1/
rdfs FOR http://www.w3.org/2000/01/rdf-schema#
rss for http://purl.org/rss/1.0/
get the day's events
SELECT ?event, ?desc, ?datee, ?dates
WHERE
(rss::title ?event ?desc)
(ical::startdate ?event ?dates)
(ical::enddate ?event ?datee)
and ?dates ~ '2002-07-27'
USING ical FOR http://purl.org/rss/1.0/modules/event/
foaf FOR http://xmlns.com/foaf/0.1/
rdfs FOR http://www.w3.org/2000/01/rdf-schema#
rss for http://purl.org/rss/1.0/
dates are treated as strings. For the day query you could instead have an exact match and ?dates eq '2002-07-27' or a different name for partial match and ?dates like '2002-07-27' or avoiding any constraints
SELECT ?event, ?desc, ?datee, ?dates
WHERE
(rss::title ?event ?desc)
(ical::startdate ?event '2002-07-27')
(ical::enddate ?event ?datee)
USING ical FOR http://purl.org/rss/1.0/modules/event/
foaf FOR http://xmlns.com/foaf/0.1/
rdfs FOR http://www.w3.org/2000/01/rdf-schema#
rss for http://purl.org/rss/1.0/
However for the month query you need the ~ or 'like' constraint -
otherwise you have to loop through the entire month day by day.
Create an RDFWeb databaseRDFWeb friend of a friend database is a linked information system about people. There are several implementations available, and also a writeup by Edd Dumbill. Danbri did the earliest implementation in Perl. I did this one in Java a while later. Edd has an irc foafbot which uses Redland and has cool signing and provenance aspects. Leigh Dodds wrote the cool Foaf-a-matic, a javascript tool to help you generate foaf files. My implementation at least is very simple. It uses queries like this: select ?name where (http://xmlns.com/foaf/0.1/mbox ?x mailto:libby.miller@bristol.ac.uk) (http://xmlns.com/foaf/0.1/name ?x ?name) select ?image where (http://xmlns.com/foaf/0.1/mbox ?x mailto:libby.miller@bristol.ac.uk) (http://xmlns.com/foaf/0.1/img ?x ?image) select ?uri where (http://purl.org/dc/elements/1.1/creator ?uri ?per) (http://xmlns.com/foaf/0.1/mbox ?per mailto:libby.miller@bristol.ac.uk) select ?title where (http://purl.org/dc/elements/1.1/title ?uri ?title) select ?descripton where (http://purl.org/dc/elements/1.1/description ?uri ?description) The main problem is simply that you can't guarantee the structure of the data, and so you have to make several queries rather than one to ensure you get all the information (e.g. some created things might have titles and not descriptions; some people may have names but no images; or more than one name, and so on). This can mean implementatons can be quite slow. A simple RDF calendar agentIt's been annoying me for some time that people keep expecting me to store all of my calendar data in one place and assume that I can just copy and paste it in, or want to spend time doing that. So for example my work wants me to store my calendar data in a proprietory format that I can't sync with my palm, and which I can't share with my partner or my friends. It strikes me also that this is really a general problem with events data - it's not just a problem with technologies used - whether they sync with a palm pilot or not for example - it's more about keeping data in a place where it's most easy for the people that need to edit it to do so - and separating out those storage requirements from the question of who needs to read that data.
I think this is how it should be done and I think someone can do it better
than me (it looks like Mozilla is getting pretty close - see their
newsgroup on calendaring, and it can hold your pgp/gpg passphrase for
you). |