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 ch...@apache.org on 2006/04/03 10:04:57 UTC

svn commit: r390975 - in /webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om: OMElement.java impl/builder/StAXBuilder.java impl/builder/StAXOMBuilder.java impl/dom/ElementImpl.java impl/llom/OMElementImpl.java

Author: chinthaka
Date: Mon Apr  3 01:04:56 2006
New Revision: 390975

URL: http://svn.apache.org/viewcvs?rev=390975&view=rev
Log:
- adding a method to set the ns without checking in the scope.
- refactoring the name of the setOMBuilderFactory

Modified:
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMElement.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXBuilder.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java
    webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/llom/OMElementImpl.java

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMElement.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMElement.java?rev=390975&r1=390974&r2=390975&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMElement.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/OMElement.java Mon Apr  3 01:04:56 2006
@@ -269,11 +269,21 @@
     public OMNamespace getNamespace() throws OMException;
 
     /**
-     * Sets the Namespace.
+     * Sets the Namespace. This will first search for a namespace in the current scope with the given
+     * namespace. If no namespace is found with the given details, then it will declare a new one. Then
+     * that namespace will be assigned to this element.
      *
      * @param namespace
      */
     public void setNamespace(OMNamespace namespace);
+
+    /**
+     * This will not search the namespace in the scope nor will declare in the current element, as
+     * in setNamespace(OMNamespace). This will just assign the given namespace to the element. 
+     * @param namespace
+     */
+    public void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace);
+
 
     /**
      * Gets the QName of this node.

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXBuilder.java?rev=390975&r1=390974&r2=390975&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXBuilder.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXBuilder.java Mon Apr  3 01:04:56 2006
@@ -98,11 +98,11 @@
     }
 
     /**
-     * Method setOmbuilderFactory.
+     * Method setOMBuilderFactory.
      *
      * @param ombuilderFactory
      */
-    public void setOmbuilderFactory(OMFactory ombuilderFactory) {
+    public void setOMBuilderFactory(OMFactory ombuilderFactory) {
         this.omfactory = ombuilderFactory;
     }
 

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java?rev=390975&r1=390974&r2=390975&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/builder/StAXOMBuilder.java Mon Apr  3 01:04:56 2006
@@ -316,7 +316,7 @@
                     namespace = node.declareNamespace(namespaceURI, prefix);
                 }
             }
-            node.setNamespace(namespace);
+            node.setNamespaceWithNoFindInCurrentScope(namespace);
         }
 
 

Modified: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=390975&r1=390974&r2=390975&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/ElementImpl.java Mon Apr  3 01:04:56 2006
@@ -1003,6 +1003,10 @@
         this.namespace = namespace;
     }
 
+    public void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace) {
+        this.namespace = namespace;
+    }
+
     /**
      * Creates a text node with the given value and adds it to the element.
      *

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=390975&r1=390974&r2=390975&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 Mon Apr  3 01:04:56 2006
@@ -869,6 +869,10 @@
         this.ns = nsObject;
     }
 
+    public void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace) {
+        this.ns = namespace;
+    }
+
     /**
      * Method getQName.
      *