Examples of OMContainer


Examples of org.apache.axiom.om.OMContainer

        // invoke transformation, with static enveope
        MessageContext synCtx = TestUtils.getTestContext(ENCLOSING_SOURCE);
        transformMediator.mediate(synCtx);

        // validate result
        OMContainer body = synCtx.getEnvelope().getBody();
        if (body.getFirstOMChild() instanceof OMElement) {

            OMElement someOtherElem = (OMElement) body.getFirstOMChild();
            assertTrue("someOtherElement".equals(someOtherElem.getLocalName()));
            assertTrue("http://someother".equals(someOtherElem.getNamespace().getName()));

            OMElement getQuoteElem = (OMElement) someOtherElem.getFirstOMChild();
            assertTrue("GetQuote".equals(getQuoteElem.getLocalName()));
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        } catch (XMLStreamException e) {
            handleException("Error parsing Synapse configuration : " + e.getMessage(), e);
        }
        root.build();

        OMContainer definitions = root.getFirstChildWithName(Constants.DEFINITIONS_ELT);
        if (definitions != null) {

            Iterator iter = definitions.getChildren();
            while (iter.hasNext()) {
                Object o = iter.next();
                if (o instanceof OMElement) {
                    OMElement elt = (OMElement) o;
                    if (Constants.SEQUENCE_ELT.equals(elt.getQName())) {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                next = null;
            }
        } else {
            OMNode nextSibling = ((OMNodeImpl) next).nextSibling;
            //OMNode parent = next.getParent();
            OMContainer parent = next.getParent();
            if (nextSibling != null) {
                next = nextSibling;
            } else if ((parent != null) && parent.isComplete() && !(parent instanceof OMDocument)) {
                next = (OMNodeImpl) parent;
                backtracked = true;
            } else {
                next = null;
            }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

            } else {
                next = null;
            }
        } else {
            OMNode nextSibling = ((ChildNode) next).nextSibling;
            OMContainer parent = next.getParent();
            if (nextSibling != null) {
                next = nextSibling;
            } else if ((parent != null) && parent.isComplete()) {
                next = (NodeImpl) parent;
                backtracked = true;
            } else {
                next = null;
            }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

     *      java.lang.String, java.lang.String)
     */
    public void endElement(String arg0, String arg1, String arg2)
            throws SAXException {
        if (lastNode.isComplete()) {
            OMContainer parent = lastNode.getParent();
            ((OMNodeEx) parent).setComplete(true);
            lastNode = (OMNode) parent;
        } else {
            OMElement e = (OMElement) lastNode;
            ((OMNodeEx) e).setComplete(true);
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                next = null;
            }
        } else {
            OMNode nextSibling = ((OMNodeImpl) next).nextSibling;
            //OMNode parent = next.getParent();
            OMContainer parent = next.getParent();
            if (nextSibling != null) {
                next = nextSibling;
            } else if ((parent != null) && parent.isComplete()) {
                next = (OMNodeImpl) parent;
                backtracked = true;
            } else {
                next = null;
            }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

     *      java.lang.String, java.lang.String)
     */
    public void endElement(String arg0, String arg1, String arg2)
            throws SAXException {
        if (lastNode.isComplete()) {
            OMContainer parent = lastNode.getParent();
            ((OMNodeEx)parent).setComplete(true);
            lastNode = (OMNode) parent;
        } else {
            OMElement e = (OMElement) lastNode;
            ((OMNodeEx)e).setComplete(true);
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        if (lastNode == null) {
            return null;
        } else if (!lastNode.isComplete()) {
            node = createOMText((OMElement) lastNode, textType);
        } else {
            OMContainer parent = lastNode.getParent();
            if (!(parent instanceof OMDocument)) {
                node = createOMText((OMElement) parent, textType);
            }
        }
        return node;
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                backtracked = true;
            } else {
                next = null;
            }
        } else {
            OMContainer parent = next.getParent();
            OMNode nextSibling = getNextSibling(next);
            if (nextSibling != null) {
                next = nextSibling;
            } else if ((parent != null) && parent.isComplete() && !(parent instanceof OMDocument)) {
                next = (OMNodeImpl) parent;
                backtracked = true;
            } else {
                next = null;
            }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

     */
    public Object getDocumentNode(Object contextNode) {
        if (contextNode instanceof OMDocument) {
            return contextNode;
        }
        OMContainer parent = ((OMNode) contextNode).getParent();
        if (parent == null) {
            // this node doesn't have a parent Document. So return the document element itself
            return contextNode;
        } else {
            return getDocumentNode(parent);
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.