You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2006/02/22 20:43:05 UTC

svn commit: r379877 - in /incubator/graffito/trunk/jcr/jcr-mapping/xdocs: ./ advanced-strategies/ api/ simple-strategies/

Author: clombart
Date: Wed Feb 22 12:43:01 2006
New Revision: 379877

URL: http://svn.apache.org/viewcvs?rev=379877&view=rev
Log:
Still working on the documentation

Added:
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-beans-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-collections-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/inheritance-interface-strategies.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/introduction-strategies.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/api-intro.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/basic-operations.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/search.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml
Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/index.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-beans-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-beans-strategy.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-beans-strategy.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-beans-strategy.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Introduction to the Mapping Strategies</title>
+	</properties>
+	<body>
+		<section name="Advanced Bean Strategies">
+				<p>We are currently working on the advanced mapping strategies.</p>
+		</section>	
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-collections-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-collections-strategy.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-collections-strategy.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/advanced-collections-strategy.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Introduction to the Mapping Strategies</title>
+	</properties>
+	<body>
+		<section name="Advanced Collection Strategies">
+			<p>We are currently working on the advanced mapping strategies.</p>
+		</section>
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/inheritance-interface-strategies.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/inheritance-interface-strategies.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/inheritance-interface-strategies.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/inheritance-interface-strategies.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Introduction to the Mapping Strategies</title>
+	</properties>
+	<body>
+		<section name="Inheritances and Intefaces">
+			<p>We are currently working on the advanced mapping strategies.</p>
+		</section>
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/introduction-strategies.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/introduction-strategies.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/introduction-strategies.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/advanced-strategies/introduction-strategies.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Introduction to the Mapping Strategies</title>
+	</properties>
+	<body>
+		<section name="Introduction to the Advanced Mapping Strategies">
+			<p>We are currently working on the advanced mapping strategies.</p>
+		</section>	
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/api-intro.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/api-intro.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/api-intro.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/api-intro.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>The Persistence Manager API</title>
+	</properties>
+	<body>
+				
+		<section name="API Overview">
+			
+				<p>With the current Persistence Manager API, you can : 
+				 <ul>
+					 <li>Manage the object life cycle (insert, update, delete, retrieve).</li>
+					<li>Search single object or collections with criteria.</li>
+					<li>Manage version (check int, check out, create a new version, show history).</li>	
+					<li>Lock objects.</li>
+				</ul>
+				</p>
+				<p>
+				You can see the  <a href="../apidocs/org/apache/portals/graffito/jcr/persistence/PersistenceManager.html">JavaDoc</a> to get a complete API overview. 
+			        </p>
+				<p>We plan to add other features in a future release.</p>
+			
+		</section>
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/basic-operations.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/basic-operations.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/basic-operations.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/basic-operations.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<!-- 
+     Copyright 2004 The Apache Software Foundation
+     Licensed  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.
+     -->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>The Persistence Manager API</title>
+	</properties>
+	<body>
+		<section name="The Basic Operations">
+			<p>
+				When you have <a href="../engine-setup.html">create a new Persistence Manager</a> in you application, you can use this component to insert, update, delete and retrieve objects. The class 'Folder' used in the following sections should be associated to a class-descriptor defined in the  mapping descriptor.
+			</p> 
+			<p>
+				This page describes only the main Persistence Manager methods. You can see the javadoc to get more information on the API.
+			</p>
+		
+			
+			<subsection name="Insert">
+				<p>
+<source>
+Folder folder =  new Folder();
+folder.setPath("/myfolder");
+folder.set...(); // call the setter methods
+
+persistenceManager.insert(myFolder);
+					
+</source>
+				
+				</p>
+				
+			</subsection>
+			<subsection name="Retrieve and update an object">
+				<p>
+<source>
+Folder folder = (Folder) persistenceManager.getObject(Folder.class, "/myfolder");
+folder.set...(); // call the setter methods
+
+persistenceManager.update(myFolder);
+	
+</source>					
+
+				</p>
+				
+			</subsection>
+			
+			<subsection name="Delete">
+				<p>
+<source>			
+persistenceManager.remove("/test");
+</source>
+				</p>
+				
+			</subsection>
+					
+			<subsection name ="Save last changes">
+			<p>After some inserts, deletes and/or updates, you can call the method <code>persistenceManager.save()</code> to apply your changes into the JCR repository.</p>
+			</subsection>
+			
+			
+			
+
+		</section>
+	</body>
+</document>
\ No newline at end of file

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!-- 
+     Copyright 2004 The Apache Software Foundation
+     Licensed  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.
+     -->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>The Persistence Manager API</title>
+	</properties>
+	<body>
+		
+		<section name="">
+			<subsection name="Locks">
+				<p>TO DO </p>
+				
+			</subsection>
+		</section>
+	</body>
+</document>
\ No newline at end of file

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/search.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/search.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/search.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/search.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<!-- 
+     Copyright 2004 The Apache Software Foundation
+     Licensed  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.
+     -->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>The Persistence Manager API</title>
+	</properties>
+	<body>
+		
+		<section name="Searching objects">
+			
+			<subsection name="Searching a single object">
+				<p>
+					
+					<source>					
+QueryManager queryManager = persistenceManager.getQueryManager();
+
+// Build the search filter 
+Filter filter = queryManager.createFilter(Paragraph.class);
+filter.addEqualTo("text", "Para 1");   // Text is an attribute in the class Paragraph 	          	     
+						
+// Build the query 
+Query query = queryManager.createQuery(filter);
+Paragraph paragraph = (Paragraph) persistenceManager.getObject(query);						
+					</source>
+				</p>
+				
+			</subsection>	
+			
+			<subsection name="Searching a collection">
+				<p>
+					
+					<source>					
+QueryManager queryManager = persistenceManager.getQueryManager();
+Filter filter = queryManager.createFilter(Paragraph.class);    
+filter.setScope("/test/node1//");
+Query query = queryManager.createQuery(filter);    	      
+persistenceManager = this.getPersistenceManager();
+Collection result = persistenceManager.getObjects(query);						
+					</source>
+				</p>
+				
+			</subsection>				
+			<subsection name="Searching with an iterator">
+				<p>
+					
+					<source>					
+QueryManager queryManager = persistenceManager.getQueryManager();
+Filter filter = queryManager.createFilter(Paragraph.class);    
+filter.setScope("/test/node1//");
+Query query = queryManager.createQuery(filter);    	      
+persistenceManager = this.getPersistenceManager();
+Iterator ierator = persistenceManager.getObjectIterator(query);	
+					</source>
+				</p>
+				
+			</subsection>	
+			<subsection name="Remove objects based on a query">
+				<p>
+					
+					<source>					
+QueryManager queryManager = persistenceManager.getQueryManager();
+Filter filter = queryManager.createFilter(Paragraph.class);    
+filter.setScope("/test/node1//");
+Query query = queryManager.createQuery(filter);    	      
+persistenceManager = this.getPersistenceManager();
+persistenceManager.remove(query);	
+					</source>
+				</p>
+				
+			</subsection>	
+			
+			
+		</section>
+	</body>
+</document>
\ No newline at end of file

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!-- 
+     Copyright 2004 The Apache Software Foundation
+     Licensed  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.
+     -->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>The Persistence Manager API</title>
+	</properties>
+	<body>
+		
+		<section name="">
+			<subsection name="Managing versions">
+				<p> TO DO</p>
+				
+			</subsection>
+		</section>
+	</body>
+</document>
\ No newline at end of file

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml?rev=379877&r1=379876&r2=379877&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml Wed Feb 22 12:43:01 2006
@@ -27,8 +27,7 @@
 			<subsection name="How the Persistence Manager is working ?">
 				
 				<p>
