BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.apache.xalan.stree
Class Child

java.lang.Object
  |
  +--weblogic.apache.xml.utils.UnImplNode
        |
        +--weblogic.apache.xalan.stree.Child
Direct Known Subclasses:
AttrImpl, DocumentTypeImpl, Parent, ProcessingInstructionImpl, TextImpl, WhiteSpace

public class Child
extends UnImplNode
implements DOMOrder, SaxEventDispatch

Class representing a child node

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.


Field Summary
protected  DocumentImpl m_doc
          Document Object
protected  Parent m_parent
          This child's parent node
 
Constructor Summary
Child(DocumentImpl doc)
          Constructor Child
 
Method Summary
 void dispatchCharactersEvent(org.xml.sax.ContentHandler ch)
          Handle a Characters event
 org.w3c.dom.NamedNodeMap getAttributes()
          Unimplemented.
 org.w3c.dom.Node getFirstChild()
          The first child of this node.
 org.w3c.dom.Node getLastChild()
          The last child of this node.
 short getLevel()
           Get the depth level of this node in the tree.
 java.lang.String getLocalName()
          Returns the local part of the qualified name of this node.
 java.lang.String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 org.w3c.dom.Node getNextSibling()
          The node immediately following this node.
 org.w3c.dom.Document getOwnerDocument()
          The Document object associated with this node.
 org.w3c.dom.Node getParentNode()
          The parent of this node.
 java.lang.String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 org.w3c.dom.Node getPreviousSibling()
          The node immediately preceding this node.
 java.lang.String getTagName()
          UnImplemented.
protected  TransformerImpl getTransformer()
          Get the Transformer object for this source tree.
 int getUid()
          Get the UID (document order index).
 boolean hasChildNodes()
          This is a convenience method to allow easy determination of whether a node has any children.
 boolean isComplete()
          Return if this node has had all it's children added, i.e.
 boolean isNamespaceNode()
          Tell if the given node is a namespace decl node.
 boolean isSupported(java.lang.String feature, java.lang.String version)
          Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
 void setAttribute(java.lang.String name, java.lang.String value)
          Unimplemented.
 void setComplete(boolean isComplete)
          Set that this node's child list is complete, i.e.
protected  void setDoc(DocumentImpl doc)
          Set the document object for this child
 void setLevel(short level)
           Get the depth level of this node in the tree.
protected  void setParent(Parent parent)
          Set the parent of the node.
protected  void setUid(int kIndex)
          Set the UID (document order index).
protected  void throwIfParseError()
          Throw a Parse Error exception if no exception was thrown yet
protected  void throwParseError(java.lang.Exception e)
          Throw a Parse Error exception
 
Methods inherited from class weblogic.apache.xml.utils.UnImplNode
appendChild, appendData, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, error, error, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildNodes, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getLength, getNodeName, getNodeType, getNodeValue, getOwnerElement, getSpecified, hasAttribute, hasAttributeNS, hasAttributes, importNode, 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
 

Field Detail

m_doc

protected DocumentImpl m_doc
Document Object

m_parent

protected Parent m_parent
This child's parent node
Constructor Detail

Child

public Child(DocumentImpl doc)
Constructor Child

Parameters:
doc - document object
Method Detail

setDoc

protected void setDoc(DocumentImpl doc)
Set the document object for this child

Parameters:
doc - document object

setParent

protected void setParent(Parent parent)
Set the parent of the node.

Parameters:
parent - this node's parent

isComplete

public boolean isComplete()
Return if this node has had all it's children added, i.e. if a endElement event has occured. An atomic node always returns true.

Returns:
true.

setComplete

public void setComplete(boolean isComplete)
Set that this node's child list is complete, i.e. an endElement event has occured. At this level, this method does nothing.

Parameters:
isComplete - true if this node has had all it's children added.

getTransformer

protected TransformerImpl getTransformer()
Get the Transformer object for this source tree.

Returns:
transformer object for this source tree

throwParseError

protected void throwParseError(java.lang.Exception e)
Throw a Parse Error exception

Parameters:
e - original exception

throwIfParseError

protected void throwIfParseError()
Throw a Parse Error exception if no exception was thrown yet


setUid

protected void setUid(int kIndex)
Set the UID (document order index).

Parameters:
kIndex - Index of this child.

getUid

public int getUid()
Get the UID (document order index).
Specified by:
getUid in interface DOMOrder

Returns:
Index of this child

getLevel

public short getLevel()
Get the depth level of this node in the tree.

Returns:
This child's level in the source tree

setLevel

public void setLevel(short level)
Get the depth level of this node in the tree.

Parameters:
level - This child's level in the source tree

getParentNode

public org.w3c.dom.Node getParentNode()
The parent of this node. All nodes, except Attr, Document, DocumentFragment, Entity, and Notation may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null.

Returns:
This node's parent node.
Overrides:
getParentNode in class UnImplNode

getFirstChild

public org.w3c.dom.Node getFirstChild()
The first child of this node. If there is no such node, this returns null.

Returns:
This node's first child.
Overrides:
getFirstChild in class UnImplNode

getLastChild

public org.w3c.dom.Node getLastChild()
The last child of this node. If there is no such node, this returns null.

Returns:
This node's last child.
Overrides:
getLastChild in class UnImplNode

getPreviousSibling

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

Returns:
This node's previous sibling
Overrides:
getPreviousSibling 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:
This node's next sibling.
Overrides:
getNextSibling in class UnImplNode

getOwnerDocument

public org.w3c.dom.Document getOwnerDocument()
The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null.

Returns:
document object
Overrides:
getOwnerDocument in class UnImplNode

hasChildNodes

public boolean hasChildNodes()
This is a convenience method to allow easy determination of whether a node has any children.

Returns:
true if the node has any children, false if the node has no children.
Overrides:
hasChildNodes in class UnImplNode

isSupported

public boolean isSupported(java.lang.String feature,
                           java.lang.String version)
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.

Parameters:
feature - The string of the feature to test. This is the same name that which can be passed to the method hasFeature on DOMImplementation.
version - This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return true.
Returns:
Returns true if the specified feature is supported on this node, false otherwise.
Overrides:
isSupported in class UnImplNode

getNamespaceURI

public java.lang.String getNamespaceURI()
The namespace URI of this node, or null if it is unspecified.

Returns:
This node's namespace URI
Overrides:
getNamespaceURI in class UnImplNode

getPrefix

public java.lang.String getPrefix()
The namespace prefix of this node, or null if it is unspecified.

Returns:
This node's namespace prefix
Overrides:
getPrefix 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 part of the qualified name of this node
Overrides:
getLocalName in class UnImplNode

getTagName

public java.lang.String getTagName()
UnImplemented.

Returns:
null
Overrides:
getTagName in class UnImplNode

getAttributes

public org.w3c.dom.NamedNodeMap getAttributes()
Unimplemented.

Returns:
null
Overrides:
getAttributes in class UnImplNode

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws org.w3c.dom.DOMException
Unimplemented.

Parameters:
name - Attribute name
value - Attribute value
Throws:
org.w3c.dom.DOMException -  
Overrides:
setAttribute in class UnImplNode

isNamespaceNode

public boolean isNamespaceNode()
Tell if the given node is a namespace decl node.

Returns:
whether this node is a namespace decl node

dispatchCharactersEvent

public void dispatchCharactersEvent(org.xml.sax.ContentHandler ch)
                             throws org.xml.sax.SAXException
Handle a Characters event
Specified by:
dispatchCharactersEvent in interface SaxEventDispatch

Parameters:
ch - Content handler to handle SAX events
Throws:
SAXException - if the content handler characters event throws a SAXException.

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.