Revision e3c70206
Added by Andreas Müller over 11 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/indexFungorum/IndexFungorumImportBase.java | ||
---|---|---|
291 | 291 |
logger.warn("'AUTHORS' is blank for not empty PUBLISHING_AUTHORS. This is not yet handled."); |
292 | 292 |
} |
293 | 293 |
} |
294 |
|
|
294 | 295 |
//inRef + inRefAuthor |
295 | 296 |
if (pubAuthor != null){ |
296 | 297 |
Reference<?> inRef = ReferenceFactory.newGeneric(); |
... | ... | |
298 | 299 |
ref.setInReference(inRef); |
299 | 300 |
hasInReference = true; |
300 | 301 |
} |
302 |
|
|
301 | 303 |
//refAuthor |
302 | 304 |
TeamOrPersonBase<?> refAuthor = CdmBase.deproxy(name.getCombinationAuthorTeam(), TeamOrPersonBase.class); |
303 | 305 |
if (refAuthor == null){ |
... | ... | |
319 | 321 |
String title = CdmUtils.concat(", ", titleMain, supTitle); |
320 | 322 |
//preliminary to comply with current Index Fungorum display |
321 | 323 |
if (StringUtils.isNotBlank(location)){ |
322 |
title += "(" + location +")"; |
|
324 |
title += " (" + location +")";
|
|
323 | 325 |
} |
324 | 326 |
//end preliminary |
325 | 327 |
if (StringUtils.isNotBlank(title)){ |
... | ... | |
330 | 332 |
} |
331 | 333 |
} |
332 | 334 |
//Volume |
333 |
String volume = rs.getString("VOLUME");
|
|
335 |
String volume = CdmUtils.Nz(rs.getString("VOLUME")).trim();
|
|
334 | 336 |
String part = rs.getString("PART"); |
335 |
if (StringUtils.isNotBlank(volume)){ |
|
336 |
if (StringUtils.isNotBlank(part)){ |
|
337 |
volume = volume + "(" + part + ")"; |
|
337 |
if (StringUtils.isNotBlank(part)){ |
|
338 |
volume = volume + "(" + part + ")"; |
|
339 |
if (StringUtils.isBlank(volume)){ |
|
340 |
logger.warn("'Part' is not blank for blank volume. This may be an inconsistency."); |
|
338 | 341 |
} |
339 |
ref.setVolume(volume); |
|
340 |
}else if (StringUtils.isNotBlank(part)){ |
|
341 |
logger.warn("'Part' is not blank for empty volume. This is not yet handled."); |
|
342 | 342 |
} |
343 |
ref.setVolume(volume); |
|
344 |
|
|
343 | 345 |
//year |
344 | 346 |
String yearOfPubl = rs.getString("YEAR_OF_PUBLICATION"); |
345 | 347 |
String yearOnPubl = rs.getString("YEAR_ON_PUBLICATION"); |
... | ... | |
354 | 356 |
ref.setDatePublished(TimePeriod.parseString(year)); |
355 | 357 |
} |
356 | 358 |
|
357 |
name.setNomenclaturalReference(ref); |
|
359 |
//preliminary, set protected titlecache as Generic Cache Generation with in references currently doesn't fully work yet |
|
360 |
String titleCache = CdmUtils.concat(", ", pubAuthorStr, title); |
|
361 |
if ( StringUtils.isNotBlank(pubAuthorStr)){ |
|
362 |
titleCache = "in " + titleCache; |
|
363 |
} |
|
364 |
titleCache = CdmUtils.concat(" ", titleCache, volume); |
|
365 |
titleCache = CdmUtils.concat(": ", titleCache, page); |
|
366 |
titleCache = CdmUtils.concat(". ", titleCache, year); |
|
367 |
ref.setTitleCache(titleCache, true); |
|
368 |
|
|
369 |
//set nom ref |
|
370 |
if (StringUtils.isNotBlank(titleCache)){ |
|
371 |
name.setNomenclaturalReference(ref); |
|
372 |
} |
|
358 | 373 |
} |
359 | 374 |
|
360 | 375 |
|
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/indexFungorum/IndexFungorumImportConfigurator.java | ||
---|---|---|
38 | 38 |
private int recordsPerTransaction = 1000; //defaultValue |
39 | 39 |
|
40 | 40 |
private boolean doOccurrence = true; |
41 |
private DO_REFERENCES doReferences = DO_REFERENCES.ALL; |
|
42 | 41 |
private boolean doTaxa = true; |
43 | 42 |
private boolean doRelTaxa = true; |
44 | 43 |
|
... | ... | |
128 | 127 |
public void setRecordsPerTransaction(int recordsPerTransaction) { |
129 | 128 |
this.recordsPerTransaction = recordsPerTransaction; |
130 | 129 |
} |
131 |
|
|
132 |
public boolean isDoOccurrence() { |
|
133 |
return doOccurrence; |
|
134 |
} |
|
135 |
public void setDoOccurrence(boolean doOccurrence) { |
|
136 |
this.doOccurrence = doOccurrence; |
|
137 |
} |
|
138 |
|
|
139 |
|
|
140 |
public DO_REFERENCES getDoReferences() { |
|
141 |
return doReferences; |
|
142 |
} |
|
143 |
public void setDoReferences(DO_REFERENCES doReferences) { |
|
144 |
this.doReferences = doReferences; |
|
145 |
} |
|
130 |
|
|
131 |
|
|
146 | 132 |
|
147 | 133 |
public boolean isDoTaxa() { |
148 | 134 |
return doTaxa; |
... | ... | |
151 | 137 |
this.doTaxa = doTaxa; |
152 | 138 |
} |
153 | 139 |
|
140 |
|
|
141 |
public boolean isDoOccurrence() { |
|
142 |
return doOccurrence; |
|
143 |
} |
|
144 |
|
|
145 |
|
|
146 |
public void setDoOccurrence(boolean doOccurrence) { |
|
147 |
this.doOccurrence = doOccurrence; |
|
148 |
} |
|
149 |
|
|
150 |
|
|
154 | 151 |
public boolean isDoRelTaxa() { |
155 | 152 |
return doRelTaxa; |
156 | 153 |
} |
154 |
|
|
155 |
|
|
157 | 156 |
public void setDoRelTaxa(boolean doRelTaxa) { |
158 | 157 |
this.doRelTaxa = doRelTaxa; |
159 | 158 |
} |
160 | 159 |
|
161 | 160 |
|
162 | 161 |
|
162 |
|
|
163 | 163 |
} |
Also available in: Unified diff
latest fixes for IF