org.apache.tapestry.dom
Class Node

java.lang.Object
  extended by org.apache.tapestry.dom.Node
Direct Known Subclasses:
CData, Comment, Document, Element, Raw, Text

public abstract class Node
extends Object

A node within the DOM.


Constructor Summary
protected Node(Node container)
          Creates a new node, setting its container to the provided value.
 
Method Summary
 String getChildMarkup()
           
 List<Node> getChildren()
           
 Node getContainer()
           
abstract  void toMarkup(PrintWriter writer)
          Writes the markup for this node to the writer.
 String toString()
          Invokes toMarkup(PrintWriter), collecting output in a string, which is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

protected Node(Node container)
Creates a new node, setting its container to the provided value. Container may also be null, but that is only used for Document nodes (the topmost node of a DOM).

Parameters:
container -
Method Detail

getContainer

public Node getContainer()

getChildMarkup

public final String getChildMarkup()
Returns:
the concatenation of the String representations toString() of its children.

toString

public String toString()
Invokes toMarkup(PrintWriter), collecting output in a string, which is returned.

Overrides:
toString in class Object

getChildren

public List<Node> getChildren()

toMarkup

public abstract void toMarkup(PrintWriter writer)
Writes the markup for this node to the writer.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.