Project

General

Profile

Download (3.1 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 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 MexicoConabioImportConfigurator extends ExcelImportConfiguratorBase{
26
    private static final long serialVersionUID = -2795059530001736347L;
27

    
28
    private Reference secReference;
29

    
30
    private boolean doTaxa = true;
31
    private boolean doDistributions = true;
32
    private boolean doCommonNames = true;
33

    
34
    private static IInputTransformer defaultTransformer = new MexicoConabioTransformer();
35

    
36
    public static MexicoConabioImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
37
        return new MexicoConabioImportConfigurator(source, destination);
38
    }
39

    
40
    private MexicoConabioImportConfigurator(URI source, ICdmDataSource destination) {
41
        super(source, destination, defaultTransformer);
42
        setNomenclaturalCode(NomenclaturalCode.ICNAFP);
43
        setSource(source);
44
        setDestination(destination);
45
     }
46

    
47
    @SuppressWarnings({ "unchecked", "rawtypes" })
48
    @Override
49
    public ImportStateBase getNewState() {
50
        return new SimpleExcelTaxonImportState<>(this);
51
    }
52

    
53
    @SuppressWarnings("unchecked")
54
    @Override
55
    protected void makeIoClassList() {
56
        ioClassList = new Class[]{
57
                MexicoConabioTaxonImport.class,
58
                MexicoConabioDistributionImport.class,
59
                MexicoConabioCommonNamesImport.class
60
        };
61
    }
62

    
63
    /**
64
     * @return the doTaxa
65
     */
66
    public boolean isDoTaxa() {
67
        return doTaxa;
68
    }
69

    
70
    /**
71
     * @param doTaxa the doTaxa to set
72
     */
73
    public void setDoTaxa(boolean doTaxa) {
74
        this.doTaxa = doTaxa;
75
    }
76

    
77
    /**
78
     * @return the doDistributions
79
     */
80
    public boolean isDoDistributions() {
81
        return doDistributions;
82
    }
83

    
84
    /**
85
     * @param doDistributions the doDistributions to set
86
     */
87
    public void setDoDistributions(boolean doDistributions) {
88
        this.doDistributions = doDistributions;
89
    }
90

    
91
    /**
92
     * @return the doCommonNames
93
     */
94
    public boolean isDoCommonNames() {
95
        return doCommonNames;
96
    }
97

    
98
    /**
99
     * @param doCommonNames the doCommonNames to set
100
     */
101
    public void setDoCommonNames(boolean doCommonNames) {
102
        this.doCommonNames = doCommonNames;
103
    }
104

    
105
    /**
106
     * @return the secReference
107
     */
108
    public Reference getSecReference() {
109
        return secReference;
110
    }
111

    
112

    
113
    /**
114
     * @param secReference
115
     */
116
    public void setSecReference(Reference secReference) {
117
        this.secReference = secReference;
118
    }
119

    
120
}
(5-5/9)