import eu.etaxonomy.cdm.api.service.DefaultQuantitativeDescriptionBuilder;
import eu.etaxonomy.cdm.api.service.DescriptionBuilder;
import eu.etaxonomy.cdm.common.CdmUtils;
-import eu.etaxonomy.cdm.model.common.DescriptionElementSource;
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
import eu.etaxonomy.cdm.model.common.ISourceable;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.common.LanguageStringBase;
import eu.etaxonomy.cdm.model.common.Marker;
+import eu.etaxonomy.cdm.model.common.MarkerType;
import eu.etaxonomy.cdm.model.common.OriginalSourceBase;
import eu.etaxonomy.cdm.model.description.CategoricalData;
import eu.etaxonomy.cdm.model.description.CommonTaxonName;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
import eu.etaxonomy.cdm.model.description.Distribution;
import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
}
if (element instanceof Marker) {
Marker marker = (Marker) element;
- return marker.getMarkerType().getLabel() + " (" + marker.getFlag() + ")";
+ MarkerType type = marker.getMarkerType();
+ return (type == null ? "- no marker type -" : marker.getMarkerType().getLabel()) + " (" + marker.getFlag() + ")";
}
// TODO write return texts for NameRelationship, HomotypicalGroup, SpecimenTypeDesignation, etc.
return element.toString();
* @return a {@link java.lang.String} object.
*/
public static String getFeatureNodeContainerText(FeatureNodeContainer element) {
+ String result = null;
if(element.getFeatureNode() != null && element.getFeatureNode().getFeature() != null){
- return element.getFeatureNode().getFeature().getLabel(CdmStore.getDefaultLanguage());
+ result = element.getFeatureNode().getFeature().getLabel(CdmStore.getDefaultLanguage());
+ } else{
+ return "No label set";
}
- return "No label set";
+ if (result == null){
+ result = element.getFeatureNode().getFeature().getLabel();
+ }
+ return result;
}
/**