net.ontopia.persistence.rdbms
Class CSVImport

java.lang.Object
  extended by net.ontopia.persistence.rdbms.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  Project project
           
protected  java.lang.String separator
           
protected  boolean stripquotes
           
protected  java.lang.String table
           
 
Constructor Summary
CSVImport(Project project, java.sql.Connection conn)
           
 
Method Summary
 Project getProject()
           
 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(java.lang.String 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

project

protected Project project

conn

protected java.sql.Connection conn

table

protected java.lang.String table

columns

protected java.lang.String[] columns

separator

protected java.lang.String separator

cleartable

protected boolean cleartable

stripquotes

protected boolean stripquotes

ignorecolumns

protected boolean ignorecolumns

ignorelines

protected int ignorelines
Constructor Detail

CSVImport

public CSVImport(Project project,
                 java.sql.Connection conn)
Method Detail

getProject

public Project getProject()

setTable

public void setTable(java.lang.String table)

setColumns

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

setSeparator

public void setSeparator(java.lang.String 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)

main

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

importCSV

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

usage

protected static void usage()


Copyright © 2000-2012 Ontopia.