Revision d7919b1c
Added by Andreas Müller about 7 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/excel/in/SpecimenCdmExcelImport.java | ||
---|---|---|
45 | 45 |
import eu.etaxonomy.cdm.model.location.NamedAreaType; |
46 | 46 |
import eu.etaxonomy.cdm.model.location.ReferenceSystem; |
47 | 47 |
import eu.etaxonomy.cdm.model.name.BotanicalName; |
48 |
import eu.etaxonomy.cdm.model.name.IBotanicalName; |
|
48 | 49 |
import eu.etaxonomy.cdm.model.name.INonViralName; |
49 | 50 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
50 | 51 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
... | ... | |
539 | 540 |
if (StringUtils.isNotBlank(commonDetermination.determinedBy)){ |
540 | 541 |
sec = ReferenceFactory.newGeneric(); |
541 | 542 |
TeamOrPersonBase<?> determinedBy; |
542 |
BotanicalName dummyName = TaxonNameFactory.NewBotanicalInstance(Rank.SPECIES()); |
|
543 |
IBotanicalName dummyName = TaxonNameFactory.NewBotanicalInstance(Rank.SPECIES());
|
|
543 | 544 |
try { |
544 | 545 |
parser.parseAuthors(dummyName, commonDetermination.determinedBy); |
545 | 546 |
determinedBy = dummyName.getCombinationAuthorship(); |
... | ... | |
644 | 645 |
* @param determinationLight |
645 | 646 |
* @return |
646 | 647 |
*/ |
647 |
private NonViralName<?> makeTaxonName(SpecimenCdmExcelImportState state, DeterminationLight determinationLight) {
|
|
648 |
NonViralName<?> name = TaxonNameFactory.NewNonViralInstance(null);
|
|
648 |
private INonViralName makeTaxonName(SpecimenCdmExcelImportState state, DeterminationLight determinationLight) {
|
|
649 |
INonViralName name = TaxonNameFactory.NewNonViralInstance(null);
|
|
649 | 650 |
NomenclaturalCode nc = state.getConfig().getNomenclaturalCode(); |
650 | 651 |
if (nc != null){ |
651 |
name = (NonViralName<?>)nc.getNewTaxonNameInstance(null);
|
|
652 |
name = nc.getNewTaxonNameInstance(null); |
|
652 | 653 |
} |
653 | 654 |
name.setGenusOrUninomial(determinationLight.genus); |
654 | 655 |
name.setSpecificEpithet(determinationLight.speciesEpi); |
... | ... | |
686 | 687 |
|
687 | 688 |
private TaxonNameBase findBestMatchingName(SpecimenCdmExcelImportState state, DeterminationLight determinationLight) { |
688 | 689 |
|
689 |
NonViralName<?> name = makeTaxonName(state, determinationLight);
|
|
690 |
INonViralName name = makeTaxonName(state, determinationLight);
|
|
690 | 691 |
String titleCache = makeSearchNameTitleCache(state, determinationLight, name); |
691 | 692 |
|
692 | 693 |
//TODO |
... | ... | |
832 | 833 |
} |
833 | 834 |
|
834 | 835 |
|
835 |
private TaxonNameBase<?, ?> getTaxonName(SpecimenCdmExcelImportState state, String name) {
|
|
836 |
private TaxonNameBase<?,?> getTaxonName(SpecimenCdmExcelImportState state, String name) { |
|
836 | 837 |
TaxonNameBase<?,?> result = null; |
837 | 838 |
result = state.getName(name); |
838 | 839 |
if (result != null){ |
... | ... | |
846 | 847 |
if (result == null){ |
847 | 848 |
NonViralNameParserImpl parser = NonViralNameParserImpl.NewInstance(); |
848 | 849 |
NomenclaturalCode code = state.getConfig().getNomenclaturalCode(); |
849 |
result = parser.parseFullName(name, code, null); |
|
850 |
result = (TaxonNameBase<?,?>)parser.parseFullName(name, code, null);
|
|
850 | 851 |
|
851 | 852 |
} |
852 | 853 |
if (result != null){ |
Also available in: Unified diff
ref #6362, ref #6365 remove occurrence of NonViralName, BotanicalName, ZoologicalName and others