org.enhydra.xml.lazydom
Class LazyDocumentType

java.lang.Object
  |
  +--org.enhydra.apache.xerces.dom.NodeImpl
        |
        +--org.enhydra.apache.xerces.dom.ChildNode
              |
              +--org.enhydra.apache.xerces.dom.ParentNode
                    |
                    +--org.enhydra.apache.xerces.dom.DocumentTypeImpl
                          |
                          +--org.enhydra.xml.lazydom.LazyDocumentType
All Implemented Interfaces:
Cloneable, DocumentType, EventTarget, LazyNode, Node, NodeList, Serializable

public class LazyDocumentType
extends org.enhydra.apache.xerces.dom.DocumentTypeImpl
implements LazyNode

Implementation of the DOM Attr that supports lazy instantiation of a template DOM.

See Also:
Serialized Form

Fields inherited from class org.enhydra.apache.xerces.dom.DocumentTypeImpl
elements, entities, internalSubset, name, notations, publicID, serialVersionUID, systemID
 
Fields inherited from class org.enhydra.apache.xerces.dom.ParentNode
fCachedChild, fCachedChildIndex, fCachedLength, firstChild, ownerDocument
 
Fields inherited from class org.enhydra.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.enhydra.apache.xerces.dom.NodeImpl
ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, UNNORMALIZED
 
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_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
LazyDocumentType(LazyDocument ownerDoc, LazyDocumentType template, String name, String publicId, String systemId, String internalSubset)
          Constructor.
 
Method Summary
 Node cloneNode(boolean deep)
           
 NamedNodeMap getEntities()
           
 int getNodeId()
          Get the node numeric id number.
 NamedNodeMap getNotations()
           
 LazyDocumentType getTemplateDocumentType()
          Get the template for this node.
 LazyNode getTemplateNode()
          Get the template node as a LazyNode.
 boolean isContentsExpanded()
          Is the contents expanded?
 boolean isTemplateNode()
          Check if this node is a template node.
 void makeTemplateNode(int nodeId)
           
 void setNodeValue(String value)
          Set the node value, invalidating the id.
protected  void setOwnerDocument(LazyDocument doc)
          Set the owner of the document.
 LazyNode templateClone(Document ownerDocument)
          Create a new node, using this node as the template.
 
Methods inherited from class org.enhydra.apache.xerces.dom.DocumentTypeImpl
getElements, getInternalSubset, getName, getNodeName, getNodeType, getPublicId, getSystemId, setInternalSubset, setOwnerDocument, setReadOnly
 
Methods inherited from class org.enhydra.apache.xerces.dom.ParentNode
checkNormalizationAfterInsert, checkNormalizationAfterRemove, getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, hasChildNodes, insertBefore, internalInsertBefore, internalRemoveChild, item, lastChild, lastChild, normalize, ownerDocument, removeChild, replaceChild, synchronizeChildren
 
Methods inherited from class org.enhydra.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling, parentNode, previousSibling
 
Methods inherited from class org.enhydra.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, compareDocumentPosition, dispatchEvent, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getTextContent, getUserData, getUserData, hasAttributes, hasStringValue, hasStringValue, internalIsIgnorableWhitespace, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, removeEventListener, setPrefix, setTextContent, setUserData, setUserData, synchronizeData, toString
 
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, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix, setTextContent, setUserData
 

Constructor Detail

LazyDocumentType

public LazyDocumentType(LazyDocument ownerDoc,
                        LazyDocumentType template,
                        String name,
                        String publicId,
                        String systemId,
                        String internalSubset)
Constructor.
Parameters:
ownerDoc - The document that owns this node.
template - If not-null, get the parameters from this template.
name - Document type name. Will be ignored if template is not-null.
publicId - The public id. Will be ignored if template is not-null.
systemId - The system id. Will be ignored if template is not-null.
internalSubset - A string representation of the internal subset. Will be ignored if template is not-null.
Method Detail

setOwnerDocument

protected void setOwnerDocument(LazyDocument doc)
Set the owner of the document. Use to solve chicken and egg problem with creating document with document type.

getTemplateDocumentType

public LazyDocumentType getTemplateDocumentType()
Get the template for this node.
See Also:
LazyNode.getTemplateNode()

cloneNode

public Node cloneNode(boolean deep)
Specified by:
cloneNode in interface Node
Overrides:
cloneNode in class org.enhydra.apache.xerces.dom.DocumentTypeImpl
See Also:
Node.cloneNode(boolean)

isContentsExpanded

public boolean isContentsExpanded()
Is the contents expanded?

getEntities

public NamedNodeMap getEntities()
Overrides:
getEntities in class org.enhydra.apache.xerces.dom.DocumentTypeImpl
See Also:
DocumentType.getEntities()

getNotations

public NamedNodeMap getNotations()
Overrides:
getNotations in class org.enhydra.apache.xerces.dom.DocumentTypeImpl
See Also:
DocumentType.getNotations()

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(String value)
Set the node value, invalidating the id. All node data is modified by this routine.
Specified by:
setNodeValue in interface Node
Overrides:
setNodeValue in class org.enhydra.apache.xerces.dom.NodeImpl
See Also:
Node.setNodeValue(java.lang.String)


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.