1
|
/**
|
2
|
* Copyright (C) 2020 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.io.caryo;
|
10
|
|
11
|
import java.net.URI;
|
12
|
|
13
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
14
|
import eu.etaxonomy.cdm.io.common.ImportStateBase;
|
15
|
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
|
16
|
import eu.etaxonomy.cdm.io.excel.common.ExcelImportConfiguratorBase;
|
17
|
import eu.etaxonomy.cdm.io.mexico.SimpleExcelTaxonImportState;
|
18
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
19
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @since 17.02.2020
|
24
|
*/
|
25
|
public class CaryoAizoaceaeExcelImportConfigurator extends ExcelImportConfiguratorBase{
|
26
|
|
27
|
private static final long serialVersionUID = -3833210622605834032L;
|
28
|
|
29
|
private Reference secReference;
|
30
|
|
31
|
private boolean doTaxa = true;
|
32
|
|
33
|
private static IInputTransformer defaultTransformer = new CaryoAizoaceaeTransformer();
|
34
|
|
35
|
public static CaryoAizoaceaeExcelImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
|
36
|
return new CaryoAizoaceaeExcelImportConfigurator(source, destination);
|
37
|
}
|
38
|
|
39
|
private CaryoAizoaceaeExcelImportConfigurator(URI source, ICdmDataSource destination) {
|
40
|
super(source, destination, defaultTransformer);
|
41
|
setNomenclaturalCode(NomenclaturalCode.ICNAFP);
|
42
|
setSource(source);
|
43
|
setDestination(destination);
|
44
|
}
|
45
|
|
46
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
47
|
@Override
|
48
|
public ImportStateBase getNewState() {
|
49
|
return new SimpleExcelTaxonImportState<>(this);
|
50
|
}
|
51
|
|
52
|
@SuppressWarnings("unchecked")
|
53
|
@Override
|
54
|
protected void makeIoClassList() {
|
55
|
ioClassList = new Class[]{
|
56
|
CaryoAizoaceaeExcelImport.class
|
57
|
};
|
58
|
}
|
59
|
|
60
|
public boolean isDoTaxa() {
|
61
|
return doTaxa;
|
62
|
}
|
63
|
public void setDoTaxa(boolean doTaxa) {
|
64
|
this.doTaxa = doTaxa;
|
65
|
}
|
66
|
|
67
|
public Reference getSecReference() {
|
68
|
return secReference;
|
69
|
}
|
70
|
public void setSecReference(Reference secReference) {
|
71
|
this.secReference = secReference;
|
72
|
}
|
73
|
}
|