Enhydra 3.1.1b1 API

org.enhydra.xml.lazydom
Class LazyDocument

java.lang.Object
  |
  +--org.apache.xerces.dom.NodeImpl
        |
        +--org.apache.xerces.dom.ParentNode
              |
              +--org.apache.xerces.dom.DocumentImpl
                    |
                    +--org.enhydra.xml.lazydom.LazyDocument

public class LazyDocument
extends org.apache.xerces.dom.DocumentImpl
implements LazyParent, PreFormattedTextDocument, XMLObjectLink

A DOM Document that supports lazy instantiation of a template DOM. Nodes in the instance DOM are created as accessed. This can be either by traversing the tree or by direct access to a node by id number. Instantiation of nodes in the middle of the virtual tree is support. Thus a node can exist without a parent being expanded. This is used by XMLC, were the dynamic nodes tend to be towards the leaves of the tree.

Instances contain a reference to a DOM that is a shared template for the document. Each node in the template is assigned an integer node id that be used to index tables to directly look up the template of a node created from the template.

This DOM also supports associating pre-formatted text with some nodes, which is used to avoid exprensive string scanning operations during the output of unmodified nodes.

When a child of a node is requested, all direct children are expanded. This eliminates a lot of difficult book keep. Attributes are treated as a separate set from children, only instantiated when an atttribute is accessed. Expansion of nodes accesed from an existing node works as follows:

This coarse-grained locking approach minimizes the number of locks * on the assumption that collisions do not occur frequently

To created an extended DOM, one must override both the factory methods that take strings and those that take node ids.

See Also:
Serialized Form

Fields inherited from class org.apache.xerces.dom.DocumentImpl
allowGrammarAccess, changes, docElement, docType, errorChecking, eventListeners, identifiers, iterators, kidOK, mutationEvents, ranges, userData
 
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, nodeListIndex, nodeListLength, nodeListNode, ownerDocument
 
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
LazyDocument()
          Constructor with no argument, for LazyHTMLDocument.
LazyDocument(DocumentType documentType, TemplateDOM templateDOM)
          Constructor.
 
Method Summary
 Node appendChild(Node newChild)
          Adds the node newChild to the end of the list of children of this node.
 void appendChildWhileExpanding(Node child)
          Append a child during node expansion.
 boolean areChildrenExpanded()
          Are the children of this node expanded?
 Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 LazyAttr createAttribute(int nodeId)
          Create an attribute from a template given its id.
 Attr createAttribute(java.lang.String name)
          Creates an Attr of the given name.
 Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          Creates an attribute of the given qualified name and namespace URI.
 LazyAttr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, int nodeId)
          Create a template Attr with namespace.
 LazyCDATASection createCDATASection(int nodeId)
          Create a CDATASection from a template given its id.
 CDATASection createCDATASection(java.lang.String data)
          Creates a CDATASection node whose value is the specified string.
 LazyComment createComment(int nodeId)
          Create a comment from a template given its id.
 Comment createComment(java.lang.String data)
          Creates a Comment node given the specified string.
 LazyDocumentType createDocumentType(int nodeId)
          Create a new DocumentType object (Non-DOM).
 DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicID, java.lang.String systemID)
          Create a new DocumentType object (Non-DOM).
 DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicID, java.lang.String systemID, java.lang.String internalSubset)
          Create a new DocumentType object (Non-DOM).
 LazyElement createElement(int nodeId)
          Create a element from a template given its id.
 Element createElement(java.lang.String tagName)
          Creates an element of the type specified.
 Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          Creates an element of the given qualified name and namespace URI.
 LazyEntity createEntity(int nodeId)
          Create a new Entity object (Non-DOM).
 Entity createEntity(java.lang.String name)
          Create a new Entity object (Non-DOM).
 LazyEntityReference createEntityReference(int nodeId)
          Create a entity reference from a template given its id.
 EntityReference createEntityReference(java.lang.String name)
          Creates an EntityReference object.
 LazyNotation createNotation(int nodeId)
          Create a notation node from a template given its id.
 Notation createNotation(java.lang.String name)
           
 LazyProcessingInstruction createProcessingInstruction(int nodeId)
          Create a process instruction node from a template given its id.
 ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
          Creates a ProcessingInstruction node given the specified name and data strings.
 LazyAttr createTemplateAttribute(java.lang.String name, int nodeId)
          Create a template Attr.
 LazyAttr createTemplateAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, int nodeId)
          Create a template Attr.
 LazyCDATASection createTemplateCDATASection(java.lang.String data, int nodeId)
          Create a template CDATASection.
 LazyComment createTemplateComment(java.lang.String data, int nodeId)
          Create a template comment.
 LazyDocumentType createTemplateDocumentType(java.lang.String qualifiedName, java.lang.String publicID, java.lang.String systemID, java.lang.String internalSubset, int nodeId)
          Create a template DocumentType.
 LazyElement createTemplateElement(java.lang.String tagName, int nodeId, java.lang.String preFormattedText)
          Create a template element.
 LazyElement createTemplateElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName, int nodeId, java.lang.String preFormattedText)
          Create a template Element with namespace.
 LazyEntity createTemplateEntity(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName, int nodeId)
          Create a template Entity.
 LazyEntityReference createTemplateEntityReference(java.lang.String name, int nodeId)
          Create a template EntityReference.
 LazyNotation createTemplateNotation(java.lang.String name, int nodeId)
          Create a template Notation.
 LazyProcessingInstruction createTemplateProcessingInstruction(java.lang.String target, java.lang.String data, int nodeId)
          Create a template ProcessingInstruction.
 LazyText createTemplateTextNode(java.lang.String data, int nodeId, java.lang.String preFormattedText)
          Create a template text node.
 LazyText createTextNode(int nodeId)
          Create a text node from a template given its id.
 Text createTextNode(java.lang.String data)
          Creates a Text node given the specified string.
protected  void doExpandChildren(LazyParent node)
          Do work of expanding the children of a node, if they are not already expanded.
protected  void doExpandParent(LazyParent node)
          Do work of expanding the parent of a node, if it is not already expanded.
protected  void enterExpansion()
          Flag that an expansion is in progress, which is used to detect recursion.
 NodeList getChildNodes()
          A NodeList that contains all children of this node.
 DocumentType getDoctype()
          The Document Type Declaration (see DocumentType ) associated with this document.
 Element getDocumentElement()
          This is a convenience attribute that allows direct access to the child node that is the root element of the document.
 LazyNode getExpandedNode(int nodeId)
          Get a pointer to a node if its been expanded, otherwise return null.
 Node getFirstChild()
          The first child of this node.
 DOMImplementation getImplementation()
          The DOMImplementation object that handles this document.
 Node getLastChild()
          The last child of this node.
 LazyNode getNodeById(int nodeId)
          Get or create a lazy node, given its id.
 LazyNode getNodeFromTemplate(LazyNode template)
          Get or create a node given, the template node.
 int getNodeId()
          Get the node numeric id number.
 OutputOptions getPreFormatOutputOptions()
           
 LazyDocument getTemplateDocument()
          Get the template for this node.
 LazyNode getTemplateNode()
          Get the template node as a LazyNode.
 LazyNode getTemplateNode(int nodeId)
          Get a template node, given a node id.
 XMLObject getXMLObject()
           
 boolean hasChildNodes()
          This is a convenience method to allow easy determination of whether a node has any children.
 Node insertBefore(Node newChild, Node refChild)
          Inserts the node newChild before the existing child node refChild .
 boolean isDocTypeExpanded()
          Has the DocumentType been expanded?
 boolean isParentExpanded()
          Is the parent of this node expanded?
 boolean isTemplateNode()
          Check if this node is a template node.
protected  void leaveExpansion()
          Flag that an expansion is complete.
 void makeTemplateNode(int nodeId)
           
 void normalize()
          Puts all Text nodes in the full depth of the sub-tree underneath this Node , including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
 Node removeChild(Node oldChild)
          Removes the child node indicated by oldChild from the list of children, and returns it.
 Node replaceChild(Node newChild, Node oldChild)
          Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
 void setChildrenExpanded()
          Flag the children as being expanded.
 void setNodeValue(java.lang.String value)
          Set the node value, invalidating the id.
 void setParentExpanded()
          Flag the parent as being expanded.
 void setParentWhileExpanding(Node parent)
          Set the parent of this node during expansion.
 void setPreFormatOutputOptions(OutputOptions outputOptions)
          Set the output options that were used to preformat this document.
 void setXMLObject(XMLObject xmlObject)
           
 LazyNode templateClone(Document ownerDocument)
          Create a new node, using this node as the template.
 
Methods inherited from class org.apache.xerces.dom.DocumentImpl
adoptNode, changed, changes, clone, createDocumentFragment, createElementDefinition, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, getElementById, getElementsByTagName, getElementsByTagNameNS, getErrorChecking, getEventListeners, getIdentifier, getIdentifiers, getMutationEvents, getNodeName, getNodeType, getOwnerDocument, getUserData, importNode, isKidOK, isXMLName, putIdentifier, removeIdentifier, setErrorChecking, setEventListeners, setMutationEvents, setUserData
 
Methods inherited from class org.apache.xerces.dom.ParentNode
setReadOnly, synchronizeChildren, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, dispatchEvent, getAttributes, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getReadOnly, getUserData, hasAttributes, removeEventListener, setPrefix, setUserData, supports, synchronizeData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyDocument

public LazyDocument(DocumentType documentType,
                    TemplateDOM templateDOM)
Constructor.
Parameters:
documentType - Document type to associate with this document, or null if no doctype or should be obtained from template.
templateDOM - Template DOM, with each node cotaining a node id. Maybe null if no associated template.

LazyDocument

public LazyDocument()
Constructor with no argument, for LazyHTMLDocument.
Method Detail

getDocumentElement

public Element getDocumentElement()
Description copied from interface: Document
This is a convenience attribute that allows direct access to the child node that is the root element of the document. For HTML documents, this is the element with the tagName "HTML".
Overrides:
getDocumentElement in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.getDocumentElement()

getImplementation

public DOMImplementation getImplementation()
Description copied from interface: Document
The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.
Overrides:
getImplementation in class org.apache.xerces.dom.DocumentImpl
See Also:
Document#DOMImplementation

enterExpansion

protected final void enterExpansion()
Flag that an expansion is in progress, which is used to detect recursion. MUST be synchronized on document.

leaveExpansion

protected final void leaveExpansion()
Flag that an expansion is complete. MUST be synchronized on document.

getNodeById

public final LazyNode getNodeById(int nodeId)
Get or create a lazy node, given its id. Expanding if it doesn't exist. All node creation must go through here so that a derived document create factory is used.

getNodeFromTemplate

public final LazyNode getNodeFromTemplate(LazyNode template)
Get or create a node given, the template node.
See Also:
getNodeById

doExpandParent

protected void doExpandParent(LazyParent node)
Do work of expanding the parent of a node, if it is not already expanded. This also expands the children, as this keeps the expansion bookkeeping simple and getting a parent not a common operation except to access a sibling or add a new sibling Only used internally to this package.

doExpandChildren

protected void doExpandChildren(LazyParent node)
Do work of expanding the children of a node, if they are not already expanded. Only lazy parent's have a flag for siblings, as data nodes can never be accessed without going through the parent and expanding the children. Only used internally to this package.

getExpandedNode

public final LazyNode getExpandedNode(int nodeId)
Get a pointer to a node if its been expanded, otherwise return null.

getTemplateNode

public final LazyNode getTemplateNode(int nodeId)
Get a template node, given a node id.

isDocTypeExpanded

public boolean isDocTypeExpanded()
Has the DocumentType been expanded?

getTemplateDocument

public LazyDocument getTemplateDocument()
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.DocumentImpl
See Also:
Node.cloneNode(boolean)

makeTemplateNode

