com.mizar.persistence.jdbc.convert
Class JdbcDbaseReader

java.lang.Object
  extended by com.mizar.persistence.jdbc.convert.JdbcDbaseReader

public class JdbcDbaseReader
extends java.lang.Object


Constructor Summary
JdbcDbaseReader()
           
 
Method Summary
static java.lang.String compareTablesFromDBF(java.sql.Connection conn, java.lang.String tableName, oracle.spatial.util.DBFReaderJGeom dbaseFileReader, java.lang.String geomColumnName)
          TODO what does this do?
static int countTable(java.lang.String dbaseFilePath)
           
static void createTableFromDBF(java.sql.Connection conn, java.lang.String tableName, byte[] fieldTypes, oracle.spatial.util.DBFReaderJGeom dbaseFileReader, java.lang.String geomColumnName)
          Create table from DBF file
static int loadTable(java.sql.Connection conn, java.lang.String tableName, oracle.spatial.util.DBFReaderJGeom dbaseFileReader)
          Load data from DBFReaderJGeom object into target table
static int loadTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String dbaseFilePath)
          Load data from a DBF file into a target table
static int loadTable(java.lang.String url, java.lang.String user, java.lang.String pword, java.lang.String tableName, java.lang.String dbaseFilePath)
          Load data from a DBF file into a target table
static void main(java.lang.String[] args)
           
static int readDbaseFiles(java.sql.Connection conn, java.lang.String controlFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcDbaseReader

public JdbcDbaseReader()
Method Detail

countTable

public static int countTable(java.lang.String dbaseFilePath)

loadTable

public static int loadTable(java.lang.String url,
                            java.lang.String user,
                            java.lang.String pword,
                            java.lang.String tableName,
                            java.lang.String dbaseFilePath)
                     throws java.sql.SQLException
Load data from a DBF file into a target table

Parameters:
url. - URL path of target database
user. - User login name
pword. - Log in password
tableName. - Target table name
dbaseFilePath -
Returns:
Number of records loaded
Throws:
java.sql.SQLException

loadTable

public static int loadTable(java.sql.Connection conn,
                            java.lang.String tableName,
                            java.lang.String dbaseFilePath)
Load data from a DBF file into a target table

Parameters:
conn. - Database connection
tableName. - Target table
dbaseFilePath -
Returns:
Number of records loaded

loadTable

public static int loadTable(java.sql.Connection conn,
                            java.lang.String tableName,
                            oracle.spatial.util.DBFReaderJGeom dbaseFileReader)
Load data from DBFReaderJGeom object into target table

Parameters:
conn. - Database connection
tableName. - Target table
dbaseFileReader -
Returns:
Number of records loaded

compareTablesFromDBF

public static java.lang.String compareTablesFromDBF(java.sql.Connection conn,
                                                    java.lang.String tableName,
                                                    oracle.spatial.util.DBFReaderJGeom dbaseFileReader,
                                                    java.lang.String geomColumnName)
                                             throws java.sql.SQLException
TODO what does this do?

Parameters:
conn -
tableName -
dbaseFileReader -
geomColumnName -
Returns:
Throws:
java.sql.SQLException

createTableFromDBF

public static void createTableFromDBF(java.sql.Connection conn,
                                      java.lang.String tableName,
                                      byte[] fieldTypes,
                                      oracle.spatial.util.DBFReaderJGeom dbaseFileReader,
                                      java.lang.String geomColumnName)
                               throws java.sql.SQLException
Create table from DBF file

Parameters:
conn. - Database connection
tableName. - Table to create
dbaseFileReader -
geomColumnName. - Column names to use. If geomColumnName is null or empty, function will use column names from DBF file.
Throws:
java.sql.SQLException

readDbaseFiles

public static int readDbaseFiles(java.sql.Connection conn,
                                 java.lang.String controlFile)

main

public static void main(java.lang.String[] args)