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/03/30 08:32:07 UTC
svn commit: r159469 [1/2] - in incubator/graffito/trunk/jcr-mapping: ./
repotest/ repotest/repository/ repotest/repository/meta/
repotest/repository/namespaces/ repotest/repository/nodetypes/
repotest/versions/ repotest/versions/blobs/ repotest/versions/data/
repotest/versions/data/face/ repotest/versions/data/face/face/
repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/
repotest/workspaces/ repotest/workspaces/default/
repotest/workspaces/default/blobs/ repotest/workspaces/default/data/
repotest/workspaces/default/data/0b0d/
repotest/workspaces/default/data/0b0d/3027/
repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/
repotest/workspaces/default/data/cafe/
repotest/workspaces/default/data/cafe/babe/
repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/
repotest/workspaces/default/data/dead/
repotest/workspaces/default/data/dead/beef/
repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/
repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/
repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/
repotest/workspaces/default/index/ src/ src/conf/ src/conf/convertertest/
src/conf/repotest/ src/java/ src/java/org/ src/java/org/apache/
src/java/org/apache/portals/ src/java/org/apache/portals/graffito/
src/java/org/apache/portals/graffito/jcr/
src/java/org/apache/portals/graffito/jcr/converter/
src/java/org/apache/portals/graffito/jcr/converter/impl/
src/java/org/apache/portals/graffito/jcr/exception/
src/java/org/apache/portals/graffito/jcr/repository/
src/java/org/apache/portals/graffito/jcr/session/
src/java/org/apache/portals/graffito/jcr/session/impl/ src/test/
src/test/org/ src/test/org/apache/ src/test/org/apache/portals/
src/test/org/apache/portals/graffito/
src/test/org/apache/portals/graffito/jcr/
src/test/org/apache/portals/graffito/jcr/converter/
src/test/org/apache/portals/graffito/jcr/converter/impl/
src/test/org/apache/portals/graffito/jcr/repository/
src/test/org/apache/portals/graffito/jcr/session/
src/test/org/apache/portals/graffito/jcr/session/impl/
src/test/org/apache/portals/graffito/jcr/testconverter/
src/test/org/apache/portals/graffito/jcr/testmodel/
Author: clombart
Date: Wed Mar 30 00:31:54 2005
New Revision: 159469
URL: http://svn.apache.org/viewcvs?view=rev&rev=159469
Log:
Add the jcr-mapping subproject - it is still a prototype and need more work
Added:
incubator/graffito/trunk/jcr-mapping/
incubator/graffito/trunk/jcr-mapping/.classpath
incubator/graffito/trunk/jcr-mapping/.project
incubator/graffito/trunk/jcr-mapping/maven.xml
incubator/graffito/trunk/jcr-mapping/project.properties
incubator/graffito/trunk/jcr-mapping/project.xml
incubator/graffito/trunk/jcr-mapping/repotest/
incubator/graffito/trunk/jcr-mapping/repotest/repository/
incubator/graffito/trunk/jcr-mapping/repotest/repository.xml
incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/
incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rep.properties
incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rootUUID
incubator/graffito/trunk/jcr-mapping/repotest/repository/namespaces/
incubator/graffito/trunk/jcr-mapping/repotest/repository/namespaces/ns_reg.properties
incubator/graffito/trunk/jcr-mapping/repotest/repository/nodetypes/
incubator/graffito/trunk/jcr-mapping/repotest/repository/nodetypes/custom_nodetypes.xml
incubator/graffito/trunk/jcr-mapping/repotest/versions/
incubator/graffito/trunk/jcr-mapping/repotest/versions/blobs/
incubator/graffito/trunk/jcr-mapping/repotest/versions/data/
incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/
incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/
incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/
incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/.node.xml
incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/672388333465d36a71297afb5d46001f.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/blobs/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/.node.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/3bc2a0f92e8f151f021363549cb4cdf0.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/672388333465d36a71297afb5d46001f.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/f3260e15c8db7bcf398fcfc195912a66.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/.node.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/.node.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/.node.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/.node.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/_3h.cfs (with props)
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/deletable (with props)
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/ns_mappings.properties
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/redo.log
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/segments (with props)
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/locks
incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/workspace.xml
incubator/graffito/trunk/jcr-mapping/src/
incubator/graffito/trunk/jcr-mapping/src/conf/
incubator/graffito/trunk/jcr-mapping/src/conf/convertertest/
incubator/graffito/trunk/jcr-mapping/src/conf/convertertest/converters.xml
incubator/graffito/trunk/jcr-mapping/src/conf/jaas.config
incubator/graffito/trunk/jcr-mapping/src/conf/repotest/
incubator/graffito/trunk/jcr-mapping/src/java/
incubator/graffito/trunk/jcr-mapping/src/java/org/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/Converter.java
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/ConverterManager.java
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/impl/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerImpl.java
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/JcrSession.java
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/impl/
incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/impl/JcrSessionImpl.java
incubator/graffito/trunk/jcr-mapping/src/test/
incubator/graffito/trunk/jcr-mapping/src/test/org/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/converter/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/converter/impl/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerTest.java
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/TestRepositoryUtil.java
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/session/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/session/impl/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/session/impl/JcrSessionTest.java
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testconverter/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testconverter/DocumentConverter.java
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testconverter/FolderConverter.java
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/CmsObject.java
incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/testmodel/Folder.java
Added: incubator/graffito/trunk/jcr-mapping/.classpath
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/.classpath?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/.classpath (added)
+++ incubator/graffito/trunk/jcr-mapping/.classpath Wed Mar 30 00:31:54 2005
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<classpath>
+ <classpathentry excluding="" kind="src" path="src/java">
+ </classpathentry>
+ <classpathentry output="target/test-classes" kind="src" path="src/test">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jackrabbit/jars/jackrabbit-0.16.2-dev.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/concurrent/jars/concurrent-1.3.4.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-2.1.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jdom/jars/jdom-1.0.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/javacc/jars/javacc-3.2.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-jta-1.0-M1.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/jsr170/jars/jcr-0.16.2.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/lucene/jars/lucene-1.4.3.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xercesImpl-2.6.2.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/cqfs/jars/cqfs-jackrabbit-3.5.6.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/cqfs/jars/cqfs-3.5.6.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.2.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.7.0.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.5.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xerces-2.4.0.jar">
+ </classpathentry>
+ <classpathentry kind="var" path="MAVEN_REPO/xml-apis/jars/xml-apis-1.0.b2.jar">
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes">
+ </classpathentry>
+</classpath>
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/.project
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/.project?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/.project (added)
+++ incubator/graffito/trunk/jcr-mapping/.project Wed Mar 30 00:31:54 2005
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<projectDescription>
+ <name>graffito-jcr-mapping</name>
+ <comment>This subproject contains the JCR Mapping tools</comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/maven.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/maven.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/maven.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,36 @@
+<!--
+ Copyright 2002-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.
+ -->
+<project default="java:jar"
+ xmlns:j="jelly:core"
+ xmlns:define="jelly:define"
+ xmlns:maven="jelly:maven"
+ >
+
+
+ <!-- ================================================================ -->
+ <!-- TEST -->
+ <!-- ================================================================ -->
+ <preGoal name="test:test">
+ <attainGoal name="testSetup"/>
+ </preGoal>
+
+ <goal name="testSetup">
+ <j:set var="maven.junit.sysproperties" value="${maven.junit.sysproperties} java.security.auth.login.config" />
+ <j:set var="java.security.auth.login.config" value="src/conf/jaas.config" />
+ </goal>
+</project>
+
+
Added: incubator/graffito/trunk/jcr-mapping/project.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/project.properties?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/project.properties (added)
+++ incubator/graffito/trunk/jcr-mapping/project.properties Wed Mar 30 00:31:54 2005
@@ -0,0 +1,42 @@
+# 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.
+
+#-----------------------------------------------------------------------------------------------------
+# MAVEN REPORISTORIES
+#-----------------------------------------------------------------------------------------------------
+maven.repo.remote = http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/, http://dist.codehaus.org/, http://cvs.apache.org/repository
+
+#-----------------------------------------------------------------------------------------------------
+# MULTIPROJECTS
+#-----------------------------------------------------------------------------------------------------
+maven.multiproject.type=jar
+
+#-----------------------------------------------------------------------------------------------------
+# DOC : SITE & PDF DOC
+#-----------------------------------------------------------------------------------------------------
+maven.docs.dest=${basedir}/../../site/jcr-mapping
+
+# Display the date on the Maven web site
+maven.xdoc.date = left
+
+maven.xdoc.version = ${pom.currentVersion}
+maven.pdf.navigationFile=navigation_pdf.xml
+
+#-----------------------------------------------------------------------------------------------------
+# COMPILE
+#-----------------------------------------------------------------------------------------------------
+maven.compile.deprecation=on
+
+
+
Added: incubator/graffito/trunk/jcr-mapping/project.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/project.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/project.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/project.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<project>
+ <extend>${basedir}/../project.xml</extend>
+ <pomVersion>3</pomVersion>
+ <id>graffito-jcr-mapping</id>
+ <groupId>graffito</groupId>
+ <name>Graffito JCR Mapping</name>
+ <currentVersion>1.0-a1-dev</currentVersion>
+ <package>org.apache.portals.graffito</package>
+ <description>
+ This subproject contains the JCR Mapping tools
+ </description>
+ <shortDescription>Graffito JCR Mapping Tools</shortDescription>
+
+ <repository>
+ <connection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr-mapping</connection>
+ <developerConnection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/jcr-mapping</developerConnection>
+ <url>http://svn.apache.org/viewcvs</url>
+ </repository>
+
+
+ <dependencies>
+
+ <dependency>
+ <groupId>jackrabbit</groupId>
+ <artifactId>jackrabbit</artifactId>
+ <version>0.16.2-dev</version>
+ <properties><war.bundle>true</war.bundle></properties>
+ </dependency>
+ <dependency>
+ <id>concurrent</id>
+ <version>1.3.4</version>
+ </dependency>
+ <dependency>
+ <id>junit</id>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <id>commons-collections</id>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <id>jdom</id>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <id>javacc</id>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-jta</artifactId>
+ <version>1.0-M1</version>
+ </dependency>
+ <dependency>
+ <groupId>jsr170</groupId>
+ <artifactId>jcr</artifactId>
+ <version>0.16.2</version>
+ <url>http://www.day.com/maven/jsr170/jars/jcr-0.16.2.jar</url>
+ </dependency>
+ <dependency>
+ <id>log4j</id>
+ <version>1.2.8</version>
+ </dependency>
+ <dependency>
+ <groupId>lucene</groupId>
+ <artifactId>lucene</artifactId>
+ <version>1.4.3</version>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.6.2</version>
+ </dependency>
+ <!--
+ cqfs-jackrabbit and cqfs are optional runtime dependencies
+ (an alternative FileSystem implementation);
+ commons-logging is a dependency of cqfs
+ -->
+ <dependency>
+ <groupId>cqfs</groupId>
+ <artifactId>cqfs-jackrabbit</artifactId>
+ <version>3.5.6</version>
+ <url>http://www.day.com/maven/cqfs/jars/cqfs-jackrabbit-3.5.6.jar</url>
+ </dependency>
+ <dependency>
+ <groupId>cqfs</groupId>
+ <artifactId>cqfs</artifactId>
+ <version>3.5.6</version>
+ <url>http://www.day.com/maven/cqfs/jars/cqfs-3.5.6.jar</url>
+ </dependency>
+
+ <dependency>
+ <id>commons-logging</id>
+ <version>1.0.2</version>
+ <url>http://jakarta.apache.org/commons/logging.html</url>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <typeId>jar</typeId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.7.0</version>
+
+ </dependency>
+
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <typeId>jar</typeId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.5</version>
+
+ </dependency>
+
+ <!-- runtime dependencies only required for testing and sample programs -->
+ <dependency>
+ <id>xerces</id>
+ <version>2.4.0</version>
+ <url>http://xml.apache.org/xerces2-j/index.html</url>
+ </dependency>
+
+ <dependency>
+ <id>xml-apis</id>
+ <version>1.0.b2</version>
+ <url>http://xml.apache.org/commons/</url>
+ </dependency>
+ </dependencies>
+
+
+ <build>
+ <sourceDirectory>src/java</sourceDirectory>
+
+ <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
+ <unitTest>
+ <excludes>
+ <exclude>org/apache/portals/graffito/jcr/testmodel/*.java</exclude>
+ <exclude>org/apache/portals/graffito/jcr/testconverter/*.java</exclude>
+ </excludes>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/test</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ </unitTest>
+
+ <resources>
+ <resource>
+ <directory>${basedir}/src/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+
+ </build>
+ <reports>
+ <report>maven-javadoc-plugin</report>
+ </reports>
+</project>
Added: incubator/graffito/trunk/jcr-mapping/repotest/repository.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/repository.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/repository.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/repository.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<Repository>
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/repository"/>
+ </FileSystem>
+ <Security appName="Jackrabbit">
+ <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"/>
+ </Security>
+ <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />
+ <Workspace name="${wsp.name}">
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}"/>
+ </FileSystem>
+ <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager" />
+ <SearchIndex>
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}/index"/>
+ </FileSystem>
+ </SearchIndex>
+ </Workspace>
+ <Versioning rootPath="${rep.home}/versions">
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${rep.home}/versions"/>
+ </FileSystem>
+ <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager" />
+ </Versioning>
+</Repository>
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rep.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rep.properties?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rep.properties (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rep.properties Wed Mar 30 00:31:54 2005
@@ -0,0 +1,20 @@
+#Wed Mar 30 10:20:11 CEST 2005
+jcr.specification.version=0.16.2
+jcr.repository.stats.nodes.count=1
+query.jcrpath=true
+query.xpath.pos.index=true
+jcr.repository.version=0.16.2
+option.versioning.supported=true
+option.locking.supported=true
+jcr.specification.name=Content Repository API for Java(TM) Technology Specification
+level.2.supported=true
+option.query.sql.supported=true
+jcr.repository.vendor.url=http\://www.apache.org/
+query.jcrscore=true
+option.observation.supported=true
+query.xpath.doc.order=true
+jcr.repository.stats.properties.count=41
+jcr.repository.vendor=Apache Software Foundation
+option.transactions.supported=true
+level.1.supported=true
+jcr.repository.name=Jackrabbit
Added: incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rootUUID
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rootUUID?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rootUUID (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/repository/meta/rootUUID Wed Mar 30 00:31:54 2005
@@ -0,0 +1 @@
+cafebabe-cafe-babe-cafe-babecafebabe
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/repotest/repository/namespaces/ns_reg.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/repository/namespaces/ns_reg.properties?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/repository/namespaces/ns_reg.properties (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/repository/namespaces/ns_reg.properties Wed Mar 30 00:31:54 2005
@@ -0,0 +1,12 @@
+#Tue Mar 29 14:12:31 CEST 2005
+xs=http\://www.w3.org/2001/XMLSchema
+graffito=http\://incubator.apache.org/graffito
+jcrfn=http\://www.jcp.org/jcr/xpath-functions/1.0
+xml=http\://www.w3.org/XML/1998/namespace
+jcr=http\://www.jcp.org/jcr/1.0
+nt=http\://www.jcp.org/jcr/nt/1.0
+fn=http\://www.w3.org/2004/10/xpath-functions
+rep=internal
+sv=http\://www.jcp.org/jcr/sv/1.0
+mix=http\://www.jcp.org/jcr/mix/1.0
+=
Added: incubator/graffito/trunk/jcr-mapping/repotest/repository/nodetypes/custom_nodetypes.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/repository/nodetypes/custom_nodetypes.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/repository/nodetypes/custom_nodetypes.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/repository/nodetypes/custom_nodetypes.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * 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.
+ */
+ -->
+<!DOCTYPE nodeTypes [
+ <!ELEMENT nodeTypes (nodeType)*>
+ <!ELEMENT nodeType (supertypes?|propertyDef*|childNodeDef*)>
+
+ <!ATTLIST nodeType
+ name CDATA #REQUIRED
+ isMixin (true|false) #REQUIRED
+ hasOrderableChildNodes (true|false) #REQUIRED
+ primaryItemName CDATA #REQUIRED
+ >
+ <!ELEMENT supertypes (supertype+)>
+ <!ELEMENT supertype (CDATA)>
+
+ <!ELEMENT propertyDef (valueConstraints?|defaultValues?)>
+ <!ATTLIST propertyDef
+ name CDATA #REQUIRED
+ requiredType (String|Date|Path|Name|Reference|Binary|Double|Long|Boolean|undefined) #REQUIRED
+ autoCreate (true|false) #REQUIRED
+ mandatory (true|false) #REQUIRED
+ onParentVersion (COPY|VERSION|INITIALIZE|COMPUTE|IGNORE|ABORT) #REQUIRED
+ protected (true|false) #REQUIRED
+ multiple (true|false) #REQUIRED
+ >
+ <!ELEMENT valueConstraints (valueConstraint+)>
+ <!ELEMENT valueConstraint (CDATA)>
+ <!ELEMENT defaultValues (defaultValue+)>
+ <!ELEMENT defaultValue (CDATA)>
+
+ <!ELEMENT childNodeDef (requiredPrimaryTypes)>
+ <!ATTLIST childNodeDef
+ name CDATA #REQUIRED
+ defaultPrimaryType CDATA #REQUIRED
+ autoCreate (true|false) #REQUIRED
+ mandatory (true|false) #REQUIRED
+ onParentVersion (COPY|VERSION|INITIALIZE|COMPUTE|IGNORE|ABORT) #REQUIRED
+ protected (true|false) #REQUIRED
+ sameNameSibs (true|false) #REQUIRED
+ >
+ <!ELEMENT requiredPrimaryTypes (requiredPrimaryType+)>
+ <!ELEMENT requiredPrimaryType (CDATA)>
+]>
+<nodeTypes
+ xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+ xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
+ xmlns:jcr="http://www.jcp.org/jcr/1.0"
+ xmlns:graffito="http://incubator.apache.org/graffito">
+
+ <nodeType name="graffito:folder" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:folder</supertype>
+ </supertypes>
+ <propertyDef name="graffito:description" requiredType="String" autoCreate="false" mandatory="true" onParentVersion="COPY" protected="false" multiple="false"/>
+ </nodeType>
+
+</nodeTypes>
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/.node.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/.node.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/.node.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/.node.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node uuid="faceface-ab3b-48a9-b31b-e7d0a9c1c3b1" parentUUID="" definitionId="-1232748307" nodeType="{internal}root">
+ <parents>
+ </parents>
+ <mixinTypes>
+ </mixinTypes>
+ <properties>
+ <property name="{http://www.jcp.org/jcr/1.0}primaryType">
+ </property>
+ </properties>
+ <nodes>
+ </nodes>
+</node>
Added: incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/672388333465d36a71297afb5d46001f.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/672388333465d36a71297afb5d46001f.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/672388333465d36a71297afb5d46001f.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/versions/data/face/face/ab3b48a9b31be7d0a9c1c3b1/672388333465d36a71297afb5d46001f.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://www.jcp.org/jcr/1.0}primaryType" parentUUID="faceface-ab3b-48a9-b31b-e7d0a9c1c3b1" multiValued="false" definitionId="1266667140" type="Name">
+ <values>
+ <value>{internal}root</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/.node.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/.node.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/.node.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/.node.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node uuid="0b0d3027-7aea-4a42-8ef0-8cb5da4876fe" parentUUID="cafebabe-cafe-babe-cafe-babecafebabe" definitionId="-1603354723" nodeType="{http://incubator.apache.org/graffito}folder">
+ <parents>
+ <parent uuid="cafebabe-cafe-babe-cafe-babecafebabe"/>
+ </parents>
+ <mixinTypes>
+ </mixinTypes>
+ <properties>
+ <property name="{http://www.jcp.org/jcr/1.0}created">
+ </property>
+ <property name="{http://www.jcp.org/jcr/1.0}primaryType">
+ </property>
+ <property name="{http://incubator.apache.org/graffito}description">
+ </property>
+ </properties>
+ <nodes>
+ </nodes>
+</node>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/3bc2a0f92e8f151f021363549cb4cdf0.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/3bc2a0f92e8f151f021363549cb4cdf0.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/3bc2a0f92e8f151f021363549cb4cdf0.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/3bc2a0f92e8f151f021363549cb4cdf0.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://incubator.apache.org/graffito}description" parentUUID="0b0d3027-7aea-4a42-8ef0-8cb5da4876fe" multiValued="false" definitionId="-977095330" type="String">
+ <values>
+ <value>new folder description</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/672388333465d36a71297afb5d46001f.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/672388333465d36a71297afb5d46001f.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/672388333465d36a71297afb5d46001f.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/672388333465d36a71297afb5d46001f.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://www.jcp.org/jcr/1.0}primaryType" parentUUID="0b0d3027-7aea-4a42-8ef0-8cb5da4876fe" multiValued="false" definitionId="1266667140" type="Name">
+ <values>
+ <value>{http://incubator.apache.org/graffito}folder</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/f3260e15c8db7bcf398fcfc195912a66.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/f3260e15c8db7bcf398fcfc195912a66.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/f3260e15c8db7bcf398fcfc195912a66.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/0b0d/3027/7aea4a428ef08cb5da4876fe/f3260e15c8db7bcf398fcfc195912a66.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://www.jcp.org/jcr/1.0}created" parentUUID="0b0d3027-7aea-4a42-8ef0-8cb5da4876fe" multiValued="false" definitionId="1162436058" type="Date">
+ <values>
+ <value>2005-03-30T10:20:10.726+02:00</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/.node.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/.node.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/.node.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/.node.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node uuid="cafebabe-cafe-babe-cafe-babecafebabe" parentUUID="" definitionId="-1232748307" nodeType="{internal}root">
+ <parents>
+ </parents>
+ <mixinTypes>
+ </mixinTypes>
+ <properties>
+ <property name="{http://www.jcp.org/jcr/1.0}primaryType">
+ </property>
+ </properties>
+ <nodes>
+ <node name="{http://www.jcp.org/jcr/1.0}system" uuid="deadbeef-cafe-babe-cafe-babecafebabe">
+ </node>
+ <node name="{}test" uuid="0b0d3027-7aea-4a42-8ef0-8cb5da4876fe">
+ </node>
+ </nodes>
+</node>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://www.jcp.org/jcr/1.0}primaryType" parentUUID="cafebabe-cafe-babe-cafe-babecafebabe" multiValued="false" definitionId="1266667140" type="Name">
+ <values>
+ <value>{internal}root</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/.node.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/.node.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/.node.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/.node.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node uuid="deadbeef-cafe-babe-cafe-babecafebabe" parentUUID="cafebabe-cafe-babe-cafe-babecafebabe" definitionId="-1971945898" nodeType="{internal}system">
+ <parents>
+ <parent uuid="cafebabe-cafe-babe-cafe-babecafebabe"/>
+ </parents>
+ <mixinTypes>
+ </mixinTypes>
+ <properties>
+ <property name="{http://www.jcp.org/jcr/1.0}primaryType">
+ </property>
+ </properties>
+ <nodes>
+ <node name="{http://www.jcp.org/jcr/1.0}versionStorage" uuid="deadbeef-face-babe-cafe-babecafebabe">
+ </node>
+ <node name="{http://www.jcp.org/jcr/1.0}nodeTypes" uuid="deadbeef-cafe-cafe-cafe-babecafebabe">
+ </node>
+ </nodes>
+</node>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://www.jcp.org/jcr/1.0}primaryType" parentUUID="deadbeef-cafe-babe-cafe-babecafebabe" multiValued="false" definitionId="1266667140" type="Name">
+ <values>
+ <value>{internal}system</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/.node.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/.node.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/.node.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/.node.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node uuid="deadbeef-cafe-cafe-cafe-babecafebabe" parentUUID="deadbeef-cafe-babe-cafe-babecafebabe" definitionId="1711684410" nodeType="{internal}nodeTypes">
+ <parents>
+ <parent uuid="deadbeef-cafe-babe-cafe-babecafebabe"/>
+ </parents>
+ <mixinTypes>
+ </mixinTypes>
+ <properties>
+ <property name="{http://www.jcp.org/jcr/1.0}primaryType">
+ </property>
+ </properties>
+ <nodes>
+ </nodes>
+</node>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/672388333465d36a71297afb5d46001f.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/672388333465d36a71297afb5d46001f.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://www.jcp.org/jcr/1.0}primaryType" parentUUID="deadbeef-cafe-cafe-cafe-babecafebabe" multiValued="false" definitionId="1266667140" type="Name">
+ <values>
+ <value>{internal}nodeTypes</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/.node.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/.node.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/.node.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/.node.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node uuid="deadbeef-face-babe-cafe-babecafebabe" parentUUID="deadbeef-cafe-babe-cafe-babecafebabe" definitionId="-873037191" nodeType="{internal}versionStorage">
+ <parents>
+ <parent uuid="deadbeef-cafe-babe-cafe-babecafebabe"/>
+ </parents>
+ <mixinTypes>
+ </mixinTypes>
+ <properties>
+ <property name="{http://www.jcp.org/jcr/1.0}primaryType">
+ </property>
+ </properties>
+ <nodes>
+ </nodes>
+</node>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<property name="{http://www.jcp.org/jcr/1.0}primaryType" parentUUID="deadbeef-face-babe-cafe-babecafebabe" multiValued="false" definitionId="1266667140" type="Name">
+ <values>
+ <value>{internal}versionStorage</value>
+ </values>
+</property>
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/_3h.cfs
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/_3h.cfs?view=auto&rev=159469
==============================================================================
Binary file - no diff available.
Propchange: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/_3h.cfs
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/deletable
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/deletable?view=auto&rev=159469
==============================================================================
Binary file - no diff available.
Propchange: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/deletable
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/ns_mappings.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/ns_mappings.properties?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/ns_mappings.properties (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/ns_mappings.properties Wed Mar 30 00:31:54 2005
@@ -0,0 +1,7 @@
+#Tue Mar 29 17:13:24 CEST 2005
+5=http\://incubator.apache.org/graffito
+4=http\://www.jcp.org/jcr/mix/1.0
+3=
+2=http\://www.jcp.org/jcr/nt/1.0
+1=internal
+0=http\://www.jcp.org/jcr/1.0
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/redo.log
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/redo.log?view=auto&rev=159469
==============================================================================
(empty)
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/segments
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/segments?view=auto&rev=159469
==============================================================================
Binary file - no diff available.
Propchange: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/index/segments
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/locks
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/locks?view=auto&rev=159469
==============================================================================
(empty)
Added: incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/workspace.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/workspace.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/workspace.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/repotest/workspaces/default/workspace.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace name="default">
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}" />
+ </FileSystem>
+ <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager" />
+ <SearchIndex>
+ <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+ <param name="path" value="${wsp.home}/index" />
+ </FileSystem>
+ </SearchIndex>
+</Workspace>
+
Added: incubator/graffito/trunk/jcr-mapping/src/conf/convertertest/converters.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/conf/convertertest/converters.xml?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/conf/convertertest/converters.xml (added)
+++ incubator/graffito/trunk/jcr-mapping/src/conf/convertertest/converters.xml Wed Mar 30 00:31:54 2005
@@ -0,0 +1,3 @@
+<converters>
+ <converter class="org.apache.portals.graffito.jcr.testmodel.Folder" converterClass="org.apache.portals.graffito.jcr.testconverter.FolderConverter" />
+</converters>
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/src/conf/jaas.config
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/conf/jaas.config?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/conf/jaas.config (added)
+++ incubator/graffito/trunk/jcr-mapping/src/conf/jaas.config Wed Mar 30 00:31:54 2005
@@ -0,0 +1,3 @@
+Jackrabbit {
+org.apache.jackrabbit.core.security.SimpleLoginModule required debug=false;
+};
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/Converter.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/Converter.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/Converter.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/Converter.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.jcr.converter;
+
+
+import javax.jcr.Session;
+
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+
+/**
+ * Convert a POJO into some Jcr Nodes
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public interface Converter
+{
+
+ public void insert(Session session, String path, Object object) throws JcrMappingException;
+
+ public void update(Session session, String path, Object object) throws JcrMappingException;
+
+ public Object getObject(Session session, String path) throws JcrMappingException;
+}
Added: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/ConverterManager.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/ConverterManager.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/ConverterManager.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/ConverterManager.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.jcr.converter;
+
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+
+/**
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public interface ConverterManager
+{
+ public Converter getConverter(Class clazz) throws JcrMappingException;
+}
Added: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerImpl.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerImpl.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerImpl.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.jcr.converter.impl;
+
+import java.util.HashMap;
+
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.portals.graffito.jcr.converter.ConverterManager;
+import org.apache.portals.graffito.jcr.converter.Converter;
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ *
+ * Default implementation for {@link org.apache.portals.graffito.jcr.converter.impl.ConverterManager}
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class ConverterManagerImpl implements ConverterManager
+{
+ private HashMap converters = new HashMap();
+ private Log log = LogFactory.getLog(ConverterManagerImpl.class);
+
+ /**
+ * Constructor
+ *
+ * @param xmlFile
+ * @throws JcrMappingException
+ */
+ public ConverterManagerImpl(String xmlFile) throws JcrMappingException
+ {
+ try
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document document = builder.parse(xmlFile);
+ Node root = document.getFirstChild();
+
+ NodeList converterList = root.getChildNodes();
+ for (int converterIndex = 0; converterIndex < converterList.getLength(); converterIndex++)
+ {
+ Node actionNode = converterList.item(converterIndex);
+ if (actionNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+ String converterId = actionNode.getAttributes().getNamedItem("class").getNodeValue();
+ String converterClassName = actionNode.getAttributes().getNamedItem("converterClass").getNodeValue();
+ log.info("Add converter : " + converterClassName + " for " + converterId);
+ converters.put(Class.forName(converterId), Class.forName(converterClassName));
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new JcrMappingException("Failed to initialise the ConverterManagerImpl", e);
+ }
+ }
+
+ /**
+ * @see org.apache.portals.graffito.jcr.converter.impl.ConverterManager#getConverter(java.lang.Class)
+ */
+ public Converter getConverter(Class clazz) throws JcrMappingException
+ {
+ try
+ {
+ Class converterClass = (Class)converters.get(clazz);
+ return (Converter) converterClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new JcrMappingException("Impossible to retrieve the converter class for " + clazz, e);
+ }
+ }
+
+}
Added: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/exception/JcrMappingException.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.jcr.exception;
+
+
+/**
+ * <p>Occurs when anything unexpected happens within the JCR mapping.</p>
+ *
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ *
+ * @version $Id: Exp $
+ */
+
+public class JcrMappingException extends Exception
+{
+
+ /**
+ * Default Constructor without information.
+ */
+ public JcrMappingException()
+ {
+ super();
+ }
+
+ /**
+ * Constructor with message.
+ *
+ * @param message the message associated to the exception
+ */
+ public JcrMappingException(String message)
+ {
+ super(message);
+ }
+
+ /**
+ * Constructor with throwable object.
+ *
+ * @param nested the associated throwable object
+ */
+ public JcrMappingException(Throwable nested)
+ {
+ super(nested);
+ }
+
+ /**
+ * Constructor with message and throwable object.
+ *
+ * @param message the message associated to the exception
+ * @param nested the associated throwable object
+ */
+ public JcrMappingException(String message, Throwable nested)
+ {
+ super(message, nested);
+ }
+
+}
Added: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/repository/RepositoryUtil.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,202 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.jcr.repository;
+
+import java.util.Hashtable;
+
+import javax.jcr.Repository;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.apache.jackrabbit.core.jndi.RegistryHelper;
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+
+
+
+/**
+* Utility class for managing JCR repositories
+*
+* @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+* @version $Id: Exp $
+*/
+public class RepositoryUtil
+{
+ /** Item path separator */
+ public static final String PATH_SEPARATOR = "/";
+
+ /**
+ * Register a new repository
+ *
+ * @param repositoryName The repository unique name
+ * @param configFile The JCR config file
+ * @param homeDir The directory containing the complete repository settings (workspace, node types, ...)
+ *
+ * @throws JcrMappingException when it is not possible to register the repository
+ */
+ public static void registerRepository(String repositoryName, String configFile, String homeDir) throws JcrMappingException
+ {
+ try
+ {
+ Hashtable env = new Hashtable();
+ env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory");
+ env.put(Context.PROVIDER_URL, "localhost");
+ InitialContext ctx = new InitialContext(env);
+
+ RegistryHelper.registerRepository(ctx, repositoryName, configFile, homeDir, true);
+
+ }
+ catch (Exception e)
+ {
+ throw new JcrMappingException("Impossible to register the respository : " +
+ repositoryName + " - config file : " + configFile, e);
+
+ }
+
+ }
+
+ /**
+ * Get a repository
+ *
+ * @param repositoryName The repository name
+ * @return a JCR repository reference
+ *
+ * @throws JcrMappingException when it is not possible to get the repository.
+ * Before calling this method, the repository has to be registered (@see RepositoryUtil#registerRepository(String, String, String)
+ */
+ public static Repository getRepository(String repositoryName) throws JcrMappingException
+ {
+ try
+ {
+ Hashtable env = new Hashtable();
+ env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory");
+ env.put(Context.PROVIDER_URL, "localhost");
+ InitialContext ctx = new InitialContext(env);
+
+ Repository repository = (Repository) ctx.lookup(repositoryName);
+ return repository;
+ }
+ catch (Exception e)
+ {
+ throw new JcrMappingException("Impossible to get the repository : " + repositoryName, e);
+ }
+ }
+
+
+
+
+ /**
+ * Connect to a JCR repository
+ *
+ * @param repository The JCR repository
+ * @param user The user name
+ * @param password The password
+ * @return a valid JCR session
+ *
+ * @throws JcrMappingException when it is not possible to connect to the JCR repository
+ */
+ public static Session login(Repository repository, String user, String password) throws JcrMappingException
+ {
+ try
+ {
+ Session session = repository.login(new SimpleCredentials(user, password.toCharArray()), null);
+
+ return session;
+
+ }
+ catch (Exception e)
+ {
+ throw new JcrMappingException("Impossible to login ", e);
+ }
+ }
+
+ /**
+ * Check if a path is valid
+ *
+ * @param path The path to validate
+ * @return true if the path is valid, else false
+ */
+ public static boolean isValidPath(String path)
+ {
+ if ((path == null) ||
+ (path.equals(PATH_SEPARATOR)) ||
+ (path.endsWith(PATH_SEPARATOR)) ||
+ (! path.startsWith(PATH_SEPARATOR)) ||
+ (path.equals("")))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Get the parent path
+ * @param path The path from wich the parent path has to be returned
+ * @return The parent path
+ *
+ * @throws JcrMappingException when the path is invalid
+ */
+ public static String getParentPath(String path) throws JcrMappingException
+ {
+ String parentPath = "";
+
+ if (! isValidPath(path))
+ {
+ throw new JcrMappingException("Invalid path : " + path);
+ }
+
+ String[] pathElements = path.split(PATH_SEPARATOR);
+
+ // Firts path element should be = empty string because a uri always start with '/'
+ // So, if len=2, means it is a root folder like '/foo'.
+ // In this case the uri has not parent folder => return "/"
+ if (pathElements.length == 2)
+ {
+ return PATH_SEPARATOR;
+ }
+
+ for(int i=0; i < pathElements.length -1; i++)
+ {
+ if (! pathElements[i].equals(""))
+ {
+ parentPath += PATH_SEPARATOR + pathElements[i];
+ }
+ }
+ return parentPath;
+ }
+
+ /**
+ * Get the node name
+ * @param path The path from which the node name has to be retrieved
+ * @return The node name
+ *
+ * @throws JcrMappingException when the path is invalid
+ */
+ public static String getNodeName(String path) throws JcrMappingException
+ {
+
+ String[] pathElements = path.split(PATH_SEPARATOR);
+
+ if (! isValidPath(path))
+ {
+ throw new JcrMappingException("Invalid path : " + path);
+ }
+ return pathElements[pathElements.length-1];
+
+
+ }
+}
Added: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/JcrSession.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/JcrSession.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/JcrSession.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/JcrSession.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.jcr.session;
+
+import javax.jcr.Repository;
+import javax.jcr.Session;
+
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+
+
+/**
+ *
+ * Jcr Broker
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public interface JcrSession
+{
+
+ public Repository getRepository();
+
+ public Session getSession();
+
+ public String getUser();
+
+ public boolean itemExists(String path);
+
+ public void insert(String path, Object object) throws JcrMappingException;
+
+ public void update(String path, Object object) throws JcrMappingException;
+
+ public Object getObject(Class pojoClass, String path) throws JcrMappingException;
+
+ public void remove(String path) throws JcrMappingException;
+
+}
Added: incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/impl/JcrSessionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/impl/JcrSessionImpl.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/impl/JcrSessionImpl.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/java/org/apache/portals/graffito/jcr/session/impl/JcrSessionImpl.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2000-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.
+ */
+package org.apache.portals.graffito.jcr.session.impl;
+
+import javax.jcr.Item;
+import javax.jcr.Node;
+import javax.jcr.Repository;
+import javax.jcr.Session;
+
+import org.apache.portals.graffito.jcr.converter.Converter;
+import org.apache.portals.graffito.jcr.converter.ConverterManager;
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+import org.apache.portals.graffito.jcr.session.JcrSession;
+
+
+/**
+ * Default implementation for {@link org.apache.portals.graffito.jcr.session.JcrSession}
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ *
+ * @version $Id: Exp $
+ */
+public class JcrSessionImpl implements JcrSession
+{
+ private ConverterManager converterManager;
+ private Repository repository;
+ private Session session;
+
+ /**
+ * Contructor
+ *
+ * @param converterManager The converter manager
+ * @param repository The Repository
+ * @param session The JCR Session
+ *
+ */
+ public JcrSessionImpl(ConverterManager converterManager, Repository repository, Session session)
+ {
+ this.converterManager = converterManager;
+ this.repository = repository;
+ this.session = session;
+ }
+
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#getRepository()
+ */
+ public Repository getRepository()
+ {
+ return this.repository;
+ }
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#getSession()
+ */
+ public Session getSession()
+ {
+ return this.session;
+ }
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#getUser()
+ */
+ public String getUser()
+ {
+ return this.session.getUserId();
+ }
+
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#getObject(java.lang.Class, java.lang.String)
+ */
+ public Object getObject(Class pojoClass, String path) throws JcrMappingException
+ {
+ if (! session.itemExists(path))
+ {
+ return null;
+ }
+
+ Converter converter = converterManager.getConverter(pojoClass);
+ return converter.getObject(session, path);
+
+ }
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#insert(java.lang.String, java.lang.Object)
+ */
+ public void insert(String path, Object object) throws JcrMappingException
+ {
+ if (session.itemExists(path))
+ {
+ throw new JcrMappingException("Path already exists : " + path);
+ }
+
+ Converter converter = converterManager.getConverter(object.getClass());
+ converter.insert(session, path, object);
+ }
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#update(java.lang.String, java.lang.Object)
+ */
+ public void update(String path, Object object) throws JcrMappingException
+ {
+ if (! session.itemExists(path))
+ {
+ throw new JcrMappingException("Path already exists : " + path);
+ }
+
+ Converter converter = converterManager.getConverter(object.getClass());
+ converter.update(session, path, object);
+ }
+
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#remove(java.lang.String)
+ */
+ public void remove(String path) throws JcrMappingException
+ {
+
+ try
+ {
+ Item item = session.getItem(path);
+ Node parent = item.getParent();
+ item.remove();
+ parent.save();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ *
+ * @see org.apache.portals.graffito.jcr.session.JcrSession#itemExists(java.lang.String)
+ */
+ public boolean itemExists(String path)
+ {
+ return session.itemExists(path);
+ }
+}
Added: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerTest.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerTest.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerTest.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/converter/impl/ConverterManagerTest.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,96 @@
+/* ========================================================================
+ * 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.
+ * ========================================================================
+ */
+package org.apache.portals.graffito.jcr.converter.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.portals.graffito.jcr.converter.Converter;
+import org.apache.portals.graffito.jcr.converter.ConverterManager;
+import org.apache.portals.graffito.jcr.converter.impl.ConverterManagerImpl;
+import org.apache.portals.graffito.jcr.exception.JcrMappingException;
+import org.apache.portals.graffito.jcr.testconverter.FolderConverter;
+import org.apache.portals.graffito.jcr.testmodel.Folder;
+
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Test ConverterManager
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ */
+public class ConverterManagerTest extends TestCase
+{
+ private final static Log log = LogFactory.getLog(ConverterManagerTest.class);
+
+ private ConverterManager converterManager = null;
+
+ /**
+ * <p>Defines the test case name for junit.</p>
+ * @param testName The test case name.
+ */
+ public ConverterManagerTest(String testName)
+ {
+ super(testName);
+ }
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ converterManager = new ConverterManagerImpl("src/conf/convertertest/converters.xml");
+
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ */
+ public void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ }
+
+ public static Test suite()
+ {
+ // All methods starting with "test" will be executed in the test suite.
+ return new TestSuite(ConverterManagerTest.class);
+ }
+
+ /**
+ * Test for getConverter
+ *
+ */
+ public void testgetConverter()
+ {
+ try
+ {
+ Converter converter = converterManager.getConverter(Folder.class);
+ assertNotNull("Converter is null", converter);
+ assertTrue("Incorrect converter class", converter instanceof FolderConverter);
+ }
+ catch (JcrMappingException e)
+ {
+ fail("Impossible to retrieve the converter " + e);
+ }
+ }
+
+}
\ No newline at end of file
Added: incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/TestRepositoryUtil.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/TestRepositoryUtil.java?view=auto&rev=159469
==============================================================================
--- incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/TestRepositoryUtil.java (added)
+++ incubator/graffito/trunk/jcr-mapping/src/test/org/apache/portals/graffito/jcr/repository/TestRepositoryUtil.java Wed Mar 30 00:31:54 2005
@@ -0,0 +1,172 @@
+/* ========================================================================
+ * 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.
+ * ========================================================================
+ */
+package org.apache.portals.graffito.jcr.repository;
+
+import javax.jcr.Node;
+import javax.jcr.Repository;
+import javax.jcr.Session;
+import javax.jcr.nodetype.NodeType;
+import javax.jcr.nodetype.NodeTypeManager;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Test RepositoryUtil
+ *
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
+ */
+public class TestRepositoryUtil extends TestCase
+{
+ private final static Log log = LogFactory.getLog(TestRepositoryUtil.class);
+
+ /**
+ * <p>Defines the test case name for junit.</p>
+ * @param testName The test case name.
+ */
+ public TestRepositoryUtil(String testName)
+ {
+ super(testName);
+ }
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ RepositoryUtil.registerRepository("repositoryTest", "repotest/repository.xml", "repotest");
+
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ */
+ public void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ }
+
+ public static Test suite()
+ {
+ // All methods starting with "test" will be executed in the test suite.
+ return new TestSuite(TestRepositoryUtil.class);
+ }
+
+ /**
+ * Test for getRepository() and login
+ *
+ */
+ public void testgetRegistryAndLogin()
+ {
+ try
+ {
+ Repository repository = RepositoryUtil.getRepository("repositoryTest");
+ assertNotNull("The repository is null", repository);
+ Session session = RepositoryUtil.login(repository, "anonymous", "");
+ Node root = session.getRootNode();
+ assertNotNull("Root node is null", root);
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("Unable to find the repository : " + e);
+ }
+
+ }
+
+ /**
+ * Simple unit test to check if custome node types are well defined
+ *
+ */
+ public void testgetCustomNodeType()
+ {
+ try
+ {
+ Repository repository = RepositoryUtil.getRepository("repositoryTest");
+ Session session = RepositoryUtil.login(repository, "anonymous", "");
+ NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager();
+ NodeType nodeType = nodeTypeManager.getNodeType("graffito:folder");
+ assertNotNull("Root node is null", nodeType);
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("Unable to find the repository : " + e);
+ }
+
+
+ }
+
+ /**
+ * Test for getParentPath()
+ *
+ */
+ public void testgetParentPath()
+ {
+ try
+ {
+ String parentPath = RepositoryUtil.getParentPath("/test");
+ assertNotNull("parent path is null for /test", parentPath);
+ assertTrue("parent path is incorrect for /test", parentPath.equals("/"));
+
+
+ parentPath = RepositoryUtil.getParentPath("/test/test2");
+ assertNotNull("parent path is null for /test/test2", parentPath);
+ assertTrue("parent path is incorrect for /test/test2", parentPath.equals("/test"));
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("Unable to find the repository : " + e);
+ }
+
+ }
+
+ /**
+ * Test for getNodeName()
+ *
+ */
+ public void testgetNodeName()
+ {
+ try
+ {
+ String nodeName = RepositoryUtil.getNodeName("/test");
+ assertNotNull("node name is null for /test", nodeName);
+ assertTrue("node name is incorrect for /test", nodeName.equals("test"));
+
+ nodeName = RepositoryUtil.getNodeName("/test/test2");
+ assertNotNull("node name is null for /test/test2", nodeName);
+ assertTrue("node name is incorrect for /test/test2", nodeName.equals("test2"));
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("Unable to find the repository : " + e);
+ }
+
+ }
+}
\ No newline at end of file