You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ru...@apache.org on 2006/01/10 08:54:32 UTC

svn commit: r367519 [1/5] - in /webservices/axis2/trunk/java/modules: doom/src/org/apache/axis2/om/impl/dom/ doom/src/org/apache/axis2/om/impl/dom/factory/ doom/src/org/apache/axis2/om/impl/dom/jaxp/ integration/test/org/apache/axis2/security/

Author: ruchithf
Date: Mon Jan  9 23:53:43 2006
New Revision: 367519

URL: http://svn.apache.org/viewcvs?rev=367519&view=rev
Log:
cosmetic changes to DOOM and integration security test code, no changes to logic

Modified:
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttrImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttributeMap.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CharacterImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CommentImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMImplementationImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMNavigator.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMStAXWrapper.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMUtil.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DocumentFragmentimpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DocumentImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ElementImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NamedNodeMapImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NamespaceImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NodeImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/NodeListImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ParentNode.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/TextImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/factory/OMDOMFactory.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/jaxp/DocumentBuilderFactoryImpl.java
    webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/jaxp/DocumentBuilderImpl.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/AddressingMTOMSecurityTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/MTOMOptimizedSecurityTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario1Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario2Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario2aTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario3Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario4Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario5Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario6Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario7Test.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/ScenarioST1Test.java

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttrImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttrImpl.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttrImpl.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttrImpl.java Mon Jan  9 23:53:43 2006
@@ -32,335 +32,366 @@
 import javax.xml.stream.XMLStreamException;
 
 /**
- * Implementation of <code>org.w3c.dom.Attr</code> and 
+ * Implementation of <code>org.w3c.dom.Attr</code> and
  * <code>org.apache.axis2.om.OMAttribute</code>
  */
 public class AttrImpl extends NodeImpl implements OMAttribute, Attr {
 
-	/**
-	 * Name of the attribute
-	 */
-	private String attrName;
-	
-	/**
-	 * Attribute value
-	 */
-	private TextImpl attrValue;
-	
-	/**
-	 * Attribute namespace
-	 */
-	private NamespaceImpl namespace;
-	
-	/**
-	 * Flag to indicate whether this attr is used or not
-	 */
-	private boolean used;
-	
-	/**
-	 * Owner of this attribute
-	 */
-	protected ParentNode parent;
-	
-	protected AttrImpl(DocumentImpl ownerDocument) {
-		super(ownerDocument);
-	}
-	
-	public AttrImpl(DocumentImpl ownerDocument, String localName, OMNamespace ns, String value) {
-		super(ownerDocument);
-		this.attrName = localName;
-		this.attrValue = new TextImpl(ownerDocument, value);
-		this.namespace = (NamespaceImpl)ns;
-	}
-	
-	public AttrImpl(DocumentImpl ownerDocument, String name, String value) {
-		super(ownerDocument);
-		this.attrName = name;
-		this.attrValue = new TextImpl(ownerDocument,value);
-	}
-	
-	public AttrImpl(DocumentImpl ownerDocument, String name) {
-		super(ownerDocument);
-		this.attrName = name;
-	}
-
-	public AttrImpl(DocumentImpl ownerDocument, String localName, OMNamespace namespace) {
-		super(ownerDocument);
-		this.attrName = localName;
-		this.namespace = (NamespaceImpl)namespace;
-	}
-	
-	///
-	///org.w3c.dom.Node methods
-	///
-	/**
-	 * Returns the name of this attribute. 
-	 */
-	public String getNodeName() {
-		return (this.namespace != null && !"".equals(this.namespace)) ? this.namespace
-				.getPrefix()
-				+ ":" + this.attrName
-				: this.attrName;
-	}
-	
-	/**
-	 * Returns the node type.
-	 * @see org.w3c.dom.Node#getNodeType()
-	 */
-	public short getNodeType() {
-		return Node.ATTRIBUTE_NODE;
-	}
-	
-	/**
-	 * Returns the value of this attribute.
-	 * @see org.w3c.dom.Node#getNodeValue()
-	 */
-	public String getNodeValue() throws DOMException {
-		return (this.attrValue == null) ? "" : this.attrValue.getData();
-	}
-	
-	/**
-	 * Returns the value of this attribute.
-	 * @see org.w3c.dom.Attr#getValue()
-	 */
-	public String getValue() {
-		return (this.attrValue == null) ? null:this.attrValue.getText();
-	}
-
-	///
-	///org.w3c.dom.Attr methods
-	///
-	public String getName() {
-		return (this.namespace==null) ? this.attrName:OMConstants.XMLNS_NS_PREFIX + ":" + this.attrName;
-	}
-	
-	/**
-	 * Returns the owner element.
-	 * @see org.w3c.dom.Attr#getOwnerElement()
-	 */
-	public Element getOwnerElement() {
-		//Owned is set to an element instance when the attribute is added to an element
-		return (Element) (isOwned() ? ownerNode : null);
-	}
-
-	public boolean getSpecified() {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
-	}
-
-	/**
-	 * Not supported: Cannot detach attributes.
-	 * Use the operations available in the owner node.
-	 * @see org.apache.axis2.om.OMNode#detach()
-	 */
-	public OMNode detach() throws OMException {
-		throw new UnsupportedOperationException("Not supported");
-	}
-
-	/**
-	 * Not supported: Cannot discard attributes.
-	 * Use the operations available in the owner node.
-	 * @see org.apache.axis2.om.OMNode#discard()
-	 */
-	public void discard() throws OMException {
-		throw new UnsupportedOperationException("Not supported");
-	}
-
-	/**
-	 * Returns the type of this attribute node.
-	 * @see org.apache.axis2.om.OMNode#getType()
-	 */
-	public int getType() {
-		return Node.ATTRIBUTE_NODE;
-	}
-
-	/**
-	 * This is not supported since attributes serialization is handled by
-	 * the serialization of the owner nodes.
-	 * @see org.apache.axis2.om.impl.OMNodeEx#serialize(org.apache.axis2.om.impl.OMOutputImpl)
-	 */
-	public void serialize(OMOutputImpl omOutput) throws XMLStreamException {
-		throw new UnsupportedOperationException("Not supported");
-	}
-
-	/**
-	 * This is not supported since attributes serialization is handled by
-	 * the serialization of the owner nodes.
-	 * @see org.apache.axis2.om.impl.OMNodeEx#serializeAndConsume(org.apache.axis2.om.impl.OMOutputImpl)
-	 */
-	public void serializeAndConsume(OMOutputImpl omOutput) throws XMLStreamException {
-		throw new UnsupportedOperationException("Not supported");
-	}
-
-	/**
-	 * Returns the namespace of the attribute as an <code>OMNamespace</code>.
-	 * @see org.apache.axis2.om.OMAttribute#getNamespace()
-	 */
-	public OMNamespace getNamespace() {
-		return this.namespace;
-	}
-
-	/**
-	 * Returns a qname representing the attribute.
-	 * @see org.apache.axis2.om.OMAttribute#getQName()
-	 */
-	public QName getQName() {
-		return (this.namespace == null) ? new QName(this.attrName) : 
-			new QName(this.namespace.getName(), this.attrName, this.namespace
-						.getPrefix());
-		
-	}
-
-	/**
-	 * Returns the attribute value.
-	 * @see org.apache.axis2.om.OMAttribute#getAttributeValue()
-	 */
-	public String getAttributeValue() {
-		return this.attrValue.getText();
-	}
-
-	/**
-	 * Sets the name of attribute.
-	 * @see org.apache.axis2.om.OMAttribute#setLocalName(java.lang.String)
-	 */
-	public void setLocalName(String localName) {
-		this.attrName = localName;
-	}
-
-	/**
-	 * Sets the namespace of this attribute node.
-	 * @see org.apache.axis2.om.OMAttribute#setOMNamespace(org.apache.axis2.om.OMNamespace)
-	 */
-	public void setOMNamespace(OMNamespace omNamespace) {
-		this.namespace = (NamespaceImpl)omNamespace;
-	}
-
-	/**
-	 * Sets the attribute value.
-	 * @see org.apache.axis2.om.OMAttribute#setAttributeValue(java.lang.String)
-	 */
-	public void setAttributeValue(String value) {
-		if(isReadonly()) {
-			String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null);
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg);
-		}
-		this.attrValue = (TextImpl)this.getOwnerDocument().createTextNode(value);
-	}
-
-	/**
-	 * Sets the parent element to the given OMContainer.
-	 * @see org.apache.axis2.om.impl.OMNodeEx#setParent(org.apache.axis2.om.OMContainer)
-	 */
-	public void setParent(OMContainer element) {
-		this.parent = (ParentNode)element;
-	}
-
-	/**
-	 * Sets the type.
-	 * NOT IMPLEMENTED: Unnecessary
-	 * @see org.apache.axis2.om.impl.OMNodeEx#setType(int)
-	 */
-	public void setType(int nodeType) throws OMException {
-		//not necessary ???
-	}
-
-	/**
-	 * @return Returns boolean.
-	 */
-	protected boolean isUsed() {
-		return used;
-	}
-
-	/**
-	 * @param used The used to set.
-	 */
-	protected void setUsed(boolean used) {
-		this.used = used;
-	}
-
-	/**
-	 * Sets the value of the attribute.
-	 * @see org.w3c.dom.Attr#setValue(java.lang.String)
-	 */
-	public void setValue(String value) throws DOMException {
-		this.attrValue = (TextImpl) this.getOwnerDocument().createTextNode(
-				value);
-	}
-
-	/**
-	 * Returns the parent node of this attribute.
-	 * @see org.apache.axis2.om.OMNode#getParent()
-	 */
-	public OMContainer getParent() {
-		return this.parent;
-	}
-	
-	/**
-	 * Returns the attribute name.
-	 * @see org.w3c.dom.Node#getLocalName()
-	 */
+    /**
+     * Name of the attribute
+     */
+    private String attrName;
+
+    /**
+     * Attribute value
+     */
+    private TextImpl attrValue;
+
+    /**
+     * Attribute namespace
+     */
+    private NamespaceImpl namespace;
+
+    /**
+     * Flag to indicate whether this attr is used or not
+     */
+    private boolean used;
+
+    /**
+     * Owner of this attribute
+     */
+    protected ParentNode parent;
+
+    protected AttrImpl(DocumentImpl ownerDocument) {
+        super(ownerDocument);
+    }
+
+    public AttrImpl(DocumentImpl ownerDocument, String localName,
+            OMNamespace ns, String value) {
+        super(ownerDocument);
+        this.attrName = localName;
+        this.attrValue = new TextImpl(ownerDocument, value);
+        this.namespace = (NamespaceImpl) ns;
+    }
+
+    public AttrImpl(DocumentImpl ownerDocument, String name, String value) {
+        super(ownerDocument);
+        this.attrName = name;
+        this.attrValue = new TextImpl(ownerDocument, value);
+    }
+
+    public AttrImpl(DocumentImpl ownerDocument, String name) {
+        super(ownerDocument);
+        this.attrName = name;
+    }
+
+    public AttrImpl(DocumentImpl ownerDocument, String localName,
+            OMNamespace namespace) {
+        super(ownerDocument);
+        this.attrName = localName;
+        this.namespace = (NamespaceImpl) namespace;
+    }
+
+    // /
+    // /org.w3c.dom.Node methods
+    // /
+    /**
+     * Returns the name of this attribute.
+     */
+    public String getNodeName() {
+        return (this.namespace != null && !"".equals(this.namespace)) 
+                ? this.namespace.getPrefix()+ ":" + this.attrName
+                : this.attrName;
+    }
+
+    /**
+     * Returns the node type.
+     * 
+     * @see org.w3c.dom.Node#getNodeType()
+     */
+    public short getNodeType() {
+        return Node.ATTRIBUTE_NODE;
+    }
+
+    /**
+     * Returns the value of this attribute.
+     * 
+     * @see org.w3c.dom.Node#getNodeValue()
+     */
+    public String getNodeValue() throws DOMException {
+        return (this.attrValue == null) ? "" : this.attrValue.getData();
+    }
+
+    /**
+     * Returns the value of this attribute.
+     * 
+     * @see org.w3c.dom.Attr#getValue()
+     */
+    public String getValue() {
+        return (this.attrValue == null) ? null : this.attrValue.getText();
+    }
+
+    // /
+    // /org.w3c.dom.Attr methods
+    // /
+    public String getName() {
+        return (this.namespace == null) ? this.attrName
+                : OMConstants.XMLNS_NS_PREFIX + ":" + this.attrName;
+    }
+
+    /**
+     * Returns the owner element.
+     * 
+     * @see org.w3c.dom.Attr#getOwnerElement()
+     */
+    public Element getOwnerElement() {
+        // Owned is set to an element instance when the attribute is added to an
+        // element
+        return (Element) (isOwned() ? ownerNode : null);
+    }
+
+    public boolean getSpecified() {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    /**
+     * Not supported: Cannot detach attributes. Use the operations available in
+     * the owner node.
+     * 
+     * @see org.apache.axis2.om.OMNode#detach()
+     */
+    public OMNode detach() throws OMException {
+        throw new UnsupportedOperationException("Not supported");
+    }
+
+    /**
+     * Not supported: Cannot discard attributes. Use the operations available in
+     * the owner node.
+     * 
+     * @see org.apache.axis2.om.OMNode#discard()
+     */
+    public void discard() throws OMException {
+        throw new UnsupportedOperationException("Not supported");
+    }
+
+    /**
+     * Returns the type of this attribute node.
+     * 
+     * @see org.apache.axis2.om.OMNode#getType()
+     */
+    public int getType() {
+        return Node.ATTRIBUTE_NODE;
+    }
+
+    /**
+     * This is not supported since attributes serialization is handled by the
+     * serialization of the owner nodes.
+     * 
+     * @see org.apache.axis2.om.impl.OMNodeEx#serialize
+     * (org.apache.axis2.om.impl.OMOutputImpl)
+     */
+    public void serialize(OMOutputImpl omOutput) throws XMLStreamException {
+        throw new UnsupportedOperationException("Not supported");
+    }
+
+    /**
+     * This is not supported since attributes serialization is handled by the
+     * serialization of the owner nodes.
+     * 
+     * @see org.apache.axis2.om.impl.OMNodeEx#serializeAndConsume
+     * (org.apache.axis2.om.impl.OMOutputImpl)
+     */
+    public void serializeAndConsume(OMOutputImpl omOutput)
+            throws XMLStreamException {
+        throw new UnsupportedOperationException("Not supported");
+    }
+
+    /**
+     * Returns the namespace of the attribute as an <code>OMNamespace</code>.
+     * 
+     * @see org.apache.axis2.om.OMAttribute#getNamespace()
+     */
+    public OMNamespace getNamespace() {
+        return this.namespace;
+    }
+
+    /**
+     * Returns a qname representing the attribute.
+     * 
+     * @see org.apache.axis2.om.OMAttribute#getQName()
+     */
+    public QName getQName() {
+        return (this.namespace == null) ? new QName(this.attrName) : new QName(
+                this.namespace.getName(), this.attrName, this.namespace
+                        .getPrefix());
+
+    }
+
+    /**
+     * Returns the attribute value.
+     * 
+     * @see org.apache.axis2.om.OMAttribute#getAttributeValue()
+     */
+    public String getAttributeValue() {
+        return this.attrValue.getText();
+    }
+
+    /**
+     * Sets the name of attribute.
+     * 
+     * @see org.apache.axis2.om.OMAttribute#setLocalName(java.lang.String)
+     */
+    public void setLocalName(String localName) {
+        this.attrName = localName;
+    }
+
+    /**
+     * Sets the namespace of this attribute node.
+     * 
+     * @see org.apache.axis2.om.OMAttribute#setOMNamespace
+     * (org.apache.axis2.om.OMNamespace)
+     */
+    public void setOMNamespace(OMNamespace omNamespace) {
+        this.namespace = (NamespaceImpl) omNamespace;
+    }
+
+    /**
+     * Sets the attribute value.
+     * 
+     * @see org.apache.axis2.om.OMAttribute#setAttributeValue(java.lang.String)
+     */
+    public void setAttributeValue(String value) {
+        if (isReadonly()) {
+            String msg = DOMMessageFormatter.formatMessage(
+                    DOMMessageFormatter.DOM_DOMAIN,
+                    "NO_MODIFICATION_ALLOWED_ERR", null);
+            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                    msg);
+        }
+        this.attrValue = (TextImpl) this.getOwnerDocument().createTextNode(
+                value);
+    }
+
+    /**
+     * Sets the parent element to the given OMContainer.
+     * 
+     * @see org.apache.axis2.om.impl.OMNodeEx#setParent
+     * (org.apache.axis2.om.OMContainer)
+     */
+    public void setParent(OMContainer element) {
+        this.parent = (ParentNode) element;
+    }
+
+    /**
+     * Sets the type. NOT IMPLEMENTED: Unnecessary.
+     * 
+     * @see org.apache.axis2.om.impl.OMNodeEx#setType(int)
+     */
+    public void setType(int nodeType) throws OMException {
+        // not necessary ???
+    }
+
+    /**
+     * @return Returns boolean.
+     */
+    protected boolean isUsed() {
+        return used;
+    }
+
+    /**
+     * @param used
+     *            The used to set.
+     */
+    protected void setUsed(boolean used) {
+        this.used = used;
+    }
+
+    /**
+     * Sets the value of the attribute.
+     * 
+     * @see org.w3c.dom.Attr#setValue(java.lang.String)
+     */
+    public void setValue(String value) throws DOMException {
+        this.attrValue = (TextImpl) this.getOwnerDocument().createTextNode(
+                value);
+    }
+
+    /**
+     * Returns the parent node of this attribute.
+     * 
+     * @see org.apache.axis2.om.OMNode#getParent()
+     */
+    public OMContainer getParent() {
+        return this.parent;
+    }
+
+    /**
+     * Returns the attribute name.
+     * 
+     * @see org.w3c.dom.Node#getLocalName()
+     */
     public String getLocalName() {
-        return (this.namespace == null) ? null : DOMUtil.getLocalName(this.attrName);
-//    	return this.attrName;
+        return (this.namespace == null) ? null : DOMUtil
+                .getLocalName(this.attrName);
     }
 
     /**
      * Returns the namespace URI of this attr node.
+     * 
      * @see org.w3c.dom.Node#getNamespaceURI()
      */
     public String getNamespaceURI() {
-		if(this.namespace != null) {
-			return namespace.getName();
-		} 
-//		else if (this.attrName != null && this.attrName.startsWith(OMConstants.XMLNS_NS_PREFIX + ":")) {
-//			return OMConstants.XMLNS_NS_URI;
-//		}
-//		
-		return null;
-	}
-    
+        if (this.namespace != null) {
+            return namespace.getName();
+        }
+        return null;
+    }
+
     /**
      * Returns the namespace prefix of this attr node.
+     * 
      * @see org.w3c.dom.Node#getPrefix()
      */
