com.caucho.xml
Class QText

java.lang.Object
  extended by com.caucho.xml.QAbstractNode
      extended by com.caucho.xml.QText
All Implemented Interfaces:
CauchoNode, java.io.Serializable, org.w3c.dom.CharacterData, org.w3c.dom.Node, org.w3c.dom.Text
Direct Known Subclasses:
QCdata

public class QText
extends QAbstractNode
implements org.w3c.dom.Text

Represents a text node.

See Also:
Serialized Form

Field Summary
protected  java.lang.String _data
           
protected  boolean _whitespaceOnly
           
 
Fields inherited from class com.caucho.xml.QAbstractNode
L
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
QText()
          Creates a new text node.
QText(java.lang.String data)
          Creates a new text node with initial data.
 
Method Summary
 void appendData(java.lang.String arg)
           
 void deleteData(int offset)
           
 void deleteData(int offset, int count)
           
 java.lang.String getData()
          Returns the node value.
 boolean getIsWhitespaceInElementContent()
           
 int getLength()
          Returns the length of the text data.
 java.lang.String getNodeName()
           
 short getNodeType()
           
 java.lang.String getNodeValue()
          Returns the node value.
 java.lang.String getWholeText()
           
 boolean hasContent()
           
 void insertData(int offset, java.lang.String arg)
           
 boolean isElementContentWhitespace()
           
 org.w3c.dom.Text joinText(org.w3c.dom.Text node1, org.w3c.dom.Text node2)
           
 void print(XmlPrinter os)
           
 void replaceData(int offset, int count, java.lang.String arg)
           
 org.w3c.dom.Text replaceWholeText(java.lang.String content)
           
 void setData(java.lang.String data)
          Sets the node value.
 void setNodeValue(java.lang.String data)
          Sets the node value.
 org.w3c.dom.Text splitText(int offset)
           
 java.lang.String substringData(int start)
           
 java.lang.String substringData(int start, int count)
           
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.xml.QAbstractNode
appendChild, baseURI, checkValid, cloneNode, compareDocumentPosition, compareTreePosition, equals, getAttributes, getBaseURI, getCanonicalName, getChildNodes, getColumn, getDependencyList, getFeature, getFilename, getFirstChild, getInterface, getLastChild, getLine, getLocalName, getNamespaceURI, getNextContent, getNextPreorder, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousContent, getPreviousSibling, getQName, getTextContent, getTextValue, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, normalize, print, printHtml, printPretty, removeChild, replaceChild, setFeature, setLocation, setPrefix, setTextContent, setUserData, supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Text
isElementContentWhitespace
 
Methods inherited from interface org.w3c.dom.CharacterData
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

_data

protected java.lang.String _data

_whitespaceOnly

protected boolean _whitespaceOnly
Constructor Detail

QText

public QText()
Creates a new text node.


QText

public QText(java.lang.String data)
Creates a new text node with initial data.

Method Detail

getNodeName

public java.lang.String getNodeName()
Specified by:
getNodeName in interface org.w3c.dom.Node

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface org.w3c.dom.Node

splitText

public org.w3c.dom.Text splitText(int offset)
                           throws org.w3c.dom.DOMException
Specified by:
splitText in interface org.w3c.dom.Text
Throws:
org.w3c.dom.DOMException

joinText

public org.w3c.dom.Text joinText(org.w3c.dom.Text node1,
                                 org.w3c.dom.Text node2)
                          throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

getIsWhitespaceInElementContent

public boolean getIsWhitespaceInElementContent()

getWholeText

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

replaceWholeText

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

toString

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

getNodeValue

public java.lang.String getNodeValue()
Returns the node value. For QCharacterData, this is the text value.

Specified by:
getNodeValue in interface org.w3c.dom.Node
Overrides:
getNodeValue in class QAbstractNode

setNodeValue

public void setNodeValue(java.lang.String data)
Sets the node value. For QCharacterData, this is the text value.

Specified by:
setNodeValue in interface org.w3c.dom.Node
Overrides:
setNodeValue in class QAbstractNode

getData

public java.lang.String getData()
Returns the node value. For QCharacterData, this is the text value.

Specified by:
getData in interface org.w3c.dom.CharacterData

setData

public void setData(java.lang.String data)
Sets the node value. For QCharacterData, this is the text value.

Specified by:
setData in interface org.w3c.dom.CharacterData

getLength

public int getLength()
Returns the length of the text data.

Specified by:
getLength in interface org.w3c.dom.CharacterData

substringData

public java.lang.String substringData(int start,
                                      int count)
                               throws org.w3c.dom.DOMException
Specified by:
substringData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

substringData

public java.lang.String substringData(int start)
                               throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

appendData

public void appendData(java.lang.String arg)
                throws org.w3c.dom.DOMException
Specified by:
appendData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

insertData

public void insertData(int offset,
                       java.lang.String arg)
                throws org.w3c.dom.DOMException
Specified by:
insertData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

deleteData

public void deleteData(int offset,
                       int count)
                throws org.w3c.dom.DOMException
Specified by:
deleteData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

deleteData

public void deleteData(int offset)
                throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

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
Throws:
org.w3c.dom.DOMException

hasContent

public boolean hasContent()
Overrides:
hasContent in class QAbstractNode

isElementContentWhitespace

public boolean isElementContentWhitespace()

print

public void print(XmlPrinter os)
           throws java.io.IOException
Throws:
java.io.IOException