Hi Chris, I always figured that there would be only two resources: 1. The main indexed resource created by the feeder 2. The pimo:Thing that contains all the annotations and relations.
IMHO there is no need for a third resource which is maintained by your app. The only problem I see here is the update by the feeder since that should maintain the relation to the pimo:Thing. But I think that could be handled by the feeder. It simply needs to handle updates differently than a simple delete+add. Instead it should make sure the resource URI is reused and the relation to the pimo:Thing is kept. Once that works you might only have to update the pimo:Thing type. I am not sure if this should also be done in the feeder or if your app should do that. Cheers, Sebastian On 02/19/2011 02:33 PM, Christian Mollekopf wrote: > 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 > > > > _______________________________________________ > Nepomuk mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/nepomuk _______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
