public class TaxonomyReader extends Object
| Constructor and Description |
|---|
TaxonomyReader() |
| Modifier and Type | Method and Description |
|---|---|
static com.opencsv.CSVReader |
openCsvReader(Reader reader,
int startAt)
Returns a
CSVReader that properly handles GRIN-Global taxonomy files in CSV format. |
static Date |
toDate(String string)
Convert a string in agreed format (yyyy-MM-dd HH:mm:ss) to Date.
|
static GenusRow |
toGenus(String[] row)
Convert row to GenusRow.
|
static SpeciesRow |
toSpecies(String[] row)
Convert row to
SpeciesRow. |
public static com.opencsv.CSVReader openCsvReader(Reader reader, int startAt)
CSVReader that properly handles GRIN-Global taxonomy files in CSV format. It converts \N to null in each row.reader - the readerstartAt - the start atpublic static GenusRow toGenus(String[] row) throws ParseException
row - in the right CSV orderParseException - if date cannot be parsedpublic static SpeciesRow toSpecies(String[] row) throws ParseException
SpeciesRow.row - in the right CSV orderParseException - if date cannot be parsedpublic static Date toDate(String string) throws ParseException
string - the stringParseException - the parse exceptionCopyright © 2016 Global Crop Diversity Trust. All rights reserved.