Project

General

Profile

Download (2 KB) Statistics
| Branch: | Revision:
1
/**
2
* Copyright (C) 2020 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.caryo;
10

    
11
import eu.etaxonomy.cdm.common.URI;
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.SimpleExcelTaxonImportState;
17
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
18

    
19
/**
20
 * @author a.mueller
21
 * @since 17.02.2020
22
 */
23
public class CaryoAizoaceaeExcelImportConfigurator extends ExcelImportConfiguratorBase{
24

    
25
    private static final long serialVersionUID = -3833210622605834032L;
26

    
27
    private boolean doDeduplicate = true;
28

    
29
    private static IInputTransformer defaultTransformer = new CaryoAizoaceaeTransformer();
30

    
31
    public static CaryoAizoaceaeExcelImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
32
        return new CaryoAizoaceaeExcelImportConfigurator(source, destination);
33
    }
34

    
35
    private CaryoAizoaceaeExcelImportConfigurator(URI source, ICdmDataSource destination) {
36
        super(source, destination, defaultTransformer);
37
        setNomenclaturalCode(NomenclaturalCode.ICNAFP);
38
        setSource(source);
39
        setDestination(destination);
40
     }
41

    
42
    @SuppressWarnings({ "unchecked", "rawtypes" })
43
    @Override
44
    public ImportStateBase getNewState() {
45
        return new SimpleExcelTaxonImportState<>(this);
46
    }
47

    
48
    @SuppressWarnings("unchecked")
49
    @Override
50
    protected void makeIoClassList() {
51
        ioClassList = new Class[]{
52
                CaryoAizoaceaeExcelImport.class
53
        };
54
    }
55

    
56
    public boolean isDoDeduplicate() {
57
        return this.doDeduplicate;
58
    }
59
    public void setDoDeduplicate(boolean doDeduplicate) {
60
        this.doDeduplicate = doDeduplicate;
61
    }
62
}
(2-2/9)