jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r367525 - in /incubator/jackrabbit/trunk/contrib/nt-ns-util: project.xml src/main/java/org/apache/jackrabbit/util/name/NamespaceExtractor.java src/main/java/org/apache/jackrabbit/util/name/NamespaceMapping.java
Date Tue, 10 Jan 2006 08:47:06 GMT
Author: tripod
Date: Tue Jan 10 00:47:00 2006
New Revision: 367525

URL: http://svn.apache.org/viewcvs?rev=367525&view=rev
Log:
- applying patch on behalf of peeter

Modified:
    incubator/jackrabbit/trunk/contrib/nt-ns-util/project.xml
    incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceExtractor.java
    incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceMapping.java

Modified: incubator/jackrabbit/trunk/contrib/nt-ns-util/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/nt-ns-util/project.xml?rev=367525&r1=367524&r2=367525&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/nt-ns-util/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/nt-ns-util/project.xml Tue Jan 10 00:47:00 2006
@@ -17,19 +17,20 @@
     <description>JCR Node Type and Namespace Utilities</description>
     <dependencies>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit</artifactId>
-            <version>${pom.currentVersion}</version>
+            <groupId>jsr170</groupId>
+            <artifactId>jcr</artifactId>
+            <version>1.0</version>
+            <url>http://jcp.org/en/jsr/detail?id=170</url>
         </dependency>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-commons</artifactId>
+            <artifactId>jackrabbit</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>
         <dependency>
-            <groupId>concurrent</groupId>
-            <artifactId>concurrent</artifactId>
-            <version>1.3.4</version>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.6.2</version>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -40,46 +41,10 @@
             </properties>
         </dependency>
         <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-            <version>3.1</version>
-        </dependency>
-        <dependency>
-            <groupId>geronimo-spec</groupId>
-            <artifactId>geronimo-spec-jta</artifactId>
-            <version>1.0-M1</version>
-        </dependency>
-        <dependency>
-            <groupId>jsr170</groupId>
-            <artifactId>jcr</artifactId>
-            <version>1.0</version>
-            <url>http://jcp.org/en/jsr/detail?id=170</url>
-        </dependency>
-        <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
             <version>1.2.8</version>
         </dependency>
-        <dependency>
-            <groupId>lucene</groupId>
-            <artifactId>lucene</artifactId>
-            <version>1.4.3</version>
-        </dependency>
-        <dependency>
-            <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
-            <version>2.6.2</version>
-        </dependency>
-        <dependency>
-            <groupId>xerces</groupId>
-            <artifactId>xmlParserAPIs</artifactId>
-            <version>2.0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derby</artifactId>
-            <version>10.1.1.0</version>
-        </dependency>
     </dependencies>
     <build>
         <sourceDirectory>src/main/java</sourceDirectory>
@@ -111,4 +76,4 @@
             </resources>
         </unitTest>
     </build>
-</project>
\ No newline at end of file
+</project>

Modified: incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceExtractor.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceExtractor.java?rev=367525&r1=367524&r2=367525&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceExtractor.java
(original)
+++ incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceExtractor.java
Tue Jan 10 00:47:00 2006
@@ -1,5 +1,5 @@
 /*
- * $Id:$
+ * $Id$
  *
  * Copyright 2002-2004 Day Management AG, Switzerland.
  *
@@ -93,7 +93,7 @@
 
             try{
                 // if prefix already used
-                if (mapping.getURI(prefix) != null){
+                if (mapping.hasPrefix(prefix)){
                     int c;
                     Integer co = (Integer) basePrefixes.get(prefix);
                     if (co == null) {
@@ -112,4 +112,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceMapping.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceMapping.java?rev=367525&r1=367524&r2=367525&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceMapping.java
(original)
+++ incubator/jackrabbit/trunk/contrib/nt-ns-util/src/main/java/org/apache/jackrabbit/util/name/NamespaceMapping.java
Tue Jan 10 00:47:00 2006
@@ -53,6 +53,7 @@
         this.base = base;
     }
 
+
     /**
      * {@inheritDoc}
      */
@@ -80,6 +81,13 @@
     }
 
     /**
+     * Returns true if prefix is already mapped to some URI. Returns false otherwise.
+     */
+    public boolean hasPrefix(String prefix) {
+        return prefixToURI.containsKey(prefix);
+    }
+
+    /**
      * Set a prefix == URI one-to-one mapping
      *
      * @param prefix
@@ -157,4 +165,4 @@
         }
         return s;
     }
-}
\ No newline at end of file
+}



Mime
View raw message