ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1700902 - 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-dom/src/main/java/org/apache/axiom/soap/im...
Date Wed, 02 Sep 2015 20:48:48 GMT
Author: veithen
Date: Wed Sep  2 20:48:48 2015
New Revision: 1700902

URL: http://svn.apache.org/r1700902
Log:
AXIOM-472: Move remaining OMElement and OMDocument implementation code to om-aspects.

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/NSAwareElement.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.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
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPMessageImpl.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=1700902&r1=1700901&r2=1700902&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
Wed Sep  2 20:48:48 2015
@@ -19,6 +19,7 @@
 package org.apache.axiom.om.impl.common;
 
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.impl.common.serializer.push.OutputException;
@@ -111,4 +112,17 @@ public aspect AxiomDocumentSupport {
     public final void AxiomDocument.setComplete(boolean complete) {
         coreSetState(complete ? COMPLETE : INCOMPLETE);
     }
+
+    public final void AxiomDocument.checkChild(OMNode child) {
+        if (child instanceof OMElement) {
+            if (getOMDocumentElement() != null) {
+                throw new OMException("Document element already exists");
+            } else {
+                checkDocumentElement((OMElement)child);
+            }
+        }
+    }
+
+    public void AxiomDocument.checkDocumentElement(OMElement element) {
+    }
 }

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=1700902&r1=1700901&r2=1700902&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
Wed Sep  2 20:48:48 2015
@@ -64,6 +64,8 @@ import org.apache.commons.logging.LogFac
 public aspect AxiomElementSupport {
     private static final Log log = LogFactory.getLog(AxiomElementSupport.class);
     
+    private int AxiomElement.lineNumber;
+    
     public final void AxiomElement.initName(String localName, OMNamespace ns, boolean generateNSDecl)
{
         internalSetLocalName(localName);
         internalSetNamespace(generateNSDecl ? NSUtil.handleNamespace(this, ns, false, true)
: ns);
@@ -555,4 +557,19 @@ public aspect AxiomElementSupport {
             }
         }
     }
+
+    public void AxiomElement.checkChild(OMNode child) {
+    }
+
+    public final void AxiomElement.setNamespace(OMNamespace namespace) {
+        setNamespace(namespace, true);
+    }
+
+    public final void AxiomElement.setLineNumber(int lineNumber) {
+        this.lineNumber = lineNumber;
+    }
+
+    public final int AxiomElement.getLineNumber() {
+        return lineNumber;
+    }
 }

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=1700902&r1=1700901&r2=1700902&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
Wed Sep  2 20:48:48 2015
@@ -21,14 +21,11 @@ package org.apache.axiom.om.impl.dom;
 
 import static org.apache.axiom.dom.DOMExceptionTranslator.newDOMException;
 
-import org.apache.axiom.core.ClonePolicy;
 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.DOMExceptionTranslator;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.impl.common.AxiomDocument;
@@ -232,19 +229,6 @@ public class DocumentImpl extends Parent
         throw new UnsupportedOperationException("TODO");
     }
 
-    public final void checkChild(OMNode child) {
-        if (child instanceof OMElement) {
-            if (getOMDocumentElement() != null) {
-                throw new OMException("Document element already exists");
-            } else {
-                checkDocumentElement((OMElement)child);
-            }
-        }
-    }
-
-    protected void checkDocumentElement(OMElement element) {
-    }
-
     public final void setPrefix(String prefix) throws DOMException {
         throw newDOMException(DOMException.NAMESPACE_ERR);
     }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NSAwareElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NSAwareElement.java?rev=1700902&r1=1700901&r2=1700902&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NSAwareElement.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NSAwareElement.java
Wed Sep  2 20:48:48 2015
@@ -21,40 +21,19 @@ package org.apache.axiom.om.impl.dom;
 
 import org.apache.axiom.dom.DOMConfigurationImpl;
 import org.apache.axiom.dom.DOMNSAwareElement;