-					Thanks to its XML descriptor file, the Persistence Manager can use the more appropriate mapping strategy for each object. 
-					The descriptor file contains one class descriptor for each mapped class. Each class descriptor contains mapping information for the corresponding class attributes. The descriptor file contains also information on object associations, inheritance mapping strategy, lazy loading, cache strategy, ... 
+					Thanks to its Mapping Descriptor file, the Persistence Manager can use the more appropriate mapping strategy for each object. This Mapping Descriptor file contains one class descriptor for each mapped class. Each class descriptor contains mapping information for the corresponding class attributes. The descriptor file contains also information on object associations, inheritance mapping strategy, lazy loading, cache strategy, ... 
 				</p>
 				<p>
 					
@@ -36,18 +35,38 @@
 				<p>
 					There are 4 attributes/fields "types" : 
 					<ol>
-						<li>Simple fields : primitive data types and simple objects (String, Long, Double, ...) . Thoses fields are mapped into JCR properties. </li>
+						<li>Simple fields : primitive data types and simple objects (String, Long, Double, ...) . Those fields are mapped into JCR properties. </li>
 						<li>Bean fields : One class can contain an 1..1 association to another bean. In this case, the attribute is a custom object. Those fields are mapped into JCR nodes. </li>
 						<li>Collection fields : One class can contain an 1..n association to a collection of beans (or Map). Those fields are mapped into a collection of JCR nodes. </li>
 						<li>Reference field : One good example to understand the "reference" type is the Folder concept. A folder "B" can have an attribute called "parentFolder" which is a simple field pointing to the parent folder "A" . Of course, in a JCR repository, it is a nonsense for persist this "parentFolder" attribute into a "B" subnode. Another interesting example are links made between cms objects (folders, documents, ...).</li>
 					</ol>
 				</p>
 				<p>
