ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1696121 - in /webservices/axiom/trunk: 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/apache/axiom/om/imp...
Date Sun, 16 Aug 2015 08:46:18 GMT
Author: veithen
Date: Sun Aug 16 08:46:18 2015
New Revision: 1696121

URL: http://svn.apache.org/r1696121
Log:
Eliminate duplicate code.

Modified:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomDocumentSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
    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-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomDocumentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomDocumentSupport.aj?rev=1696121&r1=1696120&r2=1696121&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomDocumentSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomDocumentSupport.aj
Sun Aug 16 08:46:18 2015
@@ -108,4 +108,7 @@ public aspect AxiomDocumentSupport {
         coreSetStandalone("yes".equalsIgnoreCase(standalone));
     }
 
+    public final void AxiomDocument.setComplete(boolean complete) {
+        coreSetState(complete ? COMPLETE : INCOMPLETE);
+    }
 }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj?rev=1696121&r1=1696120&r2=1696121&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomElementSupport.aj
Sun Aug 16 08:46:18 2015
@@ -537,4 +537,16 @@ public aspect AxiomElementSupport {
         }
         return sw.toString();
     }
+
+    public void AxiomElement.setComplete(boolean complete) {
+        coreSetState(complete ? COMPLETE : INCOMPLETE);
+        AxiomContainer parent = (AxiomContainer)coreGetParent();
+        if (parent != null) {
+            if (!complete) {
+                parent.setComplete(false);
+            } else {
+                parent.notifyChildComplete();
+            }
+        }
+    }
 }

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=1696121&r1=1696120&r2=1696121&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 16 08:46:18 2015
@@ -306,10 +306,6 @@ public class DocumentImpl extends Parent
         return new DocumentImpl(getOMFactory());
     }
     
-    public final void setComplete(boolean complete) {
-        coreSetState(complete ? COMPLETE : INCOMPLETE);
-    }
-
     public final void build() {
         defaultBuild();
     }

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=1696121&r1=1696120&r2=1696121&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 16 08:46:18 2015
@@ -234,18 +234,6 @@ public class ElementImpl extends ParentN
         super.normalize(config);
     }
 
-    public final void setComplete(boolean complete) {
-        coreSetState(complete ? COMPLETE : INCOMPLETE);
-        ParentNode parentNode = (ParentNode)coreGetParent();
-        if (parentNode != null) {
-            if (!complete) {
-                ((DOMContainer)parentNode).setComplete(false);
-            } else {
-                ((DOMContainer)parentNode).notifyChildComplete();
-            }
-        }
-    }
-
     public final void build() {
         defaultBuild();
     }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java?rev=1696121&r1=1696120&r2=1696121&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
Sun Aug 16 08:46:18 2015
@@ -41,10 +41,6 @@ public class OMDocumentImpl extends OMSe
         super(factory);
     }
 
-    public void setComplete(boolean complete) {
-        coreSetState(complete ? COMPLETE : INCOMPLETE);
-    }
-
     public final void checkChild(OMNode child) {
         if (child instanceof OMElement) {
             if (getOMDocumentElement() != null) {

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=1696121&r1=1696120&r2=1696121&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
Sun Aug 16 08:46:18 2015
@@ -133,20 +133,6 @@ public class OMElementImpl extends OMNod
 
     }
 
-    public void setComplete(boolean complete) {
-        coreSetState(complete ? COMPLETE : INCOMPLETE);
-        OMContainer parent = getParent();
-        if (parent != null) {
-            if (!complete) {
-                ((AxiomContainer)parent).setComplete(false);
-            } else if (parent instanceof OMElementImpl) {
-                ((OMElementImpl) parent).notifyChildComplete();
-            } else if (parent instanceof OMDocumentImpl) {
-                ((OMDocumentImpl) parent).notifyChildComplete();
-            }
-        }
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////
 



Mime
View raw message