1
|
/**
|
2
|
* Copyright (C) 2008 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*/
|
6
|
|
7
|
package eu.etaxonomy.cdm.io.common;
|
8
|
|
9
|
import org.apache.log4j.Logger;
|
10
|
|
11
|
import eu.etaxonomy.cdm.api.application.CdmApplicationController;
|
12
|
import eu.etaxonomy.cdm.database.DbSchemaValidation;
|
13
|
import eu.etaxonomy.cdm.io.common.IImportConfigurator.DO_REFERENCES;
|
14
|
|
15
|
/**
|
16
|
* @author a.babadshanjan
|
17
|
* @created 16.11.2008
|
18
|
*/
|
19
|
public abstract class IoConfiguratorBase implements IIoConfigurator{
|
20
|
private static final Logger logger = Logger.getLogger(IoConfiguratorBase.class);
|
21
|
|
22
|
//im-/export uses TaxonomicTree for is_taxonomically_included_in relationships
|
23
|
private boolean useTaxonomicTree = true;
|
24
|
|
25
|
// protected Class<ICdmIO>[] ioClassList;
|
26
|
private DbSchemaValidation dbSchemaValidation = DbSchemaValidation.VALIDATE;
|
27
|
|
28
|
private CdmApplicationController cdmApp = null;
|
29
|
|
30
|
private boolean doAuthors = true;
|
31
|
//references
|
32
|
private DO_REFERENCES doReferences = DO_REFERENCES.ALL;
|
33
|
//names
|
34
|
private boolean doTaxonNames = true;
|
35
|
private boolean doRelNames = true;
|
36
|
private boolean doNameStatus = true;
|
37
|
private boolean doTypes = true;
|
38
|
private boolean doNameFacts = true;
|
39
|
|
40
|
//taxa
|
41
|
private boolean doTaxa = true;
|
42
|
private boolean doRelTaxa = true;
|
43
|
private boolean doFacts = true;
|
44
|
|
45
|
//occurrence
|
46
|
private boolean doOccurrence = true;
|
47
|
|
48
|
//etc
|
49
|
private boolean doMarker = true;
|
50
|
private boolean doUser = true;
|
51
|
|
52
|
|
53
|
public DbSchemaValidation getDbSchemaValidation() {
|
54
|
return dbSchemaValidation;
|
55
|
}
|
56
|
|
57
|
public void setDbSchemaValidation(DbSchemaValidation dbSchemaValidation) {
|
58
|
this.dbSchemaValidation = dbSchemaValidation;
|
59
|
}
|
60
|
|
61
|
public CdmApplicationController getCdmAppController(){
|
62
|
return this.cdmApp;
|
63
|
}
|
64
|
|
65
|
/**
|
66
|
* @param cdmApp the cdmApp to set
|
67
|
*/
|
68
|
public void setCdmAppController(CdmApplicationController cdmApp) {
|
69
|
this.cdmApp = cdmApp;
|
70
|
}
|
71
|
|
72
|
public boolean isDoAuthors() {
|
73
|
return doAuthors;
|
74
|
}
|
75
|
/* (non-Javadoc)
|
76
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoAuthors(boolean)
|
77
|
*/
|
78
|
public void setDoAuthors(boolean doAuthors) {
|
79
|
this.doAuthors = doAuthors;
|
80
|
}
|
81
|
|
82
|
/* (non-Javadoc)
|
83
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#getDoReferences()
|
84
|
*/
|
85
|
public DO_REFERENCES getDoReferences() {
|
86
|
return doReferences;
|
87
|
}
|
88
|
/* (non-Javadoc)
|
89
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoReferences(eu.etaxonomy.cdm.io.tcsrdf.TcsRdfImportConfigurator.DO_REFERENCES)
|
90
|
*/
|
91
|
public void setDoReferences(DO_REFERENCES doReferences) {
|
92
|
this.doReferences = doReferences;
|
93
|
}
|
94
|
|
95
|
public boolean isDoTaxonNames() {
|
96
|
return doTaxonNames;
|
97
|
}
|
98
|
/* (non-Javadoc)
|
99
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoTaxonNames(boolean)
|
100
|
*/
|
101
|
public void setDoTaxonNames(boolean doTaxonNames) {
|
102
|
this.doTaxonNames = doTaxonNames;
|
103
|
}
|
104
|
/* (non-Javadoc)
|
105
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoRelNames()
|
106
|
*/
|
107
|
public boolean isDoRelNames() {
|
108
|
return doRelNames;
|
109
|
}
|
110
|
/* (non-Javadoc)
|
111
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoRelNames(boolean)
|
112
|
*/
|
113
|
public void setDoRelNames(boolean doRelNames) {
|
114
|
this.doRelNames = doRelNames;
|
115
|
}
|
116
|
/* (non-Javadoc)
|
117
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoNameStatus()
|
118
|
*/
|
119
|
public boolean isDoNameStatus() {
|
120
|
return doNameStatus;
|
121
|
}
|
122
|
/* (non-Javadoc)
|
123
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoNameStatus(boolean)
|
124
|
*/
|
125
|
public void setDoNameStatus(boolean doNameStatus) {
|
126
|
this.doNameStatus = doNameStatus;
|
127
|
}
|
128
|
/* (non-Javadoc)
|
129
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoNameFacts()
|
130
|
*/
|
131
|
public boolean isDoNameFacts() {
|
132
|
return doNameFacts;
|
133
|
}
|
134
|
/* (non-Javadoc)
|
135
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoNameFacts(boolean)
|
136
|
*/
|
137
|
public void setDoNameFacts(boolean doNameFacts) {
|
138
|
this.doNameFacts = doNameFacts;
|
139
|
}
|
140
|
/* (non-Javadoc)
|
141
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoTypes()
|
142
|
*/
|
143
|
public boolean isDoTypes() {
|
144
|
return doTypes;
|
145
|
}
|
146
|
/* (non-Javadoc)
|
147
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoTypes(boolean)
|
148
|
*/
|
149
|
public void setDoTypes(boolean doTypes) {
|
150
|
this.doTypes = doTypes;
|
151
|
}
|
152
|
/* (non-Javadoc)
|
153
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoTaxa()
|
154
|
*/
|
155
|
public boolean isDoTaxa() {
|
156
|
return doTaxa;
|
157
|
}
|
158
|
/* (non-Javadoc)
|
159
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoTaxa(boolean)
|
160
|
*/
|
161
|
public void setDoTaxa(boolean doTaxa) {
|
162
|
this.doTaxa = doTaxa;
|
163
|
}
|
164
|
/* (non-Javadoc)
|
165
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoRelTaxa()
|
166
|
*/
|
167
|
public boolean isDoRelTaxa() {
|
168
|
return doRelTaxa;
|
169
|
}
|
170
|
/* (non-Javadoc)
|
171
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoRelTaxa(boolean)
|
172
|
*/
|
173
|
public void setDoRelTaxa(boolean doRelTaxa) {
|
174
|
this.doRelTaxa = doRelTaxa;
|
175
|
}
|
176
|
/* (non-Javadoc)
|
177
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoFacts()
|
178
|
*/
|
179
|
public boolean isDoFacts() {
|
180
|
return doFacts;
|
181
|
}
|
182
|
/* (non-Javadoc)
|
183
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoFacts(boolean)
|
184
|
*/
|
185
|
public void setDoFacts(boolean doFacts) {
|
186
|
this.doFacts = doFacts;
|
187
|
}
|
188
|
/* (non-Javadoc)
|
189
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#isDoOccurrence()
|
190
|
*/
|
191
|
public boolean isDoOccurrence() {
|
192
|
return doOccurrence;
|
193
|
}
|
194
|
/* (non-Javadoc)
|
195
|
* @see eu.etaxonomy.cdm.io.tcsrdf.IImportConfigurator#setDoOccurrence(boolean)
|
196
|
*/
|
197
|
public void setDoOccurrence(boolean doOccurrence) {
|
198
|
this.doOccurrence = doOccurrence;
|
199
|
}
|
200
|
|
201
|
public boolean isDoMarker() {
|
202
|
return doMarker;
|
203
|
}
|
204
|
|
205
|
public void setDoMarker(boolean doMarker) {
|
206
|
this.doMarker = doMarker;
|
207
|
}
|
208
|
|
209
|
|
210
|
public boolean isDoUser() {
|
211
|
return doUser;
|
212
|
}
|
213
|
|
214
|
public void setDoUser(boolean doUser) {
|
215
|
this.doUser = doUser;
|
216
|
}
|
217
|
|
218
|
|
219
|
/**
|
220
|
* @return the useTaxonomicTree
|
221
|
*/
|
222
|
public boolean isUseTaxonomicTree() {
|
223
|
return useTaxonomicTree;
|
224
|
}
|
225
|
|
226
|
/**
|
227
|
* @param useTaxonomicTree the useTaxonomicTree to set
|
228
|
*/
|
229
|
public void setUseTaxonomicTree(boolean useTaxonomicTree) {
|
230
|
this.useTaxonomicTree = useTaxonomicTree;
|
231
|
}
|
232
|
}
|