incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Böhme <sandro.boe...@gmx.de>
Subject [JCR-mapping] Please vote: Custom node types in a seperate config file?
Date Sun, 11 Sep 2005 18:09:26 GMT
Hello,

to register custom node types the user need to be able to specify the 
JCR-properties similar to the
ItemDefinition, PropertyDefinition and NodeDefinition (see section 
6.7.12-6.7.14 of the JCR-spec).
The question is: should we introduce a second config file only for the 
node type registration or should
we include the properties needed for the registration in the 
jcrmapping.xml file.

In case the user does not want to use custom node types at all we could 
hide the complexity of the
custom node type registration in a second file. The user would only need 
to deal with the mapping from
the Java classes to the build in node types of the JCR.

With a separate config file the node type registration component does 
not have a relation to our
project and could be reused by other projects.

But maybe the basic question is:
Is the mapping from a Java class to a JCR node type a 1:1 mapping or is 
it possible that a Java class maps
to more than one JCR node type?

I always thought it is a 1:1 mapping. Every class has a node type. Every 
Java super class has a JCR super node type
and so on.
If I would like to change the name of a JCR item I need to change it in 
only one config file. If I like to change
a property of the mapping - no matter if it is the Java part of the 
mapping or the JCR part of the mapping I would know
at which position of the mapping graph I need to search.

But of course if there is a use case for a 1:n or a n:1 mapping a second 
file would make sense.
Do you think it is possible that a custom node type is mapped to more 
than one Java class?

What do you think?
Or if you already have an opinion, please vote:
[  ] +1 for a seperate config file only for the registration of custom 
node types
[ ] 0 don't care
[ ] -1 for having one mapping graph in one configuration file

Best regards,

Sandro

Mime
View raw message