Sets up a CSV parser so that it accepts the format of the input file, and has names for each column of interest.
Giving names to columns is mandatory if the default implementation of
#processCSVRecordRow is used. A
column named
id holding the identifier of the target term is required, and only named columns will be
automatically extracted as data to add to each
#extendTerm. For example:
return CSVFormat.TDF.withHeader("id", null, "symptom").
If the file has the first row as a header, the it can be automatically parsed as column names with
return CSVFormat.TDF.withHeader().
Columns that aren't mapped, or are mapped to
null or the empty string, will be ignored.
If a custom implementation of
#processCSVRecordRow that doesn't rely on named columns is used, then
simply specifying the format of the file is enough, for example
return CSVFormat.CSV or
return CSVFormat.TDF.withSkipHeaderRecord().withCommentMarker('#').