Revision 3ef2e1bd
Added by Andreas Müller over 7 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/faunaEuropaea/FaunaEuropaeaRefImport.java | ||
---|---|---|
49 | 49 |
/** |
50 | 50 |
* @author a.babadshanjan |
51 | 51 |
* @created 12.05.2009 |
52 |
* @version 1.0 |
|
53 | 52 |
*/ |
54 | 53 |
@Component |
55 | 54 |
public class FaunaEuropaeaRefImport extends FaunaEuropaeaImportBase { |
... | ... | |
492 | 491 |
boolean isSynonym = taxonBase.isInstanceOf(Synonym.class); |
493 | 492 |
if (isSynonym) { |
494 | 493 |
Synonym syn = CdmBase.deproxy(taxonBase, Synonym.class); |
495 |
Set<Taxon> acceptedTaxa = syn.getAcceptedTaxa(); |
|
496 |
if (acceptedTaxa.size() > 0) { |
|
497 |
taxon = syn.getAcceptedTaxa().iterator().next(); |
|
498 |
//logger.warn("Synonym (" + taxonBase.getUuid() + ") has accepted taxon" + taxon.getUuid()); |
|
499 |
} else { |
|
500 |
// if (logger.isDebugEnabled()) { |
|
501 |
logger.warn("Synonym (" + taxonBase.getUuid() + ") does not have accepted taxa"); |
|
502 |
// } |
|
503 |
} |
|
494 |
taxon = syn.getAcceptedTaxon(); |
|
504 | 495 |
} else { |
505 | 496 |
taxon = CdmBase.deproxy(taxonBase, Taxon.class); |
506 | 497 |
} |
Also available in: Unified diff
ref #5974 Remove synonym relationships (not finished yet)