Get Your FOAF On: Events

Been to any good gigs lately? Why not record this additional information in your FOAF description?
Continuing the Get Your FOAF On series I’ll show you how to describe your attendance at an event, with some specific notes on conference attendance.


Describing events isn’t a goal for FOAF, but it is a goal of the RDF Calendar group who are developing an RDF schema for capturing calendar information. The RDF Calendar Taskforce, is an article I wrote for XML.com some time ago now, but provides some useful background on that groups activities and goals. They’re obviously much further along now and you can now found some detailed, and growing, documentation of their current calendaring vocabulary in the ESW Wiki: RDF Calendar Documentation.
One obvious way to tie together your FOAF description and your calendar, already expressed in RDF iCal, is to simply add an rdfs:seeAlso property to your description to point at your calendar:

<foaf:Person xmlns:ical="http://www.w3.org/2002/12/cal/ical#">
<foaf:name>Pope Gregory XIII</foaf:name>
<rdfs:seeAlso>
<ical:Vcalendar rdf:about="http://pope.gregory.name/calendar.rdf"/>
</rdfs:seeAlso>
</foaf:Person>

In the above snippet we are indicating the type of the resource involved in the the rdfs:seeAlso relationship to indicate to a Scutter that it can expect to find calendar data at the target URL.
But how does one go about creating an RDF iCal description? There are several different ways. Firstly many applications, including Mozilla and iCal will generate a calendar in the original iCalendar (“ics”) format. From there you can easily convert it into the RDF version using Masahide Kanzaki’s online RDF iCalendar convertor.
The convertor allows you to convert data by pasting it into the provided text box (if you’ve got in stashed on your hard drive) or by passing it a URL (if you’ve shared it online). If you’re a .mac user you can simply grab the “Download” link from you’re online calendar and pass it to the convertor in the box provided. Be sure to uncheck the “use XSLT for rendering” checkbox on the RDFiCal convertor so that you get the raw RDF rather than an HTML view of your calendar.
Another pain-free way to get yourself an RDF iCalendar is to use eventSherpa which will perform all the heavy-lifting for you, including automatic conversion to RDF. I’ve not used
these service personally, so would be interested in hearing other peoples opinions.
Let’s assume for a moment though that, like me, you’re not organized enough to actually maintain a calendar. What if you want to just list your attendance at an event, e.g. a gig, directly in your FOAF description?
You can do this by adding RDF iCal statements directly into your FOAF description. Here’s an example that you can use as a template. Assume for the sake of the example that the ical namespace (http://www.w3.org/2002/12/cal/ical#) has already been declared:

<foaf:Person rdf:nodeID="me">
<foaf:name>Leigh Dodds</foaf:name>
</foaf:Person>
<ical:Vevent>
<ical:attendee rdf:nodeID="me"/>
<ical:summary>Big Chill Festival 2003</ical:summary>
<ical:dtstart rdf:parseType='Resource'>
<ical:date>2003-08-01</ical:date>
</ical:dtstart>
<ical:dtend rdf:parseType='Resource'>
<ical:date>2003-08-03</ical:date>
</ical:dtend>
</ical:Vevent>

Which says that I attended the Big Chill Festival between 1-3 August 2003. The event is described with a simple summary, as well at the start and end dates. The ical:attendee property is used to tie me (the attendee) to the event. Check the RDF Calendar Documentation for more details on other useful properties of events.
Rather than hand-code multiple events why not try out the RDFiCal-a-Matic another handy tool from Masahide Kanzaki. Just like the FOAF-a-Matic this is a simple Javascript application that lets you fill out some form fields to generate your RDF data.
There’s an outstanding problem with describing events that’s worth summarising before we move on: there’s no unique identifier for the event, and hence no easy way to merge event descriptions together. In FOAF this is typically solved by defining an Inverse Functional Property that can be used to identify and merge resources. However there are no such properties currently defined for events. One possible workaround is to use foaf:homepage property, assuming the event your describing has a distinct homepage, which unfortunately isn’t always the case. As an end user though this shouldn’t dissuade you from marking up the data; I’ll update this tutorial with additional information as it becomes available.
Libby Miller has some good discussion of this and related issues on her weblog.
In the next installment of this series I’ll look at bit closer at some distinct types of events: Conferences, Births, Deaths and Marriages.

One thought on “Get Your FOAF On: Events

  1. Get Your FOAF On: Events

    An interesting article from Leigh Dodds weblog “Get Your FOAF On: Events” about extending your FOAF with information on attendance of various events.
    ldodds writes: Continuing the Get Your FOAF On series I’ll show you how to describe your attendance at…

Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 29 other followers

%d bloggers like this: