BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.apache.xalan.stree
Class DocumentImpl

java.lang.Object
  |
  +--weblogic.apache.xml.utils.UnImplNode
        |
        +--weblogic.apache.xalan.stree.Child
              |
              +--weblogic.apache.xalan.stree.Parent
                    |
                    +--weblogic.apache.xalan.stree.DocImpl
                          |
                          +--weblogic.apache.xalan.stree.DocumentImpl
Direct Known Subclasses:
DocumentFragmentImpl

public class DocumentImpl
extends DocImpl

This is the implementation of the DOM2 Document interface. It rules over the tree, and may contain common information for the tree.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.


Fields inherited from class weblogic.apache.xalan.stree.DocImpl
m_exceptionThrown
 
Fields inherited from class weblogic.apache.xalan.stree.Parent
m_childCount, m_posInChildList
 
Fields inherited from class weblogic.apache.xalan.stree.Child
m_doc, m_parent
 
Constructor Summary
DocumentImpl(int charBufSize)
          Constructor DocumentImpl
 
Method Summary
 org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
          Append a child to the child list.
 org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          Unimplemented right now.
 org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
          Create a CDATASection node.
 org.w3c.dom.Comment createComment(java.lang.String data)
          Create a Comment node.
 org.w3c.dom.DocumentFragment createDocumentFragment()
          Create a DocumentFragment.
 org.w3c.dom.Element createElement(java.lang.String tagName)
          Create a new Element.
 org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          Create a new namespaced element.
 org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
          Create a ProcessingInstruction node.
 org.w3c.dom.Text createTextNode(java.lang.String data)
          Create a Text node.
 org.w3c.dom.DocumentType getDoctype()
          For XML, this provides access to the Document Type Definition.
 org.w3c.dom.Element getDocumentElement()
          Convenience method, allowing direct access to the child node which is considered the root of the actual document content.
 org.w3c.dom.Element getElementById(java.lang.String elementId)
          Given an ID, return the element.
 java.util.Hashtable getIDAttributes()
          Get the table that holds the ID string to node associations, for looking up XML IDs.
 java.lang.String getLocalName()
          Returns the local part of the qualified name of this node.
 org.w3c.dom.Node getNextSibling()
          The node immediately following this node.
 java.lang.String getNodeName()
          Returns the node name.
 short getNodeType()
          Returns the node type.
 org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep)
          Unimplemented, since this a read-only DOM.
 void setDoctype(org.w3c.dom.DocumentType docType)
           
 void setIDAttribute(java.lang.String id, org.w3c.dom.Element elem)
          Set an ID string to node association in the ID table.
 
Methods inherited from class weblogic.apache.xalan.stree.DocImpl
getDocOrderCount, getUseMultiThreading, incrementDocOrderCount, setUseMultiThreading
 
Methods inherited from class weblogic.apache.xalan.stree.Parent
dispatchCharactersEvent, getChild, getChildCount, getChildUID, getFirstChild, getLastChild, hasChildNodes, isComplete, setComplete, throwParseError
 
Methods inherited from class weblogic.apache.xalan.stree.Child
getAttributes, getLevel, getNamespaceURI, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTagName, getTransformer, getUid, isNamespaceNode, isSupported, setAttribute, setDoc, setLevel, setParent, setUid, throwIfParseError
 
Methods inherited from class weblogic.apache.xml.utils.UnImplNode
appendData, cloneNode, createAttribute, createEntityReference, deleteData, error, error, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getImplementation, getLength, getNodeValue, getOwnerElement, getSpecified, hasAttribute, hasAttributeNS, hasAttributes, insertBefore, insertData, item, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setNodeValue, setPrefix, setValue, splitText, substringData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentImpl

public DocumentImpl(int charBufSize)
Constructor DocumentImpl
Method Detail

getDoctype

public org.w3c.dom.DocumentType getDoctype()
For XML, this provides access to the Document Type Definition. For HTML documents, and XML documents which don't specify a DTD, it will be null.

Returns:
The DocumentType reference, which may well be null.
Overrides:
getDoctype in class UnImplNode

setDoctype

public void setDoctype(org.w3c.dom.DocumentType docType)

getDocumentElement

public org.w3c.dom.Element getDocumentElement()
Convenience method, allowing direct access to the child node which is considered the root of the actual document content.

Returns:
the document element, which may be null if it hasn't been constructed.
Overrides:
getDocumentElement in class UnImplNode

getIDAttributes

public java.util.Hashtable getIDAttributes()
Get the table that holds the ID string to node associations, for looking up XML IDs.

Returns:
the ID table, never null.

setIDAttribute

public void setIDAttribute(java.lang.String id,
                           org.w3c.dom.Element elem)
Set an ID string to node association in the ID table.

Parameters:
id - The ID string.
elem - The associated ID.

