[Zope-CMF] Dublin Core

Dieter Maurer dieter@handshake.de
Thu, 14 Jun 2001 23:25:14 +0200 (CEST)


Shane Hathaway writes:
 > ...
 > So I propose that content objects have a special attribute called
 > "metadata".  It would be an opaque attribute; only the portal_metadata
 > tool would know anything about its contents.  The portal_metadata tool
 > would then implement the following methods (or similar):
 > 
 >   getMetadataFor(ob) --
 >     Invoked by the catalog tool, returns a dictionary containing
 >     all metadata for a given object so the data can be cataloged.
 > 
 >   getMetadataElementFor(ob, name, default) --
 >     Invoked by the presentation layer, returns the given metadata
 >     element or the default.
 > 
 >   setMetadataFor(ob, values) --
 >     Verifies that the user has "Modify portal content" permission
 >     on 'ob' then sets the metadata for 'ob'.  'values' is a dictionary
 >     (or a REQUEST).
 > 
 > The tool could also choose to store metadata in a flat database rather
 > than in the "metadata" attribute.  By default, the tool would use Dublin
 > Core as the metadata definition.
 > 
 > What do you think?  Would this serve more needs?  Or would it make
 > things harder?  Metadata attributes would no longer be direct attributes
 > of objects.  But I think it is a good trade-off.
I like it.

I think it would be even nicer, if the metadata would have
have some structure: e.g. Dublin-Core + Scheme1 + Scheme2
similar to named PropertySheets versus a single flat list
of properties.


Dieter