@Override
public String getText(Object element) {
SpecimenTypeDesignation typeDesignation = (SpecimenTypeDesignation)element;
- String label = typeDesignation.getTypeStatus().getLabel()+" of ";
- Set<TaxonNameBase> typifiedNames = typeDesignation.getTypifiedNames();
- for (TaxonNameBase taxonNameBase : typifiedNames) {
- label += taxonNameBase+", ";
- }
- if(label.endsWith(", ")){
- label = label.substring(0, label.length()-2);
- }
+ String label = typeDesignation.getTypeStatus()!=null?typeDesignation.getTypeStatus().getLabel()+" of ":"Type of ";
+ Set<TaxonNameBase> typifiedNames = typeDesignation.getTypifiedNames();
+ for (TaxonNameBase taxonNameBase : typifiedNames) {
+ label += taxonNameBase+", ";
+ }
+ if(label.endsWith(", ")){
+ label = label.substring(0, label.length()-2);
+ }
return label;
}
});