Package org.apache.commons.jxpath.ri.model

Examples of org.apache.commons.jxpath.ri.model.NodePointer.clone()


    public boolean nextNode(){
        while (nextIgnoreDuplicates()){
            NodePointer location = getCurrentNodePointer();
            if (!visitedNodes.contains(location)){
                visitedNodes.add(location.clone());
                position++;
                return true;
            }
        }
        return false;
View Full Code Here


    public boolean nextNode(){
        while (nextIgnoreDuplicates()){
            NodePointer location = getCurrentNodePointer();
            if (!visitedNodes.contains(location)){
                visitedNodes.add(location.clone());
                position++;
                return true;
            }
        }
        return false;
View Full Code Here

            EvalContext ctx = (EvalContext)contexts[i];
            while (ctx.nextSet()){
                while (ctx.nextNode()){
                    NodePointer ptr = ctx.getCurrentNodePointer();
                    if (!set.contains(ptr)){
                        ptr = (NodePointer)ptr.clone();
                        list.add(ptr);
                        set.add(ptr);
                    }
                }
            }
View Full Code Here

    public InitialContext(EvalContext parentContext){
        super(parentContext);
        NodePointer ptr = parentContext.getCurrentNodePointer();
        if (ptr != null){
            nodePointer = (NodePointer)ptr.clone();
            collection = (nodePointer.getIndex() == NodePointer.WHOLE_COLLECTION);
        }
    }

    public Pointer getSingleNodePointer(){
View Full Code Here

        else if (childPointer.isCollection()) {
            // Iterate over all values and
            // execute remaining steps for each node,
            // looking for the best quality match
            int bestQuality = 0;
            childPointer = (NodePointer) childPointer.clone();
            NodePointer bestMatch = null;
            int count = childPointer.getLength();
            for (int i = 0; i < count; i++) {
                childPointer.setIndex(i);
                NodePointer pointer =
View Full Code Here

                if (quality == PERFECT_MATCH) {
                    return pointer;
                }
                else if (quality > bestQuality) {
                    bestQuality = quality;
                    bestMatch = (NodePointer) pointer.clone();
                }
            }
            if (bestMatch != null) {
                return bestMatch;
            }
View Full Code Here

                if (quality == PERFECT_MATCH) {
                    return pointer;
                }
                else if (quality > bestQuality) {
                    bestQuality = quality;
                    bestMatch = (NodePointer) pointer.clone();
                }
            }
        }

        if (bestMatch != null) {
View Full Code Here

                    int quality = computeQuality(pointer);
                    if (quality == PERFECT_MATCH) {
                        return pointer;
                    }
                    if (quality > bestQuality) {
                        bestMatch = (NodePointer) pointer.clone();
                        bestQuality = quality;
                    }
                }
            }
            if (bestMatch != null) {
View Full Code Here

    {
        Expression predicate = predicates[currentPredicate];
        int index = indexFromPredicate(context, predicate);
        NodePointer pointer = parent;
        if (isCollectionElement(pointer, index)) {
            pointer = (NodePointer) pointer.clone();
            pointer.setIndex(index);
            return doPredicate(
                context,
                pointer,
                steps,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.