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/11/07 19:07:02 UTC

svn commit: r472205 - in /incubator/graffito/trunk/jcr/jcr-mapping/xdocs: ./ simple-strategies/

Author: clombart
Date: Tue Nov  7 11:07:01 2006
New Revision: 472205

URL: http://svn.apache.org/viewvc?view=rev&rev=472205
Log:
continue to work on xdocs

Removed:
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/atomic-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/bean-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/collection-strategy.xml
Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.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
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml?view=diff&rev=472205&r1=472204&r2=472205
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml Tue Nov  7 11:07:01 2006
@@ -22,30 +22,45 @@
 	</properties>
 	<body>
 		<section name="The Persistence Manager">
-			<p>The main component in our framework is the Persistence manager. It converts an object graph into JCR nodes and properties and vice versa.</p>	
+			<p>
+			   The main component in this OCM framework is the Persistence Manager. 
+			   It converts an object graph into JCR nodes and properties and vice versa.
+			   The persistence manager is associated to a JCR Session. 
+			   Depending on your needs, you can use one or more persistence managers in your application.
+			   Usually, there is one persistence manager per user session.
+			   
+			</p>	
+			<p>
+			   See the page <a href="engine-setup.html">Sectup</a> and <a href="engine-spring.html">Spring integration</a> to get more information on how to initialize correctly the Persistence Manager in your java application.
+			</p>
 			
 			<subsection name="How the Persistence Manager is working ?">
 				
 				<p>
-					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, ... 
+					Thanks to its Mapping Descriptor file, the Persistence Manager is able to use the more appropriate mapping strategy for each object. 
+					This Mapping Descriptor file contains one class descriptor per persistent class. 
+					Each class descriptor contains mapping information for the corresponding class attributes. 
+					
 				</p>
 				<p>
-					
+				    In all cases, the desired persistent class is mapped to a JCR node and its fields are mapped to subnodes or properties depending on their type (see below).
 				</p>
+
 				<p>
-					There are 4 attributes/fields "types" : 
+					There are 4 "field types" : 
 					<ol>
-						<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>Atomic 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 subnodes. </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 subnodes. </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 references between cms objects (folders, documents, ...).</li>
+						Another interesting example are references between cms objects (folders, documents, ...). This type is not yet implemented.</li>
 					</ol>
+					Of course, all those "field types" imply different mapping algorithms.
 				</p>
-				<p>
-					Of course, all those "mapping types" imply different mapping algorithms.
+				<p>					
+					The descriptor file contains also information on inheritance/interface mapping strategy, lazy loading, custom converter, cache strategy, ... 
 				</p>				
 			</subsection>
 			<subsection name="The Mapping Descriptor File">

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml?view=diff&rev=472205&r1=472204&r2=472205
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml Tue Nov  7 11:07:01 2006
@@ -57,10 +57,8 @@
 		</menu>			
 		
 		<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"/>		
+			<item name="Performance" href="advanced-strategies/inheritance-interface-strategies.html"/>
 
 			
 			

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml?view=diff&rev=472205&r1=472204&r2=472205
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/atomic-strategy.xml Tue Nov  7 11:07:01 2006
@@ -18,25 +18,28 @@
 <document>
 	<properties>
 		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
-		<title>Simple Object Mapping Strategies</title>
+		<title>Mapping Atomic Fields</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>
+				<p>The field-descriptor maps a bean attribute based on a java primitive type into a JCR property. 
+				By default, the persistence manager uses the correct mapping in function of the attribute type (see below the section "Supported Types").</p> 
+				<p>Based on our model defined <a href="introduction-strategies.html">here</a>, 
+				the following field-descriptor maps 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">
-				
+                <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 field.</p>				
 				<table>
 					<tr>
 						<th>Java Type</th>
@@ -88,11 +91,109 @@
 					
 				</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, ...) 
+					Due to some issues with Jackrabbit (mainly with xpath queries),  Calendar, Timestamp and date are converted into JCR LONG.
+					We plan to add other converters for those types in the next release. 
 				</p>
 			</subsection>
