[Nepomuk] About files and nie:url
Sebastian Trüg
trueg at kde.org
Wed Feb 24 13:54:41 CET 2010
On Wednesday 24 February 2010 13:33:41 Alessandro Sivieri wrote:
> I am getting back to code after a whole month of exams here at the
> university, and I have a couple of questions about some new things that
> came up in Nepomuk (or, at least, that I have discovered today):
welcome back. :)
I hope your exams were successful.
> - now files seem to have the structure filex://some-id/file/path in
> nie:url (at least if indexed by Strigi), so I have to change the regexp
> in Sembrowser: is this correct? Does this always happen now?
No, filex:/ is only used for relative file URLs on removable media that have
been unmounted. This is handled transparently by the nepomuk kio slave and
Nepomuk::Resource.
But you are right, the problem with the regex to restrict to a specific folder
could be a problem. We should think about that at another time.
> - if I want to associate, for example, tags in a (python) script, I used
> to create a Nepomuk::Resource, passing a full file path as argument of
> its constructor, and then call setTags; now, if I do this, nie:url is
> again file:// (as before), and it becomes a different resource from the
> one indexed by Strigi (which has filex://): how can I get the resource
> given a file path?
Normally Nepomuk::Resource should handle this transparently and translate a
file:/ URL into a filex:/ one if the medium in question is mounted.
Could you give me a full example please?
> - and last: if I create a Nepomuk::Tag, passing the label to the
> constructor, it is set as the nao:identifier but not as nao:prefLabel:
> shouldn't it be associated, too? Or should I do it "by hand"?
That always needed to be done by hand. I suppose we need nicer tag handling
classes in libenpomuk...
Cheers,
Sebastian
More information about the Nepomuk
mailing list