com.lotus.xsl
Class ResultTreeFrag

com.lotus.xsl.ResultTreeFrag

public class ResultTreeFrag

The holder of result tree fragments.


Constructor Summary
ResultTreeFrag(com.lotus.xsl.Document docFactory)
           
 
Method Summary
 com.lotus.xsl.Node appendChild(com.lotus.xsl.Node newChild)
          Adds the node newChild to the end of the list of children of this node.
 com.lotus.xsl.Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 com.lotus.xsl.NamedNodeMap getAttributes()
          A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
 com.lotus.xsl.NodeList getChildNodes()
          A NodeList that contains all children of this node.
 com.lotus.xsl.Node getFirstChild()
          The first child of this node.
 com.lotus.xsl.Node getLastChild()
          The last child of this node.
 com.lotus.xsl.Node getNextSibling()
          The node immediately following this node.
 java.lang.String getNodeName()
          The name of this node, depending on its type; see the table above.
 short getNodeType()
          A code representing the type of the underlying object, as defined above.
 java.lang.String getNodeValue()
          The value of this node, depending on its type; see the table above.
 com.lotus.xsl.Document getOwnerDocument()
          The Document object associated with this node.
 com.lotus.xsl.Node getParentNode()
          The parent of this node.
 com.lotus.xsl.Node getPreviousSibling()
          The node immediately preceding this node.
 boolean hasChildNodes()
          This is a convenience method to allow easy determination of whether a node has any children.
 com.lotus.xsl.Node insertBefore(com.lotus.xsl.Node newChild, com.lotus.xsl.Node refChild)
          Inserts the node newChild before the existing child node refChild.
 com.lotus.xsl.Node removeChild(com.lotus.xsl.Node oldChild)
          Removes the child node indicated by oldChild from the list of children, and returns it.
 com.lotus.xsl.Node replaceChild(com.lotus.xsl.Node newChild, com.lotus.xsl.Node oldChild)
          Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
 void setNodeValue(java.lang.String x)
          DocumentFragments never have a nodeValue.
 

Constructor Detail

ResultTreeFrag

public ResultTreeFrag(com.lotus.xsl.Document docFactory)
Method Detail

getNodeName

public final java.lang.String getNodeName()
The name of this node, depending on its type; see the table above.

getNodeValue

public java.lang.String getNodeValue()
                              throws com.lotus.xsl.DOMException
The value of this node, depending on its type; see the table above.
Throws:
com.lotus.xsl.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
com.lotus.xsl.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

setNodeValue

public void setNodeValue(java.lang.String x)
                  throws com.lotus.xsl.DOMException
DocumentFragments never have a nodeValue.
Throws:
DOMException(NO_MODIFICATION_ALLOWED_ERR) -  

getNodeType

public final short getNodeType()
A code representing the type of the underlying object, as defined above.

getParentNode

public com.lotus.xsl.Node getParentNode()
The parent of this node. All nodes, except Document, DocumentFragment, and Attr 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.

getChildNodes

public com.lotus.xsl.NodeList getChildNodes()
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.

getFirstChild

public com.lotus.xsl.Node getFirstChild()
The first child of this node. If there is no such node, this returns null.

getLastChild

public com.lotus.xsl.Node getLastChild()
The last child of this node. If there is no such node, this returns null.

getPreviousSibling

public com.lotus.xsl.Node getPreviousSibling()
The node immediately preceding this node. If there is no such node, this returns null.

getNextSibling

public com.lotus.xsl.Node getNextSibling()
The node immediately following this node. If there is no such node, this returns null.

getAttributes

public com.lotus.xsl.NamedNodeMap getAttributes()
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.

getOwnerDocument

public com.lotus.xsl.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 this is null.

insertBefore

public com.lotus.xsl.Node insertBefore(com.lotus.xsl.Node newChild,
                                       com.lotus.xsl.Node refChild)
                                throws com.lotus.xsl.DOMException
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.
Parameters:
newChild - The node to insert.
refChild - The reference node, i.e., the node before which the new node must be inserted.
Returns:
The node being inserted.
Throws:
com.lotus.xsl.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if refChild is not a child of this node.

replaceChild

public com.lotus.xsl.Node replaceChild(com.lotus.xsl.Node newChild,
                                       com.lotus.xsl.Node oldChild)
                                throws com.lotus.xsl.DOMException
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If the newChild is already in the tree, it is first removed.
Parameters:
newChild - The new node to put in the child list.
oldChild - The node being replaced in the list.
Returns:
The node replaced.
Throws:
com.lotus.xsl.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or it the node to put in is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

removeChild

public com.lotus.xsl.Node removeChild(com.lotus.xsl.Node oldChild)
                               throws com.lotus.xsl.DOMException
Removes the child node indicated by oldChild from the list of children, and returns it.
Parameters:
oldChild - The node being removed.
Returns:
The node removed.
Throws:
com.lotus.xsl.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.

appendChild

public com.lotus.xsl.Node appendChild(com.lotus.xsl.Node newChild)
                               throws com.lotus.xsl.DOMException
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.
Parameters:
newChild - The node to add.If it is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node
Returns:
The node added.
Throws:
com.lotus.xsl.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to append is one of this node's ancestors.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

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.

cloneNode

public com.lotus.xsl.Node cloneNode(boolean deep)
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.
Parameters:
deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
Returns:
The duplicate node.