1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2017 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.bogota;
|
11
|
|
12
|
import java.net.URI;
|
13
|
|
14
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
15
|
import eu.etaxonomy.cdm.io.common.ImportStateBase;
|
16
|
import eu.etaxonomy.cdm.io.excel.common.ExcelImportConfiguratorBase;
|
17
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
18
|
|
19
|
/**
|
20
|
* @author a.mueller
|
21
|
* @since 21.04.2017
|
22
|
*
|
23
|
*/
|
24
|
public class BogotaSpecimenImportConfigurator extends ExcelImportConfiguratorBase{
|
25
|
|
26
|
private static final long serialVersionUID = 6688815926646112726L;
|
27
|
|
28
|
private int minLineNumber = 0;
|
29
|
private int maxLineNumber = 1000000;
|
30
|
|
31
|
private Reference secReference;
|
32
|
private boolean onlyNonCdmTaxa;
|
33
|
|
34
|
/**
|
35
|
* @param source
|
36
|
* @param cdmDestination
|
37
|
* @return
|
38
|
*/
|
39
|
public static BogotaSpecimenImportConfigurator NewInstance(URI source, ICdmDataSource destination) {
|
40
|
return new BogotaSpecimenImportConfigurator(source, destination);
|
41
|
}
|
42
|
|
43
|
/**
|
44
|
* @param uri
|
45
|
* @param destination
|
46
|
*/
|
47
|
private BogotaSpecimenImportConfigurator(URI uri, ICdmDataSource destination) {
|
48
|
super(uri, destination);
|
49
|
}
|
50
|
|
51
|
/**
|
52
|
* {@inheritDoc}
|
53
|
*/
|
54
|
@Override
|
55
|
public ImportStateBase getNewState() {
|
56
|
return new SimpleExcelSpecimenImportState<>(this);
|
57
|
}
|
58
|
|
59
|
/**
|
60
|
* {@inheritDoc}
|
61
|
*/
|
62
|
@Override
|
63
|
protected void makeIoClassList() {
|
64
|
ioClassList = new Class[]{
|
65
|
BogotaSpecimenImport.class,
|
66
|
};
|
67
|
}
|
68
|
|
69
|
public int getMinLineNumber() {
|
70
|
return minLineNumber;
|
71
|
}
|
72
|
public void setMinLineNumber(int minLineNumber) {
|
73
|
this.minLineNumber = minLineNumber;
|
74
|
}
|
75
|
|
76
|
public int getMaxLineNumber() {
|
77
|
return maxLineNumber;
|
78
|
}
|
79
|
|
80
|
public void setMaxLineNumber(int maxLineNumber) {
|
81
|
this.maxLineNumber = maxLineNumber;
|
82
|
}
|
83
|
|
84
|
public Reference getSecReference() {
|
85
|
return secReference;
|
86
|
}
|
87
|
|
88
|
public void setSecReference(Reference secReference) {
|
89
|
this.secReference = secReference;
|
90
|
}
|
91
|
|
92
|
public boolean isOnlyNonCdmTaxa() {
|
93
|
return onlyNonCdmTaxa;
|
94
|
}
|
95
|
|
96
|
public void setOnlyNonCdmTaxa(boolean onlyNonCdmTaxa) {
|
97
|
this.onlyNonCdmTaxa = onlyNonCdmTaxa;
|
98
|
}
|
99
|
|
100
|
}
|