ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1685459 - in /webservices/axiom/branches/attrs-aspects: aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/ implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ implementations/axiom-impl/src/main/java/org/ap...
Date Sun, 14 Jun 2015 20:22:43 GMT
Author: veithen
Date: Sun Jun 14 20:22:42 2015
New Revision: 1685459

URL: http://svn.apache.org/r1685459
Log:
Finish rewriting attribute handling in LLOM.

Modified:
    webservices/axiom/branches/attrs-aspects/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
    webservices/axiom/branches/attrs-aspects/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
    webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
    webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java

Modified: webservices/axiom/branches/attrs-aspects/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/attrs-aspects/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj?rev=1685459&r1=1685458&r2=1685459&view=diff
==============================================================================
--- webservices/axiom/branches/attrs-aspects/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
(original)
+++ webservices/axiom/branches/attrs-aspects/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
Sun Jun 14 20:22:42 2015
@@ -312,4 +312,11 @@ public aspect AxiomElementSupport {
         OMAttribute attr = getAttribute(qname);
         return attr == null ? null : attr.getAttributeValue();
     }
+
+    public final void AxiomElement.removeAttribute(OMAttribute attr) {
+        if (attr.getOwner() != this) {
+            throw new OMException("The attribute is not owned by this element");
+        }
+        ((AxiomAttribute)attr).coreRemove(null);
+    }
 }

Modified: webservices/axiom/branches/attrs-aspects/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/attrs-aspects/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=1685459&r1=1685458&r2=1685459&view=diff
==============================================================================
--- webservices/axiom/branches/attrs-aspects/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
(original)
+++ webservices/axiom/branches/attrs-aspects/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
Sun Jun 14 20:22:42 2015
@@ -374,13 +374,6 @@ public class ElementImpl extends ParentN
         return null;
     }
 
-    public void removeAttribute(OMAttribute attr) {
-        if (attr.getOwner() != this) {
-            throw new OMException("The attribute is not owned by this element");
-        }
-        ((AttrImpl)attr).coreRemove(null);
-    }
-
     public void setNamespace(OMNamespace namespace) {
         setNamespace(namespace, true);
     }

Modified: webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=1685459&r1=1685458&r2=1685459&view=diff
==============================================================================
--- webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
(original)
+++ webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
Sun Jun 14 20:22:42 2015
@@ -58,9 +58,6 @@ public class OMElementImpl extends OMNod
     /** Field namespaces */
     protected HashMap namespaces = null;
     
-    /** Field attributes */
-    protected HashMap attributes = null;
-
     private int lineNumber;
     private static final EmptyIterator EMPTY_ITERATOR = new EmptyIterator();
 
@@ -373,15 +370,6 @@ public class OMElementImpl extends OMNod
         return attr;
     }
 
-    public void removeAttribute(OMAttribute attr) {
-        if (attr.getOwner() != this) {
-            throw new OMException("The attribute is not owned by this element");
-        }
-        // Remove the owner from this attribute
-        ((OMAttributeImpl)attr).internalUnsetOwnerElement(null);
-        attributes.remove(attr.getQName());
-    }
-
     public OMAttribute addAttribute(String localName, String value,
                                     OMNamespace ns) {
         OMNamespace namespace = null;

Modified: webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java?rev=1685459&r1=1685458&r2=1685459&view=diff
==============================================================================
--- webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
(original)
+++ webservices/axiom/branches/attrs-aspects/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
Sun Jun 14 20:22:42 2015
@@ -383,16 +383,6 @@ public class OMSourcedElementImpl extend
         return super.getAllDeclaredNamespaces();
     }
 
-    public OMAttribute getAttribute(QName qname) {
-        forceExpand();
-        return super.getAttribute(qname);
-    }
-
-    public String getAttributeValue(QName qname) {
-        forceExpand();
-        return super.getAttributeValue(qname);
-    }
-
     public OMAttribute addAttribute(OMAttribute attr) {
         forceExpand();
         return super.addAttribute(attr);
@@ -403,11 +393,6 @@ public class OMSourcedElementImpl extend
         return super.addAttribute(attributeName, value, namespace);
     }
 
-    public void removeAttribute(OMAttribute attr) {
-        forceExpand();
-        super.removeAttribute(attr);
-    }
-
     public XMLStreamReader getXMLStreamReader(boolean cache) {
         return getXMLStreamReader(cache, new OMXMLStreamReaderConfiguration());
     }



Mime
View raw message