|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.dom.NodeProxy
Placeholder class for any DOM-node. NodeProxy stores a node's unique id and the document a node belongs to. eXist will always try to use a NodeProxy instead of the actual node. Using a NodeProxy is much cheaper than loading the actual node from the database. All sets of type NodeSet operate on NodeProxys. NodeProxy implements Comparable, which is needed by all node-sets. To convert a NodeProxy to a real node, simply call getNode().
Nested Class Summary | |
static class |
NodeProxy.NodeProxyComparator
|
Field Summary | |
LongLinkedList |
contextNodes
|
DocumentImpl |
doc
|
long |
gid
|
long |
internalAddress
|
Match[] |
matches
|
short |
nodeType
|
Constructor Summary | |
NodeProxy()
|
|
NodeProxy(DocumentImpl doc,
long gid)
Construct a node proxy with unique id gid and owned by document doc. |
|
NodeProxy(DocumentImpl doc,
long gid,
long address)
Constructor for the NodeProxy object |
|
NodeProxy(DocumentImpl doc,
long gid,
short nodeType)
as above, but a hint is given about the node type of this proxy-object. |
|
NodeProxy(DocumentImpl doc,
long gid,
short nodeType,
long address)
Constructor for the NodeProxy object |
|
NodeProxy(NodeImpl node)
Constructor for the NodeProxy object |
|
NodeProxy(NodeProxy p)
Constructor for the NodeProxy object |
Method Summary | |
void |
addContextNode(NodeProxy node)
|
void |
addMatch(Match match)
|
void |
addMatches(Match[] m)
|
void |
clear()
Reset the object's state (for reuse). |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object other)
|
void |
copyContext(NodeProxy node)
|
boolean |
equals(java.lang.Object other)
|
int |
getBrokerType()
Gets the brokerType attribute of the NodeProxy object |
LongLinkedList |
getContext()
|
DocumentImpl |
getDoc()
Gets the doc attribute of the NodeProxy object |
long |
getGID()
Gets the gID attribute of the NodeProxy object |
long |
getInternalAddress()
Returns the storage address of this node in dom.dbx. |
org.w3c.dom.Node |
getNode()
Gets the node attribute of the NodeProxy object |
short |
getNodeType()
Gets the nodeType attribute of the NodeProxy object |
java.lang.String |
getNodeValue()
Gets the nodeValue attribute of the NodeProxy object |
boolean |
hasIndex()
|
boolean |
hasMatch(Match match)
|
java.lang.String |
printMatches()
|
void |
setDoc(DocumentImpl doc)
Sets the doc this node belongs to. |
void |
setGID(long gid)
Sets the node-identifier of this node. |
void |
setHasIndex(boolean hasIndex)
|
void |
setInternalAddress(long internalAddress)
Sets the storage address of this node in dom.dbx. |
void |
setNodeType(short nodeType)
Sets the nodeType. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public DocumentImpl doc
public long gid
public long internalAddress
public LongLinkedList contextNodes
public short nodeType
public Match[] matches
Constructor Detail |
public NodeProxy()
public NodeProxy(DocumentImpl doc, long gid, long address)
doc
- Description of the Parametergid
- Description of the Parameteraddress
- Description of the Parameterpublic NodeProxy(DocumentImpl doc, long gid)
doc
- Description of the Parametergid
- Description of the Parameterpublic NodeProxy(DocumentImpl doc, long gid, short nodeType)
doc
- Description of the Parametergid
- Description of the ParameternodeType
- Description of the Parameterpublic NodeProxy(DocumentImpl doc, long gid, short nodeType, long address)
doc
- Description of the Parametergid
- Description of the ParameternodeType
- Description of the Parameteraddress
- Description of the Parameterpublic NodeProxy(NodeProxy p)
p
- Description of the Parameterpublic NodeProxy(NodeImpl node)
node
- Description of the ParameterMethod Detail |
public void clear()
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object other)
public int getBrokerType()
public DocumentImpl getDoc()
public long getGID()
public org.w3c.dom.Node getNode()
public short getNodeType()
public java.lang.String getNodeValue()
public void setGID(long gid)
gid
- The new gID valuepublic java.lang.String toString()
public long getInternalAddress()
public void setDoc(DocumentImpl doc)
doc
- The doc to setpublic void setInternalAddress(long internalAddress)
internalAddress
- The internalAddress to setpublic void setHasIndex(boolean hasIndex)
public boolean hasIndex()
public void setNodeType(short nodeType)
nodeType
- The nodeType to setpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public boolean hasMatch(Match match)
public void addMatch(Match match)
public void addMatches(Match[] m)
public java.lang.String printMatches()
public void addContextNode(NodeProxy node)
public void copyContext(NodeProxy node)
public LongLinkedList getContext()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |