[ 
https://issues.apache.org/jira/browse/JCR-877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600826#action_12600826
 ] 

gennadibereshnoi commented on JCR-877:
--------------------------------------

Hi  Christophe,
you propose to generate CND from java-class definition. It sound very similar 
with Webservice-related approaches with "WSDL-first" vs. "implementation first 
"...
..at the moment we decided to use the CND-first approach. This way produce 
java-source in next steps :
1. CND design
2. CND -> XML (NodeTypeReader+NodeTypeWriter)
3. XML--XSLT-->OCM Java annotatated code.
4. Javac-validation + JavaDoc.
Do u see some disadvantages in such way? 

As for me OCM-mapping file has identicalinformation as JCR-nodedefinition xml 
(for ex $JR_HOME/repository/nodetypes/custom_nodetypes.xml   )  Am i right?

> Add more flexibility in the mapping
> -----------------------------------
>
>                 Key: JCR-877
>                 URL: https://issues.apache.org/jira/browse/JCR-877
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-ocm
>            Reporter: Christophe Lombart
>
> Sometime, it should be interesting to map to a different jcr node structure. 
> Here is an example, for a class "File", we can have : 
> public class File
> {
>     private String mimeType;
>     private String encoding;
>     private InputStream data;
>     private Calendar lastModified;
>     // Add getters/setters
> }
> and in terms of JCR structure, we can have : 
> nt:file
>     jcr:content
>         jcr:mimeType
>         jcr:encoding
>         jcr:data
>         jcr:lastModified
> So, the jcr:content node is an extra node to specify in the mapping file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to