Lvg Java
2006p Version

gov.nih.nlm.nls.lvg.Trie
Class PersistentExceptionNode

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Trie.PersistentListNode
      extended by gov.nih.nlm.nls.lvg.Trie.PersistentExceptionNode

public class PersistentExceptionNode
extends PersistentListNode

This class creates an object of rule's exception for persistent data.

History:

Version:
V-2006p
Author:
NLM NLS Development Team

Constructor Summary
PersistentExceptionNode(long address)
          Create an object of rule's exception, using an address in the binary file.
PersistentExceptionNode(long address, long next)
          Create an object of rule's exception, using an address in the binary file and the address of the next exception.
PersistentExceptionNode(java.lang.String key, java.lang.String value)
          Create an object of rule's exception, using a key value pair.
 
Method Summary
 java.lang.String GetKey()
          Get the string of matching pattern of the rule's exception.
static PersistentListNode GetNode(java.io.RandomAccessFile raf, long address)
          Get data of a persistent list node at a specific addrss of a specific binary file.
 java.lang.String GetValue()
          Get the string of changing pattern of the rule's exception.
static void PrintList(java.lang.String exceptionPath, long address)
          Print the detail information of rule's exceptions for a specific file at a specific address.
 void ReadData(java.io.RandomAccessFile raf)
          Read the matching and changing string partterns from a specific binary file.
 void WriteData(java.io.RandomAccessFile raf)
          Write the matching and changing string partterns to a specific binary file.
 
Methods inherited from class gov.nih.nlm.nls.lvg.Trie.PersistentListNode
GetAddress, GetNext, PrintList, SetAddress, SetNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentExceptionNode

public PersistentExceptionNode(long address)
Create an object of rule's exception, using an address in the binary file.


PersistentExceptionNode

public PersistentExceptionNode(long address,
                               long next)
Create an object of rule's exception, using an address in the binary file and the address of the next exception.


PersistentExceptionNode

public PersistentExceptionNode(java.lang.String key,
                               java.lang.String value)
Create an object of rule's exception, using a key value pair.

Parameters:
key - the string for matching pattern
value - the string for changing pattern
Method Detail

GetKey

public java.lang.String GetKey()
Get the string of matching pattern of the rule's exception.

Returns:
the string of matching pattern of the rule's exception

GetValue

public java.lang.String GetValue()
Get the string of changing pattern of the rule's exception.

Returns:
the string of changing pattern of the rule's exception

WriteData

public void WriteData(java.io.RandomAccessFile raf)
               throws java.io.IOException
Write the matching and changing string partterns to a specific binary file.

Overrides:
WriteData in class PersistentListNode
Parameters:
raf - the object of random access file
Throws:
java.io.IOException - if problems of writing data to random access file happen.

ReadData

public void ReadData(java.io.RandomAccessFile raf)
              throws java.io.IOException
Read the matching and changing string partterns from a specific binary file.

Overrides:
ReadData in class PersistentListNode
Parameters:
raf - the object of random access file
Throws:
java.io.IOException - if problems of reading data to random access file happen.

GetNode

public static PersistentListNode GetNode(java.io.RandomAccessFile raf,
                                         long address)
                                  throws java.io.IOException
Get data of a persistent list node at a specific addrss of a specific binary file.

Parameters:
raf - the object of random access file
address - the address of the persistent list node to be retrieved
Throws:
java.io.IOException - if problems of accessing random access file happen.

PrintList

public static void PrintList(java.lang.String exceptionPath,
                             long address)
                      throws java.io.IOException
Print the detail information of rule's exceptions for a specific file at a specific address.

Parameters:
exceptionPath - the path/file name of the rule's exceptions to be printed
address - the address of the rule's exceptions in a random access file
Throws:
java.io.IOException - if problems of accessing random access file happen.

Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine