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