You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by di...@apache.org on 2006/04/04 12:29:32 UTC

svn commit: r391270 - in /webservices/commons/trunk/modules/axiom: src/org/apache/axiom/om/impl/llom/ src/org/apache/axiom/om/impl/llom/factory/ src/org/apache/axiom/om/xpath/ src/org/apache/axiom/soap/impl/llom/ src/org/apache/axiom/soap/impl/llom/soa...

Author: dims
Date: Tue Apr  4 03:29:27 2006
New Revision: 391270

URL: http://svn.apache.org/viewcvs?rev=391270&view=rev
Log:
get rid of unused factory in omnamespaceimpl

Modified:
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNamespaceImpl.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMTextImpl.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/xpath/DocumentNavigator.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
    webservices/commons/trunk/modules/axiom/test/org/apache/axiom/attachments/ImageSampleTest.java
    webservices/commons/trunk/modules/axiom/test/org/apache/axiom/om/impl/llom/OMOutputTest.java
    webservices/commons/trunk/modules/axiom/test/org/apache/axiom/soap/impl/llom/OMHeaderTest.java

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java Tue Apr  4 03:29:27 2006
@@ -294,7 +294,7 @@
     public OMNamespace declareNamespace(String uri, String prefix) {
         if ("".equals(prefix))
             prefix = OMSerializerUtil.getNextNSPrefix();
-        OMNamespaceImpl ns = new OMNamespaceImpl(uri, prefix, this.factory);
+        OMNamespaceImpl ns = new OMNamespaceImpl(uri, prefix);
         return declareNamespace(ns);
     }
 
