Revision 9dc896c9
Added by Andreas Müller almost 7 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/ClassificationServiceImpl.java | ||
---|---|---|
56 | 56 |
import eu.etaxonomy.cdm.model.media.MediaUtils; |
57 | 57 |
import eu.etaxonomy.cdm.model.name.INonViralName; |
58 | 58 |
import eu.etaxonomy.cdm.model.name.Rank; |
59 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
|
59 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
60 | 60 |
import eu.etaxonomy.cdm.model.reference.Reference; |
61 | 61 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
62 | 62 |
import eu.etaxonomy.cdm.model.taxon.ITaxonNodeComparator; |
... | ... | |
568 | 568 |
for(TaxonNode tNode:listOfTaxonNodes){ |
569 | 569 |
//take that taxonNode as parent and remove from list with all it possible children |
570 | 570 |
//FIXME NPE for name |
571 |
TaxonNameBase name = tNode.getTaxon().getName();
|
|
571 |
TaxonName name = tNode.getTaxon().getName(); |
|
572 | 572 |
if(name.getNameCache().equalsIgnoreCase(genus)){ |
573 | 573 |
TaxonNode clone = (TaxonNode) tNode.clone(); |
574 | 574 |
if(!tNode.hasChildNodes()){ |
... | ... | |
598 | 598 |
if(parentNode == null){ |
599 | 599 |
//if no match found in list, create parentNode |
600 | 600 |
NonViralNameParserImpl parser = NonViralNameParserImpl.NewInstance(); |
601 |
TaxonNameBase<?,?> taxonNameBase = (TaxonNameBase<?,?>)parser.parseFullName(genus);
|
|
601 |
TaxonName<?,?> TaxonName = (TaxonName<?,?>)parser.parseFullName(genus);
|
|
602 | 602 |
//TODO Sec via configurator |
603 |
Taxon taxon = Taxon.NewInstance(taxonNameBase, null);
|
|
603 |
Taxon taxon = Taxon.NewInstance(TaxonName, null);
|
|
604 | 604 |
parentNode = newClassification.addChildTaxon(taxon, 0, null, null); |
605 | 605 |
result.addUpdatedObject(parentNode); |
606 | 606 |
} |
... | ... | |
877 | 877 |
} |
878 | 878 |
result.setTaxonLabel(taxonBase.getTitleCache()); |
879 | 879 |
|
880 |
TaxonNameBase<?,?> name = taxonBase.getName();
|
|
880 |
TaxonName<?,?> name = taxonBase.getName(); |
|
881 | 881 |
result.setNameUuid(name.getUuid()); |
882 | 882 |
result.setNameLabel(name.getTitleCache()); |
883 | 883 |
result.setNameWithoutAuthor(name.getNameCache()); |
Also available in: Unified diff
fix #6368 rename table and class TaxonNameBase