public abstract class DefaultNavigator extends Object implements Navigator
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.
| コンストラクタと説明 |
|---|
DefaultNavigator() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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)
Default implementation that always returns null.
|
Object |
getDocumentNode(Object contextNode)
Returns the document node that contains the given context node.
|
Object |
getElementById(Object contextNode,
String elementId)
Default implementation that cannot find elements.
|
Iterator |
getFollowingAxisIterator(Object contextNode)
Retrieve an
Iterator matching the following
XPath axis. |
Iterator |
getFollowingSiblingAxisIterator(Object contextNode)
Retrieve an
Iterator matching the
following-sibling XPath axis. |
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)
Default inefficient implementation.
|
Iterator |
getPrecedingAxisIterator(Object contextNode)
Retrieve an
Iterator matching the preceding XPath axis. |
Iterator |
getPrecedingSiblingAxisIterator(Object contextNode)
Retrieve an
Iterator matching the
preceding-sibling XPath axis. |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttributeName, getAttributeNamespaceUri, getAttributeQName, getAttributeStringValue, getCommentStringValue, getElementName, getElementNamespaceUri, getElementQName, getElementStringValue, getNamespacePrefix, getNamespaceStringValue, getTextStringValue, isAttribute, isComment, isDocument, isElement, isNamespace, isProcessingInstruction, isText, parseXPathpublic Iterator getChildAxisIterator(Object contextNode) throws UnsupportedAxisException
UnsupportedAxisExceptiongetChildAxisIterator インタフェース内 NavigatorcontextNode - UnsupportedAxisException - alwayspublic Iterator getDescendantAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the descendant
XPath axis.getDescendantAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the desscendant axis are
not supported by this object modelpublic Iterator getParentAxisIterator(Object contextNode) throws UnsupportedAxisException
UnsupportedAxisExceptiongetParentAxisIterator インタフェース内 NavigatorcontextNode - UnsupportedAxisExceptionpublic Iterator getAncestorAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the ancestor
XPath axis.getAncestorAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the ancestor axis are
not supported by this object modelpublic Iterator getFollowingSiblingAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the
following-sibling XPath axis.getFollowingSiblingAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the following-sibling axis are
not supported by this object modelpublic Iterator getPrecedingSiblingAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the
preceding-sibling XPath axis.getPrecedingSiblingAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the preceding-sibling axis are
not supported by this object modelpublic Iterator getFollowingAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the following
XPath axis.getFollowingAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the following axis are
not supported by this object modelpublic Iterator getPrecedingAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the preceding XPath axis.getPrecedingAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the preceding axis are
not supported by this object modelpublic Iterator getAttributeAxisIterator(Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException. Subclasses that
support the attribute axis must override this method.getAttributeAxisIterator インタフェース内 NavigatorcontextNode - UnsupportedAxisExceptionpublic Iterator getNamespaceAxisIterator(Object contextNode) throws UnsupportedAxisException
UnsupportedAxisException. Subclasses that
support the namespace axis must override this method.getNamespaceAxisIterator インタフェース内 NavigatorcontextNode - UnsupportedAxisExceptionpublic Iterator getSelfAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the self XPath
axis.getSelfAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the self axis are
not supported by this object modelpublic Iterator getDescendantOrSelfAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the
descendant-or-self XPath axis.getDescendantOrSelfAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the descendant-or-self axis are
not supported by this object modelpublic Iterator getAncestorOrSelfAxisIterator(Object contextNode) throws UnsupportedAxisException
NavigatorIterator matching the
ancestor-or-self XPath axis.getAncestorOrSelfAxisIterator インタフェース内 NavigatorcontextNode - the original context nodeUnsupportedAxisException - if the semantics of the ancestor-or-self axis are
not supported by this object modelpublic Object getDocumentNode(Object contextNode)
NavigatorgetDocumentNode インタフェース内 NavigatorcontextNode - the context nodeNavigator.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 インタフェース内 Navigatorprefix - the prefix to translateelement - the element to consider during translationNamespaceContextpublic String getProcessingInstructionTarget(Object obj)
NavigatorgetProcessingInstructionTarget インタフェース内 Navigatorobj - the context processing-instruction nodepublic String getProcessingInstructionData(Object obj)
NavigatorgetProcessingInstructionData インタフェース内 Navigatorobj - the context processing-instruction nodepublic short getNodeType(Object node)
NavigatorgetNodeType インタフェース内 Navigatornode - ????Patternpublic Object getParentNode(Object contextNode) throws UnsupportedAxisException
getParentNode インタフェース内 NavigatorcontextNode - the node whose parent to returnUnsupportedAxisException - if the parent axis is not supportedNavigator.isDocument(java.lang.Object),
Navigator.isElement(java.lang.Object)public Object getDocument(String url) throws FunctionCallException
getDocument インタフェース内 Navigatorurl - the URL of the document to loadFunctionCallException - if an error occurs while loading the
URL; e.g. an I/O error or the document is malformedpublic Object getElementById(Object contextNode, String elementId)
getElementById インタフェース内 NavigatorcontextNode - a node from the document in which to look for the
idelementId - id to look forCopyright © 2001-2013 Codehaus. All Rights Reserved.