|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectNodeImpl
ProxyElement
public final class ProxyElement
A very lazy element. It assumes the attributes of the element can be known in advance without actually loading that element. If that assumption proves incorrect (i.e. by accessing anything else), the real element is loaded and its actual attributes are used. This class is used by SearchTree for many of its synthetic nodes.
| Field Summary | |
|---|---|
(package private) int[] |
attrNames
Pre-computed attribute names |
(package private) String[] |
attrValues
Pre-computed attribute values |
(package private) LazyDocument |
document
Document to use for loading |
(package private) ElementImpl |
element
The actual element (null until loaded) |
(package private) int |
nodeNum
Node number represented by this element |
| Fields inherited from class NodeImpl |
|---|
nameCode, nextSibNum, NODE_LETTER, 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 | |
|---|---|
ProxyElement(LazyDocument realDocument)
General constructor, attaches to a given lazy-loading document |
|
| Method Summary | |
|---|---|
void |
allocateAttributes(int nAttrs)
Allocate the attribute array. |
Value |
atomize()
Get the typed value. |
int |
compareOrder(NodeInfo other)
Loads the real node and defers to it |
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Loads the real node and defers to it |
void |
generateId(FastStringBuffer buffer)
Loads the real node and defers to it |
String |
getAttributeValue(int fingerprint)
Loads the real node and defers to it |
String |
getBaseURI()
Loads the real node and defers to it |
int |
getColumnNumber()
Loads the real node and defers to it |
Configuration |
getConfiguration()
Get the configuration |
int[] |
getDeclaredNamespaces(int[] buffer)
Loads the real node and defers to it |
String |
getDisplayName()
Loads the real node and defers to it |
int |
getDocumentNumber()
Loads the real node and defers to it |
DocumentInfo |
getDocumentRoot()
Loads the real node and defers to it |
int |
getFingerprint()
Loads the real node and defers to it |
int |
getLineNumber()
Loads the real node and defers to it |
String |
getLocalPart()
Loads the real node and defers to it |
int |
getNameCode()
Loads the real node and defers to it |
NamePool |
getNamePool()
Loads the real node and defers to it |
int |
getNodeKind()
Loads the real node and defers to it |
NodeInfo |
getParent()
Loads the real node and defers to it |
String |
getPrefix()
Loads the real node and defers to it |
String |
getPublicId()
Loads the real node and defers to it |
NodeInfo |
getRoot()
Loads the real node and defers to it |
long |
getSequenceNumber()
Loads the real node and defers to it |
String |
getStringValue()
Loads the real node and defers to it |
CharSequence |
getStringValueCS()
Loads the real node and defers to it |
String |
getSystemId()
Loads the real node and defers to it |
int |
getTypeAnnotation()
Loads the real node and defers to it |
SequenceIterator |
getTypedValue()
Loads the real node and defers to it |
String |
getURI()
Loads the real node and defers to it |
boolean |
hasChildNodes()
Loads the real node and defers to it |
boolean |
isSameNodeInfo(NodeInfo other)
Loads the real node and defers to it |
AxisIterator |
iterateAxis(byte axisNumber)
Loads the real node and defers to it |
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
If only the attributes are accessed, uses ProxyAttributeEnumeration to serve up the pre-computed attributes. |
private ElementImpl |
real()
Obtain the real underlying ElementImpl. |
void |
sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
Loads the real node and defers to it |
void |
setAttribute(int attrNum,
int nameCode,
String value)
Set an attribute |
void |
setChildNum(int num)
Establish the child node number |
void |
setNameCode(int code)
Establish a name for this node |
void |
setNextSibNum(int num)
Establish the next sibling node number |
void |
setNodeNum(int nodeNum)
Set the node number for this node. |
void |
setParentNum(int newParentNum)
Establish the parent node number |
void |
setPrevSibNum(int num)
Establish the previous sibling node number |
void |
setSystemId(String systemId)
Loads the real node and defers to it |
| Methods inherited from class NodeImpl |
|---|
equals, getFirstChild, getLastChild, getNextInDocument, getNextSibling, getPreviousInDocument, getPreviousSibling, hashCode, init |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface NodeInfo |
|---|
equals, hashCode |
| Field Detail |
|---|
ElementImpl element
LazyDocument document
int nodeNum
int[] attrNames
String[] attrValues
| Constructor Detail |
|---|
public ProxyElement(LazyDocument realDocument)
| Method Detail |
|---|
public void setNodeNum(int nodeNum)
setNodeNum in interface SearchNodepublic void allocateAttributes(int nAttrs)
allocateAttributes in interface SearchElement
public void setAttribute(int attrNum,
int nameCode,
String value)
setAttribute in interface SearchElementpublic void setParentNum(int newParentNum)
setParentNum in interface SearchNodepublic void setChildNum(int num)
setChildNum in interface SearchElementpublic void setNextSibNum(int num)
setNextSibNum in interface SearchNodepublic void setPrevSibNum(int num)
setPrevSibNum in interface SearchNodepublic void setNameCode(int code)
setNameCode in interface SearchElementprivate final ElementImpl real()
public long getSequenceNumber()
getSequenceNumber in class NodeImplpublic int compareOrder(NodeInfo other)
compareOrder in interface NodeInfocompareOrder in class NodeImplother - The other node, whose position is to be compared with this node
public Configuration getConfiguration()
NodeImpl
getConfiguration in interface NodeInfogetConfiguration in class NodeImplpublic void generateId(FastStringBuffer buffer)
generateId in interface NodeInfogenerateId in class NodeImplpublic String getAttributeValue(int fingerprint)
getAttributeValue in interface NodeInfogetAttributeValue in class NodeImplfingerprint - The fingerprint of the attribute name
public String getBaseURI()
getBaseURI in interface NodeInfogetBaseURI in class NodeImplpublic int getFingerprint()
getFingerprint in interface NodeInfogetFingerprint in class NodeImplpublic String getLocalPart()
getLocalPart in interface NodeInfogetLocalPart in class NodeImplpublic int getNameCode()
getNameCode in interface NodeInfogetNameCode in class NodeImplpublic NodeInfo getParent()
getParent in interface NodeInfogetParent in class NodeImplpublic String getStringValue()
getStringValue in interface ItemgetStringValue in interface NodeInfogetStringValue in interface ValueRepresentationpublic String getSystemId()
getSystemId in interface SourcegetSystemId in interface SourceLocatorgetSystemId in interface NodeInfogetSystemId in class NodeImplpublic String getURI()
getURI in interface NodeInfogetURI in class NodeImplpublic boolean hasChildNodes()
hasChildNodes in interface NodeInfohasChildNodes in class NodeImpltrue if the node has any children,
false if the node has no children.public boolean isSameNodeInfo(NodeInfo other)
isSameNodeInfo in interface NodeInfoisSameNodeInfo in class NodeImpl
public AxisIterator iterateAxis(byte axisNumber,
NodeTest nodeTest)
iterateAxis in interface NodeInfoiterateAxis in class NodeImplaxisNumber - The axis to be iterated overnodeTest - A pattern to be matched by the returned nodes
public String getPrefix()
getPrefix in interface NodeInfogetPrefix in class NodeImpl
public void copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
throws XPathException
copy in interface NodeInfoXPathExceptionpublic NamePool getNamePool()
getNamePool in interface NodeInfogetNamePool in class NodeImplpublic int getNodeKind()
getNodeKind in interface NodeInfopublic AxisIterator iterateAxis(byte axisNumber)
iterateAxis in interface NodeInfoiterateAxis in class NodeImplaxisNumber - The axis to be iterated over
public void setSystemId(String systemId)
setSystemId in interface SourcesetSystemId in class NodeImplpublic String getDisplayName()
getDisplayName in interface NodeInfogetDisplayName in class NodeImplpublic int getDocumentNumber()
getDocumentNumber in interface NodeInfogetDocumentNumber in class NodeImplpublic DocumentInfo getDocumentRoot()
getDocumentRoot in interface NodeInfogetDocumentRoot in class NodeImplpublic NodeInfo getRoot()
getRoot in interface NodeInfogetRoot in class NodeImplpublic int getTypeAnnotation()
getTypeAnnotation in interface NodeInfogetTypeAnnotation in class NodeImpl
public void sendNamespaceDeclarations(Receiver out,
boolean includeAncestors)
throws XPathException
sendNamespaceDeclarations in interface NodeInfosendNamespaceDeclarations in class NodeImplout - The relevant outputterincludeAncestors - True if namespaces declared on ancestor elements must
XPathExceptionpublic int getColumnNumber()
getColumnNumber in interface SourceLocatorgetColumnNumber in class NodeImplpublic 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.
public int getLineNumber()
getLineNumber in interface SourceLocatorgetLineNumber in interface NodeInfogetLineNumber in class NodeImplpublic String getPublicId()
getPublicId in interface SourceLocatorgetPublicId in class NodeImplpublic CharSequence getStringValueCS()
getStringValueCS in interface ItemgetStringValueCS in interface ValueRepresentationgetStringValueCS in class NodeImpl
public SequenceIterator getTypedValue()
throws XPathException
getTypedValue in interface ItemgetTypedValue in class NodeImplXPathException
public Value atomize()
throws XPathException
NodeImplItem.getTypedValue(). However, this method is often more convenient and may be
more efficient, especially in the common case where the value is expected to be a singleton.
atomize in interface NodeInfoatomize in class NodeImplXPathException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||