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.iapt;
|
11
|
|
12
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
13
|
import eu.etaxonomy.cdm.io.common.ImportStateBase;
|
14
|
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
|
15
|
import eu.etaxonomy.cdm.io.excel.common.ExcelImportConfiguratorBase;
|
16
|
import eu.etaxonomy.cdm.io.mexico.MexicoBorhidiExcelImport;
|
17
|
import eu.etaxonomy.cdm.io.mexico.MexicoConabioTransformer;
|
18
|
import eu.etaxonomy.cdm.io.mexico.SimpleExcelTaxonImportState;
|
19
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
20
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
21
|
|
22
|
import java.net.URI;
|
23
|
|
24
|
/**
|
25
|
* @author a.mueller
|
26
|
* @date 16.06.2016
|
27
|
*
|
28
|
*/
|
29
|
public class IAPTImportConfigurator extends ExcelImportConfiguratorBase{
|
30
|
|
31
|
private static final long serialVersionUID = -4793138681632122831L;
|
32
|
|
33
|
private static IInputTransformer defaultTransformer = new IAPTTransformer();
|
34
|
|
35
|
private Reference secReference;
|
36
|
|
37
|
boolean doAlgeaeOnly;
|
38
|
|
39
|
|
40
|
public static IAPTImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
|
41
|
return new IAPTImportConfigurator(source, destination);
|
42
|
}
|
43
|
|
44
|
|
45
|
private IAPTImportConfigurator(URI source, ICdmDataSource destination) {
|
46
|
super(source, destination, defaultTransformer);
|
47
|
setNomenclaturalCode(NomenclaturalCode.ICNAFP);
|
48
|
setSource(source);
|
49
|
setDestination(destination);
|
50
|
}
|
51
|
|
52
|
@Override
|
53
|
public ImportStateBase getNewState() {
|
54
|
return new IAPTImportState(this);
|
55
|
}
|
56
|
|
57
|
@Override
|
58
|
protected void makeIoClassList() {
|
59
|
ioClassList = new Class[]{
|
60
|
IAPTExcelImport.class
|
61
|
};
|
62
|
}
|
63
|
|
64
|
|
65
|
/**
|
66
|
* @return the secReference
|
67
|
*/
|
68
|
public Reference getSecReference() {
|
69
|
return secReference;
|
70
|
}
|
71
|
|
72
|
|
73
|
/**
|
74
|
* @param secReference
|
75
|
*/
|
76
|
public void setSecReference(Reference secReference) {
|
77
|
this.secReference = secReference;
|
78
|
}
|
79
|
|
80
|
public void setDoAlgeaeOnly(boolean doAlgeaeOnly) {
|
81
|
this.doAlgeaeOnly = doAlgeaeOnly;
|
82
|
}
|
83
|
|
84
|
public boolean isDoAlgeaeOnly() {
|
85
|
return doAlgeaeOnly;
|
86
|
}
|
87
|
}
|
88
|
|