|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.dom.Node
public abstract class Node
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()
Returns an unmodifiable list of children for this node. |
Node |
getContainer()
Returns the containing node for this node, or null if this node is the root element of the document. |
Document |
getDocument()
|
protected Map<String,String> |
getNamespaceURIToPrefix()
|
Node |
moveAfter(Element element)
Moves this node so that it becomes a sibling of the element, ordered just after the element. |
Node |
moveBefore(Element element)
Moves this node so that it becomes a sibling of the element, ordered just before the element. |
Node |
moveToBottom(Element element)
Moves this node so that it the last child of the element. |
Node |
moveToTop(Element element)
Moves this node so that it becomes this first child of the element, shifting existing elements forward. |
void |
remove()
Removes a node from its container, setting its container property to null, and removing it from its container's list of children. |
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. |
Element |
wrap(String elementName,
String... namesAndValues)
Wraps a node inside a new element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Node(Node container)
container - | Method Detail |
|---|
public Node getContainer()
public Document getDocument()
public final String getChildMarkup()
toString() of its children.public String toString()
toMarkup(PrintWriter), collecting output in a string, which is returned.
toString in class Objectpublic List<Node> getChildren()
Elements will have
children. Also, note that unlike W3C DOM, attributes are not represented as Nodes.
public void toMarkup(PrintWriter writer)
protected Map<String,String> getNamespaceURIToPrefix()
public Node moveBefore(Element element)
element - to move the node before
public Node moveAfter(Element element)
element - to move the node after
public Node moveToTop(Element element)
element - to move the node inside
public Node moveToBottom(Element element)
element - to move the node inside
public void remove()
public Element wrap(String elementName,
String... namesAndValues)
elementName - name of new element to createnamesAndValues - to set attributes of new element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||