[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdepim/akonadi/agents
From:       Volker Krause <vkrause () kde ! org>
Date:       2009-09-22 12:00:17
Message-ID: 200909221400.21175.vkrause () kde ! org
[Download RAW message or body]


On Wednesday 16 September 2009 17:18:37 Sebastian Trüg wrote:
> On Wednesday 16 September 2009 16:30:33 Volker Krause wrote:
> > On Wednesday 16 September 2009 16:27:25 Sebastian Trüg wrote:
> > > On Wednesday 16 September 2009 15:54:22 Volker Krause wrote:
> > > > +void NepomukFeederAgent::tagsFromCategories(NepomukFast::Resource&
> > > >  resource, const QStringList& categories) +{
> > > > +  // FIXME: this voids the usage of the XFast classes...
> > > > +  Nepomuk::Resource res( resource.uri() );
> > > > +  foreach ( const QString &category, categories ) {
> > > > +    const Nepomuk::Tag tag( category );
> > > > +    res.addTag( tag );
> > > > +  }
> > > > +}
> > >
> > > better do this:
> > > resource.setProperty( Soprano::Vocabulary::NAO::hasTag(),
> > > tag.resourceUri() );
> >
> > tried that already, but NepomukFast::Resource has no method
> > setProperty().
>
> that is easy to add. We can do that in Berlin maybe.

my mistake, there is addProperty(), which seems to do the right thing.

However, there is a much larger problem here, related to the usage of the 
NepomukFast classes: They require a delete + add approach when updating 
information in Nepomuk for changed Akonadi items. However, this will lose 
additional information that have been added to the corresponding Nepomuk 
resource in the meantime, such as tags.

regards
Volker

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic