[Nepomuk] Re: Using nfo:OperatingSystem
Sebastian Trüg
trueg at kde.org
Tue May 3 11:23:04 CEST 2011
On 04/24/2011 03:45 PM, Matthias Fuchs wrote:
> Hi there,
>
> I have another question regarding ontologies.
> The Metalink specification supports OS fields, these contain the OS a file is
> for.
> E.g. "test.exe" could have "Windows XP", "Windows Vista", "Windows 7" ...
> assigned to it. [1]
>
> Now I wonder how I should assign these oses to the downloaded file.
>
> Suppose we have a Nepomuk:Resource dest (the downloaded file), would the
> following be ok?
>
> QList<Nepomuk::Resource> oses;
> foreach (const QString &osString, osStrings) {
> Nepomuk::Resource os(osString, NFO::OperatingSystem);
> os.setLabel(osString); //or rather os.setProperty(NIE::title(), osString)?
both are fine. nie:title would probably be more correct.
> }
> dest.addProperty(NIE::hasLogicalPart(), oses);
This does not make sense since the os is not part of the file.
For now you have to use nao:isRelated.
It might make sense to add specific properties that express this
relation properly.
> //especially here I am not sure, how to correctly connect an
> InformationElement with a DataObject. Basically I want to say the file works
> on these oses.
>
> Thanks for reading! :)
>
>
> [1] Which terms to use, e.g. rather Windows Nt ... is not that clear in the
> spec.
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk
>
More information about the Nepomuk
mailing list