-					Of course, all those "mapping types" imply different mapping algorithms.See the "Mapping Strategies" section to get more information on the descriptor file.
+					Of course, all those "mapping types" imply different mapping algorithms.
 				</p>				
 			</subsection>
-			
-						
+			<subsection name="The Mapping Descriptor File">
+				<p>The mapping descriptor is an xml file with the following structure : </p>
+				<p>
+				<source><![CDATA[ 				
+<?xml version="1.0" encoding="UTF-8"?>
+										
+<graffito-jcr>
+										
+	<class-descriptor className="[Reference to a class to map]" ...">
+								
+		... Contains the reference to the class attribute ...
+										
+	</class-descriptor>
+									
+	... other class descritptors ....
+	
+</graffito-jcr>										
+				]]></source>				
+				</p>	
+				<p>The root element is "graffito-jcr" and it contains one or more "class-descriptor". As you can see in the sections "Mapping Strategies" and "Advanced Mapping Strategies", each class-descriptor contains the mapping information used for each class attributes.</p>
+				<p>It is possible to have severals xml files. See the <a href="engine-setup.html">Sectup section</a> to get more information on how to initialize the Persistence Manager. </p>
+			</subsection>	
 		</section>
 	</body>
 </document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-setup.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Graffito JCR Persistence Manager</title>
+	</properties>
+	<body>
+		<section name="The Persistence Manager Setup">
+			
+			<subsection name = "Basic setup">
+			
+			</subsection>
+			
+			<subsection name="Platform/Framework integration">
+				<p>You can also get more information on the Spring support <a href="engine-spring.html">here</a>.</p>
+				<p>Of course, other kind of integration contribution are welcome.</p>
+			</subsection>
+			
+		</section>
+		
+		
+		
+		
+	</body>
+</document>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/index.xml?rev=379877&r1=379876&r2=379877&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/index.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/index.xml Wed Feb 22 12:43:01 2006
@@ -23,21 +23,25 @@
 	<body>
 		<section name="Overview">
 			<subsection name="Object/Content Mapping framework (ocm)">
-				<p>This Graffito subproject is an object/JCR persistence and query service. This tools lets you to persist java objects into a JCR compliant repository - including association, inheritance, polymorphism, composition, and the Java collections framework. Furthermore, this jcr-mapping allows you to express queries in Java-based Criteria, as well as in JCR query language.</p> 
+				<p>This Graffito subproject is an object/JCR persistence and query service. This tools lets you to persist java objects into a JCR compliant repository - including association, inheritance, polymorphism, composition, and the Java collections framework. Furthermore, this jcr-mapping allows you to express queries in Java-based Criteria, as well as in JCR query language. It offers also features like version support and object locking.</p> 
 				
-				<p>In order to easily support the JCR specification, any content application managing an high level object model can use this framework. For example, a classic Forum application contains objets like "Forum", "Topic" and "Post". Now, the data objects (pojo) can be managed by our JCR mapping tools in order to persist them into a JCR compliant repository.</p> 
+				<p>In order to easily support the JCR specification, any content application managing an high level object model can use this framework. For example, a classic Forum application contains objects like "Forum", "Topic" and "Post". Now, the data objects (pojo) can be managed by our JCR mapping tools in order to persist them into a JCR compliant repository.</p> 
 				
 				
 			</subsection>
 			<subsection name ="Why an ocm ?">
