Project

General

Profile

Download (1.92 KB) Statistics
| Branch: | Revision:
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.mexico;
10

    
11
import eu.etaxonomy.cdm.common.URI;
12

    
13
import eu.etaxonomy.cdm.database.ICdmDataSource;
14
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
15
import eu.etaxonomy.cdm.io.excel.common.ExcelImportConfiguratorBase;
16
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
17
import eu.etaxonomy.cdm.model.reference.Reference;
18

    
19
/**
20
 * @author a.mueller
21
 * @since 16.06.2016
22
 */
23
public class MexicoBorhidiImportConfigurator extends ExcelImportConfiguratorBase{
24
    private static final long serialVersionUID = -4793138681632122831L;
25

    
26
    private static IInputTransformer defaultTransformer = new MexicoConabioTransformer();
27
    private Reference secReference;
28

    
29
    public static MexicoBorhidiImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
30
        return new MexicoBorhidiImportConfigurator(source, destination);
31
    }
32

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

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

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

    
54
    public Reference getSecReference() {
55
        return secReference;
56
    }
57
    public void setSecReference(Reference secReference) {
58
        this.secReference = secReference;
59
    }
60
}
(2-2/9)