@@ -305,7 +305,7 @@
      * @param uri
      */
     public OMNamespace declareDefaultNamespace(String uri) {
-        OMNamespaceImpl namespace = new OMNamespaceImpl(uri, "", this.factory);
+        OMNamespaceImpl namespace = new OMNamespaceImpl(uri, "");
 
         if (namespaces == null) {
             this.namespaces = new HashMap(5);
@@ -336,7 +336,7 @@
         String prefix = namespace.getPrefix();
         if (prefix == null) {
             prefix = OMSerializerUtil.getNextNSPrefix();
-            namespace = new OMNamespaceImpl(namespace.getName(), prefix, null);
+            namespace = new OMNamespaceImpl(namespace.getName(), prefix);
         }
         namespaces.put(prefix, namespace);
         return namespace;
@@ -391,7 +391,7 @@
         //If the prefix is available and uri is available and its the xml namespace
         if (prefix != null && prefix.equals(OMConstants.XMLNS_PREFIX) && uri.equals(OMConstants.XMLNS_URI))
         {
-            return new OMNamespaceImpl(uri, prefix, this.factory);
+            return new OMNamespaceImpl(uri, prefix);
         }
 
         if (namespaces == null) {

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNamespaceImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNamespaceImpl.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNamespaceImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNamespaceImpl.java Tue Apr  4 03:29:27 2006
@@ -32,17 +32,14 @@
      * Field uri
      */
     private String uri;
-    
-    private OMFactory factory;
 
     /**
      * @param uri
      * @param prefix
      */
-    public OMNamespaceImpl(String uri, String prefix, OMFactory factory) {
+    public OMNamespaceImpl(String uri, String prefix) {
         this.uri = uri;
         this.prefix = prefix;
-        this.factory = factory;
     }
 
     /**

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMNodeImpl.java Tue Apr  4 03:29:27 2006
@@ -67,24 +67,6 @@
     
     protected OMFactory factory;
 
-//    /**
-//     * Constructor OMNodeImpl
-//     */
-//    public OMNodeImpl() {
-//    }
-//
-//    /**
-//     * For a node to exist there must be a parent.
-//     *
-//     * @param parent
-//     */
-//    public OMNodeImpl(OMContainer parent) {
-//        if ((parent != null)) {
-//            this.parent = (OMContainerEx) parent;
-//            parent.addChild(this);
-//        }
-//    }
-    
     /**
      * Constructor OMNodeImpl
      * @param factory The <code>OMFactory</code> that created this

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMTextImpl.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMTextImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMTextImpl.java Tue Apr  4 03:29:27 2006
@@ -94,7 +94,7 @@
         this.value = s;
         this.nodeType = nodeType;
         this.xopNS = new OMNamespaceImpl(
-                "http://www.w3.org/2004/08/xop/include", "xop", factory);
+                "http://www.w3.org/2004/08/xop/include", "xop");
     }
 
     /**
@@ -114,7 +114,7 @@
         done = true;
         this.nodeType = nodeType;
         this.xopNS = new OMNamespaceImpl(
-                "http://www.w3.org/2004/08/xop/include", "xop", factory);
+                "http://www.w3.org/2004/08/xop/include", "xop");
     }
 
 
@@ -130,7 +130,7 @@
         done = true;
         this.nodeType = nodeType;
         this.xopNS = new OMNamespaceImpl(
-                "http://www.w3.org/2004/08/xop/include", "xop", factory);
+                "http://www.w3.org/2004/08/xop/include", "xop");
     }
 
     /**
@@ -177,7 +177,7 @@
         done = true;
         this.nodeType = TEXT_NODE;
         this.xopNS = new OMNamespaceImpl(
-                "http://www.w3.org/2004/08/xop/include", "xop", factory);
+                "http://www.w3.org/2004/08/xop/include", "xop");
     }
 
     /**
@@ -196,7 +196,7 @@
         this.builder = builder;
         this.nodeType = TEXT_NODE;
         this.xopNS = new OMNamespaceImpl(
-                "http://www.w3.org/2004/08/xop/include", "xop", factory);
+                "http://www.w3.org/2004/08/xop/include", "xop");
     }
 
     /**
@@ -404,8 +404,7 @@
                 }
                 // send binary as MTOM optimised
                 this.attribute = new OMAttributeImpl("href",
-                        new OMNamespaceImpl("", "", this.factory), "cid:" + getContentID(),
-                        this.factory);
+                        new OMNamespaceImpl("", ""), "cid:" + getContentID(), this.factory);
                 this.serializeStartpart(xmlStreamWriter);
                 omOutput.writeOptimized(this);
                 xmlStreamWriter.writeEndElement();

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java Tue Apr  4 03:29:27 2006
@@ -123,7 +123,7 @@
         String key = uri + uriAndPrefixSeparator + prefix;
         OMNamespace existingNamespaceObject = (OMNamespace) namespaceTable.get(key);
         if (existingNamespaceObject == null) {
-            existingNamespaceObject = new OMNamespaceImpl(uri, prefix, this);
+            existingNamespaceObject = new OMNamespaceImpl(uri, prefix);
             namespaceTable.put(key, existingNamespaceObject);
         }
         return existingNamespaceObject;

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/xpath/DocumentNavigator.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/xpath/DocumentNavigator.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/xpath/DocumentNavigator.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/xpath/DocumentNavigator.java Tue Apr  4 03:29:27 2006
@@ -381,8 +381,7 @@
                 new OMNamespaceEx(
                         new OMNamespaceImpl(
                                 "http://www.w3.org/XML/1998/namespace", 
-                                "xml", 
-                                ((OMNode)contextNode).getOMFactory()),
+                                "xml"),
                         (OMContainer) contextNode));
         return nsList.iterator();
     }

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/SOAPHeaderBlockImpl.java Tue Apr  4 03:29:27 2006
@@ -87,8 +87,7 @@
         } else {
             OMAttribute attribute = new OMAttributeImpl(attributeName,
                     new OMNamespaceImpl(soapEnvelopeNamespaceURI,
-                            SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX, 
-                            this.factory),
+                            SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX),
                     attrValue, this.factory);
             this.addAttribute(attribute);
         }

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java Tue Apr  4 03:29:27 2006
@@ -48,7 +48,7 @@
 
     public OMNamespace getNamespace() {
         return new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
-                SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX, this);
+                SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
     }
 
     public String getSoapVersionURI() {
@@ -59,8 +59,7 @@
         return new SOAPEnvelopeImpl(
                 new OMNamespaceImpl(
                         SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
-                        SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX, 
-                        this),
+                        SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX),
                 this);
     }
 
@@ -269,8 +268,7 @@
         OMNamespace ns =
                 new OMNamespaceImpl(
                         SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
-                        SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX, 
-                        this);
+                        SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
         SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
         createSOAPHeader(env);
         createSOAPBody(env);

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java Tue Apr  4 03:29:27 2006
@@ -51,14 +51,14 @@
 
     public OMNamespace getNamespace() {
         return new OMNamespaceImpl(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
-                SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX, this);
+                SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
     }
 
     public SOAPEnvelope createSOAPEnvelope() {
         return new SOAPEnvelopeImpl(
                 new OMNamespaceImpl(
                         SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
-                        SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX, this),
+                        SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX),
                 this);
     }
 
@@ -266,7 +266,7 @@
         OMNamespace ns =
                 new OMNamespaceImpl(
                         SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
-                        SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX, this);
+                        SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
         SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
         createSOAPHeader(env);
         createSOAPBody(env);

Modified: webservices/commons/trunk/modules/axiom/test/org/apache/axiom/attachments/ImageSampleTest.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/test/org/apache/axiom/attachments/ImageSampleTest.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/test/org/apache/axiom/attachments/ImageSampleTest.java (original)
+++ webservices/commons/trunk/modules/axiom/test/org/apache/axiom/attachments/ImageSampleTest.java Tue Apr  4 03:29:27 2006
@@ -84,12 +84,12 @@
 
         OMFactory fac = OMAbstractFactory.getOMFactory();
         OMNamespaceImpl soap = new OMNamespaceImpl(
-                "http://schemas.xmlsoap.org/soap/envelope/", "soap", fac);
+                "http://schemas.xmlsoap.org/soap/envelope/", "soap");
         OMElement envelope = new OMElementImpl("Envelope", soap, fac);
         OMElement body = new OMElementImpl("Body", soap, fac);
 
         OMNamespaceImpl dataName = new OMNamespaceImpl(
-                "http://www.example.org/stuff", "m", fac);
+                "http://www.example.org/stuff", "m");
         OMElement data = new OMElementImpl("data", dataName, fac);
 
         expectedImage =

Modified: webservices/commons/trunk/modules/axiom/test/org/apache/axiom/om/impl/llom/OMOutputTest.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/test/org/apache/axiom/om/impl/llom/OMOutputTest.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/test/org/apache/axiom/om/impl/llom/OMOutputTest.java (original)
+++ webservices/commons/trunk/modules/axiom/test/org/apache/axiom/om/impl/llom/OMOutputTest.java Tue Apr  4 03:29:27 2006
@@ -62,16 +62,16 @@
         OMFactory fac = OMAbstractFactory.getOMFactory();
         
         OMNamespaceImpl soap = new OMNamespaceImpl(
-                "http://schemas.xmlsoap.org/soap/envelope/", "soap", fac);
+                "http://schemas.xmlsoap.org/soap/envelope/", "soap");
         envelope = new OMElementImpl("Envelope", soap, fac);
         OMElement body = new OMElementImpl("Body", soap, fac);
 
         OMNamespaceImpl dataName = new OMNamespaceImpl(
-                "http://www.example.org/stuff", "m", fac);
+                "http://www.example.org/stuff", "m");
         OMElement data = new OMElementImpl("data", dataName, fac);
 
         OMNamespaceImpl mime = new OMNamespaceImpl(
-                "http://www.w3.org/2003/06/xmlmime", "m", fac);
+                "http://www.w3.org/2003/06/xmlmime", "m");
 
         OMElement text = new OMElementImpl("name", dataName, fac);
         OMAttribute cType1 = new OMAttributeImpl("contentType", mime,

Modified: webservices/commons/trunk/modules/axiom/test/org/apache/axiom/soap/impl/llom/OMHeaderTest.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/test/org/apache/axiom/soap/impl/llom/OMHeaderTest.java?rev=391270&r1=391269&r2=391270&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/test/org/apache/axiom/soap/impl/llom/OMHeaderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/test/org/apache/axiom/soap/impl/llom/OMHeaderTest.java Tue Apr  4 03:29:27 2006
@@ -45,7 +45,7 @@
         String newElementName = "MyHeaderElement";
         SOAPHeaderBlock soapHeaderElement = soapHeader.addHeaderBlock(
                 newElementName,
-                new OMNamespaceImpl("http://opensource.lk", "lsf", soapHeader.getOMFactory()));
+                new OMNamespaceImpl("http://opensource.lk", "lsf"));
         assertTrue(
                 "Header Element added has different parent than it should have",
                 soapHeaderElement.getParent() == soapHeader);