[Nepomuk] Akonadi:Contactfeeder problem

Christian Mollekopf chrigi_1 at fastmail.fm
Fri Nov 11 20:55:15 UTC 2011



On Thursday, November 10, 2011 9:54 AM, "Jörg Ehrichs"
<Joerg.Ehrichs at gmx.de> wrote:
> Hi Christian,
> 
> thanks for the answer.
> 
> > [...] Unfortunately the Nepomuk::Resource api has not been ported to
> > the DMS yet, but once this is done the resource will be automatically
> > merged based on the nie:url property.
> 
> Means as long as I add the nie:url="akonadi:?item=1234" to my created
> Resource the DMS part will merge
> any new Resource created with this together?
> 

Yes, the datastore service uses certain heuristics to decide if some
resources are identical. The nie:url is used as such an identifying
property.

> Is the adoption of the Nepomuk::Resources api planed for 4.8?
> 

AFAIK it has not been ported yet, so I guess it is too late. Sebastian?

> > user generated content should usually go to the pimo:thing and not the
> > akonadi resource directly, therefore the pimo:thing.
> 
> Currently all my authors and editors are created as nco:PersonContact
> and what I want is a way to get from this resource
> to the kaddressbook entry to offer a way to edit the resource in more
> detail or if no akonadi entry exist, create one in a user selected
> alonadi::collection and create the link between them.
> 
> Do I have to fiddle around with the pimo:thing/groundingOccurrence
> stuff myself or is it still enough to create the nco:PersonContact
> with the nie:url as described above and nepomuk does the magic behind the
> scene?
> 

The problem with using the Nepomuk::Resource API is that if the feeder
already created the item, the Nepomuk:Resource api will produce a
duplicate because there is no identification/merging.

But since you want to edit the contact, you will have to do that with
akonadi anyways, the feeder will then update the copy in Nepomuk. So,
just search the contact in nepomuk, if it's there, get the uri. The rest
you'll have to do in akonadi, the feeder will take care of
creating/updating the copy in nepomuk.

There is no writeback service from nepomuk to akonadi yet (and also not
in progress afaik) but ideally there would be. The writeback service
would be responsible to sync back changes from nepomuk to akonadi. Right
now we only have the akonadi-nepomuk-feeder which does the sync the
other way around. Just in case you care for the theory =)

> > Note there is currently a bug in nepomuk which prevents the new feeders
> > from working as expected.
> 
> Another good reason to wait for 4.8 and see how all the Nepomuk stuff
> works then :)
> 

I guess so, yes.

Cheers,
Christian




More information about the Nepomuk mailing list