Joda System API

org.joda.property.path
Class DocumentNavigator

java.lang.Object
  |
  +--org.jaxen.DefaultNavigator
        |
        +--org.joda.property.path.DocumentNavigator
All Implemented Interfaces:
org.jaxen.Navigator, java.io.Serializable

public class DocumentNavigator
extends org.jaxen.DefaultNavigator

Jaxen Navigator implementation. Namespaces are not supported

Author:
Stephen Colebourne
See Also:
Serialized Form

Nested Class Summary
static class DocumentNavigator.NavAttribute
          Wrapper for attribute handling
static class DocumentNavigator.NavElement
          Wrapper for element handling
static class DocumentNavigator.NavText
          Wrapper for text handling
 
Constructor Summary
DocumentNavigator(XMLMetaData metaData)
          Get the singleton instance of the navifator
 
Method Summary
 DocumentNavigator.NavElement createDocument(Bean bean, java.lang.String beanName)
          Get the singleton instance of the navifator
static java.lang.Object decodeResult(java.lang.Object object)
          Convert an internal wrapper back into a 'real' object
 java.util.Iterator getAttributeAxisIterator(java.lang.Object contextNode)
          Get an iterator through the list of attributes
 java.lang.String getAttributeName(java.lang.Object obj)
          Get the name of an attribute
 java.lang.String getAttributeNamespaceUri(java.lang.Object obj)
          Get the attribute namespace, null as namespaces not supported
 java.lang.String getAttributeQName(java.lang.Object obj)
           
 java.lang.String getAttributeStringValue(java.lang.Object obj)
          Get the attribute string content
 java.util.Iterator getChildAxisIterator(java.lang.Object contextNode)
          Get an iterator through the children of a property
 java.lang.String getCommentStringValue(java.lang.Object obj)
           
 java.lang.Object getDocument(java.lang.String url)
          Read a new xml document from the specified url
 java.lang.Object getDocumentNode(java.lang.Object contextNode)
          Get the root of the object graph
 java.lang.String getElementName(java.lang.Object obj)
          Get the name of an element
 java.lang.String getElementNamespaceUri(java.lang.Object obj)
          Get the element namespace, null as namespaces not supported
 java.lang.String getElementQName(java.lang.Object obj)
           
 java.lang.String getElementStringValue(java.lang.Object obj)
          Get the element string content
 java.util.Iterator getNamespaceAxisIterator(java.lang.Object contextNode)
          Get an iterator through the namespaces on a node, none as we don't support namespaces
 java.lang.String getNamespacePrefix(java.lang.Object obj)
           
 java.lang.String getNamespaceStringValue(java.lang.Object obj)
           
 java.util.Iterator getParentAxisIterator(java.lang.Object contextNode)
          Get an iterator representing the parent of the passed in node
 java.lang.String getProcessingInstructionData(java.lang.Object obj)
           
 java.lang.String getProcessingInstructionTarget(java.lang.Object obj)
           
 java.lang.String getTextStringValue(java.lang.Object obj)
          Get the text string content
 boolean isAttribute(java.lang.Object obj)
          Is the object an attribute
 boolean isComment(java.lang.Object obj)
          Is the object a comment, false as comments are not supported
 boolean isDocument(java.lang.Object obj)
          Is the object the document root
 boolean isElement(java.lang.Object obj)
          Is the object an element
 boolean isNamespace(java.lang.Object obj)
          Is the object a namespace, false as ns not supported
 boolean isProcessingInstruction(java.lang.Object obj)
          Is the object an PI, false as PIs are not supported
 boolean isText(java.lang.Object obj)
          Is the object text
 org.jaxen.XPath parseXPath(java.lang.String xpath)
          Returns a parsed form of the given xpath string, which will be suitable for queries on properties.
 java.lang.String translateNamespacePrefixToUri(java.lang.String prefix, java.lang.Object context)
           
 
Methods inherited from class org.jaxen.DefaultNavigator
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getElementById, getFollowingAxisIterator, getFollowingSiblingAxisIterator, getNodeType, getParentNode, getPrecedingAxisIterator, getPrecedingSiblingAxisIterator, getSelfAxisIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentNavigator

