org.planx.xpath
Class XMLStoreNavigator

java.lang.Object
  extended by org.planx.xpath.XMLStoreNavigator
All Implemented Interfaces:
Navigator

public class XMLStoreNavigator
extends Object
implements Navigator

This navigator implements a bridge between XPath and XML Store.

Author:
Thomas Ambus

Field Summary
 
Fields inherited from interface org.planx.xpath.Navigator
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, PROCESSING_INSTRUCTION, ROOT, TEXT
 
Constructor Summary
XMLStoreNavigator()
          Construct an XMLStoreNavigator.
 
Method Summary
 int attributeCount(Object node)
          Return the number of attributes of the specified node.
 int childCount(Object node)
          Return the number of children of the specified node.
 Object getAttribute(Object node, int index)
          Return the attribute of the specified node with the specified attribute index.
 Object getChild(Object node, int index)
          Return the child of the specified node with the specified child index.
 String getName(Object node)
          Return the name of the specified node.
 Object getParent(Object node)
          Return the parent of the specified node or null if it does not have a parent.
 Object getRoot(Object node)
          Return the root node of the document to which the specified node belongs.
 String getStringValue(Object node)
          Return the value of the specified node as defined in the XPath specification.
 int getType(Object node)
          Return the type of the node as specified in this interface.
 Object nextSibling(Object node)
          Return the next sibling of the specified node or null if it does not have a one.
 Object previousSibling(Object node)
          Return the previous sibling of the specified node or null if it does not have a one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLStoreNavigator

public XMLStoreNavigator()
Construct an XMLStoreNavigator.

Method Detail

getRoot

public Object getRoot(Object node)
               throws XPathException
Description copied from interface: Navigator
Return the root node of the document to which the specified node belongs.

Specified by:
getRoot in interface Navigator
Throws:
XPathException

getParent

public Object getParent(Object node)
                 throws XPathException
Description copied from interface: Navigator
Return the parent of the specified node or null if it does not have a parent.

Specified by:
getParent in interface Navigator
Throws:
XPathException

nextSibling

public Object nextSibling(Object node)
                   throws XPathException
Description copied from interface: Navigator
Return the next sibling of the specified node or null if it does not have a one.

Specified by:
nextSibling in interface Navigator
Throws:
XPathException

previousSibling

public Object previousSibling(Object node)
                       throws XPathException
Description copied from interface: Navigator
Return the previous sibling of the specified node or null if it does not have a one.

Specified by:
previousSibling in interface Navigator
Throws:
XPathException

getChild

public Object getChild(Object node,
                       int index)
                throws XPathException
Description copied from interface: Navigator
Return the child of the specified node with the specified child index.

Specified by:
getChild in interface Navigator
Throws:
XPathException

childCount

public int childCount(Object node)
               throws XPathException
Description copied from interface: Navigator
Return the number of children of the specified node.

Specified by:
childCount in interface Navigator
Throws:
XPathException

getAttribute

public Object getAttribute(Object node,
                           int index)
                    throws XPathException
Description copied from interface: Navigator
Return the attribute of the specified node with the specified attribute index. Note that the indexing is merely for convenience and does not imply a specific ordering of the attributes.

Specified by:
getAttribute in interface Navigator
Throws:
XPathException

attributeCount

public int attributeCount(Object node)
                   throws XPathException
Description copied from interface: Navigator
Return the number of attributes of the specified node.

Specified by:
attributeCount in interface Navigator
Throws:
XPathException

getName

public String getName(Object node)
               throws XPathException
Description copied from interface: Navigator
Return the name of the specified node. For element nodes this is the name of the node. For text node this is null. For attribute nodes this is the name of the attribute.

Specified by:
getName in interface Navigator
Throws:
XPathException

getStringValue

public String getStringValue(Object node)
                      throws XPathException
Description copied from interface: Navigator
Return the value of the specified node as defined in the XPath specification. For element nodes this is the concatenation of the values of the descendant text nodes. For text nodes this is the character contents of the node. For attribute nodes this is the value of the attribute.

Specified by:
getStringValue in interface Navigator
Throws:
XPathException

getType

public int getType(Object node)
            throws XPathException
Description copied from interface: Navigator
Return the type of the node as specified in this interface.

Specified by:
getType in interface Navigator
Throws:
XPathException


Copyright © 2010. All Rights Reserved.