1
|
/**
|
2
|
* Copyright (C) 2017 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.fact.altitude.in;
|
10
|
|
11
|
import eu.etaxonomy.cdm.common.URI;
|
12
|
|
13
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
14
|
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
|
15
|
import eu.etaxonomy.cdm.io.fact.in.FactExcelImportConfiguratorBase;
|
16
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
17
|
|
18
|
/**
|
19
|
* @author a.mueller
|
20
|
* @since 28.05.2020
|
21
|
*/
|
22
|
public class AltitudeExcelImportConfigurator
|
23
|
extends FactExcelImportConfiguratorBase<AltitudeExcelFormatAnalyzer>{
|
24
|
|
25
|
private static final long serialVersionUID = -6403743396163163359L;
|
26
|
|
27
|
public static AltitudeExcelImportConfigurator NewInstance(URI uri, ICdmDataSource destination){
|
28
|
return new AltitudeExcelImportConfigurator(uri, destination, null);
|
29
|
}
|
30
|
|
31
|
/**
|
32
|
* How to fill the media title if not explicit value is given.
|
33
|
*/
|
34
|
public enum MediaTitleEnum{
|
35
|
NONE,
|
36
|
NAME_CACHE, //use name cache
|
37
|
NAME_TITLE_CACHE, //use name title cache
|
38
|
TAXON_TITLE_CACHE, //use taxon title
|
39
|
FILE_NAME //use file name
|
40
|
}
|
41
|
|
42
|
private AltitudeExcelImportConfigurator(URI uri, ICdmDataSource destination, IInputTransformer transformer) {
|
43
|
super(uri, destination, transformer);
|
44
|
}
|
45
|
|
46
|
@SuppressWarnings("unchecked")
|
47
|
@Override
|
48
|
public AltitudeExcelImportState getNewState() {
|
49
|
return new AltitudeExcelImportState(this);
|
50
|
}
|
51
|
|
52
|
@SuppressWarnings("unchecked")
|
53
|
@Override
|
54
|
protected void makeIoClassList() {
|
55
|
ioClassList = new Class[]{
|
56
|
AltitudeExcelImport.class,
|
57
|
};
|
58
|
}
|
59
|
|
60
|
@Override
|
61
|
public AltitudeExcelFormatAnalyzer getAnalyzer() {
|
62
|
return new AltitudeExcelFormatAnalyzer(this);
|
63
|
}
|
64
|
|
65
|
@Override
|
66
|
public NomenclaturalCode getNomenclaturalCode() {
|
67
|
NomenclaturalCode result = super.getNomenclaturalCode();
|
68
|
if (result == null){
|
69
|
result = NomenclaturalCode.ICNAFP;
|
70
|
}
|
71
|
return result;
|
72
|
}
|
73
|
|
74
|
public void setMinColumnLabel(String label) {
|
75
|
putLabelReplacement(AltitudeExcelImport.COL_ALTITUDE_MIN, label);
|
76
|
}
|
77
|
|
78
|
public void setMaxColumnLabel(String label) {
|
79
|
putLabelReplacement(AltitudeExcelImport.COL_ALTITUDE_MAX, label);
|
80
|
}
|
81
|
|
82
|
public void setRowToNeglect(int row){
|
83
|
|
84
|
}
|
85
|
}
|