org.jaxen.javabean

Class DocumentNavigator

public class DocumentNavigator extends DefaultNavigator implements NamedAccessNavigator

Interface for navigating around a JavaBean object model.

This class is not intended for direct usage, but is used by the Jaxen engine during evaluation.

Author: bob mcwhirter

See Also:

Field Summary
static Class[]EMPTY_CLASS_ARRAY
Empty Class array.
static Object[]EMPTY_OBJECT_ARRAY
Empty Object array.
static DocumentNavigatorinstance
Singleton implementation.
static longserialVersionUID
Method Summary
IteratorgetAttributeAxisIterator(Object contextNode)
IteratorgetAttributeAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
Retrieves an Iterator over the attribute elements that match the supplied name.
StringgetAttributeName(Object obj)
StringgetAttributeNamespaceUri(Object obj)
StringgetAttributeQName(Object obj)
StringgetAttributeStringValue(Object obj)
IteratorgetChildAxisIterator(Object contextNode)
IteratorgetChildAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
Retrieves an Iterator over the child elements that match the supplied name.
StringgetCommentStringValue(Object obj)
ObjectgetDocument(String uri)
ObjectgetDocumentNode(Object contextNode)
StringgetElementName(Object obj)
StringgetElementNamespaceUri(Object obj)
StringgetElementQName(Object obj)
StringgetElementStringValue(Object obj)
static NavigatorgetInstance()
Retrieve the singleton instance of this DocumentNavigator.
IteratorgetNamespaceAxisIterator(Object contextNode)
StringgetNamespacePrefix(Object obj)
StringgetNamespaceStringValue(Object obj)
shortgetNodeType(Object node)
IteratorgetParentAxisIterator(Object contextNode)
ObjectgetParentNode(Object contextNode)
StringgetProcessingInstructionData(Object obj)
StringgetProcessingInstructionTarget(Object obj)
StringgetTextStringValue(Object obj)
booleanisAttribute(Object obj)
booleanisComment(Object obj)
booleanisDocument(Object obj)
booleanisElement(Object obj)
booleanisNamespace(Object obj)
booleanisProcessingInstruction(Object obj)
booleanisText(Object obj)
protected Stringjavacase(String name)
XPathparseXPath(String xpath)
StringtranslateNamespacePrefixToUri(String prefix, Object context)

Field Detail

EMPTY_CLASS_ARRAY

private static final Class[] EMPTY_CLASS_ARRAY
Empty Class array.

EMPTY_OBJECT_ARRAY

private static final Object[] EMPTY_OBJECT_ARRAY
Empty Object array.

instance

private static final DocumentNavigator instance
Singleton implementation.

serialVersionUID

private static final long serialVersionUID

Method Detail

getAttributeAxisIterator

public Iterator getAttributeAxisIterator(Object contextNode)

getAttributeAxisIterator

public Iterator getAttributeAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
Retrieves an Iterator over the attribute elements that match the supplied name.

Parameters: contextNode the origin context node localName the local name of the attributes to return, always present namespacePrefix the prefix of the namespace of the attributes to return namespaceURI the namespace URI of the attributes to return

Returns: an Iterator that traverses the named attributes, not null

getAttributeName

public String getAttributeName(Object obj)

getAttributeNamespaceUri

public String getAttributeNamespaceUri(Object obj)

getAttributeQName

public String getAttributeQName(Object obj)

getAttributeStringValue

public String getAttributeStringValue(Object obj)

getChildAxisIterator

public Iterator getChildAxisIterator(Object contextNode)

getChildAxisIterator

public Iterator getChildAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
Retrieves an Iterator over the child elements that match the supplied name.

Parameters: contextNode the origin context node localName the local name of the children to return, always present namespacePrefix the prefix of the namespace of the children to return namespaceURI the namespace URI of the children to return

Returns: an Iterator that traverses the named children, or null if none

getCommentStringValue

public String getCommentStringValue(Object obj)

getDocument

public Object getDocument(String uri)

getDocumentNode

public Object getDocumentNode(Object contextNode)

getElementName

public String getElementName(Object obj)

getElementNamespaceUri

public String getElementNamespaceUri(Object obj)

getElementQName

public String getElementQName(Object obj)

getElementStringValue

public String getElementStringValue(Object obj)

getInstance

public static Navigator getInstance()
Retrieve the singleton instance of this DocumentNavigator.

getNamespaceAxisIterator

public Iterator getNamespaceAxisIterator(Object contextNode)

getNamespacePrefix

public String getNamespacePrefix(Object obj)

getNamespaceStringValue

public String getNamespaceStringValue(Object obj)

getNodeType

public short getNodeType(Object node)

getParentAxisIterator

public Iterator getParentAxisIterator(Object contextNode)

getParentNode

public Object getParentNode(Object contextNode)

getProcessingInstructionData

public String getProcessingInstructionData(Object obj)

getProcessingInstructionTarget

public String getProcessingInstructionTarget(Object obj)

getTextStringValue

public String getTextStringValue(Object obj)

isAttribute

public boolean isAttribute(Object obj)

isComment

public boolean isComment(Object obj)

isDocument

public boolean isDocument(Object obj)

isElement

public boolean isElement(Object obj)

isNamespace

public boolean isNamespace(Object obj)

isProcessingInstruction

public boolean isProcessingInstruction(Object obj)

isText

public boolean isText(Object obj)

javacase

protected String javacase(String name)

parseXPath

public XPath parseXPath(String xpath)

translateNamespacePrefixToUri

public String translateNamespacePrefixToUri(String prefix, Object context)