net.ontopia.topicmaps.db2tm
Class CSVImport

java.lang.Object
  extended by net.ontopia.topicmaps.db2tm.CSVImport

public class CSVImport
extends java.lang.Object

INTERNAL: Command line tool for importing comma- or semicolon separated files into a database.


Field Summary
protected  boolean cleartable
           
protected  java.lang.String[] columns
           
protected  java.sql.Connection conn
           
protected  boolean ignorecolumns
           
protected  int ignorelines
           
protected  char quoteCharacter
           
protected  char separator
           
protected  boolean stripquotes
           
protected  java.lang.String table
           
 
Method Summary
 void importCSV(java.io.InputStream csvfile)
           
static void main(java.lang.String[] argv)
           
 void setClearTable(boolean cleartable)
           
 void setColumns(java.lang.String[] columns)
           
 void setIgnoreColumns(boolean ignorecolumns)
           
 void setIgnoreLines(int ignorelines)
           
 void setSeparator(char separator)
           
 void setStripQuotes(boolean stripquotes)
           
 void setTable(java.lang.String table)
           
protected static void usage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

protected java.sql.Connection conn

table

protected java.lang.String table

columns

protected java.lang.String[] columns

quoteCharacter

protected char quoteCharacter

separator

protected char separator

cleartable

protected boolean cleartable

stripquotes

protected boolean stripquotes

ignorecolumns

protected boolean ignorecolumns

ignorelines

protected int ignorelines
Method Detail

setTable

public void setTable(java.lang.String table)

setColumns

public void setColumns(java.lang.String[] columns)

setSeparator

public void setSeparator(char separator)

setClearTable

public void setClearTable(boolean cleartable)

setStripQuotes

public void setStripQuotes(boolean stripquotes)

setIgnoreColumns

public void setIgnoreColumns(boolean ignorecolumns)

setIgnoreLines

public void setIgnoreLines(int ignorelines)

importCSV

public void importCSV(java.io.InputStream csvfile)
               throws java.lang.Exception
Throws:
java.lang.Exception

usage

protected static void usage()

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2000-2012 Ontopia.