adapforms.runtime.state.dom
Class AbstractTextNode

java.lang.Object
  extended by adapforms.runtime.state.dom.AbstractNode
      extended by adapforms.runtime.state.dom.AbstractTextNode
All Implemented Interfaces:
org.w3c.dom.CharacterData, org.w3c.dom.Node, org.w3c.dom.Text

public abstract class AbstractTextNode
extends AbstractNode
implements org.w3c.dom.Text

Abstract class for creating simple DOM Text instances, allowing subclasses to overwrite only those methods they need. All methods simply throw an UnsupportedOperationException when invoked.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Field Summary
 
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
AbstractTextNode()
           
 
Method Summary
 void appendData(java.lang.String arg)
           
 void deleteData(int offset, int count)
           
 java.lang.String getData()
           
 int getLength()
           
 java.lang.String getNodeName()
           
 short getNodeType()
           
abstract  java.lang.String getNodeValue()
           
 java.lang.String getTextContent()
           
 java.lang.String getWholeText()
           
 boolean hasAttributes()
           
 boolean hasChildNodes()
           
 void insertData(int offset, java.lang.String arg)
           
 boolean isElementContentWhitespace()
           
 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)
           
 org.w3c.dom.Text splitText(int offset)
           
 java.lang.String substringData(int offset, int count)
           
 java.lang.String toString()
           
 
Methods inherited from class adapforms.runtime.state.dom.AbstractNode
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getUserData, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getUserData, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Constructor Detail

AbstractTextNode

public AbstractTextNode()
Method Detail

getNodeType

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

getNodeName

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

getTextContent

public final java.lang.String getTextContent()
                                      throws org.w3c.dom.DOMException
Specified by:
getTextContent in interface org.w3c.dom.Node
Overrides:
getTextContent in class AbstractNode
Throws:
org.w3c.dom.DOMException

getNodeValue

public abstract java.lang.String getNodeValue()
                                       throws org.w3c.dom.DOMException
Specified by:
getNodeValue in interface org.w3c.dom.Node
Overrides:
getNodeValue in class AbstractNode
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

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

getData

public final java.lang.String getData()
                               throws org.w3c.dom.DOMException
Specified by:
getData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

getLength

public final int getLength()
Specified by:
getLength in interface org.w3c.dom.CharacterData

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

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

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

substringData

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

getWholeText

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

isElementContentWhitespace

public final boolean isElementContentWhitespace()
Specified by:
isElementContentWhitespace 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

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

hasChildNodes

public final boolean hasChildNodes()
Specified by:
hasChildNodes in interface org.w3c.dom.Node
Overrides:
hasChildNodes in class AbstractNode

hasAttributes

public final boolean hasAttributes()
Specified by:
hasAttributes in interface org.w3c.dom.Node
Overrides:
hasAttributes in class AbstractNode

toString

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