[Nepomuk] Using nfo:OperatingSystem

Matthias Fuchs mat69 at gmx.net
Sun Apr 24 15:45:10 CEST 2011


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)?
}
dest.addProperty(NIE::hasLogicalPart(), oses);
//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.


More information about the Nepomuk mailing list