public void makeTemplateNode(int nodeId)

getNodeId

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

isTemplateNode

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

getTemplateNode

public LazyNode getTemplateNode()
Description copied from interface: LazyNode
Get the template node as a 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.
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.NodeImpl
See Also:
org.w3c.dom.Node.setNodeValue

isParentExpanded

public boolean isParentExpanded()
Description copied from interface: LazyParent
Is the parent of this node expanded?
Specified by:
isParentExpanded in interface LazyParent
See Also:
LazyParent.isParentExpanded()

setParentExpanded

public void setParentExpanded()
Description copied from interface: LazyParent
Flag the parent as being expanded.
Specified by:
setParentExpanded in interface LazyParent
See Also:
LazyParent.setParentExpanded()

setParentWhileExpanding

public void setParentWhileExpanding(Node parent)
Description copied from interface: LazyParent
Set the parent of this node during expansion. This should also flag the parent as being expanded.
Specified by:
setParentWhileExpanding in interface LazyParent
See Also:
LazyParent.setParentWhileExpanding(org.w3c.dom.Node)

areChildrenExpanded

public boolean areChildrenExpanded()
Description copied from interface: LazyParent
Are the children of this node expanded?
Specified by:
areChildrenExpanded in interface LazyParent
See Also:
LazyParent.areChildrenExpanded()

setChildrenExpanded

public void setChildrenExpanded()
Description copied from interface: LazyParent
Flag the children as being expanded.
Specified by:
setChildrenExpanded in interface LazyParent
See Also:
LazyParent.setChildrenExpanded()

appendChildWhileExpanding

public void appendChildWhileExpanding(Node child)
Description copied from interface: LazyParent
Append a child during node expansion. This should only add the child, not trigger any other expansion.
Specified by:
appendChildWhileExpanding in interface LazyParent
See Also:
LazyParent.appendChildWhileExpanding(org.w3c.dom.Node)

getChildNodes

public NodeList getChildNodes()
Description copied from interface: Node
A NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes. The content of the returned NodeList is "live" in the sense that, for instance, changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the NodeList accessors; it is not a static snapshot of the content of the node. This is true for every NodeList , including the ones returned by the getElementsByTagName method.
Overrides:
getChildNodes in class org.apache.xerces.dom.ParentNode
See Also:
Node.getChildNodes()

getFirstChild

public Node getFirstChild()
Description copied from interface: Node
The first child of this node. If there is no such node, this returns null .
Overrides:
getFirstChild in class org.apache.xerces.dom.ParentNode
See Also:
Node.getFirstChild()

getLastChild

public Node getLastChild()
Description copied from interface: Node
The last child of this node. If there is no such node, this returns null .
Overrides:
getLastChild in class org.apache.xerces.dom.ParentNode
See Also:
Node.getLastChild()

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
                  throws DOMException
Description copied from interface: Node
Inserts the node newChild before the existing child node refChild . If refChild is null , insert newChild at the end of the list of children.
If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild . If the newChild is already in the tree, it is first removed.
Overrides:
insertBefore in class org.apache.xerces.dom.DocumentImpl
See Also:
Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)

replaceChild

public Node replaceChild(Node newChild,
                         Node oldChild)
                  throws DOMException
Description copied from interface: Node
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.
Overrides:
replaceChild in class org.apache.xerces.dom.DocumentImpl
See Also:
Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)

removeChild

public Node removeChild(Node oldChild)
                 throws DOMException
Description copied from interface: Node
Removes the child node indicated by oldChild from the list of children, and returns it.
Overrides:
removeChild in class org.apache.xerces.dom.DocumentImpl
See Also:
Node.removeChild(org.w3c.dom.Node)

appendChild

public Node appendChild(Node newChild)
                 throws DOMException
Description copied from interface: Node
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.
Overrides:
appendChild in class org.apache.xerces.dom.NodeImpl
See Also:
Node.appendChild(org.w3c.dom.Node)

hasChildNodes

