Revision e6d7b501
Added by Andreas Müller almost 7 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/dwca/in/GbifReferenceCsv2CdmConverter.java | ||
---|---|---|
33 | 33 |
import eu.etaxonomy.cdm.model.description.TextData; |
34 | 34 |
import eu.etaxonomy.cdm.model.name.INonViralName; |
35 | 35 |
import eu.etaxonomy.cdm.model.name.IZoologicalName; |
36 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
|
37 | 36 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
38 |
import eu.etaxonomy.cdm.model.name.ZoologicalName; |
|
39 | 37 |
import eu.etaxonomy.cdm.model.reference.Reference; |
40 | 38 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
41 | 39 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
... | ... | |
125 | 123 |
boolean isNomRef = false; |
126 | 124 |
if (isNotBlank(strType)){ |
127 | 125 |
if (strType.matches("Botanical Protologue")){ |
128 |
if (taxon.getName() != null && reference != null && taxon.getName().isInstanceOf(NonViralName.class)){
|
|
126 |
if (taxon.getName() != null && reference != null && taxon.getName().isNonViral()){
|
|
129 | 127 |
INonViralName nvn = taxon.getName(); |
130 | 128 |
nvn.setNomenclaturalReference(reference); |
131 | 129 |
isNomRef = true; |
... | ... | |
139 | 137 |
if (isNomRef == false && config.isGuessNomenclaturalReferences()){ |
140 | 138 |
//if reference equals in author and year we assume that it is the nom ref |
141 | 139 |
//this information is usually only available for ICZN names |
142 |
if (taxon.getName() != null && reference != null && taxon.getName().isInstanceOf(NonViralName.class)){
|
|
140 |
if (taxon.getName() != null && reference != null && taxon.getName().isNonViral()){
|
|
143 | 141 |
INonViralName nvn = taxon.getName(); |
144 | 142 |
String taxonAuthor = nvn.getAuthorshipCache(); |
145 | 143 |
String refAuthor = reference.getAuthorship().getNomenclaturalTitle(); |
146 | 144 |
Integer combYear = null; |
147 | 145 |
Integer origYear = null; |
148 |
if (nvn.isInstanceOf(ZoologicalName.class)){
|
|
149 |
IZoologicalName zooName = CdmBase.deproxy(nvn, ZoologicalName.class);
|
|
146 |
if (nvn.isZoological()){
|
|
147 |
IZoologicalName zooName = (IZoologicalName)CdmBase.deproxy(nvn);
|
|
150 | 148 |
combYear = zooName.getPublicationYear(); |
151 | 149 |
origYear = zooName.getOriginalPublicationYear(); |
152 | 150 |
} |
Also available in: Unified diff
ref #6368 remove TaxonNameBase subclasses