-import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMConstants;
-import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.impl.common.AxiomElement;
 
 /** Implementation of the org.w3c.dom.Element and org.apache.axiom.om.Element interfaces.
*/
 public class NSAwareElement extends ElementImpl implements DOMNSAwareElement, AxiomElement,
         OMConstants {
 
-    private int lineNumber;
-
     public NSAwareElement(OMFactory factory) {
         super(factory);
     }
     
-    // /
-    // /OmElement methods
-    // /
-
-    public void setNamespace(OMNamespace namespace) {
-        setNamespace(namespace, true);
-    }
-
-    public void setLineNumber(int lineNumber) {
-        this.lineNumber = lineNumber;
-    }
-
-    public int getLineNumber() {
-        return lineNumber;
-    }
-
     /**
      * Returns the namespace uri, given the prefix. If it is not found at this element, searches
the
      * parent.
@@ -83,7 +62,4 @@ public class NSAwareElement extends Elem
         }
         super.normalize(config);
     }
-
-    public final void checkChild(OMNode child) {
-    }
 }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java?rev=1700902&r1=1700901&r2=1700902&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java
Wed Sep  2 20:48:48 2015
@@ -40,7 +40,7 @@ public class SOAPMessageImpl extends Doc
         setOMDocumentElement(envelope);
     }
 
-    protected void checkDocumentElement(OMElement element) {
+    public void checkDocumentElement(OMElement element) {
         if (!(element instanceof SOAPEnvelope)) {
             throw new OMException("Child not allowed; must be a SOAPEnvelope");
         }

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=1700902&r1=1700901&r2=1700902&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
Wed Sep  2 20:48:48 2015
@@ -19,33 +19,12 @@
 
 package org.apache.axiom.om.impl.llom;
 
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.impl.common.AxiomDocument;
 
 /** Class OMDocumentImpl */
 public class OMDocumentImpl extends OMSerializableImpl implements AxiomDocument {
-    /**
-     * Create a <code>OMDocument</code> given the <code>OMFactory</code>
-     *
-     * @param factory The <code>OMFactory</code> that created this instace
-     */
     public OMDocumentImpl(OMFactory factory) {
         super(factory);
     }
-
-    public final void checkChild(OMNode child) {
-        if (child instanceof OMElement) {
-            if (getOMDocumentElement() != null) {
-                throw new OMException("Document element already exists");
-            } else {
-                checkDocumentElement((OMElement)child);
-            }
-        }
-    }
-
-    protected void checkDocumentElement(OMElement element) {
-    }
 }

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=1700902&r1=1700901&r2=1700902&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
Wed Sep  2 20:48:48 2015
@@ -19,38 +19,13 @@
 
 package org.apache.axiom.om.impl.llom;
 
-import org.apache.axiom.om.OMConstants;
-import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.impl.common.AxiomElement;
 
-import java.util.Iterator;
-
 /** Class OMElementImpl */
-public class OMElementImpl extends OMNodeImpl
-        implements AxiomElement, OMConstants {
-    
-    private int lineNumber;
-
+public class OMElementImpl extends OMNodeImpl implements AxiomElement {
     public OMElementImpl(OMFactory factory) {
         super(factory);
     }
-
-    public void checkChild(OMNode child) {
-    }
-
-    public final void setNamespace(OMNamespace namespace) {
-        setNamespace(namespace, true);
-    }
-
-    public final void setLineNumber(int lineNumber) {
-        this.lineNumber = lineNumber;
-    }
-
-    public final int getLineNumber() {
-        return lineNumber;
-    }
 }
 

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPMessageImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPMessageImpl.java?rev=1700902&r1=1700901&r2=1700902&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPMessageImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPMessageImpl.java
Wed Sep  2 20:48:48 2015
@@ -40,7 +40,7 @@ public class SOAPMessageImpl extends OMD
         setOMDocumentElement(envelope);
     }
 
-    protected void checkDocumentElement(OMElement element) {
+    public void checkDocumentElement(OMElement element) {
         if (!(element instanceof SOAPEnvelope)) {
             throw new OMException("Child not allowed; must be a SOAPEnvelope");
         }



Mime
View raw message