+
+ public static boolean isDefaultTaxonDescription(TaxonRowWrapperDTO taxonRowWrapperDTO){
+ return hasType(taxonRowWrapperDTO, DescriptionType.DEFAULT_VALUES_FOR_AGGREGATION);
+ }
+
+ public static boolean isAggregatedTaxonDescription(TaxonRowWrapperDTO taxonRowWrapperDTO){
+ return hasType(taxonRowWrapperDTO, DescriptionType.AGGREGATED_STRUC_DESC);
+ }
+
+ public static boolean isLiteratureTaxonDescription(TaxonRowWrapperDTO taxonRowWrapperDTO){
+ return hasType(taxonRowWrapperDTO, DescriptionType.SECONDARY_DATA);
+ }
+
+ private static boolean hasType(TaxonRowWrapperDTO taxonRowWrapperDTO, DescriptionType descriptionType){
+ return taxonRowWrapperDTO.getDescription().getDescription().getTypes().stream()
+ .anyMatch(type->type.equals(descriptionType));
+ }
+
+ public static Image getLiteratureDescriptionIcon() {
+ return ImageResources.getImage(ImageResources.HELP_TOPIC);
+ }
+
+ public static Image getAggregatedDescriptionIcon() {
+ return ImageResources.getImage(ImageResources.FUNNEL_ICON);
+ }
+
+ public static Image getDefaultDescriptionIcon() {
+ return ImageResources.getImage(ImageResources.VALIDATE_ICON);
+ }