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

List:       nepomuk
Subject:    Re: [Nepomuk] Retrieve "linked" artwork file
From:       Sebastian TrĂ¼g <trueg () kde ! org>
Date:       2011-10-18 9:11:34
Message-ID: 4E9D42C6.9090706 () kde ! org
[Download RAW message or body]

On 10/18/2011 10:54 AM, daitheflu@free.fr wrote:
> Hi,
> 
> Thanks Sebastian, that helped me *a lot*.
> 
> I checked with NepomukShell and discovered that my artwork Resource had no NIE:url !
> I thought that the constructor would have automatically set it but it didn't, and it does not.

That is weird, it should normally work - maybe a bindings thing.

> Since the following wasn't sufficient :
> 
>     img = Nepomuk.Resource(coverpath, OntologiesUrls.image())
> 
> I just added :
> 
>     img = Nepomuk.Resource(coverpath, OntologiesUrls.image())
>     img.setProperty(OntologiesUrls.url(), coverpath)

Do this instead:

img = Nepomuk.Resource(KUrl(coverpath), OntologiesUrls.image())

> And that did the trick :)
> It's now working like a charm !
> 
> 
> 
> As for your Python tool that generate ontologies, that could be very interesting.
> I could have write one by myself, but I was too lazy. So I just hardcoded the one I needed.
> If yours is not too difficult to understand and if you're OK, I could maybe maintain it.

it is very simple. I just did not know where to put it...
I will try to find it again today.

Then again pretty much all the ontology URIs you need are already in
Soprano.Vocabulary and Nepomuk.Vocabulary - unless the python bindings
do not include them.

Cheers,
Sebastian
_______________________________________________
Nepomuk mailing list
Nepomuk@kde.org
https://mail.kde.org/mailman/listinfo/nepomuk

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

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