org.jbind.xml.dom3.core
Class DomText

java.lang.Object
  extended byorg.jbind.xml.dom3.core.DomObject
      extended byorg.jbind.xml.dom3.core.DomNode
          extended byorg.jbind.xml.dom3.core.DomNonAttrOrElm
              extended byorg.jbind.xml.dom3.core.DomCharacterData
                  extended byorg.jbind.xml.dom3.core.DomText
All Implemented Interfaces:
org.w3c.dom.CharacterData, IDomCharacterData, IDomNode, IDomObject, IDomText, IHasLocation, IImpl, IImplChild, IImplWithText, ITextImpl, org.w3c.dom.Node, org.w3c.dom.Text
Direct Known Subclasses:
DomCDataSection

public class DomText
extends DomCharacterData
implements IDomText


Field Summary
 
Fields inherited from class org.jbind.xml.dom3.core.DomNode
myChildNodes, myParentNode
 
Fields inherited from class org.jbind.xml.dom3.core.DomObject
myOwnerDocument
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
  DomText(IDomDocument aDomDocument, ITextContentProvider aTextContentProvider)
           
  DomText(IDomDocument aDomDocument, java.lang.String aData)
           
protected DomText(IDomText aDomText, boolean aDeep)
           
 
Method Summary
 void accept(IDataImplVisitor aVisitor)
           
 org.w3c.dom.Node cloneNode(boolean aDeep)
           
protected  void doAfterAccept(IDomVisitor aDomVisitor)
           
protected  void doBeforeAccept(IDomVisitor aDomVisitor)
           
 IAnyTypeData getAttributeData(java.lang.String aNamespace, java.lang.String aLocalName)
          Gets the data object of an attribute.
protected  StrBuffer getDataBuffer()
          Creates the data buffer on demand.
 boolean getIsWhitespaceInElementContent()
           
 java.lang.String getNodeName()
           
 short getNodeType()
           
 java.lang.String getWholeText()
           
 boolean hasTextContent()
          Checks if the implementation has textual content.
 java.util.ListIterator iterElementData(java.lang.String aNamespace, java.lang.String aLocalName)
          Iterates the data objects for the specified namespace and element name.
 org.w3c.dom.Text replaceWholeText(java.lang.String aString)
           
 org.w3c.dom.Text splitText(int offset)
           
 
Methods inherited from class org.jbind.xml.dom3.core.DomCharacterData
appendData, deleteData, deleteData, doCloneChildNodes, getData, getLength, getNodeValue, getTextContent, insertData, replaceData, setData, setDataBuffer, setNodeValue, setTextContent, setTextContent, substringData, substringData
 
Methods inherited from class org.jbind.xml.dom3.core.DomNonAttrOrElm
getAttributes, getLocalName, getNamespaceURI, getPrefix, hasAttributes, isDefault, isNil, setPrefix
 
Methods inherited from class org.jbind.xml.dom3.core.DomNode
accept, addElement, addElement, addText, appendChild, collectTextContent, collectTextContent, compareTreePosition, getAncestor, getBaseURI, getChild, getChildByClass, getChildNodes, getFirstChild, getInterface, getLastChild, getLocation, getNamespaceForPrefix, getNbChildren, getNextSibling, getNonDefaultedNbChildren, getParentImpl, getParentNode, getPrefixForNamespace, getPrefixToNamespaceMapping, getPreviousSibling, getUserData, hasChildNodes, insertAfter, insertBefore, isEqualNode, isSameNode, isSupported, iterChildren, lookupNamespacePrefix, lookupNamespaceURI, normalize, removeChild, replaceChild, restoreTextContent, saveTextContent, setChildNodes, setLocation, setPrefixToNamespaceMapping, visitChildren
 
Methods inherited from class org.jbind.xml.dom3.core.DomObject
checkMutability, checkOwnerDocument, getOwnerDocument, isReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface org.jbind.xml.dom3.types.IDomCharacterData
deleteData, substringData
 
Methods inherited from interface org.jbind.xml.dom3.types.IDomNode
accept, getTextContent, insertAfter, lookupNamespaceURI, setLocation, setPrefixToNamespaceMapping, setTextContent, setTextContent
 
Methods inherited from interface org.jbind.xml.dom3.types.IDomObject
getOwnerDocument, isReadOnly
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 
Methods inherited from interface org.jbind.xml.core.data.IImpl
getPrefixToNamespaceMapping, isNil, iterChildren
 
Methods inherited from interface org.jbind.xml.core.bridge.IImplChild
getParentImpl
 
Methods inherited from interface org.jbind.xml.core.bridge.IImplWithText
getTextContent, isDefault, restoreTextContent, saveTextContent, setTextContent, setTextContent
 

Constructor Detail

DomText

public DomText(IDomDocument aDomDocument,
               ITextContentProvider aTextContentProvider)

DomText

public DomText(IDomDocument aDomDocument,
               java.lang.String aData)

DomText

protected DomText(IDomText aDomText,
                  boolean aDeep)
Method Detail

getDataBuffer

protected StrBuffer getDataBuffer()
Creates the data buffer on demand.

Overrides:
getDataBuffer in class DomCharacterData
Returns:
(required).

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

cloneNode

public org.w3c.dom.Node cloneNode(boolean aDeep)
Specified by:
cloneNode 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

getWholeText

public java.lang.String getWholeText()

replaceWholeText

public org.w3c.dom.Text replaceWholeText(java.lang.String aString)

getIsWhitespaceInElementContent

public boolean getIsWhitespaceInElementContent()

doBeforeAccept

protected void doBeforeAccept(IDomVisitor aDomVisitor)
Specified by:
doBeforeAccept in class DomNode

doAfterAccept

protected void doAfterAccept(IDomVisitor aDomVisitor)
Specified by:
doAfterAccept in class DomNode

getAttributeData

public IAnyTypeData getAttributeData(java.lang.String aNamespace,
                                     java.lang.String aLocalName)
Description copied from interface: IImpl
Gets the data object of an attribute.

Specified by:
getAttributeData in interface IImpl
Parameters:
aNamespace - (required).
aLocalName - (required).
Returns:
(optional).

iterElementData

public java.util.ListIterator iterElementData(java.lang.String aNamespace,
                                              java.lang.String aLocalName)
Description copied from interface: IImpl
Iterates the data objects for the specified namespace and element name.

Specified by:
iterElementData in interface IImpl
Parameters:
aNamespace - (required).
aLocalName - (required).
Returns:
(required). An iterator of IAnyTypeData.

hasTextContent

public boolean hasTextContent()
Description copied from interface: IImplWithText
Checks if the implementation has textual content. This method is used to decide if a default value should be used or not.

Attribute implementations will always return true because attributes take their default values only if they are not present in the instance.

Element implementation will return true iff their text content is null or equal to the empty string. In other words the default value of an element is used when the element is empty. (cf. the note at W3C XML-Schema-Structure specification section 3.1.1).

Specified by:
hasTextContent in interface IImplWithText
Returns:
Returns true iff there is textual content.

accept

public void accept(IDataImplVisitor aVisitor)
            throws XmlException
Specified by:
accept in interface IImpl
Throws:
XmlException