Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.io.csv.reader.internal
Class CSVUtil

java.lang.Object
  extended by eu.esdihumboldt.hale.io.csv.reader.internal.CSVUtil
All Implemented Interfaces:
CSVConstants

public class CSVUtil
extends Object
implements CSVConstants

Utils for the CSVSchemaReader and CSVInstanceReader

Author:
Kevin Mais

Field Summary
 
Fields inherited from interface eu.esdihumboldt.hale.io.csv.reader.internal.CSVConstants
DEFAULT_ESCAPE, DEFAULT_QUOTE, DEFAULT_SEPARATOR, PARAM_ESCAPE, PARAM_GEOMETRY, PARAM_QUOTE, PARAM_SEPARATOR, PARAM_TYPENAME
 
Constructor Summary
CSVUtil()
           
 
Method Summary
static char getEscape(ImportProvider provider)
          Getter for the escape sign
static char getQuote(ImportProvider provider)
          Getter for the quote sign
static char getSep(ImportProvider provider)
          Getter for the separating sign
static au.com.bytecode.opencsv.CSVReader readFirst(ImportProvider provider)
          Reads only the first line of a given CSV file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVUtil

public CSVUtil()
Method Detail

readFirst

public static au.com.bytecode.opencsv.CSVReader readFirst(ImportProvider provider)
                                                   throws IOException
Reads only the first line of a given CSV file

Parameters:
provider - provider to get the parameters from
Returns:
a reader containing the first line of the CSV file
Throws:
IOException - if an I/O operation fails

getSep

public static char getSep(ImportProvider provider)
Getter for the separating sign

Parameters:
provider - the provider given to the method
Returns:
the separator char

getQuote

public static char getQuote(ImportProvider provider)
Getter for the quote sign

Parameters:
provider - the provider given to the method
Returns:
the quote char

getEscape

public static char getEscape(ImportProvider provider)
Getter for the escape sign

Parameters:
provider - the provider given to the method
Returns:
the escape char

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d