|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.DefaultNavigator
Default implementation of 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.
Constructor Summary | |
DefaultNavigator()
|
Method Summary | |
java.util.Iterator |
getAncestorAxisIterator(java.lang.Object contextNode)
Retrieve an Iterator matching the ancestor
XPath axis. |
java.util.Iterator |
getAncestorOrSelfAxisIterator(java.lang.Object contextNode)
Retrieve an Iterator matching the
ancestor-or-self XPath axis. |
java.util.Iterator |
getAttributeAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.util.Iterator |
getChildAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.util.Iterator |
getDescendantAxisIterator(java.lang.Object contextNode)
Retrieve an Iterator matching the descendant
XPath axis. |
java.util.Iterator |
getDescendantOrSelfAxisIterator(java.lang.Object contextNode)
Retrieve an Iterator matching the
descendant-or-self XPath axis. |
java.lang.Object |
getDocument(java.lang.String url)
Loads a document from the given URI |
java.lang.Object |
getDocumentNode(java.lang.Object contextNode)
Returns the document node that contains the given context node. |
java.lang.Object |
getElementById(java.lang.Object contextNode,
java.lang.String elementId)
Default implementation that cannot find elements. |
java.util.Iterator |
getFollowingAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.util.Iterator |
getFollowingSiblingAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.util.Iterator |
getNamespaceAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
short |
getNodeType(java.lang.Object node)
Returns a number that identifies the type of node that the given object represents in this navigator. |
java.util.Iterator |
getParentAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.lang.Object |
getParentNode(java.lang.Object contextNode)
Returns the parent of the given context node. |
java.util.Iterator |
getPrecedingAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.util.Iterator |
getPrecedingSiblingAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.lang.String |
getProcessingInstructionData(java.lang.Object obj)
Retrieve the data of a processing-instruction. |
java.lang.String |
getProcessingInstructionTarget(java.lang.Object obj)
Retrieve the target of a processing-instruction. |
java.util.Iterator |
getSelfAxisIterator(java.lang.Object contextNode)
Retrieve an Iterator matching the self xpath
axis. |
java.lang.String |
translateNamespacePrefixToUri(java.lang.String prefix,
java.lang.Object element)
Translate a namespace prefix to a namespace URI, possibly considering a particular element node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultNavigator()
Method Detail |
public java.util.Iterator getChildAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getChildAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getDescendantAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
Navigator
Iterator
matching the descendant
XPath axis.
getDescendantAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getParentAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getParentAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getAncestorAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
Navigator
Iterator
matching the ancestor
XPath axis.
getAncestorAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getFollowingSiblingAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getFollowingSiblingAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getPrecedingSiblingAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getPrecedingSiblingAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getFollowingAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getFollowingAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getPrecedingAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getPrecedingAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getAttributeAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getAttributeAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getNamespaceAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException
getNamespaceAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getSelfAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
Navigator
Iterator
matching the self
xpath
axis.
getSelfAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getDescendantOrSelfAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
Navigator
Iterator
matching the
descendant-or-self
XPath axis.
getDescendantOrSelfAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.util.Iterator getAncestorOrSelfAxisIterator(java.lang.Object contextNode) throws UnsupportedAxisException
Navigator
Iterator
matching the
ancestor-or-self
XPath axis.
getAncestorOrSelfAxisIterator
in interface Navigator
contextNode
- the original context node
UnsupportedAxisException
- if the semantics of this axis are
not supported by this object modelpublic java.lang.Object getDocumentNode(java.lang.Object contextNode)
Navigator
getDocumentNode
in interface Navigator
contextNode
- the context node
Navigator.isDocument(Object)
public java.lang.String translateNamespacePrefixToUri(java.lang.String prefix, java.lang.Object element)
Navigator
Strictly speaking, prefix-to-URI translation should occur irrespective of any element in the document. This method is provided to allow a non-conforming ease-of-use enhancement.
translateNamespacePrefixToUri
in interface Navigator
prefix
- the prefix to translateelement
- the element to consider during translation
NamespaceContext
public java.lang.String getProcessingInstructionTarget(java.lang.Object obj)
Navigator
getProcessingInstructionTarget
in interface Navigator
obj
- The context processing-instruction node.
public java.lang.String getProcessingInstructionData(java.lang.Object obj)
Navigator
getProcessingInstructionData
in interface Navigator
obj
- The context processing-instruction node.
public short getNodeType(java.lang.Object node)
Navigator
getNodeType
in interface Navigator
Pattern
public java.lang.Object getParentNode(java.lang.Object contextNode) throws UnsupportedAxisException
Navigator
The parent of any node must either be a document node or an element node.
getParentNode
in interface Navigator
contextNode
- the context node
UnsupportedAxisException
- If the parent axis is not
supported by the model.Navigator.isDocument(java.lang.Object)
,
Navigator.isElement(java.lang.Object)
public java.lang.Object getDocument(java.lang.String url) throws FunctionCallException
Navigator
getDocument
in interface Navigator
url
- the URI of the document to load
FunctionCallException
- if the document could not be loadedpublic java.lang.Object getElementById(java.lang.Object contextNode, java.lang.String elementId)
getElementById
in interface Navigator
contextNode
- a node from the document in which to look for the
idelementId
- id to look for
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |