org.apache.xalan.stree
Class Child

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

public class Child
extends UnImplNode
implements DOMOrder, SaxEventDispatch

**For internal use only** Class representing a child node


Constructor Summary
Child(DocumentImpl doc)
          Constructor Child
 
Method Summary
 void dispatchCharactersEvent(ContentHandler ch)
          Handle a Characters event
 NamedNodeMap getAttributes()
          Unimplemented.
 Node getFirstChild()
          The first child of this node.
 Node getLastChild()
          The last child of this node.
 short getLevel()
          **For internal use only** 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.
 Node getNextSibling()
          The node immediately following this node.
 Document getOwnerDocument()
          The Document object associated with this node.
 Node getParentNode()
          The parent of this node.
 java.lang.String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 Node getPreviousSibling()
          The node immediately preceding this node.
 java.lang.String getTagName()
          UnImplemented.
 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.
 void setLevel(short level)
          **For internal use only** Get the depth level of this node in the tree.
 
Methods inherited from class org.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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Child

public Child(DocumentImpl doc)
Constructor Child
Parameters:
doc - document object
Method Detail

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.

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()
**For internal use only** 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)
**For internal use only** Get the depth level of this node in the tree.
Parameters:
level - This child's level in the source tree

getParentNode

public 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 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 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 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 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 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
Since:
DOM Level 2

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
Since:
DOM Level 2

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
Since:
DOM Level 2

getTagName

public java.lang.String getTagName()
UnImplemented.
Returns:
null
Overrides:
getTagName in class UnImplNode

getAttributes

public NamedNodeMap getAttributes()
Unimplemented.
Returns:
null
Overrides:
getAttributes in class UnImplNode

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws DOMException
Unimplemented.
Parameters:
name - Attribute name
value - Attribute value
Throws:
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(ContentHandler ch)
                             throws 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.


Copyright � 2000 Apache XML Project. All Rights Reserved.