|
Lvg Java 2006p Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.nls.lvg.Trie.PersistentTree
public class PersistentTree
This class provides a mechanism of persistent tree. One file is capable of storing multiple trie trees. However, we use one only tree in one file in our application for simplicity reason.
The file format is:
History:
| Constructor Summary | |
|---|---|
PersistentTree(java.lang.String path)
Create an object of persistent tree, using a string for the path of the binary file to be strored. |
|
| Method Summary | |
|---|---|
void |
Add(PersistentTreeNode node,
long parentAddress)
Add a persistent node to the current persistent tree at a specific address. |
void |
Close()
Close the random access file of current persistent tree. |
java.io.RandomAccessFile |
GetRaf()
Get the random access file of the current persistent tree. |
long |
GetRootAddress()
Get the address of the root node of the current persistent tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentTree(java.lang.String path)
| Method Detail |
|---|
public java.io.RandomAccessFile GetRaf()
public long GetRootAddress()
public void Add(PersistentTreeNode node,
long parentAddress)
throws java.io.IOException
node - the persistent node to be addedparentAddress - the address that the persistent node to be added
at
java.io.IOException - if probelms happens when accessing random access
file
public void Close()
throws java.io.IOException
java.io.IOException - if probelms happens when closing random access
file
|
Lvg Java 2006p Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||