appendChild

public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
                             throws org.w3c.dom.DOMException
Append a child to the child list.

Parameters:
newChild - Must be a weblogic.apache.xalan.stree.Child.
Returns:
The child that was added.
Throws:
java.lang.ClassCastException - if the newChild isn't a weblogic.apache.xalan.stree.Child.
org.w3c.dom.DOMException -  
Overrides:
appendChild in class Parent

getNodeType

public short getNodeType()
Returns the node type.

Returns:
Node.DOCUMENT_NODE.
Overrides:
getNodeType in class UnImplNode

getNodeName

public java.lang.String getNodeName()
Returns the node name.

Returns:
"#document" string.
Overrides:
getNodeName in class UnImplNode

getLocalName

public java.lang.String getLocalName()
Returns the local part of the qualified name of this node.
For nodes created with a DOM Level 1 method, such as createElement from the Document interface, it is null.

Returns:
The local name of the node, or null if namespaces are not processed.
Overrides:
getLocalName in class Child

createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws org.w3c.dom.DOMException
Create a new Element.

Parameters:
tagName - The name of the element.
Returns:
A new element.
Throws:
org.w3c.dom.DOMException -  
Overrides:
createElement in class UnImplNode

createDocumentFragment

public org.w3c.dom.DocumentFragment createDocumentFragment()
Create a DocumentFragment.

Returns:
a new DocumentFragment reference.
Overrides:
createDocumentFragment in class UnImplNode

createTextNode

public org.w3c.dom.Text createTextNode(java.lang.String data)
Create a Text node.

Parameters:
data - The character that this node holds.
Returns:
A new Text node.
Overrides:
createTextNode in class UnImplNode

createComment

public org.w3c.dom.Comment createComment(java.lang.String data)
Create a Comment node.

Parameters:
data - The comment data that this node holds.
Returns:
A new Comment node.
Overrides:
createComment in class UnImplNode

createCDATASection

public org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
                                            throws org.w3c.dom.DOMException
Create a CDATASection node.

Parameters:
data - The character data that this node holds.
Returns:
A new CDATASection node.
Throws:
org.w3c.dom.DOMException -  
Overrides:
createCDATASection in class UnImplNode

createProcessingInstruction

public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                                     java.lang.String data)
                                                              throws org.w3c.dom.DOMException
Create a ProcessingInstruction node.

Parameters:
target - The name of the PI.
data - The data for this PI.
Returns:
A new ProcessingInstruction node.
Throws:
org.w3c.dom.DOMException -  
Overrides:
createProcessingInstruction in class UnImplNode

importNode

public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
                                   boolean deep)
                            throws org.w3c.dom.DOMException
Unimplemented, since this a read-only DOM.

Parameters:
importedNode - The node being imported.
deep - Tells if we should also import the subtree.
Returns:
A new node of the same type as importedNode.
Throws:
org.w3c.dom.DOMException -  
Overrides:
importNode in class UnImplNode

createElementNS

public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
                                    throws org.w3c.dom.DOMException
Create a new namespaced element.

Parameters:
namespaceURI - The namespace URI (NEEDTOREVIEW: Handling of "" vs. null. -sb)
qualifiedName - The qualified name of the element type to instantiate.
Returns:
A new Element object with the following attributes: Attribute ValueNode.nodeName qualifiedNameNode.namespaceURI namespaceURINode.prefix prefix, extracted from qualifiedName , or null if there is no prefixNode.localName local name , extracted from qualifiedNameElement.tagName qualifiedName
Throws:
org.w3c.dom.DOMException -  
Overrides:
createElementNS in class UnImplNode

createAttributeNS

public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI,
                                          java.lang.String qualifiedName)
                                   throws org.w3c.dom.DOMException
Unimplemented right now.

Parameters:
namespaceURI - The namespace URI of the attribute to create.
qualifiedName - The qualified name of the attribute to instantiate.
Returns:
A new Attr object with the following attributes: Attribute ValueNode.nodeName qualifiedName Node.namespaceURInamespaceURI Node.prefix prefix, extracted from qualifiedName , or null if there is no prefixNode.localName local name , extracted from qualifiedNameAttr.name qualifiedName
Throws:
org.w3c.dom.DOMException -  
Overrides:
createAttributeNS in class UnImplNode

getElementById

public org.w3c.dom.Element getElementById(java.lang.String elementId)
Given an ID, return the element.

Parameters:
elementId - A non-null string that may be a key in the ID table.
Returns:
The element associated with the given elementId, or null if not found.
Overrides:
getElementById in class UnImplNode

getNextSibling

public org.w3c.dom.Node getNextSibling()
The node immediately following this node. If there is no such node, this returns null.

Returns:
Always null, since there is never a node following a Document node.
Overrides:
getNextSibling in class Child

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.