deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.feature.xpath
Class FeatureNavigator

java.lang.Object
  extended by org.jaxen.DefaultNavigator
      extended by org.deegree.feature.xpath.FeatureNavigator
All Implemented Interfaces:
Serializable, org.jaxen.Navigator

 class FeatureNavigator
extends org.jaxen.DefaultNavigator

TODO add documentation here

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Constructor Summary
FeatureNavigator(Feature rootFeature, GMLVersion version)
          Creates a new FeatureNavigator instance with a Feature that is the root of the navigation hierarchy.
 
Method Summary
 Iterator<AttributeNode> getAttributeAxisIterator(Object node)
          Returns an iterator over all attributes of an element node.
 String getAttributeName(Object node)
          Returns the local name of an attribute node.
 String getAttributeNamespaceUri(Object node)
          Returns the namespace URI of an attribute node.
 String getAttributeQName(Object node)
          Returns the qualified (=prefixed) name of an attribute node.
 String getAttributeStringValue(Object node)
          Returns the string value of an attribute node.
 Iterator<?> getChildAxisIterator(Object node)
          Returns an iterator over all children of the given node.
 String getCommentStringValue(Object contextNode)
           
 Object getDocumentNode(Object contextNode)
          Returns the top-level document node.
 String getElementName(Object node)
          Returns the local name of an element node.
 String getElementNamespaceUri(Object node)
          Returns the namespace URI of an element node.
 String getElementQName(Object node)
          Returns the qualified (=prefixed) name of an element node.
 String getElementStringValue(Object node)
          Returns the string value of an element node.
 String getNamespacePrefix(Object contextNode)
           
 String getNamespaceStringValue(Object contextNode)
           
 Iterator<Node> getParentAxisIterator(Object contextNode)
          Returns a (single-member) iterator over this node's parent.
 String getTextStringValue(Object obj)
           
 boolean isAttribute(Object obj)
           
 boolean isComment(Object obj)
           
 boolean isDocument(Object obj)
           
 boolean isElement(Object obj)
           
 boolean isNamespace(Object obj)
           
 boolean isProcessingInstruction(Object obj)
           
 boolean isText(Object obj)
           
 org.jaxen.XPath parseXPath(String xpath)
          Returns a parsed form of the given XPath string, which will be suitable for queries on Feature objects.
 String translateNamespacePrefixToUri(String prefix, Object element)
          Translates a namespace prefix to a URI.
 
Methods inherited from class org.jaxen.DefaultNavigator
getAncestorAxisIterator, getAncestorOrSelfAxisIterator, getDescendantAxisIterator, getDescendantOrSelfAxisIterator, getDocument, getElementById, getFollowingAxisIterator, getFollowingSiblingAxisIterator, getNamespaceAxisIterator, getNodeType, getParentNode, getPrecedingAxisIterator, getPrecedingSiblingAxisIterator, getProcessingInstructionData, getProcessingInstructionTarget, getSelfAxisIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureNavigator

FeatureNavigator(Feature rootFeature,
                 GMLVersion version)
Creates a new FeatureNavigator instance with a Feature that is the root of the navigation hierarchy.

Parameters:
rootFeature - root of the navigation hierarchy (document node), can be null
version - determines the names and types of the standard GML properties, can be null (if no properties such as "gml:name" are used)
Method Detail

getAttributeAxisIterator

public Iterator<AttributeNode> getAttributeAxisIterator(Object node)
Returns an iterator over all attributes of an element node.

Specified by:
getAttributeAxisIterator in interface org.jaxen.Navigator
Overrides:
getAttributeAxisIterator in class org.jaxen.DefaultNavigator
Parameters:
node - the context node for the attribute axis
Returns:
a possibly-empty iterator (not null)

getAttributeName

public String getAttributeName(Object node)
Returns the local name of an attribute node.

Parameters:
node - the attribute node
Returns:
a string representing the unqualified local name if the node is an attribute, or null otherwise

getAttributeNamespaceUri

public String getAttributeNamespaceUri(Object node)
Returns the namespace URI of an attribute node.

Parameters:
node - the attribute node
Returns:
the namespace if the argument is an attribute, or null otherwise

getAttributeQName

public String getAttributeQName(Object node)
Returns the qualified (=prefixed) name of an attribute node.

Parameters:
node - the attribute node
Returns:
a string representing the qualified (i.e. possibly prefixed) name if the argument is an attribute, or null otherwise

getAttributeStringValue

public String getAttributeStringValue(Object node)
Returns the string value of an attribute node.

Parameters:
node - the attribute node
Returns:
the text of the attribute value if the node is an attribute, null otherwise

getChildAxisIterator

public Iterator<?> getChildAxisIterator(Object node)
Returns an iterator over all children of the given node.

Specified by:
getChildAxisIterator in interface org.jaxen.Navigator
Overrides:
getChildAxisIterator in class org.jaxen.DefaultNavigator
Parameters:
node - the context node for the child axis
Returns:
a possibly-empty iterator (not null)

getCommentStringValue

public String getCommentStringValue(Object contextNode)

getDocumentNode

public Object getDocumentNode(Object contextNode)
Returns the top-level document node.

Specified by:
getDocumentNode in interface org.jaxen.Navigator
Overrides:
getDocumentNode in class org.jaxen.DefaultNavigator
Parameters:
contextNode - any node in the document
Returns:
the root node

getElementName

public String getElementName(Object node)
Returns the local name of an element node.

Parameters:
node - the element node
Returns:
a string representing the unqualified local name if the node is an element, or null otherwise

getElementNamespaceUri

public String getElementNamespaceUri(Object node)
Returns the namespace URI of an element node.

Parameters:
node - the element node
Returns:
the namespace if the argument is an element, or null otherwise

getElementQName

public String getElementQName(Object node)
Returns the qualified (=prefixed) name of an element node.

Parameters:
node - the element node
Returns:
a string representing the qualified (i.e. possibly prefixed) name if the argument is an element, or null otherwise

getElementStringValue

public String getElementStringValue(Object node)
Returns the string value of an element node.

Parameters:
node - the target node
Returns:
the text inside the node and its descendants if the node is an element, null otherwise

getNamespacePrefix

public String getNamespacePrefix(Object contextNode)

getNamespaceStringValue

public String getNamespaceStringValue(Object contextNode)

getParentAxisIterator

public Iterator<Node> getParentAxisIterator(Object contextNode)
Returns a (single-member) iterator over this node's parent.

Specified by:
getParentAxisIterator in interface org.jaxen.Navigator
Overrides:
getParentAxisIterator in class org.jaxen.DefaultNavigator
Parameters:
contextNode - the context node for the parent axis
Returns:
a possibly-empty iterator (not null)

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)

parseXPath

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

Parameters:
xpath - the XPath expression
Returns:
a parsed form of the given XPath string
Throws:
org.jaxen.saxpath.SAXPathException - if the string is syntactically incorrect

translateNamespacePrefixToUri

public String translateNamespacePrefixToUri(String prefix,
                                            Object element)
Translates a namespace prefix to a URI.

Specified by:
translateNamespacePrefixToUri in interface org.jaxen.Navigator
Overrides:
translateNamespacePrefixToUri in class org.jaxen.DefaultNavigator
Parameters:
prefix - the namespace prefix
element - the namespace context
Returns:
the namespace URI bound to the prefix in the scope of element; null if the prefix is not bound

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>