1
|
/**
|
2
|
* Copyright (C) 2019 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.pesi.fauEu2Cdm;
|
10
|
|
11
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
12
|
import eu.etaxonomy.cdm.filter.TaxonNodeFilter;
|
13
|
import eu.etaxonomy.cdm.io.common.ITaxonNodeOutStreamPartitioner;
|
14
|
import eu.etaxonomy.cdm.io.common.ImportConfiguratorBase;
|
15
|
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
|
16
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
17
|
|
18
|
/**
|
19
|
* @author a.mueller
|
20
|
* @since 17.08.2019
|
21
|
*/
|
22
|
public class FauEu2CdmImportConfigurator
|
23
|
extends ImportConfiguratorBase<FauEu2CdmImportState, ICdmDataSource>{
|
24
|
|
25
|
private static final long serialVersionUID = -5452466831212722546L;
|
26
|
|
27
|
private static IInputTransformer myTransformer = null;
|
28
|
|
29
|
private TaxonNodeFilter taxonNodeFilter = new TaxonNodeFilter();
|
30
|
private ITaxonNodeOutStreamPartitioner partitioner;
|
31
|
private boolean concurrent = false;
|
32
|
|
33
|
private boolean doTaxa = true;
|
34
|
private boolean doDescriptions = true;
|
35
|
|
36
|
public static FauEu2CdmImportConfigurator NewInstance(ICdmDataSource source, ICdmDataSource destination) {
|
37
|
return new FauEu2CdmImportConfigurator(source, destination);
|
38
|
}
|
39
|
|
40
|
public FauEu2CdmImportConfigurator(ICdmDataSource source, ICdmDataSource destination) {
|
41
|
super(myTransformer);
|
42
|
this.setSource(source);
|
43
|
this.setDestination(destination);
|
44
|
}
|
45
|
|
46
|
@Override
|
47
|
public FauEu2CdmImportState getNewState() {
|
48
|
return new FauEu2CdmImportState(this);
|
49
|
}
|
50
|
|
51
|
@SuppressWarnings("unchecked")
|
52
|
@Override
|
53
|
protected void makeIoClassList() {
|
54
|
ioClassList = new Class[]{
|
55
|
FauEu2CdmTaxonNodeImport.class ,
|
56
|
FauEu2CdmDescriptionImport.class ,
|
57
|
};
|
58
|
}
|
59
|
|
60
|
@Override
|
61
|
@Deprecated
|
62
|
public Reference getSourceReference() {
|
63
|
return null;
|
64
|
}
|
65
|
|
66
|
|
67
|
public TaxonNodeFilter getTaxonNodeFilter() {
|
68
|
return taxonNodeFilter;
|
69
|
}
|
70
|
public void setTaxonNodeFilter(TaxonNodeFilter taxonNodeFilter) {
|
71
|
this.taxonNodeFilter = taxonNodeFilter;
|
72
|
}
|
73
|
|
74
|
public ITaxonNodeOutStreamPartitioner getPartitioner() {
|
75
|
return partitioner;
|
76
|
}
|
77
|
public void setPartitioner(ITaxonNodeOutStreamPartitioner partitioner) {
|
78
|
this.partitioner = partitioner;
|
79
|
}
|
80
|
|
81
|
public boolean isConcurrent() {
|
82
|
return concurrent;
|
83
|
}
|
84
|
public void setConcurrent(boolean concurrent) {
|
85
|
this.concurrent = concurrent;
|
86
|
}
|
87
|
|
88
|
public boolean isDoDescriptions() {
|
89
|
return doDescriptions;
|
90
|
}
|
91
|
public void setDoDescriptions(boolean doDescriptions) {
|
92
|
this.doDescriptions = doDescriptions;
|
93
|
}
|
94
|
|
95
|
public boolean isDoTaxa() {
|
96
|
return doTaxa;
|
97
|
}
|
98
|
public void setDoTaxa(boolean doTaxa) {
|
99
|
this.doTaxa = doTaxa;
|
100
|
}
|
101
|
|
102
|
|
103
|
}
|