|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.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| Constructor Summary | |
DocumentNavigator()
|
|
| Method Summary | |
Iterator |
getAttributeAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
String |
getAttributeName(Object obj)
Retrieve the name of the given attribute node. |
String |
getAttributeNamespaceUri(Object obj)
Retrieve the namespace URI of the given attribute node. |
String |
getAttributeQName(Object obj)
Retrieve the QName of the given attribute node. |
String |
getAttributeStringValue(Object obj)
Retrieve the string-value of an attribute node. |
Iterator |
getChildAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
String |
getCommentStringValue(Object obj)
Retrieve the string-value of a comment node. |
Object |
getDocument(String uri)
Loads a document from the given URI |
Object |
getDocumentNode(Object contextNode)
Returns the document node that contains the given context node. |
String |
getElementName(Object obj)
Retrieve the name of the given element node. |
String |
getElementNamespaceUri(Object obj)
Retrieve the namespace URI of the given element node. |
String |
getElementQName(Object obj)
Retrieve the QName of the given element node. |
String |
getElementStringValue(Object obj)
Retrieve the string-value of an element node. |
static DocumentNavigator |
getInstance()
Retrieve the singleton instance of this DocumentNavigator. |
Iterator |
getNamespaceAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
String |
getNamespacePrefix(Object obj)
Retrieve the namespace prefix of a namespace node. |
String |
getNamespaceStringValue(Object obj)
Retrieve the string-value of a namespace node. |
short |
getNodeType(Object node)
Returns a number that identifies the type of node that the given object represents in this navigator. |
Iterator |
getParentAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
Object |
getParentNode(Object contextNode)
Returns the parent of the given context node. |
String |
getProcessingInstructionData(Object obj)
Retrieve the data of a processing-instruction. |
String |
getProcessingInstructionTarget(Object obj)
Retrieve the target of a processing-instruction. |
org.dom4j.io.SAXReader |
getSAXReader()
|
String |
getTextStringValue(Object obj)
Retrieve the string-value of a text node. |
boolean |
isAttribute(Object obj)
Returns whether the given object is an attribute node. |
boolean |
isComment(Object obj)
Returns whether the given object is a comment node. |
boolean |
isDocument(Object obj)
Returns whether the given object is a document node. |
boolean |
isElement(Object obj)
Returns whether the given object is an element node. |
boolean |
isNamespace(Object obj)
Returns whether the given object is a namespace node. |
boolean |
isProcessingInstruction(Object obj)
Returns whether the given object is a processing-instruction node. |
boolean |
isText(Object obj)
Returns whether the given object is a text node. |
XPath |
parseXPath(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)
|
String |
translateNamespacePrefixToUri(String prefix,
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 |
| Constructor Detail |
public DocumentNavigator()
| Method Detail |
public static DocumentNavigator getInstance()
DocumentNavigator.public boolean isElement(Object obj)
Navigatororg.jaxen.Navigatorobject - The object to test.true if the object is an element node,
else falsepublic boolean isComment(Object obj)
Navigatororg.jaxen.Navigatorobject - The object to test.true if the object is a comment node,
else falsepublic boolean isText(Object obj)
Navigatororg.jaxen.Navigatorobject - The object to test.true if the object is a text node,
else falsepublic boolean isAttribute(Object obj)
Navigatororg.jaxen.Navigatorobject - The object to test.true if the object is an attribute node,
else falsepublic boolean isProcessingInstruction(Object obj)
Navigatororg.jaxen.Navigatorobject - The object to test.true if the object is a processing-instruction node,
else falsepublic boolean isDocument(Object obj)
Navigator/.org.jaxen.Navigatorobject - The object to test.true if the object is a document node,
else falsepublic boolean isNamespace(Object obj)
Navigatororg.jaxen.Navigatorobject - The object to test.true if the object is a namespace node,
else falsepublic String getElementName(Object obj)
Navigatororg.jaxen.Navigatorelement - The context element node.public String getElementNamespaceUri(Object obj)
Navigatororg.jaxen.Navigatorelement - The context element node.public String getElementQName(Object obj)
Navigatororg.jaxen.Navigatorelement - The context element node.public String getAttributeName(Object obj)
Navigatororg.jaxen.Navigatorelement - The context attribute node.public String getAttributeNamespaceUri(Object obj)
Navigatororg.jaxen.Navigatorelement - The context attribute node.public String getAttributeQName(Object obj)
Navigatororg.jaxen.Navigatorelement - The context attribute node.public Iterator getChildAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisExceptiongetChildAxisIterator in class DefaultNavigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.public Iterator getParentAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisExceptiongetParentAxisIterator in class DefaultNavigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.public Iterator getAttributeAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisExceptiongetAttributeAxisIterator in class DefaultNavigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.public Iterator getNamespaceAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisExceptiongetNamespaceAxisIterator in class DefaultNavigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.public Object getDocumentNode(Object contextNode)
NavigatorgetDocumentNode in class DefaultNavigatororg.jaxen.Navigatorobject - The context node.Navigator.isDocument(Object)
public XPath parseXPath(String xpath)
throws org.saxpath.SAXPathException
org.jaxen.Navigatorxpath - The xpath expression.XPathpublic Object getParentNode(Object contextNode)
NavigatorThe parent of any node must either be a document node or an element node.
getParentNode in class DefaultNavigatororg.jaxen.Navigatorobject - The context node.Navigator.isDocument(java.lang.Object),
Navigator.isElement(java.lang.Object)public String getTextStringValue(Object obj)
Navigatororg.jaxen.Navigatorattr - The text node.public String getElementStringValue(Object obj)
Navigatororg.jaxen.Navigatorelement - The comment node.public String getAttributeStringValue(Object obj)
Navigatororg.jaxen.Navigatorattr - The attribute node.public String getNamespaceStringValue(Object obj)
Navigatororg.jaxen.Navigatorattr - The namespace node.public String getNamespacePrefix(Object obj)
Navigatororg.jaxen.Navigatorns - The namespace node.public String getCommentStringValue(Object obj)
Navigatororg.jaxen.Navigatorcomment - The comment node.
public String translateNamespacePrefixToUri(String prefix,
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 class DefaultNavigatororg.jaxen.Navigatorprefix - The prefix to translate.element - The element to consider during translation.NamespaceContextpublic short getNodeType(Object node)
NavigatorgetNodeType in class DefaultNavigatororg.jaxen.NavigatorPattern
public Object getDocument(String uri)
throws FunctionCallException
NavigatorgetDocument in class DefaultNavigatororg.jaxen.Navigatoruri - is the URI of the document to loadFunctionCallException - if the document could not be loadedpublic String getProcessingInstructionTarget(Object obj)
NavigatorgetProcessingInstructionTarget in class DefaultNavigatororg.jaxen.Navigatorpi - The context processing-instruction node.public String getProcessingInstructionData(Object obj)
NavigatorgetProcessingInstructionData in class DefaultNavigatororg.jaxen.Navigatorpi - The context processing-instruction node.public org.dom4j.io.SAXReader getSAXReader()
public void setSAXReader(org.dom4j.io.SAXReader reader)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||