jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1672164 [30/43] - in /jackrabbit/site/staging/jcr: ./ a-simple-ocm-project-with-maven-eclipse.data/ components/ concurrency-control.data/ css/ deployment-models.data/ how-jackrabbit-works.data/ how-to-map-associations-between-objects.data/...
Date Wed, 08 Apr 2015 20:27:20 GMT
Added: jackrabbit/site/staging/jcr/ocm/mapping-bean-fields.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/staging/jcr/ocm/mapping-bean-fields.html?rev=1672164&view=auto
==============================================================================
--- jackrabbit/site/staging/jcr/ocm/mapping-bean-fields.html (added)
+++ jackrabbit/site/staging/jcr/ocm/mapping-bean-fields.html Wed Apr  8 20:27:17 2015
@@ -0,0 +1,626 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - Mapping Bean Fields</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="../index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="../images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../index.html"  title="Welcome">Welcome</a>
+</li>
+                  
+                      <li>      <a href="../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                  
+                      <li>      <a href="../articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="../frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../getting-started-with-apache-jackrabbit.html"  title="Getting Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../standalone-server.html"  title="Standalone Server">Standalone Server</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-components.html"  title="Jackrabbit Components">Jackrabbit Components</a>
+</li>
+                  
+                      <li>      <a href="../first-hops.html"  title="First Hops">First Hops</a>
+</li>
+                  
+                      <li>      <a href="../jcr-api.html"  title="JCR & API">JCR & API</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-architecture.html"  title="Jackrabbit Architecture">Jackrabbit Architecture</a>
+</li>
+                  
+                      <li>      <a href="../deployment-models.html"  title="Deployment Models">Deployment Models</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="../node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="../object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../jackrabbit-team.html"  title="Jackrabbit Team">Jackrabbit Team</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-roadmap.html"  title="Jackrabbit Roadmap">Jackrabbit Roadmap</a>
+</li>
+                  
+                      <li>      <a href="../building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="../mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="../source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="../website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="../creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="../supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="../privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="../index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../frequently-asked-questions.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="../getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../first-hops.html" title="First Hops">
+          <i class="none"></i>
+        First Hops</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License. --><h1>Mapping Bean Fields</h1>
+<p>The bean-descriptor maps a bean attribute into one JCR node (or a set of properties). Generally, this attribute is an object based on a custom class.</p>
+<p>Based on our model defined here, the following bean-descriptor is used to map the bean field &#x201c;pageInfo&#x201d; (PageInfo class) into the JCR node called &#x201c;pageInfo&#x201d;.</p>
+<p>The PageInfo class has a corresponding class-descriptor in the mapping file. By this way, the Persistence Manager can map each PageInfo attributes. It is not necessary to specify the type in the bean-descriptor. The Persistence Manager uses the Java introspection to get information on the each bean fields.</p>
+<div class="section">
+<h2>The JCR Structure<a name="The_JCR_Structure"></a></h2>
+<p>Following our example, the resulting JCR structure is:</p>
+
+<div class="source">
+<pre>/mysite/page1
+  /mysite/page1/pageInfo
+       my:title = &quot;This is my page title&quot;
+       my:description = &quot;This is my page description&quot;
+  ... other subnodes for page1 ...
+</pre></div>
+<p>By default, the persistence manager will create a subnode (/mysite/page1/pageInfo) for the bean-descriptor pageInfo.</p></div>
+<div class="section">
+<h2>Using Another Bean Converter<a name="Using_Another_Bean_Converter"></a></h2>
+<p>The OCM framework gives you the freedom to choose another kind of mapping for bean fields. For example, you can use a custom bean converter to access to the parent node (see the next section below).</p>
+<p>This can be done by writing your own bean converter class and reference this class in the bean-descriptor.</p>
+<div class="section">
+<h3>Predefined Bean Converters<a name="Predefined_Bean_Converters"></a></h3>
+<p>Here is the list of existing custom bean converters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+<th> Custom Bean Converter Class </th>
+<th> Description </th></tr>
+
+<tr class="b">
+<td>
+org.apache.jackrabbit.ocm.persistence.beanconverter.impl.ParentBeanConverterImpl
+</td>
+<td> Map a bean field to the parent node. it is used to access to the	   
+     parent object in read-only mode. See below the example based on	   
+       a Folder object. </td></tr>
+
+<tr class="a">
+<td>
+org.apache.jackrabbit.ocm.persistence.beanconverter.impl.InlineBeanConverterImpl
+</td>
+<td> Bean converter used to map some node properties into one nested	   
+    bean field. The corresponding bean field is not associated to a	   
+      subnode. </td></tr>
+</table>
+<p>If you want to use one of this bean converter, you have to reference it into a bean-field descriptor.</p>
+<p>The following descriptor bean-descriptor contains a reference to its parent folder (parentFolder attribute). Now the CmsObjectImpl object has an attribute (parentFolder) that contains a reference to the parent node.</p>
+
+<div class="source">
+<pre>&lt;class-descriptor 
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.inheritance.impl.CmsObjectImpl&quot; 
+    jcrType=&quot;my:cmsobjectimpl&quot; &gt;
+  &lt;field-descriptor fieldName=&quot;path&quot; path=&quot;true&quot; /&gt;
+  &lt;field-descriptor fieldName=&quot;name&quot; jcrName=&quot;my:name&quot; id=&quot;true&quot; /&gt;
+  &lt;bean-descriptor 
+    fieldName=&quot;parentFolder&quot; 
+    converter=&quot;org.apache.jackrabbit.ocm.persistence.beanconverter.impl.ParentBeanConverterImpl&quot; 
+  /&gt;
+&lt;/class-descriptor&gt;
+</pre></div></div>
+<div class="section">
+<h3>Building your own Bean Converters<a name="Building_your_own_Bean_Converters"></a></h3>
+<p>Here is the different steps used to create a new bean converter :</p>
+<p>First, specify the converter class in the bean descriptor:</p>
+
+<div class="source">
+<pre>&lt;class-descriptor 
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.inheritance.impl.CmsObjectImpl&quot; 
+    jcrType=&quot;my:cmsobjectimpl&quot; &gt;
+  &lt;bean-descriptor 
+    fieldName=&quot;parentFolder&quot; 
+    converter=&quot;org.apache.jackrabbit.ocm.persistence.beanconverter.impl.ParentBeanConverterImpl&quot; 
+  /&gt;
+&lt;/class-descriptor&gt;
+</pre></div>
+<p>Then, implement the converter class (based on the interface org.apache.jackrabbit.ocm.persistence.beanconverter.BeanConverter).</p>
+<p>Your bean converter class can also extends the class AbstractBeanConverterImpl to have a default implementation for some methods.</p>
+
+<div class="source">
+<pre>import javax.jcr.Node;
+import javax.jcr.Session;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.ocm.exception.JcrMappingException;
+import org.apache.jackrabbit.ocm.exception.PersistenceException;
+import org.apache.jackrabbit.ocm.exception.RepositoryException;
+import org.apache.jackrabbit.ocm.mapper.Mapper;
+import org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor;
+import org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor;
+import org.apache.jackrabbit.ocm.persistence.atomictypeconverter.AtomicTypeConverterProvider;
+import org.apache.jackrabbit.ocm.persistence.beanconverter.BeanConverter;
+import org.apache.jackrabbit.ocm.persistence.objectconverter.ObjectConverter;
+/**
+ *
+ * Bean converter used to access to the parent object.
+ *
+ *
+ * @author &lt;a href=&quot;mailto:christophe.lombart@gmail.com&quot;&gt;Lombart Christophe &lt;/a&gt;
+ *
+ */
+public class ParentBeanConverterImpl extends AbstractBeanConverterImpl implements BeanConverter {
+
+  private final static Log log = LogFactory.getLog(ParentBeanConverterImpl.class);
+
+  public ParentBeanConverterImpl(Mapper mapper, ObjectConverter objectConverter, AtomicTypeConverterProvider atomicTypeConverterProvider)
+  {
+    super(mapper, objectConverter, atomicTypeConverterProvider);
+  }
+
+  public void insert(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
+      throws PersistenceException, RepositoryException, JcrMappingException {
+
+      // Add code to insert the object
+  }
+
+  public void update(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
+      throws PersistenceException, RepositoryException, JcrMappingException {
+
+      // Add code to update the object
+  }
+
+  public Object getObject(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Class beanClass, Object parent)
+      throws PersistenceException, RepositoryException,JcrMappingException {
+
+      // Add code to retrieve the object
+  }
+
+  public void remove(Session session, Node parentNode, BeanDescriptor beanDescriptor, ClassDescriptor beanClassDescriptor, Object object, ClassDescriptor parentClassDescriptor, Object parent)
+        throws PersistenceException,  RepositoryException, JcrMappingException {
+
+      // Add the code to remove the object
+  }
+
+}
+</pre></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file

Added: jackrabbit/site/staging/jcr/ocm/mapping-collection-fields.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/staging/jcr/ocm/mapping-collection-fields.html?rev=1672164&view=auto
==============================================================================
--- jackrabbit/site/staging/jcr/ocm/mapping-collection-fields.html (added)
+++ jackrabbit/site/staging/jcr/ocm/mapping-collection-fields.html Wed Apr  8 20:27:17 2015
@@ -0,0 +1,548 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - Mapping Collection Fields</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="../index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="../images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../index.html"  title="Welcome">Welcome</a>
+</li>
+                  
+                      <li>      <a href="../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                  
+                      <li>      <a href="../articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="../frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../getting-started-with-apache-jackrabbit.html"  title="Getting Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../standalone-server.html"  title="Standalone Server">Standalone Server</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-components.html"  title="Jackrabbit Components">Jackrabbit Components</a>
+</li>
+                  
+                      <li>      <a href="../first-hops.html"  title="First Hops">First Hops</a>
+</li>
+                  
+                      <li>      <a href="../jcr-api.html"  title="JCR & API">JCR & API</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-architecture.html"  title="Jackrabbit Architecture">Jackrabbit Architecture</a>
+</li>
+                  
+                      <li>      <a href="../deployment-models.html"  title="Deployment Models">Deployment Models</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="../node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="../object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../jackrabbit-team.html"  title="Jackrabbit Team">Jackrabbit Team</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-roadmap.html"  title="Jackrabbit Roadmap">Jackrabbit Roadmap</a>
+</li>
+                  
+                      <li>      <a href="../building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="../mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="../source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="../website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="../creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="../supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="../privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="../index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../frequently-asked-questions.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="../getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../first-hops.html" title="First Hops">
+          <i class="none"></i>
+        First Hops</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License. --><h1>Mapping Collection Fields</h1>
+<p>The collection-descriptor maps a collection attribute into JCR nodes or in a multivalue property.</p>
+<p>Based on our model defined here, the following collection-descriptor is used to map the &#x201c;paragraphs&#x201d; field into the JCR node called &#x201c;paragraphs&#x201d;.</p>
+
+<div class="source">
+<pre>&lt;class-descriptor
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.Page&quot;
+    jcrType=&quot;my:page&quot;&gt;
+  &lt;collection-descriptor
+      fieldName=&quot;paragraphs&quot; jcrName=&quot;paragraphs&quot;
+      elementClassName=&quot;org.apache.jackrabbit.ocm.testmodel.Paragraph&quot; /&gt;
+  &lt;!-- other field, bean and collection mapping here !--&gt;
+&lt;/class-descriptor&gt;
+
+&lt;class-descriptor
+    className=&quot;org.apache.jackrabbit.ocm.testmodel.Paragraph&quot;
+    jcrType=&quot;my:paragraph&quot;&gt;
+  &lt;field-descriptor fieldName=&quot;path&quot; path=&quot;true&quot; /&gt;
+  &lt;field-descriptor fieldName=&quot;text&quot; jcrName=&quot;my:text&quot;/&gt;
+&lt;/class-descriptor&gt;
+</pre></div>
+<p>The collection-descriptor contains the elementClassName attribute which specify the collection element class. A class descriptor for the element class has also to be defined.</p>
+<div class="section">
+<h2>The JCR Structure<a name="The_JCR_Structure"></a></h2>
+<p>Following our example, the resulting JCR structure is:</p>
+
+<div class="source">
+<pre>/mysite/page1
+  /mysite/page1/paragraphs
+    /mysite/page1/paragraphs/collection-element1
+      my:text = &quot;This is the content of para1&quot;
+    /mysite/page1/paragraphs/collection-element2
+      my:text = &quot;This is the content of para2&quot;
+  ... other subnodes for page1 ...
+</pre></div>
+<p>By default, the persistence manager will create a subnode (/mysite/page1/paragraphs). This one will contains the different paragraphs.</p>
+<p>As explained in the following sections, it is possible to map to another JCR structure. It is also possible to use another name for the jcr node names (see above).</p></div>
+<div class="section">
+<h2>Supported Collection and Map Types<a name="Supported_Collection_and_Map_Types"></a></h2>
+<p>The OCM framework is supporting the following java types:</p>
+
+<ul>
+  
+<li><i>Collections</i> Collection, List, Set, ArrayList, Vector, HashSet</li>
+  
+<li><i>Maps</i> Map, HashMap</li>
+</ul></div>
+<div class="section">
+<h2>Using Another Collection or Map<a name="Using_Another_Collection_or_Map"></a></h2>
+<p>It is possible to support other Collection or Map types with the ManageableCollection interface.</p></div>
+<div class="section">
+<h2>Using Another Collection Converter<a name="Using_Another_Collection_Converter"></a></h2>
+<p>TODO</p></div>
+<div class="section">
+<h2>Predefined Collection Converters<a name="Predefined_Collection_Converters"></a></h2>
+<p>TODO</p></div>
+<div class="section">
+<h2>Building your own Collection Converters<a name="Building_your_own_Collection_Converters"></a></h2>
+<p>TODO</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file

Added: jackrabbit/site/staging/jcr/ocm/mapping-stategies.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/staging/jcr/ocm/mapping-stategies.html?rev=1672164&view=auto
==============================================================================
--- jackrabbit/site/staging/jcr/ocm/mapping-stategies.html (added)
+++ jackrabbit/site/staging/jcr/ocm/mapping-stategies.html Wed Apr  8 20:27:17 2015
@@ -0,0 +1,588 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - Mapping Strategies</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://github.com/apache/jackrabbit">
+      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
+        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
+        alt="Fork me on GitHub">
+    </a>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="../index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="../images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../index.html"  title="Welcome">Welcome</a>
+</li>
+                  
+                      <li>      <a href="../downloads.html"  title="Downloads">Downloads</a>
+</li>
+                  
+                      <li>      <a href="../articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="../frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../getting-started-with-apache-jackrabbit.html"  title="Getting Started">Getting Started</a>
+</li>
+                  
+                      <li>      <a href="../standalone-server.html"  title="Standalone Server">Standalone Server</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-components.html"  title="Jackrabbit Components">Jackrabbit Components</a>
+</li>
+                  
+                      <li>      <a href="../first-hops.html"  title="First Hops">First Hops</a>
+</li>
+                  
+                      <li>      <a href="../jcr-api.html"  title="JCR & API">JCR & API</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-architecture.html"  title="Jackrabbit Architecture">Jackrabbit Architecture</a>
+</li>
+                  
+                      <li>      <a href="../deployment-models.html"  title="Deployment Models">Deployment Models</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="../node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="../object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="../jackrabbit-team.html"  title="Jackrabbit Team">Jackrabbit Team</a>
+</li>
+                  
+                      <li>      <a href="../jackrabbit-roadmap.html"  title="Jackrabbit Roadmap">Jackrabbit Roadmap</a>
+</li>
+                  
+                      <li>      <a href="../building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="../mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="../issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="../source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="../continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="../website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="../creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="../supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="../privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="../index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../frequently-asked-questions.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="../getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../first-hops.html" title="First Hops">
+          <i class="none"></i>
+        First Hops</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="../jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="../privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License. --><h1>Mapping Strategies</h1>
+<p>We are calling &#x201c;Mapping strategy&#x201d; the algorithm used by the Persistence Manager to map a Java class into JCR nodes and/or properties.</p>
+<div class="section">
+<h2>The Object Model<a name="The_Object_Model"></a></h2>
+<p>In order to explain the basic mapping strategies, we will use the following simple object model :</p>
+
+<ul>
+  
+<li>A page contains a path (of course), a pageInfo and a collection of paragraphs.</li>
+  
+<li>The PageInfo class contains the title and the page description. We are using the pageInfo here to see all mapping features (see the bean-descriptors). In real application, this class is not necessary :-)</li>
+  
+<li>Each paragraph contains a path and a text field.</li>
+</ul>
+<p>{center}!sample-model-doc.png!{center}</p>
+<p>This object model could be too simple for real applications and it is just used here to simplify the description of the different mapping strategies.</p></div>
+<div class="section">
+<h2>The Java Classes<a name="The_Java_Classes"></a></h2>
+<p>Based on that object model, we can define the following Java classes:</p>
+<p><b>Page.java</b></p>
+
+<div class="source">
+<pre>public class Page
+{
+  String path;
+  PageInfo pageInfo;
+  Collection paragraphs;
+
+  /*  Add here the getter and setter methods */
+
+  public void addParagraph(Paragraph paragraph)
+  {
+    if (paragraphs == null)
+    {
+      paragraphs = new ArrayList();
+    }
+
+    paragraphs.add(paragraph);
+  }
+}
+</pre></div>
+<p><b>PageInfo.java</b></p>
+
+<div class="source">
+<pre>public class PageInfo
+{
+  String path;
+  String title;
+  String description;
+
+  /*  Add here the getter and setter methods */
+
+}
+</pre></div>
+<p><b>Paragraph.java</b></p>
+
+<div class="source">
+<pre>public class Paragraph
+{
+  private String path;
+  private String text;
+
+  /* Add here the getter and setter methods */
+
+}
+</pre></div></div>
+<div class="section">
+<h2>The JCR Structure<a name="The_JCR_Structure"></a></h2>
+<p>Here is the resulting JCR structure if the page is stored on the path &#x201c;/mysite/mypage1&#x201d; and contains 2 paragraphs:</p>
+
+<div class="source">
+<pre>/mysite/page1
+  /mysite/page1/pageInfo
+    my:title = &quot;This is my page title&quot;
+    my:description = &quot;This is my page description&quot;
+  /mysite/page1/paragraphs
+    /mysite/page1/paragraphs/paragraph1
+      my:text = &quot;This is the content of para1&quot;
+    /mysite/page1/paragraphs/paragraph2
+      my:text = &quot;This is the content of para2&quot;
+</pre></div>
+<p>It is possible to have another kind of jcr structure by using other mapping strategies. See the sections <a href="mapping-atomic-fields.html">Mapping Atomic Fields</a> , [Mapping Bean Fields] , [Mapping Collection Fields]  to get more information on that.</p></div>
+<div class="section">
+<h2>The Class Descriptors<a name="The_Class_Descriptors"></a></h2>
+<p>When you decide to map a bean class, you have to create a new class descriptor entry in the Persistence Manager descriptor file. Let&#x2019;s start with the simplest class-descriptor:</p>
+<p>This class descriptor maps the class &#x201c;org.apache.jackrabbit.ocm.testmodel.Paragraph&#x201d; into the JCR type &#x201c;nt:unstructured&#x201d;. Each field-descriptor maps one bean field into a JCR property. For example, the first field descriptor maps the java bean field &#x201c;text&#x201d; into the jcr property called &#x201c;myjcrtext&#x201d;. The second field-descriptor is a specific case because it maps the jcr node path into a bean field called &#x201c;path&#x201d; (see below the section &#x201c;The Path Field&#x201d;).</p>
+<p>You can find more information on the field-descriptors in the page <a href="mapping-atomic-fields.html">Mapping Atomic Fields</a>.</p>
+<p>It is also possible to map a bean class to a particular JCR node type by specifying the desired type in the attribute jcrType. The following class-descriptor map the class &#x201c;org.apache.jackrabbit.ocm.testmodel.Paragraph&#x201d; into the node type &#x201c;my:paragraph&#x201d;.</p>
+<p>Here are the class-descriptors required to map the classes Page, PageInfo and Paragraph:</p>
+<p>In order to use correctly our example class with Apache Jackrabbit, you should import the following node type definitions with the Jackrabbit API.</p>
+<p>Of course, node types &#x201c;my:Page&#x201d; and &#x201c;my:PageInfo&#x201d; are also required.</p>
+<p>We are currently building a node type management tools which can import the node types from the class-descriptors.</p></div>
+<div class="section">
+<h2>The Path Field<a name="The_Path_Field"></a></h2>
+<p>Each mapped class contains a mandatory field called the &#x201c;path field&#x201d;. It contains the JCR path associated to the object. For example, the following descriptor specify the bean field &#x201c;myPath&#x201d; as the path field.</p>
+
+<div class="source">
+<pre>&lt;field-descriptor fieldName=&quot;myPath&quot; path=&quot;true&quot; /&gt;
+</pre></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file



Mime
View raw message