public class DocumentNavigator extends DefaultNavigator
This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.
XPath,
Serialized Form| Constructor and Description |
|---|
DocumentNavigator() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator |
getAttributeAxisIterator(java.lang.Object o)
Throws
UnsupportedAxisException. |
java.lang.String |
getAttributeName(java.lang.Object o)
Retrieve the local name of the given attribute node.
|
java.lang.String |
getAttributeNamespaceUri(java.lang.Object o)
Retrieve the namespace URI of the given attribute node.
|
java.lang.String |
getAttributeQName(java.lang.Object o)
Retrieve the qualified name of the given attribute node.
|
java.lang.String |
getAttributeStringValue(java.lang.Object o)
Retrieve the string-value of an attribute node.
|
java.util.Iterator |
getChildAxisIterator(java.lang.Object o)
Throws
UnsupportedAxisException |
java.lang.String |
getCommentStringValue(java.lang.Object o)
Retrieve the string-value of a comment node.
|
java.lang.Object |
getDocument(java.lang.String s)
Default implementation that always returns null.
|
java.lang.Object |
getDocumentNode(java.lang.Object o)
Returns the document node that contains the given context node.
|
java.lang.String |
getElementName(java.lang.Object o)
Retrieve the local name of the given element node.
|
java.lang.String |
getElementNamespaceUri(java.lang.Object o)
Retrieve the namespace URI of the given element node.
|
java.lang.String |
getElementQName(java.lang.Object o)
Retrieve the qualified name of the given element node.
|
java.lang.String |
getElementStringValue(java.lang.Object o)
Retrieve the string-value of an element node.
|
java.util.Iterator |
getNamespaceAxisIterator(java.lang.Object o)
Throws
UnsupportedAxisException. |
java.lang.String |
getNamespacePrefix(java.lang.Object o)
Retrieve the namespace prefix of a namespace node.
|
java.lang.String |
getNamespaceStringValue(java.lang.Object o)
Retrieve the string-value of a namespace node.
|
java.util.Iterator |
getParentAxisIterator(java.lang.Object o)
Throws
UnsupportedAxisException |
java.lang.Object |
getParentNode(java.lang.Object o)
Default inefficient implementation.
|
java.util.Iterator |
getPrecedingAxisIterator(java.lang.Object o)
Retrieve an
Iterator matching the preceding XPath axis. |
java.util.Iterator |
getPrecedingSiblingAxisIterator(java.lang.Object o)
Retrieve an
Iterator matching the
preceding-sibling XPath axis. |
java.lang.String |
getProcessingInstructionData(java.lang.Object o)
Retrieve the data of a processing-instruction.
|
java.lang.String |
getProcessingInstructionTarget(java.lang.Object o)
Retrieve the target of a processing-instruction.
|
java.lang.String |
getTextStringValue(java.lang.Object o)
Retrieve the string-value of a text node.
|
boolean |
isAttribute(java.lang.Object o)
Returns whether the given object is an attribute node.
|
boolean |
isComment(java.lang.Object o)
Returns whether the given object is a comment node.
|
boolean |
isDocument(java.lang.Object o)
Returns whether the given object is a document node.
|
boolean |
isElement(java.lang.Object o)
Returns whether the given object is an element node.
|
boolean |
isNamespace(java.lang.Object o)
Returns whether the given object is a namespace node.
|
boolean |
isProcessingInstruction(java.lang.Object o)
Returns whether the given object is a processing-instruction node.
|
boolean |
isText(java.lang.Object o)
Returns whether the given object is a text node.
|
XPath |
parseXPath(java.lang.String s)
Returns a parsed form of the given XPath string, which will be suitable
for queries on documents that use the same navigator as this one.
|
java.lang.String |
translateNamespacePrefixToUri(java.lang.String s,
java.lang.Object o)
Translate a namespace prefix to a namespace URI, possibly
considering a particular element node.
|
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getElementById, getFollowingAxisIterator, getFollowingSiblingAxisIterator, getNodeType, getSelfAxisIteratorpublic boolean isAttribute(java.lang.Object o)
Navigatoro - the object to testtrue if the object is an attribute node,
else falsepublic boolean isComment(java.lang.Object o)
Navigatoro - the object to testtrue if the object is a comment node,
else falsepublic boolean isDocument(java.lang.Object o)
Navigator/.o - the object to testtrue if the object is a document node,
else falsepublic boolean isElement(java.lang.Object o)
Navigatoro - the object to testtrue if the object is an element node,
else falsepublic boolean isNamespace(java.lang.Object o)
Navigatoro - the object to testtrue if the object is a namespace node,
else falsepublic boolean isProcessingInstruction(java.lang.Object o)
Navigatoro - the object to testtrue if the object is a processing-instruction node,
else falsepublic boolean isText(java.lang.Object o)
Navigatoro - the object to testtrue if the object is a text node,
else falsepublic java.lang.String getAttributeName(java.lang.Object o)
Navigatoro - the context attribute nodepublic java.lang.String getAttributeNamespaceUri(java.lang.Object o)
Navigatoro - the context attribute nodepublic java.lang.String getAttributeQName(java.lang.Object o)
Navigatoro - the context attribute nodepublic java.lang.String getAttributeStringValue(java.lang.Object o)
Navigatoro - the attribute nodepublic java.lang.String getCommentStringValue(java.lang.Object o)
Navigatoro - the comment nodepublic java.lang.String getElementName(java.lang.Object o)
Navigatoro - the context element nodepublic java.lang.String getElementNamespaceUri(java.lang.Object o)
Navigatoro - the context element nodepublic java.lang.String getElementQName(java.lang.Object o)
Navigatoro - the context element nodepublic java.lang.String getElementStringValue(java.lang.Object o)
Navigatoro - the comment node.public java.lang.String getNamespacePrefix(java.lang.Object o)
Navigatoro - the namespace nodepublic java.lang.String getNamespaceStringValue(java.lang.Object o)
Navigatoro - the namespace nodepublic java.lang.String getTextStringValue(java.lang.Object o)
Navigatoro - the text nodepublic java.lang.Object getDocument(java.lang.String s)
throws FunctionCallException
DefaultNavigatorgetDocument in interface NavigatorgetDocument in class DefaultNavigators - the URL of the document to loadFunctionCallException - if an error occurs while loading the
URL; e.g. an I/O error or the document is malformedpublic java.lang.Object getDocumentNode(java.lang.Object o)
NavigatorgetDocumentNode in interface NavigatorgetDocumentNode in class DefaultNavigatoro - the context nodeNavigator.isDocument(Object)public java.util.Iterator getAttributeAxisIterator(java.lang.Object o)
DefaultNavigatorUnsupportedAxisException. Subclasses that
support the attribute axis must override this method.getAttributeAxisIterator in interface NavigatorgetAttributeAxisIterator in class DefaultNavigatoro - the original context nodepublic java.util.Iterator getChildAxisIterator(java.lang.Object o)
DefaultNavigatorUnsupportedAxisExceptiongetChildAxisIterator in interface NavigatorgetChildAxisIterator in class DefaultNavigatoro - the original context nodepublic java.util.Iterator getParentAxisIterator(java.lang.Object o)
DefaultNavigatorUnsupportedAxisExceptiongetParentAxisIterator in interface NavigatorgetParentAxisIterator in class DefaultNavigatoro - the original context nodepublic java.lang.Object getParentNode(java.lang.Object o)
DefaultNavigatorgetParentNode in interface NavigatorgetParentNode in class DefaultNavigatoro - the node whose parent to returnNavigator.isDocument(java.lang.Object),
Navigator.isElement(java.lang.Object)public java.util.Iterator getPrecedingAxisIterator(java.lang.Object o)
throws UnsupportedAxisException
NavigatorIterator matching the preceding XPath axis.getPrecedingAxisIterator in interface NavigatorgetPrecedingAxisIterator in class DefaultNavigatoro - the original context nodeUnsupportedAxisException - if the semantics of the preceding axis are
not supported by this object modelpublic java.util.Iterator getPrecedingSiblingAxisIterator(java.lang.Object o)
throws UnsupportedAxisException
NavigatorIterator matching the
preceding-sibling XPath axis.getPrecedingSiblingAxisIterator in interface NavigatorgetPrecedingSiblingAxisIterator in class DefaultNavigatoro - the original context nodeUnsupportedAxisException - if the semantics of the preceding-sibling axis are
not supported by this object modelpublic java.lang.String getProcessingInstructionData(java.lang.Object o)
NavigatorgetProcessingInstructionData in interface NavigatorgetProcessingInstructionData in class DefaultNavigatoro - the context processing-instruction nodepublic java.lang.String getProcessingInstructionTarget(java.lang.Object o)
NavigatorgetProcessingInstructionTarget in interface NavigatorgetProcessingInstructionTarget in class DefaultNavigatoro - the context processing-instruction nodepublic java.lang.String translateNamespacePrefixToUri(java.lang.String s,
java.lang.Object o)
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 NavigatortranslateNamespacePrefixToUri in class DefaultNavigators - the prefix to translateo - the element to consider during translationNamespaceContextpublic XPath parseXPath(java.lang.String s) throws SAXPathException
Navigators - the XPath expressionSAXPathException - if the string is not a syntactically
correct XPath expressionXPathpublic java.util.Iterator getNamespaceAxisIterator(java.lang.Object o)
DefaultNavigatorUnsupportedAxisException. Subclasses that
support the namespace axis must override this method.getNamespaceAxisIterator in interface NavigatorgetNamespaceAxisIterator in class DefaultNavigatoro - the original context nodeCopyright © 2001–2018 Codehaus. All rights reserved.