org.inria.ns.reflex.xml.provider.jaxen
Class JaxenNavigator

java.lang.Object
  extended by org.inria.ns.reflex.xml.provider.jaxen.JaxenNavigator
All Implemented Interfaces:
Serializable, NamedAccessNavigator, Navigator

public class JaxenNavigator
extends Object
implements Navigator, NamedAccessNavigator

(TODO : CODING FULL XOP METHODS !!!) A wrapper of object's X-operator for the Jaxen engine.

Author:
Philippe Poulard
See Also:
Serialized Form

Method Summary
 Iterator getAncestorAxisIterator(Object referent)
           
 Iterator getAncestorOrSelfAxisIterator(Object referent)
           
 Iterator getAttributeAxisIterator(Object referent)
           
 Iterator getAttributeAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
           
 String getAttributeName(Object referent)
           
 String getAttributeNamespaceUri(Object referent)
           
 String getAttributeQName(Object referent)
           
 String getAttributeStringValue(Object attr)
           
 Iterator getChildAxisIterator(Object referent)
           
 Iterator getChildAxisIterator(Object contextNode, String localName, String namespacePrefix, String namespaceURI)
           
 String getCommentStringValue(Object comment)
           
 Iterator getDescendantAxisIterator(Object referent)
           
 Iterator getDescendantOrSelfAxisIterator(Object referent)
           
 Object getDocument(String url)
           
 Object getDocumentNode(Object referent)
           
 Object getElementById(Object object, String elementId)
           
 String getElementName(Object referent)
           
 String getElementNamespaceUri(Object referent)
           
 String getElementQName(Object referent)
          Return the qualified name.
 String getElementStringValue(Object element)
           
 Iterator getFollowingAxisIterator(Object referent)
           
 Iterator getFollowingSiblingAxisIterator(Object referent)
           
static JaxenNavigator getInstance()
          Return the Jaxen Navigator backed by the master operator.
 Iterator getNamespaceAxisIterator(Object referent)
           
 String getNamespacePrefix(Object ns)
           
 String getNamespaceStringValue(Object ns)
           
 short getNodeType(Object referent)
           
 Iterator getParentAxisIterator(Object referent)
           
 Object getParentNode(Object referent)
           
 Iterator getPrecedingAxisIterator(Object referent)
           
 Iterator getPrecedingSiblingAxisIterator(Object referent)
           
 String getProcessingInstructionData(Object obj)
           
 String getProcessingInstructionTarget(Object obj)
           
 Iterator getSelfAxisIterator(Object referent)
           
 String getTextStringValue(Object txt)
           
 boolean isAttribute(Object object)
           
 boolean isComment(Object object)
           
 boolean isDocument(Object object)
           
 boolean isElement(Object object)
           
 boolean isNamespace(Object object)
           
 boolean isProcessingInstruction(Object object)
           
 boolean isText(Object object)
           
 XPath parseXPath(String expression)
           
 String translateNamespacePrefixToUri(String prefix, Object element)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JaxenNavigator getInstance()
Return the Jaxen Navigator backed by the master operator.

Returns:
The Jaxen Navigator singleton.

getChildAxisIterator

public Iterator getChildAxisIterator(Object referent)
                              throws UnsupportedAxisException
Specified by:
getChildAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getDescendantAxisIterator

public Iterator getDescendantAxisIterator(Object referent)
                                   throws UnsupportedAxisException
Specified by:
getDescendantAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getParentAxisIterator

public Iterator getParentAxisIterator(Object referent)
                               throws UnsupportedAxisException
Specified by:
getParentAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getAncestorAxisIterator

public Iterator getAncestorAxisIterator(Object referent)
                                 throws UnsupportedAxisException
Specified by:
getAncestorAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getFollowingSiblingAxisIterator

public Iterator getFollowingSiblingAxisIterator(Object referent)
                                         throws UnsupportedAxisException
Specified by:
getFollowingSiblingAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getPrecedingSiblingAxisIterator

public Iterator getPrecedingSiblingAxisIterator(Object referent)
                                         throws UnsupportedAxisException
Specified by:
getPrecedingSiblingAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getFollowingAxisIterator

public Iterator getFollowingAxisIterator(Object referent)
                                  throws UnsupportedAxisException
Specified by:
getFollowingAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getPrecedingAxisIterator

public Iterator getPrecedingAxisIterator(Object referent)
                                  throws UnsupportedAxisException
Specified by:
getPrecedingAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getAttributeAxisIterator

public Iterator getAttributeAxisIterator(Object referent)
                                  throws UnsupportedAxisException
Specified by:
getAttributeAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getNamespaceAxisIterator

public Iterator getNamespaceAxisIterator(Object referent)
                                  throws UnsupportedAxisException
