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