ca.uhn.hl7v2.sourcegen
Class DataTypeGenerator

java.lang.Object
  extended by ca.uhn.hl7v2.sourcegen.DataTypeGenerator

public class DataTypeGenerator
extends java.lang.Object

Generates skeletal source code for Datatype classes based on the HL7 database.

Author:
Bryan Tripp (bryan_tripp@sourceforge.net), Eric Poiseau

Constructor Summary
DataTypeGenerator()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static void make(java.io.File targetDirectory, java.lang.String dataType, java.lang.String version)
          Creates source code for a single data type in the HL7 normative database.
static void makeAll(java.lang.String baseDirectory, java.lang.String version)
          Creates skeletal source code (without correct data structure but no business logic) for all data types found in the normative database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeGenerator

public DataTypeGenerator()
Method Detail

makeAll

public static void makeAll(java.lang.String baseDirectory,
                           java.lang.String version)
                    throws java.io.IOException,
                           java.sql.SQLException,
                           HL7Exception

Creates skeletal source code (without correct data structure but no business logic) for all data types found in the normative database. For versions > 2.2, Primitive data types are not generated, because they are coded manually (as of HAPI 0.3).

Throws:
java.io.IOException
java.sql.SQLException
HL7Exception

make

public static void make(java.io.File targetDirectory,
                        java.lang.String dataType,
                        java.lang.String version)
                 throws java.sql.SQLException,
                        DataTypeException,
                        java.io.IOException,
                        HL7Exception
Creates source code for a single data type in the HL7 normative database.

Parameters:
targetDirectory - the directory into which the file will be written
datatype - the name (e.g. ST, ID, etc.) of the data type to be created
version - the HL7 version of the intended data type
Throws:
java.sql.SQLException
DataTypeException
java.io.IOException
HL7Exception

main

public static void main(java.lang.String[] args)