public class AxiomDocumentNodeWrapper extends AxiomParentNodeWrapper
Modifier and Type | Class and Description |
---|---|
protected static class |
AxiomDocumentNodeWrapper.FollowingSiblingIterator |
protected static class |
AxiomDocumentNodeWrapper.PrecedingSiblingIterator |
AxiomParentNodeWrapper.ChildWrappingIterator, AxiomParentNodeWrapper.DescendantWrappingIterator
node
treeInfo
IS_DTD_TYPE, IS_NILLED
Constructor and Description |
---|
AxiomDocumentNodeWrapper(org.apache.axiom.om.OMDocument root,
java.lang.String baseURI,
Configuration config)
Create a Saxon wrapper for an Axiom document node
|
Modifier and Type | Method and Description |
---|---|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in
document order.
|
boolean |
equals(java.lang.Object other)
Determine whether this is the same node as another node.
|
java.lang.String |
getBaseURI()
Get the Base URI for the node, that is, the URI used for resolving a relative URI contained
in the node.
|
java.lang.String |
getDisplayName()
Get the display name of this node.
|
java.lang.String |
getLocalPart()
Get the local part of the name of this node.
|
int |
getNodeKind()
Get the kind of node.
|
NodeInfo |
getParent()
Get the NodeInfo object representing the parent of this node
|
java.lang.String |
getPrefix()
Get the prefix of the name of the node.
|
NodeInfo |
getRoot()
Get the root node of the tree containing this node
|
int |
getSiblingPosition()
Get the index position of this node among its siblings (starting from 0)
|
java.lang.String |
getSystemId()
Get the System ID for the node.
|
java.lang.String |
getURI()
Get the URI part of the name of this node.
|
boolean |
isTyped()
Ask whether the document contains any nodes whose type annotation is anything other than
UNTYPED
|
protected AxisIterator |
iterateAttributes(NodeTest nodeTest)
Return an iterator over the attributes of this element node.
|
protected AxisIterator |
iterateSiblings(NodeTest nodeTest,
boolean forwards)
Return an iterator over the siblings of this node.
|
protected static NodeInfo |
makeWrapper(org.apache.axiom.om.OMNode node,
AxiomDocument docWrapper,
AxiomParentNodeWrapper parent,
int index)
Factory method to wrap an Axiom node with a wrapper that implements the
Saxon NodeInfo interface.
|
void |
setSystemId(java.lang.String systemId)
Set the system identifier for this Source.
|
atomize, generateId, getStringValueCS, getUnderlyingNode, hasChildNodes, iterateChildren, iterateDescendants
getAttributeValue, getColumnNumber, getDeclaredNamespaces, getFingerprint, getLineNumber, getNamePool, getRealNode, getStringValue, getTreeInfo, hasFingerprint, hashCode, iterateAxis, iterateAxis, saveLocation
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
copy, getAttributeValue, getColumnNumber, getConfiguration, getDeclaredNamespaces, getFingerprint, getGenre, getLineNumber, getPublicId, getSchemaType, getStringValue, getTreeInfo, hasFingerprint, hashCode, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, iterateAxis, iterateAxis, toShortString
getLength, head, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, effectiveBooleanValue, materialize
makeRepeatable
saveLocation
public AxiomDocumentNodeWrapper(org.apache.axiom.om.OMDocument root, java.lang.String baseURI, Configuration config)
root
- The Axiom root nodebaseURI
- The base URI for all the nodes in the treeconfig
- The configuration which defines the name pool used for all
names in this treeprotected static NodeInfo makeWrapper(org.apache.axiom.om.OMNode node, AxiomDocument docWrapper, AxiomParentNodeWrapper parent, int index)
node
- The Axiom node (an element, text, processing-instruction, or comment node)docWrapper
- The wrapper for the Document containing this nodeparent
- The wrapper for the parent of the Axiom node. May be null if not known.index
- The position of this node relative to its siblings. May be -1 if not knownpublic boolean isTyped()
public int getSiblingPosition()
public int getNodeKind()
Type.ELEMENT
or Type.ATTRIBUTE
. There are seven kinds of node: documents, elements, attributes,
text, comments, processing-instructions, and namespaces.Type
public boolean equals(java.lang.Object other)
Note that two different NodeInfo instances can represent the same conceptual node. Therefore the "==" operator should not be used to test node identity. The equals() method should give the same result as isSameNodeInfo(), but since this rule was introduced late it might not apply to all implementations.
Note: a.isSameNodeInfo(b) if and only if generateId(a)==generateId(b).
This method has the same semantics as isSameNode() in DOM Level 3, but works on Saxon NodeInfo objects rather than DOM Node objects.
equals
in interface NodeInfo
equals
in class AbstractNodeWrapper
other
- the node to be compared with this nodepublic java.lang.String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in class AbstractNodeWrapper
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.Source
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface Location
getSystemId
in interface NodeInfo
getSystemId
in interface org.xml.sax.Locator
getSystemId
in class AbstractNodeWrapper
public void setSystemId(java.lang.String systemId)
The system identifier is optional if the source does not get its data from a URL, but it may still be useful to provide one. The application can use a system identifier, for example, to resolve relative URIs and to include in error messages and warnings.
setSystemId
in interface javax.xml.transform.Source
setSystemId
in class AbstractNodeWrapper
systemId
- The system identifier as a URL string.public NodeInfo getParent()
public java.lang.String getLocalPart()
public java.lang.String getPrefix()
public java.lang.String getURI()
public java.lang.String getDisplayName()
getDisplayName
in interface NodeInfo
getDisplayName
in class AbstractNodeWrapper
public NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class AbstractNodeWrapper
protected AxisIterator iterateAttributes(NodeTest nodeTest)
AbstractNodeWrapper
iterateAttributes
in class AbstractNodeWrapper
nodeTest
- a test that the returned attributes must satisfyprotected AxisIterator iterateSiblings(NodeTest nodeTest, boolean forwards)
AbstractNodeWrapper
iterateSiblings
in class AbstractNodeWrapper
nodeTest
- a test that the returned siblings must satisfyforwards
- true for following siblings, false for preceding siblingspublic int compareOrder(NodeInfo other)
other
- The other node, whose position is to be compared with this
nodeCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.