|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mays.umls.Loader
public class Loader
Load the UMLS into A Derby db.
Needs a resource file that contains the following properties:
data_dir - the directory containing the RRF files
schema - the Derby schema name
derby home - the directory to store the Derby db
mfiles_indexes - a pipe delimited file where each line contains a mrfile and
a comma delimited list of columns to index similar to mrfiles format
Sample SnomedLoad.properties file:
data_dir = C:/data/umls/2007AC/META snomed/
schema = umls-snomed
derby_home = c:/ddb
mrfiles_indexes = C:/data/2007AC/META snomed/indexes.txt
| Constructor Summary | |
|---|---|
Loader(String config_name)
|
|
| Method Summary | |
|---|---|
void |
doCreateTable(String file_name,
String[] cols,
String mrcols,
int row_count)
Get the column spec from mrcols, create the table and load form the data file. |
void |
doFiles(String mrfiles,
String mrcols)
Iterate over the lines in mrfiles and create a table for each one. |
void |
doFilesIndexes(String mrfiles_indexes)
Iterate of the files in the mrfiles_indexes and create the indexes on the specified columns. |
void |
doIndexTable(String file_name,
String[] cols)
Actually create the index on the columns |
String |
getTableName(String file_name)
Create a table name from the file name. |
void |
loadTable(String file_name,
String table_name,
String cols,
String vals,
com.mays.umls.Loader.ColumnDataType[] types)
Load the table from the data file using the spec created from mrcols. |
static void |
main(String[] argv)
Takes a single arg - the name of a resource file in Java properties format. |
void |
run()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Loader(String config_name)
throws Exception
Exception| Method Detail |
|---|
public void doFiles(String mrfiles,
String mrcols)
throws Exception
Exceptionpublic String getTableName(String file_name)
file_name -
public void doCreateTable(String file_name,
String[] cols,
String mrcols,
int row_count)
throws Exception
file_name - cols - mrcols - row_count -
Exception
public void loadTable(String file_name,
String table_name,
String cols,
String vals,
com.mays.umls.Loader.ColumnDataType[] types)
throws Exception
file_name - table_name - cols - vals - types -
Exception
public void doFilesIndexes(String mrfiles_indexes)
throws Exception
mrfiles_indexes -
Exception
public void doIndexTable(String file_name,
String[] cols)
throws Exception
file_name - cols -
Exception
public void run()
throws Exception
Exceptionpublic static void main(String[] argv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||