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 aj...@apache.org on 2004/12/13 13:48:15 UTC

svn commit: r111708 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/impl/llom test/org/apache/axis/om

Author: ajith
Date: Mon Dec 13 04:48:13 2004
New Revision: 111708

URL: http://svn.apache.org/viewcvs?view=rev&rev=111708
Log:
made some minor changes and fixed some bugs
Modified:
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNavigator.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java
   webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNavigator.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNavigator.java?view=diff&rev=111708&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNavigator.java&r1=111707&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNavigator.java&r2=111708
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNavigator.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNavigator.java	Mon Dec 13 04:48:13 2004
@@ -102,13 +102,13 @@
                 next = null;
 
         } else {
-            //todo this is unsuitable
-            OMNodeImpl n = (OMNodeImpl) next;
+            OMNode nextSibling = next.getNextSibling();
+            OMNode parent = next.getParent();
 
-            if (n.nextSibling != null)
-                next = n.nextSibling;
-            else if (n.parent != null && n.parent.isComplete()) {
-                next = n.parent;
+            if (nextSibling != null)
+                next = nextSibling;
+            else if (parent != null && parent.isComplete()) {
+                next = parent;
                 backtracked = true;
             } else
                 next = null;
@@ -136,7 +136,6 @@
 
     /**
      * the navigable status
-     *
      * @return
      */
     public boolean isNavigable() {
@@ -150,7 +149,6 @@
 
     /**
      * The completed status
-     *
      * @return
      */
     public boolean isCompleted() {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java?view=diff&rev=111708&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java&r1=111707&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java&r2=111708
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMNodeImpl.java	Mon Dec 13 04:48:13 2004
@@ -70,7 +70,7 @@
      * @throws org.apache.axis.om.OMException
      */
     public OMNode getNextSibling() throws OMException {
-        if (nextSibling == null && !parent.isComplete())
+        if (nextSibling == null && parent!=null && !parent.isComplete())
             parent.buildNext();
         return nextSibling;
     }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java?view=diff&rev=111708&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java&r1=111707&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java&r2=111708
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMTextImpl.java	Mon Dec 13 04:48:13 2004
@@ -68,7 +68,7 @@
      * @throws org.apache.axis.om.OMException
      */
     public short getType() throws OMException {
-        return OMNode.TEXT_NODE;    //TODO implement this
+        return OMNode.TEXT_NODE;
     }
 
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java?view=diff&rev=111708&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java&r1=111707&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java&r2=111708
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java	Mon Dec 13 04:48:13 2004
@@ -29,9 +29,8 @@
  * limitations under the License.
  *
  * @author Axis team
- * Date: Nov 19, 2004
- * Time: 4:35:04 PM
- * 
+ *         Date: Nov 19, 2004
+ *         Time: 4:35:04 PM
  */
 public class OMNavigatorTest extends AbstractTestCase {
 
@@ -69,6 +68,7 @@
         //now the OM is fully created test the navigation
         OMNavigator navigator = new OMNavigator(envelope);
         OMNode node = null;
+
 
         while (navigator.isNavigable()) {
             node = navigator.next();