Sun Message Library for HL7

com.stc.hl7.parser
Class HL7Parser

java.lang.Object
  extended by com.stc.hl7.parser.HL7Parser

public class HL7Parser
extends java.lang.Object

This class parses the meta data retrieved from Microsoft Access Database

Version:
$Revision: 1.42 $
Author:
Alexander Fung

Field Summary
protected  HL7DBConnection mHL7Conn
           
protected  HL7Version mVersion
           
 
Constructor Summary
HL7Parser(HL7Version version, HL7DBConnection db)
          Constructor for HL7Parser
 
Method Summary
protected  java.util.Set createEventsSet(java.sql.ResultSet rs, boolean isSender)
          Add events to an events set based on a results set
 HL7Messages parse()
          Parses metadata from HL7 database into an HL7Messages object
protected  NodeDescList parseComponentSection()
          Parses component metadata from HL7 database into a NodeDescList object
protected  java.util.Set parseEvents()
          Parses event metadata from HL7 database into a Set object
protected  NodeDescList parseSegsSection()
          Parses segment metadata from HL7 database into a NodeDescList object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mHL7Conn

protected HL7DBConnection mHL7Conn

mVersion

protected HL7Version mVersion
Constructor Detail

HL7Parser

public HL7Parser(HL7Version version,
                 HL7DBConnection db)
          throws java.lang.Exception
Constructor for HL7Parser

Parameters:
version - the HL7 version to parse
db - Connection to HL7 database
Throws:
java.lang.Exception
Method Detail

parse

public HL7Messages parse()
                  throws java.lang.ClassNotFoundException,
                         java.sql.SQLException,
                         java.io.IOException,
                         java.util.EmptyStackException
Parses metadata from HL7 database into an HL7Messages object

Returns:
Container of HL7Messages
Throws:
java.lang.ClassNotFoundException
java.io.IOException
java.sql.SQLException - when problem occurs with the Database interactions
java.util.EmptyStackException - Thrown by methods in the Stack class to indicate that the stack is empty

parseEvents

protected java.util.Set parseEvents()
                             throws java.sql.SQLException,
                                    java.io.IOException,
                                    java.util.EmptyStackException
Parses event metadata from HL7 database into a Set object

Returns:
Container of Events
Throws:
java.sql.SQLException - when problem occurs with the Database interactions
java.io.IOException
java.util.EmptyStackException - Thrown by methods in the Stack class to indicate that the stack is empty

createEventsSet

protected java.util.Set createEventsSet(java.sql.ResultSet rs,
                                        boolean isSender)
                                 throws java.sql.SQLException
Add events to an events set based on a results set

Returns:
A set of events
Throws:
java.sql.SQLException - when problem occurs with the Database interactions

parseSegsSection

protected NodeDescList parseSegsSection()
                                 throws java.sql.SQLException
Parses segment metadata from HL7 database into a NodeDescList object

Returns:
Container of Segments
Throws:
java.sql.SQLException - when problem occurs with the Database interactions

parseComponentSection

protected NodeDescList parseComponentSection()
                                      throws java.sql.SQLException
Parses component metadata from HL7 database into a NodeDescList object

Returns:
Container of Components
Throws:
java.sql.SQLException - when problem occurs with the Database interactions

Sun Message Library for HL7