[Nepomuk] Request for comments on new Nepomuk API

Vishesh Handa handa.vish at gmail.com
Thu Aug 5 16:05:46 CEST 2010


I like it, but it won't work.

Due to the messy internals of Nepomuk::Resource, you'll have to call
*determineFinalResourceData()
*before calling ResourceData::isFile() in Resource. If you don't do that
then you'll get code like this -

Resource r1("nepomuk:/res/res-uuid");
r1.isFile(); // will always says false even though the resource might be a
file
r1.rating(); // determineUri has now been called internally
r1.isFile(); // now it will return true if the resource is a file

If you want I could write a patch. I may be wrong, I haven't looked at the
patch that carefully.

- Vishesh Handa

On Thu, Aug 5, 2010 at 5:17 PM, Sebastian Trüg <trueg at kde.org> wrote:

> Hi guys,
>
> I just wanted to hear your opinions on the attached patch which
> introduces a Nepomuk:File class derived from Nepomuk::Resource. That new
> class has url() and dirResource() methods to handle file resources more
> conveniently.
>
> Cheers,
> Sebastian
>
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20100805/98f129d2/attachment.htm 


More information about the Nepomuk mailing list