com.virtualweaver.xotics.datamodel.datatype
Class XdpNode

java.lang.Object
  extended bycom.virtualweaver.xotics.datamodel.datatype.XdpNode
All Implemented Interfaces:
XoDataType

public final class XdpNode
extends java.lang.Object
implements XoDataType

This class is used for XPath engine to hold and represent an XoNode and its position in document. Note that for an XoProperty, an additional field propertyPosition represents its position in the list of XoProperty of an XO object.

Version:
4.1

Constructor Summary
XdpNode(XoNode node, int position)
          Creates a new instance of XdpNode for any XoNode type
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getPosition()
           
 int getPropertyPosition()
          property position is immutable and provided by XoProperty field position
 XoNode getValue()
           
 boolean isAttributeNode()
           
 boolean isElementNode()
           
 boolean isPropertyNode()
           
 boolean isRootNode()
           
 boolean isTextPropertyNode()
           
 void setPosition(int pos)
          Node position can be changed
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XdpNode

public XdpNode(XoNode node,
               int position)
Creates a new instance of XdpNode for any XoNode type

Parameters:
node - an XoNode
position - its position in the document
Method Detail

getValue

public XoNode getValue()
Returns:
The node held by this

getPosition

public int getPosition()
Returns:
The node position in its document

setPosition

public void setPosition(int pos)
Node position can be changed

Parameters:
pos - position

getPropertyPosition

public int getPropertyPosition()
property position is immutable and provided by XoProperty field position

Returns:
position of this property in the list of properties of XoObject owner

isAttributeNode

public boolean isAttributeNode()
Returns:
if this node is a property representing an XML attribute

isPropertyNode

public boolean isPropertyNode()
Returns:
if this node is a property

isTextPropertyNode

public boolean isTextPropertyNode()
Returns:
if this node is a property representing a text content (xoTextContent)

isElementNode

public boolean isElementNode()
Returns:
if this node is an XoObject representing an XML element

isRootNode

public boolean isRootNode()
Returns:
if this node is an XoRoot representing an XML root element

equals

public boolean equals(java.lang.Object o)

toString

public java.lang.String toString()