|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.NodeFactory
org.planx.xmlstore.nodes.DVMNodeFactory
public final class DVMNodeFactory
An implementation of NodeFactory that operates strictly on
SystemNodes. The preferred way to obtain a SystemNode
from an unknown Node (which may already be a SystemNode)
is not to cast it but to use the convert(Node) method provided
here.
| Constructor Summary | |
|---|---|
DVMNodeFactory()
|
|
| Method Summary | |
|---|---|
static SystemNode |
convert(Node n)
Addition method that converts any Node to a SystemNode. |
Attribute |
createAttribute(String name,
String value)
|
Node |
createCharDataNode(String data)
|
Node |
createElementNode(String tagName)
|
Node |
createElementNode(String tagName,
List<? extends Node> children)
|
Node |
createElementNode(String tagName,
List<? extends Node> children,
List<Attribute> attrs)
|
Node |
createElementNode(String tagName,
Node child)
|
Node |
createElementNode(String tagName,
Node[] children)
|
Node |
createElementNode(String tagName,
Node[] children,
Attribute[] attrs)
|
Node |
insertChild(Node n,
int index,
Node child)
The method is used for adding a child to an element node. |
Node |
removeChild(Node n,
int index)
The method is used for removing a child from an element node. |
Node |
replaceChild(Node node,
int index,
Node child)
The method is used for replacing a child of an element node. |
| Methods inherited from class org.planx.xmlstore.NodeFactory |
|---|
instance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DVMNodeFactory()
| Method Detail |
|---|
public Attribute createAttribute(String name,
String value)
createAttribute in class NodeFactorypublic Node createElementNode(String tagName)
createElementNode in class NodeFactory
public Node createElementNode(String tagName,
List<? extends Node> children)
createElementNode in class NodeFactory
public Node createElementNode(String tagName,
List<? extends Node> children,
List<Attribute> attrs)
createElementNode in class NodeFactory
public Node createElementNode(String tagName,
Node[] children)
createElementNode in class NodeFactory
public Node createElementNode(String tagName,
Node[] children,
Attribute[] attrs)
createElementNode in class NodeFactory
public Node createElementNode(String tagName,
Node child)
createElementNode in class NodeFactorypublic Node createCharDataNode(String data)
createCharDataNode in class NodeFactorypublic static SystemNode convert(Node n)
Node to a SystemNode.
If it is already a SystemNode it will merely be cast.
public Node replaceChild(Node node,
int index,
Node child)
NodeFactory
replaceChild in class NodeFactorynode - element node.index - index of the child to replace.child - new child node.
public Node insertChild(Node n,
int index,
Node child)
NodeFactory
insertChild in class NodeFactoryn - element node.index - index at which new child is inserted.child - new child node.
public Node removeChild(Node n,
int index)
NodeFactory
removeChild in class NodeFactoryn - element node.index - index specifying the child to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||