[Nepomuk] Re: Metalink properties/elements to Nepomuk

Sebastian Trüg trueg at kde.org
Wed May 4 10:47:33 CEST 2011


On 05/04/2011 12:26 AM, Matthias Fuchs wrote:
> 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! 

It does indeed look correct to me. :)

Cheers,
Sebastian


More information about the Nepomuk mailing list