incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r505050 - in /incubator/graffito/trunk/jcr/jcr-mapping: src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/ src/test/org/apache/portals/graffito/jcr/testmodel/ xdocs/ xdocs/api/ xdocs/simple-strategies/
Date Thu, 08 Feb 2007 22:01:31 GMT
Author: clombart
Date: Thu Feb  8 14:01:30 2007
New Revision: 505050

URL: http://svn.apache.org/viewvc?view=rev&rev=505050
Log:
invalid method name

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
    incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.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/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java?view=diff&rev=505050&r1=505049&r2=505050
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/persistence/jcrnodetype/PersistenceManagerJcrNodeTypeTest.java
Thu Feb  8 14:01:30 2007
@@ -103,7 +103,7 @@
             
             Folder folder = new Folder();
             folder.setPath("/folder1");
-            folder.addChildren(file);
+            folder.addChild(file);
             
             persistenceManager.insert(folder);            
 			persistenceManager.save();

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java?view=diff&rev=505050&r1=505049&r2=505050
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
Thu Feb  8 14:01:30 2007
@@ -51,7 +51,7 @@
 		this.children = children;
 	}
 
-	public void addChildren(HierarchyNode node)
+	public void addChild(HierarchyNode node)
 	{
 		if (children == null)
 		{

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml?view=diff&rev=505050&r1=505049&r2=505050
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/locking.xml Thu Feb  8 14:01:30 2007
@@ -32,16 +32,7 @@
 					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>	
-				<source><![CDATA[ 					
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.A"
-		          jcrNodeType="nt:unstructured" jcrMixinTypes="mix:lockable" >
-		          
-		          
-		          <!-- Add here field, bean and collection desctipors -->
-		          
-		          
-</class-descriptor>							
-				]]></source>
+				<p align="center"> <img src="../images/lockable-def.jpg" ></img></p>
 			</subsection>		
 			<subsection name="A basic example">
 				<source>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml?view=diff&rev=505050&r1=505049&r2=505050
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/api/versionning.xml Thu Feb  8 14:01:30
2007
@@ -41,16 +41,7 @@
 					Each versionned object has to be mapped to a mix:versionable JCR node. 
 					It is possible to specify this node type in the class descriptor : 
 				</p>	
-				<source><![CDATA[ 					
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.A"
-		          jcrNodeType="nt:unstructured" jcrMixinTypes="mix:versionable" >
-		          
-		          
-		          <!-- Add here field, bean and collection desctipors -->
-		          
-		          
-</class-descriptor>							
-				]]></source>
+				<p align="center"> <img src="../images/versionable-def.jpg" ></img></p>
 			</subsection>
 			<subsection name="Check in - Check out">
 				<source>

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=505050&r1=505049&r2=505050
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml Thu Feb  8 14:01:30
2007
@@ -66,21 +66,7 @@
 			<subsection name="The Mapping Descriptor File">
 				<p>The mapping descriptor is an xml file with the following structure : </p>
 				<p>
-				<source><![CDATA[ 				
-<?xml version="1.0" encoding="UTF-8"?>
-										
-<graffito-jcr>
-										
-	<class-descriptor className="[Reference to a class to map]" ...">
-								
-		... Contains the references to the class attributes ...
-										
-	</class-descriptor>
-									
-	... other class descritptors ....
-	
-</graffito-jcr>										
-				]]></source>				
+					<p align="center"> <img src="./images/xml-file-descriptor.jpg" ></img></p>
		
 				</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>

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=505050&r1=505049&r2=505050
==============================================================================
--- 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 Thu
Feb  8 14:01:30 2007
@@ -28,13 +28,7 @@
 				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 align="center"><img src="../images/atomic-fields-def.jpg" ></img></p>
			
 				
 			</subsection>
 			<subsection name ="Supported Types">

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=505050&r1=505049&r2=505050
==============================================================================
--- 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 Thu
Feb  8 14:01:30 2007
@@ -27,19 +27,7 @@
 				<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>
 
-				<source><![CDATA[ 				
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Page" jcrNodeType="graffito:page">
-	<bean-descriptor fieldName="pageInfo" jcrName="pageInfo" />
-	<!-- other field, bean and collection mapping here !-->
-</class-descriptor>
-									
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PageInfo" jcrNodeType="graffito:PageInfo">
-	<field-descriptor fieldName="path" path="true" />
-	<field-descriptor fieldName="title" jcrName="graffito:title"/>
-	<field-descriptor fieldName="description" jcrName="graffito:description"/>
-</class-descriptor>
-									
-				]]></source>
+				<p 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.

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=505050&r1=505049&r2=505050
==============================================================================
--- 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
Thu Feb  8 14:01:30 2007
@@ -24,7 +24,7 @@
 		
 		<section name="Mapping Collection Fields">
 			<subsection name="Introduction">
-				<p>The collection-descriptor maps a collection attribute into JCR nodes.</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[ 				
@@ -42,6 +42,7 @@
 								
 				<p>
 					The collection-descriptor contains the elementClassName attribute which specify the
collection element class. 
+					A class descriptor for the element class has also to be defined.
 					
 				</p>
 								
@@ -55,36 +56,60 @@
 				<source><![CDATA[ 
 /mysite/page1	
 	/mysite/page1/paragraphs
-		/mysite/page1/paragraphs/paragraph1
+		/mysite/page1/paragraphs/collection-element1
 			graffito:text = "This is the content of para1"
-		/mysite/page1/paragraphs/paragraph2
-			graffito:text = ""This is the content of para2"
+		/mysite/page1/paragraphs/collection-element2
+			graffito:text = "This is the content of para2"
 	... other subnodes for page1 ... 
 				]]></source>		  
 				</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.
+				    This one will contains the different paragraphs.				    
+				</p>
+				<p>
+				As explained in the following sections, it is possible to map to another JCR structure.
+				It is also possible to use another name for the jcr node names (see above).
 				</p>
-								
 								
 			</subsection>
-			<subsection name="Supported Collection Types">
-				<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 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>
+				</p>
+		
 			</subsection>	
-			<subsection name ="Using Collection Converter">
+
+			<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>
 			</subsection>	
-			<subsection name ="Existing Collection Converters">
+			<subsection name ="Predefined Collection Converters">
+			   <p>
+			     TO DO    
+			   </p>
+			</subsection>
+			<subsection name ="Building your own Collection Converters">
 			   <p>
 			     TO DO    
 			   </p>
-			</subsection>								
+			</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=505050&r1=505049&r2=505050
==============================================================================
--- 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
Thu Feb  8 14:01:30 2007
@@ -109,14 +109,7 @@
 				   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" />
-	
-</class-descriptor>
-				]]></source>
-
+				<p align="center"> <img src="../images/simple-classdescriptor-def.jpg" ></img></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".
@@ -132,41 +125,12 @@
 				</p>				   
 				   
  			    <p>Here are the class-descriptors required to map the classes Page, PageInfo
and Paragraph :</p>
-			<source><![CDATA[ 				
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Page" jcrNodeType="graffito:page">
-	<field-descriptor fieldName="path" path="true" />
-	<bean-descriptor fieldName="pageInfo" jcrName="pageInfo" />
-	<collection-descriptor fieldName="paragraphs" jcrName="paragraphs" elementClassName="org.apache.portals.graffito.jcr.testmodel.Paragraph"
/>
-</class-descriptor>
-									
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.PageInfo" jcrNodeType="graffito:PageInfo">
-	<field-descriptor fieldName="path" path="true" />
-	<field-descriptor fieldName="title" jcrName="graffito:title"/>
-	<field-descriptor fieldName="description" jcrName="graffito:description"/>
-</class-descriptor>
-
-<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Paragraph" jcrNodeType="graffito:paragraph">
-	<field-descriptor fieldName="path" path="true" />
-	<field-descriptor fieldName="text" jcrName="graffito:text"/>
-</class-descriptor>
-			]]></source>
-											
+ 			    <p 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. 
 				</p>
 				
-				<source><![CDATA[ 				
-<nodeType name="graffito:paragraph" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
-	<supertypes>
-		<supertype>mix:versionable</supertype>
-		<supertype>nt:base</supertype>
-	</supertypes>
-	<propertyDefinition name="*" requiredType="undefined" autoCreated="false" 
-			    mandatory="false" onParentVersion="COPY" protected="false" multiple="false" />
-	<propertyDefinition name="graffito:text" requiredType="String" autoCreated="false" 
-			    mandatory="true" onParentVersion="COPY" protected="false" multiple="false" />
-</nodeType>
-				]]></source>
+				<p 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.



Mime
View raw message