incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r375404 - in /incubator/graffito/trunk/jcr/jcr-mapping/xdocs: bean-strategy.xml collection-strategy.xml engine-introduction.xml introduction-strategies.xml navigation.xml
Date Mon, 06 Feb 2006 22:45:38 GMT
Author: clombart
Date: Mon Feb  6 14:45:36 2006
New Revision: 375404

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

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/bean-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/collection-strategy.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/introduction-strategies.xml
    incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/bean-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/bean-strategy.xml?rev=375404&r1=375403&r2=375404&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/bean-strategy.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/bean-strategy.xml Mon Feb  6 14:45:36 2006
@@ -60,7 +60,7 @@
   ... other subnodes for page1 ... 
 							  ]]></source>		  
 				</p>						
-				<p>Creating a subnode like this example (mysite/page1/pageInfo) is the default
behaviour. See the section <a href="component-strategy.html">Reviewing the bean-descriptor</a>
to get other bean-field mapping strategies.</p>
+				<p>Creating a subnode like this example (mysite/page1/pageInfo) is the default
behaviour. See the section <a href="advance-beans-strategy.html">Reviewing the bean-descriptor</a>
to get other bean-field mapping strategies.</p>
 				
 			
 			</subsection>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/collection-strategy.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/collection-strategy.xml?rev=375404&r1=375403&r2=375404&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/collection-strategy.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/collection-strategy.xml Mon Feb  6 14:45:36
2006
@@ -1,29 +1,71 @@
 <?xml version="1.0"?>
 <!-- 
-Copyright 2004 The Apache Software Foundation
-Licensed  under the  Apache License,  Version 2.0  (the "License");
-you may not use  this file  except in  compliance with the License.
-You may obtain a copy of the License at 
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed  under the  License is distributed on an "AS IS" BASIS,
-WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
-implied.
-
-See the License for the specific language governing permissions and
-limitations under the License.
--->
+     Copyright 2004 The Apache Software Foundation
+     Licensed  under the  Apache License,  Version 2.0  (the "License");
+     you may not use  this file  except in  compliance with the License.
+     You may obtain a copy of the License at 
+     
+     http://www.apache.org/licenses/LICENSE-2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed  under the  License is distributed on an "AS IS" BASIS,
+     WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
+     implied.
+     
+     See the License for the specific language governing permissions and
+     limitations under the License.
+     -->
 <document>
 	<properties>
 		<author email="christophe.lombart@gmail.com">Christophe Lombart</author>
 		<title>Simple Object Mapping Strategies</title>
 	</properties>
 	<body>
+		
+		<section name="Mapping Collection Fields">
+			<subsection name="Introduction">
+				<p>The collection-descriptor maps a collection attribute into JCR nodes.</p>
+				<p>Based on our model defined <a href="introduction-strategies.html">here</a>,
the following collection-descriptor is used to map the "paragraphs" field into the JCR node
called "paragraphs".</p>
 				
-		<section name="Mapping Collection Strategy">
-			TODO
+				<source><![CDATA[ 				
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Page" jcrNodeType="graffito:page">
+	<collection-descriptor fieldName="paragraphs" jcrName="paragraphs" 
+			       elementClassName="org.apache.portals.graffito.jcr.testmodel.Paragraph" />
+	<!-- other field, bean and collection mapping here !-->
+</class-descriptor>
+																		
+<class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Paragraph" jcrNodeType="graffito:paragraph">
+	<field-descriptor fieldName="path" path="true" />
+	<field-descriptor fieldName="text" jcrName="graffito:text"/>
+</class-descriptor>									
+				]]></source>
+								
+				<p>
+					The collection-descriptor contains the elementClassName attribute which specify the
collection element class. 
+					
+				</p>
+								
+			</subsection>
+							
+			<subsection name ="Result in the JCR repository">
+				<p>
+					Following our example, the resulting JCR structure can be : 		
+				</p>
+				<p>
+				<source><![CDATA[ 
+/mysite/page1	
+	/mysite/page1/paragraphs
+		/mysite/page1/paragraphs/paragraph1
+			graffito:text = "This is the content of para1"
+		/mysite/page1/paragraphs/paragraph2
+			graffito:text = ""This is the content of para2"
+	... other subnodes for page1 ... 
+				]]></source>		  
+				</p>						
+				<p>Creating a subnode like this example (mysite/page1/paragraphs) is the default
behaviour. See the section <a href="advance-collections-strategy.html">Reviewing the
collection-descriptor</a> to get other collection-field mapping strategies.</p>
+								
+								
+			</subsection>
 		</section>
 	</body>
 </document>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml?rev=375404&r1=375403&r2=375404&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/engine-introduction.xml Mon Feb  6 14:45:36
