dmitri 02/04/27 21:35:49 Modified: jxpath/src/java/org/apache/commons/jxpath/ri/axes UnionContext.java SimplePathInterpreter.java SelfContext.java RootContext.java PredicateContext.java PrecedingOrFollowingContext.java ParentContext.java NamespaceContext.java InitialContext.java DescendantContext.java ChildContext.java AttributeContext.java AncestorContext.java Log: Renamed "next" to "nextNode" Revision Changes Path 1.6 +6 -6 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java Index: UnionContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- UnionContext.java 24 Apr 2002 04:05:39 -0000 1.5 +++ UnionContext.java 28 Apr 2002 04:35:48 -0000 1.6 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java,v 1.5 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.5 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java,v 1.6 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.6 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -73,7 +73,7 @@ * of a union operation like (a | b) * * @author Dmitri Plotnikov - * @version $Revision: 1.5 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.6 $ $Date: 2002/04/28 04:35:48 $ */ public class UnionContext extends EvalContext { private boolean startedSet = false; @@ -110,7 +110,7 @@ return true; } - public boolean next(){ + public boolean nextNode(){ return setPosition(position + 1); } @@ -120,7 +120,7 @@ for (int i = 0; i < contexts.length; i++){ EvalContext ctx = (EvalContext)contexts[i]; while (ctx.nextSet()){ - while (ctx.next()){ + while (ctx.nextNode()){ NodePointer ptr = ctx.getCurrentNodePointer(); if (!set.contains(ptr)){ ptr = (NodePointer)ptr.clone(); 1.3 +1 -1 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java Index: SimplePathInterpreter.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SimplePathInterpreter.java 26 Apr 2002 03:28:37 -0000 1.2 +++ SimplePathInterpreter.java 28 Apr 2002 04:35:48 -0000 1.3 @@ -269,7 +269,7 @@ } private static int indexFromPredicate(EvalContext context, Expression predicate){ - Object value = context.eval(predicate, true); + Object value = context.eval(predicate); if (value instanceof EvalContext){ value = ((EvalContext)value).getSingleNodePointer(); } 1.7 +5 -5 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java Index: SelfContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SelfContext.java 24 Apr 2002 04:05:39 -0000 1.6 +++ SelfContext.java 28 Apr 2002 04:35:48 -0000 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java,v 1.6 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java,v 1.7 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.7 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -70,7 +70,7 @@ * EvalContext that returns the current node from the parent context if the test succeeds. * * @author Dmitri Plotnikov - * @version $Revision: 1.6 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.7 $ $Date: 2002/04/28 04:35:48 $ */ public class SelfContext extends EvalContext { private NodeTest nodeTest; @@ -96,7 +96,7 @@ return nodePointer; } - public boolean next(){ + public boolean nextNode(){ return setPosition(getCurrentPosition() + 1); } 1.7 +5 -5 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java Index: RootContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- RootContext.java 24 Apr 2002 04:05:39 -0000 1.6 +++ RootContext.java 28 Apr 2002 04:35:48 -0000 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java,v 1.6 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java,v 1.7 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.7 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -72,7 +72,7 @@ * EvalContext that is used to hold the root node for the path traversal. * * @author Dmitri Plotnikov - * @version $Revision: 1.6 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.7 $ $Date: 2002/04/28 04:35:48 $ */ public class RootContext extends EvalContext { private boolean startedSet = false; @@ -106,7 +106,7 @@ return 1; } - public boolean next(){ + public boolean nextNode(){ if (started){ return false; } 1.8 +7 -7 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java Index: PredicateContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PredicateContext.java 26 Apr 2002 01:00:37 -0000 1.7 +++ PredicateContext.java 28 Apr 2002 04:35:48 -0000 1.8 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java,v 1.7 2002/04/26 01:00:37 dmitri Exp $ - * $Revision: 1.7 $ - * $Date: 2002/04/26 01:00:37 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java,v 1.8 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.8 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -73,7 +73,7 @@ * EvalContext that checks predicates. * * @author Dmitri Plotnikov - * @version $Revision: 1.7 $ $Date: 2002/04/26 01:00:37 $ + * @version $Revision: 1.8 $ $Date: 2002/04/28 04:35:48 $ */ public class PredicateContext extends EvalContext { private Expression expression; @@ -88,11 +88,11 @@ getEvaluationHint(CoreOperation.DYNAMIC_PROPERTY_ACCESS_HINT); } - public boolean next(){ + public boolean nextNode(){ if (done){ return false; } - while (parentContext.next()){ + while (parentContext.nextNode()){ if (setupDynamicPropertyPointer()){ Object pred = parentContext.eval(dynamicPropertyNameExpression); if (pred instanceof NodePointer){ @@ -169,7 +169,7 @@ } while (this.position < position){ - if (!next()){ + if (!nextNode()){ return false; } } 1.7 +6 -6 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java Index: PrecedingOrFollowingContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PrecedingOrFollowingContext.java 24 Apr 2002 04:05:39 -0000 1.6 +++ PrecedingOrFollowingContext.java 28 Apr 2002 04:35:48 -0000 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java,v 1.6 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java,v 1.7 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.7 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -73,7 +73,7 @@ * EvalContext that walks the "preceding::" and "following::" axes. * * @author Dmitri Plotnikov - * @version $Revision: 1.6 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.7 $ $Date: 2002/04/28 04:35:48 $ */ public class PrecedingOrFollowingContext extends EvalContext { private NodeTest nodeTest; @@ -109,14 +109,14 @@ } while (this.position < position){ - if (!next()){ + if (!nextNode()){ return false; } } return true; } - public boolean next(){ + public boolean nextNode(){ if (!setStarted){ setStarted = true; currentRootLocation = parentContext.getCurrentNodePointer(); 1.6 +5 -5 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ParentContext.java Index: ParentContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ParentContext.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ParentContext.java 24 Apr 2002 04:05:39 -0000 1.5 +++ ParentContext.java 28 Apr 2002 04:35:48 -0000 1.6 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ParentContext.java,v 1.5 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.5 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ParentContext.java,v 1.6 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.6 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -71,7 +71,7 @@ * EvalContext that walks the "parent::" axis. * * @author Dmitri Plotnikov - * @version $Revision: 1.5 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.6 $ $Date: 2002/04/28 04:35:48 $ */ public class ParentContext extends EvalContext { private NodeTest nodeTest; @@ -102,7 +102,7 @@ return position == 1; } - public boolean next(){ + public boolean nextNode(){ while (nextIgnoreDuplicates()){ NodePointer location = getCurrentNodePointer(); if (!visitedNodes.contains(location)){ 1.5 +6 -6 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java Index: NamespaceContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- NamespaceContext.java 24 Apr 2002 04:05:39 -0000 1.4 +++ NamespaceContext.java 28 Apr 2002 04:35:48 -0000 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java,v 1.4 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.4 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java,v 1.5 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.5 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -72,7 +72,7 @@ * EvalContext that walks the "namespace::" axis. * * @author Dmitri Plotnikov - * @version $Revision: 1.4 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.5 $ $Date: 2002/04/28 04:35:48 $ */ public class NamespaceContext extends EvalContext { private NodeTest nodeTest; @@ -105,14 +105,14 @@ } while (getCurrentPosition() < position){ - if (!next()){ + if (!nextNode()){ return false; } } return true; } - public boolean next(){ + public boolean nextNode(){ super.setPosition(getCurrentPosition() + 1); if (!setStarted){ setStarted = true; 1.7 +5 -5 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java Index: InitialContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- InitialContext.java 24 Apr 2002 04:05:39 -0000 1.6 +++ InitialContext.java 28 Apr 2002 04:35:48 -0000 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java,v 1.6 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java,v 1.7 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.7 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -71,7 +71,7 @@ * on to the parent context. * * @author Dmitri Plotnikov - * @version $Revision: 1.6 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.7 $ $Date: 2002/04/28 04:35:48 $ */ public class InitialContext extends EvalContext { private boolean startedSet = false; @@ -96,7 +96,7 @@ return nodePointer; } - public boolean next(){ + public boolean nextNode(){ return setPosition(position + 1); } 1.7 +6 -6 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java Index: DescendantContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- DescendantContext.java 24 Apr 2002 04:05:39 -0000 1.6 +++ DescendantContext.java 28 Apr 2002 04:35:48 -0000 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java,v 1.6 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java,v 1.7 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.7 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -73,7 +73,7 @@ * axes. * * @author Dmitri Plotnikov - * @version $Revision: 1.6 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.7 $ $Date: 2002/04/28 04:35:48 $ */ public class DescendantContext extends EvalContext { private NodeTest nodeTest; @@ -109,14 +109,14 @@ } while (this.position < position){ - if (!next()){ + if (!nextNode()){ return false; } } return true; } - public boolean next(){ + public boolean nextNode(){ if (!setStarted){ setStarted = true; stack = new Stack(); 1.8 +5 -5 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java Index: ChildContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ChildContext.java 24 Apr 2002 04:05:39 -0000 1.7 +++ ChildContext.java 28 Apr 2002 04:35:48 -0000 1.8 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java,v 1.7 2002/04/24 04:05:39 dmitri Exp $ - * $Revision: 1.7 $ - * $Date: 2002/04/24 04:05:39 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java,v 1.8 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.8 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -72,7 +72,7 @@ * "preceding-sibling::" axes. * * @author Dmitri Plotnikov - * @version $Revision: 1.7 $ $Date: 2002/04/24 04:05:39 $ + * @version $Revision: 1.8 $ $Date: 2002/04/28 04:35:48 $ */ public class ChildContext extends EvalContext { private NodeTest nodeTest; @@ -124,7 +124,7 @@ return getCurrentNodePointer(); } - public boolean next(){ + public boolean nextNode(){ return setPosition(getCurrentPosition() + 1); } 1.6 +6 -6 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AttributeContext.java Index: AttributeContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AttributeContext.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AttributeContext.java 24 Apr 2002 04:06:46 -0000 1.5 +++ AttributeContext.java 28 Apr 2002 04:35:48 -0000 1.6 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AttributeContext.java,v 1.5 2002/04/24 04:06:46 dmitri Exp $ - * $Revision: 1.5 $ - * $Date: 2002/04/24 04:06:46 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AttributeContext.java,v 1.6 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.6 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -72,7 +72,7 @@ * EvalContext that walks the "attribute::" axis. * * @author Dmitri Plotnikov - * @version $Revision: 1.5 $ $Date: 2002/04/24 04:06:46 $ + * @version $Revision: 1.6 $ $Date: 2002/04/28 04:35:48 $ */ public class AttributeContext extends EvalContext { private NodeTest nodeTest; @@ -105,14 +105,14 @@ } while (getCurrentPosition() < position){ - if (!next()){ + if (!nextNode()){ return false; } } return true; } - public boolean next(){ + public boolean nextNode(){ super.setPosition(getCurrentPosition() + 1); if (!setStarted){ setStarted = true; 1.7 +6 -6 jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java Index: AncestorContext.java =================================================================== RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- AncestorContext.java 24 Apr 2002 04:06:46 -0000 1.6 +++ AncestorContext.java 28 Apr 2002 04:35:48 -0000 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java,v 1.6 2002/04/24 04:06:46 dmitri Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/24 04:06:46 $ + * $Header: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java,v 1.7 2002/04/28 04:35:48 dmitri Exp $ + * $Revision: 1.7 $ + * $Date: 2002/04/28 04:35:48 $ * * ==================================================================== * The Apache Software License, Version 1.1 @@ -71,7 +71,7 @@ * EvalContext that walks the "ancestor::" and "ancestor-or-self::" axes. * * @author Dmitri Plotnikov - * @version $Revision: 1.6 $ $Date: 2002/04/24 04:06:46 $ + * @version $Revision: 1.7 $ $Date: 2002/04/28 04:35:48 $ */ public class AncestorContext extends EvalContext { private NodeTest nodeTest; @@ -106,14 +106,14 @@ } while (getCurrentPosition() < position){ - if (!next()){ + if (!nextNode()){ return false; } } return true; } - public boolean next(){ + public boolean nextNode(){ while (nextIgnoreDuplicates()){ NodePointer location = getCurrentNodePointer(); if (!visitedNodes.contains(location)){
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>