incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <>
Subject Re: JCR-Mapping: Extend Bean/Collection/FieldDescriptor with support for node type management tools
Date Tue, 17 Oct 2006 11:12:24 GMT
No comment :-)

Thanks for this contribution. I'm waiting for your new jira issue.

Best regards,


On 10/17/06, Felix Meschberger <> wrote:
> Hi all,
> I started working with Graffito JCR-Mapping some weeks ago noticing that it
> actually implements what I planned to implement in my own tool - and more
> :-) So I started to like that thing. While working on it I thought, that it
> would be nice to define node types based on the mapping definitions and also
> noticed, that this is actually also supported by the mapping descriptors.
> Still, the support by the descriptors has some drawbacks: Field descriptors
> are thought to only map to properties, while collection and bean descriptors
> are thought to only map to child nodes. Consequently the field descriptors
> support attributes for property definition while bean and collection
> definitions support attributes for child node definition. While this
> assumption is mostly true, it fails in the case of multi-valued properties,
> which is implemented using a collection descriptor. I myself implemented
> another CollectionConverter, which supports residual jcrName values. Also in
> this case, the collection descriptor maps properties.
> Hence I proopse to extend the bean and collection descriptors with
> attributes for property definition. Namely I propose the addition of
> "jcrType" and "jcrMultiple" attributes which should contain the property
> type and multi-value flag respectively. The respective BeanDescriptor and
> CollectionDescriptor classes are to be extended for these attributes.
> To further simplify node type management tools, I further propose, to define
> two interfaces - PropertyDefDescriptor and ChildNodeDefDescriptor - which
> may be used by node type management tools to extract the relevant
> information to define properties and child nodes. The FieldDescriptor will
> only implement the PropertyDefDescriptor while the BeanDescriptor and
> CollectionDescriptor classes will implement both interfaces. The node type
> management tool will then have to apply heuristics to decide, whether a
> property or a child node should be defined.
> Attached you will find the patchs to the FieldDescriptor, BeanDescriptor and
> CollectionDescriptor classes as well as the proposed interfaces.
> What do you think of these extensions ? They certainly make my life easier,
> as I implemented a very simple node type management tool.
> Thanks for any comments.
> Regards
> Felix

View raw message