ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1697187 - in /webservices/axiom/trunk: aspects/core-aspects/src/main/java/org/apache/axiom/core/ aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ aspects/dom-aspects/src/main/resources/org/apache/axiom/dom/ aspects/dom-aspects/src/t...
Date Sun, 23 Aug 2015 14:49:52 GMT
Author: veithen
Date: Sun Aug 23 14:49:52 2015
New Revision: 1697187

URL: http://svn.apache.org/r1697187
Log:
Rewrite the getElementsByTagName(NS) methods so that they don't rely on the Axiom API.

Added:
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementMatcher.java   (with props)
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementsIterator.java   (with props)
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionTranslator.java
      - copied, changed from r1697165, webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionUtil.java
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java   (with props)
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java   (with props)
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NodeListImpl.java
      - copied, changed from r1697165, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeListImpl.java
    webservices/axiom/trunk/aspects/dom-aspects/src/main/resources/org/apache/axiom/dom/DOMExceptionTranslator.properties
      - copied unchanged from r1697165, webservices/axiom/trunk/aspects/dom-aspects/src/main/resources/org/apache/axiom/dom/DOMExceptionUtil.properties
    webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionTranslatorTest.java
      - copied, changed from r1697165, webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionUtilTest.java
Removed:
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionUtil.java
    webservices/axiom/trunk/aspects/dom-aspects/src/main/resources/org/apache/axiom/dom/DOMExceptionUtil.properties
    webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionUtilTest.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMContainer.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMContainerSupport.aj
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeListImpl.java
Modified:
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/AttributesNamedNodeMap.java
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMCharacterDataSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentFragmentSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMElementSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMEntityReferenceSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMLeafNodeSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSAwareNamedNodeSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSUnawareNamedNodeSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNamespaceDeclarationSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMParentNodeSupport.aj
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NSUtil.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/EntityReferenceImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreParentNodeSupport.aj Sun Aug 23 14:49:52 2015
@@ -283,4 +283,8 @@ public aspect CoreParentNodeSupport {
             }
         };
     }
+    
+    public final <T extends CoreElement> NodeIterator<T> CoreParentNode.coreGetElements(Axis axis, Class<T> type, ElementMatcher<? super T> matcher, String namespaceURI, String name, ExceptionTranslator exceptionTranslator, DetachPolicy detachPolicy) {
+        return new ElementsIterator<T>(this, axis, type, matcher, namespaceURI, name, exceptionTranslator, detachPolicy);
+    }
 }

