Package org.jaxen.dom4j
Class DocumentNavigator
java.lang.Object
org.jaxen.DefaultNavigator
org.jaxen.dom4j.DocumentNavigator
- All Implemented Interfaces:
Serializable
,org.jaxen.NamedAccessNavigator
,org.jaxen.Navigator
public class DocumentNavigator
extends org.jaxen.DefaultNavigator
implements org.jaxen.NamedAccessNavigator
Interface for navigating around the DOM4J object model.
This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.
- Author:
- bob mcwhirter, Stephen Colebourne
- See Also:
-
XPath
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeAxisIterator
(Object contextNode) getAttributeAxisIterator
(Object contextNode, String localName, String namespacePrefix, String namespaceURI) Retrieves anIterator
over the attribute elements that match the supplied name.getAttributeName
(Object obj) getAttributeQName
(Object obj) getChildAxisIterator
(Object contextNode) getChildAxisIterator
(Object contextNode, String localName, String namespacePrefix, String namespaceURI) Retrieves anIterator
over the child elements that match the supplied name.getDocument
(String uri) getDocumentNode
(Object contextNode) getElementName
(Object obj) getElementQName
(Object obj) static org.jaxen.Navigator
Retrieve the singleton instance of thisDocumentNavigator
.getNamespaceAxisIterator
(Object contextNode) getNamespacePrefix
(Object obj) short
getNodeType
(Object node) getParentAxisIterator
(Object contextNode) getParentNode
(Object contextNode) getTextStringValue
(Object obj) boolean
isAttribute
(Object obj) boolean
boolean
isDocument
(Object obj) boolean
boolean
isNamespace
(Object obj) boolean
boolean
org.jaxen.XPath
parseXPath
(String xpath) Returns a parsed form of the given XPath string, which will be suitable for queries on DOM4J documents.void
setSAXReader
(SAXReader reader) translateNamespacePrefixToUri
(String prefix, Object context) Methods inherited from class org.jaxen.DefaultNavigator
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getElementById, getFollowingAxisIterator, getFollowingSiblingAxisIterator, getPrecedingAxisIterator, getPrecedingSiblingAxisIterator, getSelfAxisIterator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jaxen.Navigator
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getElementById, getFollowingAxisIterator, getFollowingSiblingAxisIterator, getPrecedingAxisIterator, getPrecedingSiblingAxisIterator, getSelfAxisIterator
-
Constructor Details
-
DocumentNavigator
public DocumentNavigator()
-
-
Method Details
-
getInstance
public static org.jaxen.Navigator getInstance()Retrieve the singleton instance of thisDocumentNavigator
. -
isElement
- Specified by:
isElement
in interfaceorg.jaxen.Navigator
-
isComment
- Specified by:
isComment
in interfaceorg.jaxen.Navigator
-
isText
- Specified by:
isText
in interfaceorg.jaxen.Navigator
-
isAttribute
- Specified by:
isAttribute
in interfaceorg.jaxen.Navigator
-
isProcessingInstruction
- Specified by:
isProcessingInstruction
in interfaceorg.jaxen.Navigator
-
isDocument
- Specified by:
isDocument
in interfaceorg.jaxen.Navigator
-
isNamespace
- Specified by:
isNamespace
in interfaceorg.jaxen.Navigator
-
getElementName
- Specified by:
getElementName
in interfaceorg.jaxen.Navigator
-
getElementNamespaceUri
- Specified by:
getElementNamespaceUri
in interfaceorg.jaxen.Navigator
-
getElementQName
- Specified by:
getElementQName
in interfaceorg.jaxen.Navigator
-
getAttributeName
- Specified by:
getAttributeName
in interfaceorg.jaxen.Navigator
-
getAttributeNamespaceUri
- Specified by:
getAttributeNamespaceUri
in interfaceorg.jaxen.Navigator
-
getAttributeQName
- Specified by:
getAttributeQName
in interfaceorg.jaxen.Navigator
-
getChildAxisIterator
- Specified by:
getChildAxisIterator
in interfaceorg.jaxen.Navigator
- Overrides:
getChildAxisIterator
in classorg.jaxen.DefaultNavigator
-
getChildAxisIterator
public Iterator getChildAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI) Retrieves anIterator
over the child elements that match the supplied name.- Specified by:
getChildAxisIterator
in interfaceorg.jaxen.NamedAccessNavigator
- Parameters:
contextNode
- the origin context nodelocalName
- the local name of the children to return, always presentnamespacePrefix
- the prefix of the namespace of the children to returnnamespaceURI
- the uri of the namespace of the children to return- Returns:
- an Iterator that traverses the named children, or null if none
-
getParentAxisIterator
- Specified by:
getParentAxisIterator
in interfaceorg.jaxen.Navigator
- Overrides:
getParentAxisIterator
in classorg.jaxen.DefaultNavigator
-
getAttributeAxisIterator
- Specified by:
getAttributeAxisIterator
in interfaceorg.jaxen.Navigator
- Overrides:
getAttributeAxisIterator
in classorg.jaxen.DefaultNavigator
-
getAttributeAxisIterator
public Iterator getAttributeAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI) Retrieves anIterator
over the attribute elements that match the supplied name.- Specified by:
getAttributeAxisIterator
in interfaceorg.jaxen.NamedAccessNavigator
- Parameters:
contextNode
- the origin context nodelocalName
- the local name of the attributes to return, always presentnamespacePrefix
- the prefix of the namespace of the attributes to returnnamespaceURI
- the URI of the namespace of the attributes to return- Returns:
- an Iterator that traverses the named attributes, not null
-
getNamespaceAxisIterator
- Specified by:
getNamespaceAxisIterator
in interfaceorg.jaxen.Navigator
- Overrides:
getNamespaceAxisIterator
in classorg.jaxen.DefaultNavigator
-
getDocumentNode
- Specified by:
getDocumentNode
in interfaceorg.jaxen.Navigator
- Overrides:
getDocumentNode
in classorg.jaxen.DefaultNavigator
-
parseXPath
Returns a parsed form of the given XPath string, which will be suitable for queries on DOM4J documents.- Specified by:
parseXPath
in interfaceorg.jaxen.Navigator
- Throws:
org.jaxen.saxpath.SAXPathException
-
getParentNode
- Specified by:
getParentNode
in interfaceorg.jaxen.Navigator
- Overrides:
getParentNode
in classorg.jaxen.DefaultNavigator
-
getTextStringValue
- Specified by:
getTextStringValue
in interfaceorg.jaxen.Navigator
-
getElementStringValue
- Specified by:
getElementStringValue
in interfaceorg.jaxen.Navigator
-
getAttributeStringValue
- Specified by:
getAttributeStringValue
in interfaceorg.jaxen.Navigator
-
getNamespaceStringValue
- Specified by:
getNamespaceStringValue
in interfaceorg.jaxen.Navigator
-
getNamespacePrefix
- Specified by:
getNamespacePrefix
in interfaceorg.jaxen.Navigator
-
getCommentStringValue
- Specified by:
getCommentStringValue
in interfaceorg.jaxen.Navigator
-
translateNamespacePrefixToUri
- Specified by:
translateNamespacePrefixToUri
in interfaceorg.jaxen.Navigator
- Overrides:
translateNamespacePrefixToUri
in classorg.jaxen.DefaultNavigator
-
getNodeType
- Specified by:
getNodeType
in interfaceorg.jaxen.Navigator
- Overrides:
getNodeType
in classorg.jaxen.DefaultNavigator
-
getDocument
- Specified by:
getDocument
in interfaceorg.jaxen.Navigator
- Overrides:
getDocument
in classorg.jaxen.DefaultNavigator
- Throws:
org.jaxen.FunctionCallException
-
getProcessingInstructionTarget
- Specified by:
getProcessingInstructionTarget
in interfaceorg.jaxen.Navigator
- Overrides:
getProcessingInstructionTarget
in classorg.jaxen.DefaultNavigator
-
getProcessingInstructionData
- Specified by:
getProcessingInstructionData
in interfaceorg.jaxen.Navigator
- Overrides:
getProcessingInstructionData
in classorg.jaxen.DefaultNavigator
-
getSAXReader
-
setSAXReader
-