jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1214404 - /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
Date Wed, 14 Dec 2011 19:03:26 GMT
Author: mduerig
Date: Wed Dec 14 19:03:26 2011
New Revision: 1214404

URL: http://svn.apache.org/viewvc?rev=1214404&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
Use absolute paths for commits. See changes from revision: 1214161

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java?rev=1214404&r1=1214403&r2=1214404&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
Wed Dec 14 19:03:26 2011
@@ -218,7 +218,7 @@ public class TransientSpace {
                 public void visit(AddNode addNode) {
                     Path target = addNode.getParent().concat(addNode.getName());
                     jsop.append("+\"")
-                        .append(target.getMkPath().substring(1))
+                        .append(target.getMkPath())
                         .append("\":")
                         .append("{}")
                         .append('\n');
@@ -228,7 +228,7 @@ public class TransientSpace {
                 public void visit(AddProperty addProperty) {
                     Path target = addProperty.getParent().concat(addProperty.getName());
                     jsop.append("^\"")
-                        .append(target.getMkPath().substring(1))
+                        .append(target.getMkPath())
                         .append("\":")
                             .append(addProperty.getValue().toJson())
                         .append('\n');
@@ -237,7 +237,7 @@ public class TransientSpace {
                 @Override
                 public void visit(SetValue setValue) {
                     jsop.append("^\"")
-                        .append(setValue.getPath().getMkPath().substring(1))
+                        .append(setValue.getPath().getMkPath())
                         .append("\":")
                         .append(setValue.getValue().toJson())
                         .append('\n');
@@ -246,14 +246,14 @@ public class TransientSpace {
                 @Override
                 public void visit(RemoveNode removeNode) {
                     jsop.append("-\"")
-                            .append(removeNode.getPath().getMkPath().substring(1))
+                            .append(removeNode.getPath().getMkPath())
                             .append("\"\n");
                 }
 
                 @Override
                 public void visit(RemoveProperty removeProperty) {
                     jsop.append("^\"")
-                            .append(removeProperty.getPath().getMkPath().substring(1))
+                            .append(removeProperty.getPath().getMkPath())
                             .append("\":null\n");
                 }
 
@@ -266,7 +266,7 @@ public class TransientSpace {
                 public void visit(SetMixin setMixin) {
                     Path target = setMixin.getPath().concat("jcr:mixinTypes");
                     jsop.append("^\"")
-                            .append(target.getMkPath().substring(1))
+                            .append(target.getMkPath())
                             .append("\":")
                             .append(setMixin.getMixins().toJson())
                             .append('\n');
@@ -276,7 +276,7 @@ public class TransientSpace {
                 public void visit(SetPrimaryType setPrimaryType) {
                     Path target = setPrimaryType.getPath().concat("jcr:primaryType");
                     jsop.append("^\"")
-                        .append(target.getMkPath().substring(1))
+                        .append(target.getMkPath())
                         .append("\":")
                             .append(setPrimaryType.getPrimaryType().toJson())
                         .append('\n');
@@ -285,14 +285,14 @@ public class TransientSpace {
                 @Override
                 public void visit(Move move) {
                     jsop.append(">\"")
-                            .append(move.getSource().getMkPath().substring(1))
+                            .append(move.getSource().getMkPath())
                         .append("\":\"")
-                            .append(move.getDestination().getMkPath().substring(1))
+                            .append(move.getDestination().getMkPath())
                         .append("\"\n");
                 }
             });
 
-            revision = microKernel.commit("/", jsop.toString(), revision, "");
+            revision = microKernel.commit("", jsop.toString(), revision, "");
             root = new NodeDelta(rootPath, rootPath);
             changeLog.clear();
             return revision;



Mime
View raw message