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
ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
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.
|
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 |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another 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
comparePosition, copy, equals, getAttributeValue, getColumnNumber, getConfiguration, getDeclaredNamespaces, getFingerprint, getLineNumber, getNamePool, getPublicId, getRealNode, getSchemaType, getStringValue, getTreeInfo, hasFingerprint, hashCode, head, isId, isIdref, isNilled, isStreamed, iterate, iterateAxis, iterateAxis, saveLocation
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
comparePosition, copy, equals, getAttributeValue, getColumnNumber, getConfiguration, getDeclaredNamespaces, getFingerprint, getLineNumber, getPublicId, getSchemaType, getStringValue, getTreeInfo, hasFingerprint, hashCode, isId, isIdref, isNilled, isStreamed, iterateAxis, iterateAxis
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 isSameNodeInfo(NodeInfo other)
isSameNodeInfo
in interface NodeInfo
isSameNodeInfo
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-2018 Saxonica Limited. All rights reserved.