Examples of OMContainer


Examples of org.apache.axiom.om.OMContainer

                OMNamespace ns = (OMNamespace) iter.next();
                if (prefix.equals(ns.getPrefix())) {
                    return ns.getNamespaceURI();    
                }
            }
            OMContainer parent = currentElem.getParent();
            if (parent != null && parent instanceof OMElement) {
                currentElem = (OMElement)parent;
            } else {
                return null;
            }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                        throw new SynapseException(msg, je);
                    }
                }
            }

            OMContainer parent = currentElem.getParent();
            //if the parent is a document element or parent is null ,then return
            if (parent == null || parent instanceof OMDocument) {
                return;
            }
            if (parent instanceof OMElement) {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                 .setBodyFromFile("../../repository/conf/sample/resources/transform/med_message.xml")
                 .addTextAroundBody().build();
         transformMediator.mediate(synCtx);

         // validate result
         OMContainer body = synCtx.getEnvelope().getBody();
         assertTrue(body.getFirstOMChild().getNextOMSibling() instanceof OMElement);
         assertTrue( ((OMElement)body.getFirstOMChild().getNextOMSibling()).getText().length() > 0);
    }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                .setBodyFromString(ENCLOSING_SOURCE)
                .addTextAroundBody().build();
        transformMediator.mediate(synCtx);

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

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

            assertQuoteElement(someOtherElem.getFirstOMChild());
        } else {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

            String value = StringFunction.evaluate(o, navigator);
            IRI resolved = null;
            IRI baseUri = null;
            if (o instanceof OMNode) {
              OMNode node = (OMNode) o;
              OMContainer el = node.getParent();
              if (el instanceof Document) {
                Document doc = (Document) el;
                baseUri = doc.getBaseUri();
              } else if (el instanceof Element) {
                Element element = (Element) el;
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

                        next = namespace;
                        break;
                    }
                } else {
                    declaredNamespaces = null;
                    OMContainer parent = element.getParent();
                    if (parent instanceof OMElement) {
                        element = (OMElement)parent;
                    } else {
                        next = null;
                        break;
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        for (Iterator it = omElement.getAllDeclaredNamespaces(); it.hasNext(); ) {
            seenPrefixes.add(((OMNamespace)it.next()).getPrefix());
        }
        OMElement current = omElement;
        while (true) {
            OMContainer parent = current.getParent();
            if (!(parent instanceof OMElement)) {
                return;
            }
            current = (OMElement)parent;
            for (Iterator it = current.getAllDeclaredNamespaces(); it.hasNext(); ) {
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

   
    public PushOMBuilder(OMSourcedElementImpl root) throws XMLStreamException {
        this.root = root;
        factory = (OMFactoryEx)root.getOMFactory();
        // Seed the namespace context with the namespace context from the parent
        OMContainer parent = root.getParent();
        if (parent instanceof OMElement) {
            for (Iterator it = ((OMElement)parent).getNamespacesInScope(); it.hasNext(); ) {
                OMNamespace ns = (OMNamespace)it.next();
                setPrefix(ns.getPrefix(), ns.getNamespaceURI());
            }
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

        }
    }

    public void setSubCode(SOAPFaultSubCode subCode)
            throws SOAPProcessingException {
        OMContainer parentNode = getParent();
        if (!((parentNode instanceof SOAP11FaultSubCodeImpl) ||
                (parentNode instanceof SOAP11FaultCodeImpl))) {
            throw new SOAPProcessingException(
                    "Expecting SOAP 1.1 implementation of SOAP Fault Sub " +
                            "Code. But received some other implementation");
View Full Code Here

Examples of org.apache.axiom.om.OMContainer

     */
    public void endElement(String uri, String localName, String qName)
            throws SAXException {
        if (!inEntityReference) {
            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
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.