|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaxen.DefaultNavigator
org.jaxen.dom4j.DocumentNavigator
Interface for navigating around the EXML object model.
This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.
XPath,
Serialized Form| Nested Class Summary | |
private static class |
DocumentNavigator.Singleton
Singleton implementation. |
| Field Summary | |
private org.dom4j.io.SAXReader |
reader
|
| Constructor Summary | |
DocumentNavigator()
|
|
| Method Summary | |
java.util.Iterator |
getAttributeAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.lang.String |
getAttributeName(java.lang.Object obj)
Retrieve the name of the given attribute node. |
java.lang.String |
getAttributeNamespaceUri(java.lang.Object obj)
Retrieve the namespace URI of the given attribute node. |
java.lang.String |
getAttributeQName(java.lang.Object obj)
Retrieve the QName of the given attribute node. |
java.lang.String |
getAttributeStringValue(java.lang.Object obj)
Retrieve the string-value of an attribute node. |
java.util.Iterator |
getChildAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.lang.String |
getCommentStringValue(java.lang.Object obj)
Retrieve the string-value of a comment node. |
java.lang.Object |
getDocument(java.lang.String uri)
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.String |
getElementName(java.lang.Object obj)
Retrieve the name of the given element node. |
java.lang.String |
getElementNamespaceUri(java.lang.Object obj)
Retrieve the namespace URI of the given element node. |
java.lang.String |
getElementQName(java.lang.Object obj)
Retrieve the QName of the given element node. |
java.lang.String |
getElementStringValue(java.lang.Object obj)
Retrieve the string-value of an element node. |
static Navigator |
getInstance()
Retrieve the singleton instance of this DocumentNavigator. |
java.util.Iterator |
getNamespaceAxisIterator(java.lang.Object contextNode)
Throws UnsupportedAxisException |
java.lang.String |
getNamespacePrefix(java.lang.Object obj)
Retrieve the namespace prefix of a namespace node. |
java.lang.String |
getNamespaceStringValue(java.lang.Object obj)
Retrieve the string-value of a namespace node. |
private java.lang.String |
getNodeStringValue(org.dom4j.Node node)
|
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.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. |
org.dom4j.io.SAXReader |
getSAXReader()
|
java.lang.String |
getTextStringValue(java.lang.Object obj)
Retrieve the string-value of a text node. |
boolean |
isAttribute(java.lang.Object obj)
Returns whether the given object is an attribute node. |
boolean |
isComment(java.lang.Object obj)
Returns whether the given object is a comment node. |
boolean |
isDocument(java.lang.Object obj)
Returns whether the given object is a document node. |
boolean |
isElement(java.lang.Object obj)
Returns whether the given object is an element node. |
boolean |
isNamespace(java.lang.Object obj)
Returns whether the given object is a namespace node. |
boolean |
isProcessingInstruction(java.lang.Object obj)
Returns whether the given object is a processing-instruction node. |
boolean |
isText(java.lang.Object obj)
Returns whether the given object is a text node. |
XPath |
parseXPath(java.lang.String xpath)
Returns a parsed form of the given xpath string, which will be suitable for queries on DOM4J documents. |
void |
setSAXReader(org.dom4j.io.SAXReader reader)
|
java.lang.String |
translateNamespacePrefixToUri(java.lang.String prefix,
java.lang.Object context)
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 |
| Field Detail |
private transient org.dom4j.io.SAXReader reader
| Constructor Detail |
public DocumentNavigator()
| Method Detail |
public static Navigator getInstance()
DocumentNavigator.
public boolean isElement(java.lang.Object obj)
Navigator
obj - The object to test.
true if the object is an element node,
else falsepublic boolean isComment(java.lang.Object obj)
Navigator
obj - The object to test.
true if the object is a comment node,
else falsepublic boolean isText(java.lang.Object obj)
Navigator
obj - The object to test.
true if the object is a text node,
else falsepublic boolean isAttribute(java.lang.Object obj)
Navigator
obj - The object to test.
true if the object is an attribute node,
else falsepublic boolean isProcessingInstruction(java.lang.Object obj)
Navigator
obj - The object to test.
true if the object is a processing-instruction node,
else falsepublic boolean isDocument(java.lang.Object obj)
Navigator/.
obj - The object to test.
true if the object is a document node,
else falsepublic boolean isNamespace(java.lang.Object obj)
Navigator
obj - The object to test.
true if the object is a namespace node,
else falsepublic java.lang.String getElementName(java.lang.Object obj)
Navigator
obj - The context element node.
public java.lang.String getElementNamespaceUri(java.lang.Object obj)
Navigator
obj - The context element node.
public java.lang.String getElementQName(java.lang.Object obj)
Navigator
obj - The context element node.
public java.lang.String getAttributeName(java.lang.Object obj)
Navigator
obj - The context attribute node.
public java.lang.String getAttributeNamespaceUri(java.lang.Object obj)
Navigator
obj - The context attribute node.
public java.lang.String getAttributeQName(java.lang.Object obj)
Navigator
obj - The context attribute node.
public java.util.Iterator getChildAxisIterator(java.lang.Object contextNode)
DefaultNavigatorUnsupportedAxisException
getChildAxisIterator in interface NavigatorgetChildAxisIterator in class DefaultNavigatorpublic java.util.Iterator getParentAxisIterator(java.lang.Object contextNode)
DefaultNavigatorUnsupportedAxisException
getParentAxisIterator in interface NavigatorgetParentAxisIterator in class DefaultNavigatorpublic java.util.Iterator getAttributeAxisIterator(java.lang.Object contextNode)
DefaultNavigatorUnsupportedAxisException
getAttributeAxisIterator in interface NavigatorgetAttributeAxisIterator in class DefaultNavigatorpublic java.util.Iterator getNamespaceAxisIterator(java.lang.Object contextNode)
DefaultNavigatorUnsupportedAxisException
getNamespaceAxisIterator in interface NavigatorgetNamespaceAxisIterator in class DefaultNavigatorpublic java.lang.Object getDocumentNode(java.lang.Object contextNode)
Navigator
getDocumentNode in interface NavigatorgetDocumentNode in class DefaultNavigator
public XPath parseXPath(java.lang.String xpath)
throws SAXPathException
xpath - The xpath expression.
SAXPathException - If an error occurs while parsing the
xpath expression.XPathpublic java.lang.Object getParentNode(java.lang.Object contextNode)
NavigatorThe parent of any node must either be a document node or an element node.
getParentNode in interface NavigatorgetParentNode in class DefaultNavigatorpublic java.lang.String getTextStringValue(java.lang.Object obj)
Navigator
obj - The text node.
public java.lang.String getElementStringValue(java.lang.Object obj)
Navigator
obj - The comment node.
public java.lang.String getAttributeStringValue(java.lang.Object obj)
Navigator
obj - The attribute node.
private java.lang.String getNodeStringValue(org.dom4j.Node node)
public java.lang.String getNamespaceStringValue(java.lang.Object obj)
Navigator
obj - The namespace node.
public java.lang.String getNamespacePrefix(java.lang.Object obj)
Navigator
obj - The namespace node.
public java.lang.String getCommentStringValue(java.lang.Object obj)
Navigator
obj - The comment node.
public java.lang.String translateNamespacePrefixToUri(java.lang.String prefix,
java.lang.Object context)
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 DefaultNavigatorpublic short getNodeType(java.lang.Object node)
Navigator
getNodeType in interface NavigatorgetNodeType in class DefaultNavigator
public java.lang.Object getDocument(java.lang.String uri)
throws FunctionCallException
Navigator
getDocument in interface NavigatorgetDocument in class DefaultNavigatorFunctionCallExceptionpublic java.lang.String getProcessingInstructionTarget(java.lang.Object obj)
Navigator
getProcessingInstructionTarget in interface NavigatorgetProcessingInstructionTarget in class DefaultNavigatorpublic java.lang.String getProcessingInstructionData(java.lang.Object obj)
Navigator
getProcessingInstructionData in interface NavigatorgetProcessingInstructionData in class DefaultNavigatorpublic org.dom4j.io.SAXReader getSAXReader()
public void setSAXReader(org.dom4j.io.SAXReader reader)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||