jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r607957 - in /jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm: ./ api/ simple-strategies/ stylesheets/
Date Wed, 02 Jan 2008 01:40:04 GMT
Author: jukka
Date: Tue Jan  1 17:39:55 2008
New Revision: 607957

URL: http://svn.apache.org/viewvc?rev=607957&view=rev
Log:
JCR-1281: Folded for easier editing
    - Also some s/Graffito/Jackrabbit/ replacements

Removed:
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-spring.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/navigation.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/stylesheets/
Modified:
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/advanced-strategies.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/api-intro.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/basic-operations.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/locking.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/search.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/versionning.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-configuration.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-introduction.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-setup.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/index.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/introduction-strategies.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/atomic-strategy.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/bean-strategy.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/collection-strategy.xml
    jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/introduction-strategies.xml

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/advanced-strategies.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/advanced-strategies.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/advanced-strategies.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/advanced-strategies.xml Tue Jan  1 17:39:55 2008
@@ -21,62 +21,67 @@
     <title>Advanced Mapping Strategies</title>
   </properties>
   <body>
-
     <section name="Advanced Mapping Strategies">
       <subsection name="Inheritance">
+        <p>TODO</p>
       </subsection>
 
       <subsection name="Interface">
+        <p>TODO</p>
       </subsection>
-      <subsection name="Components">
-
-
-      <p>A component is an entity that cannot live by its own, but has a logical
-      meaning. Take for example an Address. It may live alone, but doesn't make much sense in some
-      systems. Once associated with an User it starts making sense. Now, as in RDBMS you can choose the
-      persist this as a record in a separate table with a 1-1 relation, or you may choose to persist
-      Address field along with the User.
 
-      Now, returning to JCR, the component is fitting perfectly the mixin notion. A mixin cannot live by
-      its own in the repository. It is associated with some node. It's properties are added to the set of
-original node.
-      </p>
+      <subsection name="Components">
+        <p>
+          A component is an entity that cannot live by its own, but has
+          a logical meaning. Take for example an Address. It may live alone,
+          but doesn't make much sense in some systems. Once associated with
+          an User it starts making sense. Now, as in RDBMS you can choose the
+          persist this as a record in a separate table with a 1-1 relation,
+          or you may choose to persist Address field along with the User.
+        </p>
+        <p>
+          Now, returning to JCR, the component is fitting perfectly the mixin
+          notion. A mixin cannot live by its own in the repository. It is
+          associated with some node. It's properties are added to the set of
+          original node.
+        </p>
       </subsection>
+
       <subsection name ="Group some bean attributes into a subnode">
+        <p>TODO</p>
       </subsection>
+
       <subsection name ="Map to another node structure">
-        <p>Sometime, it should be interesting to map to a different jcr node structure.
-        Here is an example, for a class "File", we can have :</p>
-      <source><![CDATA[
+        <p>
+          Sometime, it should be interesting to map to a different jcr node
+          structure. Here is an example, for a class "File", we can have:
+        </p>
+        <source><![CDATA[
 public class File
-
 {
-
-
   private String mimeType;
   private String encoding;
   private InputStream data;
   private Calendar lastModified;
   // Add getters/setters
 }
-        ]]></source>
-
-        <p>and in terms of JCR structure, we can have :</p>
+]]></source>
+        <p>
+          and in terms of JCR structure, we can have:
+        </p>
         <source><![CDATA[
-
 nt:file
   jcr:content
     jcr:mimeType
     jcr:encoding
     jcr:data
     jcr:lastModified
-        ]]></source>
-        So, the jcr:content node is an extra node to specify in the mapping file.
-
+]]></source>
+        <p>
+          So, the jcr:content node is an extra node to specify in the
+          mapping file.
+        </p>
       </subsection>
-      <subsection name ="">
-      </subsection>
-
     </section>
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/api-intro.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/api-intro.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/api-intro.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/api-intro.xml Tue Jan  1 17:39:55 2008
@@ -21,22 +21,22 @@
     <title>The Persistence Manager API</title>
   </properties>
   <body>
-
     <section name="API Overview">
