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