Specified by:
getNamespaceAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getSelfAxisIterator

public Iterator getSelfAxisIterator(Object referent)
                             throws UnsupportedAxisException
Specified by:
getSelfAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getDescendantOrSelfAxisIterator

public Iterator getDescendantOrSelfAxisIterator(Object referent)
                                         throws UnsupportedAxisException
Specified by:
getDescendantOrSelfAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getAncestorOrSelfAxisIterator

public Iterator getAncestorOrSelfAxisIterator(Object referent)
                                       throws UnsupportedAxisException
Specified by:
getAncestorOrSelfAxisIterator in interface Navigator
Throws:
UnsupportedAxisException

getDocumentNode

public Object getDocumentNode(Object referent)
Specified by:
getDocumentNode in interface Navigator

translateNamespacePrefixToUri

public String translateNamespacePrefixToUri(String prefix,
                                            Object element)
Specified by:
translateNamespacePrefixToUri in interface Navigator

getProcessingInstructionTarget

public String getProcessingInstructionTarget(Object obj)
Specified by:
getProcessingInstructionTarget in interface Navigator

getProcessingInstructionData

public String getProcessingInstructionData(Object obj)
Specified by:
getProcessingInstructionData in interface Navigator

getNodeType

public short getNodeType(Object referent)
Specified by:
getNodeType in interface Navigator

getParentNode

public Object getParentNode(Object referent)
                     throws UnsupportedAxisException
Specified by:
getParentNode in interface Navigator
Throws:
UnsupportedAxisException

getDocument

public Object getDocument(String url)
                   throws FunctionCallException
Specified by:
getDocument in interface Navigator
Throws:
FunctionCallException

getElementById

public Object getElementById(Object object,
                             String elementId)
Specified by:
getElementById in interface Navigator

getElementNamespaceUri

public String getElementNamespaceUri(Object referent)
Specified by:
getElementNamespaceUri in interface Navigator

getElementName

public String getElementName(Object referent)
Specified by:
getElementName in interface Navigator

getElementQName

public String getElementQName(Object referent)
Return the qualified name.

Specified by:
getElementQName in interface Navigator
Parameters:
referent - The referent object.
Returns:
prefix:name or localName if no prefix.
See Also:
QName.getQualifiedName()

getAttributeNamespaceUri

public String getAttributeNamespaceUri(Object referent)
Specified by:
getAttributeNamespaceUri in interface Navigator

getAttributeName

public String getAttributeName(Object referent)
Specified by:
getAttributeName in interface Navigator

getAttributeQName

public String getAttributeQName(Object referent)
Specified by:
getAttributeQName in interface Navigator

isDocument

public boolean isDocument(Object object)
Specified by:
isDocument in interface Navigator

isElement

public boolean isElement(Object object)
Specified by:
isElement in interface Navigator

isAttribute

public boolean isAttribute(Object object)
Specified by:
isAttribute in interface Navigator

isNamespace

public boolean isNamespace(Object object)
Specified by:
isNamespace in interface Navigator

isComment

public boolean isComment(Object object)
Specified by:
isComment in interface Navigator

isText

public boolean isText(Object object)
Specified by:
isText in interface Navigator

isProcessingInstruction

public boolean isProcessingInstruction(Object object)
Specified by:
isProcessingInstruction in interface Navigator

getCommentStringValue

public String getCommentStringValue(Object comment)
Specified by:
getCommentStringValue in interface Navigator

getElementStringValue

public String getElementStringValue(Object element)
Specified by:
getElementStringValue in interface Navigator

getAttributeStringValue

public String getAttributeStringValue(Object attr)
Specified by:
getAttributeStringValue in interface Navigator

getNamespaceStringValue

public String getNamespaceStringValue(Object ns)
Specified by:
getNamespaceStringValue in interface Navigator

getTextStringValue

public String getTextStringValue(Object txt)
Specified by:
getTextStringValue in interface Navigator

getNamespacePrefix

public String getNamespacePrefix(Object ns)
Specified by:
getNamespacePrefix in interface Navigator

parseXPath

public XPath parseXPath(String expression)
Specified by:
parseXPath in interface Navigator

getAttributeAxisIterator

public Iterator getAttributeAxisIterator(Object contextNode,
                                         String localName,
                                         String namespacePrefix,
                                         String namespaceURI)
                                  throws UnsupportedAxisException
Specified by:
getAttributeAxisIterator in interface NamedAccessNavigator
Throws:
UnsupportedAxisException

getChildAxisIterator

public Iterator getChildAxisIterator(Object contextNode,
                                     String localName,
                                     String namespacePrefix,
                                     String namespaceURI)
                              throws UnsupportedAxisException
Specified by:
getChildAxisIterator in interface NamedAccessNavigator
Throws:
UnsupportedAxisException