[Nepomuk] Navigating Nepomuk::Resources in Dolphin?

Matthias Fuchs mat69 at gmx.net
Wed Apr 27 10:05:26 CEST 2011


Hi,

while adding metada to files downloaded via KGet and comics stored on your 
computer I came across a problem and I think I have an idea which could solve 
it.

Suppose the following case:

Nepomuk::File downloadedFile(dest);
Nepomuk::Resource hashRes(hash, NFO::FileHash());
hashRes.addProperty(NFO::hashAlgorithm(), hashType);
hashRes.addProperty(NFO::hashValue(), hash);
hashRes.setLabel(hashType);
downloadedFile.addProperty(NFO::hasHash(), hasRes);

In this case Dolphin would show e.g. "Has hash: _MD5_", yet there would be no 
way to see what the actual hash looks like in dolphin. Clicking on _MD5_ would 
start a query. A kinda wrong workaround would be to directly do
downloadedFile.addProperty(NFO::hashAlgorithm(), hashType); and
downloadedFile.addProperty(NFO::hashValue(), hash);
what I do at the moment. But it is _really_ wrong.

What I thought of now is just an idea, nothing is implemented yet.
The user should have the possibility to browse resources in the side panel.
If clicking on a resource (e.g. middle click, as left click is already in 
useage) that one would be displayed instead, a back arrow would make it 
possible to go to the initial resource.

That way the following scenarios would be possible:
1. A user wants to check if a file that has a hash assigned to it is still 
valid. Clicking on "MD5" he is presented with the information needed and 
compares that with the output of md5sum.
2. A user wants to call a person, who a file came from, via telephone. To get 
the telephone number he would simply click on the person's name in the 
information of that file and then on the entry for "Has Phone Number".
He does not have to open a different tool like KRunner or the adress book. 
Everything would be visually directly connected to the file instead.

Now after looking shortly at the way the side panel is implemented there might 
be some problems e.g.: KFileMetaDataWidget request KFileItems, so it would 
have to be done inside of KFileMetaDataWidget since resources are no 
KFileItems. Which would change the meaning of the KFileMetaDataWidget.


What do you think of the general idea? Is it something worth looking into?


Cheers,
matthias


More information about the Nepomuk mailing list