Project

General

Profile

Download (2.07 KB) Statistics
| Branch: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2016 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.cdm.io.iapt;
11

    
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.MexicoBorhidiExcelImport;
17
import eu.etaxonomy.cdm.io.mexico.MexicoConabioTransformer;
18
import eu.etaxonomy.cdm.io.mexico.SimpleExcelTaxonImportState;
19
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
20
import eu.etaxonomy.cdm.model.reference.Reference;
21

    
22
import java.net.URI;
23

    
24
/**
25
 * @author a.mueller
26
 * @date 16.06.2016
27
 *
28
 */
29
public class IAPTImportConfigurator extends ExcelImportConfiguratorBase{
30

    
31
    private static final long serialVersionUID = -4793138681632122831L;
32

    
33
    private static IInputTransformer defaultTransformer = new IAPTTransformer();
34

    
35
    private Reference secReference;
36

    
37

    
38
    public static IAPTImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
39
        return new IAPTImportConfigurator(source, destination);
40
    }
41

    
42

    
43
    private IAPTImportConfigurator(URI source, ICdmDataSource destination) {
44
        super(source, destination, defaultTransformer);
45
        setNomenclaturalCode(NomenclaturalCode.ICNAFP);
46
        setSource(source);
47
        setDestination(destination);
48
     }
49

    
50
    @Override
51
    public ImportStateBase getNewState() {
52
        return new IAPTImportState(this);
53
    }
54

    
55
    @Override
56
    protected void makeIoClassList() {
57
        ioClassList = new Class[]{
58
                IAPTExcelImport.class
59
        };
60
    }
61

    
62

    
63
    /**
64
     * @return the secReference
65
     */
66
    public Reference getSecReference() {
67
        return secReference;
68
    }
69

    
70

    
71
    /**
72
     * @param secReference
73
     */
74
    public void setSecReference(Reference secReference) {
75
        this.secReference = secReference;
76
    }
77

    
78
}
79

    
(2-2/4)