Package org.apache.axiom.om.impl.dom

Examples of org.apache.axiom.om.impl.dom.ElementImpl


        getDetail();
        if (getDetail() == null) {
            setDetail(getNewSOAPFaultDetail(this));

        }
        OMElement faultDetailEnty = new ElementImpl(this,
                                                    SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY,
                                                    null, this.factory);
        faultDetailEnty.setText(sw.getBuffer().toString());
    }
View Full Code Here


    public void setDocument(DocumentImpl document) {
        this.document = document;
    }

    public OMElement createOMElement(String localName, OMNamespace ns) {
        return new ElementImpl((DocumentImpl) this.createOMDocument(),
                               localName, (NamespaceImpl) ns, this);
    }
View Full Code Here

    }

    public OMElement createOMElement(String localName, OMNamespace ns,
                                     OMContainer parent) throws OMDOMException {
        if (parent == null) {
            return new ElementImpl((DocumentImpl) this.createOMDocument(),
                               localName, (NamespaceImpl) ns, this);
        }

        switch (((ParentNode) parent).getNodeType()) {
            case Node.ELEMENT_NODE: // We are adding a new child to an elem
                ElementImpl parentElem = (ElementImpl) parent;
                ElementImpl elem = new ElementImpl((DocumentImpl) parentElem
                        .getOwnerDocument(), localName, (NamespaceImpl) ns, this);
                parentElem.appendChild(elem);
                return elem;

            case Node.DOCUMENT_NODE:
                DocumentImpl docImpl = (DocumentImpl) parent;
                return new ElementImpl(docImpl, localName,
                                       (NamespaceImpl) ns, this);

            case Node.DOCUMENT_FRAGMENT_NODE:
                DocumentFragmentImpl docFragImpl = (DocumentFragmentImpl) parent;
                return new ElementImpl((DocumentImpl) docFragImpl
                        .getOwnerDocument(), localName, (NamespaceImpl) ns, this);
            default:
                throw new OMDOMException(
                        "The parent container can only be an ELEMENT, DOCUMENT " +
                                "or a DOCUMENT FRAGMENT");
View Full Code Here

    /** Creates an OMElement with the builder. */
    public OMElement createOMElement(String localName, OMNamespace ns,
                                     OMContainer parent, OMXMLParserWrapper builder) {
        switch (((ParentNode) parent).getNodeType()) {
            case Node.ELEMENT_NODE: // We are adding a new child to an elem
                ElementImpl parentElem = (ElementImpl) parent;
                ElementImpl elem = new ElementImpl((DocumentImpl) parentElem
                        .getOwnerDocument(), localName, (NamespaceImpl) ns,
                                             builder, this);
                parentElem.appendChild(elem);
                return elem;
            case Node.DOCUMENT_NODE:
                DocumentImpl docImpl = (DocumentImpl) parent;
                ElementImpl elem2 = new ElementImpl(docImpl, localName,
                                                    (NamespaceImpl) ns, builder, this);
                docImpl.appendChild(elem2);
                return elem2;

            case Node.DOCUMENT_FRAGMENT_NODE:
                DocumentFragmentImpl docFragImpl = (DocumentFragmentImpl) parent;
                return new ElementImpl((DocumentImpl) docFragImpl
                        .getOwnerDocument(), localName, (NamespaceImpl) ns,
                                             builder, this);
            default:
                throw new OMDOMException(
                        "The parent container can only be an ELEMENT, DOCUMENT " +
View Full Code Here

    public OMText createOMText(OMContainer parent, OMText source) {
        return new TextImpl(parent, (TextImpl) source, this);
    }

    public OMText createOMText(OMContainer parent, char[] charArary, int type) {
        ElementImpl parentElem = (ElementImpl) parent;
        TextImpl txt = new TextImpl((DocumentImpl) parentElem
                .getOwnerDocument(), charArary, this);
        parentElem.addChild(txt);
        return txt;
    }
View Full Code Here

                                   domEle.getTagName().substring(0, indexOfColon));
        } else {
            localname = domEle.getLocalName();
            ns = new NamespaceImpl(domEle.getNamespaceURI(), domEle.getPrefix());
        }
        ElementImpl eleImpl =
                new ElementImpl((DocumentImpl) this.getOwnerDocument(),
                        localname, ns, this.element.getOMFactory());

        SOAPElementImpl saajEle = new SOAPElementImpl(eleImpl);

        saajEle.setParentElement(parent);
View Full Code Here

            javax.xml.soap.SOAPHeader saajSOAPHeader
                    = new org.apache.axis2.saaj.SOAPHeaderImpl(doomSOAPHeader);
            doomSOAPHeader.setUserData(SAAJ_NODE, saajSOAPHeader, null);
            return saajSOAPHeader;
        } else { // instanceof org.apache.axis2.om.impl.dom.ElementImpl
            ElementImpl doomElement = (ElementImpl) domNode;
            SOAPElementImpl saajSOAPElement = new SOAPElementImpl(doomElement);
            doomElement.setUserData(SAAJ_NODE, saajSOAPElement, null);
            return saajSOAPElement;
        }
    }
View Full Code Here

    public void setDocument(DocumentImpl document) {
        this.document = document;
    }

    public OMElement createOMElement(String localName, OMNamespace ns) {
        return new ElementImpl((DocumentImpl) this.createOMDocument(),
                               localName, (OMNamespaceImpl) ns, this);
    }
View Full Code Here

    }

    public OMElement createOMElement(String localName, OMNamespace ns,
                                     OMContainer parent) throws OMDOMException {
        if (parent == null) {
            return new ElementImpl((DocumentImpl) this.createOMDocument(),
                               localName, (OMNamespaceImpl) ns, this);
        }

        switch (((ParentNode) parent).getNodeType()) {
            case Node.ELEMENT_NODE: { // We are adding a new child to an elem
                return new ElementImpl((ElementImpl) parent, localName, (OMNamespaceImpl) ns, this);
            }
            case Node.DOCUMENT_NODE: {
                DocumentImpl docImpl = (DocumentImpl) parent;
                ElementImpl elem = new ElementImpl(docImpl, localName,
                                       (OMNamespaceImpl) ns, this);
                docImpl.appendChild(elem);
                return elem;
            }
            case Node.DOCUMENT_FRAGMENT_NODE:
                DocumentFragmentImpl docFragImpl = (DocumentFragmentImpl) parent;
                return new ElementImpl((DocumentImpl) docFragImpl
                        .getOwnerDocument(), localName, (OMNamespaceImpl) ns, this);
            default:
                throw new OMDOMException(
                        "The parent container can only be an ELEMENT, DOCUMENT " +
                                "or a DOCUMENT FRAGMENT");
View Full Code Here

    /** Creates an OMElement with the builder. */
    public OMElement createOMElement(String localName, OMNamespace ns,
                                     OMContainer parent, OMXMLParserWrapper builder) {
        switch (((ParentNode) parent).getNodeType()) {
            case Node.ELEMENT_NODE: // We are adding a new child to an elem
                ElementImpl parentElem = (ElementImpl) parent;
                ElementImpl elem = new ElementImpl((DocumentImpl) parentElem
                        .getOwnerDocument(), localName, (OMNamespaceImpl) ns,
                                             builder, this);
                parentElem.appendChild(elem);
                return elem;
            case Node.DOCUMENT_NODE:
                DocumentImpl docImpl = (DocumentImpl) parent;
                ElementImpl elem2 = new ElementImpl(docImpl, localName,
                                                    (OMNamespaceImpl) ns, builder, this);
                docImpl.appendChild(elem2);
                return elem2;

            case Node.DOCUMENT_FRAGMENT_NODE:
                DocumentFragmentImpl docFragImpl = (DocumentFragmentImpl) parent;
                return new ElementImpl((DocumentImpl) docFragImpl
                        .getOwnerDocument(), localName, (OMNamespaceImpl) ns,
                                             builder, this);
            default:
                throw new OMDOMException(
                        "The parent container can only be an ELEMENT, DOCUMENT " +
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.impl.dom.ElementImpl

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.