incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Böhme <>
Subject Re: JCR mapping - step 2
Date Thu, 31 Mar 2005 11:36:23 GMT

Christophe Lombart wrote:
> Sandro Böhme wrote:
>> Hello,
>> Christophe Lombart wrote:
>>> Hi all,
>>> I commited a small prototype (basic foundation to work together) for 
>>> the JCR mapping framework. See in the jcr-mapping subproject.
>>> Currently, it works like this :
>>> * There is a converter class/cms object registered in a config file 
>>> (see a example in jcr-mapping\src\conf\convertertest\converters.xml). 
>>> This config file is very simple for this prototype.
>>> * A simple converter class can be found in 
>>> org.apache.portals.graffito.jcr.testconverter.
>>> * It is possible to use custom JCR nodetypes or unstructured nodes.  
>>> This prototype is based on a node type called "graffito:folder"
>>> * Check the 
>>> jcr-mapping/src/test/org/apache/portals/graffito/jcr/session/impl/
>>> <>to get more info
>>> What about the next step  ? I think the following steps should be 
>>> interesting :
>>> * Add search capabilities
>>> * More unit tests
>>> * Build a more generic converter class. I'm thinking about a more 
>>> advanced config file.  Something like :
>>> <converters>      <converter class="org.mycmsframework.Folder" 
>>> converterClass="org.apache.portals.graffito.jcr.converter.GenericConverter" 
>>> nodetype="graffito:folder" >
>>>             <attributes>
>>>                   <attribute name="description" />
>>>                         <propertyNode name="graffito:description" />
>>>                   </attribute>
>>>             <attributes>
>>>             ....
>>>             <!-- add associations here -->        <converter>   
>>> </converters>
>>> * Any volonteer to continue this work ? Again, the code is still a  
>> yes, I would like to create a bean converter class at the weekend.
> ok - what do you mean about my config file proposal ?
I like it, because this makes it configurable with the converter class 
to use a direct bean class-->node type mapping or a node based mapping.
In my opinion we can also use it to describe JCR specific behavior for a 
  node type (mandantory properties,...).

I also like the idea to have an extra subproject, because I assume this 
reduces the dependencies to graffito and make it easier to share it with 
other projects (more uses-->more testers-->more feedback-->...)

In general I would like to maintain the bean class (properties,...) and 
the node type (mandantory property,...) at one place. E.g. with 
annotations in the bean class. We could than create the repository 
completely out of bean classes and could maintain a type in one place. 
But this is just an idea for later, when we don't have anything to do 
anymore ;-).

> If you plan to build a generic converter, I advise you to use 
> which is a very nice tools for reflection .
> There is a small example in the Graffito browser application (see the 
> BeanUtil class).
This was also my first idea, but when I saw the mapping class of Oliver, 
it looked like the apache reflection is not necessary and would just 
create a library dependency (but ok, I assume you already have that 



>> Regards,
>> Sandro
>>> *prototype* and you are welcome to send us patches, comments, new 
>>> enhancements, ...  I'm going to create a new component in JIRA.
>>> Thanks,
>>> Christophe

View raw message