edu.mayo.informatics.lexgrid.convert.directConversions
Class TextToSQLLite

java.lang.Object
  extended by edu.mayo.informatics.lexgrid.convert.directConversions.TextToSQLLite

public class TextToSQLLite
extends java.lang.Object

Load simple tab delimited text files into sql lite.

Version:
subversion $Revision: 8756 $ checked in on $Date: 2008-06-12 16:26:57 +0000 (Thu, 12 Jun 2008) $
Author:
Dan Armbrust

Constructor Summary
TextToSQLLite(java.lang.String fileLocation, java.lang.String token, java.lang.String sqlLiteServer, java.lang.String sqlLiteDriver, java.lang.String sqlLiteUsername, java.lang.String sqlLitePassword, LoaderPreferences loaderPrefs, LgMessageDirectorIF messageDirector, boolean forceFormatB)
          Convert Text to Sql Lite.
 
Method Summary
 java.lang.String getCodingSchemeName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextToSQLLite

public TextToSQLLite(java.lang.String fileLocation,
                     java.lang.String token,
                     java.lang.String sqlLiteServer,
                     java.lang.String sqlLiteDriver,
                     java.lang.String sqlLiteUsername,
                     java.lang.String sqlLitePassword,
                     LoaderPreferences loaderPrefs,
                     LgMessageDirectorIF messageDirector,
                     boolean forceFormatB)
              throws java.lang.Exception
Convert Text to Sql Lite. Format of the text file is as follows: Format a: (ignore the *'s) (this does not display properly in HTML - please see the readme file)
 <codingSchemeName>\t<codingSchemeId>\t<defaultLanguage>\t<formalName>[\t<version>][\t<source>][\t<description>][\t<copyright>]
 <name1>[\t <description>] 
 \t <name2>[\t <description>] 
 \t\t <name3>[\t <description>]
 \t\t <name4>[\t <description>]
 
Where the leading tabs represent hierarchical hasSubtype relationship nesting (name1 hasSubtype name2 and name2 hasSubtype name3,) Lines starting with "#" are view comments - they are completely ignored. Rules - if doesn't already exist in the database, assign it a unique numeric concept code. Name becomes the entity description and preferred presentation. If description is supplied, it becomes the definition. - if already exists in the database, use the pre-assigned code. If is supplied (a) if one doesn't exist, already, use the supplied one (b) if one exists already and it doesn't match - issue a warning. Format b:
 <code>\t<name>[\t<description>]
 
Same as (a) except that the concept codes are part of the input. If the same code occurs twice, the names must match. Description rules same as above

Parameters:
fileLocation - location of the tab delimited file
token - parsing token, if null default is "/t"
sqlLiteServer - location of the SQLLite server
sqlLiteDriver - driver class
sqlLiteUsername - username for server authentification
sqlLitePassword - password for server authenification
loaderPrefs - Loader Preferences
messageDirector - log message output
forceFormatB - Force reading of a format A file as Format B
Throws:
java.lang.Exception
Method Detail

getCodingSchemeName

public java.lang.String getCodingSchemeName()
Returns:
the codingSchemeName

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.