-			
+			<subsection name ="Using Another Atomic Type Converter">
+			   <p>
+			     The OCM framework gives you the freedom to choose another kind of mapping for atomic fields. 
+			     For example, you can convert java.util.Date bean field into a JCR Date type instead of a JCR Long type.	
+			     This can be done by writting your own atomic type converter class.		     
+			   </p>
+			   <p>			     
+			     Let's start with a simple example. 
+			     If you want to use a mapping strategy which convert a boolean bean field into a JCR Long type, you have to make the following steps :
+				 <ol>
+					<li>Specify the converter class in the field descriptor : 
+					   <source><![CDATA[ 
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Atomic" jcrNodeType="nt:unstructured" >
+  <field-descriptor fieldName="int2boolean" jcrName="int2boolean" converter="org.apache.portals.graffito.jcr.persistence.atomic.Int2BooleanTypeConverterImpl" />	
+</class-descriptor>
+						]]></source>
+					</li>
+					<li>Implement the converter class (based on the interface org.apache.portals.graffito.jcr.persistence.atomic.AtomicTypeConverter) : 
+<source><![CDATA[ 					
+package org.apache.portals.graffito.jcr.persistence.atomic;
+
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+
+import org.apache.portals.graffito.jcr.exception.IncorrectAtomicTypeException;
+import org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter;
+
+/**
+ * This is a simple converter which convert a boolean field value into a jcr long property.
+ *
+ * @author <a href="mailto:christophe.lombart@gmail.com">Christophe Lombart</a>
+ * 
+ */
+public class Int2BooleanTypeConverterImpl implements AtomicTypeConverter
+{
+	/**
+	 * 
+	 * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getValue(java.lang.Object)
+	 */
+	public Value getValue(ValueFactory valueFactory, Object propValue)
+	{
+		if (propValue == null)
+		{
+			return null;
+		}
+		boolean value = ((Boolean) propValue).booleanValue();
+		int jcrValue = 0;
+		
+		if (value)
+		{
+			jcrValue = 1;			
+		}
+		return valueFactory.createValue(jcrValue);
+	}
+	
+
+    /**
+     * 
+     * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getObject(javax.jcr.Value)
+     */
+	public Object getObject(Value value)
+    {
+    	try
+    	{
+    		long jcrValue = value.getLong();
+    		if (jcrValue == 1)
+    		{
+		       return new Boolean(true);
+    		}
+    		else
+    		{
+    		   return new Boolean(false);
+    		}
+		}
+		catch (Exception e)
+		{
+			throw new IncorrectAtomicTypeException("Impossible to convert the value : " + value.toString()  , e);
+		}
+    }
+	
+	/**
+	 * 
+	 * @see org.apache.portals.graffito.jcr.persistence.atomictypeconverter.AtomicTypeConverter#getStringValue(java.lang.Object)
+	 */
+	public String getStringValue(Object object)
+	{
+		
+		return ((Boolean) object).booleanValue() ? "1" : "0"; 
+	}
+
+}
+]]></source>					
+					
+					</li>
+				 </ol>			      
+              </p>			     
+			   
+			   
+			</subsection>
 		</section>
 	</body>
 </document>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml?view=diff&rev=472205&r1=472204&r2=472205
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/bean-strategy.xml Tue Nov  7 11:07:01 2006
@@ -24,7 +24,7 @@
 				
 		<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>The bean-descriptor maps a bean attribute into one JCR node. Generally, this attribute is an object based on a custom class.</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[ 				
@@ -47,9 +47,9 @@
 
 			</subsection>
 			
-			<subsection name ="Result in the JCR repository">
+			<subsection name ="The JCR Structure">
 				<p>
-					Following our example, the resulting JCR structure can be : 		
+					Following our example, the resulting JCR structure is: 		
 				</p>
 				<p>
 					<source><![CDATA[ 
@@ -60,10 +60,21 @@
   ... 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>
+				<p>By default, the persistence manager will create a subnode (/mysite/page1/pageInfo) for the bean field pageInfo. 
+				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>
+			<subsection name ="Using Bean Converter">
+			   <p>
+			     TO DO    
+			   </p>
+			</subsection>	
+			<subsection name ="Existing Bean Converters">
+			   <p>
+			     TO DO    
+			   </p>
+			</subsection>						
 		</section>
 	</body>
 </document>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml?view=diff&rev=472205&r1=472204&r2=472205
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/collection-strategy.xml Tue Nov  7 11:07:01 2006
@@ -47,9 +47,9 @@
 								
 			</subsection>
 							
-			<subsection name ="Result in the JCR repository">
+			<subsection name ="The JCR Structure">
 				<p>
-					Following our example, the resulting JCR structure can be : 		
+					Following our example, the resulting JCR structure is : 		
 				</p>
 				<p>
 				<source><![CDATA[ 
@@ -62,14 +62,29 @@
 	... other subnodes for page1 ... 
 				]]></source>		  
 				</p>						
-				<p>Creating subnodes 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>
+				<p>
+				
+				    By default, the persistence manager will create a subnode  (/mysite/page1/paragraphs). 
+				    This one will contains the different paragraphs.
+				    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>
 			<subsection name="Supported Collection Types">
-				<p>Current supported collection types are Collection, List, ArrayList and Vector. It is also possible other Collection or Map types with the ManageableCollection interface. See the section <a href="../advanced-strategies/advanced-collections-strategy.html">Reviewing the collection-descriptor</a> to get more information on the ManageableCollection.</p>
+				<p>The current supported collection types are Collection, List, ArrayList and Vector. It is also possible other Collection or Map types with the ManageableCollection interface. See the section <a href="../advanced-strategies/advanced-collections-strategy.html">Reviewing the collection-descriptor</a> to get more information on the ManageableCollection.</p>
 				<p></p>
 			</subsection>	
+			<subsection name ="Using Collection Converter">
+			   <p>
+			     TO DO    
+			   </p>
+			</subsection>	
+			<subsection name ="Existing Collection Converters">
+			   <p>
+			     TO DO    
+			   </p>
+			</subsection>								
 			
 		</section>
 	</body>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml?view=diff&rev=472205&r1=472204&r2=472205
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/simple-strategies/introduction-strategies.xml Tue Nov  7 11:07:01 2006
@@ -21,13 +21,11 @@
 		<title>Introduction to the Mapping Strategies</title>
 	</properties>
 	<body>
-		<section name="Introduction to the Mapping Strategies">
-						
+		<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>
-			
+				We are calling "Mapping strategy" the algorithm used by the Persistence Manager to map a java class into JCR nodes and/or properties.				
+			</p>		
+			<subsection name="The Object Model">	
 			<p>
 				In order to explain the basic mapping strategies, we will use the following simple object model : 
 				<ul>
@@ -38,8 +36,10 @@
 			</p>					
 			<p align="center"><img src="../images/sample-model-doc.png" ></img></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. 
+				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>	
+			</subsection>
+			<subsection name="The Java Classes">
 			<p>Based on that object model, we can define the following java classes :</p>
 			
 			<source>
@@ -81,33 +81,10 @@
 				
 }
 			</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.			
-				   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>). 
-				Here is the resulting JCR structure if the page is stored on the path "/mysite/mypage1" and contains 2 paragraphs :
+			</subsection>
+			<subsection name="The JCR Structure">
+            <p>
+              Here is the resulting JCR structure if the page is stored on the path "/mysite/mypage1" and contains 2 paragraphs :
 			</p>
 			<p>
 			<source><![CDATA[ 
@@ -122,34 +99,59 @@
 			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. See the section <a href="advanced-strategies/introduction-strategies.html">Advanced Mapping strategies</a> to get more information on that.</p>
 			
+			<p>It is possible to have another kind of jcr structure by using other mapping strategies. See the section <a href="advanced-strategies/introduction-strategies.html">Advanced Mapping strategies</a> to get more information on that.</p>
 			
-
-				<p>Now, let's go back to the class-descriptor.</p>
+			</subsection>
+			<subsection name="The Class Descriptors">
+				<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's start with the simplest class-descriptor : 
+				</p>			
 				<source><![CDATA[ 
 <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Paragraph" jcrNodeType="nt:unstructured">
+	<field-descriptor fieldName="text" jcrName="myjcrtext"/>
 	<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-descriptor 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>
+				    This class descriptor maps the class "org.apache.portals.graffito.jcr.testmodel.Paragraph" to the JCR type "nt:unstructured". 
+				    Each field-descriptor maps one bean field into a JCR property. For example, the first field descriptor maps the java bean field "text" into the jcr property called "myjcrtext".
+				    The second field-descriptor is specific case because is map the jcr node path into a bean field called "path" (see below the section "The Path Field"). 
+				    
+				    
+				    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 by specifying the desired type in the attribute jcrNodeType. 
+					It is also possible to map a bean class to a particular JCR node type by specifying the desired type in the attribute jcrNodeType. 
 					The following class-descriptor map the class "org.apache.portals.graffito.jcr.testmodel.Paragraph" to the node type "graffito:paragraph".
 						
-				</p>
-				<source><![CDATA[ 				
+				</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>	
-
+			]]></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 
+					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[ 				
@@ -166,9 +168,10 @@
 				]]></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>
+					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">
+			<subsection name ="The Path Field">
 				<p>
 				Each mapped class contains a mandatory field called the "path field". It contains the JCR path  associated to the object.	
 				For example, the following descriptor specify the bean field "myPath" as the path field.