2 * Copyright (C) 2020 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.app
.pesi
.merging
;
11 import java
.io
.FileReader
;
12 import java
.io
.IOException
;
13 import java
.util
.ArrayList
;
14 import java
.util
.Arrays
;
15 import java
.util
.List
;
17 import org
.apache
.commons
.lang3
.StringUtils
;
19 import au
.com
.bytecode
.opencsv
.CSVReader
;
22 * Base class for PESI merge classes.
27 public abstract class PesiMergeBase
{
29 protected static List
<List
<String
>> readCsvFile(String fileName
){
30 List
<List
<String
>> result
= new ArrayList
<>();
32 CSVReader reader
= new CSVReader(new FileReader(fileName
));
34 while ((row
= reader
.readNext()) != null){
35 result
.add(Arrays
.asList(row
));
38 } catch (IOException e1
) {
44 protected boolean isBlank(String str
) {
45 return StringUtils
.isBlank(str
);