|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.koala.io.RawNode
org.planx.xmlstore.koala.io.VirtualRawNode
public class VirtualRawNode
A RawNode that only exists in memory and have no underlying
byte representation. This type of node is useful for roots of a graph.
That is, nodes that are not part of the actual data but merely used for
'administration'.
A VirtualRawNode is given a unique Locator to
identify it. The locator has a SourceId provided in the
constructor. To distinguish it from other nodes, it is given a fake locator
position equal to minus a unique number. This way it will never be
equivalent to a real node (with a positive position), and is improbable to
be (wrongly) equivalent with another VirtualRawNode.
| Constructor Summary | |
|---|---|
VirtualRawNode(SourceId fsi,
List<RawNode> children)
|
|
VirtualRawNode(SourceId fsi,
List<RawNode> children,
byte val)
Constructs a VirtualRawNode with the specified children
that will act as if it is associated with the specified
SourceId. |
|
| Method Summary | |
|---|---|
int |
childCount()
|
List<List<Byte>> |
getAttributes()
Return the empty list. |
RawNode |
getChild(NodeFileSystem fs,
int index)
|
List<Locator> |
getChildren()
Returns the locators of the children given in the constructor. |
byte |
getType()
Returns ELEMENT. |
List<Byte> |
getValue()
|
boolean |
isDirty(int index)
|
boolean |
isVirtual()
|
Locator |
save(NodeFileSystem fs,
boolean doLazySave)
Does nothing. |
void |
setChild(int index,
Locator child)
|
void |
setChild(int index,
RawNode child)
Changes a child pointer of this node in its in-memory representation. |
void |
setIsShared(boolean isShared)
Does nothing. |
long |
size()
Returns the number of bytes that the byte representation of this RawNode occupies. |
String |
toString()
|
| Methods inherited from class org.planx.xmlstore.koala.io.RawNode |
|---|
createNode, equals, getHeight, getLocator, getVisitToken, hashCode, setHeight, setVisitToken |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VirtualRawNode(SourceId fsi,
List<RawNode> children)
public VirtualRawNode(SourceId fsi,
List<RawNode> children,
byte val)
VirtualRawNode with the specified children
that will act as if it is associated with the specified
SourceId. More specifically, the
RawNode.getLocator() method will return a Locator
with the specified SourceId.
| Method Detail |
|---|
public Locator save(NodeFileSystem fs,
boolean doLazySave)
throws IOException
save in class RawNodeIOException
public void setIsShared(boolean isShared)
throws IOException
setIsShared in class RawNodeIOExceptionpublic boolean isVirtual()
isVirtual in class RawNodepublic byte getType()
ELEMENT.
getType in class RawNodepublic List<Byte> getValue()
getValue in class RawNodepublic List<List<Byte>> getAttributes()
getAttributes in class RawNodepublic List<Locator> getChildren()
getChildren in class RawNodepublic int childCount()
childCount in class RawNode
public RawNode getChild(NodeFileSystem fs,
int index)
throws IOException
getChild in class RawNodeIOException
public void setChild(int index,
Locator child)
throws IOException
setChild in class RawNodeIOException
public void setChild(int index,
RawNode child)
throws IOException
RawNodeRawNode.save(NodeFileSystem,boolean) method is called.
setChild in class RawNodeIOExceptionpublic boolean isDirty(int index)
isDirty in class RawNodepublic long size()
RawNodeRawNode occupies.
size in class RawNodepublic String toString()
toString in class RawNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||