org.jaxen
public abstract class DefaultNavigator extends Object implements Navigator
This implementation is an abstract class, since some required operations cannot be implemented without additional knowledge of the object model.
When possible, default method implementations build upon each other, to reduce the number of methods required to be implemented for each object model. All methods, of course, may be overridden, to provide more-efficient implementations.
Method Summary | |
---|---|
Iterator | getAncestorAxisIterator(Object contextNode) |
Iterator | getAncestorOrSelfAxisIterator(Object contextNode) |
Iterator | getAttributeAxisIterator(Object contextNode) Throws UnsupportedAxisException . |
Iterator | getChildAxisIterator(Object contextNode) Throws UnsupportedAxisException
|
Iterator | getDescendantAxisIterator(Object contextNode) |
Iterator | getDescendantOrSelfAxisIterator(Object contextNode) |
Object | getDocument(String url)
Default implementation that always returns null. |
Object | getDocumentNode(Object contextNode) |
Object | getElementById(Object contextNode, String elementId)
Default implementation that cannot find elements. |
Iterator | getFollowingAxisIterator(Object contextNode) |
Iterator | getFollowingSiblingAxisIterator(Object contextNode) |
Iterator | getNamespaceAxisIterator(Object contextNode) Throws UnsupportedAxisException . |
short | getNodeType(Object node) |
Iterator | getParentAxisIterator(Object contextNode) Throws UnsupportedAxisException
|
Object | getParentNode(Object contextNode)
Default inefficient implementation. |
Iterator | getPrecedingAxisIterator(Object contextNode) |
Iterator | getPrecedingSiblingAxisIterator(Object contextNode) |
String | getProcessingInstructionData(Object obj) |
String | getProcessingInstructionTarget(Object obj) |
Iterator | getSelfAxisIterator(Object contextNode) |
String | translateNamespacePrefixToUri(String prefix, Object element) |
UnsupportedAxisException
. Subclasses that
support the attribute axis must override this method.
Parameters: contextNode
Returns: never returns
Throws: UnsupportedAxisException
UnsupportedAxisException
Parameters: contextNode
Returns: never returns
Throws: UnsupportedAxisException always
Parameters: url the URL of the document to load
Returns: null
Throws: FunctionCallException if an error occurs while loading the URL; e.g. an I/O error or the document is malformed
Parameters: contextNode a node from the document in which to look for the id elementId id to look for
Returns: null
UnsupportedAxisException
. Subclasses that
support the namespace axis must override this method.
Parameters: contextNode
Returns: never returns
Throws: UnsupportedAxisException
UnsupportedAxisException
Parameters: contextNode
Returns: never returns
Throws: UnsupportedAxisException
Parameters: contextNode the node whose parent to return
Returns: the parent node
Throws: UnsupportedAxisException if the parent axis is not supported