|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GxModel<N,A,S,T>
Aspect of the data model interface providing read-only access to the XQuery Data Model tree.
Method Summary | |
---|---|
int |
compare(N one,
N two)
Determines the relative document order of two nodes. |
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. |
A |
getAtom(N node,
int index)
Returns the atom at a specified index consistent with getTypedValue(N) . |
int |
getAtomCount(N node)
Returns the number of atoms in the node consistent with getTypedValue(N) . |
N |
getAttribute(N parent,
S namespaceURI,
S localName)
Returns the attribute node with the specified expanded-QName. |
java.lang.Iterable<N> |
getAttributeAxis(N origin,
boolean inherit)
Returns the nodes along the attribute axis using the specified node as the origin. |
java.net.URI |
getBaseURI(N node)
Returns the base-uri property of the node. |
java.lang.Iterable<N> |
getChildAxis(N origin)
Returns the nodes along the child axis using the specified node as the origin. |
java.lang.Iterable<N> |
getChildElements(N origin)
Returns all the child element along the child axis. |
java.lang.Iterable<N> |
getChildElementsByName(N origin,
S namespaceURI,
S localName)
Returns all the child element along the child axis whose names match the arguments supplied. |
java.lang.Iterable<N> |
getDescendantAxis(N origin)
Returns the nodes along the descendant axis using the specified node as the origin. |
java.lang.Iterable<N> |
getDescendantOrSelfAxis(N origin)
Returns the nodes along the descendant-or-self axis using the specified node as the origin. |
java.net.URI |
getDocumentURI(N node)
Returns the absolute URI of the resource from which the Document Node was constructed. |
N |
getFirstChild(N origin)
Returns the first child node of the node provided. |
N |
getFirstChildElement(N origin)
Returns the first child element along the child axis. |
N |
getFirstChildElementByName(N origin,
S namespaceURI,
S localName)
Returns the first child element along the child axis whose name matches the arguments supplied. |
java.lang.Iterable<N> |
getFollowingAxis(N origin)
Returns the nodes along the following axis using the specified node as the origin. |
java.lang.Iterable<N> |
getFollowingSiblingAxis(N origin)
Returns the nodes along the following-sibling axis using the specified node as the origin. |
N |
getLastChild(N origin)
Returns the last child node of the node provided. |
int |
getLineNumber(N node)
Returns the line number, or -1 if none is available. |
S |
getLocalName(N node)
Returns the local-name part of the node name. |
java.lang.String |
getLocalNameAsString(N node)
Returns the local-name part of the node name as a String. |
GxNameBridge<S> |
getNameBridge()
Returns the name bridge associated with this model. |
java.lang.Iterable<N> |
getNamespaceAxis(N node,
boolean inherit)
Returns the nodes along the namespace axis using the specified node as the origin. |
java.lang.Iterable<GxNamespaceBinding<S>> |
getNamespaceBindings(N node)
Returns the namespace bindings associated with the node as a set or prefix/URI pairs. |
S |
getNamespaceURI(N node)
Returns the namespace-uri part of the node name. |
java.lang.String |
getNamespaceURIAsString(N node)
Returns the namespace-uri part of the node name as a String. |
N |
getNextSibling(N origin)
Returns the next sibling node of the node provided. |
N |
getNextSiblingElement(N node)
Returns the next element along the child axis. |
N |
getNextSiblingElementByName(N node,
S namespaceURI,
S localName)
Returns the next element along the following-sibling axis whose name matches the arguments supplied. |
NodeKind |
getNodeKind(N node)
Returns the node-kind of the node as an enumerated type in NodeKind . |
N |
getParent(N origin)
Returns the parent node of the node provided. |
java.lang.Iterable<N> |
getPrecedingAxis(N origin)
Returns the nodes along the preceding axis using the specified node as the origin. |
java.lang.Iterable<N> |
getPrecedingSiblingAxis(N origin)
Returns the nodes along the preceding-sibling axis using the specified node as the origin. |
java.lang.String |
getPrefix(N node)
Returns the prefix part of the node name. |
N |
getPreviousSibling(N origin)
Returns the previous sibling node of the node provided. |
N |
getRoot(N node)
Returns the identity of the top-most node along the ancestor-or-self axis from this node. |
java.lang.String |
getStringValue(N node)
Returns the dm:string-value property of the node. |
S |
getSymbolValue(N node)
Equivalent to getStringValue(N) followed by symbolize. |
java.util.List<A> |
getTypedValue(N node)
Returns the dm:typed-value property of the node paying attention to the emulation mode in cases where it is neccessary to serialize a typed-value to a string-value. |
SmName<S> |
getTypeName(N node)
Gets the type name of an element or attribute node. |
boolean |
hasAttributes(N node)
Determines whether there are attribute nodes on the attribute axis for this node. |
boolean |
hasChildren(N node)
Determines whether there are nodes on the child axis for this node. |
boolean |
hasNamespaces(N node)
Determines whether prefix to namespace mappings exist for this node. |
boolean |
hasNextSibling(N node)
Determines whether there are nodes on the following-sibling axis for this node. |
boolean |
hasParent(N node)
Determines whether there are nodes on the parent axis for this node. |
boolean |
hasPreviousSibling(N node)
Determines whether there are nodes on the preceding-sibling axis for this node. |
java.lang.Boolean |
isID(N node)
Returns true if the node is an XML ID. |
java.lang.Boolean |
isIDREFS(N node)
Returns true if the node is an XML IDREF or IDREFS. |
boolean |
isSameNode(N one,
N two)
Determines whether the two nodes represent the same nodes based upon identity. |
boolean |
matches(N node,
NodeKind kind,
S namespace,
S localName)
Determines whether the specified node matches in kind and name. |
java.lang.Boolean |
nilled(N node)
Returns true if the node is "nilled". |
N[] |
nodeArray(int size)
Allocates an empty array of nodes. |
void |
stream(N node,
boolean copyNamespaces,
boolean copyTypeAnnotations,
GxContentHandler<A,S,T> handler)
Support for streaming a node to a GxContentHandler . |
java.lang.String |
unparsedEntityPublicId(N node,
java.lang.String entityName)
Returns the public identifier of an unparsed external entity declared in the specified document. |
java.lang.String |
unparsedEntitySystemId(N node,
java.lang.String entityName)
Returns the system identifier of an unparsed external entity declared in the specified document. |
Methods inherited from interface org.gxml.xdm.Model |
---|
getAttributeNames |
Methods inherited from interface java.util.Comparator |
---|
equals |
Method Detail |
---|
int compare(N one, N two)
compare
in interface java.util.Comparator<N>
one
- The first node used in the comparison.two
- The second node in the comparison.java.lang.Iterable<N> getAncestorAxis(N origin)
getAncestorAxis
in interface Model<N,S,SmName<S>>
origin
- The origin node.java.lang.Iterable<N> getAncestorOrSelfAxis(N origin)
getAncestorOrSelfAxis
in interface Model<N,S,SmName<S>>
origin
- The origin node.A getAtom(N node, int index)
getTypedValue(N)
.
node
- The node for which the atom is required.index
- The zero-based index of the atom.int getAtomCount(N node)
getTypedValue(N)
.
node
- The node for which the number of atoms are required.N getAttribute(N parent, S namespaceURI, S localName)
getAttribute
in interface Model<N,S,SmName<S>>
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.java.lang.Iterable<N> getAttributeAxis(N origin, boolean inherit)
origin
- The origin node.inherit
- Determines whether attribultes in the XML namespace will be inherited. The standard value for this
parameter is false
.java.net.URI getBaseURI(N node) throws java.net.URISyntaxException
java.net.URISyntaxException
java.lang.Iterable<N> getChildAxis(N origin)
getChildAxis
in interface Model<N,S,SmName<S>>
origin
- The origin node.java.lang.Iterable<N> getChildElements(N origin)
origin
- The parent node that owns the child axis.java.lang.Iterable<N> getChildElementsByName(N origin, S namespaceURI, S localName)
origin
- The parent node that owns the child axis.namespaceURI
- The namespace-uri to be matched.localName
- The local-name to be matched.java.lang.Iterable<N> getDescendantAxis(N origin)
origin
- The origin node.java.lang.Iterable<N> getDescendantOrSelfAxis(N origin)
origin
- The origin node.java.net.URI getDocumentURI(N node)
N getFirstChild(N origin)
origin
- The node for which the first child node is required.N getFirstChildElement(N origin)
origin
- The parent node that owns the child axis.N getFirstChildElementByName(N origin, S namespaceURI, S localName)
origin
- The parent node that owns the child axis.namespaceURI
- The namespace-uri to be matched.localName
- The local-name to be matched.java.lang.Iterable<N> getFollowingAxis(N origin)
origin
- The origin node.java.lang.Iterable<N> getFollowingSiblingAxis(N origin)
origin
- The origin node.N getLastChild(N origin)
origin
- The node for which the last child node is required.int getLineNumber(N node)
-1
if none is available.
S getLocalName(N node)
getLocalName
in interface Model<N,S,SmName<S>>
node
- The node for which the node local-name is required.java.lang.String getLocalNameAsString(N node)
node
- The node for which the node local-name is required.GxNameBridge<S> getNameBridge()
java.lang.Iterable<N> getNamespaceAxis(N node, boolean inherit)
node
- The origin node.inherit
- Determines whether in-scope prefix mappings will be included in the result. The standard setting for
this parameter is true
.java.lang.Iterable<GxNamespaceBinding<S>> getNamespaceBindings(N node)
node
- The node under consideration.S getNamespaceURI(N node)
getNamespaceURI
in interface Model<N,S,SmName<S>>
node
- The node for which the node namespace-uri is required.java.lang.String getNamespaceURIAsString(N node)
node
- The node for which the node local-name is required.N getNextSibling(N origin)
origin
- The node for which the next sibling node is required.N getNextSiblingElement(N node)
node
- The node for which the next sibling node is required.N getNextSiblingElementByName(N node, S namespaceURI, S localName)
node
- The node for which the next sibling node is required.namespaceURI
- The namespace-uri to be matched.localName
- The local-name to be matched.NodeKind getNodeKind(N node)
NodeKind
. null
.
getNodeKind
in interface Model<N,S,SmName<S>>
node
- The node for which the node-kind is required.N getParent(N origin)
null
for top-most or orphaned nodes.
getParent
in interface Model<N,S,SmName<S>>
origin
- The node for which the parent is required.java.lang.Iterable<N> getPrecedingAxis(N origin)
origin
- The origin node.java.lang.Iterable<N> getPrecedingSiblingAxis(N origin)
origin
- The origin node.java.lang.String getPrefix(N node)
node
- The node for which the prefix-hint is required.N getPreviousSibling(N origin)
origin
- The node for which the previous sibling node is required.N getRoot(N node)
node
- The node from which to begin the search for the top-most node.java.lang.String getStringValue(N node)
getStringValue
in interface Model<N,S,SmName<S>>
node
- The node for which the dm:string-value is required.S getSymbolValue(N node)
getStringValue(N)
followed by symbolize.
SmName<S> getTypeName(N node)
null
for all other node kinds.
node
- The node for which the type name is required.java.util.List<A> getTypedValue(N node)
node
- The node for which dm:typed-value is required.boolean hasAttributes(N node)
node
- The node under consideration.boolean hasChildren(N node)
node
- The node under consideration.boolean hasNamespaces(N node)
node
- The node under consideration.boolean hasNextSibling(N node)
node
- The node under consideration.boolean hasParent(N node)
node
- The node under consideration.boolean hasPreviousSibling(N node)
node
- The node under consideration.java.lang.Boolean isID(N node)
true
if the node is an XML ID.
node
- The node for which the dm:is-id accessor is required.java.lang.Boolean isIDREFS(N node)
true
if the node is an XML IDREF or IDREFS.
node
- The node for which the dm:is-idrefs accessor is required.boolean isSameNode(N one, N two)
one
- The first node used in the comparison.two
- The second node in the comparison.boolean matches(N node, NodeKind kind, S namespace, S localName)
node
- The node being tested.kind
- The nodekind specification.namespace
- The namespace part of the name.localName
- The local-name part of the name.
true
if the node matches the arguments specified, otherwise false
.java.lang.Boolean nilled(N node)
true
if the node is "nilled".
node
- The node for which the dm:nilled accessor is required.N[] nodeArray(int size)
size
- The size of the array of nodes.void stream(N node, boolean copyNamespaces, boolean copyTypeAnnotations, GxContentHandler<A,S,T> handler) throws GxException
GxContentHandler
.
node
- The node to be streamed.copyNamespaces
- Determines whether namespaces nodes are streamed.copyTypeAnnotations
- Determines whether type annotations are streamed.handler
- The handler for events generated.
GxException
java.lang.String unparsedEntityPublicId(N node, java.lang.String entityName)
node
- The node for which the dm:unparsed-entity-public-id accessor is required.entityName
- The entity name.java.lang.String unparsedEntitySystemId(N node, java.lang.String entityName)
node
- The node for which the dm:unparsed-entity-system-id accessor is required.entityName
- The entity name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |