jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r331115 - /incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/xml/nodetype/SAXNamespaceResolver.java
Date Sun, 06 Nov 2005 16:46:46 GMT
Author: jukka
Date: Sun Nov  6 08:46:43 2005
New Revision: 331115

URL: http://svn.apache.org/viewcvs?rev=331115&view=rev
Log:
JCR-EXT: Added the getJCRName() and getQName() methods required by the NamespaceResolver interface.

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/xml/nodetype/SAXNamespaceResolver.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/xml/nodetype/SAXNamespaceResolver.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/xml/nodetype/SAXNamespaceResolver.java?rev=331115&r1=331114&r2=331115&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/xml/nodetype/SAXNamespaceResolver.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-ext/src/java/org/apache/jackrabbit/xml/nodetype/SAXNamespaceResolver.java
Sun Nov  6 08:46:43 2005
@@ -23,7 +23,11 @@
 
 import javax.jcr.NamespaceException;
 
+import org.apache.jackrabbit.name.IllegalNameException;
 import org.apache.jackrabbit.name.NamespaceResolver;
+import org.apache.jackrabbit.name.NoPrefixDeclaredException;
+import org.apache.jackrabbit.name.QName;
+import org.apache.jackrabbit.name.UnknownPrefixException;
 
 /**
  * TODO
@@ -31,6 +35,14 @@
 public class SAXNamespaceResolver implements NamespaceResolver {
 
     private final LinkedList stack = new LinkedList();
+
+    public String getJCRName(QName qname) throws NoPrefixDeclaredException {
+        return qname.toJCRName(this);
+    }
+
+    public QName getQName(String name) throws IllegalNameException, UnknownPrefixException
{
+        return QName.fromJCRName(name, this);
+    }
 
     public void startDocument() {
         stack.addFirst(new HashMap());



Mime
View raw message