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.categorical.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.io.fact.in.FactExcelImportConfiguratorBase;
|
17
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
18
|
|
19
|
/**
|
20
|
* Configurator for taxon based categorical data import.
|
21
|
*
|
22
|
* @author a.mueller
|
23
|
* @since 06.07.2020
|
24
|
*/
|
25
|
public class CategoricalDataExcelImportConfigurator
|
26
|
extends FactExcelImportConfiguratorBase<CategoricalDataExcelFormatAnalyzer>{
|
27
|
|
28
|
private static final long serialVersionUID = 5969649644223617705L;
|
29
|
|
30
|
private UUID stateVocabularyUuid;
|
31
|
private String stateVocabularyLabel;
|
32
|
|
33
|
public static CategoricalDataExcelImportConfigurator NewInstance(URI uri, ICdmDataSource destination){
|
34
|
return new CategoricalDataExcelImportConfigurator(uri, destination, null);
|
35
|
}
|
36
|
|
37
|
private CategoricalDataExcelImportConfigurator(URI uri, ICdmDataSource destination, IInputTransformer transformer) {
|
38
|
super(uri, destination, transformer);
|
39
|
}
|
40
|
|
41
|
@SuppressWarnings("unchecked")
|
42
|
@Override
|
43
|
public CategoricalDataExcelImportState getNewState() {
|
44
|
return new CategoricalDataExcelImportState(this);
|
45
|
}
|
46
|
|
47
|
@SuppressWarnings("unchecked")
|
48
|
@Override
|
49
|
protected void makeIoClassList() {
|
50
|
ioClassList = new Class[]{
|
51
|
StateVocabularyExcelImport.class,
|
52
|
CategoricalDataExcelImport.class,
|
53
|
};
|
54
|
}
|
55
|
|
56
|
@Override
|
57
|
public CategoricalDataExcelFormatAnalyzer getAnalyzer() {
|
58
|
return new CategoricalDataExcelFormatAnalyzer(this);
|
59
|
}
|
60
|
|
61
|
@Override
|
62
|
public NomenclaturalCode getNomenclaturalCode() {
|
63
|
NomenclaturalCode result = super.getNomenclaturalCode();
|
64
|
if (result == null){
|
65
|
result = NomenclaturalCode.ICNAFP;
|
66
|
}
|
67
|
return result;
|
68
|
}
|
69
|
|
70
|
public void setRowToNeglect(int row){
|
71
|
|
72
|
}
|
73
|
|
74
|
public UUID getStateVocabularyUuid() {
|
75
|
return this.stateVocabularyUuid;
|
76
|
}
|
77
|
public void setStateVocabularyUuid(UUID stateVocabularyUuid) {
|
78
|
this.stateVocabularyUuid = stateVocabularyUuid;
|
79
|
}
|
80
|
|
81
|
public String getStateVocabularyLabel() {
|
82
|
return stateVocabularyLabel;
|
83
|
}
|
84
|
public void setStateVocabularyLabel(String stateVocabularyLabel) {
|
85
|
this.stateVocabularyLabel = stateVocabularyLabel;
|
86
|
}
|
87
|
|
88
|
}
|