1
|
/**
|
2
|
* Copyright (C) 2015 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.edaphobase;
|
10
|
|
11
|
import org.apache.log4j.Logger;
|
12
|
|
13
|
import eu.etaxonomy.cdm.database.ICdmDataSource;
|
14
|
import eu.etaxonomy.cdm.io.common.DbImportConfiguratorBase;
|
15
|
import eu.etaxonomy.cdm.io.common.Source;
|
16
|
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
|
17
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
18
|
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
|
19
|
|
20
|
/**
|
21
|
* @author a.mueller
|
22
|
* @since 18.12.2015
|
23
|
*
|
24
|
*/
|
25
|
public class EdaphobaseImportConfigurator
|
26
|
extends DbImportConfiguratorBase<EdaphobaseImportState>
|
27
|
{
|
28
|
private static final long serialVersionUID = 5397992611211404553L;
|
29
|
@SuppressWarnings("unused")
|
30
|
private static final Logger logger = Logger.getLogger(EdaphobaseImportConfigurator.class);
|
31
|
|
32
|
private boolean doTaxa = true;
|
33
|
public boolean isDoTaxa() {return doTaxa;}
|
34
|
public void setDoTaxa(boolean doTaxa) {this.doTaxa = doTaxa;}
|
35
|
|
36
|
private boolean doSynonyms = true;
|
37
|
public boolean isDoSynonyms() {return doSynonyms;}
|
38
|
public void setDoSynonyms(boolean doSynonyms) {this.doSynonyms = doSynonyms;}
|
39
|
|
40
|
private boolean doReferences = true;
|
41
|
public boolean isDoReferences() {return doReferences;}
|
42
|
public void setDoReferences(boolean doReferences) {this.doReferences = doReferences;}
|
43
|
|
44
|
private boolean doDescriptions = true;
|
45
|
public boolean isDoDescriptions() {return doDescriptions;}
|
46
|
public void setDoDescriptions(boolean doDescriptions) {this.doDescriptions = doDescriptions;}
|
47
|
|
48
|
|
49
|
private String edaphobaseSecundumTitle;
|
50
|
public String getEdaphobaseSecundumTitle() {return edaphobaseSecundumTitle;}
|
51
|
public void setEdaphobaseSecundumTitle(String edaphobaseSecundumTitle) {this.edaphobaseSecundumTitle = edaphobaseSecundumTitle;}
|
52
|
|
53
|
//logging
|
54
|
private boolean ignoreSubgenus = true;
|
55
|
public boolean isIgnoreSubgenus() {return ignoreSubgenus;}
|
56
|
public void setIgnoreSubgenus(boolean ignoreSubgenus) {this.ignoreSubgenus = ignoreSubgenus;}
|
57
|
|
58
|
private boolean ignore4nomial = true;
|
59
|
public boolean isIgnore4nomial() {return ignore4nomial;}
|
60
|
public void setIgnore4nomial(boolean ignore4nomial) {this.ignore4nomial = ignore4nomial;}
|
61
|
|
62
|
|
63
|
/**
|
64
|
* @param source
|
65
|
* @param cdmDestination
|
66
|
* @return
|
67
|
*/
|
68
|
public static EdaphobaseImportConfigurator NewInstance(Source source, ICdmDataSource cdmDestination) {
|
69
|
return new EdaphobaseImportConfigurator(source, cdmDestination, new EdaphobaseImportTransformer());
|
70
|
}
|
71
|
|
72
|
/**
|
73
|
* @param transformer
|
74
|
*/
|
75
|
public EdaphobaseImportConfigurator(Source source, ICdmDataSource destination, EdaphobaseImportTransformer transformer) {
|
76
|
super(source, destination, NomenclaturalCode.ICZN, transformer);
|
77
|
}
|
78
|
|
79
|
@Override
|
80
|
public EdaphobaseImportState getNewState() {
|
81
|
return new EdaphobaseImportState(this);
|
82
|
}
|
83
|
|
84
|
@Override
|
85
|
protected void makeIoClassList() {
|
86
|
ioClassList = new Class[]{
|
87
|
EdaphobaseAuthorImport.class,
|
88
|
EdaphobaseReferenceImport.class,
|
89
|
EdaphobaseInReferenceImport.class,
|
90
|
EdaphobaseTaxonImport.class,
|
91
|
EdaphobaseSynonymyImport.class,
|
92
|
EdaphobaseSynonymy2Import.class,
|
93
|
EdaphobaseClassificationImport.class,
|
94
|
// EdaphobaseDescriptionImport.class,
|
95
|
};
|
96
|
}
|
97
|
|
98
|
@Override
|
99
|
public Reference getSourceReference() {
|
100
|
Reference sourceRef = ReferenceFactory.newDatabase();
|
101
|
sourceRef.setTitle("Edaphobase");
|
102
|
return sourceRef;
|
103
|
}
|
104
|
|
105
|
|
106
|
}
|