public class XOMNodeWrapper
extends net.sf.saxon.tree.wrapper.AbstractNodeWrapper
implements net.sf.saxon.tree.wrapper.VirtualNode, net.sf.saxon.tree.wrapper.SiblingCountingNode, net.sf.saxon.tree.util.SteppingNode
| Modifier and Type | Field and Description |
|---|---|
protected XOMDocumentWrapper |
docWrapper |
protected int |
index |
protected nu.xom.Node |
node |
protected short |
nodeKind |
| Modifier | Constructor and Description |
|---|---|
protected |
XOMNodeWrapper(nu.xom.Node node,
XOMNodeWrapper parent,
int index)
This constructor is protected: nodes should be created using the wrap
factory method on the XOMDocumentWrapper class
|
| Modifier and Type | Method and Description |
|---|---|
net.sf.saxon.om.AtomicSequence |
atomize()
Get the typed value.
|
int |
compareOrder(net.sf.saxon.om.NodeInfo other)
Determine the relative position of this node and another node, in
document order.
|
int |
comparePosition(net.sf.saxon.om.NodeInfo other)
Determine the relative position of this node and another node, in document order,
distinguishing whether the first node is a preceding, following, descendant, ancestor,
or the same node as the second.
|
void |
copy(net.sf.saxon.event.Receiver out,
int copyOptions,
int locationId)
Copy this node to a given outputter (deep copy)
|
void |
delete()
Delete this node (that is, detach it from its parent)
|
boolean |
equals(Object other)
The equals() method compares nodes for identity.
|
void |
generateId(net.sf.saxon.tree.util.FastStringBuffer buffer)
Get a character string that uniquely identifies this node.
|
String |
getAttributeValue(String uri,
String local)
Get the string value of a given attribute of this node
|
String |
getBaseURI()
Get the Base URI for the node, that is, the URI used for resolving a
relative URI contained in the node.
|
int |
getColumnNumber()
Get column number
|
net.sf.saxon.Configuration |
getConfiguration()
Get the configuration
|
net.sf.saxon.om.NamespaceBinding[] |
getDeclaredNamespaces(net.sf.saxon.om.NamespaceBinding[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
|
String |
getDisplayName()
Get the display name of this node.
|
long |
getDocumentNumber()
Get the document number of the document containing this node.
|
net.sf.saxon.om.DocumentInfo |
getDocumentRoot()
Get the root node, if it is a document node.
|
int |
getFingerprint()
Get fingerprint.
|
net.sf.saxon.tree.util.SteppingNode |
getFirstChild() |
int |
getLineNumber()
Get line number
|
String |
getLocalPart()
Get the local part of the name of this node.
|
int |
getNameCode()
Get name code.
|
net.sf.saxon.om.NamePool |
getNamePool()
Get the name pool for this node
|
net.sf.saxon.tree.util.SteppingNode |
getNextSibling() |
int |
getNodeKind()
Return the type of node.
|
net.sf.saxon.tree.util.SteppingNode |
getParent()
Get the NodeInfo object representing the parent of this node
|
String |
getPrefix()
Get the prefix of the name of the node.
|
net.sf.saxon.tree.util.SteppingNode |
getPreviousSibling() |
net.sf.saxon.om.NodeInfo |
getRoot()
Get the root node of the tree containing this node
|
net.sf.saxon.type.SchemaType |
getSchemaType()
Get the type annotation of this node, if any.
|
int |
getSiblingPosition()
Get the index position of this node among its siblings (starting from 0)
|
String |
getStringValue()
Return the string value of the node.
|
CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence.
|
net.sf.saxon.tree.util.SteppingNode |
getSuccessorElement(net.sf.saxon.tree.util.SteppingNode anchor,
String uri,
String local) |
String |
getSystemId()
Get the System ID for the node.
|
int |
getTypeAnnotation()
Get the type annotation
|
Object |
getUnderlyingNode()
Get the underlying XOM node, to implement the VirtualNode interface
|
String |
getURI()
Get the URI part of the name of this node.
|
boolean |
hasChildNodes()
Determine whether the node has any children.
|
int |
hashCode()
The hashCode() method obeys the contract for hashCode(): that is, if two objects are equal
(represent the same node) then they must have the same hashCode()
|
boolean |
isId()
Determine whether this node has the is-id property
|
boolean |
isIdref()
Determine whether this node has the is-idref property
|
boolean |
isNilled()
Determine whether the node has the is-nilled property
|
boolean |
isSameNodeInfo(net.sf.saxon.om.NodeInfo other)
Determine whether this is the same node as another node.
|
net.sf.saxon.om.SequenceIterator |
iterate()
To implement
Sequence, this method returns a singleton iterator
that delivers this item in the form of a sequence |
protected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> |
iterateAttributes(net.sf.saxon.pattern.NodeTest nodeTest)
Return an iteration over the nodes reached by the given axis from this
node
// * @param axisNumber
the axis to be used
|
protected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> |
iterateChildren(net.sf.saxon.pattern.NodeTest nodeTest) |
protected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> |
iterateDescendants(net.sf.saxon.pattern.NodeTest nodeTest,
boolean includeSelf) |
protected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> |
iterateSiblings(net.sf.saxon.pattern.NodeTest nodeTest,
boolean forwards) |
protected XOMNodeWrapper |
makeWrapper(nu.xom.Node node,
XOMDocumentWrapper docWrapper)
Factory method to wrap a XOM node with a wrapper that implements the
Saxon NodeInfo interface.
|
protected XOMNodeWrapper |
makeWrapper(nu.xom.Node node,
XOMDocumentWrapper docWrapper,
XOMNodeWrapper parent,
int index)
Factory method to wrap a XOM node with a wrapper that implements the
Saxon NodeInfo interface.
|
void |
setSystemId(String uri) |
getRealNode, head, iterateAxis, iterateAxisprotected nu.xom.Node node
protected short nodeKind
protected XOMDocumentWrapper docWrapper
protected int index
protected XOMNodeWrapper(nu.xom.Node node,
XOMNodeWrapper parent,
int index)
node - The XOM node to be wrappedparent - The XOMNodeWrapper that wraps the parent of this nodeindex - Position of this node among its siblingsprotected final XOMNodeWrapper makeWrapper(nu.xom.Node node, XOMDocumentWrapper docWrapper)
node - The XOM nodedocWrapper - The wrapper for the Document containing this nodeprotected final XOMNodeWrapper makeWrapper(nu.xom.Node node, XOMDocumentWrapper docWrapper, XOMNodeWrapper parent, int index)
node - The XOM nodedocWrapper - The wrapper for the Document containing this nodeparent - The wrapper for the parent of the XOM nodeindex - The position of this node relative to its siblingspublic net.sf.saxon.om.SequenceIterator iterate()
Sequence, this method returns a singleton iterator
that delivers this item in the form of a sequenceiterate in interface net.sf.saxon.om.Sequenceiterate in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic net.sf.saxon.Configuration getConfiguration()
getConfiguration in interface net.sf.saxon.om.NodeInfogetConfiguration in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic Object getUnderlyingNode()
getUnderlyingNode in interface net.sf.saxon.tree.wrapper.VirtualNodepublic net.sf.saxon.om.NamePool getNamePool()
getNamePool in interface net.sf.saxon.om.NodeInfogetNamePool in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic int getNodeKind()
getNodeKind in interface net.sf.saxon.om.NodeInfopublic net.sf.saxon.om.AtomicSequence atomize()
atomize in interface net.sf.saxon.om.NodeInfoatomize in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic int getTypeAnnotation()
getTypeAnnotation in interface net.sf.saxon.om.NodeInfogetTypeAnnotation in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic net.sf.saxon.type.SchemaType getSchemaType()
Types derived from a DTD are not reflected in the result of this method.
getSchemaType in interface net.sf.saxon.om.NodeInfogetSchemaType in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic boolean isSameNodeInfo(net.sf.saxon.om.NodeInfo other)
isSameNodeInfo in interface net.sf.saxon.om.NodeInfoisSameNodeInfo in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic boolean equals(Object other)
equals in interface net.sf.saxon.om.NodeInfoequals in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperother - the node to be compared with this nodepublic int hashCode()
hashCode in interface net.sf.saxon.om.NodeInfohashCode in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic String getSystemId()
getSystemId in interface SourcegetSystemId in interface net.sf.saxon.om.NodeInfogetSystemId in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic void setSystemId(String uri)
setSystemId in interface SourcesetSystemId in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic String getBaseURI()
getBaseURI in interface net.sf.saxon.om.NodeInfogetBaseURI in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic int getLineNumber()
getLineNumber in interface net.sf.saxon.om.NodeInfogetLineNumber in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic int getColumnNumber()
getColumnNumber in interface net.sf.saxon.om.NodeInfogetColumnNumber in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic int compareOrder(net.sf.saxon.om.NodeInfo other)
compareOrder in interface net.sf.saxon.om.NodeInfoother - The other node, whose position is to be compared with this
nodepublic int comparePosition(net.sf.saxon.om.NodeInfo other)
comparePosition in interface net.sf.saxon.om.NodeInfocomparePosition in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperother - The other node, whose position is to be compared with this
nodeAxisInfo.PRECEDING if this node is on the preceding axis of the other node;
AxisInfo.FOLLOWING if it is on the following axis; AxisInfo.ANCESTOR if the first node is an
ancestor of the second; AxisInfo.DESCENDANT if the first is a descendant of the second;
AxisInfo.SELF if they are the same node.UnsupportedOperationException - if either node is an attribute or namespacepublic String getStringValue()
getStringValue in interface net.sf.saxon.om.ItemgetStringValue in interface net.sf.saxon.om.NodeInfogetStringValue in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic CharSequence getStringValueCS()
getStringValueCS in interface net.sf.saxon.om.Itempublic int getNameCode()
getNameCode in interface net.sf.saxon.om.NodeInfogetNameCode in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperallocatepublic int getFingerprint()
getFingerprint in interface net.sf.saxon.om.NodeInfogetFingerprint in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic String getLocalPart()
getLocalPart in interface net.sf.saxon.om.NodeInfopublic String getPrefix()
getPrefix in interface net.sf.saxon.om.NodeInfopublic String getURI()
getURI in interface net.sf.saxon.om.NodeInfopublic String getDisplayName()
getDisplayName in interface net.sf.saxon.om.NodeInfogetDisplayName in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic net.sf.saxon.tree.util.SteppingNode getParent()
getParent in interface net.sf.saxon.om.NodeInfogetParent in interface net.sf.saxon.tree.util.SteppingNodepublic net.sf.saxon.tree.util.SteppingNode getNextSibling()
getNextSibling in interface net.sf.saxon.tree.util.SteppingNodepublic net.sf.saxon.tree.util.SteppingNode getPreviousSibling()
getPreviousSibling in interface net.sf.saxon.tree.util.SteppingNodepublic net.sf.saxon.tree.util.SteppingNode getFirstChild()
getFirstChild in interface net.sf.saxon.tree.util.SteppingNodepublic net.sf.saxon.tree.util.SteppingNode getSuccessorElement(net.sf.saxon.tree.util.SteppingNode anchor,
String uri,
String local)
getSuccessorElement in interface net.sf.saxon.tree.util.SteppingNodepublic int getSiblingPosition()
getSiblingPosition in interface net.sf.saxon.tree.wrapper.SiblingCountingNodeprotected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> iterateAttributes(net.sf.saxon.pattern.NodeTest nodeTest)
iterateAttributes in class net.sf.saxon.tree.wrapper.AbstractNodeWrappernodeTest - A pattern to be matched by the returned nodesprotected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> iterateChildren(net.sf.saxon.pattern.NodeTest nodeTest)
iterateChildren in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperprotected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> iterateSiblings(net.sf.saxon.pattern.NodeTest nodeTest,
boolean forwards)
iterateSiblings in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperprotected net.sf.saxon.tree.iter.AxisIterator<net.sf.saxon.om.NodeInfo> iterateDescendants(net.sf.saxon.pattern.NodeTest nodeTest,
boolean includeSelf)
iterateDescendants in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic String getAttributeValue(String uri, String local)
getAttributeValue in interface net.sf.saxon.om.NodeInfogetAttributeValue in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperuri - the namespace URI of the attribute name. Supply the empty string for an attribute
that is in no namespacelocal - the local part of the attribute name.public net.sf.saxon.om.NodeInfo getRoot()
getRoot in interface net.sf.saxon.om.NodeInfogetRoot in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic net.sf.saxon.om.DocumentInfo getDocumentRoot()
getDocumentRoot in interface net.sf.saxon.om.NodeInfopublic boolean hasChildNodes()
hasChildNodes in interface net.sf.saxon.om.NodeInfohasChildNodes in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic void generateId(net.sf.saxon.tree.util.FastStringBuffer buffer)
generateId in interface net.sf.saxon.om.NodeInfobuffer - a buffer to contain a string that uniquely identifies this node, across all documentspublic long getDocumentNumber()
getDocumentNumber in interface net.sf.saxon.om.NodeInfogetDocumentNumber in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic void copy(net.sf.saxon.event.Receiver out,
int copyOptions,
int locationId)
throws net.sf.saxon.trans.XPathException
copy in interface net.sf.saxon.om.NodeInfocopy in class net.sf.saxon.tree.wrapper.AbstractNodeWrappernet.sf.saxon.trans.XPathExceptionpublic net.sf.saxon.om.NamespaceBinding[] getDeclaredNamespaces(net.sf.saxon.om.NamespaceBinding[] buffer)
getDeclaredNamespaces in interface net.sf.saxon.om.NodeInfogetDeclaredNamespaces in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperbuffer - If this is non-null, and the result array fits in this buffer, then the result
may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.For a node other than an element, the method returns null.
public boolean isId()
isId in interface net.sf.saxon.om.NodeInfoisId in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic boolean isIdref()
isIdref in interface net.sf.saxon.om.NodeInfoisIdref in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic boolean isNilled()
isNilled in interface net.sf.saxon.om.NodeInfoisNilled in class net.sf.saxon.tree.wrapper.AbstractNodeWrapperpublic void delete()
throws net.sf.saxon.trans.XPathException
net.sf.saxon.trans.XPathExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.