-
-        <p>With the current Persistence Manager API, it is possible to  :
-         <ul>
-           <li>Manage the object life cycle (insert, update, delete, retrieve).</li>
-          <li>Search single object or collections with criteria.</li>
-          <li>Manage versions (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>
-
+      <p>
+        With the current Persistence Manager API, it is possible to:
+      </p>
+      <ul>
+        <li>Manage the object life cycle (insert, update, delete, retrieve).</li>
+        <li>Search single object or collections with criteria.</li>
+        <li>Manage versions (check int, check out, create a new version, show history).</li>
+        <li>Lock objects.</li>
+      </ul>
+      <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>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/basic-operations.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/basic-operations.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/basic-operations.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/basic-operations.xml Tue Jan  1 17:39:55 2008
@@ -23,15 +23,18 @@
   <body>
     <section name="The Basic Operations">
       <p>
-        When you have <a href="../engine-setup.html">create a new Persistence Manager</a> in your 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.
+        When you have <a href="../engine-setup.html">created a new
+        Persistence Manager</a> in your 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.
+        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");
@@ -40,12 +43,9 @@
 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
@@ -53,27 +53,21 @@
 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>
+        <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>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/locking.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/locking.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/locking.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/locking.xml Tue Jan  1 17:39:55 2008
@@ -23,17 +23,18 @@
     <title>The Persistence Manager API</title>
   </properties>
   <body>
-
     <section name="Managing Locks">
       <subsection name="Overview">
         <p>
-          Following the Jcr specification, it is possible to lock nodes and their children (see section 8.4).
-          You can see on this page the OCM API used to lock on the object level.
-          In order to lock an object, its matching node has to implement the jcr mixin type "mix:lockable".
+          Following the Jcr specification, it is possible to lock nodes and
+          their children (see section 8.4). You can see on this page the
+          OCM API used to lock on the object level. In order to lock an object,
+          its matching node has to implement the jcr mixin type "mix:lockable".
           It is possible to specify this node type in the class descriptor :
         </p>
-        <p align="center"> <img src="../images/lockable-def.jpg" ></img></p>
+        <p align="center"> <img src="../images/lockable-def.jpg"/></p>
       </subsection>
+
       <subsection name="A basic example">
         <source>
 // --------------------------------------------------------------------------------
@@ -95,9 +96,8 @@
 // Unlock the object
 // --------------------------------------------------------------------------------
 persistenceManager.unlock("/test", lockToken);
-        </source>
+</source>
       </subsection>
-
     </section>
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/search.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/search.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/search.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/search.xml Tue Jan  1 17:39:55 2008
@@ -21,13 +21,9 @@
     <title>The Persistence Manager API</title>
   </properties>
   <body>
-
     <section name="Searching objects">
-
       <subsection name="Searching a single object">
-        <p>
-
-          <source>
+        <source>
 QueryManager queryManager = persistenceManager.getQueryManager();
 
 // Build the search filter
@@ -37,55 +33,41 @@
 // Build the query
 Query query = queryManager.createQuery(filter);
 Paragraph paragraph = (Paragraph) persistenceManager.getObject(query);
-          </source>
-        </p>
-
+</source>
       </subsection>
 
       <subsection name="Searching a collection">
-        <p>
-
-          <source>
+        <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>
-
+</source>
       </subsection>
-      <subsection name="Searching with an iterator">
-        <p>
 
-          <source>
+      <subsection name="Searching with an iterator">
+        <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>
-
+</source>
       </subsection>
-      <subsection name="Remove objects based on a query">
-        <p>
 
-          <source>
+      <subsection name="Remove objects based on a query">
+        <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>
-
+</source>
       </subsection>
-
-
     </section>
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/versionning.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/versionning.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/versionning.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/api/versionning.xml Tue Jan  1 17:39:55 2008
@@ -23,26 +23,27 @@
     <title>The Persistence Manager API</title>
   </properties>
   <body>
-
     <section name="Managing versions">
       <subsection name="Overview">
         <p>
-          Right now, the OCM tools provides basic versionning features :
-          <ul>
-             <li>Check in, check out.</li>
-             <li>Retrieve version history (first version, last version, the complete history, ...).</li>
-             <li>Apply labels.</li>
-          </ul>
+          Right now, the OCM tools provides basic versioning features:
         </p>
+        <ul>
+          <li>Check in, check out.</li>
+          <li>Retrieve version history (first version, last version, the complete history, ...).</li>
+          <li>Apply labels.</li>
+        </ul>
         <p>
-          Later, we would like to add more advanced versionning support like version compare, replace, revert, ...
+          Later, we would like to add more advanced versioning support like
+          version compare, replace, revert, ...
         </p>
         <p>
-          Each versionned object has to be mapped to a mix:versionable JCR node.
+          Each versioned object has to be mapped to a mix:versionable JCR node.
           It is possible to specify this node type in the class descriptor :
         </p>
-        <p align="center"> <img src="../images/versionable-def.jpg" ></img></p>
+        <p align="center"> <img src="../images/versionable-def.jpg"/></p>
       </subsection>
+
       <subsection name="Check in - Check out">
         <source>
 // Create a new page - first version
@@ -67,10 +68,11 @@
 persistenceManager.update(page);
 persistenceManager.save();
 persistenceManager.checkin("/page");
-        </source>
+</source>
       </subsection>
+
       <subsection name="Retrieve the version history">
-<source>
+        <source>
 VersionIterator versionIterator = persistenceManager.getAllVersions("/page");
 while (versionIterator.hasNext())
 {
@@ -80,8 +82,9 @@
 }
 </source>
       </subsection>
+
       <subsection name="Retrieve version description">
-<source>
+        <source>
 // Retrieve the first version description
 Version baseVersion = persistenceManager.getBaseVersion("/page");
 System.out.println("Base version : " + baseVersion.getName());
@@ -91,14 +94,16 @@
 System.out.println("Root version : " + rootVersion.getName());
 </source>
       </subsection>
+
       <subsection name="Retrieve the object state matching to a specific version">
-<source>
+        <source>
 //Get the object matching to the first version
 Page  page = (Page) persistenceManager.getObject( "/page", "1.0");
 </source>
       </subsection>
+
       <subsection name="Using version labels">
-<source>
+        <source>
 Page page = new Page();
 page.setPath("/page");
 page.setTitle("Page Title");
@@ -130,10 +135,8 @@
 assertTrue("Incorrect number of labels", versionLabels.length == 2);
 assertTrue("Incorrect label", versionLabels[0].equals("C") || versionLabels[0].equals("D"));
 assertTrue("Incorrect label", versionLabels[1].equals("C") || versionLabels[0].equals("D"));
-
 </source>
       </subsection>
-
     </section>
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-configuration.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-configuration.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-configuration.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-configuration.xml Tue Jan  1 17:39:55 2008
@@ -18,11 +18,10 @@
 <document>
   <properties>
     <author email="christophe.lombart@gmail.com">Christophe Lombart</author>
-    <title>Graffito JCR Persistence Manager</title>
+    <title>Jackrabbit JCR Persistence Manager</title>
   </properties>
   <body>
     <section name="The Persistence Manager Configuration">
-
       <p>TODO</p>
     </section>
   </body>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-introduction.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-introduction.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-introduction.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-introduction.xml Tue Jan  1 17:39:55 2008
@@ -18,58 +18,97 @@
 <document>
   <properties>
     <author email="christophe.lombart@gmail.com">Christophe Lombart</author>
-    <title>Graffito JCR Persistence Manager</title>
+    <title>Jackrabbit JCR Persistence Manager</title>
   </properties>
   <body>
     <section name="The Persistence Manager">
       <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.
-
+         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.
+         See the page <a href="engine-setup.html">Setup</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 ?">
-
+      <subsection name="How the Persistence Manager works?">
         <p>
-          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.
-
+          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).
+          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 "field types" :
-          <ol>
-            <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, ...). This type is not yet implemented.</li>
-          </ol>
-          Of course, all those "field types" imply different mapping algorithms.
+          There are 4 "field types":
+        </p>
+        <dl>
+          <dt>Atomic fields</dt>
+          <dd>
+            Primitive data types and simple objects (String, Long,
+            Double, ...) . Those fields are mapped into JCR properties.
+          </dd>
+          <dt>Bean fields</dt>
+          <dd>
+            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.
+          </dd>
+          <dt>Collection fields</dt>
+          <dd>
+            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.
+          </dd>
+          <dt>Reference field</dt>
+          <dd>
+            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, ...). This type is not yet implemented.
+          </dd>
+        </dl>
+        <p>
+          Of course, all those "field types" imply different mapping
+          algorithms.
         </p>
         <p>
