Package org.jaxen.util

Examples of org.jaxen.util.SingleObjectIterator


     * @throws UnsupportedAxisException if the semantics of the parent axis are not supported by
     *                                  this object model
     */
    public Iterator getParentAxisIterator(Object contextNode) throws UnsupportedAxisException {
        if (contextNode instanceof OMNode) {
            return new SingleObjectIterator(((OMNode) contextNode).getParent());
        } else if (contextNode instanceof OMNamespaceEx) {
            return new SingleObjectIterator(
                    ((OMNamespaceEx) contextNode).getParent());
        } else if (contextNode instanceof OMAttribute) {
            return new SingleObjectIterator(
                    ((OMAttribute) contextNode).getOwner());
        }
        return JaxenConstants.EMPTY_ITERATOR;
    }
View Full Code Here


            parent = ((Text)contextNode).getParent();
        }
       
        if ( parent != null )
        {
            return new SingleObjectIterator( parent );
        }

        return null;
    }
View Full Code Here

            parent = ((Namespace)contextNode).getElement();
        }
       
        if ( parent != null )
        {
            return new SingleObjectIterator( parent );
        }

        return null;
    }
View Full Code Here

    public Iterator getParentAxisIterator(Object contextNode)
    {
        if ( contextNode instanceof Document )
        {
            return new SingleObjectIterator( contextNode );
        }

        Node node = (Node) contextNode;

        Object parent = node.getParent();

        if ( parent == null )
        {
            parent = node.getDocument();
        }
       
        return new SingleObjectIterator( parent );
    }
View Full Code Here

        if ( obj instanceof List )
        {
            return ((List)obj).iterator();
        }

        return new SingleObjectIterator( obj );
    }
View Full Code Here

            for (int i = first; i <= last; i++) {
                temp.add(parent.getChild(i));
            }
            contextNode = temp;
        }
        return new SingleObjectIterator(contextNode);
       
    }
View Full Code Here

   
    public Iterator getParentAxisIterator(Object contextNode)  {
       
        Node parent = (Node) getParentNode(contextNode);
        if (parent == null) return JaxenConstants.EMPTY_ITERATOR;
        else return new SingleObjectIterator(parent);
       
    }
View Full Code Here

                result = element.getAttribute(localName, namespaceURI);
            }
           
            if (result == null) return JaxenConstants.EMPTY_ITERATOR;
           
            return new SingleObjectIterator(result);
        }
        catch (ClassCastException ex) {
            return JaxenConstants.EMPTY_ITERATOR;
        }
       
View Full Code Here

     * @throws UnsupportedAxisException if the semantics of the parent axis are
     *                                  not supported by this object model
     */
    public Iterator getParentAxisIterator(Object contextNode) throws UnsupportedAxisException {
        if (contextNode instanceof OMNode) {
            return new SingleObjectIterator(((OMNode) contextNode).getParent());
        } else if (contextNode instanceof OMNamespaceEx) {
            return new SingleObjectIterator(
                    ((OMNamespaceEx) contextNode).getParent());
        } else if (contextNode instanceof OMAttributeEx) {
            return new SingleObjectIterator(
                    ((OMAttributeEx) contextNode).getParent());
        }
        return JaxenConstants.EMPTY_ITERATOR;
    }
View Full Code Here

     * @throws UnsupportedAxisException if the semantics of the parent axis are
     *                                  not supported by this object model
     */
    public Iterator getParentAxisIterator(Object contextNode) throws UnsupportedAxisException {
        if (contextNode instanceof OMNode) {
            return new SingleObjectIterator(((OMNode) contextNode).getParent());
        } else if (contextNode instanceof OMNamespaceEx) {
            return new SingleObjectIterator(
                    ((OMNamespaceEx) contextNode).getParent());
        } else if (contextNode instanceof OMAttributeEx) {
            return new SingleObjectIterator(
                    ((OMAttributeEx) contextNode).getParent());
        }
        return JaxenConstants.EMPTY_ITERATOR;
    }
View Full Code Here

TOP

Related Classes of org.jaxen.util.SingleObjectIterator

Copyright © 2018 www.massapicom. 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.