Added: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementMatcher.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementMatcher.java?rev=1697187&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementMatcher.java (added)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementMatcher.java Sun Aug 23 14:49:52 2015
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.core;
+
+/**
+ * Selects elements based on some match rule.
+ */
+public interface ElementMatcher<T extends CoreElement> {
+    /**
+     * Matches any {@link CoreElement}.
+     */
+    ElementMatcher<CoreElement> ANY = new ElementMatcher<CoreElement>() {
+        public boolean matches(CoreElement element, String namespaceURI, String name) {
+            return true;
+        }
+    };
+    
+    /**
+     * Matches {@link CoreNSAwareElement} nodes by qualified name, i.e. namespace URI and local name.
+     */
+    ElementMatcher<CoreNSAwareElement> BY_QNAME = new ElementMatcher<CoreNSAwareElement>() {
+        public boolean matches(CoreNSAwareElement element, String namespaceURI, String name) {
+            return name.equals(element.coreGetLocalName())
+                    && namespaceURI.equals(element.coreGetNamespaceURI());
+        }
+    };
+    
+    /**
+     * Matches {@link CoreNSAwareElement} nodes by namespace URI.
+     */
+    ElementMatcher<CoreNSAwareElement> BY_NAMESPACE_URI = new ElementMatcher<CoreNSAwareElement>() {
+        public boolean matches(CoreNSAwareElement element, String namespaceURI, String name) {
+            return namespaceURI.equals(element.coreGetNamespaceURI());
+        }
+    };
+    
+    /**
+     * Matches {@link CoreNSAwareElement} nodes by local name.
+     */
+    ElementMatcher<CoreNSAwareElement> BY_LOCAL_NAME = new ElementMatcher<CoreNSAwareElement>() {
+        public boolean matches(CoreNSAwareElement element, String namespaceURI, String name) {
+            return name.equals(element.coreGetLocalName());
+        }
+    };
+    
+    /**
+     * Matches elements (of any kind) by tag name.
+     */
+    ElementMatcher<CoreElement> BY_NAME = new ElementMatcher<CoreElement>() {
+        public boolean matches(CoreElement element, String namespaceURI, String name) {
+            if (element instanceof CoreNSUnawareElement) {
+                return name.equals(((CoreNSUnawareElement)element).coreGetName());
+            } else {
+                CoreNSAwareElement nsAwareElement = (CoreNSAwareElement)element;
+                String prefix = nsAwareElement.coreGetPrefix();
+                int prefixLength = prefix.length();
+                String localName = nsAwareElement.coreGetLocalName();
+                if (prefixLength == 0) {
+                    return name.equals(localName);
+                } else {
+                    int localNameLength = localName.length();
+                    if (prefixLength + localNameLength + 1 == name.length()) {
+                        if (name.charAt(prefixLength) != ':') {
+                            return false;
+                        }
+                        for (int i=0; i<localNameLength; i++) {
+                            if (name.charAt(prefixLength+i+1) != localName.charAt(i)) {
+                                return false;
+                            }
+                        }
+                        for (int i=0; i<prefix.length(); i++) {
+                            if (name.charAt(i) != prefix.charAt(i)) {
+                                return false;
+                            }
+                        }
+                        return true;
+                    } else {
+                        return false;
+                    }
+                }
+            }
+        }
+    };
+    
+    /**
+     * Check if the given element matches. The values of the <code>namespaceURI</code> and
+     * <code>name</code> parameters are those passed to
+     * {@link CoreParentNode#coreGetElements(Axis, Class, ElementMatcher, String, String)}.
+     * 
+     * @param element
+     *            the element to check
+     * @param namespaceURI
+     *            see above
+     * @param name
+     *            see above
+     * @return <code>true</code> if the element matches, <code>false</code> otherwise
+     */
+    boolean matches(T element, String namespaceURI, String name);
+}

Propchange: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementMatcher.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementsIterator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementsIterator.java?rev=1697187&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementsIterator.java (added)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementsIterator.java Sun Aug 23 14:49:52 2015
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.core;
+
+final class ElementsIterator<T extends CoreElement> extends AbstractNodeIterator<T> {
+    private final Class<T> type;
+    private final ElementMatcher<? super T> matcher;
+    private final String namespaceURI;
+    private final String name;
+
+    public ElementsIterator(CoreParentNode startNode, Axis axis, Class<T> type, ElementMatcher<? super T> matcher, String namespaceURI, String name, ExceptionTranslator exceptionTranslator, DetachPolicy detachPolicy) {
+        super(startNode, axis, type, exceptionTranslator, detachPolicy);
+        this.type = type;
+        this.matcher = matcher;
+        this.namespaceURI = namespaceURI;
+        this.name = name;
+    }
+
+    @Override
+    protected final boolean matches(CoreNode node) throws CoreModelException {
+        return type.isInstance(node) && matcher.matches(type.cast(node), namespaceURI, name);
+    }
+}

Propchange: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/ElementsIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/AttributesNamedNodeMap.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/AttributesNamedNodeMap.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/AttributesNamedNodeMap.java (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/AttributesNamedNodeMap.java Sun Aug 23 14:49:52 2015
@@ -63,7 +63,7 @@ final class AttributesNamedNodeMap imple
         if (arg instanceof CoreTypedAttribute) {
             return element.setAttributeNode((Attr)arg);
         } else {
-            throw DOMExceptionUtil.newDOMException(DOMException.HIERARCHY_REQUEST_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.HIERARCHY_REQUEST_ERR);
         }
     }
 
@@ -71,7 +71,7 @@ final class AttributesNamedNodeMap imple
         if (arg instanceof CoreTypedAttribute) {
             return element.setAttributeNodeNS((Attr)arg);
         } else {
-            throw DOMExceptionUtil.newDOMException(DOMException.HIERARCHY_REQUEST_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.HIERARCHY_REQUEST_ERR);
         }
     }
 
@@ -82,7 +82,7 @@ final class AttributesNamedNodeMap imple
             element.removeAttributeNode(attr);
             return attr;
         } else {
-            throw DOMExceptionUtil.newDOMException(DOMException.NOT_FOUND_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NOT_FOUND_ERR);
         }
     }
 
@@ -93,7 +93,7 @@ final class AttributesNamedNodeMap imple
             element.removeAttributeNode(attr);
             return attr;
         } else {
-            throw DOMExceptionUtil.newDOMException(DOMException.NOT_FOUND_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NOT_FOUND_ERR);
         }
     }
 }

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMCharacterDataSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMCharacterDataSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMCharacterDataSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMCharacterDataSupport.aj Sun Aug 23 14:49:52 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.w3c.dom.DOMException;
 

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentFragmentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentFragmentSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentFragmentSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentFragmentSupport.aj Sun Aug 23 14:49:52 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.CoreElement;
 import org.apache.axiom.core.ElementAction;

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMDocumentSupport.aj Sun Aug 23 14:49:52 2015
@@ -30,6 +30,7 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.w3c.dom.ProcessingInstruction;
 import org.w3c.dom.Text;
 
@@ -178,4 +179,12 @@ public aspect DOMDocumentSupport {
         pi.coreSetCharacterData(data, Policies.DETACH_POLICY);
         return pi;
     }
+
+    public final NodeList DOMDocument.getElementsByTagName(String tagname) {
+        return new ElementsByTagName(this, tagname);
+    }
+
+    public final NodeList DOMDocument.getElementsByTagNameNS(String namespaceURI, String localName) {
+        return new ElementsByTagNameNS(this, namespaceURI, localName);
+    }
 }

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMElementSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMElementSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMElementSupport.aj Sun Aug 23 14:49:52 2015
@@ -31,6 +31,7 @@ import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.w3c.dom.TypeInfo;
 
 public aspect DOMElementSupport {
@@ -153,7 +154,7 @@ public aspect DOMElementSupport {
             try {
                 return (DOMAttribute)coreSetAttribute(matcher, newAttr, Policies.ATTRIBUTE_MIGRATION_POLICY, false, null, ReturnValue.REPLACED_ATTRIBUTE);
             } catch (CoreModelException ex) {
-                throw DOMExceptionUtil.translate(ex);
+                throw DOMExceptionTranslator.translate(ex);
             }
         }
     }
