About Vazaar 0.4 Beta development
After months of improving my skills with Python and PyGTK and reading documents about semantic web and its integration with Desktops Interfaces (like GNOME or KDE) a lot of improvements have been made in Vazaar. This is an overview of the current state of development.
The presentation layer, the GUI, is more difficult to develop than I’ve ever thought. Althought the concept is simple: given any kind of data, transform them into triples (subject, predicate, object) and operate with them, the time consumed to create an infrastructure around the program has been very high.
As resources can be added at any time, I had to develop a system of queues (qIn and qOut). Furthermore, I had to deal with very high responsiveness times. It’s very annoying when the GUI gets frozen because the kernel is working in other stuff. So I had to implement threads (one thread for the kernel and another thread for the GUI). Along the way, I’ve found a lot of code (see source code in Launchpad) which has helped me to carry on.
In some way, I would like to forget these kind of glitches when I’m developing a Desktop application (not a kernel module). Maybe I’ve learnt something about gtk threads but nothing interesting for this project. Never mind…
I’m still reading some documents and asking about how to create a data model around NEPOMUK. By using the semantic web paradigm things change a lot. There are no database records or tables. Instead there are thousands (or hundreds of thousands) of triples.
But it looks easiest than I thought, at the moment.
Everything is a resource (even collections). A resource has a unique identifier (UUID objects according to RFC 4122). Every resource belong to a unique Nepomuk class. They are a small subset of classes with their properties. Examples of Nepomuk classes are:
- nfo:Feed
- nfo:Website
- nfo:RemoteDataObject
- nfo:Image
- nfo:Audio
- nfo:Clipboard (this class doesn’t belong to NFO but I need it until I find a smart solution for copypaste operations).
As I say before, a collection is a resource. It belongs to the class Collection from PIMO namespace and use the property nie:hasLogicalPart to link resources.
Example of a single resource:
<nfo:Image rdf:about="vazaar://7971c05a-3a69-469e-875c-5ec76b0d0cfb">
<nao:created>2009-06-09 17:34:51</nao:created>
<nie:title>comment-icon.png</nie:title>
<nao:lastModified>2009-06-09 17:34:51</nao:lastModified>
<nie:mimeMedia>image</nie:mimeMedia>
<nfo:fileUrl>/home/kaskaras/Documentos/vazaar-export-r303/data/icons/comment-icon.png</nfo:fileUrl>
<nfo:fileBasename>comment-icon</nfo:fileBasename>
<nfo:fileScheme>file</nfo:fileScheme>
<nfo:fileName>comment-icon.png</nfo:fileName>
<nfo:fileExtension>png</nfo:fileExtension>
<nfo:fileSize>3269</nfo:fileSize>
<nfo:belongsToContainer>/home/kaskaras/Documentos/vazaar-export-r303/data/icons</nfo:belongsToContainer>
<nie:mimeSubtype>png</nie:mimeSubtype>
<nie:mimeType>image/png</nie:mimeType>
</nfo:Image>
And here and example of a collection:
<pimo:Collection rdf:about="vazaar://9fcea6ca-cc79-4259-baff-6c025319a36e"> <nao:created>2009-06-09 17:35:13.338280</nao:created> <nie:title>/home/kaskaras/Escritorio/screenshots</nie:title> <nao:lastModified>2009-06-09 17:35:13.338280</nao:lastModified> <nie:hasLogicalPart> <nfo:Image rdf:about="vazaar://15e820cb-398c-4917-b162-3b6d10cd8054"> <nao:created>2009-06-09 17:35:13</nao:created> <nie:title>Pantallazo.png</nie:title> <nao:lastModified>2009-06-09 17:35:13</nao:lastModified> <nie:mimeMedia>image</nie:mimeMedia> <nfo:fileUrl>/home/kaskaras/Escritorio/screenshots/Pantallazo.png</nfo:fileUrl> <nfo:fileBasename>Pantallazo</nfo:fileBasename> <nfo:fileScheme>file</nfo:fileScheme> <nfo:fileName>Pantallazo.png</nfo:fileName> <nfo:fileExtension>png</nfo:fileExtension> <nfo:fileSize>188465</nfo:fileSize> <nfo:belongsToContainer>/home/kaskaras/Escritorio/screenshots</nfo:belongsToContainer> <nie:mimeSubtype>png</nie:mimeSubtype> <nie:mimeType>image/png</nie:mimeType> </nfo:Image> <nie:hasLogicalPart> <nie:hasLogicalPart> <nie:hasLogicalPart> <nie:hasLogicalPart> </pimo:Collection>
Right now, no problems working with this model. It is simple and I think that powerful. But I haven’t finished of defining the basic core of properties for a given resource (single or collection). Thinking in the future of this application, I would like to expose public resources through a SPARQL End Point so another semantic application will be able to ask it. It shouldn’t be so hard as I’ve seen a couple of python libraries to implement it. But the most important now is to have a solid model which I can work with.
Summing up, this is the result of the of the current code:
It’s a prototype. Don’t expect too much. In the next weeks I’ll try to work in the GUI adding visual improvements and new funcionalities.
Similar Posts:
- Extrayendo metadatos: libextractor
- Nepomuk
- GUI improvements
- Reports with Cheetah templates
- What is coming in the next version
Attached Files:
- vazaar-04-about
- vazaar-04-export
Serialize database into a RDF file. No compression.
- vazaar-04-import
Import a previous database export.
- vazaar-04-query
Basic SPARQL editor for advanced users.
- vazaar-04-sourceview
by using GtkSourceView python bindings
- vazaar-04-starthere
It's the front page of the program where you can view last resources imported, copy pasted resources and collections
- vazaar-04-viewimage
Vazaar implements a very basic image viewer
- Vazaar RDF Model example
This example shows how Vazaar store data into RDF.








