ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1162944 - in /webservices/commons/trunk/modules/axiom/modules: axiom-api/src/main/java/org/apache/axiom/om/util/ axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/ axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/ axiom-testsuite/...
Date Mon, 29 Aug 2011 18:55:37 GMT
Author: veithen
Date: Mon Aug 29 18:55:36 2011
New Revision: 1162944

URL: http://svn.apache.org/viewvc?rev=1162944&view=rev
Log:
Fixed an issue in the DOMHASH algorithm implementation (which didn't correctly calculate the
number of children of an element) and added more unit tests.

Added:
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithNamespace.java
      - copied, changed from r1162584, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithQualifiedAttribute.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithoutNamespace.java
      - copied, changed from r1162584, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithUnqualifiedAttribute.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestDigest.java
  (with props)
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest1.xml
  (with props)
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest2.xml
  (with props)
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest3.xml
  (with props)
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest4.xml
  (with props)
Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/DigestGenerator.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/DigestTestCase.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithQualifiedAttribute.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithUnqualifiedAttribute.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithoutNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/pi/TestDigest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestDigest.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/DigestGenerator.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/DigestGenerator.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/DigestGenerator.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/DigestGenerator.java
Mon Aug 29 18:55:36 2011
@@ -128,10 +128,12 @@ public class DigestGenerator {
             // there is  no 0-length Text, and
             // comment nodes are removed.
             int length = 0;
-            itr = element.getChildElements();
+            itr = element.getChildren();
             while (itr.hasNext()) {
-                length++;
-                itr.next();
+                OMNode child = (OMNode)itr.next();
+                if (child instanceof OMElement || child instanceof OMText || child instanceof
OMProcessingInstruction) {
+                    length++;
+                }
             }
             dos.writeInt(length);
             while (node != null) {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
Mon Aug 29 18:55:36 2011
@@ -25,6 +25,7 @@ import org.apache.axiom.om.impl.dom.fact
 import org.apache.axiom.ts.OMTestSuiteBuilder;
 import org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromDOMSource;
 import org.apache.axiom.ts.om.container.TestSerialize;
+import org.apache.axiom.ts.om.document.TestDigest;
 import org.apache.axiom.ts.om.element.TestGetChildrenWithName4;
 import org.apache.axiom.ts.om.element.TestGetXMLStreamReaderCDATAEventFromElement;
 import org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithOMSourcedElementDescendant;
@@ -86,6 +87,9 @@ public class OMImplementationTest extend
         // TODO: there seems to be an issue with OMFactory in this case
         builder.exclude(org.apache.axiom.ts.om.pi.TestDigest.class);
         
+        // TODO: if there is a comment node surrounded by text, then these text nodes need
to be merged
+        builder.exclude(TestDigest.class, "(|(file=digest3.xml)(file=digest4.xml))");
+        
         return builder.build();
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
Mon Aug 29 18:55:36 2011
@@ -25,6 +25,7 @@ import org.apache.axiom.om.impl.llom.fac
 import org.apache.axiom.ts.OMTestSuiteBuilder;
 import org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromDOMSource;
 import org.apache.axiom.ts.om.container.TestSerialize;
+import org.apache.axiom.ts.om.document.TestDigest;
 import org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithOMSourcedElementDescendant;
 import org.apache.axiom.ts.om.node.TestInsertSiblingAfterOnChild;
 import org.apache.axiom.ts.om.node.TestInsertSiblingBeforeOnChild;
@@ -55,6 +56,9 @@ public class OMImplementationTest extend
         // TODO: suspecting Woodstox bug here
         builder.exclude(TestCreateOMBuilderFromDOMSource.class, "(file=spaces.xml)");
         
+        // TODO: if there is a comment node surrounded by text, then these text nodes need
to be merged
+        builder.exclude(TestDigest.class, "(|(file=digest3.xml)(file=digest4.xml))");
+        
         return builder.build();
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/DigestTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/DigestTestCase.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/DigestTestCase.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/DigestTestCase.java
Mon Aug 29 18:55:36 2011
@@ -18,6 +18,9 @@
  */
 package org.apache.axiom.ts;
 
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMDocument;
+import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.util.DigestGenerator;
@@ -41,9 +44,18 @@ public abstract class DigestTestCase ext
     }
 
     protected final void runTest() throws Throwable {
-        byte[] digest = new DigestGenerator().getDigest(createNode(), algorithm);
+        OMInformationItem node = createInformationItem();
+        DigestGenerator digestGenerator = new DigestGenerator();
+        byte[] digest;
+        if (node instanceof OMDocument) {
+            digest = digestGenerator.getDigest((OMDocument)node, algorithm);
+        } else if (node instanceof OMAttribute) {
+            digest = digestGenerator.getDigest((OMAttribute)node, algorithm);
+        } else {
+            digest = digestGenerator.getDigest((OMNode)node, algorithm);
+        }
         assertEquals(expectedDigest, DigestUtils.toHexString(digest));
     }
     
-    protected abstract OMNode createNode();
+    protected abstract OMInformationItem createInformationItem() throws Exception;
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
Mon Aug 29 18:55:36 2011
@@ -42,6 +42,8 @@ public class OMTestSuiteBuilder extends 
     
     protected void addTests() {
         String[] conformanceFiles = AbstractTestCase.getConformanceTestFiles();
+        addTest(new org.apache.axiom.ts.om.attribute.TestDigestWithNamespace(metaFactory));
+        addTest(new org.apache.axiom.ts.om.attribute.TestDigestWithoutNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.attribute.TestEqualsHashCode(metaFactory));
         addTest(new org.apache.axiom.ts.om.attribute.TestGetNamespaceURIWithNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.attribute.TestGetNamespaceURIWithoutNamespace(metaFactory));
@@ -67,6 +69,10 @@ public class OMTestSuiteBuilder extends 
                 }
             }
         }
