|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.util.dom.DOMBase | +--com.beasys.commerce.util.dom.NodeImpl
A base class implementation of the W3C's DOM Node object.
This provides support for child nodes and a parent node. Subclasses need to override the cloneNode(), getNodeType(), getNodeName(); subclasses might choose to override getAllowableChildrenTypes(), getNodeValue(), and setNodeValue(). Elements should override getAttributes() to provide support for attributes.
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE,
CDATA_SECTION_NODE,
COMMENT_NODE,
DOCUMENT_FRAGMENT_NODE,
DOCUMENT_NODE,
DOCUMENT_TYPE_NODE,
ELEMENT_NODE,
ENTITY_NODE,
ENTITY_REFERENCE_NODE,
NOTATION_NODE,
PROCESSING_INSTRUCTION_NODE,
TEXT_NODE |
Constructor Summary | |
NodeImpl(org.w3c.dom.Document document,
org.w3c.dom.Node parent)
Constructor. |
Method Summary | |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node child)
Append a new child node to the end of children node list. |
abstract org.w3c.dom.Node |
cloneNode()
Clone yourself, including attributes, but not children. |
org.w3c.dom.Node |
cloneNode(boolean deep)
Clone this node. |
org.w3c.dom.NamedNodeMap |
getAttributes()
Return the attributes of this node. |
org.w3c.dom.NodeList |
getChildNodes()
Return the children nodes of this node. |
org.w3c.dom.Node |
getFirstChild()
Get the first child node. |
org.w3c.dom.Node |
getLastChild()
Get the last child node. |
org.w3c.dom.Node |
getNextSibling()
Get the next sibling of this node. |
abstract java.lang.String |
getNodeName()
Get the node's name. |
abstract short |
getNodeType()
Get the node's type. |
static java.lang.String |
getNodeType(short type)
Get a string version of the node type. |
java.lang.String |
getNodeValue()
Get the node's value. |
org.w3c.dom.Node |
getParentNode()
Get the parent node. |
org.w3c.dom.Node |
getPreviousSibling()
Get the previous sibling of this node. |
boolean |
hasChildNodes()
Return if this has children nodes. |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
Insert a new child node in front of the given child node in our children node list. |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node child)
Remove the specified child node from children node list. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
Replace the specified child node with the new child node in our children node list. |
void |
setNodeValue(java.lang.String value)
Set the node's value. |
void |
setParentNode(org.w3c.dom.Node parentNode)
Set the parent node. |
Methods inherited from class com.beasys.commerce.util.dom.DOMBase |
checkOwnerDocument,
getOwnerDocument,
isReadOnly,
setReadOnly |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public NodeImpl(org.w3c.dom.Document document, org.w3c.dom.Node parent)
document
- the document we're part of.parent
- our parent node.Method Detail |
public abstract org.w3c.dom.Node cloneNode()
This is different from cloneNode(boolean); this is always a shallow clone.
public org.w3c.dom.Node appendChild(org.w3c.dom.Node child) throws org.w3c.dom.DOMException
child
- the new child node.public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
newChild
- the child to add.refChild
- the child to add in front of.public org.w3c.dom.Node removeChild(org.w3c.dom.Node child) throws org.w3c.dom.DOMException
child
- the child to remove.public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
newChild
- the new child replacing the old child.oldChild
- the old child being replaced.public boolean hasChildNodes()
public org.w3c.dom.Node cloneNode(boolean deep)
deep
- true to also clone the children of this node.#clone()
public org.w3c.dom.NamedNodeMap getAttributes()
Element's should override to return a NamedNodeMap.
public org.w3c.dom.NodeList getChildNodes()
public org.w3c.dom.Node getFirstChild()
public org.w3c.dom.Node getLastChild()
public org.w3c.dom.Node getNextSibling()
public org.w3c.dom.Node getPreviousSibling()
public abstract short getNodeType()
public abstract java.lang.String getNodeName()
This value is subclass specific; see the DOM documentation for further details.
public java.lang.String getNodeValue()
This value is subclass specific; see the DOM documentation for further details.
The method here returns null. Subclasses that have node values should override this method.
public void setNodeValue(java.lang.String value)
The implementation of this is subclass specific; see the DOM documentation for further details.
The method here does nothing. Subclasses that have node values should override this method.
public org.w3c.dom.Node getParentNode()
public void setParentNode(org.w3c.dom.Node parentNode)
parentNode
- the new parent node (can be null which means no
longer in a tree).public static java.lang.String getNodeType(short type)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |