Import specimen scans with StillImage type
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 11 Aug 2016 13:20:48 +0000 (15:20 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 11 Aug 2016 13:20:48 +0000 (15:20 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java

index 4cffe35bb8f079cdbf2282cae9a2d222167b6ff5..daf96f4315be5126cf654de656924d9e05dd03a6 100644 (file)
@@ -68,7 +68,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
                                 new MenuItem(addMenu, SWT.SEPARATOR);
                                 createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
                                 createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
                                 new MenuItem(addMenu, SWT.SEPARATOR);
                                 createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
                                 createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for Specimen
                                 return;
                             }
                             //context menu for Specimen
@@ -76,19 +76,19 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
 
                                 createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
                                 createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
 
                                 createMenuItem(addMenu, TISSUE_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.TissueSample, DerivationEventType.PREPARATION());
                                 createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for TissueSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.TissueSample){
                                createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
                                 return;
                             }
                             //context menu for TissueSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.TissueSample){
                                createMenuItem(addMenu, DNA_SAMPLE, selectedTreeNode, DnaSample.class, SpecimenOrObservationType.DnaSample, DerivationEventType.DNA_EXTRACTION());
-                               createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                               createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for DnaSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.DnaSample){
                                 createMenuItem(addMenu, CONSENSUS_SEQUENCE, selectedTreeNode, Sequence.class, null, null);
                                 return;
                             }
                             //context menu for DnaSample
                             else if(selectedTreeNode.getValue() instanceof DnaSample && ((DnaSample)selectedTreeNode.getValue()).getRecordBasis()==SpecimenOrObservationType.DnaSample){
                                 createMenuItem(addMenu, CONSENSUS_SEQUENCE, selectedTreeNode, Sequence.class, null, null);
-                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.Media, DerivationEventType.ACCESSIONING());
+                                createMenuItem(addMenu, MEDIA_SPECIMEN, selectedTreeNode, MediaSpecimen.class, SpecimenOrObservationType.StillImage, DerivationEventType.ACCESSIONING());
                                 return;
                             }
                             //context menu for Sequence
                                 return;
                             }
                             //context menu for Sequence
@@ -109,7 +109,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
     }
 
     private void createMenuItem(Menu menu, String menuLabel, final TreeNode selectedNode, Class<?> childClass, final SpecimenOrObservationType specimenType, final DerivationEventType derivationEventType) {
     }
 
     private void createMenuItem(Menu menu, String menuLabel, final TreeNode selectedNode, Class<?> childClass, final SpecimenOrObservationType specimenType, final DerivationEventType derivationEventType) {
-        if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.Media)){
+        if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.StillImage)){
             //media submenu
             MenuItem mediaItem = new MenuItem(menu, SWT.CASCADE);
             mediaItem.setText(Messages.CreateDerivateContextMenu_MEDIA);
             //media submenu
             MenuItem mediaItem = new MenuItem(menu, SWT.CASCADE);
             mediaItem.setText(Messages.CreateDerivateContextMenu_MEDIA);