public boolean hasChildNodes()
Description copied from interface: Node
This is a convenience method to allow easy determination of whether a node has any children.
Overrides:
hasChildNodes in class org.apache.xerces.dom.ParentNode
See Also:
Node.hasChildNodes()

normalize

public void normalize()
Description copied from interface: Node
Puts all Text nodes in the full depth of the sub-tree underneath this Node , including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used. In cases where the document contains CDATASections , the normalize operation alone may not be sufficient, since XPointers do not differentiate between Text nodes and CDATASection nodes.
Overrides:
normalize in class org.apache.xerces.dom.ParentNode
See Also:
Node.normalize()

getDoctype

public DocumentType getDoctype()
Description copied from interface: Document
The Document Type Declaration (see DocumentType ) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns null . The DOM Level 2 does not support editing the Document Type Declaration, therefore docType cannot be altered in any way, including through the use of methods, such as insertNode or removeNode , inherited from Node .
Overrides:
getDoctype in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.getDoctype()

createElement

public Element createElement(java.lang.String tagName)
                      throws DOMException
Description copied from interface: Document
Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object.
In addition, if there are known attributes with default values, Attr nodes representing them are automatically created and attached to the element.
To create an element with a qualified name and namespace URI, use the createElementNS method.
Overrides:
createElement in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createElement(java.lang.String)

createTextNode

public Text createTextNode(java.lang.String data)
Description copied from interface: Document
Creates a Text node given the specified string.
Overrides:
createTextNode in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createTextNode(java.lang.String)

createComment

public Comment createComment(java.lang.String data)
Description copied from interface: Document
Creates a Comment node given the specified string.
Overrides:
createComment in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createComment(java.lang.String)

createCDATASection

public CDATASection createCDATASection(java.lang.String data)
                                throws DOMException
Description copied from interface: Document
Creates a CDATASection node whose value is the specified string.
Overrides:
createCDATASection in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createCDATASection(java.lang.String)

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                         java.lang.String data)
Description copied from interface: Document
Creates a ProcessingInstruction node given the specified name and data strings.
Overrides:
createProcessingInstruction in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createProcessingInstruction(java.lang.String, java.lang.String)

createAttribute

public Attr createAttribute(java.lang.String name)
                     throws DOMException
Description copied from interface: Document
Creates an Attr of the given name. Note that the Attr instance can then be set on an Element using the setAttribute method.
To create an attribute with a qualified name and namespace URI, use the createAttributeNS method.
Overrides:
createAttribute in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createAttribute(java.lang.String)

createNotation

public Notation createNotation(java.lang.String name)
                        throws DOMException
Overrides:
createNotation in class org.apache.xerces.dom.DocumentImpl
See Also:
org.w3c.dom.Document#createNotation

createEntityReference

public EntityReference createEntityReference(java.lang.String name)
                                      throws DOMException
Description copied from interface: Document
Creates an EntityReference object. In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node. If any descendant of the Entity node has an unbound namespace prefix , the corresponding descendant of the created EntityReference node is also unbound; (its namespaceURI is null ). The DOM Level 2 does not support any mechanism to resolve namespace prefixes.
Overrides:
createEntityReference in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createEntityReference(java.lang.String)

createElementNS

public Element createElementNS(java.lang.String namespaceURI,
                               java.lang.String qualifiedName)
                        throws DOMException
Description copied from interface: Document
Creates an element of the given qualified name and namespace URI. HTML-only DOM implementations do not need to implement this method.
Overrides:
createElementNS in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createElementNS(java.lang.String, java.lang.String)

createAttributeNS

public Attr createAttributeNS(java.lang.String namespaceURI,
                              java.lang.String qualifiedName)
                       throws DOMException
Description copied from interface: Document
Creates an attribute of the given qualified name and namespace URI. HTML-only DOM implementations do not need to implement this method.
Overrides:
createAttributeNS in class org.apache.xerces.dom.DocumentImpl
See Also:
Document.createAttributeNS(java.lang.String, java.lang.String)

createDocumentType

