You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2012/06/09 13:28:23 UTC
svn commit: r1348363 - in /webservices/axiom/branches/CLONE_NODE: ./
modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/
modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/
modules/axiom-dom-testsuite/src/main/java/org/apach...
Author: veithen
Date: Sat Jun 9 11:28:22 2012
New Revision: 1348363
URL: http://svn.apache.org/viewvc?rev=1348363&view=rev
Log:
Merged latest changes from trunk.
Added:
webservices/axiom/branches/CLONE_NODE/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/
- copied from r1348362, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/
webservices/axiom/branches/CLONE_NODE/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/DOOMAbstractFactory.java
- copied unchanged from r1348362, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/dom/DOOMAbstractFactory.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestSetAttributeNS.java
- copied unchanged from r1348362, webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestSetAttributeNS.java
Removed:
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOOMAbstractFactory.java
Modified:
webservices/axiom/branches/CLONE_NODE/ (props changed)
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestCloneNodeWithAttributes.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CDATASectionImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentTypeImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/LeafNode.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ProcessingInstructionImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/RootNode.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPElement.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java
webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
Propchange: webservices/axiom/branches/CLONE_NODE/
------------------------------------------------------------------------------
Merged /webservices/commons/trunk/modules/axiom:r1348146-1348362
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java Sat Jun 9 11:28:22 2012
@@ -99,6 +99,7 @@ public class DOMTestSuiteBuilder extends
addTest(new org.apache.axiom.ts.dom.element.TestSetAttributeNodeNSReplace(dbf));
addTest(new org.apache.axiom.ts.dom.element.TestSetAttributeNodeNSWrongDocument(dbf));
addTest(new org.apache.axiom.ts.dom.element.TestSetAttributeNodeWrongDocument(dbf));
+ addTest(new org.apache.axiom.ts.dom.element.TestSetAttributeNS(dbf));
addTest(new org.apache.axiom.ts.dom.element.TestSetPrefixNotNullWithNamespace(dbf));
addTest(new org.apache.axiom.ts.dom.element.TestSetPrefixNotNullWithoutNamespace(dbf));
addTest(new org.apache.axiom.ts.dom.element.TestSetPrefixNull(dbf));
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestCloneNodeWithAttributes.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestCloneNodeWithAttributes.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestCloneNodeWithAttributes.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/element/TestCloneNodeWithAttributes.java Sat Jun 9 11:28:22 2012
@@ -44,8 +44,7 @@ public class TestCloneNodeWithAttributes
element.setAttributeNS(null, "attr1", "value1");
element.setAttributeNS("urn:ns2", "q:attr2", "value2");
Element clone = (Element)element.cloneNode(deep);
- // TODO: this doesn't work with DOOM yet
-// assertEquals(2, clone.getAttributes().getLength());
+ assertEquals(2, clone.getAttributes().getLength());
Attr attr1 = clone.getAttributeNodeNS(null, "attr1");
Attr attr2 = clone.getAttributeNodeNS("urn:ns2", "attr2");
assertNotNull(attr1);
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/AttrImpl.java Sat Jun 9 11:28:22 2012
@@ -92,7 +92,7 @@ public class AttrImpl extends RootNode i
}
this.done = true;
this.localName = localName;
- internalAppendChild(new TextImpl(ownerDocument, value, factory));
+ internalAppendChild(new TextImpl(value, factory));
this.type = OMConstants.XMLATTRTYPE_CDATA;
this.namespace = ns;
}
@@ -102,7 +102,7 @@ public class AttrImpl extends RootNode i
this(ownerDocument, factory);
this.done = true;
this.localName = name;
- internalAppendChild(new TextImpl(ownerDocument, value, factory));
+ internalAppendChild(new TextImpl(value, factory));
this.type = OMConstants.XMLATTRTYPE_CDATA;
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CDATASectionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CDATASectionImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CDATASectionImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CDATASectionImpl.java Sat Jun 9 11:28:22 2012
@@ -29,10 +29,6 @@ public class CDATASectionImpl extends Te
super(text, factory);
}
- public CDATASectionImpl(DocumentImpl ownerDocument, String text, OMFactory factory) {
- super(ownerDocument, text, factory);
- }
-
public int getType() throws OMException {
return OMNode.CDATA_SECTION_NODE;
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CharacterImpl.java Sat Jun 9 11:28:22 2012
@@ -36,13 +36,8 @@ public abstract class CharacterImpl exte
super(factory);
}
- /** @param ownerNode */
- public CharacterImpl(DocumentImpl ownerNode, OMFactory factory) {
- super(ownerNode, factory);
- }
-
- public CharacterImpl(DocumentImpl ownerNode, String value, OMFactory factory) {
- super(ownerNode, factory);
+ public CharacterImpl(String value, OMFactory factory) {
+ super(factory);
this.textValue = (value != null) ? value : "";
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/CommentImpl.java Sat Jun 9 11:28:22 2012
@@ -29,8 +29,8 @@ import javax.xml.stream.XMLStreamExcepti
import javax.xml.stream.XMLStreamWriter;
public class CommentImpl extends CharacterImpl implements Comment, OMComment {
- public CommentImpl(DocumentImpl ownerNode, String value, OMFactory factory) {
- super(ownerNode, value, factory);
+ public CommentImpl(String value, OMFactory factory) {
+ super(value, factory);
this.done = true;
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentFragmentImpl.java Sat Jun 9 11:28:22 2012
@@ -33,8 +33,8 @@ public class DocumentFragmentImpl extend
private ParentNode ownerNode;
/** @param ownerDocument */
- public DocumentFragmentImpl(DocumentImpl ownerDocument, OMFactory factory) {
- super(ownerDocument, factory);
+ public DocumentFragmentImpl(OMFactory factory) {
+ super(factory);
this.done = true;
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java Sat Jun 9 11:28:22 2012
@@ -75,12 +75,6 @@ public class DocumentImpl extends RootNo
private final DOMConfigurationImpl domConfig = new DOMConfigurationImpl();
- /** @param ownerDocument */
- public DocumentImpl(DocumentImpl ownerDocument, OMFactory factory) {
- super(ownerDocument, factory);
- this.done = true;
- }
-
public DocumentImpl(OMXMLParserWrapper parserWrapper, OMFactory factory) {
super(factory);
this.builder = parserWrapper;
@@ -158,19 +152,27 @@ public class DocumentImpl extends RootNo
}
public CDATASection createCDATASection(String data) throws DOMException {
- return new CDATASectionImpl(this, data, factory);
+ CDATASectionImpl cdataSection = new CDATASectionImpl(data, factory);
+ cdataSection.setOwnerDocument(this);
+ return cdataSection;
}
public Comment createComment(String data) {
- return new CommentImpl(this, data, this.factory);
+ CommentImpl comment = new CommentImpl(data, this.factory);
+ comment.setOwnerDocument(this);
+ return comment;
}
public DocumentFragment createDocumentFragment() {
- return new DocumentFragmentImpl(this, this.factory);
+ DocumentFragmentImpl fragment = new DocumentFragmentImpl(this.factory);
+ fragment.setOwnerDocument(this);
+ return fragment;
}
public Element createElement(String tagName) throws DOMException {
- return new ElementImpl(this, tagName, this.factory);
+ ElementImpl element = new ElementImpl(tagName, this.factory);
+ element.setOwnerDocument(this);
+ return element;
}
public Element createElementNS(String ns, String qualifiedName)
@@ -194,7 +196,8 @@ public class DocumentImpl extends RootNo
}
// DOM doesn't create namespace declarations automatically. Therefore we set the
// namespace afterwards with setNamespaceWithNoFindInCurrentScope.
- ElementImpl element = new ElementImpl(this, localName, null, this.factory);
+ ElementImpl element = new ElementImpl(localName, null, this.factory);
+ element.setOwnerDocument(this);
element.setNamespaceWithNoFindInCurrentScope(namespace);
return element;
}
@@ -207,11 +210,15 @@ public class DocumentImpl extends RootNo
public ProcessingInstruction createProcessingInstruction(String target,
String data) throws DOMException {
- return new ProcessingInstructionImpl(this, target, data, factory);
+ ProcessingInstructionImpl pi = new ProcessingInstructionImpl(target, data, factory);
+ pi.setOwnerDocument(this);
+ return pi;
}
public Text createTextNode(String value) {
- return new TextImpl(this, value, this.factory);
+ TextImpl text = new TextImpl(value, this.factory);
+ text.setOwnerDocument(this);
+ return text;
}
public DocumentType getDoctype() {
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentTypeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentTypeImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentTypeImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentTypeImpl.java Sat Jun 9 11:28:22 2012
@@ -31,8 +31,8 @@ import org.w3c.dom.NamedNodeMap;
public class DocumentTypeImpl extends LeafNode implements DocumentType, OMDocType, OMNodeEx {
private String value;
- public DocumentTypeImpl(DocumentImpl ownerDocument, OMFactory factory) {
- super(ownerDocument, factory);
+ public DocumentTypeImpl(OMFactory factory) {
+ super(factory);
done = true;
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ElementImpl.java Sat Jun 9 11:28:22 2012
@@ -106,9 +106,8 @@ public class ElementImpl extends ParentN
* @param factory OMFactory
*
* */
- public ElementImpl(DocumentImpl ownerDocument, String tagName,
- OMFactory factory) {
- super(ownerDocument, factory);
+ public ElementImpl(String tagName, OMFactory factory) {
+ super(factory);
this.localName = tagName;
this.attributes = new AttributeMap(this);
this.done = true;
@@ -122,9 +121,8 @@ public class ElementImpl extends ParentN
* @param ns
* @param factory
*/
- public ElementImpl(DocumentImpl ownerDocument, String tagName,
- OMNamespaceImpl ns, OMFactory factory) {
- super(ownerDocument, factory);
+ public ElementImpl(String tagName, OMNamespaceImpl ns, OMFactory factory) {
+ super(factory);
this.localName = tagName;
if (ns != null) {
setNamespace(ns);
@@ -133,20 +131,9 @@ public class ElementImpl extends ParentN
this.done = true;
}
- public ElementImpl(DocumentImpl ownerDocument, String tagName,
- OMNamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory) {
- super(ownerDocument, factory);
- this.localName = tagName;
- if (ns != null) {
- setNamespace(ns);
- }
- this.builder = builder;
- this.attributes = new AttributeMap(this);
- }
-
public ElementImpl(ParentNode parentNode, String tagName, OMNamespaceImpl ns,
OMFactory factory) {
- this(null, tagName, null, factory);
+ this(tagName, null, factory);
parentNode.addChild(this);
this.done = true;
namespace = handleNamespace(ns);
@@ -527,7 +514,7 @@ public class ElementImpl extends ParentN
}
// handle the namespaces
- if (attr.getNamespaceURI() != null
+ if (!useDomSemantics && attr.getNamespaceURI() != null
&& findNamespace(attr.getNamespaceURI(), attr.getPrefix())
== null) {
// TODO checkwhether the same ns is declared with a different
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/LeafNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/LeafNode.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/LeafNode.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/LeafNode.java Sat Jun 9 11:28:22 2012
@@ -31,10 +31,6 @@ public abstract class LeafNode extends N
private NodeImpl nextSibling;
- protected LeafNode(DocumentImpl ownerDocument, OMFactory factory) {
- super(ownerDocument, factory);
- }
-
public LeafNode(OMFactory factory) {
super(factory);
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java Sat Jun 9 11:28:22 2012
@@ -77,11 +77,6 @@ public abstract class NodeImpl implement
// Constructors
//
- protected NodeImpl(DocumentImpl ownerDocument, OMFactory factory) {
- this(factory);
- setOwnerDocument(ownerDocument);
- }
-
protected NodeImpl(OMFactory factory) {
this.factory = factory;
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ParentNode.java Sat Jun 9 11:28:22 2012
@@ -60,11 +60,6 @@ public abstract class ParentNode extends
protected NodeImpl lastChild;
- /** @param ownerDocument */
- protected ParentNode(DocumentImpl ownerDocument, OMFactory factory) {
- super(ownerDocument, factory);
- }
-
protected ParentNode(OMFactory factory) {
super(factory);
}
@@ -550,11 +545,9 @@ public abstract class ParentNode extends
newText = this.factory.createOMText(importedText
.getDataHandler(), isOptimize);
} else if (importedText.isCharacters()) {
- newText = new TextImpl((DocumentImpl) this.getOwnerDocument(),
- importedText.getTextCharacters(), this.factory);
+ newText = new TextImpl(importedText.getTextCharacters(), this.factory);
} else {
- newText = new TextImpl((DocumentImpl) this.getOwnerDocument(),
- importedText.getText(), this.factory);
+ newText = new TextImpl(importedText.getText(), this.factory);
}
return newText;
}
@@ -571,13 +564,7 @@ public abstract class ParentNode extends
OMComment importedComment = (OMComment) child;
OMComment newComment = this.factory.createOMComment((OMContainer)this,
importedComment.getValue());
- DocumentImpl doc;
- if (this instanceof DocumentImpl) {
- doc = (DocumentImpl) this;
- } else {
- doc = (DocumentImpl) getOwnerDocument();
- }
- newComment = new CommentImpl(doc, importedComment.getValue(),
+ newComment = new CommentImpl(importedComment.getValue(),
this.factory);
return newComment;
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ProcessingInstructionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ProcessingInstructionImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ProcessingInstructionImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ProcessingInstructionImpl.java Sat Jun 9 11:28:22 2012
@@ -34,10 +34,9 @@ public class ProcessingInstructionImpl e
private String target;
private String value;
- public ProcessingInstructionImpl(DocumentImpl ownerDocument, String target, String value,
- OMFactory factory) {
+ public ProcessingInstructionImpl(String target, String value, OMFactory factory) {
- super(ownerDocument, factory);
+ super(factory);
this.target = target;
this.value = value;
done = true;
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/RootNode.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/RootNode.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/RootNode.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/RootNode.java Sat Jun 9 11:28:22 2012
@@ -21,10 +21,6 @@ package org.apache.axiom.om.impl.dom;
import org.apache.axiom.om.OMFactory;
public abstract class RootNode extends ParentNode {
- protected RootNode(DocumentImpl ownerDocument, OMFactory factory) {
- super(ownerDocument, factory);
- }
-
public RootNode(OMFactory factory) {
super(factory);
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextImpl.java Sat Jun 9 11:28:22 2012
@@ -31,37 +31,28 @@ import org.apache.axiom.om.OMXMLParserWr
public class TextImpl extends TextNodeImpl {
private boolean isWhitespace;
- public TextImpl(DocumentImpl ownerNode, char[] value, OMFactory factory) {
- super(ownerNode, value, factory);
+ public TextImpl(char[] value, OMFactory factory) {
+ super(value, factory);
}
- public TextImpl(DocumentImpl ownerNode, Object dataHandler, boolean optimize, OMFactory factory) {
- super(ownerNode, dataHandler, optimize, factory);
+ public TextImpl(Object dataHandler, boolean optimize, OMFactory factory) {
+ super(dataHandler, optimize, factory);
}
- public TextImpl(DocumentImpl ownerNode, String contentID,
+ public TextImpl(String contentID,
DataHandlerProvider dataHandlerProvider, boolean optimize, OMFactory factory) {
- super(ownerNode, contentID, dataHandlerProvider, optimize, factory);
+ super(contentID, dataHandlerProvider, optimize, factory);
}
- public TextImpl(DocumentImpl ownerNode, OMFactory factory) {
- super(ownerNode, factory);
+ public TextImpl(OMFactory factory) {
+ super(factory);
}
- public TextImpl(DocumentImpl ownerNode, String value, OMFactory factory) {
- super(ownerNode, value, factory);
- }
-
- public TextImpl(DocumentImpl ownerNode, String value, int nodeType, OMFactory factory) {
- super(ownerNode, value, factory);
+ public TextImpl(String value, int nodeType, OMFactory factory) {
+ super(value, factory);
isWhitespace = nodeType == SPACE_NODE;
}
- public TextImpl(DocumentImpl ownerNode, String value, String mimeType, boolean optimize,
- OMFactory factory) {
- super(ownerNode, value, mimeType, optimize, factory);
- }
-
public TextImpl(OMContainer parent, QName text, int nodeType, OMFactory factory) {
super(parent, text, nodeType, factory);
}
@@ -70,8 +61,8 @@ public class TextImpl extends TextNodeIm
super(parent, text, factory);
}
- public TextImpl(DocumentImpl ownerNode, TextNodeImpl source, OMFactory factory) {
- super(ownerNode, source, factory);
+ public TextImpl(TextNodeImpl source, OMFactory factory) {
+ super(source, factory);
}
public TextImpl(String contentID, OMContainer parent, OMXMLParserWrapper builder,
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java Sat Jun 9 11:28:22 2012
@@ -85,7 +85,7 @@ public abstract class TextNodeImpl exten
*/
public TextNodeImpl(String contentID, OMContainer parent,
OMXMLParserWrapper builder, OMFactory factory) {
- super((DocumentImpl) ((ParentNode) parent).getOwnerDocument(), factory);
+ super(factory);
this.contentID = contentID;
this.optimize = true;
this.isBinary = true;
@@ -100,8 +100,8 @@ public abstract class TextNodeImpl exten
* @param source TextImpl
* @param factory
*/
- public TextNodeImpl(DocumentImpl ownerNode, TextNodeImpl source, OMFactory factory) {
- super(ownerNode, factory);
+ public TextNodeImpl(TextNodeImpl source, OMFactory factory) {
+ super(factory);
this.done = true;
// Copy the value of the text
@@ -150,9 +150,9 @@ public abstract class TextNodeImpl exten
* @param dataHandler
* @param optimize To send binary content. Created progrmatically.
*/
- public TextNodeImpl(DocumentImpl ownerNode, Object dataHandler, boolean optimize,
+ public TextNodeImpl(Object dataHandler, boolean optimize,
OMFactory factory) {
- super(ownerNode, factory);
+ super(factory);
this.dataHandlerObject = dataHandler;
this.isBinary = true;
this.optimize = optimize;
@@ -167,9 +167,9 @@ public abstract class TextNodeImpl exten
* @param optimize
* @param factory
*/
- public TextNodeImpl(DocumentImpl ownerNode, String contentID, DataHandlerProvider
+ public TextNodeImpl(String contentID, DataHandlerProvider
dataHandlerProvider, boolean optimize, OMFactory factory) {
- super(ownerNode, factory);
+ super(factory);
this.contentID = contentID;
dataHandlerObject = dataHandlerProvider;
isBinary = true;
@@ -180,40 +180,17 @@ public abstract class TextNodeImpl exten
/**
* @param ownerNode
*/
- public TextNodeImpl(DocumentImpl ownerNode, OMFactory factory) {
- super(ownerNode, factory);
+ public TextNodeImpl(OMFactory factory) {
+ super(factory);
this.done = true;
}
- /**
- * @param ownerNode
- * @param value
- */
- public TextNodeImpl(DocumentImpl ownerNode, String value, OMFactory factory) {
- super(ownerNode, value, factory);
- this.done = true;
- }
-
-
- public TextNodeImpl(DocumentImpl ownerNode, char[] value, OMFactory factory) {
- super(ownerNode, factory);
+ public TextNodeImpl(char[] value, OMFactory factory) {
+ super(factory);
this.charArray = value;
this.done = true;
}
- /**
- * @param ownerNode
- * @param value
- */
- public TextNodeImpl(DocumentImpl ownerNode, String value, String mimeType,
- boolean optimize, OMFactory factory) {
- this(ownerNode, value, factory);
- this.mimeType = mimeType;
- this.optimize = optimize;
- this.isBinary = true;
- done = true;
- }
-
public TextNodeImpl(OMContainer parent, QName text, OMFactory factory) {
this(parent, text, OMNode.TEXT_NODE, factory);
@@ -221,7 +198,7 @@ public abstract class TextNodeImpl exten
public TextNodeImpl(OMContainer parent, QName text, int nodeType,
OMFactory factory) {
- this(((ElementImpl) parent).ownerDocument(), factory);
+ this(factory);
this.textNS =
((ElementImpl) parent).handleNamespace(text.getNamespaceURI(), text.getPrefix());
this.textValue = textNS == null ? text.getLocalPart() : textNS.getPrefix() + ":" + text.getLocalPart();
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java Sat Jun 9 11:28:22 2012
@@ -77,8 +77,7 @@ public class OMDOMFactory implements OMF
}
public OMElement createOMElement(String localName, OMNamespace ns) {
- return new ElementImpl(null,
- localName, (OMNamespaceImpl) ns, this);
+ return new ElementImpl(localName, (OMNamespaceImpl) ns, this);
}
public OMElement createOMElement(String localName, OMNamespace ns,
@@ -203,9 +202,9 @@ public class OMDOMFactory implements OMF
} else {
TextNodeImpl txt;
if (type == OMNode.CDATA_SECTION_NODE) {
- txt = new CDATASectionImpl(null, text, this);
+ txt = new CDATASectionImpl(text, this);
} else {
- txt = new TextImpl(null, text, type, this);
+ txt = new TextImpl(text, type, this);
}
parent.addChild(txt);
return txt;
@@ -214,13 +213,13 @@ public class OMDOMFactory implements OMF
public OMText createOMText(OMContainer parent, OMText source) {
- TextImpl text = new TextImpl(null, (TextImpl) source, this);
+ TextImpl text = new TextImpl((TextImpl) source, this);
parent.addChild(text);
return text;
}
public OMText createOMText(OMContainer parent, char[] charArary, int type) {
- TextImpl txt = new TextImpl(null, charArary, this);
+ TextImpl txt = new TextImpl(charArary, this);
parent.addChild(txt);
return txt;
}
@@ -231,7 +230,7 @@ public class OMDOMFactory implements OMF
* @see org.apache.axiom.om.OMFactory#createOMText(String)
*/
public OMText createOMText(String s) {
- return new TextImpl(null, s, this);
+ return new TextImpl(s, this);
}
/**
@@ -241,9 +240,9 @@ public class OMDOMFactory implements OMF
*/
public OMText createOMText(String text, int type) {
if (type == OMNode.CDATA_SECTION_NODE) {
- return new CDATASectionImpl(null, text, this);
+ return new CDATASectionImpl(text, this);
} else {
- return new TextImpl(null, text, this);
+ return new TextImpl(text, this);
}
}
@@ -254,7 +253,7 @@ public class OMDOMFactory implements OMF
* @see org.apache.axiom.om.OMFactory#createOMText(String, String, boolean)
*/
public OMText createOMText(String text, String mimeType, boolean optimize) {
- return new TextImpl(null, text, mimeType, optimize, this);
+ return new TextImpl(text, mimeType, optimize, this);
}
/**
@@ -264,12 +263,12 @@ public class OMDOMFactory implements OMF
* @see org.apache.axiom.om.OMFactory#createOMText(Object, boolean)
*/
public OMText createOMText(Object dataHandler, boolean optimize) {
- return new TextImpl(null, dataHandler, optimize, this);
+ return new TextImpl(dataHandler, optimize, this);
}
public OMText createOMText(String contentID, DataHandlerProvider dataHandlerProvider,
boolean optimize) {
- return new TextImpl(null, contentID, dataHandlerProvider, optimize, this);
+ return new TextImpl(contentID, dataHandlerProvider, optimize, this);
}
/**
@@ -280,7 +279,7 @@ public class OMDOMFactory implements OMF
*/
public OMText createOMText(OMContainer parent, String s, String mimeType,
boolean optimize) {
- TextImpl text = new TextImpl(null, s, mimeType, optimize, this);
+ TextImpl text = new TextImpl(s, mimeType, optimize, this);
parent.addChild(text);
return text;
}
@@ -306,7 +305,7 @@ public class OMDOMFactory implements OMF
}
public OMDocType createOMDocType(OMContainer parent, String content) {
- DocumentTypeImpl docType = new DocumentTypeImpl(null, this);
+ DocumentTypeImpl docType = new DocumentTypeImpl(this);
docType.setValue(content);
if (parent != null) {
parent.addChild(docType);
@@ -317,7 +316,7 @@ public class OMDOMFactory implements OMF
public OMProcessingInstruction createOMProcessingInstruction(
OMContainer parent, String piTarget, String piData) {
ProcessingInstructionImpl pi =
- new ProcessingInstructionImpl(null, piTarget, piData, this);
+ new ProcessingInstructionImpl(piTarget, piData, this);
if (parent != null) {
parent.addChild(pi);
}
@@ -325,7 +324,7 @@ public class OMDOMFactory implements OMF
}
public OMComment createOMComment(OMContainer parent, String content) {
- CommentImpl comment = new CommentImpl(null, content, this);
+ CommentImpl comment = new CommentImpl(content, this);
if (parent != null) {
parent.addChild(comment);
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPElement.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPElement.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPElement.java Sat Jun 9 11:28:22 2012
@@ -19,12 +19,10 @@
package org.apache.axiom.soap.impl.dom;
-import org.apache.axiom.om.OMContainer;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.axiom.om.impl.common.OMNamespaceImpl;
-import org.apache.axiom.om.impl.dom.DocumentImpl;
import org.apache.axiom.om.impl.dom.ElementImpl;
import org.apache.axiom.om.impl.dom.ParentNode;
import org.apache.axiom.soap.SOAPFactory;
@@ -63,14 +61,14 @@ public abstract class SOAPElement extend
super((ParentNode) parent, localName, null, builder, factory);
}
- protected SOAPElement(DocumentImpl doc, String localName, OMNamespace ns,
+ protected SOAPElement(String localName, OMNamespace ns,
SOAPFactory factory) {
- super(doc, localName, (OMNamespaceImpl) ns, factory);
+ super(localName, (OMNamespaceImpl) ns, factory);
}
- protected SOAPElement(DocumentImpl ownerDocument, String tagName,
+ protected SOAPElement(String tagName,
OMNamespaceImpl ns, OMXMLParserWrapper builder, SOAPFactory factory) {
- super(ownerDocument, tagName, ns, builder, factory);
+ super(tagName, ns, builder, factory);
}
/** This has to be implemented by all the derived classes to check for the correct parent. */
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java Sat Jun 9 11:28:22 2012
@@ -61,16 +61,12 @@ public class SOAPEnvelopeImpl extends SO
}
public SOAPEnvelopeImpl(DocumentImpl doc, OMXMLParserWrapper builder, SOAPFactory factory) {
- super(
- doc,
- SOAPConstants.SOAPENVELOPE_LOCAL_NAME,
- null,
- builder, factory);
+ super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, null, builder, factory);
}
/** @param ns */
public SOAPEnvelopeImpl(OMNamespace ns, SOAPFactory factory) {
- super(null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, factory);
+ super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, factory);
}
public SOAPVersion getVersion() {
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java Sat Jun 9 11:28:22 2012
@@ -58,7 +58,7 @@ public abstract class SOAPHeaderBlockImp
public SOAPHeaderBlockImpl(String localName, OMNamespace ns,
SOAPFactory factory) throws SOAPProcessingException {
- super(null, localName, (OMNamespaceImpl) ns, factory);
+ super(localName, (OMNamespaceImpl) ns, factory);
this.setNamespace(ns);
}
Modified: webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java?rev=1348363&r1=1348362&r2=1348363&view=diff
==============================================================================
--- webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java (original)
+++ webservices/axiom/branches/CLONE_NODE/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/factory/DOMSOAPFactory.java Sat Jun 9 11:28:22 2012
@@ -22,7 +22,6 @@ package org.apache.axiom.soap.impl.dom.f
import org.apache.axiom.om.OMDataSource;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.dom.DocumentImpl;
import org.apache.axiom.om.impl.dom.factory.OMDOMFactory;
import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
import org.apache.axiom.soap.SOAPBody;
@@ -61,7 +60,7 @@ public abstract class DOMSOAPFactory ext
}
public SOAPEnvelope createSOAPEnvelope(OMXMLParserWrapper builder) {
- return new SOAPEnvelopeImpl((DocumentImpl) this.createOMDocument(), builder, this);
+ return new SOAPEnvelopeImpl(null, builder, this);
}
public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException {