ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1704071 - 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/fom-aspects/src/main/java/org/apache/axiom/fom/ aspects/om-aspects/src/main/ja...
Date Sat, 19 Sep 2015 17:45:34 GMT
Author: veithen
Date: Sat Sep 19 17:45:33 2015
New Revision: 1704071

URL: http://svn.apache.org/viewvc?rev=1704071&view=rev
Log:
Make the NodeFactory implementation in FOM a singleton.

Added:
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/impl/
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/impl/FOMNodeFactory.java   (with props)
Modified:
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/AttributeMatcher.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElementSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNodeSupport.aj
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java
    webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java
    webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java
    webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaNodeSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAbstractAttribute.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAttribute.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMChildNode.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocType.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntityReference.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMInformationItem.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLink.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMNamespaceDeclaration.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSerializable.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMService.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMText.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
    webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/AttributeMatcher.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/AttributeMatcher.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/AttributeMatcher.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/AttributeMatcher.java Sat Sep 19 17:45:33 2015
@@ -70,8 +70,8 @@ public interface AttributeMatcher {
      * <code>prefix</code> and <code>value</code> parameters are those passed to
      * {@link CoreElement#coreSetAttribute(AttributeMatcher, String, String, String, String)}.
      * 
-     * @param nodeFactory
-     *            the node factory the should be used to create the attribute
+     * @param element
+     *            the instance to be used to invoke {@link CoreNode#coreCreateNode(Class)}
      * @param namespaceURI
      *            see above
      * @param name
@@ -82,7 +82,7 @@ public interface AttributeMatcher {
      *            see above
      * @return
      */
-    CoreAttribute createAttribute(NodeFactory nodeFactory, String namespaceURI, String name, String prefix, String value);
+    CoreAttribute createAttribute(CoreElement element, String namespaceURI, String name, String prefix, String value);
     
     /**
      * Update an existing attribute. The values of the <code>prefix</code> and <code>value</code>

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElementSupport.aj?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElementSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreElementSupport.aj Sat Sep 19 17:45:33 2015
@@ -118,7 +118,7 @@ public aspect CoreElementSupport {
             attr = attr.coreGetNextAttribute();
         }
         if (attr == null) {
-            CoreAttribute newAttr = matcher.createAttribute(coreGetNodeFactory(), namespaceURI, name, prefix, value);
+            CoreAttribute newAttr = matcher.createAttribute(this, namespaceURI, name, prefix, value);
             if (previousAttr == null) {
                 internalAppendAttribute(newAttr);
             } else {

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNode.java Sat Sep 19 17:45:33 2015
@@ -23,6 +23,8 @@ public interface CoreNode {
     
     NodeFactory coreGetNodeFactory();
     
+    <T extends CoreNode> T coreCreateNode(Class<T> type);
+    
     /**
      * Get the node type.
      * 

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNodeSupport.aj?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreNodeSupport.aj Sat Sep 19 17:45:33 2015
@@ -26,6 +26,15 @@ public aspect CoreNodeSupport {
         return coreGetNodeType().getInterface();
     }
     
+    public final <T extends CoreNode> T CoreNode.coreCreateNode(Class<T> type) {
+        T node = coreGetNodeFactory().createNode(type);
+        node.updateFiliation(this);
+        return node;
+    }
+    
+    public void CoreNode.updateFiliation(CoreNode creator) {
+    }
+    
     public abstract CoreNode CoreNode.getRootOrOwnerDocument();
 
     /**

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java Sat Sep 19 17:45:33 2015
@@ -84,8 +84,8 @@ public final class NSAwareAttributeMatch
         return ((CoreNSAwareAttribute)attr).coreGetLocalName();
     }
 
-    public CoreAttribute createAttribute(NodeFactory nodeFactory, String namespaceURI, String name, String prefix, String value) {
-        CoreNSAwareAttribute attr = nodeFactory.createNode(CoreNSAwareAttribute.class);
+    public CoreAttribute createAttribute(CoreElement element, String namespaceURI, String name, String prefix, String value) {
+        CoreNSAwareAttribute attr = element.coreCreateNode(CoreNSAwareAttribute.class);
         attr.coreSetName(namespaceURI, name, prefix);
         attr.coreSetCharacterData(value, null);
         return attr;

Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java Sat Sep 19 17:45:33 2015
@@ -49,8 +49,8 @@ public final class NamespaceDeclarationM
         }
     }
 
-    public CoreAttribute createAttribute(NodeFactory nodeFactory, String namespaceURI, String name, String prefix, String value) {
-        CoreNamespaceDeclaration decl = nodeFactory.createNode(CoreNamespaceDeclaration.class);
+    public CoreAttribute createAttribute(CoreElement element, String namespaceURI, String name, String prefix, String value) {
+        CoreNamespaceDeclaration decl = element.coreCreateNode(CoreNamespaceDeclaration.class);
         decl.coreSetDeclaredNamespace(name, value);
         return decl;
     }

Modified: webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java (original)
+++ webservices/axiom/trunk/aspects/dom-aspects/src/main/java/org/apache/axiom/dom/Policies.java Sat Sep 19 17:45:33 2015
@@ -22,13 +22,13 @@ import org.apache.axiom.core.AttributeMa
 import org.apache.axiom.core.ClonePolicy;
 import org.apache.axiom.core.CoreAttribute;
 import org.apache.axiom.core.CoreDocument;
+import org.apache.axiom.core.CoreElement;
 import org.apache.axiom.core.CoreNSUnawareAttribute;
 import org.apache.axiom.core.CoreNode;
 import org.apache.axiom.core.CoreParentNode;
 import org.apache.axiom.core.DetachPolicy;
 import org.apache.axiom.core.NSAwareAttributeMatcher;
 import org.apache.axiom.core.NamespaceDeclarationMatcher;
-import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.core.NodeMigrationPolicy;
 import org.apache.axiom.core.NodeType;
 
@@ -72,8 +72,8 @@ public final class Policies {
             return ((DOMAttribute)attr).getName();
         }
 
-        public CoreAttribute createAttribute(NodeFactory nodeFactory, String namespaceURI, String name, String prefix, String value) {
-            CoreNSUnawareAttribute attr = nodeFactory.createNode(CoreNSUnawareAttribute.class);
+        public CoreAttribute createAttribute(CoreElement element, String namespaceURI, String name, String prefix, String value) {
+            CoreNSUnawareAttribute attr = element.coreCreateNode(CoreNSUnawareAttribute.class);
             attr.coreSetName(name);
             attr.coreSetCharacterData(value, null);
             // TODO: set type?

Modified: webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaNodeSupport.aj?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/fom-aspects/src/main/java/org/apache/axiom/fom/AbderaNodeSupport.aj Sat Sep 19 17:45:33 2015
@@ -20,17 +20,30 @@ package org.apache.axiom.fom;
 
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
+import org.apache.axiom.core.CoreNode;
 
 public aspect AbderaNodeSupport {
-    public final Factory AbderaNode.getFactory() {
-        return (Factory)coreGetNodeFactory();
+    private AbderaFactory AbderaNode.factory;
+    
+    public final void AbderaNode.updateFiliation(CoreNode creator) {
+        setFactory(((AbderaNode)creator).factory);
+    }
+    
+    public final void AbderaNode.setFactory(AbderaFactory factory) {
+        if (this.factory != null) {
+            throw new IllegalStateException();
+        }
+        this.factory = factory;
     }
     
+    public final Factory AbderaNode.getFactory() {
+        return factory;
+    }
+
     public final Element AbderaNode.getWrapped(Element internal) {
         if (internal == null) {
             return null;
         } else {
-            AbderaFactory factory = (AbderaFactory)coreGetNodeFactory();
             return factory.getElementWrapper(internal);
         }
     }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/OMFactoryImpl.java Sat Sep 19 17:45:33 2015
@@ -20,6 +20,7 @@ package org.apache.axiom.om.impl.common.
 
 import javax.xml.namespace.QName;
 
+import org.apache.axiom.core.CoreNode;
 import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.ext.stax.datahandler.DataHandlerProvider;
 import org.apache.axiom.om.OMAttribute;
@@ -59,15 +60,23 @@ import org.apache.axiom.om.impl.common.T
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 
 public class OMFactoryImpl implements OMFactoryEx {
-    protected final OMMetaFactory metaFactory;
-    protected final NodeFactory nodeFactory;
+    private final OMMetaFactory metaFactory;
+    private 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;
+        this.nodeFactory = nodeFactory;
     }
 
+    protected final <T extends CoreNode> T createNode(Class<T> type) {
+        T node = nodeFactory.createNode(type);
+        initNode(node);
+        return node;
+    }
+    
+    protected void initNode(CoreNode node) {
+    }
+    
     public final OMMetaFactory getMetaFactory() {
         return metaFactory;
     }
@@ -77,11 +86,11 @@ public class OMFactoryImpl implements OM
     }
     
     public final OMDocument createOMDocument() {
-        return nodeFactory.createNode(AxiomDocument.class);
+        return createNode(AxiomDocument.class);
     }
 
     public final OMDocument createOMDocument(OMXMLParserWrapper builder) {
-        AxiomDocument document = nodeFactory.createNode(AxiomDocument.class);
+        AxiomDocument document = createNode(AxiomDocument.class);
         document.coreSetBuilder(builder);
         return document;
     }
@@ -93,7 +102,7 @@ public class OMFactoryImpl implements OM
 
     public final OMDocType createOMDocType(OMContainer parent, String rootName,
             String publicId, String systemId, String internalSubset, boolean fromBuilder) {
-        AxiomDocType node = nodeFactory.createNode(AxiomDocType.class);
+        AxiomDocType node = createNode(AxiomDocType.class);
         node.coreSetRootName(rootName);
         node.coreSetPublicId(publicId);
         node.coreSetSystemId(systemId);
@@ -108,17 +117,17 @@ public class OMFactoryImpl implements OM
         AxiomText node;
         switch (type) {
             case OMNode.TEXT_NODE: {
-                node = nodeFactory.createNode(AxiomCharacterDataNode.class);
+                node = createNode(AxiomCharacterDataNode.class);
                 break;
             }
             case OMNode.SPACE_NODE: {
-                AxiomCharacterDataNode cdata = nodeFactory.createNode(AxiomCharacterDataNode.class);
+                AxiomCharacterDataNode cdata = createNode(AxiomCharacterDataNode.class);
                 cdata.coreSetIgnorable(true);
                 node = cdata;
                 break;
             }
             case OMNode.CDATA_SECTION_NODE: {
-                node = nodeFactory.createNode(AxiomCDATASection.class);
+                node = createNode(AxiomCDATASection.class);
                 break;
             }
             default:
@@ -199,7 +208,7 @@ public class OMFactoryImpl implements OM
 
     public final OMProcessingInstruction createOMProcessingInstruction(
             OMContainer parent, String piTarget, String piData, boolean fromBuilder) {
-        AxiomProcessingInstruction node = nodeFactory.createNode(AxiomProcessingInstruction.class);
+        AxiomProcessingInstruction node = createNode(AxiomProcessingInstruction.class);
         node.coreSetTarget(piTarget);
         node.coreSetCharacterData(piData, Policies.DETACH_POLICY);
         if (parent != null) {
@@ -213,7 +222,7 @@ public class OMFactoryImpl implements OM
     }
 
     public final OMEntityReference createOMEntityReference(OMContainer parent, String name, String replacementText, boolean fromBuilder) {
-        AxiomEntityReference node = nodeFactory.createNode(AxiomEntityReference.class);
+        AxiomEntityReference node = createNode(AxiomEntityReference.class);
         node.coreSetName(name);
         node.coreSetReplacementText(replacementText);
         if (parent != null) {
@@ -227,7 +236,7 @@ public class OMFactoryImpl implements OM
     }
 
     public final OMComment createOMComment(OMContainer parent, String content, boolean fromBuilder) {
-        AxiomComment node = nodeFactory.createNode(AxiomComment.class);
+        AxiomComment node = createNode(AxiomComment.class);
         node.coreSetCharacterData(content, Policies.DETACH_POLICY);
         if (parent != null) {
             ((OMContainerEx)parent).addChild(node, fromBuilder);
@@ -242,7 +251,7 @@ public class OMFactoryImpl implements OM
     public final <T extends AxiomElement> T createAxiomElement(Class<T> type,
             OMContainer parent, String localName, OMNamespace ns, OMXMLParserWrapper builder,
             boolean generateNSDecl) {
-        T element = nodeFactory.createNode(type);
+        T element = createNode(type);
         element.coreSetBuilder(builder);
         if (parent != null) {
             ((AxiomContainer)parent).addChild(element, builder != null);
@@ -261,7 +270,7 @@ public class OMFactoryImpl implements OM
     }
     
     public final OMElement createOMElement(QName qname, OMContainer parent) {
-        AxiomElement element = nodeFactory.createNode(AxiomElement.class);
+        AxiomElement element = createNode(AxiomElement.class);
         if (parent != null) {
             parent.addChild(element);
         }
@@ -309,19 +318,19 @@ public class OMFactoryImpl implements OM
     }
 
     public final OMSourcedElement createOMElement(OMDataSource source) {
-        AxiomSourcedElement element = nodeFactory.createNode(AxiomSourcedElement.class);
+        AxiomSourcedElement element = createNode(AxiomSourcedElement.class);
         element.init(source);
         return element;
     }
 
     public final OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
-        AxiomSourcedElement element = nodeFactory.createNode(AxiomSourcedElement.class);
+        AxiomSourcedElement element = createNode(AxiomSourcedElement.class);
         element.init(localName, ns, source);
         return element;
     }
 
     public final OMSourcedElement createOMElement(OMDataSource source, QName qname) {
-        AxiomSourcedElement element = nodeFactory.createNode(AxiomSourcedElement.class);
+        AxiomSourcedElement element = createNode(AxiomSourcedElement.class);
         element.init(qname, source);
         return element;
     }
@@ -346,7 +355,7 @@ public class OMFactoryImpl implements OM
                 throw new IllegalArgumentException("Cannot create an unprefixed attribute with a namespace");
             }
         }
-        AxiomAttribute attr = nodeFactory.createNode(AxiomAttribute.class);
+        AxiomAttribute attr = createNode(AxiomAttribute.class);
         attr.internalSetLocalName(localName);
         attr.coreSetCharacterData(value, Policies.DETACH_POLICY);
         attr.internalSetNamespace(ns);

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/SOAPFactoryImpl.java Sat Sep 19 17:45:33 2015
@@ -62,7 +62,7 @@ public abstract class SOAPFactoryImpl ex
     }
     
     public final <T extends AxiomSOAPElement> T createSOAPElement(Class<T> type, OMElement parent, QName qname, OMXMLParserWrapper builder) {
-        T element = nodeFactory.createNode(type);
+        T element = createNode(type);
         if (builder != null) {
             element.coreSetBuilder(builder);
         } else if (parent != null) {
@@ -84,13 +84,13 @@ public abstract class SOAPFactoryImpl ex
     }
 
     public final SOAPMessage createSOAPMessage() {
-        AxiomSOAPMessage message = nodeFactory.createNode(AxiomSOAPMessage.class);
+        AxiomSOAPMessage message = createNode(AxiomSOAPMessage.class);
         message.initSOAPFactory(this);
         return message;
     }
 
     public final SOAPMessage createSOAPMessage(OMXMLParserWrapper builder) {
-        AxiomSOAPMessage message = nodeFactory.createNode(AxiomSOAPMessage.class);
+        AxiomSOAPMessage message = createNode(AxiomSOAPMessage.class);
         message.initSOAPFactory(this);
         // Null check for Spring-WS compatibility
         if (builder != null) {
@@ -137,13 +137,13 @@ public abstract class SOAPFactoryImpl ex
     }
 
     public final SOAPHeaderBlock createSOAPHeaderBlock(OMDataSource source) {
-        AxiomSOAPHeaderBlock element = nodeFactory.createNode(getSOAPHelper().getHeaderBlockClass());
+        AxiomSOAPHeaderBlock element = createNode(getSOAPHelper().getHeaderBlockClass());
         element.init(source);
         return element;
     }
 
     public final SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource ds) {
-        AxiomSOAPHeaderBlock element = nodeFactory.createNode(getSOAPHelper().getHeaderBlockClass());
+        AxiomSOAPHeaderBlock element = createNode(getSOAPHelper().getHeaderBlockClass());
         element.init(localName, ns, ds);
         return element;
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAbstractAttribute.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAbstractAttribute.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAbstractAttribute.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAbstractAttribute.java Sat Sep 19 17:45:33 2015
@@ -19,10 +19,7 @@
 package org.apache.abdera.parser.stax;
 
 import org.apache.axiom.core.CoreAttribute;
-import org.apache.axiom.om.OMFactory;
 
 abstract class FOMAbstractAttribute extends FOMInformationItem implements CoreAttribute {
-    FOMAbstractAttribute(OMFactory factory) {
-        super(factory);
-    }
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAttribute.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAttribute.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAttribute.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMAttribute.java Sat Sep 19 17:45:33 2015
@@ -18,11 +18,8 @@
 package org.apache.abdera.parser.stax;
 
 import org.apache.axiom.fom.AbderaAttribute;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomAttribute;
 
 public final class FOMAttribute extends FOMAbstractAttribute implements AbderaAttribute, AxiomAttribute {
-    protected FOMAttribute(OMFactory factory) {
-        super(factory);
-    }
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCDATASection.java Sat Sep 19 17:45:33 2015
@@ -25,11 +25,6 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomCDATASection;
 
 public final class FOMCDATASection extends FOMTextValue implements AbderaCDATASection, AxiomCDATASection {
-
-    public FOMCDATASection(OMFactory factory) {
-        super(factory);
-    }
-
     public InputStream getInputStream() {
         try {
             return getDataHandler().getInputStream();

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategories.java Sat Sep 19 17:45:33 2015
@@ -26,13 +26,8 @@ import org.apache.abdera.model.Category;
 import org.apache.abdera.parser.stax.util.FOMHelper;
 import org.apache.axiom.fom.AbderaCategories;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 
 public class FOMCategories extends FOMExtensibleElement implements AbderaCategories {
-    protected FOMCategories(OMFactory factory) {
-        super(factory);
-    }
-
     public Categories addCategory(Category category) {
         addChild((OMElement)category);
         return this;

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCategory.java Sat Sep 19 17:45:33 2015
@@ -21,13 +21,8 @@ import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Category;
 import org.apache.abdera.model.Element;
 import org.apache.axiom.fom.AbderaCategory;
-import org.apache.axiom.om.OMFactory;
 
 public class FOMCategory extends FOMExtensibleElement implements AbderaCategory {
-    protected FOMCategory(OMFactory factory) {
-        super(factory);
-    }
-
     public String getTerm() {
         return getAttributeValue(TERM);
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCharacterDataNode.java Sat Sep 19 17:45:33 2015
@@ -21,15 +21,9 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import org.apache.axiom.fom.AbderaCharacterDataNode;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomCharacterDataNode;
 
 public final class FOMCharacterDataNode extends FOMTextValue implements AbderaCharacterDataNode, AxiomCharacterDataNode {
-
-    public FOMCharacterDataNode(OMFactory factory) {
-        super(factory);
-    }
-
     public InputStream getInputStream() {
         try {
             return getDataHandler().getInputStream();

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMChildNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMChildNode.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMChildNode.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMChildNode.java Sat Sep 19 17:45:33 2015
@@ -19,11 +19,8 @@
 package org.apache.abdera.parser.stax;
 
 import org.apache.axiom.fom.AbderaChildNode;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomChildNode;
 
 abstract class FOMChildNode extends FOMSerializable implements AbderaChildNode, AxiomChildNode {
-    FOMChildNode(OMFactory factory) {
-        super(factory);
-    }
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java Sat Sep 19 17:45:33 2015
@@ -32,7 +32,6 @@ import org.apache.abdera.model.Text;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.axiom.fom.AbderaCollection;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 
 @SuppressWarnings("deprecation")
 public class FOMCollection extends FOMExtensibleElement implements AbderaCollection {
@@ -40,10 +39,6 @@ public class FOMCollection extends FOMEx
     private static final String[] ENTRY = {"application/atom+xml;type=\"entry\""};
     private static final String[] EMPTY = new String[0];
 
-    protected FOMCollection(OMFactory factory) {
-        super(factory);
-    }
-
     public String getTitle() {
         Text title = this.getFirstChild(TITLE);
         return (title != null) ? title.getValue() : null;

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMComment.java Sat Sep 19 17:45:33 2015
@@ -19,14 +19,9 @@ package org.apache.abdera.parser.stax;
 
 import org.apache.abdera.model.Comment;
 import org.apache.axiom.fom.AbderaComment;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomComment;
 
 public final class FOMComment extends FOMLeafNode implements AbderaComment, AxiomComment {
-    public FOMComment(OMFactory factory) {
-        super(factory);
-    }
-
     public String getText() {
         return getValue();
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMContent.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMContent.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMContent.java Sat Sep 19 17:45:33 2015
@@ -31,7 +31,6 @@ import org.apache.abdera.util.Constants;
 import org.apache.axiom.attachments.ByteArrayDataSource;
 import org.apache.axiom.fom.AbderaContent;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.util.base64.Base64Utils;
 
@@ -39,10 +38,6 @@ import org.apache.axiom.util.base64.Base
 public class FOMContent extends FOMExtensibleElement implements AbderaContent {
     protected Type type = Type.TEXT;
 
-    protected FOMContent(OMFactory factory) {
-        super(factory);
-    }
-
     public final Type getContentType() {
         return type;
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMControl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMControl.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMControl.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMControl.java Sat Sep 19 17:45:33 2015
@@ -19,14 +19,9 @@ package org.apache.abdera.parser.stax;
 
 import org.apache.abdera.model.Control;
 import org.apache.axiom.fom.AbderaControl;
-import org.apache.axiom.om.OMFactory;
 
 @SuppressWarnings("deprecation")
 public class FOMControl extends FOMExtensibleElement implements AbderaControl {
-    protected FOMControl(OMFactory factory) {
-        super(factory);
-    }
-
     public boolean isDraft() {
         String value = _getElementValue(DRAFT);
         if (value == null)

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDateTime.java Sat Sep 19 17:45:33 2015
@@ -24,15 +24,10 @@ import org.apache.abdera.model.AtomDate;
 import org.apache.abdera.model.DateTime;
 import org.apache.abdera.model.Element;
 import org.apache.axiom.fom.AbderaDateTime;
-import org.apache.axiom.om.OMFactory;
 
 public class FOMDateTime extends FOMElement implements AbderaDateTime {
     private AtomDate value;
 
-    protected FOMDateTime(OMFactory factory) {
-        super(factory);
-    }
-
     public AtomDate getValue() {
         if (value == null) {
             value = AtomDate.valueOf(getText());

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDiv.java Sat Sep 19 17:45:33 2015
@@ -27,14 +27,9 @@ import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Div;
 import org.apache.axiom.fom.AbderaDiv;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNode;
 
 public class FOMDiv extends FOMExtensibleElement implements AbderaDiv {
-    protected FOMDiv(OMFactory factory) {
-        super(factory);
-    }
-
     public String[] getXhtmlClass() {
         String _class = getAttributeValue(CLASS);
         String[] classes = null;

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocType.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocType.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocType.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocType.java Sat Sep 19 17:45:33 2015
@@ -18,11 +18,8 @@
  */
 package org.apache.abdera.parser.stax;
 
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomDocType;
 
-final class FOMDocType extends FOMLeafNode implements AxiomDocType {
-    FOMDocType(OMFactory factory) {
-        super(factory);
-    }
+public final class FOMDocType extends FOMLeafNode implements AxiomDocType {
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java Sat Sep 19 17:45:33 2015
@@ -44,7 +44,6 @@ import org.apache.axiom.fom.AbderaDocume
 import org.apache.axiom.om.OMComment;
 import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.OMProcessingInstruction;
@@ -62,14 +61,6 @@ public class FOMDocument<T extends Eleme
     protected String slug = null;
     protected boolean preserve = true;
 
-    public FOMDocument() {
-        super(new FOMFactory());
-    }
-
-    protected FOMDocument(OMFactory factory) {
-        super(factory);
-    }
-
     public T getRoot() {
         FOMFactory factory = (FOMFactory)getFactory();
         return (T)factory.getElementWrapper((T)this.getOMDocumentElement());

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMElement.java Sat Sep 19 17:45:33 2015
@@ -73,10 +73,6 @@ import org.apache.axiom.om.impl.common.A
 
 @SuppressWarnings("unchecked")
 public class FOMElement extends FOMChildNode implements AbderaElement, AxiomElement, Constants {
-    protected FOMElement(OMFactory factory) {
-        super(factory);
-    }
-
     protected void setParentDocument(Document parent) {
         ((OMContainer)parent).addChild(this);
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntityReference.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntityReference.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntityReference.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntityReference.java Sat Sep 19 17:45:33 2015
@@ -18,11 +18,8 @@
  */
 package org.apache.abdera.parser.stax;
 
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomEntityReference;
 
-final class FOMEntityReference extends FOMLeafNode implements AxiomEntityReference {
-    FOMEntityReference(OMFactory factory) {
-        super(factory);
-    }
+public final class FOMEntityReference extends FOMLeafNode implements AxiomEntityReference {
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java Sat Sep 19 17:45:33 2015
@@ -49,14 +49,9 @@ import org.apache.abdera.i18n.text.io.In
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.axiom.fom.AbderaEntry;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 
 @SuppressWarnings( {"unchecked", "deprecation"})
 public class FOMEntry extends FOMExtensibleElement implements AbderaEntry {
-    protected FOMEntry(OMFactory factory) {
-        super(factory);
-    }
-
     public Person getAuthor() {
         return (Person)getFirstChildWithName(AUTHOR);
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMExtensibleElement.java Sat Sep 19 17:45:33 2015
@@ -29,14 +29,9 @@ import org.apache.abdera.parser.stax.uti
 import org.apache.abdera.parser.stax.util.FOMList;
 import org.apache.axiom.fom.AbderaExtensibleElement;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 
 @SuppressWarnings("unchecked")
 public class FOMExtensibleElement extends FOMElement implements AbderaExtensibleElement {
-    protected FOMExtensibleElement(OMFactory factory) {
-        super(factory);
-    }
-
     public List<Element> getExtensions() {
         return new FOMList<Element>(new FOMExtensionIterator(this));
     }

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=1704071&r1=1704070&r2=1704071&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 Sat Sep 19 17:45:33 2015
@@ -56,37 +56,17 @@ import org.apache.abdera.parser.stax.uti
 import org.apache.abdera.util.Constants;
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.abdera.util.Version;
-import org.apache.axiom.core.CoreCDATASection;
-import org.apache.axiom.core.CoreCharacterDataNode;
-import org.apache.axiom.core.CoreComment;
-import org.apache.axiom.core.CoreDocument;
-import org.apache.axiom.core.CoreDocumentTypeDeclaration;
-import org.apache.axiom.core.CoreEntityReference;
-import org.apache.axiom.core.CoreNSAwareAttribute;
-import org.apache.axiom.core.CoreNSAwareElement;
-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.fom.impl.FOMNodeFactory;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.impl.common.AxiomAttribute;
-import org.apache.axiom.om.impl.common.AxiomCDATASection;
-import org.apache.axiom.om.impl.common.AxiomCharacterDataNode;
-import org.apache.axiom.om.impl.common.AxiomComment;
-import org.apache.axiom.om.impl.common.AxiomDocType;
-import org.apache.axiom.om.impl.common.AxiomDocument;
-import org.apache.axiom.om.impl.common.AxiomElement;
-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.OMFactoryImpl;
 
 @SuppressWarnings( {"unchecked", "deprecation"})
-public class FOMFactory extends OMFactoryImpl implements AbderaFactory, NodeFactory, Constants, ExtensionFactory {
+public class FOMFactory extends OMFactoryImpl implements AbderaFactory, Constants, ExtensionFactory {
     private static final Map<QName,Class<? extends FOMElement>> elementTypeMap;
     
     static {
@@ -138,7 +118,7 @@ public class FOMFactory extends OMFactor
     }
 
     public FOMFactory(Abdera abdera) {
-        super(FOMMetaFactory.INSTANCE, null);
+        super(FOMMetaFactory.INSTANCE, FOMNodeFactory.INSTANCE);
         List<ExtensionFactory> f = abdera.getConfiguration().getExtensionFactories();
         factoriesMap =
             new ExtensionFactoryMap((f != null) ? new ArrayList<ExtensionFactory>(f)
@@ -146,12 +126,17 @@ public class FOMFactory extends OMFactor
         this.abdera = abdera;
     }
 
+    @Override
+    protected void initNode(CoreNode node) {
+        ((FOMInformationItem)node).setFactory(this);
+    }
+
     public Parser newParser() {
         return new FOMParser(abdera);
     }
 
     public <T extends Element> Document<T> newDocument() {
-        return new FOMDocument(this);
+        return createNode(FOMDocument.class);
     }
 
     public Service newService(Base parent) {
@@ -486,72 +471,6 @@ public class FOMFactory extends OMFactor
         return createElement(FOMDiv.class, DIV, (OMContainer)parent);
     }
 
-    public <T extends CoreNode> T createNode(Class<T> type) {
-        CoreNode node;
-        if (type == CoreCDATASection.class || type == AxiomCDATASection.class || type == FOMCDATASection.class) {
-            node = new FOMCDATASection(this);
-        } else if (type == CoreCharacterDataNode.class || type == AxiomCharacterDataNode.class || type == FOMCharacterDataNode.class) {
-            node = new FOMCharacterDataNode(this);
-        } else if (type == CoreComment.class || type == AxiomComment.class || type == FOMComment.class) {
-            node = new FOMComment(this);
-        } else if (type == CoreDocument.class || type == AxiomDocument.class || type == FOMDocument.class) {
-            node = new FOMDocument(this);
-        } else if (type == CoreDocumentTypeDeclaration.class || type == AxiomDocType.class) {
-            node = new FOMDocType(this);
-        } else if (type == CoreEntityReference.class || type == AxiomEntityReference.class) {
-            node = new FOMEntityReference(this);
-        } else if (type == CoreNamespaceDeclaration.class || type == AxiomNamespaceDeclaration.class) {
-            node = new FOMNamespaceDeclaration(this);
-        } else if (type == CoreNSAwareAttribute.class || type == AxiomAttribute.class || type == FOMAttribute.class) {
-            node = new FOMAttribute(this);
-        } else if (type == CoreNSAwareElement.class || type == AxiomElement.class || type == FOMElement.class) {
-            node = new FOMElement(this);
-        } else if (type == CoreProcessingInstruction.class || type == AxiomProcessingInstruction.class || type == FOMProcessingInstruction.class) {
-            node = new FOMProcessingInstruction(this);
-        } else if (type == FOMCategories.class) {
-            node = new FOMCategories(this);
-        } else if (type == FOMCategory.class) {
-            node = new FOMCategory(this);
-        } else if (type == FOMCollection.class) {
-            node = new FOMCollection(this);
-        } else if (type == FOMContent.class) {
-            node = new FOMContent(this);
-        } else if (type == FOMControl.class) {
-            node = new FOMControl(this);
-        } else if (type == FOMDateTime.class) {
-            node = new FOMDateTime(this);
-        } else if (type == FOMDiv.class) {
-            node = new FOMDiv(this);
-        } else if (type == FOMEntry.class) {
-            node = new FOMEntry(this);
-        } else if (type == FOMExtensibleElement.class) {
-            node = new FOMExtensibleElement(this);
-        } else if (type == FOMFeed.class) {
-            node = new FOMFeed(this);
-        } else if (type == FOMGenerator.class) {
-            node = new FOMGenerator(this);
-        } else if (type == FOMIRI.class) {
-            node = new FOMIRI(this);
-        } else if (type == FOMLink.class) {
-            node = new FOMLink(this);
-        } else if (type == FOMMultipartCollection.class) {
-            node = new FOMMultipartCollection(this);
-        } else if (type == FOMPerson.class) {
-            node = new FOMPerson(this);
-        } else if (type == FOMService.class) {
-            node = new FOMService(this);
-        } else if (type == FOMSource.class) {
-            node = new FOMSource(this);
-        } else if (type == FOMText.class) {
-            node = new FOMText(this);
-        } else if (type == FOMWorkspace.class) {
-            node = new FOMWorkspace(this);
-        } else {
-            throw new IllegalArgumentException(type.getName() + " not supported");
-        }
-        return type.cast(node);
-    }
-
     private <T extends FOMElement> T createElement(Class<T> type, QName qname, OMContainer parent) {
         T element = createNode(type);
         if (parent != null) {

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMFeed.java Sat Sep 19 17:45:33 2015
@@ -29,14 +29,9 @@ import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Source;
 import org.apache.axiom.fom.AbderaFeed;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNode;
 
 public class FOMFeed extends FOMSource implements AbderaFeed {
-    protected FOMFeed(OMFactory factory) {
-        super(factory);
-    }
-
     public List<Entry> getEntries() {
         return _getChildrenAsSet(ENTRY);
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMGenerator.java Sat Sep 19 17:45:33 2015
@@ -20,13 +20,8 @@ package org.apache.abdera.parser.stax;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Generator;
 import org.apache.axiom.fom.AbderaGenerator;
-import org.apache.axiom.om.OMFactory;
 
 public class FOMGenerator extends FOMElement implements AbderaGenerator {
-    protected FOMGenerator(OMFactory factory) {
-        super(factory);
-    }
-
     public IRI getUri() {
         String value = getAttributeValue(AURI);
         return (value != null) ? new IRI(value) : null;

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMIRI.java Sat Sep 19 17:45:33 2015
@@ -21,13 +21,8 @@ import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.IRIElement;
 import org.apache.axiom.fom.AbderaIRIElement;
-import org.apache.axiom.om.OMFactory;
 
 public class FOMIRI extends FOMElement implements AbderaIRIElement {
-    protected FOMIRI(OMFactory factory) {
-        super(factory);
-    }
-
     public IRI getValue() {
         return _getUriValue(getText());
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMInformationItem.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMInformationItem.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMInformationItem.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMInformationItem.java Sat Sep 19 17:45:33 2015
@@ -20,19 +20,14 @@ package org.apache.abdera.parser.stax;
 
 import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.fom.AbderaNode;
+import org.apache.axiom.fom.impl.FOMNodeFactory;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.impl.common.AxiomInformationItem;
 
 abstract class FOMInformationItem implements AxiomInformationItem, AbderaNode {
-    private final OMFactory factory;
-
-    FOMInformationItem(OMFactory factory) {
-        this.factory = factory;
-    }
-
     public final NodeFactory coreGetNodeFactory() {
-        return (NodeFactory)factory;
+        return FOMNodeFactory.INSTANCE;
     }
 
     public final OMMetaFactory getMetaFactory() {
@@ -40,6 +35,6 @@ abstract class FOMInformationItem implem
     }
 
     public final OMFactory getOMFactory() {
-        return factory;
+        return (OMFactory)getFactory();
     }
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLeafNode.java Sat Sep 19 17:45:33 2015
@@ -19,11 +19,8 @@
 package org.apache.abdera.parser.stax;
 
 import org.apache.axiom.fom.AbderaChildNode;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomLeafNode;
 
 public abstract class FOMLeafNode extends FOMChildNode implements AxiomLeafNode, AbderaChildNode {
-    public FOMLeafNode(OMFactory factory) {
-        super(factory);
-    }
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLink.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLink.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLink.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMLink.java Sat Sep 19 17:45:33 2015
@@ -23,13 +23,8 @@ import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.model.Link;
 import org.apache.axiom.fom.AbderaLink;
-import org.apache.axiom.om.OMFactory;
 
 public class FOMLink extends FOMExtensibleElement implements AbderaLink {
-    protected FOMLink(OMFactory factory) {
-        super(factory);
-    }
-
     public IRI getHref() {
         return _getUriValue(getAttributeValue(HREF));
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMMultipartCollection.java Sat Sep 19 17:45:33 2015
@@ -10,7 +10,6 @@ import javax.activation.MimeType;
 import org.apache.abdera.model.Collection;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.util.MimeTypeHelper;
-import org.apache.axiom.om.OMFactory;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -31,10 +30,6 @@ import org.apache.axiom.om.OMFactory;
  * under the License.
  */
 public class FOMMultipartCollection extends FOMCollection {
-    protected FOMMultipartCollection(OMFactory factory) {
-        super(factory);
-    }
-
     public boolean acceptsMultipart(String mediaType) {
         Map<String, String> accept = getAcceptMultiparted();
         if (accept.size() == 0)

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMNamespaceDeclaration.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMNamespaceDeclaration.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMNamespaceDeclaration.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMNamespaceDeclaration.java Sat Sep 19 17:45:33 2015
@@ -18,11 +18,8 @@
  */
 package org.apache.abdera.parser.stax;
 
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomNamespaceDeclaration;
 
-final class FOMNamespaceDeclaration extends FOMAbstractAttribute implements AxiomNamespaceDeclaration {
-    FOMNamespaceDeclaration(OMFactory factory) {
-        super(factory);
-    }
+public final class FOMNamespaceDeclaration extends FOMAbstractAttribute implements AxiomNamespaceDeclaration {
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMPerson.java Sat Sep 19 17:45:33 2015
@@ -23,13 +23,8 @@ import org.apache.abdera.model.IRIElemen
 import org.apache.abdera.model.Person;
 import org.apache.axiom.fom.AbderaPerson;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 
 public class FOMPerson extends FOMExtensibleElement implements AbderaPerson {
-    protected FOMPerson(OMFactory factory) {
-        super(factory);
-    }
-
     public Element getNameElement() {
         return (Element)getFirstChildWithName(NAME);
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMProcessingInstruction.java Sat Sep 19 17:45:33 2015
@@ -18,14 +18,9 @@
 package org.apache.abdera.parser.stax;
 
 import org.apache.axiom.fom.AbderaProcessingInstruction;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomProcessingInstruction;
 
 public final class FOMProcessingInstruction extends FOMLeafNode implements AbderaProcessingInstruction, AxiomProcessingInstruction {
-    FOMProcessingInstruction(OMFactory factory) {
-        super(factory);
-    }
-
     public String toString() {
         java.io.CharArrayWriter w = new java.io.CharArrayWriter();
         try {

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSerializable.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSerializable.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSerializable.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSerializable.java Sat Sep 19 17:45:33 2015
@@ -18,11 +18,8 @@
  */
 package org.apache.abdera.parser.stax;
 
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomSerializable;
 
 abstract class FOMSerializable extends FOMInformationItem implements AxiomSerializable {
-    FOMSerializable(OMFactory factory) {
-        super(factory);
-    }
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMService.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMService.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMService.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMService.java Sat Sep 19 17:45:33 2015
@@ -27,14 +27,9 @@ import org.apache.abdera.model.Service;
 import org.apache.abdera.model.Workspace;
 import org.apache.axiom.fom.AbderaService;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 
 @SuppressWarnings("deprecation")
 public class FOMService extends FOMExtensibleElement implements AbderaService {
-    protected FOMService(OMFactory factory) {
-        super(factory);
-    }
-
     public List<Workspace> getWorkspaces() {
         List<Workspace> list = _getChildrenAsSet(WORKSPACE);
         if (list == null || list.size() == 0)

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSource.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSource.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMSource.java Sat Sep 19 17:45:33 2015
@@ -40,15 +40,10 @@ import org.apache.abdera.model.Text;
 import org.apache.abdera.parser.stax.util.FOMHelper;
 import org.apache.axiom.fom.AbderaSource;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNode;
 
 @SuppressWarnings( {"unchecked", "deprecation"})
 public class FOMSource extends FOMExtensibleElement implements AbderaSource {
-    protected FOMSource(OMFactory factory) {
-        super(factory);
-    }
-
     public Person getAuthor() {
         return (Person)getFirstChildWithName(AUTHOR);
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMText.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMText.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMText.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMText.java Sat Sep 19 17:45:33 2015
@@ -24,17 +24,12 @@ import org.apache.abdera.model.Text;
 import org.apache.abdera.util.Constants;
 import org.apache.axiom.fom.AbderaText;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNode;
 
 @SuppressWarnings("unchecked")
 public class FOMText extends FOMElement implements AbderaText {
     protected Type type = Type.TEXT;
 
-    protected FOMText(OMFactory factory) {
-        super(factory);
-    }
-
     public final Type getTextType() {
         return type;
     }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMTextValue.java Sat Sep 19 17:45:33 2015
@@ -23,7 +23,5 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.impl.common.AxiomText;
 
 public abstract class FOMTextValue extends FOMLeafNode implements AbderaTextValue, AxiomText {
-    public FOMTextValue(OMFactory factory) {
-        super(factory);
-    }
+
 }

Modified: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java?rev=1704071&r1=1704070&r2=1704071&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java (original)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/abdera/parser/stax/FOMWorkspace.java Sat Sep 19 17:45:33 2015
@@ -27,14 +27,9 @@ import org.apache.abdera.model.Text;
 import org.apache.abdera.model.Workspace;
 import org.apache.axiom.fom.AbderaWorkspace;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
 
 @SuppressWarnings("deprecation")
 public class FOMWorkspace extends FOMExtensibleElement implements AbderaWorkspace {
-    protected FOMWorkspace(OMFactory factory) {
-        super(factory);
-    }
-
     public String getTitle() {
         Text title = this.getFirstChild(TITLE);
         return (title != null) ? title.getValue() : null;

Added: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/impl/FOMNodeFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/impl/FOMNodeFactory.java?rev=1704071&view=auto
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/impl/FOMNodeFactory.java (added)
+++ webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/impl/FOMNodeFactory.java Sat Sep 19 17:45:33 2015
@@ -0,0 +1,143 @@
+/*
+ * 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.fom.impl;
+
+import org.apache.abdera.parser.stax.FOMAttribute;
+import org.apache.abdera.parser.stax.FOMCDATASection;
+import org.apache.abdera.parser.stax.FOMCategories;
+import org.apache.abdera.parser.stax.FOMCategory;
+import org.apache.abdera.parser.stax.FOMCharacterDataNode;
+import org.apache.abdera.parser.stax.FOMCollection;
+import org.apache.abdera.parser.stax.FOMComment;
+import org.apache.abdera.parser.stax.FOMContent;
+import org.apache.abdera.parser.stax.FOMControl;
+import org.apache.abdera.parser.stax.FOMDateTime;
+import org.apache.abdera.parser.stax.FOMDiv;
+import org.apache.abdera.parser.stax.FOMDocType;
+import org.apache.abdera.parser.stax.FOMDocument;
+import org.apache.abdera.parser.stax.FOMElement;
+import org.apache.abdera.parser.stax.FOMEntityReference;
+import org.apache.abdera.parser.stax.FOMEntry;
+import org.apache.abdera.parser.stax.FOMExtensibleElement;
+import org.apache.abdera.parser.stax.FOMFeed;
+import org.apache.abdera.parser.stax.FOMGenerator;
+import org.apache.abdera.parser.stax.FOMIRI;
+import org.apache.abdera.parser.stax.FOMLink;
+import org.apache.abdera.parser.stax.FOMMultipartCollection;
+import org.apache.abdera.parser.stax.FOMNamespaceDeclaration;
+import org.apache.abdera.parser.stax.FOMPerson;
+import org.apache.abdera.parser.stax.FOMProcessingInstruction;
+import org.apache.abdera.parser.stax.FOMService;
+import org.apache.abdera.parser.stax.FOMSource;
+import org.apache.abdera.parser.stax.FOMText;
+import org.apache.abdera.parser.stax.FOMWorkspace;
+import org.apache.axiom.core.CoreCDATASection;
+import org.apache.axiom.core.CoreCharacterDataNode;
+import org.apache.axiom.core.CoreComment;
+import org.apache.axiom.core.CoreDocument;
+import org.apache.axiom.core.CoreDocumentTypeDeclaration;
+import org.apache.axiom.core.CoreEntityReference;
+import org.apache.axiom.core.CoreNSAwareAttribute;
+import org.apache.axiom.core.CoreNSAwareElement;
+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.om.impl.common.AxiomAttribute;
+import org.apache.axiom.om.impl.common.AxiomCDATASection;
+import org.apache.axiom.om.impl.common.AxiomCharacterDataNode;
+import org.apache.axiom.om.impl.common.AxiomComment;
+import org.apache.axiom.om.impl.common.AxiomDocType;
+import org.apache.axiom.om.impl.common.AxiomDocument;
+import org.apache.axiom.om.impl.common.AxiomElement;
+import org.apache.axiom.om.impl.common.AxiomEntityReference;
+import org.apache.axiom.om.impl.common.AxiomNamespaceDeclaration;
+import org.apache.axiom.om.impl.common.AxiomProcessingInstruction;
+
+public final class FOMNodeFactory implements NodeFactory {
+    public static final FOMNodeFactory INSTANCE = new FOMNodeFactory();
+    
+    private FOMNodeFactory() {}
+    
+    public <T extends CoreNode> T createNode(Class<T> type) {
+        CoreNode node;
+        if (type == CoreCDATASection.class || type == AxiomCDATASection.class || type == FOMCDATASection.class) {
+            node = new FOMCDATASection();
+        } else if (type == CoreCharacterDataNode.class || type == AxiomCharacterDataNode.class || type == FOMCharacterDataNode.class) {
+            node = new FOMCharacterDataNode();
+        } else if (type == CoreComment.class || type == AxiomComment.class || type == FOMComment.class) {
+            node = new FOMComment();
+        } else if (type == CoreDocument.class || type == AxiomDocument.class || type == FOMDocument.class) {
+            node = new FOMDocument();
+        } else if (type == CoreDocumentTypeDeclaration.class || type == AxiomDocType.class) {
+            node = new FOMDocType();
+        } else if (type == CoreEntityReference.class || type == AxiomEntityReference.class) {
+            node = new FOMEntityReference();
+        } else if (type == CoreNamespaceDeclaration.class || type == AxiomNamespaceDeclaration.class) {
+            node = new FOMNamespaceDeclaration();
+        } else if (type == CoreNSAwareAttribute.class || type == AxiomAttribute.class || type == FOMAttribute.class) {
+            node = new FOMAttribute();
+        } else if (type == CoreNSAwareElement.class || type == AxiomElement.class || type == FOMElement.class) {
+            node = new FOMElement();
+        } else if (type == CoreProcessingInstruction.class || type == AxiomProcessingInstruction.class || type == FOMProcessingInstruction.class) {
+            node = new FOMProcessingInstruction();
+        } else if (type == FOMCategories.class) {
+            node = new FOMCategories();
+        } else if (type == FOMCategory.class) {
+            node = new FOMCategory();
+        } else if (type == FOMCollection.class) {
+            node = new FOMCollection();
+        } else if (type == FOMContent.class) {
+            node = new FOMContent();
+        } else if (type == FOMControl.class) {
+            node = new FOMControl();
+        } else if (type == FOMDateTime.class) {
+            node = new FOMDateTime();
+        } else if (type == FOMDiv.class) {
+            node = new FOMDiv();
+        } else if (type == FOMEntry.class) {
+            node = new FOMEntry();
+        } else if (type == FOMExtensibleElement.class) {
+            node = new FOMExtensibleElement();
+        } else if (type == FOMFeed.class) {
+            node = new FOMFeed();
+        } else if (type == FOMGenerator.class) {
+            node = new FOMGenerator();
+        } else if (type == FOMIRI.class) {
+            node = new FOMIRI();
+        } else if (type == FOMLink.class) {
+            node = new FOMLink();
+        } else if (type == FOMMultipartCollection.class) {
+            node = new FOMMultipartCollection();
+        } else if (type == FOMPerson.class) {
+            node = new FOMPerson();
+        } else if (type == FOMService.class) {
+            node = new FOMService();
+        } else if (type == FOMSource.class) {
+            node = new FOMSource();
+        } else if (type == FOMText.class) {
+            node = new FOMText();
+        } else if (type == FOMWorkspace.class) {
+            node = new FOMWorkspace();
+        } else {
+            throw new IllegalArgumentException(type.getName() + " not supported");
+        }
+        return type.cast(node);
+    }
+}

Propchange: webservices/axiom/trunk/implementations/fom-impl/src/main/java/org/apache/axiom/fom/impl/FOMNodeFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message