2006
@@ -47,9 +47,6 @@
 				</p>				
 			</subsection>
 			
-			<subsection name="The API Overview">
-				<p>[TO DO]</p>
-			</subsection>			
 						
 		</section>
 	</body>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/introduction-strategies.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/introduction-strategies.xml?rev=375404&r1=375403&r2=375404&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/introduction-strategies.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/introduction-strategies.xml Mon Feb  6
14:45:36 2006
@@ -90,9 +90,7 @@
 <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" proxy="false" 
-	   elementClassName="org.apache.portals.graffito.jcr.testmodel.Paragraph" 
-	   collectionConverter="org.apache.portals.graffito.jcr.persistence.collectionconverter.impl.NTCollectionConverterImpl"
/>
+	<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">
@@ -116,10 +114,11 @@
 	/mysite/page1/pageInfo
 		graffito:title = "This is my page title"
 		graffito:description = "This is my page description"
-	/mysite/page1/paragraph1
-		graffito:text = "This is the content of para1"
-	/mysite/page1/paragraph2
-		graffito:text = ""This is the content of para2"
+	/mysite/page1/paragraphs
+		/mysite/page1/paragraphs/paragraph1
+			graffito:text = "This is the content of para1"
+		/mysite/page1/paragraphs/paragraph2
+			graffito:text = ""This is the content of para2"
 			]]></source>		  
 			</p>	
 			<p>It is possible to have another kind of jcr structure by using other mapping strategies.
You can see the section "Advance Mapping strategies" to get more information on that.</p>

Modified: incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml?rev=375404&r1=375403&r2=375404&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/xdocs/navigation.xml Mon Feb  6 14:45:36 2006
@@ -33,9 +33,16 @@
 		</menu>	
 		<menu name="The Persistence Manager">			
 			<item name="Introduction" href="engine-introduction.html"/>
+			<item name="Persistence Manager API" href = "" collapse="true" >
+				<item name="Basic operations" href=""/>
+				<item name="Search" href=""/>
+				<item name="Managing Version" href=""/>
+				
+			</item>
+				
 			<item name="Configuration" href="engine-configuration.html"/>
 			<item name="Spring Integration" href="engine-spring.html"/>
-			<item name="DTD" href="graffito-jcr-mapping.dtd.txt"/>
+			
 		</menu>	
 		
 		<menu name="Mapping Stategies">			
@@ -43,13 +50,14 @@
 			<item name="Mapping Atomic Fields" href="atomic-strategy.html"/>			
 			<item name="Mapping Bean Fields" href="bean-strategy.html"/>			
 			<item name="Mapping Collection Fields" href="collection-strategy.html"/>			
-			
+			<item name="DTD" href="graffito-jcr-mapping.dtd.txt"/>
 		</menu>			
 		
 		<menu name="Advance Mapping Stategies">			
 			<item name="Introduction" href="introduction-advanced-strategies.html"/>
 			<item name="Inheritance" href="inheritance-strategy.html"/>
-			<item name="Reviewing the bean-descriptor" href="component-strategy.html"/>				
	
+			<item name="Reviewing the bean-descriptor" href="advanced-beans-strategy.html"/>
					
+			<item name="Reviewing the collection-descriptor" href="advanced-collections-strategy.html"/>
					
 			
 			<item name="Adding Extra JCR Nodes" href="extra-nodes-strategy.html"/>
 			



Mime
View raw message