incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <christophe.lomb...@sword-technologies.com>
Subject Re: Mapping of Items
Date Mon, 21 Mar 2005 19:57:17 GMT
Sandro,

Did you check what Oliver did ? I'm working with him in order to see 
what we can do together. I hope to make a proposal to this mailing asap.
Your ideas are interesting and we are working in the same way. If you 
have not a lot of time, please check what Oliver did and give us your 
point of view.
Giving your own point of view is already a great contribution.

What about the JCR node types ? Node type management seems for myself 
the most unclear area when we are speaking about mapping java beans to a 
JCR repo.
It should be nice to give some flexibilty : either the object gragh is 
serialised in a unstructurred set of nodes or is serialised by following 
mapping rules defined in a file (something like in ORM tools : OJB, ....)
What do you think about that ?

Christophe

Sandro Böhme wrote:

> Hello,
>
> the basic idea is, to use the bean class structure as the master and 
> create the nodetypes according to the bean classes. E.g it could be 
> possible to create the beans out of an uml tool.
> At the moment I can imagine the following use cases:
> a) creating the nodetype structure at design time
> b) reading beans from nodes at runtime
> c) writing beans to nodes at runtime
> d) persist beans to the persistance layer
> e) maintaining the bean structure (rename beans or properties, delete 
> beans or properties, change the type of the bean or property...)
>
> I think use case e) need some definition (specification like 
> xdoclet,... or a user interface) what to do with data whose type has 
> changed. So I would think about further until the basics work.
> I'am sorry in advance, because I have not that much spare time, so it 
> will need some time until I can complete some tasks. But I will do my 
> best.
> First I would like to create a textual mapping between JCR features 
> and Java features like:
> Mixin = Interface
> Node Type Name = Class Name
> isMixin = this.getClass().isInterface()
> ...
>
> some initial ideas:
> a) Maybe we can use the Struts bean introspection to check the beans, 
> create the nodetypes out of that information and registering them. Too 
> bad, that creation and registering of nodetypes is not part of the 
> JCR-spec :-(.
> b) With
> bean class name     equals node type name and
> bean property name     equals child node name or property name
> it should be possible to use the JCR introspection to get the node 
> values.
> Maybe we can provide the data by a generic
> Object getProperty(Object beanObject, String propertyName); method.
>
> c) Similar to b)
> Maybe we can set the data by a generic
> void setProperty(Object beanObject, String propertyName); method.
>
> d) We could provide two save methods like saveBean(Object beanObject) 
> and saveBeanProperty(Object beanObject, String beanProperty).
>
> When I thought about mapping a bean class graph to a persisting graph 
> I thought this problem should be already solved some years ago by 
> object databases. So I will do some research if there are some 
> tools/concepts which will work in our use cases.
> What do you think about all this?
>
> Best regards,
>
> Sandro
>
> Oliver Kiessler wrote:
>
>> On Fri, 18 Mar 2005 21:39:30 +0100, Christophe Lombart
>> <christophe.lombart@sword-technologies.com> wrote:
>>
>>> Sandro Böhme wrote:
>>>
>>>
>>>> Hello Christophe,
>>>>
>>>> at the jackrabbit mailing list you said, you may want to implement a
>>>> mapping layer between java objects and node objects. If there is
>>>> nothing yet started in this direction I would try to implement a first
>>>> version of it. If there is already some work done, I would like to
>>>> participate, if you want.
>>>>
>>>> Best regards,
>>>>
>>>> Sandro
>>>>
>>>
>>> Olivier Kiessler is working on that (see on
>>> http://www.techblogs.de/roller/page/okiess). You are welcome to join
>>> us.  It should be nice to see ASAP a proposal on that topic.
>>
>>
>>
>> Yes, I have written some code for JCR object persistence/mapping. It
>> is not officially available yet, but if you are interested to join in
>> or have a look at it, you are very welcome. Let me know and I'll send
>> you the source code.
>>
>> regards,
>> oliver
>>
>>
>


Mime
View raw message