public DocumentType createDocumentType(java.lang.String qualifiedName,
                                       java.lang.String publicID,
                                       java.lang.String systemID,
                                       java.lang.String internalSubset)
                                throws DOMException
Create a new DocumentType object (Non-DOM).
See Also:
DocumentImpl.createDocumentType(java.lang.String, java.lang.String, java.lang.String)

createDocumentType

public DocumentType createDocumentType(java.lang.String qualifiedName,
                                       java.lang.String publicID,
                                       java.lang.String systemID)
                                throws DOMException
Create a new DocumentType object (Non-DOM). This overrides the method in the Xerces DOM used by importNode().
Overrides:
createDocumentType in class org.apache.xerces.dom.DocumentImpl
See Also:
DocumentImpl.createDocumentType(java.lang.String, java.lang.String, java.lang.String)

createEntity

public Entity createEntity(java.lang.String name)
                    throws DOMException
Create a new Entity object (Non-DOM).
Overrides:
createEntity in class org.apache.xerces.dom.DocumentImpl
See Also:
DocumentImpl.createEntity(java.lang.String)

createElement

public LazyElement createElement(int nodeId)
                          throws DOMException
Create a element from a template given its id.
See Also:
Document.createElement(java.lang.String)

createTextNode

public LazyText createTextNode(int nodeId)
Create a text node from a template given its id.
See Also:
Document.createTextNode(java.lang.String)

createComment

public LazyComment createComment(int nodeId)
Create a comment from a template given its id.
See Also:
Document.createComment(java.lang.String)

createCDATASection

public LazyCDATASection createCDATASection(int nodeId)
                                    throws DOMException
Create a CDATASection from a template given its id.
See Also:
Document.createCDATASection(java.lang.String)

createProcessingInstruction

public LazyProcessingInstruction createProcessingInstruction(int nodeId)
Create a process instruction node from a template given its id.
See Also:
Document.createProcessingInstruction(java.lang.String, java.lang.String)

createAttribute

public LazyAttr createAttribute(int nodeId)
                         throws DOMException
Create an attribute from a template given its id.
See Also:
Document.createAttribute(java.lang.String)

createNotation

public LazyNotation createNotation(int nodeId)
                            throws DOMException
Create a notation node from a template given its id.
See Also:
org.w3c.dom.Document#createNotation

createEntityReference

public LazyEntityReference createEntityReference(int nodeId)
                                          throws DOMException
Create a entity reference from a template given its id.
See Also:
Document.createEntityReference(java.lang.String)

createDocumentType

public LazyDocumentType createDocumentType(int nodeId)
                                    throws DOMException
Create a new DocumentType object (Non-DOM).
See Also:
DocumentImpl.createDocumentType(java.lang.String, java.lang.String, java.lang.String)

createEntity

public LazyEntity createEntity(int nodeId)
                        throws DOMException
Create a new Entity object (Non-DOM).
See Also:
DocumentImpl.createEntity(java.lang.String)

createTemplateElement

public LazyElement createTemplateElement(java.lang.String tagName,
                                         int nodeId,
                                         java.lang.String preFormattedText)
                                  throws DOMException
Create a template element. This will call the derived document create method.
See Also:
createElement(String), Document.createElement(java.lang.String)

createTemplateTextNode

public LazyText createTemplateTextNode(java.lang.String data,
                                       int nodeId,
                                       java.lang.String preFormattedText)
Create a template text node. This will call the derived document create method.
See Also:
#createText(String), Document.createTextNode(java.lang.String)

createTemplateComment

public LazyComment createTemplateComment(java.lang.String data,
                                         int nodeId)
Create a template comment. This will call the derived document create method.
See Also:
createComment(String), Document.createComment(java.lang.String)

createTemplateCDATASection

public LazyCDATASection createTemplateCDATASection(java.lang.String data,
                                                   int nodeId)
                                            throws DOMException
Create a template CDATASection. This will call the derived document create method.
See Also:
#createCDataSection(String), Document.createCDATASection(java.lang.String)

createTemplateProcessingInstruction