-    public String getPrefix()
-    {
-    	//TODO Error checking
-        return (this.namespace == null)?null:this.namespace.getPrefix();
+    public String getPrefix() {
+        // TODO Error checking
+        return (this.namespace == null) ? null : this.namespace.getPrefix();
     }
-    
+
     public Node cloneNode(boolean deep) {
 
         AttrImpl clone = (AttrImpl) super.cloneNode(deep);
 
-    	if (clone.attrValue == null) {
+        if (clone.attrValue == null) {
             // Need to break the association w/ original kids
             clone.attrValue = new TextImpl(this.attrValue.toString());
-            if(this.attrValue.nextSibling != null) {
-            	throw new UnsupportedOperationException("Attribute value can contain only a text node with out any siblings");
+            if (this.attrValue.nextSibling != null) {
+                throw new UnsupportedOperationException(
+                        "Attribute value can contain only a text " +
+                        "node with out any siblings");
             }
-    	}
+        }
         clone.isSpecified(true);
         return clone;
     }
-    
 
-	/*
-	 * DOM-Level 3 methods
-	 */
-	public TypeInfo getSchemaTypeInfo() {
-		// TODO TODO
-		throw new UnsupportedOperationException("TODO");
-	}
-
-	public boolean isId() {
-		// TODO TODO
-		throw new UnsupportedOperationException("TODO");
-	}    
-    
-
-	public String toString() {
-		return (this.namespace == null)?this.attrName: this.namespace.getPrefix() + ":" + this.attrName;
-	}
-	
+    /*
+     * DOM-Level 3 methods
+     */
+    public TypeInfo getSchemaTypeInfo() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public boolean isId() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public String toString() {
+        return (this.namespace == null) ? this.attrName : this.namespace
+                .getPrefix()
+                + ":" + this.attrName;
+    }
+
 }

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttributeMap.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttributeMap.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttributeMap.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/AttributeMap.java Mon Jan  9 23:53:43 2006
@@ -22,67 +22,75 @@
 
 public class AttributeMap extends NamedNodeMapImpl {
 
-	/**
-	 * @param ownerNode
-	 */
-	protected AttributeMap(ParentNode ownerNode) {
-		super(ownerNode);
-	}
-	
-
-	public Node removeNamedItem(String name) throws DOMException {
-		//TODO Set used to false
-		return super.removeNamedItem(name);
-	}
-	
-	public Node removeNamedItemNS(String namespaceURI, String name)
-			throws DOMException {
-		// TODO 
-		return super.removeNamedItemNS(namespaceURI, name);
-	}
-	
-	/**
-	 * Almost a copy of the Xerces impl.
-	 */
-	public Node setNamedItem(Node attribute) throws DOMException {
-        
-		if (isReadOnly()) {
-            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null);
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg);
+    /**
+     * @param ownerNode
+     */
+    protected AttributeMap(ParentNode ownerNode) {
+        super(ownerNode);
+    }
+
+    public Node removeNamedItem(String name) throws DOMException {
+        // TODO Set used to false
+        return super.removeNamedItem(name);
+    }
+
+    public Node removeNamedItemNS(String namespaceURI, String name)
+            throws DOMException {
+        // TODO
+        return super.removeNamedItemNS(namespaceURI, name);
+    }
+
+    /**
+     * Almost a copy of the Xerces impl.
+     */
+    public Node setNamedItem(Node attribute) throws DOMException {
+
+        if (isReadOnly()) {
+            String msg = DOMMessageFormatter.formatMessage(
+                    DOMMessageFormatter.DOM_DOMAIN,
+                    "NO_MODIFICATION_ALLOWED_ERR", null);
+            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                    msg);
         }
         if (attribute.getOwnerDocument() != ownerNode.getOwnerDocument()) {
-            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
+            String msg = DOMMessageFormatter.formatMessage(
+                    DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
             throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg);
         }
         if (attribute.getNodeType() != Node.ATTRIBUTE_NODE) {
-            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null);
+            String msg = DOMMessageFormatter.formatMessage(
+                    DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR",
+                    null);
             throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, msg);
         }
