[Kde-pim] Akonadi <-> Nepomuk interaction

Christian Mollekopf chrigi_1 at fastmail.fm
Sat Feb 19 13:33:57 GMT 2011


Hi,

As I don't feel that there is a real solution how to handle notes and kcal 
items in akonadi and nepomuk.  I'm going to explain here how I plan to 
implement the interaction between aknoadi::items and nepomuk::resources in my 
application.

I know there is some work going on in Baske/Semnotes/Kjots and the issue has 
been discussed before focusing on notes. But as I couldn't find a real 
conclusion on the ml, and since I have some more requirements/usecases, I 
think it is time to continue this discussion =)

Usecase:
My application manages Incidences (todos/events) and Notes using the KCal and 
Akonotes resource in akonadi. (I do believe that storing those in akonadi is 
the right way, and storing them in nepomuk is not a valid option for various 
reasons).

I organize all items using PIMO::Topics (instead of collections inside 
akonadi). Further I plan to add functionality to associate random data (files, 
websites, mails, ...) with the topics and/or a certain Akonadi::Item using 
Nepomuk.

One functionality which showed some further requirements, is converting i.e. a 
note to an incidence. This made me realize that I'm normally actually tagging 
the Content of the note/event/todo and not i.e. todo itself.


All of this lead me to the following conclusion how to handle those items in 
Nepomuk:

For each Akonadi::Item I create a Nepomuk::Resource (Content Resource) of the 
type NFO:HtmlDocument (since it is only the content, not the task itself) with 
an identifier consisting of an application-specific prefix + akonadi::item url 
(to avoid conflicts with the items generated in the nepomukfeeder agents).
For all annotations I use the pimoThing (Content Thing), on which I set the 
type PIMO:Document. (See the attached diagram for reference)

So if I convert the item i.e. from note to todo, which means deleting the old 
Akonadi::Item and creating a new one, I simply set the new Nepomuk::Resource 
(created with the new akonadi::item url) as a groundingOccurence of the 
existing Pimo:Document. This way all annotations remain untouched.

The obvious downside of this is, that other applications do not profit from 
annotations made in my application, and I am not yet sure how to overcome 
this. Maybe I can annotate the Nepomuk::Resource which has been created by the 
feederagent with the Pimo:Document of the same item, and therefore implicitly 
share the annotations?

Also I am not storing any real content in those Resources, I use the Content 
Resource and the Content Thing only to annotate the content of the item.
For fulltext search or similar things I expect to use the items created by the 
FeederAgent (meaning I will have to create a feederagent for notes as well).


Anyhow, this solution doesn't seem ideal, so I'd be interested how you guys 
intend to solve the issues. Especially what Resources you create and how you 
tell them apart from the ones created by the Feederagents.

Also are you using Nepomuk purely internal, or do you actually create content 
which could be reused by other applications?

Cheers,

Chris

PS: Some background info on my app in case youre interested 
http://gitorious.org/notetaker/pages/Home
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nepomukResources.png
Type: image/png
Size: 40173 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110219/3ff3ef74/attachment.png>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list