kfilemetainfo progress

Jos van den Oever jvdoever at gmail.com
Sat Mar 3 20:16:58 GMT 2007


Hi all,

Here some notes on my progress on KFileMetaInfo this weekend.
The diff with kdelibs is about 160k at the moment and that with
kdebase is 8k. I'm not ready yet and I'm not sure if the quality will
be good enough for merging by tomorrow evening. We'll see. At any rate
I'd like to add the Strigi dependency to kdelibs already, to iron out
the problems that will cause too.

I'm mailing now because I'd love people to look at the interfaces to
see if they make sense. The implementation is mostly done by calling
Strigi, but it leaves room for other sources such as Nepomuks' RDF
store.

This is what the new KFileMetaInfo class looks like at the moment.
http://websvn.kde.org/branches/work/kdelibs-strigi/kio/kio/kfilemetainfo.h

There are 5 main classes:

 KFileMetaInfo
keeps a set if KFileMetaInfoItems that relate to a file or other
resource identified by a url.

 KFileMetaInfoItem
is a key-value pair where the key is a uri and the value is a
QVariant. A human readable name and description are available too.

 KFileMetaInfoGroup
This is a subset of KFileMetaInfoItems for a particular file. Subsets
may overlap and are defined by the urls of the properties.

 PredicateProperties
This class with the ugly name (suggestions are welcome) defines the
name, description, data type and hierarchy of a specific field. It
also provides a QValidator for the field.

The internals of the above classes have been hidden in
QSharedDataPtr<Private> classes.

 KFileWritePlugin
This class is a partial replacement for KFilePlugin. The read
functionality of KFilePlugin will go into strigi analyzers. Since
Strigi does not write, we need this class.

Cheers,
Jos




More information about the kde-core-devel mailing list