public class AxiomElementNodeWrapper extends AxiomParentNodeWrapper
AxiomParentNodeWrapper.ChildWrappingIterator, AxiomParentNodeWrapper.DescendantWrappingIterator
Modifier and Type | Field and Description |
---|---|
protected AxiomDocumentWrapper |
docWrapper |
protected int |
index |
node
ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
Modifier | Constructor and Description |
---|---|
protected |
AxiomElementNodeWrapper(org.apache.axiom.om.OMElement node,
AxiomDocumentWrapper docWrapper,
AxiomParentNodeWrapper parent,
int index)
This constructor is protected: nodes should be created using the wrap
factory method on the DocumentWrapper class
|
Modifier and Type | Method and Description |
---|---|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in
document order.
|
String |
getAttributeValue(String uri,
String local)
Get the string value of a given attribute of this node
|
NamespaceBinding[] |
getDeclaredNamespaces(NamespaceBinding[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
|
long |
getDocumentNumber()
Get the document number of the document containing this node.
|
DocumentInfo |
getDocumentRoot()
Get the root node, if it is a document node.
|
String |
getLocalPart()
Get the local part of the name of this node.
|
int |
getNodeKind()
Return the type of node.
|
AxiomParentNodeWrapper |
getParent()
Get the NodeInfo object representing the parent of this node
|
String |
getPrefix()
Get the prefix of the name of the node.
|
NodeInfo |
getRoot()
Get the root node of the tree containing this node
|
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)
|
int |
getTypeAnnotation()
Get the type annotation
|
String |
getURI()
Get the URI part of the name of this node.
|
protected AxisIterator<NodeInfo> |
iterateAttributes(NodeTest nodeTest)
Return an iterator over the attributes of this element node.
|
protected AxisIterator<NodeInfo> |
iterateSiblings(NodeTest nodeTest,
boolean forwards)
Return an iterator over the siblings of this node.
|
atomize, generateId, getStringValueCS, getUnderlyingNode, hasChildNodes, iterateChildren, iterateDescendants
comparePosition, copy, equals, getBaseURI, getColumnNumber, getConfiguration, getDisplayName, getFingerprint, getLineNumber, getNameCode, getNamePool, getRealNode, getStringValue, getSystemId, hashCode, head, isId, isIdref, isNilled, isSameNodeInfo, iterate, iterateAxis, iterateAxis, setSystemId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
comparePosition, copy, equals, getBaseURI, getColumnNumber, getConfiguration, getDisplayName, getFingerprint, getLineNumber, getNameCode, getNamePool, getStringValue, getSystemId, hashCode, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, iterateAxis
setSystemId
protected AxiomDocumentWrapper docWrapper
protected int index
protected AxiomElementNodeWrapper(org.apache.axiom.om.OMElement node, AxiomDocumentWrapper docWrapper, AxiomParentNodeWrapper parent, int index)
node
- The Axiom node to be wrappeddocWrapper
- The wrapper around the document node at the root of the treeparent
- The NodeWrapper that wraps the parent of this nodeindex
- Position of this node among its siblingspublic int getNodeKind()
Type
public int getTypeAnnotation()
getTypeAnnotation
in interface NodeInfo
getTypeAnnotation
in class AbstractNodeWrapper
For elements and attributes, this is the type annotation as defined in XDM. For document nodes, it should be one of XS_UNTYPED if the document has not been validated, or XS_ANY_TYPE if validation has taken place (that is, if any node in the document has an annotation other than Untyped or UntypedAtomic).
public SchemaType getSchemaType()
Types derived from a DTD are not reflected in the result of this method.
getSchemaType
in interface NodeInfo
getSchemaType
in class AbstractNodeWrapper
public int compareOrder(NodeInfo other)
other
- The other node, whose position is to be compared with this
nodepublic String getLocalPart()
public String getPrefix()
public String getURI()
public AxiomParentNodeWrapper getParent()
public int getSiblingPosition()
protected AxisIterator<NodeInfo> iterateAttributes(NodeTest nodeTest)
AbstractNodeWrapper
iterateAttributes
in class AbstractNodeWrapper
nodeTest
- a test that the returned attributes must satisfyprotected AxisIterator<NodeInfo> 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 String getAttributeValue(String uri, String local)
getAttributeValue
in interface NodeInfo
getAttributeValue
in class AbstractNodeWrapper
uri
- 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 NodeInfo getRoot()
getRoot
in interface NodeInfo
getRoot
in class AbstractNodeWrapper
public DocumentInfo getDocumentRoot()
public long getDocumentNumber()
getDocumentNumber
in interface NodeInfo
getDocumentNumber
in class AbstractNodeWrapper
public NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] buffer)
getDeclaredNamespaces
in interface NodeInfo
getDeclaredNamespaces
in class AbstractNodeWrapper
buffer
- 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.
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.