public class DocumentNavigator extends DefaultNavigator implements NamedAccessNavigator
This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.
XPath,
直列化された形式| コンストラクタと説明 |
|---|
DocumentNavigator() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
Iterator |
getAttributeAxisIterator(Object contextNode)
Throws
UnsupportedAxisException. |
Iterator |
getAttributeAxisIterator(Object contextNode,
String localName,
String namespacePrefix,
String namespaceURI)
Retrieves an
Iterator over the attribute elements that
match the supplied name. |
String |
getAttributeName(Object obj)
Retrieve the local 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 qualified name of the given attribute node.
|
String |
getAttributeStringValue(Object obj)
Retrieve the string-value of an attribute node.
|
Iterator |
getChildAxisIterator(Object contextNode)
Throws
UnsupportedAxisException |
Iterator |
getChildAxisIterator(Object contextNode,
String localName,
String namespacePrefix,
String namespaceURI)
Retrieves an
Iterator over the child elements that
match the supplied name. |
String |
getCommentStringValue(Object obj)
Retrieve the string-value of a comment node.
|
Object |
getDocument(String uri)
Default implementation that always returns null.
|
Object |
getDocumentNode(Object contextNode)
Returns the document node that contains the given context node.
|
String |
getElementName(Object obj)
Retrieve the local 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 qualified name of the given element node.
|
String |
getElementStringValue(Object obj)
Retrieve the string-value of an element node.
|
static Navigator |
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)
Default inefficient implementation.
|
String |
getProcessingInstructionData(Object obj)
Retrieve the data of a processing-instruction.
|
String |
getProcessingInstructionTarget(Object obj)
Retrieve the target of a processing-instruction.
|
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.
|
protected String |
javacase(String name) |
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 context)
Translate a namespace prefix to a namespace URI, possibly
considering a particular element node.
|
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getElementById, getFollowingAxisIterator, getFollowingSiblingAxisIterator, getPrecedingAxisIterator, getPrecedingSiblingAxisIterator, getSelfAxisIteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getElementById, getFollowingAxisIterator, getFollowingSiblingAxisIterator, getPrecedingAxisIterator, getPrecedingSiblingAxisIterator, getSelfAxisIteratorpublic static Navigator getInstance()
DocumentNavigator.public boolean isElement(Object obj)
Navigatorpublic boolean isComment(Object obj)
Navigatorpublic boolean isText(Object obj)
Navigatorpublic boolean isAttribute(Object obj)
NavigatorisAttribute インタフェース内 Navigatorobj - the object to testtrue if the object is an attribute node,
else falsepublic boolean isProcessingInstruction(Object obj)
NavigatorisProcessingInstruction インタフェース内 Navigatorobj - the object to testtrue if the object is a processing-instruction node,
else falsepublic boolean isDocument(Object obj)
Navigator/.isDocument インタフェース内 Navigatorobj - the object to testtrue if the object is a document node,
else falsepublic boolean isNamespace(Object obj)
NavigatorisNamespace インタフェース内 Navigatorobj - the object to testtrue if the object is a namespace node,
else falsepublic String getElementName(Object obj)
NavigatorgetElementName インタフェース内 Navigatorobj - the context element nodepublic String getElementNamespaceUri(Object obj)
NavigatorgetElementNamespaceUri インタフェース内 Navigatorobj - the context element nodepublic String getElementQName(Object obj)
NavigatorgetElementQName インタフェース内 Navigatorobj - the context element nodepublic String getAttributeName(Object obj)
NavigatorgetAttributeName インタフェース内 Navigatorobj - the context attribute nodepublic String getAttributeNamespaceUri(Object obj)
NavigatorgetAttributeNamespaceUri インタフェース内 Navigatorobj - the context attribute nodepublic String getAttributeQName(Object obj)
NavigatorgetAttributeQName インタフェース内 Navigatorobj - the context attribute nodepublic Iterator getChildAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisExceptiongetChildAxisIterator インタフェース内 NavigatorgetChildAxisIterator クラス内 DefaultNavigatorcontextNode - the original context nodepublic Iterator getChildAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
Iterator over the child elements that
match the supplied name.getChildAxisIterator インタフェース内 NamedAccessNavigatorcontextNode - the origin context nodelocalName - the local name of the children to return, always presentnamespacePrefix - the prefix of the namespace of the children to returnnamespaceURI - the namespace URI of the children to returnpublic Iterator getParentAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisExceptiongetParentAxisIterator インタフェース内 NavigatorgetParentAxisIterator クラス内 DefaultNavigatorcontextNode - the original context nodepublic Iterator getAttributeAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisException. Subclasses that
support the attribute axis must override this method.getAttributeAxisIterator インタフェース内 NavigatorgetAttributeAxisIterator クラス内 DefaultNavigatorcontextNode - the original context nodepublic Iterator getAttributeAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
Iterator over the attribute elements that
match the supplied name.getAttributeAxisIterator インタフェース内 NamedAccessNavigatorcontextNode - the origin context nodelocalName - the local name of the attributes to return, always presentnamespacePrefix - the prefix of the namespace of the attributes to returnnamespaceURI - the namespace URI of the attributes to returnpublic Iterator getNamespaceAxisIterator(Object contextNode)
DefaultNavigatorUnsupportedAxisException. Subclasses that
support the namespace axis must override this method.getNamespaceAxisIterator インタフェース内 NavigatorgetNamespaceAxisIterator クラス内 DefaultNavigatorcontextNode - the original context nodepublic Object getDocumentNode(Object contextNode)
NavigatorgetDocumentNode インタフェース内 NavigatorgetDocumentNode クラス内 DefaultNavigatorcontextNode - the context nodeNavigator.isDocument(Object)public Object getParentNode(Object contextNode)
DefaultNavigatorgetParentNode インタフェース内 NavigatorgetParentNode クラス内 DefaultNavigatorcontextNode - the node whose parent to returnNavigator.isDocument(java.lang.Object),
Navigator.isElement(java.lang.Object)public String getTextStringValue(Object obj)
NavigatorgetTextStringValue インタフェース内 Navigatorobj - the text nodepublic String getElementStringValue(Object obj)
NavigatorgetElementStringValue インタフェース内 Navigatorobj - the comment node.public String getAttributeStringValue(Object obj)
NavigatorgetAttributeStringValue インタフェース内 Navigatorobj - the attribute nodepublic String getNamespaceStringValue(Object obj)
NavigatorgetNamespaceStringValue インタフェース内 Navigatorobj - the namespace nodepublic String getNamespacePrefix(Object obj)
NavigatorgetNamespacePrefix インタフェース内 Navigatorobj - the namespace nodepublic String getCommentStringValue(Object obj)
NavigatorgetCommentStringValue インタフェース内 Navigatorobj - the comment nodepublic 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 インタフェース内 NavigatortranslateNamespacePrefixToUri クラス内 DefaultNavigatorprefix - the prefix to translatecontext - the element to consider during translationNamespaceContextpublic short getNodeType(Object node)
NavigatorgetNodeType インタフェース内 NavigatorgetNodeType クラス内 DefaultNavigatornode - ????Patternpublic Object getDocument(String uri) throws FunctionCallException
DefaultNavigatorgetDocument インタフェース内 NavigatorgetDocument クラス内 DefaultNavigatoruri - 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 String getProcessingInstructionTarget(Object obj)
NavigatorgetProcessingInstructionTarget インタフェース内 NavigatorgetProcessingInstructionTarget クラス内 DefaultNavigatorobj - the context processing-instruction nodepublic String getProcessingInstructionData(Object obj)
NavigatorgetProcessingInstructionData インタフェース内 NavigatorgetProcessingInstructionData クラス内 DefaultNavigatorobj - the context processing-instruction nodepublic XPath parseXPath(String xpath) throws SAXPathException
NavigatorparseXPath インタフェース内 Navigatorxpath - the XPath expressionSAXPathException - if the string is not a syntactically
correct XPath expressionXPathCopyright © 2001-2013 Codehaus. All Rights Reserved.