at.tuwien.ifs.somtoolbox.database
Class VectorFile2DatabaseImporter

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.database.VectorFile2DatabaseImporter
All Implemented Interfaces:
SOMToolboxApp

public class VectorFile2DatabaseImporter
extends Object
implements SOMToolboxApp

Imports input and template vector files to a database.

Version:
$Id: VectorFile2DatabaseImporter.java 3683 2010-07-15 09:13:01Z frank $
Author:
Rudolf Mayer

Nested Class Summary
private  class VectorFile2DatabaseImporter.InputVectorImporter
          This class customises the handling of data read from the file by storing it in the DB.
private  class VectorFile2DatabaseImporter.TemplateVectorImporter
          This class customises the handling of data read from the file by storing it in the DB.
 
Nested classes/interfaces inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp
SOMToolboxApp.Type
 
Field Summary
static SOMToolboxApp.Type APPLICATION_TYPE
           
static String DESCRIPTION
           
static String LONG_DESCRIPTION
           
static com.martiansoftware.jsap.Parameter[] OPTIONS
           
 
Fields inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp
DEV_BY_STRING, HOMEPAGE, REQUIRED_MEMBERS, TYPE_GROUPED_COMPARATOR
 
Constructor Summary
VectorFile2DatabaseImporter(String inputVectorFile, String templateVectorFile, String databaseServerAddress, String databaseName, String user, String password, String databaseTableNamePrefix)
           
 
Method Summary
static void main(String[] args)
          Starts the import to the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTIONS

public static final com.martiansoftware.jsap.Parameter[] OPTIONS

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

LONG_DESCRIPTION

public static final String LONG_DESCRIPTION
See Also:
Constant Field Values

APPLICATION_TYPE

public static final SOMToolboxApp.Type APPLICATION_TYPE
Constructor Detail

VectorFile2DatabaseImporter

public VectorFile2DatabaseImporter(String inputVectorFile,
                                   String templateVectorFile,
                                   String databaseServerAddress,
                                   String databaseName,
                                   String user,
                                   String password,
                                   String databaseTableNamePrefix)
                            throws SQLException,
                                   IOException
Throws:
SQLException
IOException
Method Detail

main

public static void main(String[] args)
                 throws SQLException,
                        IOException
Starts the import to the database.

Parameters:
args - Needed program arguments:
  • -v inputVectorFile, mandatory
  • -t templateVectorFile, mandatory
  • --dbName databaseName, mandatory
  • --tablePrefix databaseTableNamePrefix, mandatory
  • --server databaseServerAddress, optional
  • --user databaseUser, optional
  • --password databasePassword, optional
Throws:
SQLException - If there is a problem connecting to the database.
IOException - If the input or template vector file can't be read.