Class TextImpl

  • All Implemented Interfaces:
    org.w3c.dom.CharacterData, org.w3c.dom.Node, org.w3c.dom.Text

    public class TextImpl
    extends DefaultText

    INTERNAL:

    Usage of this class is not supported. It may be altered or removed at any time.
    Version:
    $Id: TextImpl.java 705596 2008-10-17 13:05:10Z mrglavas $
    Author:
    Neil Graham, IBM
    • Constructor Detail

      • TextImpl

        public TextImpl​(java.lang.StringBuffer str,
                        SchemaDOM sDOM,
                        int row,
                        int col)
    • Method Detail

      • getNodeName

        public java.lang.String getNodeName()
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Overrides:
        getNodeName in class NodeImpl
      • getParentNode

        public org.w3c.dom.Node getParentNode()
        Specified by:
        getParentNode in interface org.w3c.dom.Node
        Overrides:
        getParentNode in class DefaultNode
      • getPreviousSibling

        public org.w3c.dom.Node getPreviousSibling()
        Specified by:
        getPreviousSibling in interface org.w3c.dom.Node
        Overrides:
        getPreviousSibling in class DefaultNode
      • getNextSibling

        public org.w3c.dom.Node getNextSibling()
        Specified by:
        getNextSibling in interface org.w3c.dom.Node
        Overrides:
        getNextSibling in class DefaultNode
      • getData

        public java.lang.String getData()
                                 throws org.w3c.dom.DOMException
        The character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CharacterData node. However, implementation limits may mean that the entirety of a node's data may not fit into a single DOMString. In such cases, the user may call substringData to retrieve the data in appropriately sized pieces.
        Specified by:
        getData in interface org.w3c.dom.CharacterData
        Overrides:
        getData in class DefaultText
        Throws:
        org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
        org.w3c.dom.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
      • getLength

        public int getLength()
        The number of 16-bit units that are available through data and the substringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.
        Specified by:
        getLength in interface org.w3c.dom.CharacterData
        Overrides:
        getLength in class DefaultText
      • substringData

        public java.lang.String substringData​(int offset,
                                              int count)
                                       throws org.w3c.dom.DOMException
        Extracts a range of data from the node.
        Specified by:
        substringData in interface org.w3c.dom.CharacterData
        Overrides:
        substringData in class DefaultText
        Parameters:
        offset - Start offset of substring to extract.
        count - The number of 16-bit units to extract.
        Returns:
        The specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.
        Throws:
        org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
        DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into a DOMString.