[Nepomuk] Re: Metalink properties/elements to Nepomuk

Matthias Fuchs mat69 at gmx.net
Wed May 4 00:26:25 CEST 2011


Thanks a lot for all the answers, especially sorting the nie:DataObject and 
nie:InformationElement issue. :)

Now I have again a question.
I set a publisher of something. The publisher can be anything, like a person 
or something else like a company. There can also be a url to that publisher.

if (!publisher.name.isEmpty()) {
        Nepomuk::Resource res(publisher.name, NCO::OrganizationContact());
        res.setLabel(publisher.name);
        res.addProperty(NCO::fullname(), publisher.name);
        if (!publisher.url.isEmpty()) {
             Nepomuk::Resource website(publisher.url, NFO::Website());
             res.addProperty(NCO::websiteUrl(), website);
        }
       file.addProperty(NCO::publisher(), res);
}

Is that correct?

Again thanks for your input, that really helped a lot! 


More information about the Nepomuk mailing list