+        addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest1.xml",
"MD5", "3e5d68c6607bc56c9c171560e4f19db9"));
+        addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest2.xml",
"SHA1", "3c47a807517d867d42ffacb2d3e9da81895d5aac"));
+        addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest3.xml",
"SHA", "41466144c1cab4234fb127cfb8cf92f9"));
+        addTest(new org.apache.axiom.ts.om.document.TestDigest(metaFactory, "digest4.xml",
"SHA", "be3b0836cd6f0ceacdf3d40b49a0468d03d2ba2e"));
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElement(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementAfterDetach(metaFactory));
         addTest(new org.apache.axiom.ts.om.document.TestGetOMDocumentElementWithParser(metaFactory));
@@ -101,8 +107,6 @@ public class OMTestSuiteBuilder extends 
         addTest(new org.apache.axiom.ts.om.element.TestDeclareNamespaceWithGeneratedPrefix3(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestDigestWithNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestDigestWithoutNamespace(metaFactory));
-        addTest(new org.apache.axiom.ts.om.element.TestDigestWithQualifiedAttribute(metaFactory));
-        addTest(new org.apache.axiom.ts.om.element.TestDigestWithUnqualifiedAttribute(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestFindNamespaceURIWithPrefixUndeclaring(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestGetAllAttributes1(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestGetAllAttributes2(metaFactory));

Copied: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithNamespace.java
(from r1162584, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithQualifiedAttribute.java)
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithNamespace.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithNamespace.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithQualifiedAttribute.java&r1=1162584&r2=1162944&rev=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithQualifiedAttribute.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithNamespace.java
Mon Aug 29 18:55:36 2011
@@ -16,25 +16,20 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.ts.om.element;
+package org.apache.axiom.ts.om.attribute;
 
-import javax.xml.namespace.QName;
-
-import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.ts.DigestTestCase;
 
-public class TestDigestWithQualifiedAttribute extends DigestTestCase {
-    public TestDigestWithQualifiedAttribute(OMMetaFactory metaFactory) {
-        super(metaFactory, "MD5", "3056d7790d9fd6a2d13e882a558c4218");
+public class TestDigestWithNamespace extends DigestTestCase {
+    public TestDigestWithNamespace(OMMetaFactory metaFactory) {
+        super(metaFactory, "MD5", "0403b2798bee0397c2755c01d560092e");
     }
 
-    protected OMNode createNode() {
+    protected OMInformationItem createInformationItem() {
         OMFactory factory = metaFactory.getOMFactory();
-        OMElement element = factory.createOMElement(new QName("urn:ns1", "element", "ns1"));
-        element.addAttribute("attr", "value", factory.createOMNamespace("urn:ns2", "ns2"));
-        return element;
+        return factory.createOMAttribute("attr", factory.createOMNamespace("urn:ns1", "ns1"),
"value");
     }
 }

Copied: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithoutNamespace.java
(from r1162584, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithUnqualifiedAttribute.java)
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithoutNamespace.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithoutNamespace.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithUnqualifiedAttribute.java&r1=1162584&r2=1162944&rev=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithUnqualifiedAttribute.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/attribute/TestDigestWithoutNamespace.java
Mon Aug 29 18:55:36 2011
@@ -16,24 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.ts.om.element;
+package org.apache.axiom.ts.om.attribute;
 
-import javax.xml.namespace.QName;
-
-import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.ts.DigestTestCase;
 
 //Regression test for AXIOM-203
-public class TestDigestWithUnqualifiedAttribute extends DigestTestCase {
-    public TestDigestWithUnqualifiedAttribute(OMMetaFactory metaFactory) {
-        super(metaFactory, "MD5", "15222d6ed31d10e5dbb3a44bcbd3eb84");
+public class TestDigestWithoutNamespace extends DigestTestCase {
+    public TestDigestWithoutNamespace(OMMetaFactory metaFactory) {
+        super(metaFactory, "MD5", "78f0b570fedc6e01679f501b7b75d069");
     }
 
-    protected OMNode createNode() {
-        OMElement element = metaFactory.getOMFactory().createOMElement(new QName("urn:ns",
"element", "p"));
-        element.addAttribute("attr", "value", null);
-        return element;
+    protected OMInformationItem createInformationItem() {
+        return metaFactory.getOMFactory().createOMAttribute("attr", null, "value");
     }
 }

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestDigest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestDigest.java?rev=1162944&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestDigest.java
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestDigest.java
Mon Aug 29 18:55:36 2011
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.om.document;
+
+import java.io.InputStream;
+
+import org.apache.axiom.om.OMDocument;
+import org.apache.axiom.om.OMInformationItem;
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.ts.DigestTestCase;
+
+public class TestDigest extends DigestTestCase {
+    private final String file;
+
+    public TestDigest(OMMetaFactory metaFactory, String file,
+            String algorithm, String expectedDigest) {
+        super(metaFactory, algorithm, expectedDigest);
+        this.file=file;
+        addTestProperty("file", file);
+    }
+
+    protected OMInformationItem createInformationItem() throws Exception {
+        InputStream in = TestDigest.class.getResourceAsStream(file);
+        try {
+            OMDocument document = OMXMLBuilderFactory.createOMBuilder(
+                    metaFactory.getOMFactory(), in).getDocument();
+            document.build();
+            return document;
+        } finally {
+            in.close();
+        }
+    }
+}

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestDigest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithNamespace.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithNamespace.java
Mon Aug 29 18:55:36 2011
@@ -20,8 +20,8 @@ package org.apache.axiom.ts.om.element;
 
 import javax.xml.namespace.QName;
 
+import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.ts.DigestTestCase;
 
 public class TestDigestWithNamespace extends DigestTestCase {
@@ -29,7 +29,7 @@ public class TestDigestWithNamespace ext
         super(metaFactory, "MD5", "76e696f6b648837de0fa32e2ad8f1250");
     }
 
-    protected OMNode createNode() {
+    protected OMInformationItem createInformationItem() {
         return metaFactory.getOMFactory().createOMElement(new QName("urn:ns", "element",
"p"));
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithoutNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithoutNamespace.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithoutNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestDigestWithoutNamespace.java
Mon Aug 29 18:55:36 2011
@@ -18,8 +18,8 @@
  */
 package org.apache.axiom.ts.om.element;
 
+import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.ts.DigestTestCase;
 
 // Regression test for AXIOM-203
@@ -28,7 +28,7 @@ public class TestDigestWithoutNamespace 
         super(metaFactory, "MD5", "0730b7dda59f628a10b53b5502682ceb");
     }
 
-    protected OMNode createNode() {
+    protected OMInformationItem createInformationItem() {
         return metaFactory.getOMFactory().createOMElement("elementName", null);
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/pi/TestDigest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/pi/TestDigest.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/pi/TestDigest.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/pi/TestDigest.java
Mon Aug 29 18:55:36 2011
@@ -18,8 +18,8 @@
  */
 package org.apache.axiom.ts.om.pi;
 
+import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.ts.DigestTestCase;
 
 public class TestDigest extends DigestTestCase {
@@ -27,7 +27,7 @@ public class TestDigest extends DigestTe
         super(metaFactory, "MD5", "a7066a04f134fc8b62c1745da10dcd26");
     }
 
-    protected OMNode createNode() {
+    protected OMInformationItem createInformationItem() {
         return metaFactory.getOMFactory().createOMProcessingInstruction(null, "dbfo", "bgcolor=\"#EEEEEE\"");
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestDigest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestDigest.java?rev=1162944&r1=1162943&r2=1162944&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestDigest.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestDigest.java
Mon Aug 29 18:55:36 2011
@@ -18,8 +18,8 @@
  */
 package org.apache.axiom.ts.om.text;
 
+import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.om.OMNode;
 import org.apache.axiom.ts.DigestTestCase;
 
 public class TestDigest extends DigestTestCase {
@@ -27,7 +27,7 @@ public class TestDigest extends DigestTe
         super(metaFactory, "SHA1", "91b802187b7ae7c2c858f4aa5ae5470fc50d0306");
     }
 
-    protected OMNode createNode() {
+    protected OMInformationItem createInformationItem() {
         return metaFactory.getOMFactory().createOMText("some test data");
     }
 }

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest1.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest1.xml?rev=1162944&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest1.xml
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest1.xml
Mon Aug 29 18:55:36 2011
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<p:root xmlns:p="urn:test"><?pi test?><child/>Text</p:root>
\ No newline at end of file

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest2.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest2.xml?rev=1162944&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest2.xml
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest2.xml
Mon Aug 29 18:55:36 2011
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<root p1:attr1="value1" p2:attr2="value2" p3:attr3="value3" xmlns:p1="urn:test" xmlns:p2="http://apache.org"
xmlns:p3="urn:common"/>
\ No newline at end of file

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest3.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest3.xml?rev=1162944&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest3.xml
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest3.xml
Mon Aug 29 18:55:36 2011
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<root>
+    <?pi2 data2?>
+    <!-- Some comment -->
+    <child/>
+</root>

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest4.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest4.xml?rev=1162944&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest4.xml
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest4.xml
Mon Aug 29 18:55:36 2011
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<?pi1 data1?>
+<root xmlns="urn:test">
+    <?pi2 data2?>
+    <!-- Some comment -->
+    <child1 attr1="value1" attr2="value2"/>
+    <child2 xml:lang="en">
+        Text
+    </child2>
+    <child3 ns1:c="c" ns2:b="b" ns3:a="a" xmlns:ns1="urn:ns1" xmlns:ns2="http://example.org"
xmlns:ns3="urn:ns3">
+        More text
+    </child3>
+</root>
+<?pi3 data3?>

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/org/apache/axiom/ts/om/document/digest4.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message