org.gcube.contentmanagement.codelistmanager.util.csv
Class CSVImport

java.lang.Object
  extended by org.gcube.contentmanagement.codelistmanager.util.ImporterInterface
      extended by org.gcube.contentmanagement.codelistmanager.util.csv.CSVImport

public class CSVImport
extends ImporterInterface


Field Summary
protected  char delimiter
           
protected  String encoding
           
protected  boolean hasHeader
           
protected  InitializerProcessor initializer
           
protected  ImportLineProcessor lineProcessor
           
protected  int totalLines
           
 
Constructor Summary
CSVImport(File csvFile, boolean hasHeader, char delimiter, String encoding, InitializerProcessor initializer, ImportLineProcessor lineprocessor)
           
 
Method Summary
 Hashtable<String,TableField> getFieldsName()
           
 List<org.gcube.common.dbinterface.ColumnDefinition> getTableDefinition()
           
 int getTotalLines()
           
 void initialize()
           
 void process(org.gcube.common.dbinterface.tables.SimpleTable table, ProgresChangedEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hasHeader

protected boolean hasHeader

delimiter

protected char delimiter

encoding

protected String encoding

totalLines

protected int totalLines

initializer

protected InitializerProcessor initializer

lineProcessor

protected ImportLineProcessor lineProcessor
Constructor Detail

CSVImport

public CSVImport(File csvFile,
                 boolean hasHeader,
                 char delimiter,
                 String encoding,
                 InitializerProcessor initializer,
                 ImportLineProcessor lineprocessor)
Method Detail

initialize

public void initialize()
                throws Exception
Specified by:
initialize in class ImporterInterface
Throws:
Exception

process

public void process(org.gcube.common.dbinterface.tables.SimpleTable table,
                    ProgresChangedEvent event)
             throws Exception
Specified by:
process in class ImporterInterface
Throws:
Exception

getTotalLines

public int getTotalLines()
Specified by:
getTotalLines in class ImporterInterface
Returns:
the totalLines

getTableDefinition

public List<org.gcube.common.dbinterface.ColumnDefinition> getTableDefinition()
Specified by:
getTableDefinition in class ImporterInterface

getFieldsName

public Hashtable<String,TableField> getFieldsName()
Specified by:
getFieldsName in class ImporterInterface


Copyright © 2013. All Rights Reserved.