ca.uhn.hl7v3.sourcegen
Class DefinitionLoader

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

public class DefinitionLoader
extends java.lang.Object

Loads definitions for RIM classes, attributes, and data types from the RIM database. The definition objects are used to generate source code for RIM classes.

Author:
Bryan Tripp

Constructor Summary
DefinitionLoader(java.sql.Connection conn)
          Creates a new instance of DefinitionLoader
 
Method Summary
 ComponentDefinition[] getComponentDefs(java.lang.String className)
           
 DataTypeDefinition getDataTypeDef(java.lang.String className)
           
 java.lang.String getDTSuperClass(java.lang.String dataType)
          Looks up the superclass of the given RIM datatype, returns null if there isn't one.
 AttributeDefinition getRIMAttributeDef(java.lang.String className, java.lang.String attributeName)
          Creates an AttributeDefinition for the given attribute by looking up the required information in the DB.
 AttributeDefinition[] getRIMAttributes(java.lang.String className)
          Looks up a list of attributes for the given class and creates AttributeDefinitions by calling getRIMAttributeDef.
 ClassDefinition getRIMClassDef(java.lang.String className)
          Creates a ClassDefinition for the given RIM class by looking up the required information in the DB.
 java.lang.String[] getRIMClassNames()
          Looks up a list of RIM class names in the DB.
 java.lang.String[] getRIMDataTypeNames()
          Looks up a list of RIM data type names in the DB.
 java.lang.String getRIMSuperClass(java.lang.String className)
          Looks up and returns this RIM class' superclass.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinitionLoader

public DefinitionLoader(java.sql.Connection conn)
Creates a new instance of DefinitionLoader

Method Detail

getRIMClassNames

public java.lang.String[] getRIMClassNames()
                                    throws java.sql.SQLException
Looks up a list of RIM class names in the DB.

Throws:
java.sql.SQLException

getRIMDataTypeNames

public java.lang.String[] getRIMDataTypeNames()
                                       throws java.sql.SQLException
Looks up a list of RIM data type names in the DB.

Throws:
java.sql.SQLException

getRIMClassDef

public ClassDefinition getRIMClassDef(java.lang.String className)
                               throws java.sql.SQLException
Creates a ClassDefinition for the given RIM class by looking up the required information in the DB.

Throws:
java.sql.SQLException

getRIMAttributes

public AttributeDefinition[] getRIMAttributes(java.lang.String className)
                                       throws java.sql.SQLException
Looks up a list of attributes for the given class and creates AttributeDefinitions by calling getRIMAttributeDef.

Throws:
java.sql.SQLException

getRIMAttributeDef

public AttributeDefinition getRIMAttributeDef(java.lang.String className,
                                              java.lang.String attributeName)
                                       throws java.sql.SQLException
Creates an AttributeDefinition for the given attribute by looking up the required information in the DB.

Throws:
java.sql.SQLException

getRIMSuperClass

public java.lang.String getRIMSuperClass(java.lang.String className)
                                  throws java.sql.SQLException
Looks up and returns this RIM class' superclass.

Throws:
java.sql.SQLException

getDataTypeDef

public DataTypeDefinition getDataTypeDef(java.lang.String className)
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

getComponentDefs

public ComponentDefinition[] getComponentDefs(java.lang.String className)
                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getDTSuperClass

public java.lang.String getDTSuperClass(java.lang.String dataType)
                                 throws java.sql.SQLException
Looks up the superclass of the given RIM datatype, returns null if there isn't one.

Throws:
java.sql.SQLException

main

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


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