|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaxen.DefaultNavigator
org.apache.axiom.om.xpath.DocumentNavigator
public class DocumentNavigator
| Constructor Summary | |
|---|---|
DocumentNavigator()
|
|
| Method Summary | |
|---|---|
java.util.Iterator |
getAncestorAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the ancestor XPath axis. |
java.util.Iterator |
getAncestorOrSelfAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the ancestor-or-self XPath axis. |
java.util.Iterator |
getAttributeAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the attribute XPath axis. |
java.lang.String |
getAttributeName(java.lang.Object object)
Retrieves the name of the given attribute node. |
java.lang.String |
getAttributeNamespaceUri(java.lang.Object object)
Retrieves the namespace URI of the given attribute node. |
java.lang.String |
getAttributeQName(java.lang.Object object)
Retrieves the QName of the given attribute node. |
java.lang.String |
getAttributeStringValue(java.lang.Object object)
Retrieves the string-value of an attribute node. |
java.util.Iterator |
getChildAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the child XPath axis. |
java.lang.String |
getCommentStringValue(java.lang.Object object)
Retrieves the string-value of a comment node. |
java.util.Iterator |
getDescendantAxisIterator(java.lang.Object object)
|
java.util.Iterator |
getDescendantOrSelfAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the descendant-or-self XPath axis. |
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.Object |
getElementById(java.lang.Object contextNode,
java.lang.String elementId)
Returns the element whose ID is given by elementId. |
java.lang.String |
getElementName(java.lang.Object object)
Retrieves the name of the given element node. |
java.lang.String |
getElementNamespaceUri(java.lang.Object object)
Retrieves the namespace URI of the given element node. |
java.lang.String |
getElementQName(java.lang.Object object)
Retrieves the QName of the given element node. |
java.lang.String |
getElementStringValue(java.lang.Object object)
Retrieves the string-value of an element node. |
java.util.Iterator |
getFollowingAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the following XPath axis. |
java.util.Iterator |
getFollowingSiblingAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the following-sibling XPath axis. |
java.util.Iterator |
getNamespaceAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the namespace XPath axis. |
java.lang.String |
getNamespacePrefix(java.lang.Object object)
Retrieves the namespace prefix of a namespace node. |
java.lang.String |
getNamespaceStringValue(java.lang.Object object)
Retrieves the string-value of a namespace 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)
Retrieves an Iterator matching the parent XPath axis. |
java.lang.Object |
getParentNode(java.lang.Object contextNode)
Returns the parent of the given context node. |
java.util.Iterator |
getPrecedingAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the preceding XPath axis. |
java.util.Iterator |
getPrecedingSiblingAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the preceding-sibling XPath axis. |
java.lang.String |
getProcessingInstructionData(java.lang.Object object)
Retrieves the data of a processing-instruction. |
java.lang.String |
getProcessingInstructionTarget(java.lang.Object object)
Retrieves the target of a processing-instruction. |
java.util.Iterator |
getSelfAxisIterator(java.lang.Object contextNode)
Retrieves an Iterator matching the self xpath axis. |
java.lang.String |
getTextStringValue(java.lang.Object object)
Retrieve the string-value of a text node. |
boolean |
isAttribute(java.lang.Object object)
Returns whether the given object is an attribute node. |
boolean |
isComment(java.lang.Object object)
Returns whether the given object is a comment node. |
boolean |
isDocument(java.lang.Object object)
Returns whether the given object is a document node. |
boolean |
isElement(java.lang.Object object)
Returns whether the given object is an element node. |
boolean |
isNamespace(java.lang.Object object)
Returns whether the given object is a namespace node. |
boolean |
isProcessingInstruction(java.lang.Object object)
Returns whether the given object is a processing-instruction node. |
boolean |
isText(java.lang.Object object)
Returns whether the given object is a text node. |
org.jaxen.XPath |
parseXPath(java.lang.String xpath)
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 prefix,
java.lang.Object element)
Translates 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 org.jaxen.XPath parseXPath(java.lang.String xpath)
throws org.jaxen.saxpath.SAXPathException
xpath - the XPath expression
org.jaxen.saxpath.SAXPathException - if the string is not a syntactically correct XPath expressionXPathpublic java.lang.String getElementNamespaceUri(java.lang.Object object)
object - the context element node
public java.lang.String getElementName(java.lang.Object object)
object - the context element node
public java.lang.String getElementQName(java.lang.Object object)
object - the context element node
public java.lang.String getAttributeNamespaceUri(java.lang.Object object)
object - the context attribute node
public java.lang.String getAttributeName(java.lang.Object object)
object - the context attribute node
public java.lang.String getAttributeQName(java.lang.Object object)
object - the context attribute node
public boolean isDocument(java.lang.Object object)
/.
object - the object to test
true if the object is a document node, else false
.public boolean isElement(java.lang.Object object)
object - the object to test
true if the object is an element node, else false
.public boolean isAttribute(java.lang.Object object)
object - the object to test
true if the object is an attribute node, else false
.public boolean isNamespace(java.lang.Object object)
object - the object to test
true if the object is a namespace node, else false
.public boolean isComment(java.lang.Object object)
object - the object to test
true if the object is a comment node, else false .public boolean isText(java.lang.Object object)
object - the object to test
true if the object is a text node, else false .public boolean isProcessingInstruction(java.lang.Object object)
object - the object to test
true if the object is a processing-instruction node, else
false .public java.lang.String getCommentStringValue(java.lang.Object object)
object - the comment node
public java.lang.String getElementStringValue(java.lang.Object object)
object - the comment node.
public java.lang.String getAttributeStringValue(java.lang.Object object)
object - the attribute node
public java.lang.String getNamespaceStringValue(java.lang.Object object)
object - the namespace node
public java.lang.String getTextStringValue(java.lang.Object object)
object - the text node
public java.lang.String getNamespacePrefix(java.lang.Object object)
object - the namespace node
public java.util.Iterator getChildAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the child XPath axis.
getChildAxisIterator in interface org.jaxen.NavigatorgetChildAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the child axis are not supported by this
object model
public java.util.Iterator getDescendantAxisIterator(java.lang.Object object)
throws org.jaxen.UnsupportedAxisException
getDescendantAxisIterator in interface org.jaxen.NavigatorgetDescendantAxisIterator in class org.jaxen.DefaultNavigatororg.jaxen.UnsupportedAxisException
public java.util.Iterator getAttributeAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the attribute XPath axis.
getAttributeAxisIterator in interface org.jaxen.NavigatorgetAttributeAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the attribute axis are not supported by
this object model
public java.util.Iterator getNamespaceAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the namespace XPath axis.
getNamespaceAxisIterator in interface org.jaxen.NavigatorgetNamespaceAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the namespace axis are not supported by
this object model
public java.util.Iterator getSelfAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the self xpath axis.
getSelfAxisIterator in interface org.jaxen.NavigatorgetSelfAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the self axis are not supported by this
object model
public java.util.Iterator getDescendantOrSelfAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the descendant-or-self XPath axis.
getDescendantOrSelfAxisIterator in interface org.jaxen.NavigatorgetDescendantOrSelfAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the descendant-or-self axis are not
supported by this object model
public java.util.Iterator getAncestorOrSelfAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the ancestor-or-self XPath axis.
getAncestorOrSelfAxisIterator in interface org.jaxen.NavigatorgetAncestorOrSelfAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the ancestor-or-self axis are not
supported by this object model
public java.util.Iterator getParentAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the parent XPath axis.
getParentAxisIterator in interface org.jaxen.NavigatorgetParentAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the parent axis are not supported by
this object model
public java.util.Iterator getAncestorAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the ancestor XPath axis.
getAncestorAxisIterator in interface org.jaxen.NavigatorgetAncestorAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the ancestor axis are not supported by
this object model
public java.util.Iterator getFollowingSiblingAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the following-sibling XPath axis.
getFollowingSiblingAxisIterator in interface org.jaxen.NavigatorgetFollowingSiblingAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the following-sibling axis are not
supported by this object model
public java.util.Iterator getPrecedingSiblingAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the preceding-sibling XPath axis.
getPrecedingSiblingAxisIterator in interface org.jaxen.NavigatorgetPrecedingSiblingAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the preceding-sibling axis are not
supported by this object model
public java.util.Iterator getFollowingAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the following XPath axis.
getFollowingAxisIterator in interface org.jaxen.NavigatorgetFollowingAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the following axis are not supported by
this object model
public java.util.Iterator getPrecedingAxisIterator(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
Iterator matching the preceding XPath axis.
getPrecedingAxisIterator in interface org.jaxen.NavigatorgetPrecedingAxisIterator in class org.jaxen.DefaultNavigatorcontextNode - the original context node
org.jaxen.UnsupportedAxisException - if the semantics of the preceding axis are not supported by
this object model
public java.lang.Object getDocument(java.lang.String uri)
throws org.jaxen.FunctionCallException
getDocument in interface org.jaxen.NavigatorgetDocument in class org.jaxen.DefaultNavigatoruri - the URI of the document to load
org.jaxen.FunctionCallException - if the document could not be loaded
public java.lang.Object getElementById(java.lang.Object contextNode,
java.lang.String elementId)
getElementById in interface org.jaxen.NavigatorgetElementById in class org.jaxen.DefaultNavigatorcontextNode - a node from the document in which to look for the idelementId - id to look for
public java.lang.Object getDocumentNode(java.lang.Object contextNode)
getDocumentNode in interface org.jaxen.NavigatorgetDocumentNode in class org.jaxen.DefaultNavigatorcontextNode - the context node
isDocument(Object)
public java.lang.String translateNamespacePrefixToUri(java.lang.String prefix,
java.lang.Object element)
translateNamespacePrefixToUri in interface org.jaxen.NavigatortranslateNamespacePrefixToUri in class org.jaxen.DefaultNavigatorprefix - the prefix to translateelement - the element to consider during translation
public java.lang.String getProcessingInstructionTarget(java.lang.Object object)
getProcessingInstructionTarget in interface org.jaxen.NavigatorgetProcessingInstructionTarget in class org.jaxen.DefaultNavigatorobject - the context processing-instruction node
public java.lang.String getProcessingInstructionData(java.lang.Object object)
getProcessingInstructionData in interface org.jaxen.NavigatorgetProcessingInstructionData in class org.jaxen.DefaultNavigatorobject - the context processing-instruction node
public short getNodeType(java.lang.Object node)
getNodeType in interface org.jaxen.NavigatorgetNodeType in class org.jaxen.DefaultNavigatornode - ????
public java.lang.Object getParentNode(java.lang.Object contextNode)
throws org.jaxen.UnsupportedAxisException
getParentNode in interface org.jaxen.NavigatorgetParentNode in class org.jaxen.DefaultNavigatorcontextNode - the context node
org.jaxen.UnsupportedAxisException - if the parent axis is not supported by the modelisDocument(java.lang.Object),
isElement(java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||