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.temporal.in;
|
10
|
|
11
|
import eu.etaxonomy.cdm.common.URI;
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
15
|
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
|
16
|
import eu.etaxonomy.cdm.model.description.Feature;
|
17
|
|
18
|
/**
|
19
|
* Configurator for taxon based phenology import.
|
20
|
*
|
21
|
* @author a.mueller
|
22
|
* @since 15.07.2020
|
23
|
*/
|
24
|
public class PhenologyExcelImportConfigurator
|
25
|
extends TemporalDataExcelImportConfigurator<PhenologyExcelFormatAnalyzer>{
|
26
|
|
27
|
private static final long serialVersionUID = 2413575026028295925L;
|
28
|
|
29
|
private String floweringStartColumnLabel = PhenologyExcelImport.FLOWERING_START;
|
30
|
private String floweringEndColumnLabel = PhenologyExcelImport.FLOWERING_END;
|
31
|
private String fruitingStartColumnLabel = PhenologyExcelImport.FRUITING_START;
|
32
|
private String fruitingEndColumnLabel = PhenologyExcelImport.FRUITING_END;
|
33
|
|
34
|
public static PhenologyExcelImportConfigurator NewInstance(URI uri, ICdmDataSource destination){
|
35
|
return new PhenologyExcelImportConfigurator(uri, destination, null);
|
36
|
}
|
37
|
|
38
|
private PhenologyExcelImportConfigurator(URI uri, ICdmDataSource destination, IInputTransformer transformer) {
|
39
|
super(uri, destination, transformer);
|
40
|
}
|
41
|
|
42
|
@SuppressWarnings("unchecked")
|
43
|
@Override
|
44
|
public PhenologyExcelImportState getNewState() {
|
45
|
return new PhenologyExcelImportState(this);
|
46
|
}
|
47
|
|
48
|
@SuppressWarnings("unchecked")
|
49
|
@Override
|
50
|
protected void makeIoClassList() {
|
51
|
ioClassList = new Class[]{
|
52
|
PhenologyExcelImport.class,
|
53
|
};
|
54
|
}
|
55
|
|
56
|
@Override
|
57
|
public PhenologyExcelFormatAnalyzer getAnalyzer() {
|
58
|
return new PhenologyExcelFormatAnalyzer(this);
|
59
|
}
|
60
|
|
61
|
@Override
|
62
|
//Used for flowering uuid
|
63
|
public UUID getFeatureUuid() {
|
64
|
return Feature.uuidFloweringPeriod;
|
65
|
}
|
66
|
|
67
|
public UUID getFruitingFeatureUuid() {
|
68
|
return Feature.uuidFruitingPeriod;
|
69
|
}
|
70
|
|
71
|
@Override
|
72
|
@Deprecated
|
73
|
public String getColumnLabelStart() {
|
74
|
return getFloweringStartColumnLabel();
|
75
|
}
|
76
|
@Override
|
77
|
@Deprecated
|
78
|
public void setColumnLabelStart(String columnLabelStart) {
|
79
|
setFloweringStartColumnLabel(columnLabelStart);
|
80
|
}
|
81
|
|
82
|
@Override
|
83
|
@Deprecated
|
84
|
public String getColumnLabelEnd() {
|
85
|
return getFloweringEndColumnLabel();
|
86
|
}
|
87
|
@Override
|
88
|
@Deprecated
|
89
|
public void setColumnLabelEnd(String columnLabelEnd) {
|
90
|
setFloweringEndColumnLabel(columnLabelEnd);
|
91
|
}
|
92
|
|
93
|
public String getFloweringStartColumnLabel() {
|
94
|
return floweringStartColumnLabel;
|
95
|
}
|
96
|
public void setFloweringStartColumnLabel(String floweringStartColumnLabel) {
|
97
|
this.floweringStartColumnLabel = floweringStartColumnLabel;
|
98
|
}
|
99
|
|
100
|
public String getFloweringEndColumnLabel() {
|
101
|
return floweringEndColumnLabel;
|
102
|
}
|
103
|
public void setFloweringEndColumnLabel(String floweringEndColumnLabel) {
|
104
|
this.floweringEndColumnLabel = floweringEndColumnLabel;
|
105
|
}
|
106
|
|
107
|
public String getFruitingStartColumnLabel() {
|
108
|
return fruitingStartColumnLabel;
|
109
|
}
|
110
|
public void setFruitingStartColumnLabel(String fruitingStartColumnLabel) {
|
111
|
this.fruitingStartColumnLabel = fruitingStartColumnLabel;
|
112
|
}
|
113
|
|
114
|
public String getFruitingEndColumnLabel() {
|
115
|
return fruitingEndColumnLabel;
|
116
|
}
|
117
|
public void setFruitingEndColumnLabel(String fruitingEndColumnLabel) {
|
118
|
this.fruitingEndColumnLabel = fruitingEndColumnLabel;
|
119
|
}
|
120
|
}
|