-				<p>
-					Sometimes it is very convenient to be able to just access the JCR nodes and properties directly from your presentation-layer for very simple things (mostly generic display). When a lot of "business logic" are involved, the JCR API can be too low level and real business objects (pojo) are more appreciate in a such case.				
-				</p>
+				
+				<p>A couple of month ago, we have decided to create a new object mapping framework for different reasons : </p>
+				<ul>
+					<li>Sometimes it is very convenient to be able to just access the JCR nodes and properties directly from your presentation-layer for very simple things (mostly generic display). When a lot of "business logic" are involved, the JCR API can be too low level and real business objects (pojo) are more appreciate in a such case.</li>				
+				
+					<li>ORM tools like OBJ or Hibernate are not appropriate for content oriented application.</li>
+				</ul>	
 				
 			</subsection>
-			<subsection name ="Preriquise">
+			<subsection name ="Prerequisite">
 				<p>
-					Before using this JCR framework, you should review the JCR specication and implementations like <a   href="http://incubator.apache.org/jackrabbit/">JackRabbit</a>. 
+					Before using this OCM framework, you should review the JCR specification and implementations like <a   href="http://incubator.apache.org/jackrabbit/">JackRabbit</a>. 
 				</p>
 				
 			</subsection>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml?rev=379877&r1=379876&r2=379877&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml Wed Feb 22 12:43:01 2006
@@ -29,37 +29,38 @@
 			<item name="Overview" href="index.html"/>			
 			
 		</menu>	
-		<menu name="Getting Started">			
-		</menu>	
-		<menu name="The Persistence Manager">			
-			<item name="Introduction" href="engine-introduction.html"/>
-			<item name="Persistence Manager API" href = "" collapse="true" >
-				<item name="Basic operations" href=""/>
-				<item name="Search" href=""/>
-				<item name="Managing Version" href=""/>
-				
-			</item>
-				
-			<item name="Configuration" href="engine-configuration.html"/>
+		<!-- menu name="Getting Started">			
+		</menu -->	
+		
+		<menu name="Persistence Manager">			
+			<item name="What is the Persistence Manager ?" href="engine-introduction.html"/>
+			<item name="Mapping Descriptor DTD" href="graffito-jcr-mapping.dtd.txt"/>
+			<item name="Setpup" href="engine-setup.html"/>
 			<item name="Spring Integration" href="engine-spring.html"/>
-			
-		</menu>	
+		</menu>			
+		
+		<menu name="Persistence Manager API">						
+			<item name="Overview" href = "api/api-intro.html" collapse="true" />
+			<item name="Basic operations" href="api/basic-operations.html" collapse="true"/>
+			<item name="Search" href="api/search.html" collapse="true"/>
+			<item name="Managing Version" href="api/versionning.html" collapse="true"/>
+			<item name="Locking" href="api/locking.html" collapse="true"/>
+		</menu>
 		
 		<menu name="Mapping Stategies">			
-			<item name="Introduction" href="introduction-strategies.html"/>
-			<item name="Mapping Atomic Fields" href="atomic-strategy.html"/>			
-			<item name="Mapping Bean Fields" href="bean-strategy.html"/>			
-			<item name="Mapping Collection Fields" href="collection-strategy.html"/>			
-			<item name="DTD" href="graffito-jcr-mapping.dtd.txt"/>
+			<item name="Introduction" href="simple-strategies/introduction-strategies.html"/>
+			<item name="Mapping Atomic Fields" href="simple-strategies/atomic-strategy.html"/>			
+			<item name="Mapping Bean Fields" href="simple-strategies/bean-strategy.html"/>			
+			<item name="Mapping Collection Fields" href="simple-strategies/collection-strategy.html"/>			
+			
 		</menu>			
 		
