Commit 46ba453c authored by John David Osborne's avatar John David Osborne
Browse files

Cleanup, runs and appears to generate index but losing connection to Oracle.

parent 00d5fcd3
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
package edu.uab.ccts.nlp.umlsIndex;
public class Config {
public static final String UMLS_CONCEPT_RETRIEVE_SQL_PATH = "sql/oracle/umlsConceptDefSelect.sql";
public static final String UMLS_LUCENE_INDEX_DIR = "target/index.lucene";
}
......@@ -28,7 +28,6 @@ import org.slf4j.LoggerFactory;
public class UmlsIndexWriter {
private static final Logger LOG = LoggerFactory.getLogger(UmlsIndexWriter.class);
private static final String UMLS_CONCEPT_RETRIEVE_SQL_PATH = "sql/oracle/umlsConceptDefSelect.sql";
private String jdbcConnectString;
/**
......@@ -44,7 +43,7 @@ public class UmlsIndexWriter {
public void buildIndex(){
LOG.info("jdbcString:\n"+jdbcConnectString);
String fetchsql = getTextFromFile(UMLS_CONCEPT_RETRIEVE_SQL_PATH);
String fetchsql = getTextFromFile(Config.UMLS_CONCEPT_RETRIEVE_SQL_PATH);
try(Connection con = DriverManager.getConnection(jdbcConnectString)){
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(fetchsql);
......
package edu.uab.ccts.nlp.umlsIndex;
package edu.uab.ccts.nlp.umlsIndex.test.integration;
import junit.framework.Test;
import junit.framework.TestCase;
......@@ -7,7 +7,7 @@ import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
public class LuceneIndexIT
extends TestCase
{
/**
......@@ -15,7 +15,7 @@ public class AppTest
*
* @param testName name of the test case
*/
public AppTest( String testName )
public LuceneIndexIT( String testName )
{
super( testName );
}
......@@ -25,7 +25,7 @@ public class AppTest
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
return new TestSuite( LuceneIndexIT.class );
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment