public class PersistentTreeNode
extends java.lang.Object
History:
| Constructor and Description |
|---|
PersistentTreeNode()
Create an object of persistent tree node (defualt).
|
PersistentTreeNode(int level,
long parent,
long next,
long child,
long address)
Create an object of persistent tree node, using an address, next address,
parent address, child address in a random access file and level at the
persistent tree.
|
PersistentTreeNode(long address)
Create an object of persistent tree node, using an address in a random
access file.
|
| Modifier and Type | Method and Description |
|---|---|
long |
GetAddress()
Get the address of current persistent tree node at a tree.
|
long |
GetChild()
Get the child's address of current persistent tree node at a tree.
|
int |
GetLevel()
Get the level of current persistent tree node at a tree.
|
long |
GetNext()
Get the next address of current persistent tree node at a tree.
|
static PersistentTreeNode |
GetNode(java.io.RandomAccessFile raf,
long address)
Get the current persistent tree node from a specified binary file at
a specified address.
|
long |
GetParent()
Get the parent's address of current persistent tree node at a tree.
|
static void |
PrintNode(java.io.RandomAccessFile raf,
long address)
Print all sub tree (list) for a persistent tree node at a specific address
of a specific binary file.
|
void |
ReadData(java.io.RandomAccessFile raf)
Read data from the random access file.
|
void |
SetAddress(long address)
Set the address of current persistent tree node at a tree.
|
void |
SetChild(long child)
Set the child's address of current persistent tree node at a tree.
|
void |
SetLevel(int level)
Set the level of current persistent tree node at a tree.
|
void |
SetNext(long next)
Set the next address of current persistent tree node at a tree.
|
void |
SetParent(long parent)
Set the parent's address of current persistent tree node at a tree.
|
void |
WriteData(java.io.RandomAccessFile raf)
Write data to the random access file.
|
public PersistentTreeNode()
public PersistentTreeNode(long address)
address - ddress in a random access file.public PersistentTreeNode(int level,
long parent,
long next,
long child,
long address)
level - level of current persistent tree node at a tire treeparent - parent's address of current persistent tree node at a treenext - address of current persistent tree node at a treechild - child of current persistent tree node at a trie treeaddress - address in a random access file.public int GetLevel()
public void SetLevel(int level)
level - level of current persistent tree node at a tire treepublic long GetParent()
public void SetParent(long parent)
parent - parent's address of current persistent tree node at a treepublic long GetNext()
public void SetNext(long next)
next - address of current persistent tree node at a treepublic long GetChild()
public void SetChild(long child)
child - child's address of current persistent tree node at a treepublic void SetAddress(long address)
address - of current persistent tree node at a treepublic long GetAddress()
public void WriteData(java.io.RandomAccessFile raf)
throws java.io.IOException
raf - the random access file that data will be written tojava.io.IOException - if problems happen when accessing the random
access file.public void ReadData(java.io.RandomAccessFile raf)
throws java.io.IOException
raf - the random access file that data will be read fromjava.io.IOException - if problems happen when accessing the random
access file.public static PersistentTreeNode GetNode(java.io.RandomAccessFile raf, long address) throws java.io.IOException
raf - the binary file that the persistent node will be retrieved
fromaddress - the address in the binary file that the persistent
node will be retrieved fromjava.io.IOException - if problems happen when accessing the random
access file.public static void PrintNode(java.io.RandomAccessFile raf,
long address)
throws java.io.IOException
raf - the binary file that the persistent node will be printed
outaddress - the address in the binary file that the persistent
node will be printed outjava.io.IOException - if problems happen when accessing the random
access file. Submit a bug or feature
Copyright © 2020 National Library of Medicine