|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.jaxen.DefaultNavigator
Default implementation of Navigator.
This implementation is an abstract class, since some required operations cannot be implemented without additional knowledge of the object model.
When possible, default method implementations build upon each other, to reduce the number of methods required to be implemented for each object model. All methods, of course, may be overridden, to provide more-efficient implementations.
| Constructor Summary | |
DefaultNavigator()
|
|
| Method Summary | |
Iterator |
getAncestorAxisIterator(Object contextNode)
Retrieve an Iterator matching the ancestor
xpath axis. |
Iterator |
getAncestorOrSelfAxisIterator(Object contextNode)
Retrieve an Iterator matching the
ancestor-or-self xpath axis. |
Iterator |
getAttributeAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
Iterator |
getChildAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
Iterator |
getDescendantAxisIterator(Object contextNode)
Retrieve an Iterator matching the descendant
xpath axis. |
Iterator |
getDescendantOrSelfAxisIterator(Object contextNode)
Retrieve an Iterator matching the
descendant-or-self xpath axis. |
Object |
getDocument(String url)
Loads a document from the given URI |
Object |
getDocumentNode(Object contextNode)
Returns the document node that contains the given context node. |
Object |
getElementById(Object object,
String elementId)
Default implementation that can not find elements. |
Iterator |
getFollowingAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
Iterator |
getFollowingSiblingAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
Iterator |
getNamespaceAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
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. |
Iterator |
getPrecedingAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
Iterator |
getPrecedingSiblingAxisIterator(Object contextNode)
Throws UnsupportedAxisException |
String |
getProcessingInstructionData(Object obj)
Retrieve the data of a processing-instruction. |
String |
getProcessingInstructionTarget(Object obj)
Retrieve the target of a processing-instruction. |
Iterator |
getSelfAxisIterator(Object contextNode)
Retrieve an Iterator matching the self xpath
axis. |
String |
translateNamespacePrefixToUri(String prefix,
Object element)
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 DefaultNavigator()
| Method Detail |
public Iterator getChildAxisIterator(Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetChildAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getDescendantAxisIterator(Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the descendant
xpath axis.getDescendantAxisIterator in interface Navigatororg.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)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetParentAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getAncestorAxisIterator(Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the ancestor
xpath axis.getAncestorAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getFollowingSiblingAxisIterator(Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetFollowingSiblingAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getPrecedingSiblingAxisIterator(Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetPrecedingSiblingAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getFollowingAxisIterator(Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetFollowingAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getPrecedingAxisIterator(Object contextNode)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetPrecedingAxisIterator in interface Navigatororg.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)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetAttributeAxisIterator in interface Navigatororg.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)
throws UnsupportedAxisException
UnsupportedAxisExceptiongetNamespaceAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getSelfAxisIterator(Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the self xpath
axis.getSelfAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getDescendantOrSelfAxisIterator(Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the
descendant-or-self xpath axis.getDescendantOrSelfAxisIterator in interface Navigatororg.jaxen.NavigatorcontextNode - The origin context node.UnsupportedAxisException - is the semantics of this axis are
not supported by this object model.
public Iterator getAncestorOrSelfAxisIterator(Object contextNode)
throws UnsupportedAxisException
NavigatorIterator matching the
ancestor-or-self xpath axis.getAncestorOrSelfAxisIterator in interface Navigatororg.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 interface Navigatororg.jaxen.Navigatorobject - The context node.Navigator.isDocument(Object)
public String translateNamespacePrefixToUri(String prefix,
Object element)
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 Navigatororg.jaxen.Navigatorprefix - The prefix to translate.element - The element to consider during translation.NamespaceContextpublic String getProcessingInstructionTarget(Object obj)
NavigatorgetProcessingInstructionTarget in interface Navigatororg.jaxen.Navigatorpi - The context processing-instruction node.public String getProcessingInstructionData(Object obj)
NavigatorgetProcessingInstructionData in interface Navigatororg.jaxen.Navigatorpi - The context processing-instruction node.public short getNodeType(Object node)
NavigatorgetNodeType in interface Navigatororg.jaxen.NavigatorPattern
public Object getParentNode(Object contextNode)
throws UnsupportedAxisException
NavigatorThe parent of any node must either be a document node or an element node.
getParentNode in interface Navigatororg.jaxen.Navigatorobject - The context node.Navigator.isDocument(java.lang.Object),
Navigator.isElement(java.lang.Object)
public Object getDocument(String url)
throws FunctionCallException
NavigatorgetDocument in interface Navigatororg.jaxen.Navigatoruri - is the URI of the document to loadFunctionCallException - if the document could not be loaded
public Object getElementById(Object object,
String elementId)
getElementById in interface NavigatorcontextNode - a node from the document in which to look for the
idelementId - id to look for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||