edu.mayo.informatics.lexgrid.convert.directConversions
Class TextToSQL
java.lang.Object
edu.mayo.informatics.lexgrid.convert.directConversions.TextToSQL
public class TextToSQL
- extends java.lang.Object
Converstion tool for loading a delimited text format into SQL.
- Version:
- subversion $Revision: 8756 $ checked in on $Date: 2007-08-30
17:13:22 +0000 (Thu, 30 Aug 2007) $
- Author:
- Dan Armbrust
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextToSQL
public TextToSQL()
getCodingSchemeName
public java.lang.String getCodingSchemeName()
- Returns:
- the codingSchemeName
getVersion
public java.lang.String getVersion()
- Returns:
- the representsVersion
load
public CodingScheme load(java.net.URI fileLocation,
java.lang.String token,
LoaderPreferences loaderPrefs,
LgMessageDirectorIF messageDirector,
boolean forceFormatB)
throws CodingSchemeAlreadyLoadedException
- Text to SQL Converter. Format of the text files 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,) The line
that starts with keyword Relation is used to setup the association
information.
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 filetoken
- parsing token, if null default is "/t"sqlLiteServer
- location of the SQLLite serversqlLiteDriver
- driver classsqlLiteUsername
- username for server authentificationsqlLitePassword
- password for server authenificationloaderPrefs
- Loader PreferencesmessageDirector
- log message outputforceFormatB
- Force reading of a format A file as Format B
- Throws:
java.lang.Exception
CodingSchemeAlreadyLoadedException
getCodingScheme
public CodingScheme getCodingScheme()