[Nepomuk] Review Request: Set the main type as the type highest in the hierarachy

Vishesh Handa me at vhanda.in
Sat Jun 16 18:44:03 UTC 2012



> On June 15, 2012, 2:57 p.m., Sebastian Trueg wrote:
> > nepomuk/core/resourcedata.cpp, line 370
> > <http://git.reviewboard.kde.org/r/105265/diff/1/?file=67802#file67802line370>
> >
> >     "Note" is a sub class of "HTMLDoc". We want to use "Note" if "HTMLDoc" is our current type. Thus, the test is: if the storedtype (Note) isSubClassOf the current type (HTMLDoc) -> use the stored type.

Urgh. You're right.

The problem I had was that I have a resource with -

<nepomuk:/res/ff9103bf-e982-4c87-ae3c-a00bc5e459c3>
        rdf:type                nfo:HtmlDocument
        rdf:type                nfo:PlainTextDocument
        rdf:type                nfo:TextDocument
        rdf:type                nfo:Document
        rdf:type                nie:InformationElement
        rdf:type                rdfs:Resource
        rdf:type                pimo:Note
        rdf:type                pimo:Document
        rdf:type                pimo:LogicalMediaType
        rdf:type                pimo:Thing
        rdf:type                pimo:ClassOrThing
        rdf:type                pimo:ClassOrThingOrPropertyOrAssociation

In this case we have 2 trees -

nfo:HtmlDocument -> nfo:PlainTextDocument -> nfo:TextDocument -> nfo:Document -> nfo:InformationElement
pimo:Note -> pimo:Document -> pimo:LogicalMediaType -> pimo:Thing -> pimo:ClassOrThing -> pimo:ClassOrThingOrProperty:OrAssociation

I obviously want pimo:Note, but I often get nfo:Document. Any clue on how to solve this? Always prefer pimo over other ontologies? Cause we are going to have the same problem when we start storing a resource which is both a pimo:Person and a nco:Contact


- Vishesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105265/#review14763
-----------------------------------------------------------


On June 15, 2012, 11:34 a.m., Vishesh Handa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105265/
> -----------------------------------------------------------
> 
> (Updated June 15, 2012, 11:34 a.m.)
> 
> 
> Review request for Nepomuk and Sebastian Trueg.
> 
> 
> Description
> -------
> 
> It makes more sense show "Note" instead of "HTML Document".
> 
> 
> Diffs
> -----
> 
>   nepomuk/core/resourcedata.cpp 4e8554d 
> 
> Diff: http://git.reviewboard.kde.org/r/105265/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Vishesh Handa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20120616/c9a469ef/attachment.html>


More information about the Nepomuk mailing list