Saturday, January 2, 2010

KOffice & RDF: Who, What, When, Where?

As mentioned in a previous post, ODF documents can contain one or more RDF/XML files. These files allow you to unambiguously encode information for both computer and human consumption. So you can describe a person in a way that tells you their phone number and also lets the computer know that these digits are a specific person's home phone number. Common data formats like vcard and ical have some encodings in RDF and soon a KOffice near you will understand these pieces of data from ODF files.

KOffice currently understands some of the FOAF vocabulary (storing contact data), and the rdfical format (for events). There are a few ways to encode longitude and latitude in RDF. The current patch supports two of them, with optional linking to rdfical. This is one of the major strengths of RDF, you can say who, where and when and also link these things together so an event carries not only a time but its location information too.

The below video shows the new RDF docker in aciton. As you click on text that has associated RDF, the docker shows you the interesting information. Frodo and Sam are assoicated with both traditional contact data and a location. The items in the RDF docker let you import them into your system (into kaddressbook or korganizer) or export them to well known desktop formats like vcard and ical. Editing locations is done with Marble and there is only a minimal set of information for contacts and events currently. Note that mid way through when I edit an event, timezones are respected. If the RDF describes an event as being in Tokyo, that timezone offset from your current localtime is respected.

Towards the end of the video I show that contacts can be simply drag and dropped between koffice and kaddressbook. This also works for events to/from Evolution but I had some issues with korganizer for events. D&D makes KOffice and ODF quite a convenient format for transmitting semantic information to colleagues in a single, self describing file.

KOffice & RDF: Who, What, When, Where? from Ben Martin on Vimeo.


Kevin said...

What kind of problems did you encouter with D&D from/to KOrganizer?

Did you check with the developers on or #kontact (freenode network)?

Lachu said...

What do you think about add menu entry File -> Information(or Search Information). User can specify more advanced search criteria, like phone number or asks for displaying all phone numbers.

monkeyiq said...

I was digging through the pim sources trying to work out what mime types it is looking to accept. I found one and added it to the KO docker to offer but a drop would always inform me that I couldn't add the event.

I'll definitely be pinging the ml/ircs on it, I imagine it is not too hard to get going.

In Evolution I can drop an event at a date/time to insert it into the calendar.

monkeyiq said...

@Lachu: Great idea! I would also like to have some regex or real time pre/infix matching happening. normally I can remember part of a phone number, or just the prefix to trim to a region.

Search by location might be handy too, if you want to narrow the search to find all the locations within 50km of a city.