ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1703455 - in /webservices/axiom/trunk: aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/ aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/ axiom-api/src/main/java/org/apache/axiom/om/util/ implemen...
Date Wed, 16 Sep 2015 19:49:00 GMT
Author: veithen
Date: Wed Sep 16 19:48:59 2015
New Revision: 1703455

URL: http://svn.apache.org/r1703455
Log:
Transform the OMFactory aspects into standard Java classes.

Added:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
      - copied, changed from r1701662, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AxiomNodeFactorySupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP11Factory.java
      - copied, changed from r1701662, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP11FactorySupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP12Factory.java
      - copied, changed from r1701662, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP12FactorySupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java
      - copied, changed from r1703275, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj
Removed:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AxiomNodeFactory.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AxiomNodeFactorySupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP11Factory.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP11FactorySupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP12Factory.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP12FactorySupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactory.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFactoryImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFactoryImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
Modified:
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/AttributeHelper.java
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
    webservices/axiom/trunk/systests/old-tests/src/test/java/org/apache/axiom/om/util/OMElementHelperTest.java

Copied: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java (from r1701662, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AxiomNodeFactorySupport.aj)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java?p2=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java&p1=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AxiomNodeFactorySupport.aj&r1=1701662&r2=1703455&rev=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AxiomNodeFactorySupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java Wed Sep 16 19:48:59 2015
@@ -20,6 +20,7 @@ package org.apache.axiom.om.impl.common.
 
 import javax.xml.namespace.QName;
 
+import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.ext.stax.datahandler.DataHandlerProvider;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMComment;
@@ -30,6 +31,7 @@ import org.apache.axiom.om.OMDocType;
 import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMEntityReference;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMProcessingInstruction;
@@ -37,6 +39,7 @@ import org.apache.axiom.om.OMSourcedElem
 import org.apache.axiom.om.OMText;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.OMContainerEx;
+import org.apache.axiom.om.impl.builder.OMFactoryEx;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.impl.common.AxiomAttribute;
 import org.apache.axiom.om.impl.common.AxiomCDATASection;
@@ -55,29 +58,42 @@ import org.apache.axiom.om.impl.common.P
 import org.apache.axiom.om.impl.common.TextContent;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 
