jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r111526 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: version virtual
Date Fri, 10 Dec 2004 17:20:19 GMT
Author: stefan
Date: Fri Dec 10 09:20:18 2004
New Revision: 111526

URL: http://svn.apache.org/viewcvs?view=rev&rev=111526
Log:
removing author tags and some reformatting
Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/HistoryRootNodeState.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFreeze.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNode.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersion.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentProperty.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentVersionManager.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionImpl.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionIteratorImpl.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManager.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/HistoryRootNodeState.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/HistoryRootNodeState.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/HistoryRootNodeState.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/HistoryRootNodeState.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/HistoryRootNodeState.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/HistoryRootNodeState.java
Fri Dec 10 09:20:18 2004
@@ -15,19 +15,19 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.core.virtual.VirtualNodeState;
-import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.NamespaceRegistryImpl;
+import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.virtual.VirtualNodeState;
 
 import javax.jcr.RepositoryException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * This Class implements...
- *
- * @author tripod
- * @version $Revision:$, $Date:$
  */
 public class HistoryRootNodeState extends VirtualNodeState {
 
@@ -45,12 +45,12 @@
     }
 
     public synchronized boolean hasChildNodeEntry(QName name, int index) {
-        return index<=1 ? vm.hasVersionHistory(name) : false;
+        return index <= 1 ? vm.hasVersionHistory(name) : false;
     }
 
     public synchronized ChildNodeEntry getChildNodeEntry(QName nodeName, int index) {
         try {
-            if (index<=1) {
+            if (index <= 1) {
                 InternalVersionHistory hist = vm.getVersionHistory(nodeName);
                 return new ChildNodeEntry(nodeName, hist.getId(), 1);
             }
@@ -80,7 +80,7 @@
         // todo: do nicer
         try {
             ChildNodeEntry entry = getChildNodeEntry(new QName(NamespaceRegistryImpl.NS_DEFAULT_URI,
uuid), 1);
-            if (entry!=null) {
+            if (entry != null) {
                 ArrayList list = new ArrayList(1);
                 list.add(entry);
                 return list;
@@ -95,7 +95,7 @@
         // todo: do nicer
         try {
             ChildNodeEntry entry = getChildNodeEntry(nodeName, 1);
-            if (entry!=null) {
+            if (entry != null) {
                 ArrayList list = new ArrayList(1);
                 list.add(entry);
                 return list;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFreeze.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFreeze.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFreeze.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFreeze.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFreeze.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFreeze.java
Fri Dec 10 09:20:18 2004
@@ -23,11 +23,14 @@
  */
 public abstract class InternalFreeze {
 
-    /** the parent 'freeze' */
+    /**
+     * the parent 'freeze'
+     */
     private final InternalFreeze parent;
 
     /**
      * Creates a new 'Freeze'
+     *
      * @param parent
      */
     protected InternalFreeze(InternalFreeze parent) {
@@ -43,10 +46,11 @@
 
     /**
      * returns the version manager
+     *
      * @return
      */
     public PersistentVersionManager getVersionManager() {
-        return parent==null ? null : parent.getVersionManager();
+        return parent == null ? null : parent.getVersionManager();
     }
 
     public InternalFreeze getParent() {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNode.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNode.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNode.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNode.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNode.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNode.java
Fri Dec 10 09:20:18 2004
@@ -16,9 +16,9 @@
 package org.apache.jackrabbit.core.version;
 
 import org.apache.jackrabbit.core.*;
-import org.apache.jackrabbit.core.util.uuid.UUID;
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.util.uuid.UUID;
 
 import javax.jcr.NodeIterator;
 import javax.jcr.PropertyIterator;
@@ -28,8 +28,6 @@
 import javax.jcr.version.OnParentVersionAction;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.HashSet;
-import java.util.Set;
 
 /**
  * The InternalFrozenNode class presents the frozen node that was generated
@@ -252,7 +250,7 @@
             NodeType[] mixins = src.getMixinNodeTypes();
             QName[] mixinNames = new QName[mixins.length];
             for (int i = 0; i < mixins.length; i++) {
-                mixinNames[i]=((NodeTypeImpl) mixins[i]).getQName();
+                mixinNames[i] = ((NodeTypeImpl) mixins[i]).getQName();
             }
             node = parent.addNode(name, ((NodeTypeImpl) src.getPrimaryNodeType()).getQName());
             node.setMixinNodeTypes(mixinNames);

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersion.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersion.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersion.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersion.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersion.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersion.java
Fri Dec 10 09:20:18 2004
@@ -117,6 +117,7 @@
 
     /**
      * returns the version manager
+     *
      * @return
      */
     public PersistentVersionManager getVersionManager() {
@@ -314,6 +315,7 @@
 
     /**
      * checks if this is the root version.
+     *
      * @return <code>true</code> if this version is the root version;
      *         <code>false</code> otherwise.
      */

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java
Fri Dec 10 09:20:18 2004
@@ -138,6 +138,7 @@
 
     /**
      * returns the version manager
+     *
      * @return
      */
     public PersistentVersionManager getVersionManager() {
@@ -192,6 +193,7 @@
 
     /**
      * Checks if the version for the given uuid exists
+     *
      * @param uuid
      * @return
      */
@@ -379,6 +381,7 @@
 
     /**
      * Returns an iterator over all versions (not ordered yet)
+     *
      * @return
      */
     protected Iterator getVersions() {
@@ -387,6 +390,7 @@
 
     /**
      * Returns the number of versions
+     *
      * @return
      */
     protected int getNumVersions() {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentProperty.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentProperty.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentProperty.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentProperty.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentProperty.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentProperty.java
Fri Dec 10 09:20:18 2004
@@ -74,6 +74,7 @@
 
     /**
      * returns <code>true</code> if this is a multivalue propererty
+     *
      * @return
      */
     public boolean isMultiple() {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentVersionManager.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentVersionManager.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentVersionManager.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentVersionManager.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentVersionManager.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/PersistentVersionManager.java
Fri Dec 10 09:20:18 2004
@@ -15,24 +15,24 @@
  */
 package org.apache.jackrabbit.core.version;
 
+import org.apache.commons.collections.ReferenceMap;
 import org.apache.jackrabbit.core.*;
-import org.apache.jackrabbit.core.util.uuid.UUID;
+import org.apache.jackrabbit.core.nodetype.NodeDefId;
 import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.core.nodetype.NodeDefId;
 import org.apache.jackrabbit.core.state.ItemStateException;
-import org.apache.jackrabbit.core.state.PersistentNodeState;
 import org.apache.jackrabbit.core.state.PersistentItemStateProvider;
+import org.apache.jackrabbit.core.state.PersistentNodeState;
+import org.apache.jackrabbit.core.util.uuid.UUID;
 import org.apache.log4j.Logger;
-import org.apache.commons.collections.ReferenceMap;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 import javax.jcr.Workspace;
-import java.util.Iterator;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.Map;
 
 /**
@@ -106,7 +106,7 @@
      * the version histories. key=uuid, value=version history
      */
     private Map histories = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
-    
+
     /**
      * Creates a new PersistentVersionManager.
      *
@@ -147,11 +147,12 @@
 
     /**
      * returns the version manager
+     *
      * @return
      */
     public synchronized VersionManager getVersionManager(Workspace wsp) {
         VersionManager vm = (VersionManager) versionManagers.get(wsp.getName());
-        if (vm==null) {
+        if (vm == null) {
             vm = new VersionManager(this);
             versionManagers.put(wsp.getName(), vm);
         }
@@ -197,11 +198,11 @@
             throws RepositoryException {
 
         InternalVersionHistory hist = (InternalVersionHistory) histories.get(histId);
-        if (hist==null) {
+        if (hist == null) {
             // we cannot used the uuid, since the persistent state do not share the same
ids
             QName historyNodeName = new QName(NamespaceRegistryImpl.NS_DEFAULT_URI, histId);
             PersistentNode hNode = historyRoot.getNode(historyNodeName, 1);
-            if (hNode!=null) {
+            if (hNode != null) {
                 hist = new InternalVersionHistory(this, hNode);
                 histories.put(histId, hist);
             }
@@ -211,6 +212,7 @@
 
     /**
      * Checks if the versionhistory for the given id exists
+     *
      * @param histId
      * @return
      */
@@ -224,13 +226,14 @@
 
     /**
      * returns an iterator over all existing version histories
+     *
      * @return
      * @throws RepositoryException
      */
     synchronized Iterator getVersionHistories() throws RepositoryException {
         PersistentNode[] ph = historyRoot.getChildNodes();
         ArrayList list = new ArrayList(ph.length);
-        for (int i=0; i<ph.length; i++) {
+        for (int i = 0; i < ph.length; i++) {
             list.add(getVersionHistory(ph[i].getName().getLocalName()));
         }
         return list.iterator();
@@ -238,6 +241,7 @@
 
     /**
      * returns the number of version histories
+     *
      * @return
      * @throws RepositoryException
      */
@@ -260,6 +264,7 @@
 
     /**
      * returns the version with the given id
+     *
      * @param versionId
      * @return
      * @throws RepositoryException
@@ -269,10 +274,10 @@
 
         // todo: implement better
         PersistentNode[] ph = historyRoot.getChildNodes();
-        for (int i=0; i<ph.length; i++) {
+        for (int i = 0; i < ph.length; i++) {
             InternalVersionHistory vh = getVersionHistory(ph[i].getName().getLocalName());
             InternalVersion v = vh.getVersion(versionId);
-            if (v!=null) {
+            if (v != null) {
                 return v;
             }
         }
@@ -281,6 +286,7 @@
 
     /**
      * Checks if the version with the given id exists
+     *
      * @param versionId
      * @return
      */
@@ -288,7 +294,7 @@
         // todo: implement better
         try {
             PersistentNode[] ph = historyRoot.getChildNodes();
-            for (int i=0; i<ph.length; i++) {
+            for (int i = 0; i < ph.length; i++) {
                 InternalVersionHistory vh = getVersionHistory(ph[i].getName().getLocalName());
                 if (vh.hasVersion(versionId)) {
                     return true;
@@ -302,9 +308,10 @@
 
     /**
      * is informed by the versions if they were modified
+     *
      * @param version
      */
-    void onVersionModified(InternalVersion version)  throws RepositoryException {
+    void onVersionModified(InternalVersion version) throws RepositoryException {
         // check if version manager already generated item states
         Iterator iter = versionManagers.values().iterator();
         while (iter.hasNext()) {
@@ -314,9 +321,10 @@
 
     /**
      * is informed by the versions if they were modified
+     *
      * @param vh
      */
-    void onVersionHistoryModified(InternalVersionHistory vh)  throws RepositoryException
{
+    void onVersionHistoryModified(InternalVersionHistory vh) throws RepositoryException {
         // check if version manager already generated item states
         Iterator iter = versionManagers.values().iterator();
         while (iter.hasNext()) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
Fri Dec 10 09:20:18 2004
@@ -23,9 +23,9 @@
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.nodetype.NodeDef;
 import javax.jcr.version.Version;
+import javax.jcr.version.VersionException;
 import javax.jcr.version.VersionHistory;
 import javax.jcr.version.VersionIterator;
-import javax.jcr.version.VersionException;
 
 /**
  * This Class implements a version history that extends a node.
@@ -39,6 +39,7 @@
 
     /**
      * creates a new version history node.
+     *
      * @param itemMgr
      * @param session
      * @param id
@@ -49,9 +50,9 @@
      * @throws RepositoryException
      */
     protected VersionHistoryImpl(ItemManager itemMgr, SessionImpl session, NodeId id,
-                              NodeState state, NodeDef definition,
-                              ItemLifeCycleListener[] listeners,
-                              InternalVersionHistory history) throws RepositoryException
{
+                                 NodeState state, NodeDef definition,
+                                 ItemLifeCycleListener[] listeners,
+                                 InternalVersionHistory history) throws RepositoryException
{
         super(itemMgr, session, id, state, definition, listeners);
         this.history = history;
     }
@@ -108,7 +109,7 @@
         try {
             QName name = QName.fromJCRName(version, session.getNamespaceResolver());
             InternalVersion v = history.getVersion(name);
-            if (v==null) {
+            if (v == null) {
                 throw new VersionException("Version " + version + " does not exist in this
version history.");
             }
             history.addVersionLabel(v, label, move);

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java
Fri Dec 10 09:20:18 2004
@@ -15,18 +15,17 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.core.virtual.VirtualNodeState;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.virtual.VirtualNodeState;
 
 import javax.jcr.RepositoryException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * This Class implements...
- *
- * @author tripod
- * @version $Revision:$, $Date:$
  */
 public class VersionHistoryNodeState extends VirtualNodeState {
 
@@ -34,7 +33,7 @@
 
     public VersionHistoryNodeState(VersionItemStateProvider vm, InternalVersionHistory vh,
String parentUUID) {
         super(vm, vh.getId(), NodeTypeRegistry.NT_VERSION_HISTORY, parentUUID);
-        this.vh =  vh;
+        this.vh = vh;
 
         setDefinitionId(vm.getNodeDefId(NodeTypeRegistry.NT_VERSION_HISTORY));
         // we do not initialize the childnode entry array, but rather
@@ -47,12 +46,12 @@
 
     public synchronized boolean hasChildNodeEntry(QName name, int index) {
         // no same name siblings
-        return index<=1 ? vh.hasVersion(name) : false;
+        return index <= 1 ? vh.hasVersion(name) : false;
     }
 
     public synchronized ChildNodeEntry getChildNodeEntry(QName nodeName, int index) {
         try {
-            if (index<=1) {
+            if (index <= 1) {
                 InternalVersion v = vh.getVersion(nodeName);
                 return new ChildNodeEntry(nodeName, v.getId(), 1);
             }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionImpl.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionImpl.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionImpl.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionImpl.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionImpl.java
Fri Dec 10 09:20:18 2004
@@ -37,6 +37,7 @@
 
     /**
      * creates a new version node
+     *
      * @param itemMgr
      * @param session
      * @param id
@@ -47,8 +48,8 @@
      * @throws RepositoryException
      */
     protected VersionImpl(ItemManager itemMgr, SessionImpl session, NodeId id,
-                       NodeState state, NodeDef definition,
-                       ItemLifeCycleListener[] listeners, InternalVersion version)
+                          NodeState state, NodeDef definition,
+                          ItemLifeCycleListener[] listeners, InternalVersion version)
             throws RepositoryException {
         super(itemMgr, session, id, state, definition, listeners);
         this.version = version;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
Fri Dec 10 09:20:18 2004
@@ -15,24 +15,21 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.core.virtual.VirtualItemStateProvider;
-import org.apache.jackrabbit.core.virtual.VirtualNodeState;
-import org.apache.jackrabbit.core.state.*;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.nodetype.NodeDefId;
 import org.apache.jackrabbit.core.nodetype.PropDefId;
+import org.apache.jackrabbit.core.state.*;
+import org.apache.jackrabbit.core.virtual.VirtualItemStateProvider;
+import org.apache.jackrabbit.core.virtual.VirtualNodeState;
 import org.apache.log4j.Logger;
 
 import javax.jcr.RepositoryException;
 
 /**
  * This Class implements...
- *
- * @author tripod
- * @version $Revision:$, $Date:$
  */
 public class VersionItemStateProvider implements VirtualItemStateProvider {
 
@@ -90,7 +87,7 @@
         // check version history
         try {
             InternalVersionHistory vh = vMgr.getVersionHistory(id.getUUID());
-            if (vh!=null) {
+            if (vh != null) {
                 return new VersionHistoryNodeState(this, vh, root.getUUID());
             }
         } catch (RepositoryException e) {
@@ -101,7 +98,7 @@
         // check version
         try {
             InternalVersion v = vMgr.getVersion(id.getUUID());
-            if (v!=null) {
+            if (v != null) {
                 return new VersionNodeState(this, v);
             }
         } catch (RepositoryException e) {
@@ -134,7 +131,7 @@
 
             // handle some default prop states
             if (parent instanceof VirtualNodeState) {
-                return ((VirtualNodeState) parent).getPropertyState(id.getName())!=null;
+                return ((VirtualNodeState) parent).getPropertyState(id.getName()) != null;
             }
         } catch (ItemStateException e) {
             // ignore

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionIteratorImpl.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionIteratorImpl.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionIteratorImpl.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionIteratorImpl.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionIteratorImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionIteratorImpl.java
Fri Dec 10 09:20:18 2004
@@ -19,7 +19,9 @@
 import javax.jcr.Session;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionIterator;
-import java.util.*;
+import java.util.ConcurrentModificationException;
+import java.util.LinkedList;
+import java.util.NoSuchElementException;
 
 /**
  * This Class implements a VersionIterator that iterates over a version
@@ -123,6 +125,7 @@
     /**
      * Adds the version 'v' to the list of versions to return and then calls
      * it self recursively with all the verions prodecessors.
+     *
      * @param v
      */
     private synchronized void addVersion(InternalVersion v) {
@@ -130,7 +133,7 @@
         if (!versions.contains(id)) {
             versions.add(id);
             InternalVersion[] vs = v.getSuccessors();
-            for (int i=0; i<vs.length; i++) {
+            for (int i = 0; i < vs.length; i++) {
                 addVersion(vs[i]);
             }
         }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManager.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManager.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManager.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManager.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManager.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManager.java
Fri Dec 10 09:20:18 2004
@@ -16,20 +16,23 @@
 package org.apache.jackrabbit.core.version;
 
 import org.apache.jackrabbit.core.*;
+import org.apache.jackrabbit.core.nodetype.NodeDefId;
+import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
+import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.nodetype.PropDefId;
 import org.apache.jackrabbit.core.state.ItemStateProvider;
 import org.apache.jackrabbit.core.state.NodeState;
-import org.apache.jackrabbit.core.nodetype.*;
-import org.apache.jackrabbit.core.virtual.*;
+import org.apache.jackrabbit.core.virtual.VirtualItemStateProvider;
 import org.apache.log4j.Logger;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.NodeDef;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
-import javax.jcr.version.VersionHistory;
+import javax.jcr.nodetype.NodeDef;
 import javax.jcr.version.Version;
-import java.util.Iterator;
+import javax.jcr.version.VersionHistory;
 import java.util.HashMap;
+import java.util.Iterator;
 
 /**
  * This Class implements the session tied version manager. It is also repsonsible
@@ -151,6 +154,7 @@
 
     /**
      * returns the node definition id for the given name
+     *
      * @param name
      * @return
      */
@@ -160,6 +164,7 @@
 
     /**
      * returns the property definition id for the given name
+     *
      * @param name
      * @return
      */
@@ -214,6 +219,7 @@
 
     /**
      * Checks, if the version history with the given name exists
+     *
      * @param name
      * @return
      */
@@ -225,6 +231,7 @@
 
     /**
      * Returns the vesion history impl for the given name
+     *
      * @param name
      * @return
      * @throws RepositoryException
@@ -237,6 +244,7 @@
 
     /**
      * Checks if the version history with the given id exists
+     *
      * @param id
      * @return
      */
@@ -246,6 +254,7 @@
 
     /**
      * Returns the version history with the given id
+     *
      * @param id
      * @return
      * @throws RepositoryException
@@ -256,6 +265,7 @@
 
     /**
      * Returns the number of version histories
+     *
      * @return
      * @throws RepositoryException
      */
@@ -265,6 +275,7 @@
 
     /**
      * Returns an iterator over all {@link InternalVersionHistory}s.
+     *
      * @return
      * @throws RepositoryException
      */
@@ -274,6 +285,7 @@
 
     /**
      * Checks if the version with the given id exists
+     *
      * @param id
      * @return
      */
@@ -283,6 +295,7 @@
 
     /**
      * Returns the version with the given id
+     *
      * @param id
      * @return
      * @throws RepositoryException
@@ -416,27 +429,20 @@
 
         private void add(QName nodeName, QName nt, QName parentNt)
                 throws NoSuchNodeTypeException, RepositoryException {
-            NodeDefId id = new NodeDefId(
-                ntMgr.getNodeType(parentNt).getApplicableChildNodeDef(
-                    nodeName, nt
-                ).unwrap()
-            );
+            NodeDefId id = new NodeDefId(ntMgr.getNodeType(parentNt).getApplicableChildNodeDef(nodeName,
nt).unwrap());
             ids.put(nodeName, id);
         }
 
         private void add(QName propName, QName nt, int type, boolean multivalued)
                 throws NoSuchNodeTypeException, RepositoryException {
-            PropDefId id = new PropDefId(
-                ntMgr.getNodeType(nt).getApplicablePropertyDef(
-                        propName, type, multivalued
-                ).unwrap()
-            );
+            PropDefId id = new PropDefId(ntMgr.getNodeType(nt).getApplicablePropertyDef(propName,
type, multivalued).unwrap());
             ids.put(propName, id);
         }
 
         public NodeDefId getNodeDefId(QName name) {
             return (NodeDefId) ids.get(name);
         }
+
         public PropDefId getPropDefId(QName name) {
             return (PropDefId) ids.get(name);
         }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java
Fri Dec 10 09:20:18 2004
@@ -15,22 +15,19 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.core.virtual.VirtualNodeState;
-import org.apache.jackrabbit.core.virtual.VirtualPropertyState;
-import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.InternalValue;
-import org.apache.jackrabbit.core.util.uuid.UUID;
-import org.apache.jackrabbit.core.state.NoSuchItemStateException;
+import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
+import org.apache.jackrabbit.core.state.NoSuchItemStateException;
+import org.apache.jackrabbit.core.util.uuid.UUID;
+import org.apache.jackrabbit.core.virtual.VirtualNodeState;
+import org.apache.jackrabbit.core.virtual.VirtualPropertyState;
 
 import javax.jcr.PropertyType;
 import java.util.Calendar;
 
 /**
  * This Class implements...
- *
- * @author tripod
- * @version $Revision:$, $Date:$
  */
 public class VersionNodeState extends VirtualNodeState {
 
@@ -94,7 +91,7 @@
             state.setType(PropertyType.STRING);
             InternalVersion[] preds = v.getPredecessors();
             InternalValue[] predV = new InternalValue[preds.length];
-            for (int i=0; i<preds.length; i++) {
+            for (int i = 0; i < preds.length; i++) {
                 predV[i] = InternalValue.create(new UUID(preds[i].getId()));
             }
             state.setValues(predV);
@@ -105,7 +102,7 @@
             state.setType(PropertyType.STRING);
             InternalVersion[] succs = v.getSuccessors();
             InternalValue[] succV = new InternalValue[succs.length];
-            for (int i=0; i<succs.length; i++) {
+            for (int i = 0; i < succs.length; i++) {
                 succV[i] = InternalValue.create(new UUID(succs[i].getId()));
             }
             state.setValues(succV);

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualItemStateProvider.java
Fri Dec 10 09:20:18 2004
@@ -15,17 +15,18 @@
  */
 package org.apache.jackrabbit.core.virtual;
 
-import org.apache.jackrabbit.core.state.ItemStateProvider;
+import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.nodetype.NodeDefId;
 import org.apache.jackrabbit.core.nodetype.PropDefId;
-import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.state.ItemStateProvider;
 
 /**
  * This Interface defines a virtual item state provider.
  */
 public interface VirtualItemStateProvider extends ItemStateProvider {
     /**
-     * Returns a predefined node definition id. 
+     * Returns a predefined node definition id.
+     *
      * @param nodename
      * @return
      */
@@ -33,6 +34,7 @@
 
     /**
      * Returns a predefined property definition id
+     *
      * @param propname
      * @return
      */

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java?view=diff&rev=111526&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java&r1=111525&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java&r2=111526
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java
Fri Dec 10 09:20:18 2004
@@ -15,12 +15,12 @@
  */
 package org.apache.jackrabbit.core.virtual;
 
-import org.apache.jackrabbit.core.QName;
-import org.apache.jackrabbit.core.ItemImpl;
 import org.apache.jackrabbit.core.InternalValue;
-import org.apache.jackrabbit.core.state.NodeState;
+import org.apache.jackrabbit.core.ItemImpl;
+import org.apache.jackrabbit.core.QName;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.core.state.NoSuchItemStateException;
+import org.apache.jackrabbit.core.state.NodeState;
 
 import javax.jcr.PropertyType;
 
@@ -30,7 +30,7 @@
 public class VirtualNodeState extends NodeState {
 
     protected VirtualItemStateProvider provider;
-    
+
     /**
      * @param uuid
      * @param nodeTypeName

Mime
View raw message