incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <>
Subject Re: [jira] Created: (GRFT-37) Final JCR Mapping Document PROPOSAL
Date Sun, 28 Aug 2005 08:43:25 GMT
Ooops my previous mail is incorrect. Sorry. here is my answer

2005/8/27, Oliver Kiessler <>:
> >  >Here is a simplification of the Sandro proposal....
> > I'm more for a mapping file similar to this:
> >         <mapping>
> >             <classAttributes
> > packageName="org.apache.portals.graffito.jcr.testmodel"
> > className="CmsObject"/>
> >             <nodeTypeAttributes nodeTypeName="graffito:CmsObject">
> >                 <supertype>nt:base</supertype>
> >             </nodeTypeAttributes>
> >             <subitemMapping propertyName="objectId" parameterType="long"
> > jcrPropertyDefinition name="graffito:parentId" />
> >        </mapping>
> Just to clarify things: We have two types of mapping files, one for
> the node type registration (bean to jcr custom node type mapping) and
> one for the actual persistence mapping of beans to jcr nodes. correct?
> Because I think Sandro is refering to the node type registration
> mapping file and Christophe is refering to the beans to jcr nodes
> mapping file.

What is not possible to create jcr node type with my proposal ? With
this file and the java instrospection API, I have all infor to
register node type. but maybe I'm wrong ?

Maybe we can adde more detail on that topic in our document proposal.
Is it make sense for you if we register node types like this :
* Register jcr node type should be an external tools that can be used
by other projects. This tools can be executed from ant, maven or a
more advanced tools (see what Oliver is doing in the Karma project).
* Since the node type management is out of the current JCR spec. We
need to create a set of tools (at least one for JackRabbit) . This
tools can call the appropriate jackrabbit  API (or the API proposed by
the JCR server).
* We can register node type with an xml file that looks like the
"custom_nodetyes.xml" (see the Jackrabbit project).
* In our case, we have 2 steps to register node type :
- Create a custom_nodetypes.xml from ou mapping file (and the Java
- Use the appropriate tools to import them into the jcr server

> One comment to the jcr-mapping proposal textfile:
> 2.2 The mapping file
> I would like to suggest to make field descriptors simpler:
> <field-descriptor fieldName="a1" jcrName="a1" />
> to
> <field-descriptor fieldName="a1" />
> If "jcrName" is not specified the same name as the "fieldName" is
> used. I would suggest to make "jcrName" optional.


> @Christophe: Please let me know where I can join in and help coding.

Now it is possible. I commited small refactoring. Let me know on which
area you want to work. Personnally, I would like to work  on the
Collection Descriptor. The current code is a little bit heavy.

Are you agree with the final proposal draft ? Please, add new info if
something is not clear or missing.


View raw message