commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r546990 - in /jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath: JXPathContext.java ri/JXPathContextReferenceImpl.java
Date Wed, 13 Jun 2007 18:23:34 GMT
Author: mbenson
Date: Wed Jun 13 11:23:34 2007
New Revision: 546990

URL: http://svn.apache.org/viewvc?view=rev&rev=546990
Log:
[JXPATH-88] add getPrefix(String namespaceURI) to JXPathContext, RI

Modified:
    jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java
    jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java

Modified: jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java?view=diff&rev=546990&r1=546989&r2=546990
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java
(original)
+++ jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java
Wed Jun 13 11:23:34 2007
@@ -825,6 +825,17 @@
     }
     
     /**
+     * Get the prefix associated with the specifed namespace URI.
+     * @param namespaceURI the ns URI to check.
+     * @return String prefix
+     * @since JXPath 1.3
+     */
+    public String getPrefix(String namespaceURI) {
+        throw new UnsupportedOperationException(
+                "Namespace registration is not implemented by " + getClass());
+    }
+
+    /**
      * Namespace prefixes can be defined implicitly by specifying a pointer to a
      * context where the namespaces are defined. By default,
      * NamespaceContextPointer is the same as the Context Pointer, see

Modified: jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java?view=diff&rev=546990&r1=546989&r2=546990
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
(original)
+++ jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
Wed Jun 13 11:23:34 2007
@@ -671,7 +671,15 @@
     public String getNamespaceURI(String prefix) {
         return namespaceResolver.getNamespaceURI(prefix);
     }
-    
+
+    /**
+     * {@inheritDoc}
+     * @see org.apache.commons.jxpath.JXPathContext#getPrefix(java.lang.String)
+     */
+    public String getPrefix(String namespaceURI) {
+        return namespaceResolver.getPrefix(namespaceURI);
+    }
+
     public void setNamespaceContextPointer(Pointer pointer) {
         if (namespaceResolver.isSealed()) {
             namespaceResolver = (NamespaceResolver) namespaceResolver.clone();



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message