Class Text

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Node, Text, org.w3c.dom.CharacterData, org.w3c.dom.Node, org.w3c.dom.Text
    Direct Known Subclasses:
    CDATAImpl, CommentImpl

    public class Text
    extends NodeImpl
    implements Text
    A representation of a node whose value is text. A Text object may represent text that is content or text that is a comment.
    Author:
    Davanum Srinivas (dims@yahoo.com), Heejune Ahn (cityboy@tmax.co.kr)
    See Also:
    Serialized Form
    • Constructor Detail

      • Text

        public Text​(org.w3c.dom.CharacterData data)
      • Text

        public Text​(java.lang.String s)
      • Text

        public Text()
    • Method Detail

      • isComment

        public boolean isComment()
        Retrieves whether this Text object represents a comment.
        Specified by:
        isComment in interface Text
        Returns:
        true if this Text object is a comment; false otherwise
      • getNodeValue

        public java.lang.String getNodeValue()
                                      throws org.w3c.dom.DOMException
        Implementation of DOM TEXT Interface *************************************************************
        Specified by:
        getNodeValue in interface org.w3c.dom.Node
        Overrides:
        getNodeValue in class NodeImpl
        Throws:
        org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
      • setNodeValue

        public void setNodeValue​(java.lang.String nodeValue)
                          throws org.w3c.dom.DOMException
        Description copied from class: NodeImpl
        The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect.
        Specified by:
        setNodeValue in interface org.w3c.dom.Node
        Overrides:
        setNodeValue in class NodeImpl
        Throws:
        org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
      • splitText

        public org.w3c.dom.Text splitText​(int offset)
                                   throws org.w3c.dom.DOMException
        Use the textRep, and convert it to org.apache.axis.Text in order to keep the Axis SOAP strcture after operation This work would be easier if constructor, Text(org.w3c.dom.Text) is defined
        Specified by:
        splitText in interface org.w3c.dom.Text
        Parameters:
        offset -
        Returns:
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • getData

        public java.lang.String getData()
                                 throws org.w3c.dom.DOMException
        Specified by:
        getData in interface org.w3c.dom.CharacterData
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • setData

        public void setData​(java.lang.String data)
                     throws org.w3c.dom.DOMException
        Specified by:
        setData in interface org.w3c.dom.CharacterData
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • getLength

        public int getLength()
        Specified by:
        getLength in interface org.w3c.dom.CharacterData
        Returns:
        Since:
        SAAJ 1.2
      • substringData

        public java.lang.String substringData​(int offset,
                                              int count)
                                       throws org.w3c.dom.DOMException
        Specified by:
        substringData in interface org.w3c.dom.CharacterData
        Parameters:
        offset -
        count -
        Returns:
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • appendData

        public void appendData​(java.lang.String arg)
                        throws org.w3c.dom.DOMException
        Specified by:
        appendData in interface org.w3c.dom.CharacterData
        Parameters:
        arg -
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • insertData

        public void insertData​(int offset,
                               java.lang.String arg)
                        throws org.w3c.dom.DOMException
        Specified by:
        insertData in interface org.w3c.dom.CharacterData
        Parameters:
        offset -
        arg -
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • replaceData

        public void replaceData​(int offset,
                                int count,
                                java.lang.String arg)
                         throws org.w3c.dom.DOMException
        Specified by:
        replaceData in interface org.w3c.dom.CharacterData
        Parameters:
        offset -
        count -
        arg -
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • deleteData

        public void deleteData​(int offset,
                               int count)
                        throws org.w3c.dom.DOMException
        Specified by:
        deleteData in interface org.w3c.dom.CharacterData
        Parameters:
        offset -
        count -
        Throws:
        org.w3c.dom.DOMException
        Since:
        SAAJ 1.2
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getWholeText

        public java.lang.String getWholeText()
        DOM Level 3 stubs
        Specified by:
        getWholeText in interface org.w3c.dom.Text
      • isElementContentWhitespace

        public boolean isElementContentWhitespace()
        Specified by:
        isElementContentWhitespace in interface org.w3c.dom.Text
      • replaceWholeText

        public org.w3c.dom.Text replaceWholeText​(java.lang.String content)
        Specified by:
        replaceWholeText in interface org.w3c.dom.Text