-        
-        AttrImpl attr = (AttrImpl)attribute;
-        if(attr.isOwned()) { //If the attribute is owned then:
-        	if(attr.getOwnerElement() != this.ownerNode) // the owner must be the owner of this list
-        		throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR, 
-        				DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, 
-        						"INUSE_ATTRIBUTE_ERR", null));
-        	else
-        		return attr; //No point adding the 'same' attr again to the same element
-        }
-        
-        
-        attr.parent = this.ownerNode; //Set the owner node
-        attr.isOwned(true); //To indicate that this attr belong to an element
-        attr.setUsed(true); //Setting used to true 
-        
-        int i = findNamePoint(attr.getNodeName(),0);
-        
+
+        AttrImpl attr = (AttrImpl) attribute;
+        if (attr.isOwned()) { // If the attribute is owned then:
+            if (attr.getOwnerElement() != this.ownerNode) // the owner must be
+                                                            // the owner of this
+                                                            // list
+                throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
+                        DOMMessageFormatter.formatMessage(
+                                DOMMessageFormatter.DOM_DOMAIN,
+                                "INUSE_ATTRIBUTE_ERR", null));
+            else
+                return attr; // No point adding the 'same' attr again to the
+                                // same element
+        }
+
+        attr.parent = this.ownerNode; // Set the owner node
+        attr.isOwned(true); // To indicate that this attr belong to an element
+        attr.setUsed(true); // Setting used to true
+
+        int i = findNamePoint(attr.getNodeName(), 0);
+
         AttrImpl previous = null;
-        if (i >= 0) { //There's an attribute already with this attr's name
+        if (i >= 0) { // There's an attribute already with this attr's name
             previous = (AttrImpl) nodes.elementAt(i);
-            nodes.setElementAt(attr,i);
+            nodes.setElementAt(attr, i);
             previous.parent = this.ownerNode;
             previous.isOwned(false);
-            
+
             // make sure it won't be mistaken with defaults in case it's reused
             previous.isSpecified(true);
         } else {
@@ -92,10 +100,10 @@
             }
             nodes.insertElementAt(attr, i);
         }
-        
-//        - Not sure whether we really need this
-//        // notify document 
-//        ownerNode.getOwnerDocument().setAttrNode(attr, previous);
+
+        // - Not sure whether we really need this
+        // // notify document
+        // ownerNode.getOwnerDocument().setAttrNode(attr, previous);
 
         // If the new attribute is not normalized,
         // the owning element is inherently not normalized.
@@ -103,56 +111,66 @@
             ownerNode.isNormalized(false);
         }
         return previous;
-        
-	}
-	
-	/**
-	 * Almost a copy of the Xerces impl.
-	 */
-	public Node setNamedItemNS(Node attribute) throws DOMException {
-		if (isReadOnly()) {
-            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null);
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg);
+
+    }
+
+    /**
+     * Almost a copy of the Xerces impl.
+     */
+    public Node setNamedItemNS(Node attribute) throws DOMException {
+        if (isReadOnly()) {
+            String msg = DOMMessageFormatter.formatMessage(
+                    DOMMessageFormatter.DOM_DOMAIN,
+                    "NO_MODIFICATION_ALLOWED_ERR", null);
+            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
+                    msg);
         }
         if (attribute.getOwnerDocument() != ownerNode.getOwnerDocument()) {
-            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
+            String msg = DOMMessageFormatter.formatMessage(
+                    DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
             throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, msg);
         }
         if (attribute.getNodeType() != Node.ATTRIBUTE_NODE) {
-            String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null);
+            String msg = DOMMessageFormatter.formatMessage(
+                    DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR",
+                    null);
             throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, msg);
         }
