|
|||||||||
| Home >> All >> com >> aendvari >> common >> model >> [ xalan overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.aendvari.common.model.xalan
Class XalanModelNode

java.lang.Objectcom.aendvari.common.model.xalan.XalanModelNode
- All Implemented Interfaces:
- com.aendvari.common.model.ModelNode
- public class XalanModelNode
- extends java.lang.Object
- implements com.aendvari.common.model.ModelNode
- extends java.lang.Object
A Xalan XML implementation of the com.aendvari.common.model.ModelNode interface.
| Field Summary | |
protected org.w3c.dom.Node |
modelNode
The DOM node |
protected java.lang.String |
modelValue
The node value. |
protected XalanModelTree |
owner
The owning model tree. |
| Constructor Summary | |
protected |
XalanModelNode(XalanModelTree setOwner)
Constructs a XalanModelNode instance. |
protected |
XalanModelNode(XalanModelTree setOwner,
org.w3c.dom.Node setModelNode)
Constructs a XalanModelNode instance wrapping the supplied org.w3c.dom.Node. |
protected |
XalanModelNode(XalanModelTree setOwner,
java.lang.String setModelValue)
This is used in XalanModelTree::getNode() |
| Method Summary | |
com.aendvari.common.model.ModelNode |
appendChild(com.aendvari.common.model.ModelNode newChild)
Adds the node newChild to the end of the list of children of this node. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the string value of the specified attribute. |
java.util.Map |
getAttributes()
Returns the attributes of this node. |
java.util.List |
getChildNodes()
Returns a List of com.aendvari.common.model.ModelNode's using the path provided. |
com.aendvari.common.model.ModelNode |
getFirstChild()
The first child of this node. |
com.aendvari.common.model.ModelNode |
getLastChild()
The last child of this node. |
com.aendvari.common.model.ModelNode |
getNextSibling()
The node immediately following this node. |
java.lang.String |
getNodeName()
Returns the name of this node. |
java.lang.String |
getNodePath()
Returns a string representation of the node's position in the hierarchy. |
java.lang.String |
getNodeValue()
Returns the value of the node. |
com.aendvari.common.model.ModelTree |
getOwnerModelTree()
Returns the instance of ModelTree from which the com.aendvari.common.model.ModelNode is within. |
com.aendvari.common.model.ModelNode |
getParentNode()
The parent of this node. |
com.aendvari.common.model.ModelNode |
getPreviousSibling()
The node immediately preceding this node. |
protected java.lang.String |
getTextValue()
Returns the text within the node. |
org.w3c.dom.Node |
getXmlNode()
Returns the internal XML org.w3c.dom.Node object wrapped by this com.aendvari.common.model.ModelNode. |
boolean |
hasChildNodes()
Returns whether this node has any children. |
com.aendvari.common.model.ModelNode |
insertBefore(com.aendvari.common.model.ModelNode newChild,
com.aendvari.common.model.ModelNode refChild)
Inserts the node newChild before the existing child node refChild. |
com.aendvari.common.model.ModelNode |
removeChild(com.aendvari.common.model.ModelNode oldChild)
Removes the child node indicated by oldChild from the list of children,
and returns it. |
com.aendvari.common.model.ModelNode |
replaceChild(com.aendvari.common.model.ModelNode newChild,
com.aendvari.common.model.ModelNode oldChild)
Replaces the child node oldChild with newChild, and returns
the oldChild node. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets the string value of the attribute. |
void |
setNodeValue(java.lang.String value)
Sets the value of the node. |
void |
setXmlNode(org.w3c.dom.Node setModelNode)
Sets the internal XML org.w3c.dom.Node object wrapped by this com.aendvari.common.model.ModelNode. |
protected void |
setXmlValue()
Caches the value of the XML org.w3c.dom.Node, if any. |
java.lang.String |
toString()
Display the string value of the node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
owner
protected XalanModelTree owner
- The owning model tree.
modelNode
protected org.w3c.dom.Node modelNode
- The DOM node
modelValue
protected java.lang.String modelValue
- The node value.
| Constructor Detail |
XalanModelNode
protected XalanModelNode(XalanModelTree setOwner)
- Constructs a
XalanModelNodeinstance.
XalanModelNode
protected XalanModelNode(XalanModelTree setOwner, org.w3c.dom.Node setModelNode)
- Constructs a
XalanModelNodeinstance wrapping the supplied org.w3c.dom.Node.
XalanModelNode
protected XalanModelNode(XalanModelTree setOwner, java.lang.String setModelValue)
- This is used in XalanModelTree::getNode()
| Method Detail |
setXmlNode
public void setXmlNode(org.w3c.dom.Node setModelNode)
- Sets the internal XML org.w3c.dom.Node object wrapped by this com.aendvari.common.model.ModelNode.
getXmlNode
public org.w3c.dom.Node getXmlNode()
- Returns the internal XML org.w3c.dom.Node object wrapped by this com.aendvari.common.model.ModelNode.
setXmlValue
protected void setXmlValue()
- Caches the value of the XML org.w3c.dom.Node, if any.
getOwnerModelTree
public com.aendvari.common.model.ModelTree getOwnerModelTree()
- Returns the instance of
ModelTreefrom which the com.aendvari.common.model.ModelNode is within.- Specified by:
getOwnerModelTreein interfacecom.aendvari.common.model.ModelNode
getNodeValue
public java.lang.String getNodeValue()
- Returns the value of the node.
- Specified by:
getNodeValuein interfacecom.aendvari.common.model.ModelNode
getTextValue
protected java.lang.String getTextValue()
- Returns the text within the node.
setNodeValue
public void setNodeValue(java.lang.String value)
- Sets the value of the node.
- Specified by:
setNodeValuein interfacecom.aendvari.common.model.ModelNode
getNodeName
public java.lang.String getNodeName()
- Returns the name of this node.
- Specified by:
getNodeNamein interfacecom.aendvari.common.model.ModelNode
getNodePath
public java.lang.String getNodePath()
- Returns a string representation of the node's position in the hierarchy.
- Specified by:
getNodePathin interfacecom.aendvari.common.model.ModelNode
getAttributes
public java.util.Map getAttributes()
- Returns the attributes of this node.
- Specified by:
getAttributesin interfacecom.aendvari.common.model.ModelNode
getAttribute
public java.lang.String getAttribute(java.lang.String name)
- Returns the string value of the specified attribute.
- Specified by:
getAttributein interfacecom.aendvari.common.model.ModelNode
setAttribute
public void setAttribute(java.lang.String name, java.lang.String value)
- Sets the string value of the attribute.
- Specified by:
setAttributein interfacecom.aendvari.common.model.ModelNode
getParentNode
public com.aendvari.common.model.ModelNode getParentNode()
- The parent of this node. All nodes, except the root (com.aendvari.common.model.ModelNode)
node may have a parent. 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.
- Specified by:
getParentNodein interfacecom.aendvari.common.model.ModelNode
getFirstChild
public com.aendvari.common.model.ModelNode getFirstChild()
- The first child of this node. If there is no such node, this returns null.
- Specified by:
getFirstChildin interfacecom.aendvari.common.model.ModelNode
getLastChild
public com.aendvari.common.model.ModelNode getLastChild()
- The last child of this node. If there is no such node, this returns null.
- Specified by:
getLastChildin interfacecom.aendvari.common.model.ModelNode
getPreviousSibling
public com.aendvari.common.model.ModelNode getPreviousSibling()
- The node immediately preceding this node. If there is no such node,
this returns null.
- Specified by:
getPreviousSiblingin interfacecom.aendvari.common.model.ModelNode
getNextSibling
public com.aendvari.common.model.ModelNode getNextSibling()
- The node immediately following this node. If there is no such node,
this returns null.
- Specified by:
getNextSiblingin interfacecom.aendvari.common.model.ModelNode
getChildNodes
public java.util.List getChildNodes()
- Returns a
Listof com.aendvari.common.model.ModelNode's using the path provided.- Specified by:
getChildNodesin interfacecom.aendvari.common.model.ModelNode
hasChildNodes
public boolean hasChildNodes()
- Returns whether this node has any children.
- Specified by:
hasChildNodesin interfacecom.aendvari.common.model.ModelNode
appendChild
public com.aendvari.common.model.ModelNode appendChild(com.aendvari.common.model.ModelNode newChild)
- Adds the node
newChildto the end of the list of children of this node. If thenewChildis already in the tree, it is first removed.- Specified by:
appendChildin interfacecom.aendvari.common.model.ModelNode
insertBefore
public com.aendvari.common.model.ModelNode insertBefore(com.aendvari.common.model.ModelNode newChild, com.aendvari.common.model.ModelNode refChild)
- Inserts the node
newChildbefore the existing child noderefChild. IfrefChildis null,newChildis inserted at the end of the list of children. If thenewChildis already in the tree, it is first removed.- Specified by:
insertBeforein interfacecom.aendvari.common.model.ModelNode
replaceChild
public com.aendvari.common.model.ModelNode replaceChild(com.aendvari.common.model.ModelNode newChild, com.aendvari.common.model.ModelNode oldChild)
- Replaces the child node
oldChildwithnewChild, and returns theoldChildnode. If thenewChildis already in the tree, it is first removed.- Specified by:
replaceChildin interfacecom.aendvari.common.model.ModelNode
removeChild
public com.aendvari.common.model.ModelNode removeChild(com.aendvari.common.model.ModelNode oldChild)
- Removes the child node indicated by
oldChildfrom the list of children, and returns it.- Specified by:
removeChildin interfacecom.aendvari.common.model.ModelNode
toString
public java.lang.String toString()
- Display the string value of the node.
|
|||||||||
| Home >> All >> com >> aendvari >> common >> model >> [ xalan overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.aendvari.common.model.xalan.XalanModelNode