ref #6800: add configuration possibility to export all classifications in DwC-A export
authorKatja Luther <k.luther@bgbm.org>
Fri, 12 Jan 2018 11:47:46 +0000 (12:47 +0100)
committerKatja Luther <k.luther@bgbm.org>
Fri, 12 Jan 2018 11:47:46 +0000 (12:47 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExportToFileDestinationWizardPage.java

index 0654a1735473bcba5977c0c65c3fab817d0940d9..672909c4d4d1b1c5cd47e3579c211e0624eb46bd 100644 (file)
@@ -114,6 +114,7 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
     private Button checkUseSelectedtaxonNode;
 
     private Button checkUseSelectedClassification;
+    private Button checkUseAllClassification;
 
        protected ExportToFileDestinationWizardPage(String pageName, String type,
                        String title, String description, String extension, ExportConfiguratorBase configurator) {
@@ -284,8 +285,23 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
                                }
                                });
                                  checkUseSelectedtaxonNode.setSelection(true);
+                       }
+                       if(outputModelExport || dwcaExport){
+                                 if (dwcaExport){
+                                         checkUseAllClassification= new Button(selectNodeOrClassification,  SWT.RADIO);
+                                         checkUseAllClassification.setText("Export all classifications");
+                                         checkUseAllClassification.addListener(SWT.Selection, new Listener() {
+                                      @Override
+                                      public void handleEvent(Event e) {
+                                          Button b = (Button) e.widget;
+                                               GridData data = (GridData)  classificationSelectionCombo.getLayoutData();
+                                               data.exclude = b.getSelection();
+                                               classificationSelectionCombo.setVisible(!data.exclude);
+                                      }
+                                               });
+                                 }  
                                  checkUseSelectedClassification= new Button(selectNodeOrClassification,  SWT.RADIO);
-                                 checkUseSelectedClassification.setText("Export complete classification");
+                                 checkUseSelectedClassification.setText("Export selected classification");
                                  checkUseSelectedClassification.addListener(SWT.Selection, new Listener() {
                               @Override
                               public void handleEvent(Event e) {
@@ -297,6 +313,7 @@ public class ExportToFileDestinationWizardPage extends WizardPage implements Sel
                                  }
                                        });
                        }
+                       
                        if (node!= null){
                                selectedClassification = node.getClassification();
                        }