Examples of OMDescendantsIterator


Examples of org.apache.axiom.om.impl.common.OMDescendantsIterator

    public Iterator getChildren() {
        return new OMChildrenIterator(getFirstOMChild());
    }

    public Iterator getDescendants(boolean includeSelf) {
        return new OMDescendantsIterator(this, includeSelf);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.common.OMDescendantsIterator

    public Iterator getChildren() {
        return new OMChildrenIterator(getFirstOMChild());
    }

    public Iterator getDescendants(boolean includeSelf) {
        return new OMDescendantsIterator(this, includeSelf);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.common.OMDescendantsIterator

    public Iterator getChildren() {
        return new OMChildrenIterator(getFirstOMChild());
    }

    public Iterator getDescendants(boolean includeSelf) {
        return new OMDescendantsIterator((OMContainer)this, includeSelf);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.common.OMDescendantsIterator

    public Iterator getChildren() {
        return new OMChildrenIterator(getFirstOMChild());
    }

    public Iterator getDescendants(boolean includeSelf) {
        return new OMDescendantsIterator(this, includeSelf);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.common.OMDescendantsIterator

    public Iterator getChildren() {
        return new OMChildrenIterator(getFirstOMChild());
    }

    public Iterator getDescendants(boolean includeSelf) {
        return new OMDescendantsIterator(this, includeSelf);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.common.OMDescendantsIterator

    public Iterator getChildren() {
        return new OMChildrenIterator(getFirstOMChild());
    }

    public Iterator getDescendants(boolean includeSelf) {
        return new OMDescendantsIterator(this, includeSelf);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.traverse.OMDescendantsIterator

                                           String localName) {
        final QName qname = new QName(namespaceURI, localName);
        return new NodeListImpl() {
            protected Iterator getIterator() {
                return new OMQNameFilterIterator(
                        new OMDescendantsIterator(getFirstOMChild()), qname);
            }
        };
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.traverse.OMDescendantsIterator

     */
    public NodeList getElementsByTagName(final String name) {
        if (name.equals("*")) {
            return new NodeListImpl() {
                protected Iterator getIterator() {
                    return new OMDescendantsIterator(getFirstOMChild());
                }
            };
        } else {
            return new NodeListImpl() {
                protected Iterator getIterator() {
                    return new OMQualifiedNameFilterIterator(
                            new OMDescendantsIterator(getFirstOMChild()), name);
                }
            };
        }
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.traverse.OMDescendantsIterator

        MTOMStAXSOAPModelBuilder builder = createBuilderForTestMTOMMessage();
        Attachments attachments = builder.getAttachments();
        OMDocument doc = builder.getDocument();
        // Find all the binary nodes
        List/*<OMText>*/ binaryNodes = new ArrayList();
        for (Iterator it = new OMDescendantsIterator(doc.getFirstOMChild()); it.hasNext(); ) {
            OMNode node = (OMNode)it.next();
            if (node instanceof OMText) {
                OMText text = (OMText)node;
                if (text.isBinary()) {
                    binaryNodes.add(text);
                }
            }
        }
        assertFalse(binaryNodes.isEmpty());
        // At this moment only the SOAP part should have been loaded
        assertEquals(1, attachments.getContentIDList().size());
        for (Iterator it = binaryNodes.iterator(); it.hasNext(); ) {
            // Request the DataHandler and do something with it to make sure
            // the part is loaded
            ((DataHandler)((OMText)it.next()).getDataHandler()).getInputStream().close();
        }
        assertEquals(binaryNodes.size() + 1, attachments.getContentIDList().size());
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.traverse.OMDescendantsIterator

                                           String localName) {
        final QName qname = new QName(namespaceURI, localName);
        return new NodeListImpl() {
            protected Iterator getIterator() {
                return new OMQNameFilterIterator(
                        new OMDescendantsIterator(getFirstOMChild()), qname);
            }
        };
    }
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.