|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectNodeImpl
ParentNodeImpl
ElementImpl
public class ElementImpl
A node in the XML parse tree representing an XML element.
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.
Field Summary | |
---|---|
(package private) int[] |
attrNames
|
(package private) String[] |
attrValues
|
(package private) int |
nameSpace
|
Fields inherited from class ParentNodeImpl |
---|
childNum |
Fields inherited from class NodeImpl |
---|
document, nameCode, nextSibNum, NODE_LETTER, nodeNum, parentNum, prevSibNum |
Fields inherited from interface NodeInfo |
---|
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES |
Fields inherited from interface ValueRepresentation |
---|
EMPTY_VALUE_ARRAY |
Constructor Summary | |
---|---|
ElementImpl()
|
Method Summary | |
---|---|
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. |
Methods inherited from class ParentNodeImpl |
---|
enumerateChildren, getFirstChild, getLastChild, getStringValue, getStringValueCS, hasChildNodes, iterateAxis, iterateAxis |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int nameSpace
int[] attrNames
String[] attrValues
Constructor Detail |
---|
public ElementImpl()
Method Detail |
---|
public void init(int attrOffset, int nameSpace) throws IOException
NodeImpl
init
in class NodeImpl
IOException
public final int getNodeKind()
public String getBaseURI()
getBaseURI
in interface NodeInfo
getBaseURI
in class NodeImpl
public int getTypeAnnotation()
getTypeAnnotation
in interface NodeInfo
getTypeAnnotation
in class NodeImpl
public void sendNamespaceDeclarations(Receiver out, boolean includeAncestors) throws XPathException
sendNamespaceDeclarations
in interface NodeInfo
sendNamespaceDeclarations
in class NodeImpl
out
- The relevant outputterincludeAncestors
- True if namespaces associated with ancestor
XPathException
public int[] getDeclaredNamespaces(int[] buffer)
getDeclaredNamespaces
in interface NodeInfo
getDeclaredNamespaces
in class NodeImpl
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.
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 NodeInfo
getAttributeValue
in class NodeImpl
fingerprint
- The fingerprint of the attribute name
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |