Revision dacb449b
Added by Andreas Müller over 4 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/EuroMedSourceActivator.java | ||
---|---|---|
20 | 20 |
import eu.etaxonomy.cdm.io.pesi.out.PesiTransformer; |
21 | 21 |
|
22 | 22 |
/** |
23 |
* Adds the Euro+Med Source to all relevant objects. |
|
24 |
* This is required before running the PESI export. |
|
25 |
* It should never run on E+M production but |
|
26 |
* always on a copy. |
|
27 |
* |
|
23 | 28 |
* @author a.mueller |
24 | 29 |
* @since 08.10.2019 |
25 | 30 |
*/ |
cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/validate/PesiEuroMedValidator.java | ||
---|---|---|
28 | 28 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
29 | 29 |
|
30 | 30 |
/** |
31 |
* Tests the ERMS -> PESI pipeline by comparing the source DB with destination PESI DB.
|
|
31 |
* Tests the E+M -> PESI pipeline by comparing the source DB with destination PESI DB.
|
|
32 | 32 |
* |
33 | 33 |
* @author a.mueller |
34 |
* @since 01.09.2019
|
|
34 |
* @since 08.10.2019
|
|
35 | 35 |
*/ |
36 | 36 |
public class PesiEuroMedValidator { |
37 | 37 |
|
... | ... | |
310 | 310 |
boolean success = true; |
311 | 311 |
ResultSet srcRS = source.getResultSet("SELECT CAST(tn.id as char(20)) tid, tb.uuid as GUID, pt.id parentId, " |
312 | 312 |
+ " tn.rank_id, rank.titleCache rank_name, " |
313 |
+ " sec.titleCache secTitle," |
|
313 |
+ " sec.titleCache secTitle, "
|
|
314 | 314 |
+ " tn.genusOrUninomial, tn.infraGenericEpithet, tn.specificEpithet, tn.infraSpecificEpithet, " |
315 | 315 |
+ " tn.nameCache, tn.authorshipCache, tn.titleCache nameTitleCache, tn.fullTitleCache nameFullTitleCache, " |
316 | 316 |
+ " tb.DTYPE taxStatus, taxRelType.uuid taxRelTypeUuid, nsType.id nsId, nsType.idInVocabulary nsTitle, " |
... | ... | |
412 | 412 |
|
413 | 413 |
private String makeNomRefString(ResultSet srcRS) throws SQLException { |
414 | 414 |
//there is no pure nomRefString field in CDM and also computing is only possible |
415 |
//with cache strategy which requires a running CDM instance. So this is a workaround that maybe needs to be adapted |
|
415 |
//with cache strategy which requires a running CDM instance. So this is a workaround |
|
416 |
//that maybe needs to be adapted |
|
416 | 417 |
String result = null; |
417 | 418 |
String fullTitle = srcRS.getString("nameFullTitleCache"); |
418 | 419 |
String nameTitleCache = srcRS.getString("nameTitleCache"); |
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTaxonExport.java | ||
---|---|---|
1655 | 1655 |
TaxonName typeName = nameTypeDesignation.getTypeName(); |
1656 | 1656 |
if (typeName != null) { |
1657 | 1657 |
if (typeName.getTaxonBases().isEmpty()){ |
1658 |
logger.warn("type name does not belong to a taxon and therefore is expected to not be a European taxon. Type name not added. Type name: " + typeName.getTitleCache() + ", typified name: " + taxonName.getTitleCache());
|
|
1658 |
logger.warn("Type name does not belong to a taxon and therefore is not expected to be a European taxon. Type name not added. Type name: " + typeName.getTitleCache() + ", typified name: " + taxonName.getTitleCache());
|
|
1659 | 1659 |
}else{ |
1660 | 1660 |
result = state.getDbId(typeName); |
1661 | 1661 |
} |
Also available in: Unified diff
minor