The primary purpose was to provide a means of exporting my metadata. I do a little editing within PSE, but my largest investment is in the metadata attached to (almost) every photo.
I realize that you can (and should) backup your PSE catalog using the supplied tools, but this approach also provides a degree of independence should I ever wish to decamp to another product.
Plug-in Structure
The following diagram shows the plug-in dependency hierarchy. The diagram was produced using the brilliant Plug-in Dependency Visualization Tool from Ian Bull, also described here on his blog.
As can be seen from the hierarchy, I make use of a number of libraries, packaged as plug-ins.
- XOM - to provide XML support. See here for more details on XOM.
- SQLite JDBC driver. See here for more details.
Workbench Integration
Since I was aiming for the workbench, it made sense to provide some integration with the functionality you get for free! The two most obvious points are:
- workbench properties
- an image viewer
I have also encountered a great image viewer, courtesy of Wayne Beaton - see here for more details.
The great thing about making use of these functions is that they simply require an adapter to the required class to exploit the functionality.
- the Properties View needs an adapter to an IPropertySource implementation
- the Image View plug-in requires an adapter to an ImageProvider implementation.
Plug-in Functionality
It's pretty basic - a simple PSE Explorer View, which lists the contents of the catalog, and two menu options:
- one to load an existing PSE catalog file (SQLite database)
- one to export the loaded PSE catalog as an XML Document.
The plug-in functionality is initiated by the two command handlers (corresponding to the menu items) - that is, import and export.
The import function is facilitated by a simple DataProvider class. This provides the means of accessing the SQLite database and populating the model used by the viewer. The SQL used is similar to my earlier experiments.
The export function merely provides an XML transformer for the populated model. The results of the export looks like this:
Summary
This is just a starting point, but it has provided a easy way for exploring the PSE metadata. With a bit more polish, I'll see if I can release some of the code.
3 comments:
Evan, this is really, really neat. Any chance you could post your module on SourceForge or somewhere similar? Maybe it will grow and get new features that way!
thanks.
I'm looking at using google code at the moment. I may be able to get something up there in the next few days.
I'm not sure if anyone is tracking comments - but I've just put up a new post with details of the google code project.
cheers, Evan
Post a Comment