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

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


        }
        return omText;
    }

    public TextImpl getText(DocumentImpl doc) {
        return new TextImpl(doc, omText.getText(), doc.getOMFactory());
    }
View Full Code Here


        Node firstChild = element.getFirstChild();
        if (firstChild instanceof org.w3c.dom.Text) {
            ((org.w3c.dom.Text)firstChild).setData(text);
        } else {
            // Else this is a header
            TextImpl doomText = new TextImpl(text, this.element.getOMFactory());
            doomText.setNextOMSibling((OMNode)firstChild);
            doomText.setPreviousOMSibling(null);
            element.setFirstChild(doomText);
            ((ChildNode)firstChild).setPreviousOMSibling(doomText);
        }
        return this;
    }
View Full Code Here

    public OMText createOMText(OMContainer parent, String text) {
        return createOMText(parent, text, OMNode.TEXT_NODE);
    }

    public OMText createOMText(OMContainer parent, QName text) {
        return new TextImpl(parent, text, this);
    }
View Full Code Here

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

    public OMText createOMText(OMContainer parent, QName text, int type) {
        return new TextImpl(parent, text, type, this);
    }
View Full Code Here

        DocumentImpl ownerDocument = (DocumentImpl)((ElementImpl)parent).getOwnerDocument();
        TextNodeImpl txt;
        if (type == OMNode.CDATA_SECTION_NODE) {
            txt = new CDATASectionImpl(ownerDocument, text, this);
        } else {
            txt = new TextImpl(ownerDocument, text, type, this);
        }
        parent.addChild(txt);
        return txt;
    }
View Full Code Here

        return txt;
    }
   
   
    public OMText createOMText(OMContainer parent, OMText source) {
        return new TextImpl(parent, (TextImpl) source, this);
    }
View Full Code Here

        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

     * Creates a OMDOM Text node carrying the given value.
     *
     * @see org.apache.axiom.om.OMFactory#createOMText(String)
     */
    public OMText createOMText(String s) {
        return new TextImpl(this.document, s, this);
    }
View Full Code Here

     * @see org.apache.axiom.om.OMFactory#createOMText(String, int)
     */
    public OMText createOMText(String text, int type) {
        switch (type) {
            case OMNode.TEXT_NODE:
                return new TextImpl(this.document, text, this);
            default:
                throw new OMDOMException("Only Text nodes are supported right now");
        }
    }
View Full Code Here

     * optimization parameters and returns it.
     *
     * @see org.apache.axiom.om.OMFactory#createOMText(String, String, boolean)
     */
    public OMText createOMText(String text, String mimeType, boolean optimize) {
        return new TextImpl(this.document, text, mimeType, optimize, this);
    }
View Full Code Here

TOP

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

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.