|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xmlpull.v1.builder.xpath.jaxen.DefaultNavigator
public abstract class 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 object,
java.lang.String elementId)
Default implementation that can not 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 |
| Methods inherited from interface org.xmlpull.v1.builder.xpath.jaxen.Navigator |
|---|
getAttributeName, getAttributeNamespaceUri, getAttributeQName, getAttributeStringValue, getCommentStringValue, getElementName, getElementNamespaceUri, getElementQName, getElementStringValue, getNamespacePrefix, getNamespaceStringValue, getTextStringValue, isAttribute, isComment, isDocument, isElement, isNamespace, isProcessingInstruction, isText, parseXPath |
| Constructor Detail |
|---|
public DefaultNavigator()
| Method Detail |
|---|
public java.util.Iterator getChildAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getChildAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getDescendantAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the descendant
xpath axis.
getDescendantAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getParentAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getParentAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getAncestorAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the ancestor
xpath axis.
getAncestorAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getFollowingSiblingAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getFollowingSiblingAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getPrecedingSiblingAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getPrecedingSiblingAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getFollowingAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getFollowingAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getPrecedingAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getPrecedingAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getAttributeAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getAttributeAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getNamespaceAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisException
getNamespaceAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getSelfAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the self xpath
axis.
getSelfAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getDescendantOrSelfAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the
descendant-or-self xpath axis.
getDescendantOrSelfAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public java.util.Iterator getAncestorOrSelfAxisIterator(java.lang.Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the
ancestor-or-self xpath axis.
getAncestorOrSelfAxisIterator in interface NavigatorcontextNode - The origin context node.
UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.public java.lang.Object getDocumentNode(java.lang.Object contextNode)
Navigator
getDocumentNode in interface NavigatorNavigator.isDocument(Object)
public java.lang.String translateNamespacePrefixToUri(java.lang.String prefix,
java.lang.Object element)
NavigatorStrictly 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 Navigatorprefix - The prefix to translate.element - The element to consider during translation.
NamespaceContextpublic java.lang.String getProcessingInstructionTarget(java.lang.Object obj)
Navigator
getProcessingInstructionTarget in interface Navigatorobj - The context processing-instruction node.
public java.lang.String getProcessingInstructionData(java.lang.Object obj)
Navigator
getProcessingInstructionData in interface Navigatorobj - The context processing-instruction node.
public short getNodeType(java.lang.Object node)
Navigator
getNodeType in interface Navigatororg.jaxen.pattern.Pattern
public java.lang.Object getParentNode(java.lang.Object contextNode)
throws UnsupportedAxisException
NavigatorThe parent of any node must either be a document node or an element node.
getParentNode in interface NavigatorUnsupportedAxisExceptionNavigator.isDocument(java.lang.Object),
Navigator.isElement(java.lang.Object)
public java.lang.Object getDocument(java.lang.String url)
throws FunctionCallException
Navigator
getDocument in interface Navigatorurl - is the URI of the document to load
FunctionCallException - if the document could not be loaded
public java.lang.Object getElementById(java.lang.Object object,
java.lang.String elementId)
getElementById in interface NavigatorcontextNode - 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 | ||||||||