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