Enhydra 3.1.1b1 API

org.enhydra.xml.lazydom
Class LazyText

java.lang.Object
  |
  +--org.apache.xerces.dom.NodeImpl
        |
        +--org.apache.xerces.dom.ChildNode
              |
              +--org.apache.xerces.dom.CharacterDataImpl
                    |
                    +--org.apache.xerces.dom.TextImpl
                          |
                          +--org.enhydra.xml.lazydom.LazyText

public class LazyText
extends org.apache.xerces.dom.TextImpl
implements LazyNode, PreFormattedText

Lazy text node.

See Also:
Serialized Form

Fields inherited from class org.apache.xerces.dom.CharacterDataImpl
data
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.apache.xerces.dom.NodeImpl
ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, IGNORABLEWS, MUTATION_AGGREGATE, MUTATION_ALL, MUTATION_LOCAL, MUTATION_NONE, MUTATIONEVENTS, OWNED, ownerNode, READONLY, SETVALUE, SPECIFIED, SYNCCHILDREN, SYNCDATA
 
Fields inherited from interface org.enhydra.xml.lazydom.LazyNode
DOCUMENT_NODE_ID, NULL_NODE_ID
 
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
protected LazyText(LazyDocument ownerDoc, LazyText template, java.lang.String data)
          Constructor.
 
Method Summary
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 int getNodeId()
          Get the node numeric id number.
 java.lang.String getPreFormattedText()
           
 LazyNode getTemplateNode()
          Get the template node as a LazyNode.
 LazyText getTemplateText()
          Get the template for this node.
 boolean isTemplateNode()
          Check if this node is a template node.
 void makeTemplateNode(int nodeId)
           
 void makeTemplateNode(int nodeId, java.lang.String text)
          Mark the node as a template node and associated preformatted text.
 void setNodeValue(java.lang.String value)
          Set the node value, invalidating the id.
 void setPreFormattedText(java.lang.String text)
           
 LazyNode templateClone(Document ownerDocument)
          Create a new node, using this node as the template.
 
Methods inherited from class org.apache.xerces.dom.TextImpl
getNodeName, getNodeType, isIgnorableWhitespace, setIgnorableWhitespace, splitText
 
Methods inherited from class org.apache.xerces.dom.CharacterDataImpl
appendData, deleteData, getData, getLength, getNodeValue, insertData, replaceData, setData, substringData
 
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, dispatchEvent, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getOwnerDocument, getPrefix, getReadOnly, getUserData, hasAttributes, hasChildNodes, insertBefore, normalize, removeChild, removeEventListener, replaceChild, setPrefix, setReadOnly, setUserData, supports, synchronizeData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyText

protected LazyText(LazyDocument ownerDoc,
                   LazyText template,
                   java.lang.String data)
Constructor.
Parameters:
ownerDoc - The document that owns this node.
template - If not-null, get the parameters from this template.
data - The node data. Will be ignored if template is not-null.
Method Detail

getTemplateText

public LazyText getTemplateText()
Get the template for this node.
See Also:
LazyNode.getTemplateNode()

cloneNode

public Node cloneNode(boolean deep)
Description copied from interface: Node
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent; ( parentNode returns null .).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node.
Note that cloning an immutable subtree results in a mutable copy, but the children of an EntityReference clone are readonly.
Overrides:
cloneNode in class org.apache.xerces.dom.ChildNode
See Also:
Node.cloneNode(boolean)

makeTemplateNode

public void makeTemplateNode(int nodeId,
                             java.lang.String text)
Mark the node as a template node and associated preformatted text.
See Also:
LazyNode.makeTemplateNode(int), PreFormatted#setPreFormattedText

makeTemplateNode

public void makeTemplateNode(int nodeId)
Specified by:
makeTemplateNode in interface LazyNode

getNodeId

public int getNodeId()
Description copied from interface: LazyNode
Get the node numeric id number.
Specified by:
getNodeId in interface LazyNode
See Also:
LazyNode.getNodeId()

isTemplateNode

public boolean isTemplateNode()
Description copied from interface: LazyNode
Check if this node is a template node.
Specified by:
isTemplateNode in interface LazyNode
See Also:
LazyNode.isTemplateNode()

getTemplateNode

public LazyNode getTemplateNode()
Description copied from interface: LazyNode
Get the template node as a LazyNode.
Specified by:
getTemplateNode in interface LazyNode
See Also:
LazyNode.getTemplateNode()

templateClone

public LazyNode templateClone(Document ownerDocument)
Description copied from interface: LazyNode
Create a new node, using this node as the template.
Specified by:
templateClone in interface LazyNode
See Also:
LazyNode.templateClone(org.w3c.dom.Document)

setNodeValue

public void setNodeValue(java.lang.String value)
Set the node value, invalidating the id. All node data is modified by this routine.
Overrides:
setNodeValue in class org.apache.xerces.dom.CharacterDataImpl
See Also:
org.w3c.dom.Node.setNodeValue

getPreFormattedText

public java.lang.String getPreFormattedText()
Specified by:
getPreFormattedText in interface PreFormattedText
See Also:
PreFormattedText.getPreFormattedText()

setPreFormattedText

public void setPreFormattedText(java.lang.String text)
Specified by:
setPreFormattedText in interface PreFormattedText
See Also:
Formatted#setPreFormattedText

Enhydra 3.1.1b1 API