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

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

public class NCIThesaurusHistoryFileToSQL
extends java.lang.Object

Converstion tool for loading a delimited text format into SQL.

Version:
subversion $Revision: 1154 $ checked in on $Date: 2006-02-08 11:32:42 -0600 (Wed, 08 Feb 2006) $
Author:
Dan Armbrust

Constructor Summary
NCIThesaurusHistoryFileToSQL(java.lang.String uri, java.net.URI filePath, java.net.URI versionsFilePath, java.lang.String token, boolean failOnAllErrors, LgMessageDirectorIF messageDirector)
          NCI Thesaurus History File to SQL Converter.
 
Method Summary
static void validateFile(java.net.URI filePath, java.net.URI versionsFilePath, java.lang.String token, boolean entireFile)
          Reads all or part of the file, makes sure that the content is the expected format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NCIThesaurusHistoryFileToSQL

public NCIThesaurusHistoryFileToSQL(java.lang.String uri,
                                    java.net.URI filePath,
                                    java.net.URI versionsFilePath,
                                    java.lang.String token,
                                    boolean failOnAllErrors,
                                    LgMessageDirectorIF messageDirector)
                             throws java.lang.Exception
NCI Thesaurus History File to SQL Converter.

Parameters:
filePath - location of the delimited file (local file or URL)
token - parsing token, if null default is "|"
sqlServer - location of the SQLLite server
sqlDriver - driver class
sqlUsername - username for server authentification
sqlPassword - password for server authenification
messageDirector - log message output
Throws:
java.lang.Exception
Method Detail

validateFile

public static void validateFile(java.net.URI filePath,
                                java.net.URI versionsFilePath,
                                java.lang.String token,
                                boolean entireFile)
                         throws java.net.MalformedURLException,
                                java.io.IOException,
                                java.text.ParseException
Reads all or part of the file, makes sure that the content is the expected format.

Parameters:
filePath - fiel to read.
token - delimiter (defaults to '|')
entireFile - - read the entire file, or just the first 10 lines?
Throws:
java.net.MalformedURLException
java.io.IOException
java.text.ParseException

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.