public DocumentNavigator(XMLMetaData metaData)
Get the singleton instance of the navifator

Method Detail

createDocument

public DocumentNavigator.NavElement createDocument(Bean bean,
                                                   java.lang.String beanName)
Get the singleton instance of the navifator


decodeResult

public static java.lang.Object decodeResult(java.lang.Object object)
Convert an internal wrapper back into a 'real' object


isElement

public boolean isElement(java.lang.Object obj)
Is the object an element

Specified by:
isElement in interface org.jaxen.Navigator
Specified by:
isElement in class org.jaxen.DefaultNavigator

isComment

public boolean isComment(java.lang.Object obj)
Is the object a comment, false as comments are not supported

Specified by:
isComment in interface org.jaxen.Navigator
Specified by:
isComment in class org.jaxen.DefaultNavigator

isText

public boolean isText(java.lang.Object obj)
Is the object text

Specified by:
isText in interface org.jaxen.Navigator
Specified by:
isText in class org.jaxen.DefaultNavigator

isAttribute

public boolean isAttribute(java.lang.Object obj)
Is the object an attribute

Specified by:
isAttribute in interface org.jaxen.Navigator
Specified by:
isAttribute in class org.jaxen.DefaultNavigator

isProcessingInstruction

public boolean isProcessingInstruction(java.lang.Object obj)
Is the object an PI, false as PIs are not supported

Specified by:
isProcessingInstruction in interface org.jaxen.Navigator
Specified by:
isProcessingInstruction in class org.jaxen.DefaultNavigator

isDocument

public boolean isDocument(java.lang.Object obj)
Is the object the document root

Specified by:
isDocument in interface org.jaxen.Navigator
Specified by:
isDocument in class org.jaxen.DefaultNavigator

isNamespace

public boolean isNamespace(java.lang.Object obj)
Is the object a namespace, false as ns not supported

Specified by:
isNamespace in interface org.jaxen.Navigator
Specified by:
isNamespace in class org.jaxen.DefaultNavigator

getElementName

public java.lang.String getElementName(java.lang.Object obj)
Get the name of an element

Specified by:
getElementName in interface org.jaxen.Navigator
Specified by:
getElementName in class org.jaxen.DefaultNavigator

getElementNamespaceUri

public java.lang.String getElementNamespaceUri(java.lang.Object obj)
Get the element namespace, null as namespaces not supported

Specified by:
getElementNamespaceUri in interface org.jaxen.Navigator
Specified by:
getElementNamespaceUri in class org.jaxen.DefaultNavigator

getAttributeName

public java.lang.String getAttributeName(java.lang.Object obj)
Get the name of an attribute

Specified by:
getAttributeName in interface org.jaxen.Navigator
Specified by:
getAttributeName in class org.jaxen.DefaultNavigator

getAttributeNamespaceUri

public java.lang.String getAttributeNamespaceUri(java.lang.Object obj)
Get the attribute namespace, null as namespaces not supported

Specified by:
getAttributeNamespaceUri in interface org.jaxen.Navigator
Specified by:
getAttributeNamespaceUri in class org.jaxen.DefaultNavigator

getChildAxisIterator

public java.util.Iterator getChildAxisIterator(java.lang.Object contextNode)
Get an iterator through the children of a property

Specified by:
getChildAxisIterator in interface org.jaxen.Navigator
Overrides:
getChildAxisIterator in class org.jaxen.DefaultNavigator

getNamespaceAxisIterator

public java.util.Iterator getNamespaceAxisIterator(java.lang.Object contextNode)
Get an iterator through the namespaces on a node, none as we don't support namespaces

Specified by:
getNamespaceAxisIterator in interface org.jaxen.Navigator
Overrides:
getNamespaceAxisIterator in class org.jaxen.DefaultNavigator

getParentAxisIterator

public java.util.Iterator getParentAxisIterator(java.lang.Object contextNode)
Get an iterator representing the parent of the passed in node

Specified by:
getParentAxisIterator in interface org.jaxen.Navigator
Overrides:
getParentAxisIterator in class org.jaxen.DefaultNavigator

getAttributeAxisIterator

public java.util.Iterator getAttributeAxisIterator(java.lang.Object contextNode)
Get an iterator through the list of attributes

Specified by:
getAttributeAxisIterator in interface org.jaxen.Navigator
Overrides:
getAttributeAxisIterator in class org.jaxen.DefaultNavigator

parseXPath

public org.jaxen.XPath parseXPath(java.lang.String xpath)
                           throws org.saxpath.SAXPathException
Returns a parsed form of the given xpath string, which will be suitable for queries on properties.

Specified by:
parseXPath in interface org.jaxen.Navigator
Specified by:
parseXPath in class org.jaxen.DefaultNavigator
org.saxpath.SAXPathException

getDocumentNode

public java.lang.Object getDocumentNode(java.lang.Object contextNode)
Get the root of the object graph

Specified by:
getDocumentNode in interface org.jaxen.Navigator
Overrides:
getDocumentNode in class org.jaxen.DefaultNavigator

getElementQName

public java.lang.String getElementQName(java.lang.Object obj)
Specified by:
getElementQName in interface org.jaxen.Navigator
Specified by:
getElementQName in class org.jaxen.DefaultNavigator

getAttributeQName

public java.lang.String getAttributeQName(java.lang.Object obj)
Specified by:
getAttributeQName in interface org.jaxen.Navigator
Specified by:
getAttributeQName in class org.jaxen.DefaultNavigator

getNamespaceStringValue

public java.lang.String getNamespaceStringValue(java.lang.Object obj)
Specified by:
getNamespaceStringValue in interface org.jaxen.Navigator
Specified by:
getNamespaceStringValue in class org.jaxen.DefaultNavigator

getNamespacePrefix

public java.lang.String getNamespacePrefix(java.lang.Object obj)
Specified by:
getNamespacePrefix in interface org.jaxen.Navigator
Specified by:
getNamespacePrefix in class org.jaxen.DefaultNavigator

getTextStringValue

public java.lang.String getTextStringValue(java.lang.Object obj)
Get the text string content

Specified by:
getTextStringValue in interface org.jaxen.Navigator
Specified by:
getTextStringValue in class org.jaxen.DefaultNavigator

getAttributeStringValue

public java.lang.String getAttributeStringValue(java.lang.Object obj)
Get the attribute string content

Specified by:
getAttributeStringValue in interface org.jaxen.Navigator
Specified by:
getAttributeStringValue in class org.jaxen.DefaultNavigator

getElementStringValue

public java.lang.String getElementStringValue(java.lang.Object obj)
Get the element string content

Specified by:
getElementStringValue in interface org.jaxen.Navigator
Specified by:
getElementStringValue in class org.jaxen.DefaultNavigator

getProcessingInstructionTarget

public java.lang.String getProcessingInstructionTarget(java.lang.Object obj)
Specified by:
getProcessingInstructionTarget in interface org.jaxen.Navigator
Overrides:
getProcessingInstructionTarget in class org.jaxen.DefaultNavigator

getProcessingInstructionData

public java.lang.String getProcessingInstructionData(java.lang.Object obj)
Specified by:
getProcessingInstructionData in interface org.jaxen.Navigator
Overrides:
getProcessingInstructionData in class org.jaxen.DefaultNavigator

getCommentStringValue

public java.lang.String getCommentStringValue(java.lang.Object obj)
Specified by:
getCommentStringValue in interface org.jaxen.Navigator
Specified by:
getCommentStringValue in class org.jaxen.DefaultNavigator

translateNamespacePrefixToUri

public java.lang.String translateNamespacePrefixToUri(java.lang.String prefix,
                                                      java.lang.Object context)
Specified by:
translateNamespacePrefixToUri in interface org.jaxen.Navigator
Overrides:
translateNamespacePrefixToUri in class org.jaxen.DefaultNavigator

getDocument

public java.lang.Object getDocument(java.lang.String url)
                             throws org.jaxen.FunctionCallException
Read a new xml document from the specified url

Specified by:
getDocument in interface org.jaxen.Navigator
Overrides:
getDocument in class org.jaxen.DefaultNavigator
org.jaxen.FunctionCallException

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.