public class ElementImpl extends ParentNodeImpl
This class is an implementation of NodeInfo. The object is a wrapper around one entry in the arrays maintained by the LazyTree. Note that the same node might be represented by different LazyElementImpl objects at different times.
| Modifier and Type | Field and Description |
|---|---|
(package private) int[] |
attrNames |
(package private) String[] |
attrValues |
(package private) int |
nameSpace |
childNumdocument, nameCode, nextSibNum, NODE_LETTER, nodeNum, parentNum, prevSibNum| Constructor and Description |
|---|
ElementImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy this node to a given receiver
|
String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node
|
String |
getBaseURI()
Get the base URI of this element node.
|
int[] |
getDeclaredNamespaces(int[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
|
(package private) static int[] |
getDeclaredNamespaces(LazyDocument doc,
int nodeNr,
int nameSpace,
int[] buffer)
Static method to get all namespace undeclarations and undeclarations defined on a given element,
without instantiating the node object.
|
int |
getNodeKind()
Return the type of node.
|
int |
getTypeAnnotation()
Get the type annotation of this node, if any
Returns Type.UNTYPED_ANY if there is no type annotation
|
void |
init(int attrOffset,
int nameSpace)
Optional initialization function, depends on derived class
|
void |
sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
Output all namespace nodes associated with this element.
|
enumerateChildren, getFirstChild, getLastChild, getStringValue, getStringValueCS, hasChildNodes, iterateAxis, iterateAxisatomize, compareOrder, equals, generateId, getColumnNumber, getConfiguration, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getNextInDocument, getNextSibling, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getRoot, getSequenceNumber, getSystemId, getTypedValue, getURI, hashCode, isSameNodeInfo, setSystemIdpublic void init(int attrOffset,
int nameSpace)
throws IOException
NodeImplpublic final int getNodeKind()
public String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class NodeImplpublic int getTypeAnnotation()
getTypeAnnotation in interface NodeInfogetTypeAnnotation in class NodeImplpublic void sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
throws XPathException
sendNamespaceDeclarations in interface NodeInfosendNamespaceDeclarations in class NodeImplout - The relevant outputterincludeAncestors - True if namespaces associated with ancestorXPathExceptionpublic int[] getDeclaredNamespaces(int[] buffer)
getDeclaredNamespaces in interface NodeInfogetDeclaredNamespaces in class NodeImplbuffer - 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.
static int[] getDeclaredNamespaces(LazyDocument doc, int nodeNr, int nameSpace, int[] buffer)
doc - The lazy document containing the given element nodenodeNr - The node number of the given element node within the tinyTreebuffer - 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 String getAttributeValue(int fingerprint)
getAttributeValue in interface NodeInfogetAttributeValue in class NodeImplfingerprint - The fingerprint of the attribute namepublic void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
whichNamespaces - indicates which namespaces should be copied: all, none,
or local (i.e., those not declared on a parent element)XPathException