-          The descriptor file contains also information on inheritance/interface mapping strategy, lazy loading, custom converter, cache strategy, ...
+          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">
-        <p>The mapping descriptor is an xml file with the following structure : </p>
         <p>
-          <p align="center"> <img src="./images/xml-file-descriptor.jpg" ></img></p>
+          The mapping descriptor is an xml file with the following structure:
+        </p>
+        <p align="center"><img src="images/xml-file-descriptor.jpg"/></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">Setup section</a> to get more
+          information on how to initialize the Persistence Manager.
         </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>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-setup.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-setup.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-setup.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/engine-setup.xml Tue Jan  1 17:39:55 2008
@@ -18,13 +18,15 @@
 <document>
   <properties>
     <author email="christophe.lombart@gmail.com">Christophe Lombart</author>
-    <title>Graffito JCR Persistence Manager</title>
+    <title>Jackrabbit JCR Persistence Manager</title>
   </properties>
   <body>
     <section name="The Persistence Manager Setup">
-
       <subsection name = "Basic setup">
-        <p>When you start your application, you need the following code to initialize correctly the Persistence Manager.</p>
+        <p>
+          When you start your application, you need the following code
+          to initialize correctly the Persistence Manager.
+        </p>
         <source>
 import javax.jcr.Session;
 import javax.jcr.Repository;
@@ -49,36 +51,32 @@
 
 // 2. Specify the different mapping files
 
-String[] files = { "./src/test-config/jcrmapping.xml",
+String[] files = {
+      "./src/test-config/jcrmapping.xml",
       "./src/test-config/jcrmapping-atomic.xml",
-      "./src/test-config/jcrmapping-beandescriptor.xml"};
+      "./src/test-config/jcrmapping-beandescriptor.xml"
+  };
 
 // 3. Initialise the PersistenceManager dependencies
 
 Mapper mapper = new DigesterMapperImpl(files).buildMapper();
-AtomicTypeConverterProvider converterProvider = new DefaultAtomicTypeConverterProvider();
+AtomicTypeConverterProvider converterProvider =
+    new DefaultAtomicTypeConverterProvider();
 Map atomicTypeConverters = converterProvider.getAtomicTypeConverters();
 QueryManager queryManager = new QueryManagerImpl(mapper, atomicTypeConverters);
-ObjectConverter objectConverter = new ObjectConverterImpl(mapper, converterProvider);
+ObjectConverter objectConverter =
+    new ObjectConverterImpl(mapper, converterProvider);
 
 // 4. Intantiate the PersistenceManager
 
-PersistenceManager persistenceManager = new PersistenceManagerImpl(mapper, objectConverter, queryManager, session);
-
-
+PersistenceManager persistenceManager =
+    new PersistenceManagerImpl(mapper, objectConverter, queryManager, session);
 </source>
-        <p>See the page <a href="api/api-intro.html">here</a> to get a complete overview on the Persistence Manager API.</p>
-      </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, support for other containers are welcome.</p>
+        <p>
+          See the page <a href="api/api-intro.html">here</a> to get a complete
+          overview on the Persistence Manager API.
+        </p>
       </subsection>
-
     </section>
-
-
-
-
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/index.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/index.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/index.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/index.xml Tue Jan  1 17:39:55 2008
@@ -19,35 +19,61 @@
 <document>
   <properties>
     <author email="christophe.lombart@gmail.com">Christophe Lombart</author>
-    <title>Graffito JCR Mapping</title>
+    <title>Jackrabbit Object/Content Mapping (OCM)</title>
   </properties>
   <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. 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 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>
-
-
+        <p>
+          This 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 OCM component 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
+          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>A couple of month ago, we have decided to create a new object mapping framework for different reasons : </p>
+      <subsection name ="Why an ocm?">
+        <p>
+          The object content mapping framework was created for the following
+          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>The OCM framework provides more abstraction on the technologies used to persist your content. The different application layers are less dependent on the JCR API.</li>
-          <li>ORM tools like OJB or Hibernate are not appropriate for content oriented application.</li>
+          <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 such cases.
+          </li>
+          <li>
+            The OCM framework provides more abstraction on the technologies
+            used to persist your content. The different application layers
+            are less dependent on the JCR API.
+          </li>
+          <li>
+            ORM tools like OJB or Hibernate are not appropriate for content
+            oriented application.
+          </li>
         </ul>
-
       </subsection>
+
       <subsection name ="Prerequisite">
         <p>
-          Before using this OCM framework, you should review the JCR specification 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://jackrabbit.apache.org/">Apache Jackrabbit</a>.
         </p>
