ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r794873 - in /webservices/commons/trunk/modules/axiom/modules: axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
Date Thu, 16 Jul 2009 21:36:20 GMT
Author: veithen
Date: Thu Jul 16 21:36:20 2009
New Revision: 794873

URL: http://svn.apache.org/viewvc?rev=794873&view=rev
Log:
Removed the localName field in OMText implementations (LLOM and DOOM), because it is always
set to "Include". Also note that DOM specifies that Text#getLocalName() must return null,
which was not the case.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java?rev=794873&r1=794872&r2=794873&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
Thu Jul 16 21:36:20 2009
@@ -69,9 +69,6 @@
     /** Field nameSpace is used when serializing Binary stuff as MTOM optimized. */
     protected OMNamespace ns = null;
 
-    /** Field localName is used when serializing Binary stuff as MTOM optimized. */
-    protected String localName = "Include";
-
     /** Field attribute is used when serializing Binary stuff as MTOM optimized. */
     protected OMAttribute attribute;
 
@@ -150,7 +147,6 @@
         this.contentID = source.contentID;
         this.dataHandlerObject = source.dataHandlerObject;
         
-        this.localName = source.localName;
         if (source.ns != null) {
             this.ns = new OMNamespaceImpl(source.ns.getNamespaceURI(), 
                                           source.ns.getPrefix());
@@ -518,10 +514,9 @@
         String writer_prefix = writer.getPrefix(nameSpaceName);
         String prefix = XOP_NS.getPrefix();
         if (writer_prefix != null) {
-            writer.writeStartElement(nameSpaceName, this
-                    .getLocalName());
+            writer.writeStartElement(nameSpaceName, "Include");
         } else {
-            writer.writeStartElement(prefix, this.getLocalName(),
+            writer.writeStartElement(prefix, "Include",
                                      nameSpaceName);
             writer.setPrefix(prefix, nameSpaceName);
         }
@@ -579,10 +574,6 @@
         }
     }
 
-    public String getLocalName() {
-        return this.localName;
-    }
-
     /*
     * DOM-Level 3 methods
     */

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java?rev=794873&r1=794872&r2=794873&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
Thu Jul 16 21:36:20 2009
@@ -71,9 +71,6 @@
      */
     private Object dataHandlerObject = null;
 
-    /** Field localName used when serializing Binary stuff as MTOM optimized. */
-    protected String localName = "Include";
-
     /** Field attributes used when serializing Binary stuff as MTOM optimized. */
     protected OMAttribute attribute;
     private static final String EMTPY_STRING = "";
@@ -139,7 +136,6 @@
         this.contentID = source.contentID;
         this.dataHandlerObject = source.dataHandlerObject;
         
-        this.localName = source.localName;
         if (source.attribute != null) {
             this.attribute = factory.createOMAttribute(source.attribute.getLocalName(),
                                                        source.attribute.getNamespace(),
@@ -396,10 +392,6 @@
         }
     }
 
-    public String getLocalName() {
-        return localName;
-    }
-
     public java.io.InputStream getInputStream() throws OMException {
         if (isBinary) {
             if (dataHandlerObject == null) {
@@ -474,17 +466,16 @@
         String writer_prefix = writer.getPrefix(nameSpaceName);
         String prefix = XOP_NS.getPrefix();
         if (writer_prefix != null) {
-            writer.writeStartElement(nameSpaceName, this
-                    .getLocalName());
+            writer.writeStartElement(nameSpaceName, "Include");
         } else {
             // According to StAX, setPrefix must occur before
             // writeStartElement
             if (OMSerializerUtil.isSetPrefixBeforeStartElement(writer)) {
                 writer.setPrefix(prefix, nameSpaceName);
-                writer.writeStartElement(prefix, this.getLocalName(),
+                writer.writeStartElement(prefix, "Include",
                                          nameSpaceName);
             } else {
-                writer.writeStartElement(prefix, this.getLocalName(),
+                writer.writeStartElement(prefix, "Include",
                                          nameSpaceName);
                 writer.setPrefix(prefix, nameSpaceName);
             }



Mime
View raw message