jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r202167 - in /incubator/jackrabbit/trunk/contrib/orm-persistence: ./ applications/test/workspaces/test/ src/java/org/apache/jackrabbit/core/state/orm/
Date Tue, 28 Jun 2005 12:35:37 GMT
Author: stefan
Date: Tue Jun 28 05:35:36 2005
New Revision: 202167

URL: http://svn.apache.org/viewcvs?rev=202167&view=rev
Log:
applied patch supplied by serge as-is

Added:
    incubator/jackrabbit/trunk/contrib/orm-persistence/applications/test/workspaces/test/
    incubator/jackrabbit/trunk/contrib/orm-persistence/applications/test/workspaces/test/workspace.xml
  (with props)
Modified:
    incubator/jackrabbit/trunk/contrib/orm-persistence/project.xml
    incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMNodeState.java
    incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMPropertyEntry.java

Added: incubator/jackrabbit/trunk/contrib/orm-persistence/applications/test/workspaces/test/workspace.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/orm-persistence/applications/test/workspaces/test/workspace.xml?rev=202167&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/contrib/orm-persistence/applications/test/workspaces/test/workspace.xml
(added)
+++ incubator/jackrabbit/trunk/contrib/orm-persistence/applications/test/workspaces/test/workspace.xml
Tue Jun 28 05:35:36 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace name="test">
+  <!--
+      virtual file system of the workspace:
+      class: FQN of class implementing FileSystem interface
+  -->
+  <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">
+    <param name="path" value="${wsp.home}/data/wspStore.dat"/>
+    <param name="autoRepair" value="false"/>
+    <param name="blockSize" value="128"/>
+    <param name="autoSync" value="false"/>
+  </FileSystem>
+  <!--
+      persistence of the workspace:
+      class: FQN of class implementing PersistenceManager interface
+  -->
+        <!--PersistenceManager class="org.apache.jackrabbit.core.state.orm.ojb.OJBPersistenceManager"
/-->
+        <PersistenceManager class="org.apache.jackrabbit.core.state.orm.hibernate.HibernatePersistenceManager"
/>
+  <!--
+      Search index and the file system it uses.
+  -->
+  <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+    <param name="useCompoundFile" value="true" />
+    <param name="minMergeDocs" value="1000" />
+    <param name="maxMergeDocs" value="100000" />
+    <param name="mergeFactor" value="10" />
+    <param name="bufferSize" value="10"/>
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+      <param name="path" value="${wsp.home}/index" />
+    </FileSystem>
+  </SearchIndex>
+</Workspace>
+

Propchange: incubator/jackrabbit/trunk/contrib/orm-persistence/applications/test/workspaces/test/workspace.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/jackrabbit/trunk/contrib/orm-persistence/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/orm-persistence/project.xml?rev=202167&r1=202166&r2=202167&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/orm-persistence/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/orm-persistence/project.xml Tue Jun 28 05:35:36 2005
@@ -59,8 +59,12 @@
       <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>
+      <version>3.1</version>
     </dependency>
     <dependency>
       <id>jdom</id>

Modified: incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMNodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMNodeState.java?rev=202167&r1=202166&r2=202167&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMNodeState.java
(original)
+++ incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMNodeState.java
Tue Jun 28 05:35:36 2005
@@ -29,7 +29,6 @@
 import org.apache.jackrabbit.core.nodetype.NodeDefId;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.NodeState.ChildNodeEntry;
-import org.apache.jackrabbit.core.state.NodeState.PropertyEntry;
 import org.apache.log4j.Logger;
 
 /**
@@ -79,11 +78,11 @@
             getChildNodeEntries().add(childNode);
             i++;
         }
-        Iterator propertyEntryIter = state.getPropertyEntries().iterator();
-        while (propertyEntryIter.hasNext()) {
-            PropertyEntry curPropertyEntry = (PropertyEntry) propertyEntryIter.next();
-            log.debug("propertyEntry " + curPropertyEntry.getName());
-            ORMPropertyEntry propertyEntry = new ORMPropertyEntry(this, curPropertyEntry,
uuid);
+        Iterator propertyNameIter = state.getPropertyNames().iterator();
+        while (propertyNameIter.hasNext()) {
+            QName curPropertyName = (QName) propertyNameIter.next();
+            log.debug("propertyEntry " + curPropertyName);
+            ORMPropertyEntry propertyEntry = new ORMPropertyEntry(this, curPropertyName,
uuid);
             getPropertyEntries().add(propertyEntry);
         }
         Iterator mixinTypeIter = state.getMixinTypeNames().iterator();
@@ -91,11 +90,6 @@
             QName curName = (QName) mixinTypeIter.next();
             getMixinTypeNames().add(new ORMNodeMixinType(this, uuid, curName.toString()));
         }
-        Iterator parentIter = state.getParentUUIDs().iterator();
-        while (parentIter.hasNext()) {
-            String parentId = (String) parentIter.next();
-            getParentUUIDs().add(new ORMNodeParent(this, uuid, parentId));
-        }
     }
 
     public String getUuid() {
@@ -163,7 +157,7 @@
         while (propertyEntryIter.hasNext()) {
             ORMPropertyEntry curPropertyEntry = (ORMPropertyEntry) propertyEntryIter.next();
             log.debug("  Loaded property " + QName.valueOf(curPropertyEntry.getName()));
-            state.addPropertyEntry(QName.valueOf(curPropertyEntry.getName()));
+            state.addPropertyName(QName.valueOf(curPropertyEntry.getName()));
         }
         Iterator mixinTypeNameIter = getMixinTypeNames().iterator();
         Set mixinTypeQNames = new HashSet();
@@ -172,13 +166,6 @@
             mixinTypeQNames.add(QName.valueOf(curMixinType.getMixinTypeName()));
         }
         state.setMixinTypeNames(mixinTypeQNames);
-        Iterator parentUUIDIter = getParentUUIDs().iterator();
-        List nParentUUIDs = new ArrayList();
-        while (parentUUIDIter.hasNext()) {
-            ORMNodeParent curNodeParent = (ORMNodeParent) parentUUIDIter.next();
-            nParentUUIDs.add(curNodeParent.getParentUUID());
-        }
-        state.setParentUUIDs(nParentUUIDs);
     }
 
     public boolean equals(Object obj) {

Modified: incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMPropertyEntry.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMPropertyEntry.java?rev=202167&r1=202166&r2=202167&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMPropertyEntry.java
(original)
+++ incubator/jackrabbit/trunk/contrib/orm-persistence/src/java/org/apache/jackrabbit/core/state/orm/ORMPropertyEntry.java
Tue Jun 28 05:35:36 2005
@@ -17,8 +17,7 @@
 package org.apache.jackrabbit.core.state.orm;
 
 import java.io.Serializable;
-
-import org.apache.jackrabbit.core.state.NodeState.PropertyEntry;
+import org.apache.jackrabbit.core.QName;
 
 /**
  * <p>This class represents a single entry of a property in a node. This
@@ -34,10 +33,10 @@
     public ORMPropertyEntry() {
     }
 
-    public ORMPropertyEntry(ORMNodeState parent, PropertyEntry propertyEntry, String parentUUID)
{
+    public ORMPropertyEntry(ORMNodeState parent, QName propertyName, String parentUUID) {
         this.parent = parent;
         this.parentUUID = parentUUID;
-        this.name = propertyEntry.getName().toString();
+        this.name = propertyName.toString();
     }
 
     public void setParentUUID(String parentUUID) {



Mime
View raw message