edu.iastate.metnet.aracyc
Class ConsoleApplication

java.lang.Object
  extended by edu.iastate.metnet.aracyc.ConsoleApplication
Direct Known Subclasses:
GraphStatistics

public abstract class ConsoleApplication
extends java.lang.Object

common task for console application the subclass should implement like MapPubchemName.java

Author:
Jie Li

Field Summary
protected  java.lang.String configureFile
          configure file name
protected  java.lang.String DATABASE_NODE
          data node in the configure file
protected  java.lang.String DBNAME_KEY
          database name node in the configure file
(package private) static org.apache.log4j.Logger logger
          log4j facility
protected  java.lang.String PASSWORD_KEY
          password node in the configure file
protected  java.util.prefs.Preferences preferences
          preference setting
protected  java.lang.String SERVER_KEY
          server node in the configure file
protected static java.sql.Statement statement
          sql statement
protected  java.lang.String USER_KEY
          user name node in the configure file
 
Constructor Summary
protected ConsoleApplication()
           
 
Method Summary
protected  java.lang.String getDB()
          get the database name setting
protected  java.util.prefs.Preferences getPreferences()
           
protected  java.lang.String getServer()
          get the server setting
protected  java.sql.Statement getStatementInstance()
           
protected abstract  void run(java.lang.String[] args)
          require the subclass implement the run() function
protected  void setup()
          set up the system wide property setting
protected  java.sql.Statement setupStatement()
          set up the SQL statement from the server and db configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
log4j facility


statement

protected static java.sql.Statement statement
sql statement


preferences

protected java.util.prefs.Preferences preferences
preference setting


configureFile

protected final java.lang.String configureFile
configure file name

See Also:
Constant Field Values

DATABASE_NODE

protected final java.lang.String DATABASE_NODE
data node in the configure file

See Also:
Constant Field Values

SERVER_KEY

protected final java.lang.String SERVER_KEY
server node in the configure file

See Also:
Constant Field Values

DBNAME_KEY

protected final java.lang.String DBNAME_KEY
database name node in the configure file

See Also:
Constant Field Values

USER_KEY

protected final java.lang.String USER_KEY
user name node in the configure file

See Also:
Constant Field Values

PASSWORD_KEY

protected final java.lang.String PASSWORD_KEY
password node in the configure file

See Also:
Constant Field Values
Constructor Detail

ConsoleApplication

protected ConsoleApplication()
Method Detail

getPreferences

protected java.util.prefs.Preferences getPreferences()
Returns:
Returns the preferences.

setupStatement

protected java.sql.Statement setupStatement()
set up the SQL statement from the server and db configuration

Returns:
the SQL statement

getServer

protected java.lang.String getServer()
get the server setting

Returns:
the server name

getDB

protected java.lang.String getDB()
get the database name setting

Returns:
the database name

run

protected abstract void run(java.lang.String[] args)
require the subclass implement the run() function


setup

protected void setup()
set up the system wide property setting


getStatementInstance

protected java.sql.Statement getStatementInstance()