[Nepomuk] A question regarding doubletyping

Jörg Ehrichs Joerg.Ehrichs at gmx.de
Wed Feb 15 14:01:26 UTC 2012


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.

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?

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?)
* Should check always if the local file exist otherwise and remove all
unnecessary entries on my own?
  (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
* 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


More information about the Nepomuk mailing list