[Zope3-dev] Re: annotations/dc and component definitions

R. David Murray rdmurray+dated+1051989092.fc1e47@bitdance.com
Mon, 28 Apr 2003 15:11:27 -0400


"Garrett Smith" <garrett@mojave-corp.com> wrote:
> - I've noticed that several (most?) content types in Zope 3 use
>IAttributeAnnotatable to signal that they support annotation via object
>attributes. Should an interface omit a property (e.g. title,
>description, etc.) under the assumption that it will be handled via
>"metadata"? (A good example of this is the NewsSite INewsItem interface
>-- it only defines teaser and body, letting DC annotations handle the
>rest.)

I could be wrong, but I think you have some confusion here about
what IAttributeAnnotatable means.  It doesn't mean, for example,
that the 'title' metadata will be held in a 'title' attribute of
the object.  It means that a single, specific reserved attribute
name may be used for storing annotations for that object (as opposed
to, say, storing annotations for that object in an SQL database).
If I remember correctly, the default IAttributeAnnotatable adapter
implements this by storing a BTree of BTrees in the reserved
attribute.  Individual annotation sets are keyed by component name,
to avoid name-space collision.

So, name space *collision* isn't a problem.  But as Steve said,
a way is needed to simplify cooperation between different
meta-data providers that are defining attributes that ought
to share a common implementation.

--RDM