public LazyProcessingInstruction createTemplateProcessingInstruction(java.lang.String target,
                                                                     java.lang.String data,
                                                                     int nodeId)
Create a template ProcessingInstruction. This will call the derived document create method.
See Also:
createProcessingInstruction(String,String), Document.createProcessingInstruction(java.lang.String, java.lang.String)

createTemplateAttribute

public LazyAttr createTemplateAttribute(java.lang.String name,
                                        int nodeId)
                                 throws DOMException
Create a template Attr. This will call the derived document create method.
See Also:
createAttribute(String), Document.createAttribute(java.lang.String)

createTemplateAttributeNS

public LazyAttr createTemplateAttributeNS(java.lang.String namespaceURI,
                                          java.lang.String qualifiedName,
                                          int nodeId)
                                   throws DOMException
Create a template Attr. This will call the derived document create method.
See Also:
createAttributeNS(String,String), Document.createAttributeNS(java.lang.String, java.lang.String)

createTemplateNotation

public LazyNotation createTemplateNotation(java.lang.String name,
                                           int nodeId)
                                    throws DOMException
Create a template Notation. This will call the derived document create method.
See Also:
createNotation(String), org.w3c.dom.Document#createNotation

createTemplateEntityReference

public LazyEntityReference createTemplateEntityReference(java.lang.String name,
                                                         int nodeId)
                                                  throws DOMException
Create a template EntityReference. This will call the derived document create method.
See Also:
createEntityReference(String), Document.createEntityReference(java.lang.String)

createTemplateElementNS

public LazyElement createTemplateElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName,
                                           int nodeId,
                                           java.lang.String preFormattedText)
                                    throws DOMException
Create a template Element with namespace. This will call the derived document create method.
See Also:
createElementNS(String,String), Document.createElementNS(java.lang.String, java.lang.String)

createAttributeNS

public LazyAttr createAttributeNS(java.lang.String namespaceURI,
                                  java.lang.String qualifiedName,
                                  int nodeId)
                           throws DOMException
Create a template Attr with namespace. This will call the derived document create method.
See Also:
createAttributeNS(String,String), Document.createAttributeNS(java.lang.String, java.lang.String)

createTemplateDocumentType

public LazyDocumentType createTemplateDocumentType(java.lang.String qualifiedName,
                                                   java.lang.String publicID,
                                                   java.lang.String systemID,
                                                   java.lang.String internalSubset,
                                                   int nodeId)
                                            throws DOMException
Create a template DocumentType.
See Also:
createDocumentType(String,String,String,String), DocumentImpl.createDocumentType(java.lang.String, java.lang.String, java.lang.String)

createTemplateEntity

public LazyEntity createTemplateEntity(java.lang.String name,
                                       java.lang.String publicId,
                                       java.lang.String systemId,
                                       java.lang.String notationName,
                                       int nodeId)
                                throws DOMException
Create a template Entity.
See Also:
createEntity(String), DocumentImpl.createEntity(java.lang.String)

setPreFormatOutputOptions

public void setPreFormatOutputOptions(OutputOptions outputOptions)
Set the output options that were used to preformat this document.
Parameters:
outputOptions - The output options; should be read-only.

getPreFormatOutputOptions

public OutputOptions getPreFormatOutputOptions()
Specified by:
getPreFormatOutputOptions in interface PreFormattedTextDocument
See Also:
PreFormattedTextDocument.getPreFormatOutputOptions()

setXMLObject

public void setXMLObject(XMLObject xmlObject)
Specified by:
setXMLObject in interface XMLObjectLink
Overrides:
setXMLObject in class org.apache.xerces.dom.DocumentImpl
See Also:
XMLObjectLink.setXMLObject(org.enhydra.xml.xmlc.XMLObject)

getXMLObject

public XMLObject getXMLObject()
Specified by:
getXMLObject in interface XMLObjectLink
Overrides:
getXMLObject in class org.apache.xerces.dom.DocumentImpl
See Also:
XMLObjectLink.getXMLObject()

Enhydra 3.1.1b1 API