-public aspect AxiomNodeFactorySupport {
-    public final OMNamespace AxiomNodeFactory.createOMNamespace(String uri, String prefix) {
+public class OMFactoryImpl implements OMFactoryEx {
+    protected final OMMetaFactory metaFactory;
+    protected final NodeFactory nodeFactory;
+    
+    public OMFactoryImpl(OMMetaFactory metaFactory, NodeFactory nodeFactory) {
+        this.metaFactory = metaFactory;
+        // TODO: this is a hack to support fom-impl; find a better solution
+        this.nodeFactory = nodeFactory == null ? (NodeFactory)this : nodeFactory;
+    }
+
+    public final OMMetaFactory getMetaFactory() {
+        return metaFactory;
+    }
+
+    public final OMNamespace createOMNamespace(String uri, String prefix) {
         return new OMNamespaceImpl(uri, prefix);
     }
     
-    public final OMDocument AxiomNodeFactory.createOMDocument() {
-        return createNode(AxiomDocument.class);
+    public final OMDocument createOMDocument() {
+        return nodeFactory.createNode(AxiomDocument.class);
     }
 
-    public final OMDocument AxiomNodeFactory.createOMDocument(OMXMLParserWrapper builder) {
-        AxiomDocument document = createNode(AxiomDocument.class);
+    public final OMDocument createOMDocument(OMXMLParserWrapper builder) {
+        AxiomDocument document = nodeFactory.createNode(AxiomDocument.class);
         document.coreSetBuilder(builder);
         return document;
     }
 
-    public final OMDocType AxiomNodeFactory.createOMDocType(OMContainer parent, String rootName,
+    public final OMDocType createOMDocType(OMContainer parent, String rootName,
             String publicId, String systemId, String internalSubset) {
         return createOMDocType(parent, rootName, publicId, systemId, internalSubset, false);
     }
 
-    public final OMDocType AxiomNodeFactory.createOMDocType(OMContainer parent, String rootName,
+    public final OMDocType createOMDocType(OMContainer parent, String rootName,
             String publicId, String systemId, String internalSubset, boolean fromBuilder) {
-        AxiomDocType node = createNode(AxiomDocType.class);
+        AxiomDocType node = nodeFactory.createNode(AxiomDocType.class);
         node.coreSetRootName(rootName);
         node.coreSetPublicId(publicId);
         node.coreSetSystemId(systemId);
@@ -88,21 +104,21 @@ public aspect AxiomNodeFactorySupport {
         return node;
     }
 
-    private AxiomText AxiomNodeFactory.createAxiomText(OMContainer parent, Object content, int type, boolean fromBuilder) {
+    private AxiomText createAxiomText(OMContainer parent, Object content, int type, boolean fromBuilder) {
         AxiomText node;
         switch (type) {
             case OMNode.TEXT_NODE: {
-                node = createNode(AxiomCharacterDataNode.class);
+                node = nodeFactory.createNode(AxiomCharacterDataNode.class);
                 break;
             }
             case OMNode.SPACE_NODE: {
-                AxiomCharacterDataNode cdata = createNode(AxiomCharacterDataNode.class);
+                AxiomCharacterDataNode cdata = nodeFactory.createNode(AxiomCharacterDataNode.class);
                 cdata.coreSetIgnorable(true);
                 node = cdata;
                 break;
             }
             case OMNode.CDATA_SECTION_NODE: {
-                node = createNode(AxiomCDATASection.class);
+                node = nodeFactory.createNode(AxiomCDATASection.class);
                 break;
             }
             default:
@@ -115,31 +131,31 @@ public aspect AxiomNodeFactorySupport {
         return node;
     }
 
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, String text, int type, boolean fromBuilder) {
+    public final OMText createOMText(OMContainer parent, String text, int type, boolean fromBuilder) {
         return createAxiomText(parent, text, type, fromBuilder);
     }
     
-    public final OMText AxiomNodeFactory.createOMText(String s, int type) {
+    public final OMText createOMText(String s, int type) {
         return createAxiomText(null, s, type, false);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(String s) {
+    public final OMText createOMText(String s) {
         return createAxiomText(null, s, OMNode.TEXT_NODE, false);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, String text, int type) {
+    public final OMText createOMText(OMContainer parent, String text, int type) {
         return createAxiomText(parent, text, type, false);
     }
     
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, String text) {
+    public final OMText createOMText(OMContainer parent, String text) {
         return createAxiomText(parent, text, OMNode.TEXT_NODE, false);
     }
     
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, char[] charArray, int type) {
+    public final OMText createOMText(OMContainer parent, char[] charArray, int type) {
         return createAxiomText(parent, new String(charArray), type, false);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, QName text, int type) {
+    public final OMText createOMText(OMContainer parent, QName text, int type) {
         if (text == null) {
             throw new IllegalArgumentException("QName text arg cannot be null!");
         }
@@ -147,43 +163,43 @@ public aspect AxiomNodeFactorySupport {
         return createAxiomText(parent, ns == null ? text.getLocalPart() : ns.getPrefix() + ":" + text.getLocalPart(), type, false);
     }
     
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, QName text) {
+    public final OMText createOMText(OMContainer parent, QName text) {
         return createAxiomText(parent, text, OMNode.TEXT_NODE, false);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, String s, String mimeType, boolean optimize) {
+    public final OMText createOMText(OMContainer parent, String s, String mimeType, boolean optimize) {
         return createAxiomText(parent, new TextContent(s, mimeType, optimize), OMNode.TEXT_NODE, false);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(String s, String mimeType, boolean optimize) {
+    public final OMText createOMText(String s, String mimeType, boolean optimize) {
         return createOMText(null, s, mimeType, optimize);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, OMText source) {
+    public final OMText createOMText(OMContainer parent, OMText source) {
         // TODO: this doesn't necessarily produce a node with the expected OMFactory
         return (AxiomText)((AxiomText)source).coreClone(Policies.CLONE_POLICY, null, (AxiomContainer)parent);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(Object dataHandler, boolean optimize) {
+    public final OMText createOMText(Object dataHandler, boolean optimize) {
         return createOMText(null, dataHandler, optimize, false);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(OMContainer parent, Object dataHandler, boolean optimize, boolean fromBuilder) {
+    public final OMText createOMText(OMContainer parent, Object dataHandler, boolean optimize, boolean fromBuilder) {
         return createAxiomText(parent, new TextContent(dataHandler, optimize), OMNode.TEXT_NODE, fromBuilder);
     }
 
-    public final OMText AxiomNodeFactory.createOMText(String contentID, DataHandlerProvider dataHandlerProvider, boolean optimize) {
+    public final OMText createOMText(String contentID, DataHandlerProvider dataHandlerProvider, boolean optimize) {
         return createAxiomText(null, new TextContent(contentID, dataHandlerProvider, optimize), OMNode.TEXT_NODE, false);
     }
     
-    public final OMProcessingInstruction AxiomNodeFactory.createOMProcessingInstruction(
+    public final OMProcessingInstruction createOMProcessingInstruction(
             OMContainer parent, String piTarget, String piData) {
         return createOMProcessingInstruction(parent, piTarget, piData, false);
     }
 
-    public final OMProcessingInstruction AxiomNodeFactory.createOMProcessingInstruction(
+    public final OMProcessingInstruction createOMProcessingInstruction(
             OMContainer parent, String piTarget, String piData, boolean fromBuilder) {
-        AxiomProcessingInstruction node = createNode(AxiomProcessingInstruction.class);
+        AxiomProcessingInstruction node = nodeFactory.createNode(AxiomProcessingInstruction.class);
         node.coreSetTarget(piTarget);
         node.coreSetCharacterData(piData, Policies.DETACH_POLICY);
         if (parent != null) {
@@ -192,12 +208,12 @@ public aspect AxiomNodeFactorySupport {
         return node;
     }
 
-    public final OMEntityReference AxiomNodeFactory.createOMEntityReference(OMContainer parent, String name) {
+    public final OMEntityReference createOMEntityReference(OMContainer parent, String name) {
         return createOMEntityReference(parent, name, null, false);
     }
 
-    public final OMEntityReference AxiomNodeFactory.createOMEntityReference(OMContainer parent, String name, String replacementText, boolean fromBuilder) {
-        AxiomEntityReference node = createNode(AxiomEntityReference.class);
+    public final OMEntityReference createOMEntityReference(OMContainer parent, String name, String replacementText, boolean fromBuilder) {
+        AxiomEntityReference node = nodeFactory.createNode(AxiomEntityReference.class);
         node.coreSetName(name);
         node.coreSetReplacementText(replacementText);
         if (parent != null) {
@@ -206,12 +222,12 @@ public aspect AxiomNodeFactorySupport {
         return node;
     }
 
-    public final OMComment AxiomNodeFactory.createOMComment(OMContainer parent, String content) {
+    public final OMComment createOMComment(OMContainer parent, String content) {
         return createOMComment(parent, content, false);
     }
 
-    public final OMComment AxiomNodeFactory.createOMComment(OMContainer parent, String content, boolean fromBuilder) {
-        AxiomComment node = createNode(AxiomComment.class);
+    public final OMComment createOMComment(OMContainer parent, String content, boolean fromBuilder) {
+        AxiomComment node = nodeFactory.createNode(AxiomComment.class);
         node.coreSetCharacterData(content, Policies.DETACH_POLICY);
         if (parent != null) {
             ((OMContainerEx)parent).addChild(node, fromBuilder);
@@ -219,14 +235,14 @@ public aspect AxiomNodeFactorySupport {
         return node;
     }
     
-    public final OMElement AxiomNodeFactory.createOMElement(String localName, OMNamespace ns) {
+    public final OMElement createOMElement(String localName, OMNamespace ns) {
         return createOMElement(localName, ns, null);
     }
 
-    public final <T extends AxiomElement> T AxiomNodeFactory.createAxiomElement(Class<T> type,
+    public final <T extends AxiomElement> T createAxiomElement(Class<T> type,
             OMContainer parent, String localName, OMNamespace ns, OMXMLParserWrapper builder,
             boolean generateNSDecl) {
-        T element = createNode(type);
+        T element = nodeFactory.createNode(type);
         element.coreSetBuilder(builder);
         if (parent != null) {
             ((AxiomContainer)parent).addChild(element, builder != null);
@@ -235,17 +251,17 @@ public aspect AxiomNodeFactorySupport {
         return element;
     }
 
-    public final OMElement AxiomNodeFactory.createOMElement(String localName, OMNamespace ns, OMContainer parent) {
+    public final OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) {
         return createAxiomElement(AxiomElement.class, parent, localName, ns, null, true);
     }
 
-    public final OMElement AxiomNodeFactory.createOMElement(String localName, OMContainer parent,
+    public final OMElement createOMElement(String localName, OMContainer parent,
             OMXMLParserWrapper builder) {
         return createAxiomElement(AxiomElement.class, parent, localName, null, builder, false);
     }
     
-    public final OMElement AxiomNodeFactory.createOMElement(QName qname, OMContainer parent) {
-        AxiomElement element = createNode(AxiomElement.class);
+    public final OMElement createOMElement(QName qname, OMContainer parent) {
+        AxiomElement element = nodeFactory.createNode(AxiomElement.class);
         if (parent != null) {
             parent.addChild(element);
         }
@@ -275,11 +291,11 @@ public aspect AxiomNodeFactorySupport {
         return element;
     }
 
-    public final OMElement AxiomNodeFactory.createOMElement(QName qname) {
+    public final OMElement createOMElement(QName qname) {
         return createOMElement(qname, null);
     }
     
-    public final OMElement AxiomNodeFactory.createOMElement(String localName, String namespaceURI, String prefix) {
+    public final OMElement createOMElement(String localName, String namespaceURI, String prefix) {
         if (namespaceURI == null) {
             throw new IllegalArgumentException("namespaceURI must not be null");
         } else if (namespaceURI.length() == 0) {
@@ -292,25 +308,25 @@ public aspect AxiomNodeFactorySupport {
         }
     }
 
-    public final OMSourcedElement AxiomNodeFactory.createOMElement(OMDataSource source) {
-        AxiomSourcedElement element = createNode(AxiomSourcedElement.class);
+    public final OMSourcedElement createOMElement(OMDataSource source) {
+        AxiomSourcedElement element = nodeFactory.createNode(AxiomSourcedElement.class);
         element.init(source);
         return element;
     }
 
-    public final OMSourcedElement AxiomNodeFactory.createOMElement(OMDataSource source, String localName, OMNamespace ns) {
-        AxiomSourcedElement element = createNode(AxiomSourcedElement.class);
+    public final OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
+        AxiomSourcedElement element = nodeFactory.createNode(AxiomSourcedElement.class);
         element.init(localName, ns, source);
         return element;
     }
 
-    public final OMSourcedElement AxiomNodeFactory.createOMElement(OMDataSource source, QName qname) {
-        AxiomSourcedElement element = createNode(AxiomSourcedElement.class);
+    public final OMSourcedElement createOMElement(OMDataSource source, QName qname) {
+        AxiomSourcedElement element = nodeFactory.createNode(AxiomSourcedElement.class);
         element.init(qname, source);
         return element;
     }
 
-    public final OMAttribute AxiomNodeFactory.createOMAttribute(String localName, OMNamespace ns, String value) {
+    public final OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) {
         if (ns != null && ns.getPrefix() == null) {
             String namespaceURI = ns.getNamespaceURI();
             if (namespaceURI.length() == 0) {
@@ -330,7 +346,7 @@ public aspect AxiomNodeFactorySupport {
                 throw new IllegalArgumentException("Cannot create an unprefixed attribute with a namespace");
             }
         }
-        AxiomAttribute attr = createNode(AxiomAttribute.class);
+        AxiomAttribute attr = nodeFactory.createNode(AxiomAttribute.class);
         attr.internalSetLocalName(localName);
         attr.coreSetCharacterData(value, Policies.DETACH_POLICY);
         attr.internalSetNamespace(ns);
@@ -339,7 +355,7 @@ public aspect AxiomNodeFactorySupport {
     }
 
     // <old-and-buggy-code>
-    public final OMNode AxiomNodeFactory.importNode(OMNode child) {
+    public final OMNode importNode(OMNode child) {
         int type = child.getType();
         switch (type) {
             case OMNode.ELEMENT_NODE: {

Copied: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP11Factory.java (from r1701662, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP11FactorySupport.aj)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP11Factory.java?p2=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP11Factory.java&p1=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP11FactorySupport.aj&r1=1701662&r2=1703455&rev=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP11FactorySupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP11Factory.java Wed Sep 16 19:48:59 2015
@@ -18,6 +18,8 @@
  */
 package org.apache.axiom.soap.impl.common;
 
+import org.apache.axiom.core.NodeFactory;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultCode;
@@ -27,52 +29,56 @@ import org.apache.axiom.soap.SOAPFaultSu
 import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.SOAPFaultValue;
 
-public aspect AxiomSOAP11FactorySupport {
-    public final SOAPHelper AxiomSOAP11Factory.getSOAPHelper() {
+public class SOAP11Factory extends SOAPFactoryImpl {
+    public SOAP11Factory(OMMetaFactory metaFactory, NodeFactory nodeFactory) {
+        super(metaFactory, nodeFactory);
+    }
+
+    public final SOAPHelper getSOAPHelper() {
         return SOAPHelper.SOAP11;
     }
 
-    public final SOAPFaultValue AxiomSOAP11Factory.createSOAPFaultValue(SOAPFaultCode parent) {
+    public final SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultValue AxiomSOAP11Factory.createSOAPFaultValue(SOAPFaultSubCode parent) {
+    public final SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultValue AxiomSOAP11Factory.createSOAPFaultValue() {
+    public final SOAPFaultValue createSOAPFaultValue() {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultSubCode AxiomSOAP11Factory.createSOAPFaultSubCode(SOAPFaultCode parent) {
+    public final SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultSubCode AxiomSOAP11Factory.createSOAPFaultSubCode(SOAPFaultSubCode parent) {
+    public final SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultSubCode AxiomSOAP11Factory.createSOAPFaultSubCode() {
+    public final SOAPFaultSubCode createSOAPFaultSubCode() {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultText AxiomSOAP11Factory.createSOAPFaultText(SOAPFaultReason parent) {
+    public final SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultText AxiomSOAP11Factory.createSOAPFaultText() {
+    public final SOAPFaultText createSOAPFaultText() {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultNode AxiomSOAP11Factory.createSOAPFaultNode(SOAPFault parent) {
+    public final SOAPFaultNode createSOAPFaultNode(SOAPFault parent) {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPFaultNode AxiomSOAP11Factory.createSOAPFaultNode() {
+    public final SOAPFaultNode createSOAPFaultNode() {
         throw new UnsupportedOperationException();
     }
 
-    public final SOAPEnvelope AxiomSOAP11Factory.getDefaultFaultEnvelope() {
+    public final SOAPEnvelope getDefaultFaultEnvelope() {
         SOAPEnvelope defaultEnvelope = getDefaultEnvelope();
         SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());
         createSOAPFaultCode(fault);

Copied: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP12Factory.java (from r1701662, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP12FactorySupport.aj)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP12Factory.java?p2=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP12Factory.java&p1=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP12FactorySupport.aj&r1=1701662&r2=1703455&rev=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAP12FactorySupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAP12Factory.java Wed Sep 16 19:48:59 2015
@@ -18,6 +18,8 @@
  */
 package org.apache.axiom.soap.impl.common;
 
+import org.apache.axiom.core.NodeFactory;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -29,85 +31,90 @@ import org.apache.axiom.soap.SOAPFaultRe
 import org.apache.axiom.soap.SOAPFaultSubCode;
 import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.SOAPFaultValue;
+import org.apache.axiom.soap.impl.builder.SOAP12FactoryEx;
 
-public aspect AxiomSOAP12FactorySupport {
-    public final SOAPHelper AxiomSOAP12Factory.getSOAPHelper() {
+public class SOAP12Factory extends SOAPFactoryImpl implements SOAP12FactoryEx {
+    public SOAP12Factory(OMMetaFactory metaFactory, NodeFactory nodeFactory) {
+        super(metaFactory, nodeFactory);
+    }
+
+    public final SOAPHelper getSOAPHelper() {
         return SOAPHelper.SOAP12;
     }
 
-    private SOAPFaultValue AxiomSOAP12Factory.internalCreateSOAPFaultValue(SOAPFaultClassifier parent, OMXMLParserWrapper builder) {
+    private SOAPFaultValue internalCreateSOAPFaultValue(SOAPFaultClassifier parent, OMXMLParserWrapper builder) {
         return createSOAPElement(AxiomSOAP12FaultValue.class, parent, SOAP12Constants.QNAME_FAULT_VALUE, builder);
     }
 
-    public final SOAPFaultValue AxiomSOAP12Factory.createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) {
         return internalCreateSOAPFaultValue(parent, builder);
     }
 
-    public final SOAPFaultValue AxiomSOAP12Factory.createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) {
         return internalCreateSOAPFaultValue(parent, builder);
     }
 
-    public final SOAPFaultValue AxiomSOAP12Factory.createSOAPFaultValue(SOAPFaultCode parent) {
+    public final SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) {
         return internalCreateSOAPFaultValue(parent, null);
     }
 
-    public final SOAPFaultValue AxiomSOAP12Factory.createSOAPFaultValue(SOAPFaultSubCode parent) {
+    public final SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) {
         return internalCreateSOAPFaultValue(parent, null);
     }
 
-    public final SOAPFaultValue AxiomSOAP12Factory.createSOAPFaultValue() {
+    public final SOAPFaultValue createSOAPFaultValue() {
         return internalCreateSOAPFaultValue(null, null);
     }
 
-    private SOAPFaultSubCode AxiomSOAP12Factory.internalCreateSOAPFaultSubCode(SOAPFaultClassifier parent, OMXMLParserWrapper builder) {
+    private SOAPFaultSubCode internalCreateSOAPFaultSubCode(SOAPFaultClassifier parent, OMXMLParserWrapper builder) {
         return createSOAPElement(AxiomSOAP12FaultSubCode.class, parent, SOAP12Constants.QNAME_FAULT_SUBCODE, builder);
     }
 
-    public final SOAPFaultSubCode AxiomSOAP12Factory.createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) {
         return internalCreateSOAPFaultSubCode(parent, builder);
     }
 
-    public final SOAPFaultSubCode AxiomSOAP12Factory.createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) {
         return internalCreateSOAPFaultSubCode(parent, builder);
     }
 
-    public final SOAPFaultSubCode AxiomSOAP12Factory.createSOAPFaultSubCode(SOAPFaultCode parent) {
+    public final SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) {
         return internalCreateSOAPFaultSubCode(parent, null);
     }
 
-    public final SOAPFaultSubCode AxiomSOAP12Factory.createSOAPFaultSubCode(SOAPFaultSubCode parent) {
+    public final SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) {
         return internalCreateSOAPFaultSubCode(parent, null);
     }
 
-    public final SOAPFaultSubCode AxiomSOAP12Factory.createSOAPFaultSubCode() {
+    public final SOAPFaultSubCode createSOAPFaultSubCode() {
         return internalCreateSOAPFaultSubCode(null, null);
     }
 
-    public final SOAPFaultText AxiomSOAP12Factory.createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) {
         return createSOAPElement(AxiomSOAP12FaultText.class, parent, SOAP12Constants.QNAME_FAULT_TEXT, builder);
     }
 
-    public final SOAPFaultText AxiomSOAP12Factory.createSOAPFaultText(SOAPFaultReason parent) {
+    public final SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) {
         return createSOAPFaultText(parent, null);
     }
 
-    public final SOAPFaultText AxiomSOAP12Factory.createSOAPFaultText() {
+    public final SOAPFaultText createSOAPFaultText() {
         return createSOAPFaultText(null, null);
     }
 
-    public final SOAPFaultNode AxiomSOAP12Factory.createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) {
         return createSOAPElement(AxiomSOAP12FaultNode.class, parent, SOAP12Constants.QNAME_FAULT_NODE, builder);
     }
 
-    public final SOAPFaultNode AxiomSOAP12Factory.createSOAPFaultNode(SOAPFault parent) {
+    public final SOAPFaultNode createSOAPFaultNode(SOAPFault parent) {
         return createSOAPFaultNode(parent, null);
     }
 
-    public final SOAPFaultNode AxiomSOAP12Factory.createSOAPFaultNode() {
+    public final SOAPFaultNode createSOAPFaultNode() {
         return createSOAPFaultNode(null, null);
     }
 
-    public final SOAPEnvelope AxiomSOAP12Factory.getDefaultFaultEnvelope() {
+    public final SOAPEnvelope getDefaultFaultEnvelope() {
         SOAPEnvelope defaultEnvelope = getDefaultEnvelope();
         SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());
         SOAPFaultCode faultCode = createSOAPFaultCode(fault);

Copied: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java (from r1703275, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java?p2=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java&p1=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj&r1=1703275&r2=1703455&rev=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java Wed Sep 16 19:48:59 2015
@@ -20,11 +20,14 @@ package org.apache.axiom.soap.impl.commo
 
 import javax.xml.namespace.QName;
 
+import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.om.OMDataSource;
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.common.AxiomContainer;
+import org.apache.axiom.om.impl.common.factory.OMFactoryImpl;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPConstants;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -37,22 +40,29 @@ import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axiom.soap.SOAPMessage;
 import org.apache.axiom.soap.SOAPVersion;
+import org.apache.axiom.soap.impl.builder.SOAPFactoryEx;
 
-public aspect AxiomSOAPFactorySupport {
-    public final String AxiomSOAPFactory.getSoapVersionURI() {
+public abstract class SOAPFactoryImpl extends OMFactoryImpl implements SOAPFactoryEx {
+    public SOAPFactoryImpl(OMMetaFactory metaFactory, NodeFactory nodeFactory) {
+        super(metaFactory, nodeFactory);
+    }
+    
+    protected abstract SOAPHelper getSOAPHelper();
+
+    public final String getSoapVersionURI() {
         return getSOAPHelper().getEnvelopeURI();
     }
 
-    public final SOAPVersion AxiomSOAPFactory.getSOAPVersion() {
+    public final SOAPVersion getSOAPVersion() {
         return getSOAPHelper().getVersion();
     }
     
-    public final OMNamespace AxiomSOAPFactory.getNamespace() {
+    public final OMNamespace getNamespace() {
         return getSOAPHelper().getNamespace();
     }
     
-    public final <T extends AxiomSOAPElement> T AxiomSOAPFactory.createSOAPElement(Class<T> type, OMElement parent, QName qname, OMXMLParserWrapper builder) {
-        T element = createNode(type);
+    public final <T extends AxiomSOAPElement> T createSOAPElement(Class<T> type, OMElement parent, QName qname, OMXMLParserWrapper builder) {
+        T element = nodeFactory.createNode(type);
         if (builder != null) {
             element.coreSetBuilder(builder);
         } else if (parent != null) {
@@ -73,14 +83,14 @@ public aspect AxiomSOAPFactorySupport {
         return element;
     }
 
-    public final SOAPMessage AxiomSOAPFactory.createSOAPMessage() {
-        AxiomSOAPMessage message = createNode(AxiomSOAPMessage.class);
+    public final SOAPMessage createSOAPMessage() {
+        AxiomSOAPMessage message = nodeFactory.createNode(AxiomSOAPMessage.class);
         message.initSOAPFactory(this);
         return message;
     }
 
-    public final SOAPMessage AxiomSOAPFactory.createSOAPMessage(OMXMLParserWrapper builder) {
-        AxiomSOAPMessage message = createNode(AxiomSOAPMessage.class);
+    public final SOAPMessage createSOAPMessage(OMXMLParserWrapper builder) {
+        AxiomSOAPMessage message = nodeFactory.createNode(AxiomSOAPMessage.class);
         message.initSOAPFactory(this);
         // Null check for Spring-WS compatibility
         if (builder != null) {
@@ -89,140 +99,140 @@ public aspect AxiomSOAPFactorySupport {
         return message;
     }
     
-    public final SOAPEnvelope AxiomSOAPFactory.createSOAPEnvelope() {
+    public final SOAPEnvelope createSOAPEnvelope() {
         return createSOAPEnvelope(getNamespace());
     }
     
-    public final SOAPEnvelope AxiomSOAPFactory.createSOAPEnvelope(OMNamespace ns) {
+    public final SOAPEnvelope createSOAPEnvelope(OMNamespace ns) {
         return createAxiomElement(getSOAPHelper().getEnvelopeClass(), null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, null, true);
     }
 
-    public final SOAPEnvelope AxiomSOAPFactory.createSOAPEnvelope(SOAPMessage message, OMXMLParserWrapper builder) {
+    public final SOAPEnvelope createSOAPEnvelope(SOAPMessage message, OMXMLParserWrapper builder) {
         return createAxiomElement(getSOAPHelper().getEnvelopeClass(), message, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, null, builder, false);
     }
 
-    public final SOAPHeader AxiomSOAPFactory.createSOAPHeader(SOAPEnvelope parent, OMXMLParserWrapper builder) {
+    public final SOAPHeader createSOAPHeader(SOAPEnvelope parent, OMXMLParserWrapper builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getHeaderClass(), parent, helper.getHeaderQName(), builder);
     }
 
-    public final SOAPHeader AxiomSOAPFactory.createSOAPHeader(SOAPEnvelope parent) {
+    public final SOAPHeader createSOAPHeader(SOAPEnvelope parent) {
         return createSOAPHeader(parent, null);
     }
 
-    public final SOAPHeader AxiomSOAPFactory.createSOAPHeader() {
+    public final SOAPHeader createSOAPHeader() {
         return createSOAPHeader(null, null);
     }
 
-    public final SOAPHeaderBlock AxiomSOAPFactory.createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) {
+    public final SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) {
         return createAxiomElement(getSOAPHelper().getHeaderBlockClass(), parent, localName, ns, null, true);
     }
 
-    public final SOAPHeaderBlock AxiomSOAPFactory.createSOAPHeaderBlock(String localName, OMNamespace ns) {
+    public final SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) {
         return createAxiomElement(getSOAPHelper().getHeaderBlockClass(), null, localName, ns, null, true);
     }
 
-    public final SOAPHeaderBlock AxiomSOAPFactory.createSOAPHeaderBlock(String localName, SOAPHeader parent, OMXMLParserWrapper builder) {
+    public final SOAPHeaderBlock createSOAPHeaderBlock(String localName, SOAPHeader parent, OMXMLParserWrapper builder) {
         return createAxiomElement(getSOAPHelper().getHeaderBlockClass(), parent, localName, null, builder, false);
     }
 
-    public final SOAPHeaderBlock AxiomSOAPFactory.createSOAPHeaderBlock(OMDataSource source) {
-        AxiomSOAPHeaderBlock element = createNode(getSOAPHelper().getHeaderBlockClass());
+    public final SOAPHeaderBlock createSOAPHeaderBlock(OMDataSource source) {
+        AxiomSOAPHeaderBlock element = nodeFactory.createNode(getSOAPHelper().getHeaderBlockClass());
         element.init(source);
         return element;
     }
 
-    public final SOAPHeaderBlock AxiomSOAPFactory.createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource ds) {
-        AxiomSOAPHeaderBlock element = createNode(getSOAPHelper().getHeaderBlockClass());
+    public final SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource ds) {
+        AxiomSOAPHeaderBlock element = nodeFactory.createNode(getSOAPHelper().getHeaderBlockClass());
         element.init(localName, ns, ds);
         return element;
     }
 
-    public final SOAPBody AxiomSOAPFactory.createSOAPBody(SOAPEnvelope parent, OMXMLParserWrapper builder) {
+    public final SOAPBody createSOAPBody(SOAPEnvelope parent, OMXMLParserWrapper builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getBodyClass(), parent, helper.getBodyQName(), builder);
     }
 
-    public final SOAPBody AxiomSOAPFactory.createSOAPBody(SOAPEnvelope parent) {
+    public final SOAPBody createSOAPBody(SOAPEnvelope parent) {
         return createSOAPBody(parent, null);
     }
 
-    public final SOAPBody AxiomSOAPFactory.createSOAPBody() {
+    public final SOAPBody createSOAPBody() {
         return createSOAPBody(null, null);
     }
 
-    public final SOAPFault AxiomSOAPFactory.createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) {
+    public final SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getFaultClass(), parent, helper.getFaultQName(), builder);
     }
 
-    public final SOAPFault AxiomSOAPFactory.createSOAPFault(SOAPBody parent) {
+    public final SOAPFault createSOAPFault(SOAPBody parent) {
         return createSOAPFault(parent, (OMXMLParserWrapper)null);
     }
 
-    public final SOAPFault AxiomSOAPFactory.createSOAPFault() {
+    public final SOAPFault createSOAPFault() {
         return createSOAPFault(null, (OMXMLParserWrapper)null);
     }
 
-    public final SOAPFault AxiomSOAPFactory.createSOAPFault(SOAPBody parent, Exception e) {
+    public final SOAPFault createSOAPFault(SOAPBody parent, Exception e) {
         SOAPFault fault = createSOAPFault(parent, (OMXMLParserWrapper)null);
         fault.setException(e);
         return fault;
     }
 
-    public final SOAPFaultCode AxiomSOAPFactory.createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getFaultCodeClass(), parent, helper.getFaultCodeQName(), builder);
     }
 
-    public final SOAPFaultCode AxiomSOAPFactory.createSOAPFaultCode(SOAPFault parent) {
+    public final SOAPFaultCode createSOAPFaultCode(SOAPFault parent) {
         return createSOAPFaultCode(parent, null);
     }
 
-    public final SOAPFaultCode AxiomSOAPFactory.createSOAPFaultCode() {
+    public final SOAPFaultCode createSOAPFaultCode() {
         return createSOAPFaultCode(null, null);
     }
 
-    public final SOAPFaultReason AxiomSOAPFactory.createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getFaultReasonClass(), parent, helper.getFaultReasonQName(), builder);
     }
 
-    public final SOAPFaultReason AxiomSOAPFactory.createSOAPFaultReason(SOAPFault parent) {
+    public final SOAPFaultReason createSOAPFaultReason(SOAPFault parent) {
         return createSOAPFaultReason(parent, null);
     }
 
-    public final SOAPFaultReason AxiomSOAPFactory.createSOAPFaultReason() {
+    public final SOAPFaultReason createSOAPFaultReason() {
         return createSOAPFaultReason(null, null);
     }
 
-    public final SOAPFaultRole AxiomSOAPFactory.createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getFaultRoleClass(), parent, helper.getFaultRoleQName(), builder);
     }
 
-    public final SOAPFaultRole AxiomSOAPFactory.createSOAPFaultRole(SOAPFault parent) {
+    public final SOAPFaultRole createSOAPFaultRole(SOAPFault parent) {
         return createSOAPFaultRole(parent, null);
     }
 
-    public final SOAPFaultRole AxiomSOAPFactory.createSOAPFaultRole() {
+    public final SOAPFaultRole createSOAPFaultRole() {
         return createSOAPFaultRole(null, null);
     }
 
-    public final SOAPFaultDetail AxiomSOAPFactory.createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) {
+    public final SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getFaultDetailClass(), parent, helper.getFaultDetailQName(), builder);
     }
 
-    public final SOAPFaultDetail AxiomSOAPFactory.createSOAPFaultDetail(SOAPFault parent) {
+    public final SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) {
         return createSOAPFaultDetail(parent, null);
     }
 
-    public final SOAPFaultDetail AxiomSOAPFactory.createSOAPFaultDetail() {
+    public final SOAPFaultDetail createSOAPFaultDetail() {
         return createSOAPFaultDetail(null, null);
     }
 
-    public final SOAPMessage AxiomSOAPFactory.createDefaultSOAPMessage() {
+    public final SOAPMessage createDefaultSOAPMessage() {
         SOAPMessage message = createSOAPMessage();
         SOAPEnvelope env = createSOAPEnvelope();
         message.addChild(env);
@@ -230,7 +240,7 @@ public aspect AxiomSOAPFactorySupport {
         return message;
     }
     
-    public final SOAPEnvelope AxiomSOAPFactory.getDefaultEnvelope() {
+    public final SOAPEnvelope getDefaultEnvelope() {
         SOAPEnvelope env = createSOAPEnvelope();
         createSOAPHeader(env);
         createSOAPBody(env);

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/AttributeHelper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/AttributeHelper.java?rev=1703455&r1=1703454&r2=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/AttributeHelper.java (original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/AttributeHelper.java Wed Sep 16 19:48:59 2015
@@ -35,7 +35,7 @@ public class AttributeHelper {
      */
     public static void importOMAttribute(OMAttribute omAttribute, OMElement omElement) {
         // first check whether the given OMAttribute has the same OMFactory
-        if (omAttribute.getOMFactory().getClass().isInstance(omElement.getOMFactory())) {
+        if (omAttribute.getOMFactory().getMetaFactory() == omElement.getOMFactory().getMetaFactory()) {
             omElement.addAttribute(omAttribute);
         } else {
             OMNamespace ns = omAttribute.getNamespace();

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java?rev=1703455&r1=1703454&r2=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java (original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java Wed Sep 16 19:48:59 2015
@@ -169,7 +169,7 @@ public class ElementHelper {
      */
     public static OMElement importOMElement(OMElement omElement, OMFactory omFactory) {
         // first check whether the given OMElement has the same omFactory
-        if (omElement.getOMFactory().getClass().isInstance(omFactory)) {
+        if (omElement.getOMFactory().getMetaFactory() == omFactory.getMetaFactory()) {
             return omElement;
         } else {
             OMElement documentElement = omFactory.getMetaFactory().createStAXOMBuilder(

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java?rev=1703455&r1=1703454&r2=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java (original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java Wed Sep 16 19:48:59 2015
@@ -24,11 +24,12 @@ import javax.xml.parsers.DocumentBuilder
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.dom.DOMMetaFactory;
 import org.apache.axiom.om.impl.common.factory.AbstractOMMetaFactory;
+import org.apache.axiom.om.impl.common.factory.OMFactoryImpl;
 import org.apache.axiom.om.impl.dom.jaxp.DOOMDocumentBuilderFactory;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.common.AxiomSOAPMessage;
-import org.apache.axiom.soap.impl.dom.soap11.SOAP11Factory;
-import org.apache.axiom.soap.impl.dom.soap12.SOAP12Factory;
+import org.apache.axiom.soap.impl.common.SOAP11Factory;
+import org.apache.axiom.soap.impl.common.SOAP12Factory;
 import org.w3c.dom.DOMImplementation;
 
 /**
@@ -37,9 +38,9 @@ import org.w3c.dom.DOMImplementation;
 public class OMDOMMetaFactory extends AbstractOMMetaFactory implements DOMMetaFactory {
     public static final OMDOMMetaFactory INSTANCE = new OMDOMMetaFactory();
     
-    private final OMDOMFactory omFactory = new OMDOMFactory(this);
-    private final SOAPFactory soap11Factory = new SOAP11Factory(this);
-    private final SOAPFactory soap12Factory = new SOAP12Factory(this);
+    private final OMFactory omFactory = new OMFactoryImpl(this, DOOMNodeFactory.INSTANCE);
+    private final SOAPFactory soap11Factory = new SOAP11Factory(this, DOOMNodeFactory.INSTANCE);
+    private final SOAPFactory soap12Factory = new SOAP12Factory(this, DOOMNodeFactory.INSTANCE);
 
     private OMDOMMetaFactory() {}
     
@@ -64,6 +65,6 @@ public class OMDOMMetaFactory extends Ab
     }
 
     public DOMImplementation getDOMImplementation() {
-        return omFactory;
+        return DOOMNodeFactory.INSTANCE;
     }
 }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java?rev=1703455&r1=1703454&r2=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java (original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java Wed Sep 16 19:48:59 2015
@@ -21,10 +21,11 @@ package org.apache.axiom.om.impl.llom.fa
 
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.factory.AbstractOMMetaFactory;
+import org.apache.axiom.om.impl.common.factory.OMFactoryImpl;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.common.AxiomSOAPMessage;
-import org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory;
-import org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory;
+import org.apache.axiom.soap.impl.common.SOAP11Factory;
+import org.apache.axiom.soap.impl.common.SOAP12Factory;
 
 /**
  * Meta factory for the linked list OM implementation.
@@ -32,9 +33,9 @@ import org.apache.axiom.soap.impl.llom.s
 public class OMLinkedListMetaFactory extends AbstractOMMetaFactory {
     public static final OMLinkedListMetaFactory INSTANCE = new OMLinkedListMetaFactory();
     
-    private final OMFactory omFactory = new OMLinkedListImplFactory(this);
-    private final SOAPFactory soap11Factory = new SOAP11Factory(this);
-    private final SOAPFactory soap12Factory = new SOAP12Factory(this);
+    private final OMFactory omFactory = new OMFactoryImpl(this, LLOMNodeFactory.INSTANCE);
+    private final SOAPFactory soap11Factory = new SOAP11Factory(this, LLOMNodeFactory.INSTANCE);
+    private final SOAPFactory soap12Factory = new SOAP12Factory(this, LLOMNodeFactory.INSTANCE);
     
     private OMLinkedListMetaFactory() {}
     

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?rev=1703455&r1=1703454&r2=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java Wed Sep 16 19:48:59 2015
@@ -67,11 +67,11 @@ import org.apache.axiom.core.CoreNSAware
 import org.apache.axiom.core.CoreNamespaceDeclaration;
 import org.apache.axiom.core.CoreNode;
 import org.apache.axiom.core.CoreProcessingInstruction;
+import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.fom.AbderaFactory;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.common.AxiomAttribute;
 import org.apache.axiom.om.impl.common.AxiomCDATASection;
@@ -83,10 +83,10 @@ import org.apache.axiom.om.impl.common.A
 import org.apache.axiom.om.impl.common.AxiomEntityReference;
 import org.apache.axiom.om.impl.common.AxiomNamespaceDeclaration;
 import org.apache.axiom.om.impl.common.AxiomProcessingInstruction;
-import org.apache.axiom.om.impl.common.factory.AxiomNodeFactory;
+import org.apache.axiom.om.impl.common.factory.OMFactoryImpl;
 
 @SuppressWarnings( {"unchecked", "deprecation"})
-public class FOMFactory implements AbderaFactory, AxiomNodeFactory, Constants, ExtensionFactory {
+public class FOMFactory extends OMFactoryImpl implements AbderaFactory, NodeFactory, Constants, ExtensionFactory {
     private static final Map<QName,Class<? extends FOMElement>> elementTypeMap;
     
     static {
@@ -138,6 +138,7 @@ public class FOMFactory implements Abder
     }
 
     public FOMFactory(Abdera abdera) {
+        super(FOMMetaFactory.INSTANCE, null);
         List<ExtensionFactory> f = abdera.getConfiguration().getExtensionFactories();
         factoriesMap =
             new ExtensionFactoryMap((f != null) ? new ArrayList<ExtensionFactory>(f)
@@ -145,10 +146,6 @@ public class FOMFactory implements Abder
         this.abdera = abdera;
     }
 
-    public OMMetaFactory getMetaFactory() {
-        return FOMMetaFactory.INSTANCE;
-    }
-
     public Parser newParser() {
         return new FOMParser(abdera);
     }

Modified: webservices/axiom/trunk/systests/old-tests/src/test/java/org/apache/axiom/om/util/OMElementHelperTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/old-tests/src/test/java/org/apache/axiom/om/util/OMElementHelperTest.java?rev=1703455&r1=1703454&r2=1703455&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/old-tests/src/test/java/org/apache/axiom/om/util/OMElementHelperTest.java (original)
+++ webservices/axiom/trunk/systests/old-tests/src/test/java/org/apache/axiom/om/util/OMElementHelperTest.java Wed Sep 16 19:48:59 2015
@@ -42,8 +42,8 @@ public class OMElementHelperTest extends
         OMElement importedElement = ElementHelper
                 .importOMElement(documentElement, OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM).getOMFactory());
         assertTrue(importedElement != documentElement);
-        assertTrue(importedElement.getOMFactory().getClass().isInstance(
-                OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM).getOMFactory()));
+        assertTrue(importedElement.getOMFactory() ==
+                OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM).getOMFactory());
         
         documentElement.close(false);
     }



Mime
View raw message