jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r521645 - /jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QItemDefinitionImpl.java
Date Fri, 23 Mar 2007 09:35:49 GMT
Author: angela
Date: Fri Mar 23 02:35:48 2007
New Revision: 521645

URL: http://svn.apache.org/viewvc?view=rev&rev=521645
Log:
fix retrieval of declaring node type from xml format

Modified:
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QItemDefinitionImpl.java

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QItemDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QItemDefinitionImpl.java?view=diff&rev=521645&r1=521644&r2=521645
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QItemDefinitionImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QItemDefinitionImpl.java
Fri Mar 23 02:35:48 2007
@@ -25,7 +25,6 @@
 import org.apache.jackrabbit.spi.QNodeDefinition;
 import org.apache.jackrabbit.spi.QPropertyDefinition;
 import org.apache.jackrabbit.webdav.jcr.nodetype.NodeTypeConstants;
-import org.apache.jackrabbit.webdav.xml.DomUtil;
 
 import javax.jcr.version.OnParentVersionAction;
 import javax.jcr.RepositoryException;
@@ -79,16 +78,6 @@
 
     /**
      *
-     * @param itemDefElement
-     * @param nsResolver
-     * @throws RepositoryException
-     */
-    QItemDefinitionImpl(Element itemDefElement, NamespaceResolver nsResolver) throws RepositoryException
{
-         this(null, itemDefElement, nsResolver);
-    }
-
-    /**
-     *
      * @param declaringNodeType
      * @param itemDefElement
      * @param nsResolver
@@ -97,9 +86,9 @@
     QItemDefinitionImpl(QName declaringNodeType, Element itemDefElement, NamespaceResolver
nsResolver)
         throws RepositoryException {
         try {
-            // TODO: webdav server sends jcr names -> nsResolver required. improve this.
-            if (DomUtil.hasChildElement(itemDefElement, DECLARINGNODETYPE_ATTRIBUTE, null))
{
-                QName dnt = NameFormat.parse(itemDefElement.getAttribute(DECLARINGNODETYPE_ATTRIBUTE),
nsResolver);
+            String attr = itemDefElement.getAttribute(DECLARINGNODETYPE_ATTRIBUTE);
+            if (attr != null) {
+                QName dnt = NameFormat.parse(attr, nsResolver);
                 if (declaringNodeType != null && !declaringNodeType.equals(dnt))
{
                     throw new RepositoryException("Declaring nodetype mismatch: In element
= '" + dnt + "', Declaring nodetype = '" + declaringNodeType + "'");
                 }



Mime
View raw message