[Nepomuk] A question regarding doubletyping

Sebastian Trüg sebastian at trueg.de
Mon Feb 20 13:23:11 UTC 2012


On 02/15/2012 03:01 PM, Jörg Ehrichs wrote:
> Hi everyone,
> 
> I have a small issue with the "correct" usage of the double typing of
> files with other resources types. As this issue was hard to explain to
> Sebastian on irc I'll try it via mail.
> 
> So I've seen Sebastian used doubleTyping for his nmm.TVShow stuff and
> it turned out to be a great help.
> As Dolphin can now display all additional information which is related
> solely to the series resource without following some additional link.
> 
> I would like to do the same with my nbib ontology part.
> But before I start to change everything I like to go over a few
> scenarios that cause a small headache to me.
> 
> The current situation (small uml diagram can be seen here [1] ). I
> create nbib:Publication resources that contain all the important data
> and other connections.
> Furthermore I use nbib:isPublicationOf to connect the nbib:Publication
> resource to its file (which is either a local file nfo:FileDataObject
> or a remote resource for a file stored on an ftp server and such
> nfo:RemoteDataObject)
> 
> In the same way I create a back link from the file to the
> nbib:Publication resource via nbib:publishedAs.
> 
> Now when I want to adopt the doubleTyping technique I would take the
> localFile resource and doubleType this (either attach the
> nbib:Publication data + type directly to the nfo:FileDataObject, or
> merge the two resources if the publication existed before the user
> downloaded the file).
> 
> This creates now the situation, that I could still use the
> nbib:isPublicationOf/nbib:publishedAs connection to get the proper
> data (as now nbib:isPublicationOf point to itself) and also dolphin
> can show the additional data
> without knowing about my links.

A first feedback: your solution is conceptually better than the NMM one.
There could be several incarnations of the one publication, one pdf, one
ps, one dvi, one tex file collection. All the same publication. With
double-typing you have to copy the information to each file resource.
The same is true for TV shows. Here we chose the easy route instead.

> So far so good.
> In most cases nbib:Publications are articles and other pdf files which
> are available as 1 pdf this cause no further trouble.
> But now I have a few books, where I scanned in only a few chapters.
> 
> The way I do it now is, that each chapter is linked via
> nbib:IsPublicatonOf / nbib:isPublishedAs to the one nbib:Publication
> resource.
> In my program I can now simply see 1 nbib:Publication and get all the
> files for it.
> 
> The problem: When I decide to do doubleTyping, where would I attach it to?

the only chance here would be to use finer-grained types where one file
can be a chapter or a part which leads to a bit of confusion. I would
suggest to stay with the current non-double-typed solution and improve
dolphin instead.

> Problem 2:
> The user specified a remote address to the publication and has the
> file on disk (double typed) now he deletes the file locally ( saves
> space and the important information will stay in nepomuk, also as he
> has a link for the remote address he can get it whenever he wants
> again)
> But what to do with the doubleTyped resource?
> * Will the resource be deleted completely when the file is deleted
> too? (get such resources deleted anyhow?)

yes, it is gone.

> * Should check always if the local file exist otherwise and remove all
> unnecessary entries on my own?

no, nepomuk takes care of that. Of course nepomuk does not remove
nbib:Publications that are linked to the files. Except if you specified
that the publication is nao:hasSubResource of the files. This is a bit
confusing but very helpful.

>   (So removing the types nfo:Document, nfo:FileDataObject etc) and all
> the properties I don't "need anymore"
> 
> Problem 3:
> And what if the user made a mistake. He selected the wrong pdf file to
> be the local representation of his nbib:Publication resource.
> Now he wants to remove the "link" and select another resource.
> * Is there a way to "split" such data again so I could sue a different
> file resource afterwards

In case of double-typing you would have to removeDataByApplication for
that resource and then add it again on the new file.

Cheers,
Sebastian

> * Again should I remove all data for this file that was not created by
> my program, connect it to the other file (means merging)
> 
> I hope my current problem is clear and someone could enlighten me,
> what the best solution would be to solve the scenarios described
> above.
> 
> Kind Regards,
> Jörg Ehrichs
> 
> [1] https://projects.kde.org/projects/playground/edu/conquirere/repository/revisions/master/entry/nbib/design_overview.jpeg
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk
> 


More information about the Nepomuk mailing list