- added icons for derivates which have character data attached
authorPatric Plitzner <p.plitzner@bgbm.org>
Wed, 8 Apr 2015 12:40:47 +0000 (12:40 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Wed, 8 Apr 2015 12:40:47 +0000 (12:40 +0000)
.gitattributes
eu.etaxonomy.taxeditor.store/icons/artwork_derivate_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/icons/detail_image_derivate_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/icons/dna_derivate_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/icons/fieldunit_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/icons/living_plant_photo_derivate_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/icons/specimen_derivate_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/icons/specimen_scan_derivate_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/icons/tissue_sample_data-16x16-32.png [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java

index 08f91046936bbaa37817343bdf76e355973b367c..cf5f071a7ee8fd66b1655ba5579341951dd8d25a 100644 (file)
@@ -1070,6 +1070,7 @@ eu.etaxonomy.taxeditor.store/icons/alt_window_32.gif -text
 eu.etaxonomy.taxeditor.store/icons/amplification_derivate-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/applications-office.png -text
 eu.etaxonomy.taxeditor.store/icons/artwork_derivate-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/artwork_derivate_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/autonym_no_bg.gif -text
 eu.etaxonomy.taxeditor.store/icons/back.gif -text
 eu.etaxonomy.taxeditor.store/icons/basionym.gif -text
@@ -1096,7 +1097,9 @@ eu.etaxonomy.taxeditor.store/icons/delete.gif -text
 eu.etaxonomy.taxeditor.store/icons/delete_edit.gif -text
 eu.etaxonomy.taxeditor.store/icons/derivate_search_view-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/detail_image_derivate-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/detail_image_derivate_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/dna_derivate-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/dna_derivate_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/eclipse.gif -text
 eu.etaxonomy.taxeditor.store/icons/edit_16x16.gif -text
 eu.etaxonomy.taxeditor.store/icons/edit_16x16.ico -text
@@ -1105,6 +1108,7 @@ eu.etaxonomy.taxeditor.store/icons/error_co.gif -text
 eu.etaxonomy.taxeditor.store/icons/expandAll.jpg -text
 eu.etaxonomy.taxeditor.store/icons/export.gif -text
 eu.etaxonomy.taxeditor.store/icons/fieldunit-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/fieldunit_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/file_obj.gif -text
 eu.etaxonomy.taxeditor.store/icons/filter.gif -text
 eu.etaxonomy.taxeditor.store/icons/flat.gif -text
@@ -1133,6 +1137,7 @@ eu.etaxonomy.taxeditor.store/icons/large_image.gif -text
 eu.etaxonomy.taxeditor.store/icons/leaf_detail.png -text
 eu.etaxonomy.taxeditor.store/icons/linkto_help.gif -text
 eu.etaxonomy.taxeditor.store/icons/living_plant_photo_derivate-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/living_plant_photo_derivate_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/lock.png -text
 eu.etaxonomy.taxeditor.store/icons/lock_open.png -text
 eu.etaxonomy.taxeditor.store/icons/lockedstate.gif -text
@@ -1179,7 +1184,9 @@ eu.etaxonomy.taxeditor.store/icons/single_read_derivate_multilink-16x16-32.png -
 eu.etaxonomy.taxeditor.store/icons/smartmode_co.gif -text
 eu.etaxonomy.taxeditor.store/icons/sort.gif -text
 eu.etaxonomy.taxeditor.store/icons/specimen_derivate-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/specimen_derivate_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/specimen_scan_derivate-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/specimen_scan_derivate_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/step_done.gif -text
 eu.etaxonomy.taxeditor.store/icons/swap.gif -text
 eu.etaxonomy.taxeditor.store/icons/swap2.gif -text
@@ -1194,6 +1201,7 @@ eu.etaxonomy.taxeditor.store/icons/thin_close_view.gif -text
 eu.etaxonomy.taxeditor.store/icons/thin_max_view.gif -text
 eu.etaxonomy.taxeditor.store/icons/thin_restore_view.GIF -text
 eu.etaxonomy.taxeditor.store/icons/tissue_sample-16x16-32.png -text
+eu.etaxonomy.taxeditor.store/icons/tissue_sample_data-16x16-32.png -text
 eu.etaxonomy.taxeditor.store/icons/trash.gif -text
 eu.etaxonomy.taxeditor.store/icons/tree_icon_small.jpg -text
 eu.etaxonomy.taxeditor.store/icons/undo.gif -text
diff --git a/eu.etaxonomy.taxeditor.store/icons/artwork_derivate_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/artwork_derivate_data-16x16-32.png
new file mode 100644 (file)
index 0000000..317d2fe
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/artwork_derivate_data-16x16-32.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/detail_image_derivate_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/detail_image_derivate_data-16x16-32.png
new file mode 100644 (file)
index 0000000..37ab0ec
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/detail_image_derivate_data-16x16-32.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/dna_derivate_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/dna_derivate_data-16x16-32.png
new file mode 100644 (file)
index 0000000..3255f79
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/dna_derivate_data-16x16-32.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/fieldunit_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/fieldunit_data-16x16-32.png
new file mode 100644 (file)
index 0000000..3626a2c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/fieldunit_data-16x16-32.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/living_plant_photo_derivate_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/living_plant_photo_derivate_data-16x16-32.png
new file mode 100644 (file)
index 0000000..55db3a4
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/living_plant_photo_derivate_data-16x16-32.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/specimen_derivate_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/specimen_derivate_data-16x16-32.png
new file mode 100644 (file)
index 0000000..62c0d6c
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/specimen_derivate_data-16x16-32.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/specimen_scan_derivate_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/specimen_scan_derivate_data-16x16-32.png
new file mode 100644 (file)
index 0000000..c7ca7cf
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/specimen_scan_derivate_data-16x16-32.png differ
diff --git a/eu.etaxonomy.taxeditor.store/icons/tissue_sample_data-16x16-32.png b/eu.etaxonomy.taxeditor.store/icons/tissue_sample_data-16x16-32.png
new file mode 100644 (file)
index 0000000..68fb3cd
Binary files /dev/null and b/eu.etaxonomy.taxeditor.store/icons/tissue_sample_data-16x16-32.png differ
index d1d90b90b6448072f2e5723f9c8eec196f4671a5..51dcd8413270ab709099fb4e023837983396c784 100644 (file)
@@ -135,13 +135,21 @@ public class ImageResources {
        public static final String COLLAPSE_ALL = "collapse_all";
 
        public static final String TISSUE_SAMPLE_DERIVATE = "tissue_sample_derivate";
+       public static final String TISSUE_SAMPLE_DERIVATE_CHARACTER_DATA = "tissue_sample_derivate_character_data";
        public static final String DNA_SAMPLE_DERIVATE = "dna_sample_derivate";
+       public static final String DNA_SAMPLE_DERIVATE_CHARACTER_DATA = "dna_sample_derivate_character_data";
        public static final String FIELD_UNIT = "field_unit";
+       public static final String FIELD_UNIT_CHARACTER_DATA = "field_unit_character_data";
        public static final String SPECIMEN_DERIVATE = "specimen_derivate";
+       public static final String SPECIMEN_DERIVATE_CHARACTER_DATA = "specimen_derivate_character_data";
     public static final String ARTWORK_DERIVATE = "artwork_derivate";
+    public static final String ARTWORK_DERIVATE_CHARACTER_DATA = "artwork_derivate_character_data";
     public static final String SPECIMEN_SCAN_DERIVATE = "specimen_scan_derivate";
+    public static final String SPECIMEN_SCAN_DERIVATE_CHARACTER_DATA = "specimen_scan_derivate_character_data";
     public static final String LIVING_PLANT_PHOTO_DERIVATE = "living_plant_photo_derivate";
+    public static final String LIVING_PLANT_PHOTO_DERIVATE_CHARACTER_DATA = "living_plant_photo_derivate_character_data";
     public static final String DETAIL_IMAGE_DERIVATE = "detail_image_derivate";
+    public static final String DETAIL_IMAGE_DERIVATE_CHARACTER_DATA = "detail_image_derivate_character_data";
     public static final String SEQUENCE_DERIVATE = "sequence_derivate";
     public static final String AMPLIFICATION_DERIVATE = "amplification_derivate";
     public static final String SINGLE_READ_DERIVATE = "single_read_derivate";
@@ -327,20 +335,36 @@ public class ImageResources {
                        "lock_open.png");
                registerImage(registry, DNA_SAMPLE_DERIVATE,
                        "dna_derivate-16x16-32.png");
+               registerImage(registry, DNA_SAMPLE_DERIVATE_CHARACTER_DATA,
+                       "dna_derivate_data-16x16-32.png");
                registerImage(registry, FIELD_UNIT,
                        "fieldunit-16x16-32.png");
+               registerImage(registry, FIELD_UNIT_CHARACTER_DATA,
+                       "fieldunit_data-16x16-32.png");
                registerImage(registry, SPECIMEN_DERIVATE,
                        "specimen_derivate-16x16-32.png");
+               registerImage(registry, SPECIMEN_DERIVATE_CHARACTER_DATA,
+                       "specimen_derivate_data-16x16-32.png");
                registerImage(registry, ARTWORK_DERIVATE,
                        "artwork_derivate-16x16-32.png");
+               registerImage(registry, ARTWORK_DERIVATE_CHARACTER_DATA,
+                       "artwork_derivate_data-16x16-32.png");
                registerImage(registry, SPECIMEN_SCAN_DERIVATE,
                        "specimen_scan_derivate-16x16-32.png");
+               registerImage(registry, SPECIMEN_SCAN_DERIVATE_CHARACTER_DATA,
+                       "specimen_scan_derivate_data-16x16-32.png");
                registerImage(registry, LIVING_PLANT_PHOTO_DERIVATE,
                        "living_plant_photo_derivate-16x16-32.png");
+               registerImage(registry, LIVING_PLANT_PHOTO_DERIVATE_CHARACTER_DATA,
+                       "living_plant_photo_derivate_data-16x16-32.png");
                registerImage(registry, DETAIL_IMAGE_DERIVATE,
                        "detail_image_derivate-16x16-32.png");
+               registerImage(registry, DETAIL_IMAGE_DERIVATE_CHARACTER_DATA,
+                       "detail_image_derivate_data-16x16-32.png");
                registerImage(registry, TISSUE_SAMPLE_DERIVATE,
                        "tissue_sample-16x16-32.png");
+               registerImage(registry, TISSUE_SAMPLE_DERIVATE_CHARACTER_DATA,
+                       "tissue_sample_data-16x16-32.png");
                registerImage(registry, SEQUENCE_DERIVATE,
                        "sequence_derivate-16x16-32.png");
                registerImage(registry, AMPLIFICATION_DERIVATE,
index cdcf5500945a0879e27f00ae0d787402bef3da0a..80d49bca772aaaaea4f424300c8060e3e7851059 100644 (file)
@@ -304,44 +304,43 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
         }
         if(element instanceof CdmBase){
             CdmBase cdmBase = (CdmBase)element;
-//            boolean hasCharacterData = false;
-//            if(cdmBase.isInstanceOf(SpecimenOrObservationBase.class)){
-//                SpecimenOrObservationBase specimen = HibernateProxyHelper.deproxy(cdmBase, SpecimenOrObservationBase.class);
-//                if(!CdmStore.getService(IOccurrenceService.class).getCharacterDataForSpecimen(specimen).isEmpty()){
-//                    hasCharacterData = true;
-//                    return ImageResources.getImage(ImageResources.CHARACTER_DATA_DERIVATE);
-//                }
-//            }
+            boolean hasCharacterData = false;
+            if(cdmBase.isInstanceOf(SpecimenOrObservationBase.class)){
+                SpecimenOrObservationBase<?> specimen = HibernateProxyHelper.deproxy(cdmBase, SpecimenOrObservationBase.class);
+                if(!CdmStore.getService(IOccurrenceService.class).getCharacterDataForSpecimen(specimen).isEmpty()){
+                    hasCharacterData = true;
+                }
+            }
             if(cdmBase.isInstanceOf(FieldUnit.class)){
-                return ImageResources.getImage(ImageResources.FIELD_UNIT);
+                return hasCharacterData?ImageResources.getImage(ImageResources.FIELD_UNIT_CHARACTER_DATA):ImageResources.getImage(ImageResources.FIELD_UNIT);
             }
             else if(cdmBase.isInstanceOf(DerivedUnit.class)){
                 DerivedUnit derivedUnit = HibernateProxyHelper.deproxy(element, DerivedUnit.class);
                 if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.FieldUnit){
-                    return ImageResources.getImage(ImageResources.FIELD_UNIT);
+                    return hasCharacterData?ImageResources.getImage(ImageResources.FIELD_UNIT_CHARACTER_DATA):ImageResources.getImage(ImageResources.FIELD_UNIT);
                 }
                 else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.DnaSample){
-                    return ImageResources.getImage(ImageResources.DNA_SAMPLE_DERIVATE);
+                    return hasCharacterData?ImageResources.getImage(ImageResources.DNA_SAMPLE_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.DNA_SAMPLE_DERIVATE);
                 }
                 else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.TissueSample){
-                    return ImageResources.getImage(ImageResources.TISSUE_SAMPLE_DERIVATE);
+                    return hasCharacterData?ImageResources.getImage(ImageResources.TISSUE_SAMPLE_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.TISSUE_SAMPLE_DERIVATE);
                 }
                 else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
-                    return ImageResources.getImage(ImageResources.SPECIMEN_DERIVATE);
+                    return hasCharacterData?ImageResources.getImage(ImageResources.SPECIMEN_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.SPECIMEN_DERIVATE);
                 }
                 else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.Media){
                     if(derivedUnit.getKindOfUnit()!=null){
                         if(derivedUnit.getKindOfUnit().equals(getArtworkTerm())){
-                            return ImageResources.getImage(ImageResources.ARTWORK_DERIVATE);
+                            return hasCharacterData?ImageResources.getImage(ImageResources.ARTWORK_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.ARTWORK_DERIVATE);
                         }
                         else if(derivedUnit.getKindOfUnit().equals(getLivingPlantPhotoTerm())){
-                            return ImageResources.getImage(ImageResources.LIVING_PLANT_PHOTO_DERIVATE);
+                            return hasCharacterData?ImageResources.getImage(ImageResources.LIVING_PLANT_PHOTO_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.LIVING_PLANT_PHOTO_DERIVATE);
                         }
                         else if(derivedUnit.getKindOfUnit().equals(getSpecimenScanTerm())){
-                            return ImageResources.getImage(ImageResources.SPECIMEN_SCAN_DERIVATE);
+                            return hasCharacterData?ImageResources.getImage(ImageResources.SPECIMEN_SCAN_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.SPECIMEN_SCAN_DERIVATE);
                         }
                         else if(derivedUnit.getKindOfUnit().equals(getDetailImageTerm())){
-                            return ImageResources.getImage(ImageResources.DETAIL_IMAGE_DERIVATE);
+                            return hasCharacterData?ImageResources.getImage(ImageResources.DETAIL_IMAGE_DERIVATE_CHARACTER_DATA):ImageResources.getImage(ImageResources.DETAIL_IMAGE_DERIVATE);
                         }
                     }
                 }