org.gxml.xdm
Interface Model<N,S,Q>

Type Parameters:
N - The node handle.
S - The symbol (namespace-uri and/or local-name).
Q - The QName.
All Superinterfaces:
java.util.Comparator<N>
All Known Subinterfaces:
GuModel<N>, GxModel<N,A,S,T>

public interface Model<N,S,Q>
extends java.util.Comparator<N>

An optional interface for gXML APIs designed to provide consistency.


Method Summary
 java.lang.Iterable<N> getAncestorAxis(N origin)
          Returns the nodes along the ancestor axis using the specified node as the origin.
 java.lang.Iterable<N> getAncestorOrSelfAxis(N origin)
          Returns the nodes along the ancestor-or-self axis using the specified node as the origin.
 N getAttribute(N parent, S namespaceURI, S localName)
          Returns the attribute node with the specified expanded-QName.
 java.lang.Iterable<Q> getAttributeNames(N node, boolean orderCanonical)
          Returns the set of attribute names for the node.
 java.lang.Iterable<N> getChildAxis(N origin)
          Returns the nodes along the child axis using the specified node as the origin.
 S getLocalName(N node)
          Returns the local-name part of the node name.
 S getNamespaceURI(N node)
          Returns the namespace-uri part of the node name.
 NodeKind getNodeKind(N node)
          Returns the node-kind of the node as an enumeration in NodeKind.
 N getParent(N node)
          Returns the parent node of the node provided.
 java.lang.String getStringValue(N node)
          Returns the dm:string-value property of the node.
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Method Detail

getAncestorAxis

java.lang.Iterable<N> getAncestorAxis(N origin)
Returns the nodes along the ancestor axis using the specified node as the origin.

Parameters:
origin - The origin node.

getAncestorOrSelfAxis

java.lang.Iterable<N> getAncestorOrSelfAxis(N origin)
Returns the nodes along the ancestor-or-self axis using the specified node as the origin.

Parameters:
origin - The origin node.

getAttribute

N getAttribute(N parent,
               S namespaceURI,
               S localName)
Returns the attribute node with the specified expanded-QName.

Parameters:
parent - The node that is the parent of the attribute node.
namespaceURI - The namespace-uri part of the attribute name.
localName - The local-name part of the attribute name.

getAttributeNames

java.lang.Iterable<Q> getAttributeNames(N node,
                                        boolean orderCanonical)
Returns the set of attribute names for the node.

This method does not inherit attribute names in the reserved XML namespace.

Parameters:
node - The node for which the attribute names are required.
orderCanonical - Determines whether the names will be returned in canonical order (lexicographically by namespace URI,local name).

getChildAxis

java.lang.Iterable<N> getChildAxis(N origin)
Returns the nodes along the child axis using the specified node as the origin.
Corresponds to the dm:children accessor in the XDM.

Parameters:
origin - The origin node.

getLocalName

S getLocalName(N node)
Returns the local-name part of the node name.

Parameters:
node - The node for which the node local-name is required.

getNamespaceURI

S getNamespaceURI(N node)
Returns the namespace-uri part of the node name.

Parameters:
node - The node for which the node namespace-uri is required.

getNodeKind

NodeKind getNodeKind(N node)
Returns the node-kind of the node as an enumeration in NodeKind. Applies to all node kinds and never returns null.
Corresponds to the dm:node-kind accessor in the XDM.

Parameters:
node - The node for which the node-kind is required.

getParent

N getParent(N node)
Returns the parent node of the node provided.
May return null for top-most or orphaned nodes.
Corresponds to the dm:parent accessor in the XDM.

Parameters:
node - The node for which the parent is required.

getStringValue

java.lang.String getStringValue(N node)
Returns the dm:string-value property of the node. Applies to all node kinds.

Parameters:
node - The node for which the dm:string-value is required.


Copyright © 2009 TIBCO Software Inc. All Rights Reserved.