[Nepomuk] Re: Correct usage of ontologies?
Sebastian Trüg
trueg at kde.org
Tue Apr 5 19:23:37 CEST 2011
On 04/05/2011 05:10 PM, Matthias Fuchs wrote:
> Am Montag 04 April 2011, 18:26:39 schrieb Sebastian Trüg:
>> On 04/04/2011 05:34 PM, Matthias Fuchs wrote:
>>> Am Montag 04 April 2011, 15:38:39 schrieb Sebastian Trüg:
>>
>>> res.setProperty(NDO::referrer(), website);
>>
>> Hm, this is not correct as the domain of ndo:referrer is ndo:DownloadEvent.
>> You could either create a download event through
>> Nepomuk::Utils::createCopyEvent[1] or simply use nao:isRelated which
>> might be simpler but is less correct.
>
> Thank you very much for all the answers! :)
>
> Unfortunately I don't have the src-url, and also not the download start and
> the download end. Maybe I could modify the data-engine code, to at least have
> a direct link to the source. Though sometimes there is none, as comic plugins
> can combine images.
>
> So would
>
> Nepomuk::Resource copyEvent = Nepomuk::Utils::createCopyEvent(destUrl, KUrl(),
> QDateTime(), mWebsiteUrl);
The dest and src need to be exchanged. And I just checked the code.
Empty URLs are not properly supported and will result in bogus data. :(
> res.setProperty(NDO::referrer(), copyEvent);
>
> be correct in this case?
Nearly. The last call is wrong as the referrer is already set by the
createCopyEvent call.
And actually since you do not have the src URL I would suggest you do
not create a copy event after all. Maybe it would be better to simply
relate the comic web page via nao:isRelated:
Resource web(mWebsiteUrl, NFO::Website());
res.addProperty(NAO::isRelated(), web);
Cheers,
Sebastian
More information about the Nepomuk
mailing list