com.ibm.xml.xapi

Interface XNodeView

All known subinterfaces:
XItemView, XSequenceCursor, XTreeCursor

  1. public interface XNodeView

Represents a node in the data model (an item with complex type). An object of type XNodeView should never occur, rather XItemView extends XNodeView so that items of complex type can be examined as nodes. The isAtomic method should be called on an XItemView object before any of the XNodeView methods are called as they are not valid for atomic items. If a XNodeView method is invoked on an atomic item, an XViewException will be thrown.


Nested Class Summary

Modifier and Type Interface and Description
  1. static class
XNodeView.Kind
Enumeration of node kinds.

Method Summary

Modifier and Type Method and Description
  1. org.w3c.dom.Node
getDOMNode()
Get a DOM Node for this item.
  1. XNodeView.Kind
getKind()
Get the node kind.
  1. javax.xml.namespace.QName
getNodeQName()
Get the qualified node name.
  1. XTreeCursor
getTreeCursor()
Get a tree cursor for this item.
  1. boolean
isSameDocument(XItemView item)
Indicates if the specified node and this node are in the same document.
  1. int
relativePosition(XItemView item)
Returns -1, 0, or 1 to indicate if this node is before, the same or after the specified node.

Method Detail

getKind

  1. XNodeView.Kind getKind()
Get the node kind.
Returns:
An enumerator indicating the node kind.
Throws:
XViewException - if this item is atomic.

getNodeQName

  1. javax.xml.namespace.QName getNodeQName( )
Get the qualified node name.
Returns:
The node name as a QName object.
Throws:
XViewException - if this item is atomic.

isSameDocument

  1. boolean isSameDocument(XItemView item)
Indicates if the specified node and this node are in the same document.
Returns:
Returns true if the specified item is a node in the same document as this node, false otherwise
Throws:
XViewException - if either this item or the specified item is atomic.

relativePosition

  1. int relativePosition(XItemView item)
Returns -1, 0, or 1 to indicate if this node is before, the same or after the specified node. Nodes must be in the same document. Use isSameDocument to ensure the nodes are in the same document before calling this method.
Returns:
-1, 0 or 1
Throws:
XViewException - if either this item or the specified item is atomic or if the nodes are not in the same document.
See Also:

getTreeCursor

  1. XTreeCursor getTreeCursor()
Get a tree cursor for this item.
Returns:
An XTreeCursor object for this node.
Throws:
XViewException - if this item is atomic.
See Also:

getDOMNode

  1. org.w3c.dom.Node getDOMNode()
Get a DOM Node for this item.
Returns:
A DOM Node object for this node.
Throws:
XViewException - if this item is atomic.