Wednesday, November 02, 2005 8:01 PM
by
marcmill
What is Open Metadata?
In Windows Vista, you'll be able to register property handlers on your own file types. This is in fact what
my PDC Talk was all about. These property handlers are used to expose your file's contents to other parts of the system. They use a standard schema to enable stacking, grouping, filtering, and other metadata-search operations across heterogeneously typed items. The Universal Search Engine will for example call the registered property handlers to enumerate all the properties on each file during indexing. So, indeed, the most important feature that a registered property handler provides is metadata reading. In this sense, the interface for property handlers,
IPropertyStore, is a simplified version of
IFilter.
But property handlers provide another important feature. They allow the system to write metadata to your file types. Although this introduces extra complexity for the file type designer, it enables many cool end-user features. For example, a user doesn't have to start up the file's associated application in order to change the Author property. Instead, the user can simply select the item from within Explorer and drag it into a different Author stack. Or, just type in the name of the new Author into the preview pane.
Property handlers which support open metadata can reason over properties which aren't intrinsic to the underlying file type. These handlers can accept any value for any property, persist that value, and then return the same value later. And by "any property", I include those properties whose schema is invented after the property hander is written. Quite a trick!
Of course, the platform provides serialization APIs and other services to make it easier to support open metadata (the IPropertyStoreCache implementation returned by SHCreatePropertyStoreOnMemory supports IPersistStream), but usually adding this support to your file format carries some nonzero cost. So why do it? Supporting Open Metadata means that users can organize their files of your type along dimensions that you may not have anticipated. This is a very powerful idea! Here are some example scenarios that come to mind:
Open Metadata allows users to enable custom search and organize scenarios across heterogeneous sets of items.