public class PersistentRuleNode extends PersistentListNode
History:
| Constructor and Description |
|---|
PersistentRuleNode(long address)
Create an object of persistent rule node, using an address in a random
access file.
|
PersistentRuleNode(long address,
long next)
Create an object of persistent rule node, using an address and next
address in a random access file.
|
PersistentRuleNode(java.lang.String ruleStr,
long exceptionAddress)
Create an object of persistent rule node, using an string representation
of a specific rule and the address of a specific exception object.
|
| Modifier and Type | Method and Description |
|---|---|
long |
GetExceptionAddress()
Get the address of the exception for the current rule.
|
static PersistentListNode |
GetNode(java.io.RandomAccessFile raf,
long address)
Get the current persistent rule node from a specified binary file at
a specified address.
|
java.lang.String |
GetRuleString()
Get the string representation of the current rule.
|
static void |
PrintList(java.lang.String rulePath,
java.lang.String exceptionPath,
long address)
Print all sub tree (list) for a persistent nule node at a specific address
of specific binary files of rules and exceptions.
|
void |
ReadData(java.io.RandomAccessFile raf)
Read the string representation data from a specified random access file
and assigned this data to the current rule node.
|
void |
WriteData(java.io.RandomAccessFile raf)
Write the string representation data of current rule node to a specified
random access file.
|
GetAddress, GetNext, PrintList, SetAddress, SetNextpublic PersistentRuleNode(long address)
address - address in a random access file.public PersistentRuleNode(long address,
long next)
address - address in a random access file.next - address of current persistent tree node at a treepublic PersistentRuleNode(java.lang.String ruleStr,
long exceptionAddress)
ruleStr - rule instring format.exceptionAddress - the exception adddress of current node.public java.lang.String GetRuleString()
public long GetExceptionAddress()
public void WriteData(java.io.RandomAccessFile raf)
throws java.io.IOException
WriteData in class PersistentListNoderaf - the random access file that data will be written tojava.io.IOException - if problems happen when writing data to the
random access file.public void ReadData(java.io.RandomAccessFile raf)
throws java.io.IOException
ReadData in class PersistentListNoderaf - the random access file that data will be read fromjava.io.IOException - if problems happen when reading data from the
random access file.public static PersistentListNode GetNode(java.io.RandomAccessFile raf, long address) throws java.io.IOException
raf - the binary file that the persistent rule node will be
retrieved fromaddress - the address in the binary file that the persistent
rule node will be retrieved fromjava.io.IOException - if problems happen when accessing the random
access file.public static void PrintList(java.lang.String rulePath,
java.lang.String exceptionPath,
long address)
throws java.io.IOException
rulePath - the path/name of the persistent rules.exceptionPath - the path/name of the persistent exceptions.address - the address in the binary file that the persistent
rule node will be printed outjava.io.IOException - if problems happen when accessing files of
rules and exceptions. Submit a bug or feature
Copyright © 2020 National Library of Medicine