-        
-        AttrImpl attr = (AttrImpl)attribute;
-        if(attr.isOwned()) { //If the attribute is owned then:
-        	if(attr.getOwnerElement() != this.ownerNode) // the owner must be the owner of this list
-        		throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR, 
-        				DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, 
-        						"INUSE_ATTRIBUTE_ERR", null));
-        	else
-        		return attr; //No point adding the 'same' attr again to the same element
-        }
-        
-        attr.ownerNode = (DocumentImpl)this.ownerNode.getOwnerDocument(); //Set the owner node
-        attr.isOwned(true); //To indicate that this attr belong to an element        
-        
+
+        AttrImpl attr = (AttrImpl) attribute;
+        if (attr.isOwned()) { // If the attribute is owned then:
+            //the owner must be the owner of this list
+            if (attr.getOwnerElement() != this.ownerNode) 
+                throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
+                        DOMMessageFormatter.formatMessage(
+                                DOMMessageFormatter.DOM_DOMAIN,
+                                "INUSE_ATTRIBUTE_ERR", null));
+            else
+                return attr; // No point adding the 'same' attr again to the
+                                // same element
+        }
+        //Set the owner node
+        attr.ownerNode = (DocumentImpl) this.ownerNode.getOwnerDocument(); 
+        attr.isOwned(true); // To indicate that this attr belong to an element
+
         int i = findNamePoint(attr.getNamespaceURI(), attr.getLocalName());
         AttrImpl previous = null;
-        
+
         if (i >= 0) {
             previous = (AttrImpl) nodes.elementAt(i);
-            nodes.setElementAt(attr,i);
-            previous.ownerNode = (DocumentImpl)this.ownerNode.getOwnerDocument();
+            nodes.setElementAt(attr, i);
+            previous.ownerNode = (DocumentImpl) this.ownerNode
+                    .getOwnerDocument();
             previous.isOwned(false);
             // make sure it won't be mistaken with defaults in case it's reused
             previous.isSpecified(true);
         } else {
             // If we can't find by namespaceURI, localName, then we find by
             // nodeName so we know where to insert.
-            i = findNamePoint(attr.getNodeName(),0);
-            if (i >=0) {
+            i = findNamePoint(attr.getNodeName(), 0);
+            if (i >= 0) {
                 previous = (AttrImpl) nodes.elementAt(i);
-                nodes.insertElementAt(attr,i);
+                nodes.insertElementAt(attr, i);
             } else {
                 i = -1 - i; // Insert point (may be end of list)
                 if (null == nodes) {
@@ -161,26 +179,22 @@
                 nodes.insertElementAt(attr, i);
             }
         }
-        
+
         // If the new attribute is not normalized,
         // the owning element is inherently not normalized.
         if (!attr.isNormalized()) {
             ownerNode.isNormalized(false);
         }
         return previous;
-	}
-	
-	
+    }
 
     /**
-     * BORROWED from Xerces impl.
-     * Cloning a NamedNodeMap is a DEEP OPERATION; it always clones
-     * all the nodes contained in the map.
+     * BORROWED from Xerces impl. Cloning a NamedNodeMap is a DEEP OPERATION; it
+     * always clones all the nodes contained in the map.
      */
-     
+
     public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) {
-        AttributeMap newmap =
-            new AttributeMap((ParentNode) ownerNode);
+        AttributeMap newmap = new AttributeMap((ParentNode) ownerNode);
         newmap.hasDefaults(hasDefaults());
         newmap.cloneContent(this);
         return newmap;
@@ -209,6 +223,5 @@
             }
         }
     } // cloneContent():AttributeMap
-
 
 }

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CharacterImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CharacterImpl.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CharacterImpl.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CharacterImpl.java Mon Jan  9 23:53:43 2006
@@ -67,7 +67,8 @@
 	/**
 	 * If the given data is null the content will be deleted.
 	 */
-	public void replaceData(int offset, int count, String data) throws DOMException {
+	public void replaceData(int offset, int count, String data) throws
+                                                             DOMException {
 		
 		if (this.isReadonly()) {
 			throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
@@ -144,8 +145,9 @@
 	
 	/**
 	 * Extracts a range of data from the node.
-	 * @return Returns the specified substring. If the sum of offset and count exceeds
-	 * the length, then all 16-bit units to the end of the data are returned.
+	 * @return Returns the specified substring. If the sum of offset and count 
+     * exceeds the length, then all 16-bit units to the end of the data are 
+     * returned.
 	 */
 	public String substringData(int offset, int count) throws DOMException {
 		if(offset < 0 || offset > this.textValue.length() || count < 0) {

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/ChildNode.java Mon Jan  9 23:53:43 2006
@@ -29,7 +29,6 @@
 
     protected ParentNode parentNode;
 
-
     /**
      * @param ownerDocument
      */
@@ -60,9 +59,9 @@
         return this.previousSibling;
     }
 
-    ///
-    ///OMNode methods
-    ///
+    // /
+    // /OMNode methods
+    // /
     public void setNextOMSibling(OMNode node) {
         if (node instanceof ChildNode)
             this.nextSibling = (ChildNode) node;
@@ -89,7 +88,8 @@
         if (element instanceof ParentNode)
             this.parentNode = (ParentNode) element;
         else
-            throw new OMException("The given parent is not of the type " + ParentNode.class);
+            throw new OMException("The given parent is not of the type "
+                    + ParentNode.class);
 
     }
 
@@ -104,8 +104,9 @@
                     this.parentNode.firstChild = null;
                     this.parentNode.lastChild = null;
                 }
-            } else if(nextSibling != null){
-                ((OMNodeEx) this.getPreviousOMSibling()).setNextOMSibling(nextSibling);
+            } else if (nextSibling != null) {
+                ((OMNodeEx) this.getPreviousOMSibling())
+                        .setNextOMSibling(nextSibling);
             }
             if (this.nextSibling != null) {
                 this.nextSibling.setPreviousOMSibling(this.previousSibling);
@@ -138,7 +139,8 @@
             this.nextSibling = domSibling;
 
         } else {
-            throw new OMException("The given child is not of type " + ChildNode.class);
+            throw new OMException("The given child is not of type "
+                    + ChildNode.class);
         }
     }
 
@@ -146,15 +148,15 @@
      * Inserts the given sibling before this item.
      */
     public void insertSiblingBefore(OMNode sibling) throws OMException {
-//		((OMNodeEx)sibling).setParent(this.parentNode);
+        // ((OMNodeEx)sibling).setParent(this.parentNode);
         if (sibling instanceof ChildNode) {
-//			ChildNode domSibling = (ChildNode)sibling;
-//			domSibling.nextSibling = this;
-//			if(this.previousSibling != null) {
-//				this.previousSibling.nextSibling = domSibling;
-//			}
-//			domSibling.previousSibling = this.previousSibling;
-//			this.previousSibling = domSibling;
+            // ChildNode domSibling = (ChildNode)sibling;
+            // domSibling.nextSibling = this;
+            // if(this.previousSibling != null) {
+            // this.previousSibling.nextSibling = domSibling;
+            // }
+            // domSibling.previousSibling = this.previousSibling;
+            // this.previousSibling = domSibling;
             ChildNode siblingImpl = (ChildNode) sibling;
             siblingImpl.nextSibling = this;
             if (previousSibling == null) {
@@ -168,11 +170,11 @@
             previousSibling = siblingImpl;
 
         } else {
-            throw new OMException("The given child is not of type " + ChildNode.class);
+            throw new OMException("The given child is not of type "
+                    + ChildNode.class);
         }
 
     }
-
 
     public Node cloneNode(boolean deep) {
 

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CommentImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CommentImpl.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CommentImpl.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/CommentImpl.java Mon Jan  9 23:53:43 2006
@@ -27,49 +27,50 @@
 
 public class CommentImpl extends CharacterImpl implements Comment, OMComment {
 
-	public CommentImpl(DocumentImpl ownerNode) {
-		super(ownerNode);
-		this.done = true;
-	}
-
-	public CommentImpl(DocumentImpl ownerNode, String value) {
-		super(ownerNode, value);
-		this.done = true;
-	}
-
-	public String getNodeName() {
-		return "#comment";
-	}
-
-	public short getNodeType() {
-		return Node.COMMENT_NODE;
-	}
-
-	public String getValue() {
-		return this.getData();
-	}
-
-	public void setValue(String text) {
-		this.textValue.delete(0,this.textValue.length());
-		this.textValue.append(text);
-	}
-
-	public int getType() {
-		return Node.COMMENT_NODE;
-	}
-
-	public void setType(int nodeType) throws OMException {
-		throw new UnsupportedOperationException("You should not set the node type of a comment");
-	}
+    public CommentImpl(DocumentImpl ownerNode) {
+        super(ownerNode);
+        this.done = true;
+    }
+
+    public CommentImpl(DocumentImpl ownerNode, String value) {
+        super(ownerNode, value);
+        this.done = true;
+    }
+
+    public String getNodeName() {
+        return "#comment";
+    }
+
+    public short getNodeType() {
+        return Node.COMMENT_NODE;
+    }
+
+    public String getValue() {
+        return this.getData();
+    }
+
+    public void setValue(String text) {
+        this.textValue.delete(0, this.textValue.length());
+        this.textValue.append(text);
+    }
+
+    public int getType() {
+        return Node.COMMENT_NODE;
+    }
+
+    public void setType(int nodeType) throws OMException {
+        throw new UnsupportedOperationException(
+                "You should not set the node type of a comment");
+    }
 
-	public void serialize(OMOutputImpl omOutput) throws XMLStreamException {
+    public void serialize(OMOutputImpl omOutput) throws XMLStreamException {
         XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         writer.writeComment(this.textValue.toString());
-	}
+    }
 
-	public void serializeAndConsume(OMOutputImpl omOutput)
-			throws XMLStreamException {
-		serialize(omOutput);
-	}
+    public void serializeAndConsume(OMOutputImpl omOutput)
+            throws XMLStreamException {
+        serialize(omOutput);
+    }
 
 }

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMImplementationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMImplementationImpl.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMImplementationImpl.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMImplementationImpl.java Mon Jan  9 23:53:43 2006
@@ -22,34 +22,36 @@
 
 public class DOMImplementationImpl implements DOMImplementation {
 
-	public boolean hasFeature(String arg0, String arg1) {
-		// TODO 
-		throw new UnsupportedOperationException("TODO");
-	}
-
-	public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
-			throws DOMException {
-		//TODO Handle docType stuff
-		DocumentImpl doc = new DocumentImpl();
-		
-		new ElementImpl(doc,DOMUtil.getLocalName(qualifiedName),new NamespaceImpl(namespaceURI, DOMUtil.getPrefix(qualifiedName)));
-		
-		return doc;
-	}
-
-	public DocumentType createDocumentType(String qualifiedName, String publicId, 
-			String systemId) throws DOMException {
-		// TODO 
-		throw new UnsupportedOperationException("TODO");
-	}
-
-	/*
-	 * DOM-Level 3 methods
-	 */
-	
-	public Object getFeature(String arg0, String arg1) {
-		// TODO TODO
-		throw new UnsupportedOperationException("TODO");
-	}
+    public boolean hasFeature(String arg0, String arg1) {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public Document createDocument(String namespaceURI, String qualifiedName,
+            DocumentType doctype) throws DOMException {
+        // TODO Handle docType stuff
+        DocumentImpl doc = new DocumentImpl();
+
+        new ElementImpl(doc, DOMUtil.getLocalName(qualifiedName),
+                new NamespaceImpl(namespaceURI, DOMUtil
+                        .getPrefix(qualifiedName)));
+
+        return doc;
+    }
+
+    public DocumentType createDocumentType(String qualifiedName,
+            String publicId, String systemId) throws DOMException {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    /*
+     * DOM-Level 3 methods
+     */
+
+    public Object getFeature(String arg0, String arg1) {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
 
 }

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMMessageFormatter.java Mon Jan  9 23:53:43 2006
@@ -26,45 +26,58 @@
  */
 public class DOMMessageFormatter {
     public static final String DOM_DOMAIN = "http://www.w3.org/dom/DOMTR";
-    public static final String XML_DOMAIN = "http://www.w3.org/TR/1998/REC-xml-19980210";
-    public static final String SERIALIZER_DOMAIN = "http://apache.org/xml/serializer";
-    
+
+    public static final String XML_DOMAIN = 
+                                "http://www.w3.org/TR/1998/REC-xml-19980210";
+
+    public static final String SERIALIZER_DOMAIN = 
+                                "http://apache.org/xml/serializer";
+
     private static ResourceBundle domResourceBundle = null;
+
     private static ResourceBundle xmlResourceBundle = null;
+
     private static ResourceBundle serResourceBundle = null;
+
     private static Locale locale = null;
-    
-    
-    public static final String LEVEL3_NOT_SUPPORTED= "DOM Level 3 operations are not supported";
-    public static final String NOT_REQUIRED_FOR_XMLSEC_OR_WSS4J= "This method is not required by Apache XML-Security Impl or WSS4J";
-    
-    DOMMessageFormatter(){
+
+    public static final String LEVEL3_NOT_SUPPORTED = 
+                                "DOM Level 3 operations are not supported";
+
+    public static final String NOT_REQUIRED_FOR_XMLSEC_OR_WSS4J = 
+            "This method is not required by Apache XML-Security Impl or WSS4J";
+
+    DOMMessageFormatter() {
         locale = Locale.getDefault();
     }
+
     /**
-     * Formats a message with the specified arguments using the given
-     * locale information.
-     *
-     * @param domain    domain from which error string is to come.
-     * @param key       The message key.
-     * @param arguments The message replacement text arguments. The order
-     *                  of the arguments must match that of the placeholders
-     *                  in the actual message.
-     *
-     * @return          Returns the formatted message.
-     *
-     * @throws MissingResourceException Thrown if the message with the
-     *                                  specified key cannot be found.
+     * Formats a message with the specified arguments using the given locale
+     * information.
+     * 
+     * @param domain
+     *            domain from which error string is to come.
+     * @param key
+     *            The message key.
+     * @param arguments
+     *            The message replacement text arguments. The order of the
+     *            arguments must match that of the placeholders in the actual
+     *            message.
+     * 
+     * @return Returns the formatted message.
+     * 
+     * @throws MissingResourceException
+     *             Thrown if the message with the specified key cannot be found.
      */
-    public static String formatMessage(String domain,
-    String key, Object[] arguments)
-    throws MissingResourceException {
+    public static String formatMessage(String domain, String key,
+            Object[] arguments) throws MissingResourceException {
         ResourceBundle resourceBundle = getResourceBundle(domain);
-        if(resourceBundle == null){
+        if (resourceBundle == null) {
             init();
             resourceBundle = getResourceBundle(domain);
-            if(resourceBundle == null)
-                throw new MissingResourceException("Unknown domain" + domain, null, key);
+            if (resourceBundle == null)
+                throw new MissingResourceException("Unknown domain" + domain,
+                        null, key);
         }
         // format message
         String msg;
@@ -73,8 +86,7 @@
             if (arguments != null) {
                 try {
                     msg = java.text.MessageFormat.format(msg, arguments);
-                }
-                catch (Exception e) {
+                } catch (Exception e) {
                     msg = resourceBundle.getString("FormatFailed");
                     msg += " " + resourceBundle.getString(key);
                 }
@@ -84,7 +96,7 @@
             msg = resourceBundle.getString("BadMessageKey");
             throw new MissingResourceException(key, msg, key);
         }
-        
+
         // no message
         if (msg == null) {
             msg = key;
@@ -99,39 +111,49 @@
                 }
             }
         }
-        
+
         return msg;
     }
-    
-    static ResourceBundle getResourceBundle(String domain){
-        if(domain == DOM_DOMAIN || domain.equals(DOM_DOMAIN))
+
+    static ResourceBundle getResourceBundle(String domain) {
+        if (domain == DOM_DOMAIN || domain.equals(DOM_DOMAIN))
             return domResourceBundle;
-        else if( domain == XML_DOMAIN || domain.equals(XML_DOMAIN))
+        else if (domain == XML_DOMAIN || domain.equals(XML_DOMAIN))
             return xmlResourceBundle;
-        else if(domain == SERIALIZER_DOMAIN || domain.equals(SERIALIZER_DOMAIN))
+        else if (domain == SERIALIZER_DOMAIN
+                || domain.equals(SERIALIZER_DOMAIN))
             return serResourceBundle;
         return null;
     }
+
     /**
      * Initializes Message Formatter.
      */
-    public static void init(){
+    public static void init() {
         if (locale != null) {
-            domResourceBundle = PropertyResourceBundle.getBundle("org.apache.axis2.om.impl.dom.msg.DOMMessages", locale);
-            serResourceBundle = PropertyResourceBundle.getBundle("org.apache.axis2.om.impl.dom.msg.XMLSerializerMessages", locale);
-            xmlResourceBundle = PropertyResourceBundle.getBundle("org.apache.axis2.om.impl.dom.msg.XMLMessages", locale);
-        }else{
-            domResourceBundle = PropertyResourceBundle.getBundle("org.apache.axis2.om.impl.dom.msg.DOMMessages");
-            serResourceBundle = PropertyResourceBundle.getBundle("org.apache.axis2.om.impl.dom.msg.XMLSerializerMessages");
-            xmlResourceBundle = PropertyResourceBundle.getBundle("org.apache.axis2.om.impl.dom.msg.XMLMessages");
+            domResourceBundle = PropertyResourceBundle.getBundle(
+                    "org.apache.axis2.om.impl.dom.msg.DOMMessages", locale);
+            serResourceBundle = PropertyResourceBundle.getBundle(
+                    "org.apache.axis2.om.impl.dom.msg.XMLSerializerMessages",
+                    locale);
+            xmlResourceBundle = PropertyResourceBundle.getBundle(
+                    "org.apache.axis2.om.impl.dom.msg.XMLMessages", locale);
+        } else {
+            domResourceBundle = PropertyResourceBundle
+                    .getBundle("org.apache.axis2.om.impl.dom.msg.DOMMessages");
+            serResourceBundle = PropertyResourceBundle
+                    .getBundle("org.apache.axis2.om.impl.dom.msg.XMLSerializerMessages");
+            xmlResourceBundle = PropertyResourceBundle
+                    .getBundle("org.apache.axis2.om.impl.dom.msg.XMLMessages");
         }
     }
-    
+
     /**
      * Sets Locale to be used by the formatter.
+     * 
      * @param dlocale
      */
-    public static void setLocale(Locale dlocale){
+    public static void setLocale(Locale dlocale) {
         locale = dlocale;
     }
 }

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMNavigator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMNavigator.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMNavigator.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMNavigator.java Mon Jan  9 23:53:43 2006
@@ -22,9 +22,8 @@
 
 /**
  * This is exactly the same as org.apache.axis2.om.impl.om.OMNavigator, only the
- * llom specifics are changed to dom.
- * Refer to the testClass to find out how to use features like isNavigable, 
- * isComplete and step.
+ * llom specifics are changed to dom. Refer to the testClass to find out how to
+ * use features like isNavigable, isComplete and step.
  */
 public class DOMNavigator {
     /**
@@ -75,7 +74,7 @@
 
     /**
      * Constructor OMNavigator.
-     *
+     * 
      * @param node
      */
     public DOMNavigator(OMNode node) {
@@ -84,7 +83,7 @@
 
     /**
      * Method init.
-     *
+     * 
      * @param node
      */
     public void init(OMNode node) {
@@ -95,9 +94,10 @@
 
     /**
      * Gets the next node.
-     *
-     * @return Returns OMNode in the sequence of preorder traversal. Note however that an element node is
-     *         treated slightly differently. Once the element is passed it returns the same element in the
+     * 
+     * @return Returns OMNode in the sequence of preorder traversal. Note
+     *         however that an element node is treated slightly differently.
+     *         Once the element is passed it returns the same element in the
      *         next encounter as well.
      */
     public OMNode next() {
@@ -149,7 +149,7 @@
 
     /**
      * Method visited.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean visited() {
@@ -157,11 +157,11 @@
     }
 
     /**
-     * This is a very special method. This allows the navigator to step
-     * once it has reached the existing OM. At this point the isNavigable
-     * method will return false but the isComplete method may return false
-     * which means that the navigating the given element is not complete but
-     * the navigator cannot proceed.
+     * This is a very special method. This allows the navigator to step once it
+     * has reached the existing OM. At this point the isNavigable method will
+     * return false but the isComplete method may return false which means that
+     * the navigating the given element is not complete but the navigator cannot
+     * proceed.
      */
     public void step() {
         if (!end) {
@@ -172,7 +172,7 @@
 
     /**
      * Returns the navigable status.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isNavigable() {
@@ -185,7 +185,7 @@
 
     /**
      * Returns the completed status.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isCompleted() {

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMStAXWrapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMStAXWrapper.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMStAXWrapper.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMStAXWrapper.java Mon Jan  9 23:53:43 2006
@@ -38,11 +38,11 @@
 import java.util.Stack;
 
 /**
- * This is exactly the same as org.apache.axis2.om.impl.llom.OMStAXWrapper.
- * BUT this uses the org.apache.axis2.om.impl.dom.DOMNavigator.
+ * This is exactly the same as org.apache.axis2.om.impl.llom.OMStAXWrapper. BUT
+ * this uses the org.apache.axis2.om.impl.dom.DOMNavigator.
  * 
- * Note  - This class also implements the streaming constants interface
- * to get access to the StAX constants.
+ * Note - This class also implements the streaming constants interface to get
+ * access to the StAX constants.
  */
 public class DOMStAXWrapper implements XMLStreamReader, XMLStreamConstants {
     /**
@@ -79,11 +79,14 @@
      * Field NAVIGABLE
      */
     private static final short NAVIGABLE = 0;
+
     private static final short SWITCH_AT_NEXT = 1;
+
     private static final short COMPLETED = 2;
+
     private static final short SWITCHED = 3;
-    private static final short DOCUMENT_COMPLETE = 4;
 
+    private static final short DOCUMENT_COMPLETE = 4;
 
     /**
      * Field state
@@ -91,8 +94,7 @@
     private short state;
 
     /**
-     * Field currentEvent
-     * Default set to START_DOCUMENT
+     * Field currentEvent Default set to START_DOCUMENT
      */
     private int currentEvent = START_DOCUMENT;
 
@@ -120,7 +122,8 @@
      */
     private OMNode nextNode = null;
 
-    // holder for the current node. Needs this to generate events from the current node
+    // holder for the current node. Needs this to generate events from the
+    // current node
 
     /**
      * Field currentNode
@@ -138,7 +141,7 @@
 
     /**
      * Method setAllowSwitching.
-     *
+     * 
      * @param b
      */
     public void setAllowSwitching(boolean b) {
@@ -147,7 +150,7 @@
 
     /**
      * Method isAllowSwitching.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isAllowSwitching() {
@@ -155,12 +158,12 @@
     }
 
     /**
-     * When constructing the OMStaxWrapper, the creator must produce the
-     * builder (an instance of the OMXMLparserWrapper of the input) and the
-     * Element Node to start parsing. The wrapper parses(proceed) until
-     * the end of the given element. Hence care must be taken to pass the
-     * root element if the entire document is needed.
-     *
+     * When constructing the OMStaxWrapper, the creator must produce the builder
+     * (an instance of the OMXMLparserWrapper of the input) and the Element Node
+     * to start parsing. The wrapper parses(proceed) until the end of the given
+     * element. Hence care must be taken to pass the root element if the entire
+     * document is needed.
+     * 
      * @param builder
      * @param startNode
      */
@@ -170,24 +173,25 @@
 
     /**
      * Constructor OMStAXWrapper
-     *
+     * 
      * @param builder
      * @param startNode
      * @param cache
      */
     public DOMStAXWrapper(OMXMLParserWrapper builder, OMElement startNode,
-                         boolean cache) {
+            boolean cache) {
 
         // create a navigator
         this.navigator = new DOMNavigator(startNode);
         this.builder = builder;
         this.rootNode = startNode;
-        if (rootNode != null && rootNode.getParent() != null && rootNode.getParent() instanceof OMDocument) {
+        if (rootNode != null && rootNode.getParent() != null
+                && rootNode.getParent() instanceof OMDocument) {
             needToThrowEndDocument = true;
         }
 
         // initaite the next and current nodes
-        // Note -  navigator is written in such a way that it first
+        // Note - navigator is written in such a way that it first
         // returns the starting node at the first call to it
         currentNode = navigator.next();
         updateNextNode();
@@ -206,9 +210,7 @@
             if ((currentEvent == START_ELEMENT)
                     || (currentEvent == END_ELEMENT)) {
                 OMNamespace ns = ((OMElement) lastNode).getNamespace();
-                returnStr = (ns == null)
-                        ? null
-                        : ns.getPrefix();
+                returnStr = (ns == null) ? null : ns.getPrefix();
             }
         }
         return returnStr;
@@ -227,9 +229,7 @@
                     || (currentEvent == END_ELEMENT)
                     || (currentEvent == NAMESPACE)) {
                 OMNamespace ns = ((OMElement) lastNode).getNamespace();
-                returnStr = (ns == null)
-                        ? null
-                        : ns.getName();
+                returnStr = (ns == null) ? null : ns.getName();
             }
         }
         return returnStr;
@@ -243,8 +243,8 @@
         if (parser != null) {
             return parser.hasName();
         } else {
-            return ((currentEvent == START_ELEMENT)
-                    || (currentEvent == END_ELEMENT));
+            return ((currentEvent == START_ELEMENT) || 
+                    (currentEvent == END_ELEMENT));
         }
     }
 
@@ -329,7 +329,8 @@
      * @param i2
      * @return Returns int.
      * @throws XMLStreamException
-     * @see javax.xml.stream.XMLStreamReader#getTextCharacters(int, char[], int, int)
+     * @see javax.xml.stream.XMLStreamReader#getTextCharacters(int, char[], int,
+     *      int)
      */
     public int getTextCharacters(int i, char[] chars, int i1, int i2)
             throws XMLStreamException {
@@ -410,9 +411,7 @@
                     || (currentEvent == NAMESPACE)) {
                 OMNamespace ns = (OMNamespace) getItemFromIterator(
                         ((OMElement) lastNode).getAllDeclaredNamespaces(), i);
-                returnString = (ns == null)
-                        ? null
-                        : ns.getName();
+                returnString = (ns == null) ? null : ns.getName();
             }
         }
         return returnString;
@@ -432,9 +431,7 @@
                     || (currentEvent == NAMESPACE)) {
                 OMNamespace ns = (OMNamespace) getItemFromIterator(
                         ((OMElement) lastNode).getAllDeclaredNamespaces(), i);
-                returnString = (ns == null)
-                        ? null
-                        : ns.getPrefix();
+                returnString = (ns == null) ? null : ns.getPrefix();
             }
         }
         return returnString;
@@ -451,9 +448,8 @@
         } else {
             if (isStartElement() || isEndElement()
                     || (currentEvent == NAMESPACE)) {
-                returnCount =
-                        getCount(
-                                ((OMElement) lastNode).getAllDeclaredNamespaces());
+                returnCount = getCount(((OMElement) lastNode)
+                        .getAllDeclaredNamespaces());
             }
         }
         return returnCount;
@@ -563,18 +559,18 @@
             if (isStartElement() || (currentEvent == ATTRIBUTE)) {
                 OMAttribute attrib = getAttribute((OMElement) lastNode, i);
                 if (attrib != null) {
-                	if(attrib.getNamespace() != null) {
-                		returnString = attrib.getLocalName();
-                	} else {
-                		returnString = ((Attr)attrib).getNodeName();
-                	}
+                    if (attrib.getNamespace() != null) {
+                        returnString = attrib.getLocalName();
+                    } else {
+                        returnString = ((Attr) attrib).getNodeName();
+                    }
                 }
             } else {
                 throw new IllegalStateException(
                         "attribute localName accessed in illegal event!");
             }
         }
-         return returnString;
+        return returnString;
     }
 
     /**
@@ -637,8 +633,8 @@
                 returnCount = getCount(elt.getAllAttributes());
             } else {
                 throw new IllegalStateException(
-                        "attribute count accessed in illegal event (" +
-                                currentEvent + ")!");
+                        "attribute count accessed in illegal event ("
+                                + currentEvent + ")!");
             }
         }
         return returnCount;
@@ -648,7 +644,7 @@
 
     /**
      * Method getAttributeValue.
-     *
+     * 
      * @param s
      * @param s1
      * @return Returns String.
@@ -674,7 +670,7 @@
 
     /**
      * Method isWhiteSpace.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isWhiteSpace() {
@@ -689,7 +685,7 @@
 
     /**
      * Method isCharacters.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isCharacters() {
@@ -704,7 +700,7 @@
 
     /**
      * Method isEndElement.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isEndElement() {
@@ -730,7 +726,7 @@
 
     /**
      * Method isStartElement.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isStartElement() {
@@ -745,7 +741,7 @@
 
     /**
      * Method getNamespaceURI.
-     *
+     * 
      * @param s
      * @return Returns String.
      */
@@ -765,7 +761,7 @@
 
     /**
      * Method close.
-     *
+     * 
      * @throws XMLStreamException
      */
     public void close() throws XMLStreamException {
@@ -778,12 +774,12 @@
 
     /**
      * Method hasNext.
-     *
+     * 
      * @return Returns boolean.
      * @throws XMLStreamException
      */
     public boolean hasNext() throws XMLStreamException {
-        if(needToThrowEndDocument){
+        if (needToThrowEndDocument) {
             return !(state == DOCUMENT_COMPLETE);
         } else {
             return (state != COMPLETED && currentEvent != END_DOCUMENT);
@@ -792,10 +788,10 @@
 
     /**
      * Not implemented yet
-     *
+     * 
      * @return Returns int.
      * @throws org.apache.axis2.om.impl.llom.exception.OMStreamingException
-     *
+     * 
      * @throws XMLStreamException
      */
     public int nextTag() throws XMLStreamException {
@@ -817,9 +813,9 @@
             }
         } else {
             if (currentNode.getType() == OMNode.ELEMENT_NODE) {
-                returnText = ((OMElement)currentNode).getText();
-            }else if (currentNode.getType() == OMNode.TEXT_NODE){
-                 returnText = ((OMText)currentNode).getText();
+                returnText = ((OMElement) currentNode).getText();
+            } else if (currentNode.getType() == OMNode.TEXT_NODE) {
+                returnText = ((OMText) currentNode).getText();
             }
         }
         return returnText;
@@ -827,54 +823,54 @@
 
     /**
      * Method next.
-     *
+     * 
      * @return Returns int.
      * @throws XMLStreamException
      */
     public int next() throws XMLStreamException {
         switch (state) {
-            case DOCUMENT_COMPLETE:
-                throw new XMLStreamException("End of the document reached");
-            case COMPLETED:
-                state = DOCUMENT_COMPLETE;
-                currentEvent = END_DOCUMENT;
-                break;
-            case SWITCH_AT_NEXT:
-                state = SWITCHED;
+        case DOCUMENT_COMPLETE:
+            throw new XMLStreamException("End of the document reached");
+        case COMPLETED:
+            state = DOCUMENT_COMPLETE;
+            currentEvent = END_DOCUMENT;
+            break;
+        case SWITCH_AT_NEXT:
+            state = SWITCHED;
 
-                // load the parser
-                try {
-                    parser = (XMLStreamReader) builder.getParser();
-                } catch (Exception e) {
-                    throw new XMLStreamException("problem accessing the parser", e);
-                }
+            // load the parser
+            try {
+                parser = (XMLStreamReader) builder.getParser();
+            } catch (Exception e) {
+                throw new XMLStreamException("problem accessing the parser", e);
+            }
 
-                if ((currentEvent == START_DOCUMENT) &&
-                        (currentEvent == parser.getEventType())) {
-                    currentEvent = parser.next();
-                } else {
-                    currentEvent = parser.getEventType();
-                }
-                updateCompleteStatus();
-                break;
-            case NAVIGABLE:
-                currentEvent = generateEvents(currentNode);
-                updateCompleteStatus();
-                updateLastNode();
-                break;
-            case SWITCHED:
+            if ((currentEvent == START_DOCUMENT)
+                    && (currentEvent == parser.getEventType())) {
                 currentEvent = parser.next();
-                updateCompleteStatus();
-                break;
-            default :
-                throw new OMStreamingException("unsuppported state!");
+            } else {
+                currentEvent = parser.getEventType();
+            }
+            updateCompleteStatus();
+            break;
+        case NAVIGABLE:
+            currentEvent = generateEvents(currentNode);
+            updateCompleteStatus();
+            updateLastNode();
+            break;
+        case SWITCHED:
+            currentEvent = parser.next();
+            updateCompleteStatus();
+            break;
+        default:
+            throw new OMStreamingException("unsuppported state!");
         }
         return currentEvent;
     }
 
     /**
      * Method getProperty.
-     *
+     * 
      * @param s
      * @return Returns Object.
      * @throws IllegalArgumentException
@@ -884,11 +880,11 @@
     }
 
     /**
-     * This is a very important method. This keeps the navigator one step 
-     * ahead and pushes the navigator one event ahead. If the nextNode is null
-     * then navigable is set to false; At the same time the parser and builder 
-     * are set up for the upcoming event generation
-     *
+     * This is a very important method. This keeps the navigator one step ahead
+     * and pushes the navigator one event ahead. If the nextNode is null then
+     * navigable is set to false; At the same time the parser and builder are
+     * set up for the upcoming event generation
+     * 
      * @throws XMLStreamException
      */
     private void updateLastNode() throws XMLStreamException {
@@ -940,15 +936,13 @@
                 }
             }
         } else {
-            state = (currentEvent == END_DOCUMENT)
-                    ? DOCUMENT_COMPLETE
-                    : state;
+            state = (currentEvent == END_DOCUMENT) ? DOCUMENT_COMPLETE : state;
         }
     }
 
     /**
      * Method getNamespaceContext.
-     *
+     * 
      * @return Returns NamespaceContext.
      */
     public NamespaceContext getNamespaceContext() {
@@ -957,7 +951,7 @@
 
     /**
      * Method getEncoding.
-     *
+     * 
      * @return Returns String.
      */
     public String getEncoding() {
@@ -966,7 +960,7 @@
 
     /**
      * Method getLocation.
-     *
+     * 
      * @return Returns Location.
      */
     public Location getLocation() {
@@ -975,17 +969,16 @@
 
     /**
      * Method getVersion.
-     *
+     * 
      * @return Returns String.
      */
     public String getVersion() {
-        return "1.0"; //todo put the constant
+        return "1.0"; // todo put the constant
     }
 
-
     /**
      * Method isStandalone.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean isStandalone() {
@@ -994,7 +987,7 @@
 
     /**
      * Method standaloneSet.
-     *
+     * 
      * @return Returns boolean.
      */
     public boolean standaloneSet() {
@@ -1003,7 +996,7 @@
 
     /**
      * Method getCharacterEncodingScheme.
-     *
+     * 
      * @return Returns String.
      */
     public String getCharacterEncodingScheme() {
@@ -1012,7 +1005,7 @@
 
     /**
      * Method getPITarget.
-     *
+     * 
      * @return Returns String.
      */
     public String getPITarget() {
@@ -1021,7 +1014,7 @@
 
     /**
      * Method getPIData.
-     *
+     * 
      * @return Returns String.
      */
     public String getPIData() {
@@ -1029,16 +1022,16 @@
     }
 
     /*
-     *
+     * 
      * ################################################################
      * Generator methods for the OMNodes returned by the navigator
      * ################################################################
-     *
+     * 
      */
 
     /**
      * Method generateEvents
-     *
+     * 
      * @param node
      * @return Returns int.
      */
@@ -1046,28 +1039,28 @@
         int returnEvent = 0;
         int nodeType = node.getType();
         switch (nodeType) {
-            case Node.ELEMENT_NODE:
-                OMElement element = (OMElement) node;
-                returnEvent = generateElementEvents(element);
-                break;
-            case Node.TEXT_NODE:
-                returnEvent = generateTextEvents();
-                break;
-            case Node.COMMENT_NODE:
-                returnEvent = generateCommentEvents();
-                break;
-            case Node.CDATA_SECTION_NODE:
-                returnEvent = generateCdataEvents();
-                break;
-            default :
-                break;    // just ignore any other nodes
+        case Node.ELEMENT_NODE:
+            OMElement element = (OMElement) node;
+            returnEvent = generateElementEvents(element);
+            break;
+        case Node.TEXT_NODE:
+            returnEvent = generateTextEvents();
+            break;
+        case Node.COMMENT_NODE:
+            returnEvent = generateCommentEvents();
+            break;
+        case Node.CDATA_SECTION_NODE:
+            returnEvent = generateCdataEvents();
+            break;
+        default:
+            break; // just ignore any other nodes
         }
         return returnEvent;
     }
 
     /**
      * Method generateElementEvents.
-     *
+     * 
      * @param elt
      * @return Returns int.
      */
@@ -1084,7 +1077,7 @@
 
     /**
      * Method generateTextEvents.
-     *
+     * 
      * @return Returns int.
      */
     private int generateTextEvents() {
@@ -1093,7 +1086,7 @@
 
     /**
      * Method generateCommentEvents.
-     *
+     * 
      * @return Returns int.
      */
     private int generateCommentEvents() {
@@ -1102,7 +1095,7 @@
 
     /**
      * Method generateCdataEvents.
-     *
+     * 
      * @return Returns int.
      */
     private int generateCdataEvents() {
@@ -1117,7 +1110,7 @@
 
     /**
      * helper method.
-     *
+     * 
      * @param it
      * @return Returns int.
      */
@@ -1134,7 +1127,7 @@
 
     /**
      * Helper method.
-     *
+     * 
      * @param it
      * @param index
      * @return Returns Object.
@@ -1161,7 +1154,7 @@
 
     /**
      * Helper method.
-     *
+     * 
      * @param element
      * @return Returns QName.
      */
@@ -1191,9 +1184,8 @@
     private OMAttribute getAttribute(OMElement elt, int index) {
         OMAttribute returnAttrib = null;
         if (elt != null) {
-            returnAttrib =
-                    (OMAttribute) getItemFromIterator(elt.getAllAttributes(),
-                            index);
+            returnAttrib = (OMAttribute) getItemFromIterator(elt
+                    .getAllAttributes(), index);
         }
         return returnAttrib;
     }

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMUtil.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMUtil.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DOMUtil.java Mon Jan  9 23:53:43 2006
@@ -20,49 +20,53 @@
  */
 class DOMUtil {
 
-	public static boolean isValidChras(String value) {
-		// TODO check for valid characters
-		//throw new UnsupportedOperationException("TODO");
-		return true;
-	}
-	
-	public static boolean isValidNamespace(String namespaceURI, String qualifiedname) {
-		// TODO check for valid namespace
-		/**
-		 * if the qualifiedName has a prefix and the namespaceURI is null, if
-		 * the qualifiedName has a prefix that is "xml" and the namespaceURI is
-		 * different from " http://www.w3.org/XML/1998/namespace", or if the
-		 * qualifiedName, or its prefix, is "xmlns" and the namespaceURI is
-		 * different from " http://www.w3.org/2000/xmlns/".
-		 */
-		//throw new UnsupportedOperationException("TODO");
-		//temporary fix
-		return true;
-	}
-	
-	/**
-	 * Get the local name from a qualified name 
-	 * @param qualifiedName
-	 * @return
-	 */
-	public static String getLocalName(String qualifiedName) {
-		if(qualifiedName.indexOf(":") > -1 && !qualifiedName.trim().endsWith(":")) {
-			return qualifiedName.split(":")[1];
-		} else  {
-			return qualifiedName;
-		}
-	}
-	
-	/**
-	 * Get the prefix from a qualified name
-	 * @param qualifiedName
-	 * @return
-	 */
-	public static String getPrefix(String qualifiedName) {
-		if(qualifiedName.indexOf(":") > -1) {
-			return qualifiedName.split(":")[0];
-		} else  {
-			return null;
-		}
-	}
+    public static boolean isValidChras(String value) {
+        // TODO check for valid characters
+        // throw new UnsupportedOperationException("TODO");
+        return true;
+    }
+
+    public static boolean isValidNamespace(String namespaceURI,
+            String qualifiedname) {
+        // TODO check for valid namespace
+        /**
+         * if the qualifiedName has a prefix and the namespaceURI is null, if
+         * the qualifiedName has a prefix that is "xml" and the namespaceURI is
+         * different from " http://www.w3.org/XML/1998/namespace", or if the
+         * qualifiedName, or its prefix, is "xmlns" and the namespaceURI is
+         * different from " http://www.w3.org/2000/xmlns/".
+         */
+        // throw new UnsupportedOperationException("TODO");
+        // temporary fix
+        return true;
+    }
+
+    /**
+     * Get the local name from a qualified name
+     * 
+     * @param qualifiedName
+     * @return
+     */
+    public static String getLocalName(String qualifiedName) {
+        if (qualifiedName.indexOf(":") > -1
+                && !qualifiedName.trim().endsWith(":")) {
+            return qualifiedName.split(":")[1];
+        } else {
+            return qualifiedName;
+        }
+    }
+
+    /**
+     * Get the prefix from a qualified name
+     * 
+     * @param qualifiedName
+     * @return
+     */
+    public static String getPrefix(String qualifiedName) {
+        if (qualifiedName.indexOf(":") > -1) {
+            return qualifiedName.split(":")[0];
+        } else {
+            return null;
+        }
+    }
 }

Modified: webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DocumentFragmentimpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DocumentFragmentimpl.java?rev=367519&r1=367518&r2=367519&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DocumentFragmentimpl.java (original)
+++ webservices/axis2/trunk/java/modules/doom/src/org/apache/axis2/om/impl/dom/DocumentFragmentimpl.java Mon Jan  9 23:53:43 2006
@@ -24,72 +24,87 @@
 import javax.xml.stream.XMLStreamWriter;
 
 public class DocumentFragmentimpl extends ParentNode implements
-		DocumentFragment {
+        DocumentFragment {
+
+    /**
+     * @param ownerDocument
+     */
+    public DocumentFragmentimpl(DocumentImpl ownerDocument) {
+        super(ownerDocument);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.w3c.dom.Node#getNodeType()
+     */
+    public short getNodeType() {
+        return Node.DOCUMENT_FRAGMENT_NODE;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.w3c.dom.Node#getNodeName()
+     */
+    public String getNodeName() {
+        return "#document-fragment";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.axis2.om.OMNode#getType()
+     */
+    public int getType() throws OMException {
+        return Node.DOCUMENT_FRAGMENT_NODE;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.axis2.om.OMNode#setType(int)
+     */
+    public void setType(int nodeType) throws OMException {
+        // DO Nothing :-?
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.axis2.om.OMNode#serializeWithCache(org.apache.axis2.om.OMOutput)
+     */
+    public void serializeWithCache(OMOutputImpl omOutput)
+            throws XMLStreamException {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.axis2.om.OMNode#serialize(org.apache.axis2.om.OMOutput)
+     */
+    public void serialize(OMOutputImpl omOutput) throws XMLStreamException {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public void serializeAndConsume(OMOutputImpl omOutput)
+            throws XMLStreamException {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public void serializeAndConsume(XMLStreamWriter xmlWriter)
+            throws XMLStreamException {
+        // TODO
+        throw new UnsupportedOperationException("TODO");
+    }
 
-	/**
-	 * @param ownerDocument
-	 */
-	public DocumentFragmentimpl(DocumentImpl ownerDocument) {
-		super(ownerDocument);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.w3c.dom.Node#getNodeType()
-	 */
-	public short getNodeType() {
-		return Node.DOCUMENT_FRAGMENT_NODE;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.w3c.dom.Node#getNodeName()
-	 */
-	public String getNodeName() {
-		return "#document-fragment";
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.axis2.om.OMNode#getType()
-	 */
-	public int getType() throws OMException {
-		return Node.DOCUMENT_FRAGMENT_NODE;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.axis2.om.OMNode#setType(int)
-	 */
-	public void setType(int nodeType) throws OMException {
-		//DO Nothing :-?
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.axis2.om.OMNode#serializeWithCache(org.apache.axis2.om.OMOutput)
-	 */
-	public void serializeWithCache(OMOutputImpl omOutput) throws XMLStreamException {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.axis2.om.OMNode#serialize(org.apache.axis2.om.OMOutput)
-	 */
-	public void serialize(OMOutputImpl omOutput) throws XMLStreamException {
-		//TODO
-		throw new UnsupportedOperationException("TODO");		
-	}
-
-	public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
-	}
-
-	public void serializeAndConsume(OMOutputImpl omOutput) throws XMLStreamException {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
-	}
-
-	public void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException {
-		//TODO
-		throw new UnsupportedOperationException("TODO");
-	}
-	
 }