1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2016 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.io.mexico;
|
11
|
|
12
|
import java.net.URI;
|
13
|
|
14
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
15
|
import eu.etaxonomy.cdm.io.common.ImportStateBase;
|
16
|
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
|
17
|
import eu.etaxonomy.cdm.io.excel.common.ExcelImportConfiguratorBase;
|
18
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
19
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @date 16.06.2016
|
24
|
*
|
25
|
*/
|
26
|
public class MexicoConabioImportConfigurator extends ExcelImportConfiguratorBase{
|
27
|
private static final long serialVersionUID = -2795059530001736347L;
|
28
|
|
29
|
private Reference secReference;
|
30
|
|
31
|
private boolean doTaxa = true;
|
32
|
private boolean doDistributions = true;
|
33
|
private boolean doCommonNames = true;
|
34
|
|
35
|
private static IInputTransformer defaultTransformer = new MexicoConabioTransformer();
|
36
|
|
37
|
public static MexicoConabioImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
|
38
|
return new MexicoConabioImportConfigurator(source, destination);
|
39
|
}
|
40
|
|
41
|
private MexicoConabioImportConfigurator(URI source, ICdmDataSource destination) {
|
42
|
super(source, destination, defaultTransformer);
|
43
|
setNomenclaturalCode(NomenclaturalCode.ICNAFP);
|
44
|
setSource(source);
|
45
|
setDestination(destination);
|
46
|
}
|
47
|
|
48
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
49
|
@Override
|
50
|
public ImportStateBase getNewState() {
|
51
|
return new SimpleExcelTaxonImportState<>(this);
|
52
|
}
|
53
|
|
54
|
@SuppressWarnings("unchecked")
|
55
|
@Override
|
56
|
protected void makeIoClassList() {
|
57
|
ioClassList = new Class[]{
|
58
|
MexicoConabioTaxonImport.class,
|
59
|
MexicoConabioDistributionImport.class,
|
60
|
MexicoConabioCommonNamesImport.class
|
61
|
};
|
62
|
}
|
63
|
|
64
|
/**
|
65
|
* @return the doTaxa
|
66
|
*/
|
67
|
public boolean isDoTaxa() {
|
68
|
return doTaxa;
|
69
|
}
|
70
|
|
71
|
/**
|
72
|
* @param doTaxa the doTaxa to set
|
73
|
*/
|
74
|
public void setDoTaxa(boolean doTaxa) {
|
75
|
this.doTaxa = doTaxa;
|
76
|
}
|
77
|
|
78
|
/**
|
79
|
* @return the doDistributions
|
80
|
*/
|
81
|
public boolean isDoDistributions() {
|
82
|
return doDistributions;
|
83
|
}
|
84
|
|
85
|
/**
|
86
|
* @param doDistributions the doDistributions to set
|
87
|
*/
|
88
|
public void setDoDistributions(boolean doDistributions) {
|
89
|
this.doDistributions = doDistributions;
|
90
|
}
|
91
|
|
92
|
/**
|
93
|
* @return the doCommonNames
|
94
|
*/
|
95
|
public boolean isDoCommonNames() {
|
96
|
return doCommonNames;
|
97
|
}
|
98
|
|
99
|
/**
|
100
|
* @param doCommonNames the doCommonNames to set
|
101
|
*/
|
102
|
public void setDoCommonNames(boolean doCommonNames) {
|
103
|
this.doCommonNames = doCommonNames;
|
104
|
}
|
105
|
|
106
|
/**
|
107
|
* @return the secReference
|
108
|
*/
|
109
|
public Reference getSecReference() {
|
110
|
return secReference;
|
111
|
}
|
112
|
|
113
|
|
114
|
/**
|
115
|
* @param secReference
|
116
|
*/
|
117
|
public void setSecReference(Reference secReference) {
|
118
|
this.secReference = secReference;
|
119
|
}
|
120
|
|
121
|
}
|