Project

General

Profile

Download (1.99 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 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.io.mexico.SimpleExcelTaxonImportState;
18
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
19

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

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

    
28
    private boolean doDeduplicate = true;
29

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

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

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

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

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

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