ca.uhn.hl7v3.sourcegen
Class SourceGenerator

java.lang.Object
  extended by ca.uhn.hl7v3.sourcegen.SourceGenerator

public class SourceGenerator
extends java.lang.Object

Tools for the generation of HL7 v3 source code.

Author:
Bryan Tripp

Constructor Summary
SourceGenerator()
          Creates a new instance of SourceGenerator
 
Method Summary
static int findLineBreak(java.lang.String s, int start, int maxLength)
          Returns a suitable location for a line break (e.g.
static java.lang.String getRIMDataTypePackage()
           
static java.lang.String getRIMPackage()
           
static void main(java.lang.String[] args)
           
static java.lang.String makeGetterSignature(AttributeDefinition att)
          Returns a public method signature for the getter of a given attribute (not incl.
static java.lang.String makeJavaDocComment(java.lang.String description, int indent)
           
static java.lang.String makeSetterSignature(AttributeDefinition att)
          Returns a public method signature for the setter of a given attribute (not incl.
static void writeDataTypeCode(java.io.File dtDir, java.lang.String dataType, java.sql.Connection conn)
           
static void writeEJBCode(java.io.File baseDirectory, java.sql.Connection conn)
           
static void writeEJBCode(java.io.File rimDir, java.lang.String RIMClass, java.sql.Connection conn)
          Writes source code for an EJB representation of the given RIM class to the given directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceGenerator

public SourceGenerator()
Creates a new instance of SourceGenerator

Method Detail

writeEJBCode

public static void writeEJBCode(java.io.File baseDirectory,
                                java.sql.Connection conn)
                         throws java.lang.Exception
Throws:
java.lang.Exception

writeEJBCode

public static void writeEJBCode(java.io.File rimDir,
                                java.lang.String RIMClass,
                                java.sql.Connection conn)
                         throws java.lang.Exception
Writes source code for an EJB representation of the given RIM class to the given directory.

Throws:
java.lang.Exception

writeDataTypeCode

public static void writeDataTypeCode(java.io.File dtDir,
                                     java.lang.String dataType,
                                     java.sql.Connection conn)
                              throws java.lang.Exception
Throws:
java.lang.Exception

makeSetterSignature

public static java.lang.String makeSetterSignature(AttributeDefinition att)
Returns a public method signature for the setter of a given attribute (not incl. throws clause)


makeGetterSignature

public static java.lang.String makeGetterSignature(AttributeDefinition att)
Returns a public method signature for the getter of a given attribute (not incl. throws clause)


getRIMPackage

public static java.lang.String getRIMPackage()

getRIMDataTypePackage

public static java.lang.String getRIMDataTypePackage()

makeJavaDocComment

public static java.lang.String makeJavaDocComment(java.lang.String description,
                                                  int indent)

findLineBreak

public static int findLineBreak(java.lang.String s,
                                int start,
                                int maxLength)
Returns a suitable location for a line break (e.g. beginning of a word) in the given String, starting at the given location, using the given maximum line length.


main

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


Copyright © 2001-2011 University Health Network. All Rights Reserved.