-
-      </subsection>
-      <subsection name="Download">
-        <p>There are no releases yet. See the menu "Getting Started" for instructions on how to download and build the Graffito JCR mapping sources.</p>
       </subsection>
     </section>
   </body>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/introduction-strategies.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/introduction-strategies.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/introduction-strategies.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/introduction-strategies.xml Tue Jan  1 17:39:55 2008
@@ -22,26 +22,38 @@
   </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.
-
+        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>
+        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 align="center"><img src="./images/sample-model-doc.png" /></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
+        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>
-      <p>Based on that object model, we can define the following java classes :</p>
-
       <source>
 public class Page
 {
@@ -80,36 +92,54 @@
   /* Add here the getter and setter methods */
 
 }
-      </source>
-
+</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" jcrType="graffito:page">
+        <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"
+    jcrType="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" />
+  <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" jcrType="graffito:PageInfo">
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.PageInfo"
+    jcrType="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" jcrType="graffito:paragraph">
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.Paragraph"
+    jcrType="graffito:paragraph">
   <field-descriptor fieldName="path" path="true" />
   <field-descriptor fieldName="text" jcrName="graffito:text"/>
 </class-descriptor>
-      ]]></source>
+]]></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[
+        <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"
@@ -119,62 +149,86 @@
       graffito:text = "This is the content of para1"
     /mysite/page1/paragraphs/paragraph2
       graffito:text = ""This is the content of para2"
-      ]]></source>
+]]></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>
+        <p>
+          It is possible to have another kind of jcr structure by using other
+          mapping strategies. You can see the section
+          "Advanced 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" jcrType="nt:unstructured">
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.Paragraph"
+    jcrType="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>.
+]]></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".
+          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" jcrType="graffito:paragraph">
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.Paragraph"
+    jcrType="graffito:paragraph">
   <field-descriptor fieldName="path" path="true" />
   <field-descriptor fieldName="text" jcrName="graffito:text"/>
 </class-descriptor>
-        ]]></source>
-
+]]></source>
         <p>
-          In order to use correclty 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://jackrabbit.apache.org/">Jackrabbit</a>,
+          you should import the following node type definition with
+          the Jackrabbit API.
         </p>
-
         <source><![CDATA[
-<nodeType name="graffito:paragraph" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+<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" />
+  <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>
+]]></source>
         <p>
-          Of course, node types "Graffito:Page" and "Graffito:PageInfo" are alse required.         We are currently building a node type management tools which can import the node types from the class-descriptors.</p>
+          Of course, node types "Graffito:Page" and "Graffito:PageInfo"
+          are alse 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">
+      <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.
+          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>
-
+]]></source>
       </subsection>
-
     </section>
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/atomic-strategy.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/atomic-strategy.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/atomic-strategy.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/atomic-strategy.xml Tue Jan  1 17:39:55 2008
@@ -21,19 +21,29 @@
     <title>Mapping Atomic Fields</title>
   </properties>
   <body>
-
     <section name="Mapping Atomic Fields">
       <subsection name="Introduction">
-        <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>
-                <p align="center"><img src="../images/atomic-fields-def.jpg" ></img></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>
+        <p align="center"><img src="../images/atomic-fields-def.jpg"/></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>
+        <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>
@@ -63,17 +73,14 @@
             <td>byte[]</td>
             <td>BINARY</td>
           </tr>
-
           <tr>
             <td>java.io.InputStream</td>
             <td>BINARY</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>
@@ -82,32 +89,44 @@
             <td>java.util.Date</td>
             <td>LONG (corresponding to java.util.Date.getTime()</td>
           </tr>
-
         </table>
         <p>
-          Due to some issues with Jackrabbit (mainly with xpath queries),  Calendar, Timestamp and date are converted into JCR LONG.
+          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" jcrType="nt:unstructured" >
-  <field-descriptor fieldName="int2boolean" jcrName="int2boolean" converter="org.apache.portals.graffito.jcr.persistence.atomic.Int2BooleanTypeConverterImpl" />
+
+      <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 writing 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:
+        </p>
+        <ol>
+          <li>
+            Specify the converter class in the field descriptor :
+            <source><![CDATA[
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.Atomic"
+    jcrType="nt:unstructured">
+  <field-descriptor
+      fieldName="int2boolean" jcrName="int2boolean"
+      converter="org.apache.portals.graffito.jcr.persistence.atomic.Int2BooleanTypeConverterImpl" />
 </class-descriptor>
-            ]]></source>
+]]></source>
           </li>
-          <li>Implement the converter class (based on the interface org.apache.portals.graffito.jcr.persistence.atomic.AtomicTypeConverter) :
-<source><![CDATA[
+          <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;
@@ -120,7 +139,6 @@
  * 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
 {
@@ -181,12 +199,8 @@
 
 }
 ]]></source>
-
           </li>
-         </ol>
-              </p>
-
-
+        </ol>
       </subsection>
     </section>
   </body>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/bean-strategy.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/bean-strategy.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/bean-strategy.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/bean-strategy.xml Tue Jan  1 17:39:55 2008
@@ -21,51 +21,62 @@
     <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 (or a set of properties). 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>
-
-        <p align="center"> <img src="../images/bean-fields-def.jpg" ></img></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>
-
+        <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
+          <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>
+        <p align="center"><img src="../images/bean-fields-def.jpg"/></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>
       </subsection>
 
-      <subsection name ="The JCR Structure">
+      <subsection name="The JCR Structure">
         <p>
           Following our example, the resulting JCR structure is:
         </p>
-        <p>
-          <source><![CDATA[
+        <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>
+]]></source>
         <p>
-        By default, the persistence manager will create a subnode (/mysite/page1/pageInfo) for the bean-descriptor pageInfo.
+          By default, the persistence manager will create a subnode
+          (/mysite/page1/pageInfo) for the bean-descriptor pageInfo.
         </p>
-
-
       </subsection>
+
       <subsection name ="Using Another Bean Converter">
          <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).
+           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 writting your own bean converter class and reference this class in the bean-descriptor.
+           This can be done by writing your own bean converter class and
+           reference this class in the bean-descriptor.
          </p>
       </subsection>
-      <subsection name ="Predefined Bean Converters">
+
+      <subsection name="Predefined Bean Converters">
          <p>
-           Here is the list of existing custom  bean converters :
+           Here is the list of existing custom  bean converters:
          </p>
         <table>
           <tr>
@@ -74,60 +85,72 @@
           </tr>
           <tr>
             <td>
-            org.apache.portals.graffito.jcr.persistence.beanconverter.impl.ParentBeanConverterImpl
+              org.apache.portals.graffito.jcr.persistence.beanconverter.impl.ParentBeanConverterImpl
             </td>
             <td>
-             Map a bean field to the parent node. it is used to access to the parent object in readonly mode.
-             See below the example based on a Folder object.
+              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>
             <td>
-            org.apache.portals.graffito.jcr.persistence.beanconverter.impl.InlineBeanConverterImpl
+              org.apache.portals.graffito.jcr.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.
+              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.
+          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.
+          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>
 <source><![CDATA[
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.inheritance.impl.CmsObjectImpl"
-                  jcrType="graffito:cmsobjectimpl" >
-
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.inheritance.impl.CmsObjectImpl"
+    jcrType="graffito:cmsobjectimpl" >
   <field-descriptor fieldName="path" path="true" />
-  <field-descriptor fieldName="name" jcrName="graffito:name"  id="true" />
-  <bean-descriptor  fieldName="parentFolder"
-            converter="org.apache.portals.graffito.jcr.persistence.beanconverter.impl.ParentBeanConverterImpl" />
-
+  <field-descriptor fieldName="name" jcrName="graffito:name" id="true" />
+  <bean-descriptor
+      fieldName="parentFolder"
+      converter="org.apache.portals.graffito.jcr.persistence.beanconverter.impl.ParentBeanConverterImpl" />
 </class-descriptor>
 ]]></source>
       </subsection>
+
       <subsection name ="Building your own Bean Converters">
-      <p>
-       Here is the different steps used to create a new bean converter :
-      </p>
-      <ol>
-        <li>Specify the converter class in the bean descriptor :
-<source><![CDATA[
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.inheritance.impl.CmsObjectImpl"
-                  jcrType="graffito:cmsobjectimpl" >
-  <bean-descriptor  fieldName="parentFolder"
-            converter="org.apache.portals.graffito.jcr.persistence.beanconverter.impl.ParentBeanConverterImpl" />
+        <p>
+          Here is the different steps used to create a new bean converter :
+        </p>
+        <ol>
+          <li>
+            Specify the converter class in the bean descriptor:
+            <source><![CDATA[
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.inheritance.impl.CmsObjectImpl"
+    jcrType="graffito:cmsobjectimpl" >
+  <bean-descriptor
+      fieldName="parentFolder"
+      converter="org.apache.portals.graffito.jcr.persistence.beanconverter.impl.ParentBeanConverterImpl" />
 </class-descriptor>
 ]]></source>
         </li>
-        <li>Implement the converter class (based on the interface org.apache.portals.graffito.jcr.persistence.beanconverter.BeanConverter).
-                    You bean converter class can also extends the class AbstractBeanConverterImpl to have a default implementation for some methods.
-<source><![CDATA[
+        <li>
+          Implement the converter class (based on the interface
+          org.apache.portals.graffito.jcr.persistence.beanconverter.BeanConverter).
+          Your bean converter class can also extends the class
+          AbstractBeanConverterImpl to have a default implementation for
+          some methods.
+          <source><![CDATA[
 import javax.jcr.Node;
 import javax.jcr.Session;
 
@@ -186,14 +209,10 @@
 
 
 }
-
 ]]></source>
-
-        </li>
+          </li>
         </ol>
-
       </subsection>
-
     </section>
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/collection-strategy.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/collection-strategy.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/collection-strategy.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/collection-strategy.xml Tue Jan  1 17:39:55 2008
@@ -21,38 +21,46 @@
     <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 or in a multivalue property.</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>
-
+        <p>
+          The collection-descriptor maps a collection attribute into
+          JCR nodes or in a multivalue property.
+        </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" jcrType="graffito:page">
-  <collection-descriptor fieldName="paragraphs" jcrName="paragraphs"
-             elementClassName="org.apache.portals.graffito.jcr.testmodel.Paragraph" />
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.Page"
+    jcrType="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" jcrType="graffito:paragraph">
+<class-descriptor
+    className="org.apache.portals.graffito.jcr.testmodel.Paragraph"
+    jcrType="graffito:paragraph">
   <field-descriptor fieldName="path" path="true" />
   <field-descriptor fieldName="text" jcrName="graffito:text"/>
 </class-descriptor>
-        ]]></source>
-
+]]></source>
         <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.
-
+          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>
-
       </subsection>
 
-      <subsection name ="The JCR Structure">
+      <subsection name="The JCR Structure">
         <p>
-          Following our example, the resulting JCR structure is :
+          Following our example, the resulting JCR structure is:
         </p>
-        <p>
         <source><![CDATA[
 /mysite/page1
   /mysite/page1/paragraphs
@@ -61,56 +69,49 @@
     /mysite/page1/paragraphs/collection-element2
       graffito:text = "This is the content of para2"
   ... other subnodes for page1 ...
-        ]]></source>
-        </p>
+]]></source>
         <p>
-
-            By default, the persistence manager will create a subnode  (/mysite/page1/paragraphs).
-            This one will contains the different paragraphs.
+          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).
+          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>
-
       </subsection>
 
-
       <subsection name="Supported Collection and Map Types">
         <p>
-        The OCM framework is supporting the following java types :
-
-        <ol>
-          <li>Collections :  Collection, List, Set,  ArrayList, Vector, HashSet.</li>
-          <li>Maps : Map, HashMap</li>
-        </ol>
+          The OCM framework is supporting the following java types:
         </p>
-
+        <dl>
+          <dt>Collections</dt>
+          <dd>Collection, List, Set,  ArrayList, Vector, HashSet</dd>
+          <dt>Maps</dt>
+          <dd>Map, HashMap</dd>
+        </dl>
       </subsection>
 
-      <subsection name ="Using Another Collection or Map">
-         <p>
-               It is possible to support other Collection or Map types with the ManageableCollection interface.
+      <subsection name="Using Another Collection or Map">
+        <p>
+          It is possible to support other Collection or Map types with
+          the ManageableCollection interface.
          </p>
       </subsection>
 
       <subsection name ="Using Another Collection Converter">
-         <p>
-           TO DO
-         </p>
+         <p>TODO</p>
       </subsection>
+
       <subsection name ="Predefined Collection Converters">
-         <p>
-           TO DO
-         </p>
+         <p>TODO</p>
       </subsection>
+
       <subsection name ="Building your own Collection Converters">
-         <p>
-           TO DO
-         </p>
+         <p>TODO</p>
       </subsection>
-
-
     </section>
   </body>
 </document>

Modified: jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/introduction-strategies.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/introduction-strategies.xml?rev=607957&r1=607956&r2=607957&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/introduction-strategies.xml (original)
+++ jackrabbit/trunk/jackrabbit-site/src/site/xdoc/ocm/simple-strategies/introduction-strategies.xml Tue Jan  1 17:39:55 2008
@@ -23,26 +23,44 @@
   <body>
     <section name="Introduction to the Mapping Strategies">
       <p>
-        We are calling "Mapping strategy" the algorithm used by the Persistence Manager to map a java class into JCR nodes and/or properties.
+        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 :
+        <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>
+          <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>
-      <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 just used here to simplify the description of the different mapping strategies.
-      </p>
+        <p align="center"><img src="../images/sample-model-doc.png"/></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>
       </subsection>
+   
       <subsection name="The Java Classes">
-      <p>Based on that object model, we can define the following java classes :</p>
-
-      <source>
+        <p>
+          Based on that object model, we can define the following Java classes:
+        </p>
+        <source>
 public class Page
 {
   String path;
@@ -80,14 +98,15 @@
   /* Add here the getter and setter methods */
 
 }
-      </source>
+</source>
       </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[
+        <p>
+          Here is the resulting JCR structure if the page is stored on
+          the path "/mysite/mypage1" and contains 2 paragraphs:
+        </p>
+        <source><![CDATA[
 /mysite/page1
   /mysite/page1/pageInfo
     graffito:title = "This is my page title"
@@ -96,57 +115,79 @@
     /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.
-      See the sections <a href="atomic-strategy.html">Mapping Atomic Fields</a>, <a href="bean-strategy.html">Mapping Bean Fields</a>, <a href="collection-strategy.html">Mapping Collection Fields</a> to get more information on that.</p>
-
+      graffito:text = "This is the content of para2"
+ ]]></source>
+        <p>
+          It is possible to have another kind of jcr structure by using
+          other mapping strategies. See the sections
+          <a href="atomic-strategy.html">Mapping Atomic Fields</a>,
+          <a href="bean-strategy.html">Mapping Bean Fields</a>,
+          <a href="collection-strategy.html">Mapping Collection Fields</a>
+          to get more information on that.
+        </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 :
+           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>
-        <p align="center"> <img src="../images/simple-classdescriptor-def.jpg" ></img></p>
+        <p align="center"><img src="../images/simple-classdescriptor-def.jpg"/></p>
         <p>
-            This class descriptor maps the class "org.apache.portals.graffito.jcr.testmodel.Paragraph" into 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 a specific case because it maps 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>.
+          This class descriptor maps the class
+          "org.apache.portals.graffito.jcr.testmodel.Paragraph" into 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 a specific case
+          because it maps the jcr node path into a bean field called "path"
+          (see below the section "The Path Field").
         </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 "org.apache.portals.graffito.jcr.testmodel.Paragraph" into the node type "graffito:paragraph".
-
+          You can find more information on the field-descriptors in the page
+          <a href="atomic-strategy.html">Mapping Atomic fields</a>.
         </p>
-
-           <p>Here are the class-descriptors required to map the classes Page, PageInfo and Paragraph :</p>
-           <p align="center"><img src="../images/other-descriptors.jpg" ></img></p>
         <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.
+          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
+          "org.apache.portals.graffito.jcr.testmodel.Paragraph" into the
+          node type "graffito:paragraph".
+        </p>
+        <p>
+          Here are the class-descriptors required to map the classes
+          Page, PageInfo and Paragraph:
+        </p>
+        <p align="center"><img src="../images/other-descriptors.jpg"/></p>
+        <p>
+          In order to use correctly our example class with
+          <a href="http://jackrabbit.apache.org/">Apache Jackrabbit</a>,
+          you should import the following node type definitions with the
+          Jackrabbit API.
         </p>
-
         <p align="center"><img src="../images/node-type-def.jpg" ></img></p>
         <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.
+          Of course, node types "Graffito:Page" and "Graffito:PageInfo" 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>
       </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.
+          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.
         </p>
         <source><![CDATA[
 <field-descriptor fieldName="myPath" path="true" />
-          ]]></source>
-
+]]></source>
       </subsection>
-
     </section>
   </body>
 </document>



Mime
View raw message