jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r425017 - in /jackrabbit/trunk/contrib/spi: ./ commons/src/main/java/org/apache/jackrabbit/value/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/ jcr2spi/src/main/java/org/apach...
Date Mon, 24 Jul 2006 11:49:57 GMT
Author: tripod
Date: Mon Jul 24 04:49:55 2006
New Revision: 425017

URL: http://svn.apache.org/viewvc?rev=425017&view=rev
Log:
Fixing errors due to JCR-476

Modified:
    jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/QValue.java
    jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/LocalNamespaceMappings.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java
    jackrabbit/trunk/contrib/spi/project.xml
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/QValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/QValue.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/QValue.java
(original)
+++ jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/QValue.java
Mon Jul 24 04:49:55 2006
@@ -198,7 +198,7 @@
                     }
                     byte[] data = out.toByteArray();
                     String text = new String(data, DEFAULT_ENCODING);
-                    return create(new String(data, DEFAULT_ENCODING), type);
+                    return create(text, type);
 
                 } catch (UnsupportedEncodingException e) {
                     throw new RepositoryException(DEFAULT_ENCODING + " not supported on this
platform", e);

Modified: jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
(original)
+++ jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
Mon Jul 24 04:49:55 2006
@@ -21,6 +21,7 @@
 import org.apache.jackrabbit.name.NoPrefixDeclaredException;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
+import org.apache.jackrabbit.name.PathFormat;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.PropertyType;
@@ -87,7 +88,7 @@
                 break;
             case PropertyType.PATH:
                 try {
-                    Path qPath = nsResolver.getQPath(jcrValue).getNormalizedPath();
+                    Path qPath = PathFormat.parse(jcrValue, nsResolver).getNormalizedPath();
                     qValue = QValue.create(qPath);
                 } catch (NameException e) {
                     throw new RepositoryException(e);
@@ -122,7 +123,7 @@
             case PropertyType.PATH:
                 try {
                     Path qPath = Path.valueOf(qualifiedValue.getString());
-                    jcrValue = factory.createValue(nsResolver.getJCRPath(qPath), propertyType);
+                    jcrValue = factory.createValue(PathFormat.format(qPath, nsResolver),
propertyType);
                 } catch (NoPrefixDeclaredException npde) {
                     // should never get here...
                     throw new RepositoryException("internal error: encountered unregistered
namespace", npde);

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/HierarchyManagerImpl.java
Mon Jul 24 04:49:55 2006
@@ -30,6 +30,7 @@
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.name.MalformedPathException;
+import org.apache.jackrabbit.name.PathFormat;
 import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
 
@@ -288,7 +289,7 @@
             return ((ItemImpl)item).getId();
         } else {
             try {
-                return getItemId(nsResolver.getQPath(item.getPath()));
+                return getItemId(PathFormat.parse(item.getPath(), nsResolver));
             } catch (MalformedPathException e) {
                 // should not occur.
                 throw new RepositoryException(e);
@@ -465,7 +466,7 @@
      */
     public String safeGetJCRPath(Path qPath) {
         try {
-            return nsResolver.getJCRPath(qPath);
+            return PathFormat.format(qPath, nsResolver);
         } catch (NoPrefixDeclaredException npde) {
             log.error("failed to convert " + qPath + " to JCR path.");
             // return string representation of internal path as a fallback

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
Mon Jul 24 04:49:55 2006
@@ -31,6 +31,7 @@
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.name.QName;
+import org.apache.jackrabbit.name.PathFormat;
 import org.apache.jackrabbit.spi.ItemId;
 import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
@@ -110,7 +111,7 @@
         checkStatus();
         try {
             // DIFF JR: use nsResolver
-            return session.getNamespaceResolver().getJCRPath(getQPath());
+            return PathFormat.format(getQPath(), session.getNamespaceResolver());
         } catch (NoPrefixDeclaredException npde) {
             // should never get here...
             String msg = "Internal error: encountered unregistered namespace";

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Mon Jul 24 04:49:55 2006
@@ -28,6 +28,7 @@
 import org.apache.jackrabbit.name.NameException;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
+import org.apache.jackrabbit.name.PathFormat;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.jcr2spi.state.ItemStateException;
 import org.apache.jackrabbit.jcr2spi.state.NodeReferences;
@@ -913,7 +914,7 @@
                 } else {
                     Path p = referenceableNode.getQPath().computeRelativePath(getQPath());
                     // use prefix mappings of srcSession
-                    String relPath = srcSession.getNamespaceResolver().getJCRPath(p);
+                    String relPath = PathFormat.format(p, session.getNamespaceResolver());
                     if (!correspNode.hasNode(relPath)) {
                         throw new ItemNotFoundException("No corresponding path found in workspace
" + workspaceName + "(" + safeGetJCRPath() + ")");
                     } else {
@@ -1455,7 +1456,7 @@
      */
     private Path getReorderPath(String relativePath) throws RepositoryException {
         try {
-            Path p = session.getNamespaceResolver().getQPath(relativePath);
+            Path p = PathFormat.parse(relativePath, session.getNamespaceResolver());
             if (p.isAbsolute() || p.getLength() != 1 || p.getDepth() != 1) {
                 throw new RepositoryException("Invalid relative path: " + relativePath);
             }
@@ -1475,7 +1476,7 @@
      */
     private Path getQPath(String relativePath) throws RepositoryException {
         try {
-            Path p = session.getNamespaceResolver().getQPath(relativePath);
+            Path p = PathFormat.parse(relativePath, session.getNamespaceResolver());
             return Path.create(getQPath(), p, true);
         } catch (MalformedPathException e) {
             String msg = "Invalid relative path: " + relativePath;

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Mon Jul 24 04:49:55 2006
@@ -39,6 +39,7 @@
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
+import org.apache.jackrabbit.name.PathFormat;
 import org.apache.jackrabbit.spi.RepositoryService;
 import org.apache.jackrabbit.spi.SessionInfo;
 import org.apache.jackrabbit.spi.NodeId;
@@ -758,7 +759,7 @@
      */
     Path getQPath(String absPath) throws RepositoryException {
         try {
-            Path p = getNamespaceResolver().getQPath(absPath);
+            Path p = PathFormat.parse(absPath, getNamespaceResolver());
             if (!p.isAbsolute()) {
                 throw new RepositoryException("Not an absolute path: " + absPath);
             }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/LocalNamespaceMappings.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/LocalNamespaceMappings.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/LocalNamespaceMappings.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/LocalNamespaceMappings.java
Mon Jul 24 04:49:55 2006
@@ -24,7 +24,7 @@
 import org.apache.jackrabbit.name.NamespaceListener;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.jcr2spi.SessionImpl;
-import org.apache.xerces.util.XMLChar;
+import org.apache.jackrabbit.util.XMLChar;
 
 import javax.jcr.NamespaceException;
 import javax.jcr.RepositoryException;

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryImpl.java
Mon Jul 24 04:49:55 2006
@@ -16,12 +16,12 @@
  */
 package org.apache.jackrabbit.jcr2spi.name;
 
-import org.apache.xerces.util.XMLChar;
 import org.apache.jackrabbit.name.AbstractNamespaceResolver;
 import org.apache.jackrabbit.name.IllegalNameException;
 import org.apache.jackrabbit.name.UnknownPrefixException;
 import org.apache.jackrabbit.name.NoPrefixDeclaredException;
 import org.apache.jackrabbit.name.QName;
+import org.apache.jackrabbit.util.XMLChar;
 
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.NamespaceException;

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
Mon Jul 24 04:49:55 2006
@@ -25,6 +25,7 @@
 import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
+import org.apache.jackrabbit.name.PathFormat;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.value.DateValue;
 import org.apache.jackrabbit.value.QValue;
@@ -652,7 +653,7 @@
             definition = definition.substring(0, definition.length() - 1);
         }
         try {
-            path = nsResolver.getQPath(definition);
+            path = PathFormat.parse(definition, nsResolver);
         } catch (MalformedPathException mpe) {
             String msg = "Invalid path expression specified as value constraint: " + definition;
             log.debug(msg);
@@ -662,7 +663,7 @@
 
     public String getDefinition(NamespaceResolver nsResolver) {
         try {
-            String p = nsResolver.getJCRPath(path);
+            String p = PathFormat.format(path, nsResolver);
             if (!deep) {
                 return p;
             } else if (path.denotesRoot()) {

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/ObservationManagerImpl.java
Mon Jul 24 04:49:55 2006
@@ -17,29 +17,29 @@
 package org.apache.jackrabbit.jcr2spi.observation;
 
 import org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeRegistry;
-import org.apache.jackrabbit.util.IteratorHelper;
 import org.apache.jackrabbit.name.MalformedPathException;
+import org.apache.jackrabbit.name.NameException;
 import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.name.NamespaceResolver;
+import org.apache.jackrabbit.name.Path;
+import org.apache.jackrabbit.name.PathFormat;
 import org.apache.jackrabbit.name.QName;
-import org.slf4j.LoggerFactory;
+import org.apache.jackrabbit.spi.EventIterator;
+import org.apache.jackrabbit.util.IteratorHelper;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-import javax.jcr.observation.ObservationManager;
+import javax.jcr.RepositoryException;
 import javax.jcr.observation.EventListener;
 import javax.jcr.observation.EventListenerIterator;
-import javax.jcr.RepositoryException;
-import org.apache.jackrabbit.name.Path;
-import org.apache.jackrabbit.name.NameException;
-import org.apache.jackrabbit.spi.EventIterator;
-
-import java.util.HashMap;
-import java.util.Map;
+import javax.jcr.observation.ObservationManager;
+import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Map;
 
 /**
  * <code>ObservationManagerImpl</code>...
@@ -94,7 +94,7 @@
                                  boolean noLocal) throws RepositoryException {
         Path path;
         try {
-            path = nsResolver.getQPath(absPath).getCanonicalPath();
+            path = PathFormat.parse(absPath, nsResolver).getCanonicalPath();
         } catch (MalformedPathException e) {
             throw new RepositoryException("Malformed path: " + absPath);
         }

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java
Mon Jul 24 04:49:55 2006
@@ -22,6 +22,9 @@
 import org.apache.jackrabbit.name.MalformedPathException;
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.jackrabbit.name.NoPrefixDeclaredException;
+import org.apache.jackrabbit.name.Path;
+import org.apache.jackrabbit.name.PathFormat;
+import org.apache.jackrabbit.name.QName;
 
 import javax.jcr.ItemExistsException;
 import javax.jcr.ItemNotFoundException;
@@ -29,13 +32,11 @@
 import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
 import javax.jcr.UnsupportedRepositoryOperationException;
-import org.apache.jackrabbit.name.QName;
-import org.apache.jackrabbit.name.Path;
 import javax.jcr.lock.LockException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.query.InvalidQueryException;
-import javax.jcr.query.QueryResult;
 import javax.jcr.query.Query;
+import javax.jcr.query.QueryResult;
 import javax.jcr.version.VersionException;
 
 /**
@@ -206,17 +207,18 @@
 
         checkInitialized();
         try {
-            Path p = resolver.getQPath(absPath).getNormalizedPath();
+            Path p = PathFormat.parse(absPath, resolver).getNormalizedPath();
             if (!p.isAbsolute()) {
                 throw new RepositoryException(absPath + " is not an absolute path");
             }
             if (session.itemExists(absPath)) {
                 throw new ItemExistsException(absPath);
             }
-            if (!session.itemExists(resolver.getJCRPath(p.getAncestor(1)))) {
-                throw new PathNotFoundException(resolver.getJCRPath(p.getAncestor(1)));
+            String jcrParent = PathFormat.format(p.getAncestor(1), resolver);
+            if (!session.itemExists(jcrParent)) {
+                throw new PathNotFoundException(jcrParent);
             }
-            String relPath = resolver.getJCRPath(p).substring(1);
+            String relPath = PathFormat.format(p, resolver).substring(1);
             String ntName = resolver.getJCRName(QName.NT_QUERY);
             Node queryNode = session.getRootNode().addNode(relPath, ntName);
             // set properties

Modified: jackrabbit/trunk/contrib/spi/project.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/project.xml?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/project.xml (original)
+++ jackrabbit/trunk/contrib/spi/project.xml Mon Jul 24 04:49:55 2006
@@ -17,7 +17,7 @@
     <pomVersion>3</pomVersion>
     <groupId>org.apache.jackrabbit</groupId>
     <name>SPI Contribution</name>
-    <currentVersion>0.1-dev</currentVersion>
+    <currentVersion>${jackrabbit.build.version.spi}</currentVersion>
     <inceptionYear>2006</inceptionYear>
     <description/>
     <shortDescription/>

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=425017&r1=425016&r2=425017&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Mon Jul 24 04:49:55 2006
@@ -97,6 +97,7 @@
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.name.MalformedPathException;
+import org.apache.jackrabbit.name.PathFormat;
 import org.apache.jackrabbit.BaseException;
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.RepositoryService;
@@ -275,7 +276,7 @@
         Path relativePath = itemId.getRelativePath();
         if (relativePath != null) {
             try {
-                String jcrPath = getJCRPath(relativePath);
+                String jcrPath = PathFormat.format(relativePath, this);
                 uri += Text.escapePath(jcrPath);
             } catch (NoPrefixDeclaredException e) {
                 throw new RepositoryException(e);
@@ -1495,7 +1496,7 @@
             jcrPath = uri;
         }
         try {
-            return getQPath(jcrPath);
+            return PathFormat.parse(jcrPath, this);
         } catch (MalformedPathException e) {
             throw new RepositoryException();
         }



Mime
View raw message