|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.nodes.AbstractNode
org.planx.xmlstore.nodes.NodeProxy
public abstract class NodeProxy
| Field Summary |
|---|
| Fields inherited from class org.planx.xmlstore.nodes.AbstractNode |
|---|
eqCls, ref, visitToken |
| Fields inherited from interface org.planx.xmlstore.Node |
|---|
CHARDATA, ELEMENT |
| Constructor Summary | |
|---|---|
protected |
NodeProxy(LocalLocator l,
Reference ref)
|
protected |
NodeProxy(Reference ref)
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
If the argument Node is also a NodeProxy,
attempts to compare the two nodes using references, otherwise the
proxied node is loaded and a structural comparison is (probably)
performed. |
protected abstract SystemNode |
generate()
|
SystemNode |
get()
Resolves the node if it is a proxy and guarantees to return a 'real' node. |
String |
getAttribute(String attrName)
Returns the attribute with the given name. |
String[] |
getAttributeNames()
Returns the names of this Node's attributes. |
List<Attribute> |
getAttributes()
Returns the attributes of this Node. |
List<SystemNode> |
getChildren()
Returns the children of this Node. |
int |
getHeight()
|
protected LocalLocator |
getLoc()
|
LocalLocator |
getLocator()
|
String |
getNodeValue()
Returns the value of this Node. |
byte |
getType()
Returns the node type of this Node. |
int |
hashCode()
Recursively computes a hash code based on the node type, node value, attributes, and children. |
boolean |
isMutable()
Returns true if this Node is mutable,
false otherwise. |
boolean |
isShared()
|
void |
setChild(int index,
SystemNode child)
|
void |
setHeight(int height)
|
protected void |
setLoc(LocalLocator l)
|
void |
setLocator(LocalLocator l)
|
void |
setShared(boolean isShared)
|
String |
toString()
|
void |
unload()
Unload the proxied node from memory. |
| Methods inherited from class org.planx.xmlstore.nodes.AbstractNode |
|---|
getEquivalenceClass, getReference, getVisitToken, setEquivalenceClass, setReference, setVisitToken |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected NodeProxy(Reference ref)
protected NodeProxy(LocalLocator l,
Reference ref)
| Method Detail |
|---|
protected void setLoc(LocalLocator l)
protected LocalLocator getLoc()
protected abstract SystemNode generate()
throws UnknownReferenceException,
IOException
UnknownReferenceException
IOExceptionpublic SystemNode get()
SystemNode
get in interface SystemNodeget in class AbstractNodepublic boolean isMutable()
Nodetrue if this Node is mutable,
false otherwise.
isMutable in interface NodeisMutable in class AbstractNodetrue if mutable, false if immutable.public byte getType()
NodeNode.
public String getNodeValue()
NodeNode. When the node represents
a character data node, the returned value will be the character data.
When the node represents an element node, the returned value will
by the tag name of the element.
public List<SystemNode> getChildren()
NodeNode.
If the node represents character data the empty list is returned.
Node.public List<Attribute> getAttributes()
NodeNode. In case
the node represents character data, the empty list is returned.
Node.public String getAttribute(String attrName)
Node
public String[] getAttributeNames()
NodeNode's attributes.
If the node represents character data the returned array is empty.
public boolean isShared()
public void setShared(boolean isShared)
public int getHeight()
public void setHeight(int height)
public LocalLocator getLocator()
public void setLocator(LocalLocator l)
public void setChild(int index,
SystemNode child)
public boolean equals(Object o)
Node is also a NodeProxy,
attempts to compare the two nodes using references, otherwise the
proxied node is loaded and a structural comparison is (probably)
performed.
equals in interface Nodeequals in class Objectpublic int hashCode()
Node
hashCode in interface NodehashCode in class Objectpublic String toString()
toString in class Objectpublic void unload()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||