import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
//classification
if(element instanceof Classification){
String text = ((Classification) element).getName().getText();
- return text != null ? text : "Unnamed Taxonomic Tree";
+ return text != null ? text : "Unnamed Classification";
}
//taxon node
else if (element instanceof TaxonNode){
}else{
try{
String text = "";
- if (taxonNode.getStatus() != null){
- text += taxonNode.getStatus().getSymbol() + " ";
- }
- text += taxon.getName() != null ? ((IIdentifiableEntity) HibernateProxyHelper.deproxy(taxon.getName())).getTitleCache() : new String();
+ if (taxonNode.getStatus() != null){
+ text = taxonNode.getStatus().getSymbol() + " ";
+ }
+ text += taxon.getName() != null ? taxon.getName().getTitleCache() : "";
return text;
}catch(Exception e){
MessagingUtils.error(getClass(), e);