ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1042144 - in /webservices/commons/trunk/modules/axiom/modules: axiom-api/src/main/java/org/apache/axiom/om/ axiom-api/src/main/java/org/apache/axiom/om/impl/ axiom-api/src/main/java/org/apache/axiom/om/util/ axiom-api/src/test/java/org/apa...
Date Sat, 04 Dec 2010 11:16:28 GMT
Author: veithen
Date: Sat Dec  4 11:16:27 2010
New Revision: 1042144

URL: http://svn.apache.org/viewvc?rev=1042144&view=rev
Log:
AXIOM-353: Improved the new API so that it is possible to specify a SOAP factory even with
a plain StAXOMBuilder (as with the old OMXMLBuilderFactory API).

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/AbstractOMMetaFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/AXIOMUtil.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentTestBase.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMElementTestBase.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/OMStAXWrapperTestBase.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
Sat Dec  4 11:16:27 2010
@@ -25,6 +25,12 @@ import org.apache.axiom.ext.stax.datahan
 
 /** Class OMFactory */
 public interface OMFactory {
+    /**
+     * Get the {@link OMMetaFactory} from which this factory was obtained.
+     * 
+     * @return the meta factory
+     */
+    OMMetaFactory getMetaFactory();
 
     /** Creates a new OMDocument. */
     OMDocument createOMDocument();

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
Sat Dec  4 11:16:27 2010
@@ -64,31 +64,40 @@ public interface OMMetaFactory {
     SOAPFactory getSOAP12Factory();
     
     /**
-     * Create an object model builder for plain XML that pulls events from a StAX stream
reader.
+     * Create an object model builder that pulls events from a StAX stream reader.
      * 
+     * @param omFactory
+     *            the object model factory to use; must be obtained from the same
+     *            {@link OMMetaFactory}
      * @param parser
      *            the stream reader to read the XML data from
      * @return the builder
      */
-    OMXMLParserWrapper createStAXOMBuilder(XMLStreamReader parser);
+    OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser);
     
     /**
-     * Create an object model builder that reads a plain XML document from the provided input
+     * Create an object model builder that reads an XML document from the provided input
      * stream.
      * 
+     * @param omFactory
+     *            the object model factory to use; must be obtained from the same
+     *            {@link OMMetaFactory}
      * @param in
      *            the input stream representing the XML document
      * @return the builder
      */
-    OMXMLParserWrapper createOMBuilder(InputStream in);
+    OMXMLParserWrapper createOMBuilder(OMFactory omFactory, InputStream in);
     
     /**
-     * Create an object model builder that reads a plain XML document from the provided character
+     * Create an object model builder that reads an XML document from the provided character
      * stream.
      * 
+     * @param omFactory
+     *            the object model factory to use; must be obtained from the same
+     *            {@link OMMetaFactory}
      * @param in
      *            the character stream representing the XML document
      * @return the builder
      */
-    OMXMLParserWrapper createOMBuilder(Reader in);
+    OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Reader in);
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
Sat Dec  4 11:16:27 2010
@@ -39,7 +39,22 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createStAXOMBuilder(XMLStreamReader parser) {
-        return OMAbstractFactory.getMetaFactory().createStAXOMBuilder(parser);
+        OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
+        return metaFactory.createStAXOMBuilder(metaFactory.getOMFactory(), parser);
+    }
+    
+    /**
+     * Create an object model builder that pulls events from a StAX stream reader using a
specified
+     * object model factory.
+     * 
+     * @param omFactory
+     *            the object model factory to use
+     * @param parser
+     *            the stream reader to read the XML data from
+     * @return the builder
+     */
+    public static OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader
parser) {
+        return omFactory.getMetaFactory().createStAXOMBuilder(omFactory, parser);
     }
     
     /**
@@ -51,7 +66,22 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createOMBuilder(InputStream in) {
-        return OMAbstractFactory.getMetaFactory().createOMBuilder(in);
+        OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
+        return metaFactory.createOMBuilder(metaFactory.getOMFactory(), in);
+    }
+    
+    /**
+     * Create an object model builder that reads an XML document from the provided input
stream
+     * using a specified object model factory.
+     * 
+     * @param omFactory
+     *            the object model factory to use
+     * @param in
+     *            the input stream representing the XML document
+     * @return the builder
+     */
+    public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, InputStream in)
{
+        return omFactory.getMetaFactory().createOMBuilder(omFactory, in);
     }
     
     /**
@@ -63,6 +93,21 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createOMBuilder(Reader in) {
-        return OMAbstractFactory.getMetaFactory().createOMBuilder(in);
+        OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
+        return metaFactory.createOMBuilder(metaFactory.getOMFactory(), in);
+    }
+    
+    /**
+     * Create an object model builder that reads an XML document from the provided character
stream
+     * using a specified object model factory.
+     * 
+     * @param omFactory
+     *            the object model factory to use
+     * @param in
+     *            the character stream representing the XML document
+     * @return the builder
+     */
+    public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Reader in) {
+        return omFactory.getMetaFactory().createOMBuilder(omFactory, in);
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/AbstractOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/AbstractOMMetaFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/AbstractOMMetaFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/AbstractOMMetaFactory.java
Sat Dec  4 11:16:27 2010
@@ -25,6 +25,7 @@ import javax.xml.stream.XMLStreamExcepti
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
@@ -35,21 +36,21 @@ import org.apache.axiom.om.util.StAXUtil
  * ({@link org.apache.axiom.om.impl.builder.StAXOMBuilder} and its subclasses).
  */
 public abstract class AbstractOMMetaFactory implements OMMetaFactory {
-    public OMXMLParserWrapper createStAXOMBuilder(XMLStreamReader parser) {
-        return new StAXOMBuilder(getOMFactory(), parser);
+    public OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser)
{
+        return new StAXOMBuilder(omFactory, parser);
     }
 
-    public OMXMLParserWrapper createOMBuilder(InputStream in) {
+    public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, InputStream in) {
         try {
-            return new StAXOMBuilder(getOMFactory(), StAXUtils.createXMLStreamReader(in));
+            return new StAXOMBuilder(omFactory, StAXUtils.createXMLStreamReader(in));
         } catch (XMLStreamException ex) {
             throw new OMException(ex);
         }
     }
 
-    public OMXMLParserWrapper createOMBuilder(Reader in) {
+    public OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Reader in) {
         try {
-            return new StAXOMBuilder(getOMFactory(), StAXUtils.createXMLStreamReader(in));
+            return new StAXOMBuilder(omFactory, StAXUtils.createXMLStreamReader(in));
         } catch (XMLStreamException ex) {
             throw new OMException(ex);
         }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/AXIOMUtil.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/AXIOMUtil.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/AXIOMUtil.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/AXIOMUtil.java
Sat Dec  4 11:16:27 2010
@@ -22,8 +22,7 @@ package org.apache.axiom.om.util;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.util.StAXUtils;
+import org.apache.axiom.om.OMXMLBuilderFactory;
 
 import javax.xml.stream.XMLStreamException;
 import java.io.StringReader;
@@ -52,8 +51,7 @@ public class AXIOMUtil {
             throws XMLStreamException {
         
         if (xmlFragment != null) {
-            return new StAXOMBuilder(omFactory,
-                    StAXUtils.createXMLStreamReader(new StringReader(xmlFragment)))
+            return OMXMLBuilderFactory.createOMBuilder(omFactory, new StringReader(xmlFragment))
                     .getDocumentElement();
         }
         return null;

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/AbstractTestCase.java
Sat Dec  4 11:16:27 2010
@@ -91,7 +91,7 @@ public abstract class AbstractTestCase
     }
     
     public OMElement getTestResourceAsElement(OMMetaFactory omMetaFactory, String relativePath)
{
-        return omMetaFactory.createOMBuilder(getTestResource(relativePath)).getDocumentElement();
+        return omMetaFactory.createOMBuilder(omMetaFactory.getOMFactory(), getTestResource(relativePath)).getDocumentElement();
     }
     
     public static String[] getConformanceTestFiles() {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentTestBase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentTestBase.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentTestBase.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentTestBase.java
Sat Dec  4 11:16:27 2010
@@ -98,7 +98,7 @@ public class OMDocumentTestBase extends 
     }
 
     private OMDocument getSampleOMDocument(String xml) {
-        return omMetaFactory.createOMBuilder(new StringReader(xml)).getDocument();
+        return omMetaFactory.createOMBuilder(omMetaFactory.getOMFactory(), new StringReader(xml)).getDocument();
     }
 
 //    private OMDocument getSampleOMDocument() {
@@ -119,7 +119,7 @@ public class OMDocumentTestBase extends 
     public void testBuild() throws Exception {
         CountingInputStream in = new CountingInputStream(getTestResource(
                 TestConstants.REALLY_BIG_MESSAGE));
-        OMDocument doc = omMetaFactory.createOMBuilder(in).getDocument();
+        OMDocument doc = omMetaFactory.createOMBuilder(omMetaFactory.getOMFactory(), in).getDocument();
         assertFalse(doc.isComplete());
         int countBeforeBuild = in.getCount();
         doc.build();

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMElementTestBase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMElementTestBase.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMElementTestBase.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMElementTestBase.java
Sat Dec  4 11:16:27 2010
@@ -473,7 +473,7 @@ public abstract class OMElementTestBase 
                 elem);
         String xml = elem.toString();
 
-        OMXMLParserWrapper builder = omMetaFactory.createOMBuilder(
+        OMXMLParserWrapper builder = omMetaFactory.createOMBuilder(omMetaFactory.getOMFactory(),
                 new ByteArrayInputStream(xml.getBytes()));
 
         builder.getDocumentElement().build();

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/OMStAXWrapperTestBase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/OMStAXWrapperTestBase.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/OMStAXWrapperTestBase.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/impl/OMStAXWrapperTestBase.java
Sat Dec  4 11:16:27 2010
@@ -52,7 +52,7 @@ public class OMStAXWrapperTestBase exten
         // reported). This is not the default for Woodstox (see WSTX-140).
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(StAXParserConfiguration.NON_COALESCING,
is);
         
-        OMElement element = omMetaFactory.createStAXOMBuilder(reader).getDocumentElement();
+        OMElement element = omMetaFactory.createStAXOMBuilder(omMetaFactory.getOMFactory(),
reader).getDocumentElement();
         
         // Build the element so we have a full StAX tree
         element.build();

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
Sat Dec  4 11:16:27 2010
@@ -30,6 +30,7 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMHierarchyException;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMProcessingInstruction;
@@ -75,16 +76,27 @@ import javax.xml.namespace.QName;
  * </ul>
  */
 public class OMDOMFactory implements OMFactory {
+    private final OMDOMMetaFactory metaFactory;
 
     protected DocumentImpl document;
 
+    public OMDOMFactory(OMDOMMetaFactory metaFactory) {
+        this.metaFactory = metaFactory;
+    }
+
     public OMDOMFactory() {
+        this(new OMDOMMetaFactory());
     }
 
     public OMDOMFactory(DocumentImpl doc) {
+        this(new OMDOMMetaFactory());
         this.document = doc;
     }
 
+    public OMMetaFactory getMetaFactory() {
+        return metaFactory;
+    }
+
     public OMDocument createOMDocument() {
         if (this.document == null)
             this.document = new DocumentImpl(this);

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMMetaFactory.java
Sat Dec  4 11:16:27 2010
@@ -38,14 +38,14 @@ import org.apache.axiom.soap.impl.dom.so
  */
 public class OMDOMMetaFactory extends AbstractOMMetaFactory {
     public OMFactory getOMFactory() {
-        return new OMDOMFactory();
+        return new OMDOMFactory(this);
     }
 
     public SOAPFactory getSOAP11Factory() {
-        return new SOAP11Factory();
+        return new SOAP11Factory(this);
     }
 
     public SOAPFactory getSOAP12Factory() {
-        return new SOAP12Factory();
+        return new SOAP12Factory(this);
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
Sat Dec  4 11:16:27 2010
@@ -24,6 +24,7 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.DocumentImpl;
 import org.apache.axiom.om.impl.dom.factory.OMDOMFactory;
+import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
@@ -47,6 +48,9 @@ import org.apache.axiom.soap.impl.dom.so
 import org.apache.axiom.soap.impl.dom.soap12.SOAP12FaultImpl;
 
 public class DOMSOAPFactory extends OMDOMFactory implements SOAPFactory {
+    public DOMSOAPFactory(OMDOMMetaFactory metaFactory) {
+        super(metaFactory);
+    }
 
     public DOMSOAPFactory() {
     }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
Sat Dec  4 11:16:27 2010
@@ -23,6 +23,7 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.DocumentImpl;
 import org.apache.axiom.om.impl.dom.NamespaceImpl;
+import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -47,7 +48,10 @@ import org.apache.axiom.soap.impl.dom.fa
 /**
  */
 public class SOAP11Factory extends DOMSOAPFactory {
-
+    public SOAP11Factory(OMDOMMetaFactory metaFactory) {
+        super(metaFactory);
+    }
+    
     public SOAP11Factory() {
     }
 

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
Sat Dec  4 11:16:27 2010
@@ -23,6 +23,7 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.DocumentImpl;
 import org.apache.axiom.om.impl.dom.NamespaceImpl;
+import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -46,6 +47,9 @@ import org.apache.axiom.soap.impl.dom.fa
 /**
  */
 public class SOAP12Factory extends DOMSOAPFactory {
+    public SOAP12Factory(OMDOMMetaFactory metaFactory) {
+        super(metaFactory);
+    }
 
     public SOAP12Factory() {
     }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
Sat Dec  4 11:16:27 2010
@@ -29,6 +29,7 @@ import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMProcessingInstruction;
 import org.apache.axiom.om.OMSourcedElement;
@@ -58,6 +59,8 @@ public class OMLinkedListImplFactory imp
     // Pooling of OMNamespace objects is disabled.  See the comment in OMNamespace.
     private static boolean POOL_OMNAMESPACES = false;
     
+    private final OMLinkedListMetaFactory metaFactory;
+    
     /**
      * This is a map of namespaces with the namespace URI as the key and Namespace object
itself as
      * the value.
@@ -65,6 +68,17 @@ public class OMLinkedListImplFactory imp
      */
     protected Map namespaceTable = new Hashtable(5);
     
+    public OMLinkedListImplFactory(OMLinkedListMetaFactory metaFactory) {
+        this.metaFactory = metaFactory;
+    }
+    
+    public OMLinkedListImplFactory() {
+        this(new OMLinkedListMetaFactory());
+    }
+
+    public OMMetaFactory getMetaFactory() {
+        return metaFactory;
+    }
 
     /**
      * Method createOMElement.

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListMetaFactory.java
Sat Dec  4 11:16:27 2010
@@ -37,9 +37,9 @@ import org.apache.axiom.soap.impl.llom.s
  * @scr.property name="implementationName" type="String" value="llom"
  */
 public class OMLinkedListMetaFactory extends AbstractOMMetaFactory {
-    private final OMFactory omFactory = new OMLinkedListImplFactory();
-    private final SOAPFactory soap11Factory = new SOAP11Factory();
-    private final SOAPFactory soap12Factory = new SOAP12Factory();
+    private final OMFactory omFactory = new OMLinkedListImplFactory(this);
+    private final SOAPFactory soap11Factory = new SOAP11Factory(this);
+    private final SOAPFactory soap12Factory = new SOAP12Factory(this);
     
     public OMFactory getOMFactory() {
         return omFactory;

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
Sat Dec  4 11:16:27 2010
@@ -24,6 +24,7 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.OMNamespaceImpl;
 import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory;
+import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -49,8 +50,12 @@ import org.apache.axiom.soap.impl.llom.S
 /**
  */
 public class SOAP11Factory extends OMLinkedListImplFactory implements SOAPFactory {
-    /** Eran Chinthaka (chinthaka@apache.org) */
+    public SOAP11Factory(OMLinkedListMetaFactory metaFactory) {
+        super(metaFactory);
+    }
 
+    public SOAP11Factory() {
+    }
 
     public OMNamespace getNamespace() {
         return new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java?rev=1042144&r1=1042143&r2=1042144&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
Sat Dec  4 11:16:27 2010
@@ -24,6 +24,7 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.OMNamespaceImpl;
 import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory;
+import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -49,7 +50,12 @@ import org.apache.axiom.soap.impl.llom.S
 /**
  */
 public class SOAP12Factory extends OMLinkedListImplFactory implements SOAPFactory {
-    /** Eran Chinthaka (chinthaka@apache.org) */
+    public SOAP12Factory(OMLinkedListMetaFactory metaFactory) {
+        super(metaFactory);
+    }
+
+    public SOAP12Factory() {
+    }
 
     public String getSoapVersionURI() {
         return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;



Mime
View raw message