@@ -161,7 +162,7 @@ public aspect DOMElementSupport {
     public final Attr DOMElement.removeAttributeNode(Attr oldAttr) throws DOMException {
         DOMAttribute attr = (DOMAttribute)oldAttr;
         if (attr.coreGetOwnerElement() != this) {
-            throw DOMExceptionUtil.newDOMException(DOMException.NOT_FOUND_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NOT_FOUND_ERR);
         } else {
             attr.coreRemove();
         }
@@ -189,4 +190,12 @@ public aspect DOMElementSupport {
     public final void DOMElement.setTextContent(String textContent) {
         coreSetCharacterData(textContent, Policies.DETACH_POLICY);
     }
+
+    public final NodeList DOMElement.getElementsByTagName(String tagname) {
+        return new ElementsByTagName(this, tagname);
+    }
+
+    public final NodeList DOMElement.getElementsByTagNameNS(String namespaceURI, String localName) {
+        return new ElementsByTagNameNS(this, namespaceURI, localName);
+    }
 }

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMEntityReferenceSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMEntityReferenceSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMEntityReferenceSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMEntityReferenceSupport.aj Sun Aug 23 14:49:52 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.CoreElement;
 import org.w3c.dom.DOMException;

Copied: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionTranslator.java (from r1697165, webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionUtil.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionTranslator.java?p2=webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionTranslator.java&p1=webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionUtil.java&r1=1697165&r2=1697187&rev=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionUtil.java (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMExceptionTranslator.java Sun Aug 23 14:49:52 2015
@@ -23,13 +23,16 @@ import java.util.PropertyResourceBundle;
 import java.util.ResourceBundle;
 
 import org.apache.axiom.core.CoreModelException;
+import org.apache.axiom.core.ExceptionTranslator;
 import org.apache.axiom.core.NodeInUseException;
 import org.apache.axiom.core.WrongDocumentException;
 import org.w3c.dom.DOMException;
 
-public final class DOMExceptionUtil {
+public final class DOMExceptionTranslator implements ExceptionTranslator {
+    public static final DOMExceptionTranslator INSTANCE = new DOMExceptionTranslator();
+    
     private static final ResourceBundle resourceBundle =
-            PropertyResourceBundle.getBundle(DOMExceptionUtil.class.getName());
+            PropertyResourceBundle.getBundle(DOMExceptionTranslator.class.getName());
 
     private static final String[] codeStrings = {
         // Note: order is determined by the constants defined in DOMException
@@ -52,7 +55,7 @@ public final class DOMExceptionUtil {
         "TYPE_MISMATCH_ERR",
     };
     
-    private DOMExceptionUtil() {}
+    private DOMExceptionTranslator() {}
     
     public static DOMException newDOMException(short code) {
         String key = codeStrings[code-1];
@@ -78,4 +81,8 @@ public final class DOMExceptionUtil {
             throw new IllegalArgumentException("Don't know how to translate " + ex.getClass().getName());
         }
     }
+
+    public RuntimeException toUncheckedException(CoreModelException ex) {
+        return translate(ex);
+    }
 }

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMLeafNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMLeafNodeSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMLeafNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMLeafNodeSupport.aj Sun Aug 23 14:49:52 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.CoreElement;
 import org.w3c.dom.DOMException;

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSAwareNamedNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSAwareNamedNodeSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSAwareNamedNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSAwareNamedNodeSupport.aj Sun Aug 23 14:49:52 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.w3c.dom.DOMException;
 

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSUnawareNamedNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSUnawareNamedNodeSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSUnawareNamedNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNSUnawareNamedNodeSupport.aj Sun Aug 23 14:49:52 2015
@@ -30,7 +30,7 @@ public aspect DOMNSUnawareNamedNodeSuppo
     }
     
     public final void DOMNSUnawareNamedNode.setPrefix(String prefix) throws DOMException {
-        throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+        throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
     }
     
     public final String DOMNSUnawareNamedNode.getLocalName() {

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNamespaceDeclarationSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNamespaceDeclarationSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNamespaceDeclarationSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMNamespaceDeclarationSupport.aj Sun Aug 23 14:49:52 2015
@@ -34,7 +34,7 @@ public aspect DOMNamespaceDeclarationSup
     public final void DOMNamespaceDeclaration.setPrefix(String prefix) throws DOMException {
         // Other DOM implementations allow changing the prefix, but this means that a namespace
         // declaration is transformed into a normal attribute. We don't support this.
-        throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+        throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
     }
 
     public final String DOMNamespaceDeclaration.getLocalName() {

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMParentNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMParentNodeSupport.aj?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMParentNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/DOMParentNodeSupport.aj Sun Aug 23 14:49:52 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.CoreChildNode;
 import org.w3c.dom.DOMException;

Added: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java?rev=1697187&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java (added)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java Sun Aug 23 14:49:52 2015
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.dom;
+
+import java.util.Iterator;
+
+import org.apache.axiom.core.Axis;
+import org.apache.axiom.core.ElementMatcher;
+import org.w3c.dom.Node;
+
+public class ElementsByTagName extends NodeListImpl {
+    private final DOMParentNode node;
+    private final String tagname;
+    
+    public ElementsByTagName(DOMParentNode node, String tagname) {
+        this.node = node;
+        this.tagname = tagname;
+    }
+
+    @Override
+    protected Iterator<? extends Node> createIterator() {
+        if (tagname.equals("*")) {
+            return node.coreGetElements(Axis.DESCENDANTS, DOMElement.class, ElementMatcher.ANY, null, null, DOMExceptionTranslator.INSTANCE, Policies.DETACH_POLICY);
+        } else {
+            return node.coreGetElements(Axis.DESCENDANTS, DOMElement.class, ElementMatcher.BY_NAME, null, tagname, DOMExceptionTranslator.INSTANCE, Policies.DETACH_POLICY);
+        }
+    }
+}

Propchange: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagName.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java?rev=1697187&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java (added)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java Sun Aug 23 14:49:52 2015
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.dom;
+
+import java.util.Iterator;
+
+import org.apache.axiom.core.Axis;
+import org.apache.axiom.core.ElementMatcher;
+import org.w3c.dom.Node;
+
+public class ElementsByTagNameNS extends NodeListImpl {
+    private final DOMParentNode node;
+    private final String namespaceURI;
+    private final String localName;
+    
+    public ElementsByTagNameNS(DOMParentNode node, String namespaceURI, String localName) {
+        this.node = node;
+        this.namespaceURI = namespaceURI == null ? "" : namespaceURI;
+        this.localName = localName;
+    }
+
+    @Override
+    protected Iterator<? extends Node> createIterator() {
+        boolean nsWildcard = "*".equals(namespaceURI);
+        boolean localNameWildcard = localName.equals("*");
+        if (nsWildcard && localNameWildcard) {
+            // TODO: there seems to be no unit test checking whether the iterator should return DOM1 elements!
+            return node.coreGetElements(Axis.DESCENDANTS, DOMElement.class, ElementMatcher.ANY, null, null, DOMExceptionTranslator.INSTANCE, Policies.DETACH_POLICY);
+        } else if (nsWildcard) {
+            return node.coreGetElements(Axis.DESCENDANTS, DOMNSAwareElement.class, ElementMatcher.BY_LOCAL_NAME, null, localName, DOMExceptionTranslator.INSTANCE, Policies.DETACH_POLICY);
+        } else if (localNameWildcard) {
+            return node.coreGetElements(Axis.DESCENDANTS, DOMNSAwareElement.class, ElementMatcher.BY_NAMESPACE_URI, namespaceURI, null, DOMExceptionTranslator.INSTANCE, Policies.DETACH_POLICY);
+        } else {
+            return node.coreGetElements(Axis.DESCENDANTS, DOMNSAwareElement.class, ElementMatcher.BY_QNAME, namespaceURI, localName, DOMExceptionTranslator.INSTANCE, Policies.DETACH_POLICY);
+        }
+    }
+}

Propchange: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/ElementsByTagNameNS.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NSUtil.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NSUtil.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NSUtil.java (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NSUtil.java Sun Aug 23 14:49:52 2015
@@ -43,12 +43,12 @@ public final class NSUtil {
     
     public static void validateName(String name) throws DOMException {
         if (name.length() == 0) {
-            throw DOMExceptionUtil.newDOMException(DOMException.INVALID_CHARACTER_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.INVALID_CHARACTER_ERR);
         }
         for (int i=0; i<name.length(); i++) {
             char c = name.charAt(i);
             if (i == 0 && !isNameStartChar(c) || i > 0 && !isNameChar(c)) {
-                throw DOMExceptionUtil.newDOMException(DOMException.INVALID_CHARACTER_ERR);
+                throw DOMExceptionTranslator.newDOMException(DOMException.INVALID_CHARACTER_ERR);
             }
         }
     }
@@ -57,17 +57,17 @@ public final class NSUtil {
         for (int i=0; i<prefix.length(); i++) {
             char c = prefix.charAt(i);
             if (c == ':') {
-                throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+                throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
             }
             if (i == 0 && !isNameStartChar(c) || i > 0 && !isNameChar(c)) {
-                throw DOMExceptionUtil.newDOMException(DOMException.INVALID_CHARACTER_ERR);
+                throw DOMExceptionTranslator.newDOMException(DOMException.INVALID_CHARACTER_ERR);
             }
         }
     }
     
     public static int validateQualifiedName(String qualifiedName) throws DOMException {
         if (qualifiedName.length() == 0) {
-            throw DOMExceptionUtil.newDOMException(DOMException.INVALID_CHARACTER_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.INVALID_CHARACTER_ERR);
         }
         int colonPosition = -1;
         boolean checkNameStart = true;
@@ -78,17 +78,17 @@ public final class NSUtil {
                     colonPosition = i;
                     checkNameStart = true;
                 } else {
-                    throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+                    throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
                 }
             } else if (checkNameStart && !isNameStartChar(c) || i > 0 && !isNameChar(c)) {
-                throw DOMExceptionUtil.newDOMException(DOMException.INVALID_CHARACTER_ERR);
+                throw DOMExceptionTranslator.newDOMException(DOMException.INVALID_CHARACTER_ERR);
             } else {
                 checkNameStart = false;
             }
         }
         if (checkNameStart) {
             // If we get here, then the qualified name ends with a colon 
-            throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
         }
         return colonPosition;
     }
@@ -99,20 +99,20 @@ public final class NSUtil {
     
     public static void validateNamespace(String namespaceURI, String prefix) {
         if (prefix.length() != 0 && namespaceURI.length() == 0) {
-            throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
         }
         if (XMLConstants.XML_NS_PREFIX.equals(prefix) && !XMLConstants.XML_NS_URI.equals(namespaceURI)) {
-            throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
         }
     }
     
     public static void validateAttributeName(String namespaceURI, String localName, String prefix) {
         validateNamespace(namespaceURI, prefix);
         if (prefix.length() == 0 && localName.equals(XMLConstants.XMLNS_ATTRIBUTE) && !namespaceURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
-            throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
         }
         if (XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) {
-            throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
         }
     }
     
@@ -122,7 +122,7 @@ public final class NSUtil {
         } else if (prefix.length() == 0 && localName.equals(XMLConstants.XMLNS_ATTRIBUTE)) {
             return "";
         } else {
-            throw DOMExceptionUtil.newDOMException(DOMException.NAMESPACE_ERR);
+            throw DOMExceptionTranslator.newDOMException(DOMException.NAMESPACE_ERR);
         }
     }
 }

Copied: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NodeListImpl.java (from r1697165, webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeListImpl.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NodeListImpl.java?p2=webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NodeListImpl.java&p1=webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeListImpl.java&r1=1697165&r2=1697187&rev=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeListImpl.java (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/NodeListImpl.java Sun Aug 23 14:49:52 2015
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.axiom.om.impl.dom;
+package org.apache.axiom.dom;
 
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -26,7 +26,7 @@ import java.util.Iterator;
 
 /** Implementation of org.w3c.dom.NodeList */
 public abstract class NodeListImpl implements NodeList {
-    protected abstract Iterator getIterator();
+    protected abstract Iterator<? extends Node> createIterator();
 
     /**
      * Returns the number of nodes.
@@ -34,7 +34,7 @@ public abstract class NodeListImpl imple
      * @see org.w3c.dom.NodeList#getLength()
      */
     public int getLength() {
-        Iterator children = getIterator();
+        Iterator<? extends Node> children = createIterator();
         int count = 0;
         while (children.hasNext()) {
             count++;
@@ -49,11 +49,11 @@ public abstract class NodeListImpl imple
      * @see org.w3c.dom.NodeList#item(int)
      */
     public Node item(int index) {
-        Iterator children = getIterator();
+        Iterator<? extends Node> children = createIterator();
         int count = 0;
         while (children.hasNext()) {
             if (count == index) {
-                return (Node) children.next();
+                return children.next();
             } else {
                 children.next();
             }

Copied: webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionTranslatorTest.java (from r1697165, webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionUtilTest.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionTranslatorTest.java?p2=webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionTranslatorTest.java&p1=webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionUtilTest.java&r1=1697165&r2=1697187&rev=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionUtilTest.java (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/test/java/org/apache/axiom/dom/DOMExceptionTranslatorTest.java Sun Aug 23 14:49:52 2015
@@ -23,10 +23,10 @@ import static com.google.common.truth.Tr
 import org.junit.Test;
 import org.w3c.dom.DOMException;
 
-public class DOMExceptionUtilTest {
+public class DOMExceptionTranslatorTest {
     @Test
     public void testMessage() {
-        DOMException ex = DOMExceptionUtil.newDOMException(DOMException.NOT_FOUND_ERR);
+        DOMException ex = DOMExceptionTranslator.newDOMException(DOMException.NOT_FOUND_ERR);
         assertThat(ex.getMessage()).isEqualTo(
                 "NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.");
     }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java Sun Aug 23 14:49:52 2015
@@ -19,7 +19,7 @@
 
 package org.apache.axiom.om.impl.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import javax.xml.XMLConstants;
 

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java Sun Aug 23 14:49:52 2015
@@ -19,13 +19,13 @@
 
 package org.apache.axiom.om.impl.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.CoreChildNode;
 import org.apache.axiom.core.CoreModelException;
 import org.apache.axiom.core.NodeMigrationPolicy;
 import org.apache.axiom.dom.DOMDocument;
-import org.apache.axiom.dom.DOMExceptionUtil;
+import org.apache.axiom.dom.DOMExceptionTranslator;
 import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
@@ -163,7 +163,7 @@ public class DocumentImpl extends Parent
                         try {
                             ((ElementImpl)newElement).coreAppendAttribute((AttrImpl)importNode(sourceAttrs.item(index), true), NodeMigrationPolicy.MOVE_ALWAYS);
                         } catch (CoreModelException ex) {
-                            throw DOMExceptionUtil.translate(ex);
+                            throw DOMExceptionTranslator.translate(ex);
                         }
                     }
                 }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java Sun Aug 23 14:49:52 2015
@@ -19,13 +19,13 @@
 
 package org.apache.axiom.om.impl.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.NodeMigrationException;
 import org.apache.axiom.core.NodeMigrationPolicy;
 import org.apache.axiom.dom.DOMAttribute;
 import org.apache.axiom.dom.DOMConfigurationImpl;
-import org.apache.axiom.dom.DOMExceptionUtil;
+import org.apache.axiom.dom.DOMExceptionTranslator;
 import org.apache.axiom.dom.DOMNSAwareElement;
 import org.apache.axiom.dom.Policies;
 import org.apache.axiom.om.OMCloneOptions;
@@ -126,7 +126,7 @@ public class ElementImpl extends ParentN
             try {
                 clone.coreAppendAttribute(clonedAttr, NodeMigrationPolicy.MOVE_ALWAYS);
             } catch (NodeMigrationException ex) {
-                DOMExceptionUtil.translate(ex);
+                DOMExceptionTranslator.translate(ex);
             }
         }
         return clone;

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/EntityReferenceImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/EntityReferenceImpl.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/EntityReferenceImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/EntityReferenceImpl.java Sun Aug 23 14:49:52 2015
@@ -18,7 +18,7 @@
  */
 package org.apache.axiom.om.impl.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.dom.DOMEntityReference;
 import org.apache.axiom.om.OMFactory;

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java Sun Aug 23 14:49:52 2015
@@ -19,7 +19,7 @@
 
 package org.apache.axiom.om.impl.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.CoreChildNode;
 import org.apache.axiom.dom.DOMNode;

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java Sun Aug 23 14:49:52 2015
@@ -19,7 +19,7 @@
 
 package org.apache.axiom.om.impl.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.core.CoreChildNode;
 import org.apache.axiom.core.CoreDocumentFragment;

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java?rev=1697187&r1=1697186&r2=1697187&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java Sun Aug 23 14:49:52 2015
@@ -19,7 +19,7 @@
 
 package org.apache.axiom.om.impl.dom;
 
-import static org.apache.axiom.dom.DOMExceptionUtil.newDOMException;
+import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
 import org.apache.axiom.dom.DOMTextNode;
 import org.apache.axiom.om.OMCloneOptions;



Mime
View raw message