You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2005/09/08 21:25:50 UTC
svn commit: r279630 - in
/incubator/graffito/trunk/jcr-mapping/src/test-config: ./ convertertest/
jcrmapping.xml repository-test/ repository-test/meta/rep.properties
repository.xml
Author: clombart
Date: Thu Sep 8 14:25:43 2005
New Revision: 279630
URL: http://svn.apache.org/viewcvs?rev=279630&view=rev
Log:
reorganise test config files. Now, all files are under test-config
Added:
incubator/graffito/trunk/jcr-mapping/src/test-config/
- copied from r263842, incubator/graffito/trunk/jcr-mapping/src/conf/
incubator/graffito/trunk/jcr-mapping/src/test-config/jcrmapping.xml
- copied, changed from r278817, incubator/graffito/trunk/jcr-mapping/src/test/jcrmapping.xml
incubator/graffito/trunk/jcr-mapping/src/test-config/repository-test/
- copied from r278817, incubator/graffito/trunk/jcr-mapping/src/conf/repository-test/
incubator/graffito/trunk/jcr-mapping/src/test-config/repository.xml
- copied, changed from r278817, incubator/graffito/trunk/jcr-mapping/src/conf/repository.xml
Removed:
incubator/graffito/trunk/jcr-mapping/src/test-config/convertertest/
Modified:
incubator/graffito/trunk/jcr-mapping/src/test-config/repository-test/meta/rep.properties
Copied: incubator/graffito/trunk/jcr-mapping/src/test-config/jcrmapping.xml (from r278817, incubator/graffito/trunk/jcr-mapping/src/test/jcrmapping.xml)
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test-config/jcrmapping.xml?p2=incubator/graffito/trunk/jcr-mapping/src/test-config/jcrmapping.xml&p1=incubator/graffito/trunk/jcr-mapping/src/test/jcrmapping.xml&r1=278817&r2=279630&rev=279630&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/jcrmapping.xml (original)
+++ incubator/graffito/trunk/jcr-mapping/src/test-config/jcrmapping.xml Thu Sep 8 14:25:43 2005
@@ -1,69 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE graffito-jcr PUBLIC "-//The Apache Software Foundation//DTD Repository//EN" "..\dtd\graffito-jcr-mapping.dtd">
<graffito-jcr>
- <!-- Class-description map one javabean into a JCR structure (node & property) -->
- <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.Folder" jcrNodeType= "nt:unstructured" >
- <!-- Field-descriptor is used to map simple attributes to jcr property -->
- <field-descriptor fieldName="name" jcrName="name" />
- <field-descriptor fieldName="description" jcrName="description" />
- <field-descriptor fieldName="title" jcrName="title" />
- <field-descriptor fieldName="creationDate" jcrName="creationDate" />
- <field-descriptor fieldName="lastModified" jcrName="lastModified" />
-
- </class-descriptor>
-
- <!--
- The following classes are used to test object associations
- A has an assocition (1..1) with B (field b) => B is mapped as subnode in A
- A has a collection of C (field "collection" ) => there are n subnodes used to map the "C" collection
+ <class-descriptor
+ className="org.apache.portals.graffito.jcr.testmodel.Folder" jcrNodeType="nt:unstructured">
+ <!-- Field-descriptor is used to map simple attributes to jcr property -->
+ <field-descriptor fieldName="name" jcrName="name" />
+ <field-descriptor fieldName="description" jcrName="description" />
+ <field-descriptor fieldName="title" jcrName="title" />
+ <field-descriptor fieldName="creationDate" jcrName="creationDate" />
+ <field-descriptor fieldName="lastModified" jcrName="lastModified" />
+
+ </class-descriptor>
+
+ <!--
+ The following classes are used to test object associations
+ A has an assocition (1..1) with B (field b) => B is mapped as subnode in A
+ A has a collection of C (field "collection" ) => there are n subnodes used to map the "C" collection
- -->
- <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.A" jcrNodeType="nt:unstructured" >
- <!-- Field-descriptor is used to map simple attributes to jcr property -->
- <field-descriptor fieldName="a1" jcrName="a1" />
- <field-descriptor fieldName="a2" jcrName="a2" />
-
- <!-- bean-descriptor is used to map a bean into subnode
- * The definition of the associated class has to be defined in this mapping file
- * proxy="true" => use lazy laoding for this attribute b when retrieving A
- -->
- <bean-descriptor fieldName="b" jcrName="b" proxy="false" />
-
- <!-- collection-descriptor is used to map a collection into subnodes :
- * fieldId is the attribute name used to defined the jcr node name. It is a unique value field.
- * proxy="true" => use lazy laoding for this attribute b when retrieving A
- There are 2 ways to map a collection into subnodes.
-
- 1.
- /mypath/mynode
- /mypath/mynode/mycollection
- /mypath/mynode/mycollection/item1
- /mypath/mynode/mycollection/item2
- ...
- 2.
- /mypath/mynode
- /mypath/mynode/item1
- /mypath/mynode/item2
- ...
- The first one gives the possibilty to use unstructured node type.
- The second strategy required mapping based on the node type because "/mypath/mynode" can contain other subnodes (which are not items for this collection)
- -->
+ -->
+ <class-descriptor
+ className="org.apache.portals.graffito.jcr.testmodel.A"
+ jcrNodeType="nt:unstructured">
+ <!-- Field-descriptor is used to map simple attributes to jcr property -->
+ <field-descriptor fieldName="a1" jcrName="a1" />
+ <field-descriptor fieldName="a2" jcrName="a2" />
+
+ <!-- bean-descriptor is used to map a bean into subnode
+ * The definition of the associated class has to be defined in this mapping file
+ * proxy="true" => use lazy laoding for this attribute b when retrieving A
+ -->
+ <bean-descriptor fieldName="b" jcrName="b" proxy="false" />
+
+
+ <!--
+ Use the default collection mapping stategy and the default collection type (can be a Vector, an ArrayList, a Collection or a List)
+ The default collection mapping strategy map a collection under an extra JCR node (specify by the jcrName).
+ So, in the following case, the result will be :
+ /test (containing a object A)
+ a1 (propoerty)
+ a2 (property)
+ collection (node)
+ collection-item1 (node)
+ ...
+ collection-item2 (node)
+ ...
- <!-- First way to map a collection : use an extra node containing all collection items -->
- <collection-descriptor fieldName="collection" jcrName="collection" proxy="false" fieldId="id" className="org.apache.portals.graffito.jcr.testmodel.C" />
+ If needed, the collectionConverter attribute can be used to specify another collection converter class (mapping strategy)
+ The managableCollection attribute can be also used to support another kind of Collection or Map
- </class-descriptor>
-
- <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.B" jcrNodeType= "nt:unstructured" >
- <!-- Field-descriptor is used to map simple attributes to jcr property -->
- <field-descriptor fieldName="b1" jcrName="b1" />
- <field-descriptor fieldName="b2" jcrName="b2" />
-
- </class-descriptor>
-
- <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.C" jcrNodeType="graffito:C" >
- <!-- Field-descriptor is used to map simple attributes to jcr property -->
- <field-descriptor fieldName="id" jcrName="graffito:id" />
- <field-descriptor fieldName="name" jcrName="graffito:name" />
- </class-descriptor>
-
+ -->
+ <collection-descriptor fieldName="collection" jcrName="collection" proxy="false" elementClassName="org.apache.portals.graffito.jcr.testmodel.C" />
+
+ </class-descriptor>
+
+ <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.B" jcrNodeType="nt:unstructured">
+ <!-- Field-descriptor is used to map simple attributes to jcr property -->
+ <field-descriptor fieldName="b1" jcrName="b1" />
+ <field-descriptor fieldName="b2" jcrName="b2" />
+
+ </class-descriptor>
+
+ <class-descriptor className="org.apache.portals.graffito.jcr.testmodel.C" jcrNodeType="graffito:C">
+ <!-- Field-descriptor is used to map simple attributes to jcr property -->
+ <field-descriptor fieldName="id" jcrName="graffito:id" id="true" />
+ <field-descriptor fieldName="name" jcrName="graffito:name" />
+ </class-descriptor>
+
</graffito-jcr>
Modified: incubator/graffito/trunk/jcr-mapping/src/test-config/repository-test/meta/rep.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test-config/repository-test/meta/rep.properties?rev=279630&r1=278817&r2=279630&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test-config/repository-test/meta/rep.properties (original)
+++ incubator/graffito/trunk/jcr-mapping/src/test-config/repository-test/meta/rep.properties Thu Sep 8 14:25:43 2005
@@ -1,16 +1,16 @@
-#Mon Sep 05 21:15:37 CEST 2005
+#Thu Sep 08 23:16:48 CEST 2005
option.versioning.supported=true
jcr.repository.version=1.0-dev
jcr.repository.name=Jackrabbit
option.observation.supported=true
option.locking.supported=true
option.transactions.supported=true
-jcr.repository.stats.nodes.count=12
+jcr.repository.stats.nodes.count=537
jcr.specification.name=Content Repository API for Java(TM) Technology Specification
level.2.supported=true
option.query.sql.supported=true
level.1.supported=true
-jcr.repository.stats.properties.count=206
+jcr.repository.stats.properties.count=2102
jcr.repository.vendor=Apache Software Foundation
jcr.specification.version=1.0
query.xpath.doc.order=true
Copied: incubator/graffito/trunk/jcr-mapping/src/test-config/repository.xml (from r278817, incubator/graffito/trunk/jcr-mapping/src/conf/repository.xml)
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test-config/repository.xml?p2=incubator/graffito/trunk/jcr-mapping/src/test-config/repository.xml&p1=incubator/graffito/trunk/jcr-mapping/src/conf/repository.xml&r1=278817&r2=279630&rev=279630&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/conf/repository.xml (original)
+++ incubator/graffito/trunk/jcr-mapping/src/test-config/repository.xml Thu Sep 8 14:25:43 2005
@@ -131,7 +131,7 @@
(e.g. registered namespaces, custom node types, etc.)
-->
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
- <param name="path" value="${rep.home}/../../src/conf/repository-test"/>
+ <param name="path" value="${rep.home}/../../src/test-config/repository-test"/>
</FileSystem>
<!--