-		<menu name="Advance Mapping Stategies">			
-			<item name="Introduction" href="introduction-advanced-strategies.html"/>
-			<item name="Inheritance" href="inheritance-strategy.html"/>
-			<item name="Reviewing the bean-descriptor" href="advanced-beans-strategy.html"/>						
-			<item name="Reviewing the collection-descriptor" href="advanced-collections-strategy.html"/>						
-			
-			<item name="Adding Extra JCR Nodes" href="extra-nodes-strategy.html"/>
+		<menu name="Advanced Mapping Stategies">			
+			<item name="Introduction" href="advanced-strategies/introduction-strategies.html"/>
+			<item name="Inheritance and Interface" href="advanced-strategies/inheritance-interface-strategies.html"/>
+			<item name="Reviewing the bean-descriptor" href="advanced-strategies/advanced-beans-strategy.html"/>	
+			<item name="Reviewing the collection-descriptor" href="advanced-strategies/advanced-collections-strategy.html"/>		
+
 			
 			
 		</menu>			

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Simple Object Mapping Strategies</title>
+	</properties>
+	<body>
+				
+		<section name="Mapping Atomic Fields">
+			<subsection name="Introduction">
+				<p>The field-descriptor maps a bean attribute into one JCR property. it can map any kind of atomic types (java primitive data types and their wrapper classes).</p> 
+				<p>Based on our model defined <a href="introduction-strategies.html">here</a>, the following field-descriptor can be used in the class 'PageInfo' to map the bean field "title" (String type) into the JCR property "graffito:title".</p>
+				<source><![CDATA[ 
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PageInfo" jcrNodeType="graffito:PageInfo">
+	<field-descriptor fieldName="title" jcrName="graffito:title" />	
+	.... other descriptors ....
+</class-descriptor>	
+				]]></source>
+				<p>It is not necessary to specify the type in the field-descriptor. The Persistence Manager uses the java introspection to get information on each atomic fields.</p>
+				
+			</subsection>
+			<subsection name ="Supported Types">
+				
+				<table>
+					<tr>
+						<th>Java Type</th>
+						<th>Jcr Type</th>
+					</tr>
+					<tr>
+						<td>String</td>
+						<td>STRING</td>
+					</tr>
+					<tr>
+						<td>Boolean, boolean</td>
+						<td>BOOLEAN</td>
+					</tr>
+					<tr>
+						<td>Double, double</td>
+						<td>DOUBLE</td>
+					</tr>
+					<tr>
+						<td>Integer, int</td>
+						<td>DOUBLE</td>
+					</tr>
+					<tr>
+						<td>Long, long</td>
+						<td>LONG</td>
+					</tr>
+					<tr>
+						<td>byte[]</td>
+						<td>BINARY</td>
+					</tr>
+					
+					<tr>
+						<td>java.io.InputStream</td>
+						<td>BINALRY</td>
+					</tr>
+					
+					<tr>
+						<td>java.util.Calendar</td>
+						<td>LONG (corresponding to Calendar.getTimeInMillis()</td>
+					</tr>
+
+					<tr>
+						<td>java.sql.Timestamp</td>
+						<td>LONG (corresponding to Timestamp.getTime()</td>
+					</tr>					
+					<tr>
+						<td>java.util.Date</td>
+						<td>LONG (corresponding to java.util.Date.getTime()</td>
+					</tr>										
+					
+				</table>	
+				<p>
+					Due to some issues with Jackrabbit,  Calendar, Timestamp and date are converted into JCR LONG.
+					We plan to add other converters for those types in the next release. We plan also to support other java types (char, ...) 
+				</p>
+			</subsection>
+			
+		</section>
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Simple Object Mapping Strategies</title>
+	</properties>
+	<body>
+				
+		<section name="Mapping Bean Fields">
+			<subsection name="Introduction">
+				<p>The bean-descriptor maps a bean attribute into one JCR node. Generally, this bean attribute is a also a bean.</p>
+				<p>Based on our model defined <a href="introduction-strategies.html">here</a>, the following bean-descriptor is used to map the bean field "pageInfo" (PageInfo class) into the JCR node called "pageInfo".</p>
+
+				<source><![CDATA[ 				
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Page" jcrNodeType="graffito:page">
+	<bean-descriptor fieldName="pageInfo" jcrName="pageInfo" />
+	<!-- other field, bean and collection mapping here !-->
+</class-descriptor>
+									
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PageInfo" jcrNodeType="graffito:PageInfo">
+	<field-descriptor fieldName="path" path="true" />
+	<field-descriptor fieldName="title" jcrName="graffito:title"/>
+	<field-descriptor fieldName="description" jcrName="graffito:description"/>
+</class-descriptor>
+									
+				]]></source>
+				
+				<p>In this example, 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>
+
+			</subsection>
+			
+			<subsection name ="Result in the JCR repository">
+				<p>
+					Following our example, the resulting JCR structure can be : 		
+				</p>
+				<p>
+					<source><![CDATA[ 
+/mysite/page1	
+  /mysite/page1/pageInfo
+       graffito:title = "This is my page title"
+       graffito:description = "This is my page description"
+  ... other subnodes for page1 ... 
+							  ]]></source>		  
+				</p>						
+				<p>Creating a subnode like this example (mysite/page1/pageInfo) is the default behavior. See the section <a href="../advanced-strategies/advanced-beans-strategy.html">Reviewing the bean-descriptor</a> to get other bean-field mapping strategies.</p>
+				
+			
+			</subsection>
+		</section>
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!-- 
+     Copyright 2004 The Apache Software Foundation
+     Licensed  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.
+     -->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Simple Object Mapping Strategies</title>
+	</properties>
+	<body>
+		
+		<section name="Mapping Collection Fields">
+			<subsection name="Introduction">
+				<p>The collection-descriptor maps a collection attribute into JCR nodes.</p>
+				<p>Based on our model defined <a href="introduction-strategies.html">here</a>, the following collection-descriptor is used to map the "paragraphs" field into the JCR node called "paragraphs".</p>
+				
+				<source><![CDATA[ 				
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Page" jcrNodeType="graffito:page">
+	<collection-descriptor fieldName="paragraphs" jcrName="paragraphs" 
+			       elementClassName="org.apache.portals.graffito.jcr.testmodel.Paragraph" />
+	<!-- other field, bean and collection mapping here !-->
+</class-descriptor>
+																		
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Paragraph" jcrNodeType="graffito:paragraph">
+	<field-descriptor fieldName="path" path="true" />
+	<field-descriptor fieldName="text" jcrName="graffito:text"/>
+</class-descriptor>									
+				]]></source>
+								
+				<p>
+					The collection-descriptor contains the elementClassName attribute which specify the collection element class. 
+					
+				</p>
+								
+			</subsection>
+							
+			<subsection name ="Result in the JCR repository">
+				<p>
+					Following our example, the resulting JCR structure can be : 		
+				</p>
+				<p>
+				<source><![CDATA[ 
+/mysite/page1	
+	/mysite/page1/paragraphs
+		/mysite/page1/paragraphs/paragraph1
+			graffito:text = "This is the content of para1"
+		/mysite/page1/paragraphs/paragraph2
+			graffito:text = ""This is the content of para2"
+	... other subnodes for page1 ... 
+				]]></source>		  
+				</p>						
+				<p>Creating a subnode like this example (mysite/page1/paragraphs) is the default behavior. See the section <a href="../advanced-strategies/advanced-collections-strategy.html">Reviewing the collection-descriptor</a> to get other collection-field mapping strategies.</p>
+								
+								
+			</subsection>
+		</section>
+	</body>
+</document>

Added: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml?rev=379877&view=auto
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml (added)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml Wed Feb 22 12:43:01 2006
@@ -0,0 +1,181 @@
+<?xml version="1.0"?>
+<!-- 
+Copyright 2004 The Apache Software Foundation
+Licensed  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.
+-->
+<document>
+	<properties>
+		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
+		<title>Introduction to the Mapping Strategies</title>
+	</properties>
+	<body>
+		<section name="Introduction to the Mapping Strategies">
+						
+			<p>
+				We are calling "Mapping strategy" the algorithm used by the Persistence Manager to map a bean into JCR nodes and/or properties.
+				
+			</p>
+			
+			<p>
+				In order to explain the basic mapping strategies, we will use the following simple object model : 
+				<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 align="center"> <img src="./images/sample-model-doc.png" ></img></p>
+			</p>	
+			<p>
+				This object model could be too simple for real applications and it is used here just to simplify the description of the different mapping strategies. 
+			</p>	
+			<p>Based on that object model, we can define the following java classes :</p>
+			
+			<source>
+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);
+	}
+}	
+
+public class PageInfo
+{
+	String path;
+	String title;
+	String description;
+
+	/*  Add here the getter and setter methods */
+
+}
+
+public class Paragraph
+{
+	private String path;
+	private String text;
+				
+	/* Add here the getter and setter methods */
+				
+}
+			</source>	
+			
+			
+			<subsection name="The Class descriptor">
+				<p>When you decide to map a bean class, you have to create a new class descriptor entry in the Persistence Manager descriptor file.</p>			
+				<p>Here are the class-descriptors required to map the classes Page, PageInfo and Paragraph :</p>
+			<source><![CDATA[ 				
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Page" jcrNodeType="graffito:page">
+	<field-descriptor fieldName="path" path="true" />
+	<bean-descriptor fieldName="pageInfo" jcrName="pageInfo" />
+	<collection-descriptor fieldName="paragraphs" jcrName="paragraphs" elementClassName="org.apache.portals.graffito.jcr.testmodel.Paragraph" />
+</class-descriptor>
+									
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PageInfo" jcrNodeType="graffito:PageInfo">
+	<field-descriptor fieldName="path" path="true" />
+	<field-descriptor fieldName="title" jcrName="graffito:title"/>
+	<field-descriptor fieldName="description" jcrName="graffito:description"/>
+</class-descriptor>
+
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Paragraph" jcrNodeType="graffito:paragraph">
+	<field-descriptor fieldName="path" path="true" />
+	<field-descriptor fieldName="text" jcrName="graffito:text"/>
+</class-descriptor>
+			]]></source>
+								
+			<p>
+				We will explain in more details each descriptors in the following sections (<a href="atomic-strategy.html">Mapping Atomic Fields</a>,<a href="bean-strategy.html">Mapping Bean Fields</a> and <a href="collection-strategy.html">Mapping Collection Fields</a>. If the page is stored on the path "/mysite/mypage1" and contains 2 paragraphs, here is the resulting jcr structure :
+			</p>
+			<p>
+			<source><![CDATA[ 
+/mysite/page1	
+	/mysite/page1/pageInfo
+		graffito:title = "This is my page title"
+		graffito:description = "This is my page description"
+	/mysite/page1/paragraphs
+		/mysite/page1/paragraphs/paragraph1
+			graffito:text = "This is the content of para1"
+		/mysite/page1/paragraphs/paragraph2
+			graffito:text = ""This is the content of para2"
+			]]></source>		  
+			</p>	
+			<p>It is possible to have another kind of jcr structure by using other mapping strategies. You can see the section "Advance Mapping strategies" to get more information on that.</p>
+			
+			
+
+				<p>Now, let's go back to the class-descriptor.</p>
+				<source><![CDATA[ 
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Paragraph" jcrNodeType="nt:unstructured">
+	<field-descriptor fieldName="path" path="true" />
+	<field-descriptor fieldName="text" jcrName="graffito:text"/>
+</class-descriptor>
+				]]></source>
+
+				<p>This class descriptor maps the class "org.apache.portals.graffito.jcr.testmodel.Paragraph" to the JCR type "nt:unstructured". Each field-descriptors maps one bean attribute to a JCR property. You can find more information on the field-descriptors in the page <a href="atomic-strategy.html">Mapping Atomic fields</a>. 
+				</p>	
+				<p>
+					It is also possible to map a bean class to a specific JCR node type. The following class-descriptor map the class "org.apache.portals.graffito.jcr.testmodel.Paragraph" to the node type "graffito:paragraph".	
+				</p>
+				<source><![CDATA[ 				
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Paragraph" jcrNodeType="graffito:paragraph">
+	<field-descriptor fieldName="path" path="true" />
+	<field-descriptor fieldName="text" jcrName="graffito:text"/>
+</class-descriptor>
+				]]></source>	
+
+				<p>
+					In order to use correctly our example class with <a href="http://incubator.apache.org/jackrabbit/">Jackrabbit</a>, you should add the following node type definition in its custom_nodetypes.xml file or import the node type definition with the Jackrabbit API 
+				</p>
+				
+				<source><![CDATA[ 				
+<nodeType name="graffito:paragraph" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+	<supertypes>
+		<supertype>mix:versionable</supertype>
+		<supertype>nt:base</supertype>
+	</supertypes>
+	<propertyDefinition name="*" requiredType="undefined" autoCreated="false" 
+			    mandatory="false" onParentVersion="COPY" protected="false" multiple="false" />
+	<propertyDefinition name="graffito:text" requiredType="String" autoCreated="false" 
+			    mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />
+</nodeType>
+				]]></source>
+				<p>
+					Of course, node types "Graffito:Page" and "Graffito:PageInfo" are also required. 
+					We are currently building a node type management tools which can import the node types from the class-descriptors.</p>
+			</subsection>
+			<subsection name ="The path Field">
+				<p>
+				Each mapped class contains a mandatory field called the "path field". It simply contains the JCR path  associated to the object.	
+				For example, the following descriptor specify the bean field "myPath" as the path field.			
+				</p>
+				<source><![CDATA[ 
+<field-descriptor fieldName="myPath" path="true" />
+				  ]]></source>
+				
+			</subsection>
+			
+		</section>
+	</body>
+</document>