ref #10448: adapt export wizards
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / io / wizard / ExportToFileDestinationWizardPage.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The content of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.io.wizard;
10
11 import java.text.SimpleDateFormat;
12 import java.util.Calendar;
13 import java.util.Collections;
14 import java.util.HashSet;
15 import java.util.List;
16 import java.util.Set;
17 import java.util.UUID;
18
19 import org.eclipse.jface.layout.GridLayoutFactory;
20 import org.eclipse.jface.wizard.WizardPage;
21 import org.eclipse.swt.SWT;
22 import org.eclipse.swt.events.SelectionAdapter;
23 import org.eclipse.swt.events.SelectionEvent;
24 import org.eclipse.swt.events.SelectionListener;
25 import org.eclipse.swt.layout.GridData;
26 import org.eclipse.swt.layout.GridLayout;
27 import org.eclipse.swt.widgets.Button;
28 import org.eclipse.swt.widgets.Combo;
29 import org.eclipse.swt.widgets.Composite;
30 import org.eclipse.swt.widgets.DirectoryDialog;
31 import org.eclipse.swt.widgets.Event;
32 import org.eclipse.swt.widgets.Label;
33 import org.eclipse.swt.widgets.Listener;
34 import org.eclipse.swt.widgets.Text;
35
36 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
37 import eu.etaxonomy.cdm.api.service.IClassificationService;
38 import eu.etaxonomy.cdm.filter.LogicFilter;
39 import eu.etaxonomy.cdm.io.cdmLight.CdmLightExportConfigurator;
40 import eu.etaxonomy.cdm.io.coldp.ColDpExportConfigurator;
41 import eu.etaxonomy.cdm.io.common.ExportConfiguratorBase;
42 import eu.etaxonomy.cdm.io.csv.caryophyllales.out.CsvNameExportConfigurator;
43 import eu.etaxonomy.cdm.io.csv.redlist.demo.CsvDemoExportConfigurator;
44 import eu.etaxonomy.cdm.io.dwca.out.DwcaTaxExportConfigurator;
45 import eu.etaxonomy.cdm.io.jaxb.JaxbExportConfigurator;
46 import eu.etaxonomy.cdm.io.sdd.out.SDDExportConfigurator;
47 import eu.etaxonomy.cdm.io.tcsxml.out.TcsXmlExportConfigurator;
48 import eu.etaxonomy.cdm.io.wfo.out.WfoExportConfigurator;
49 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
50 import eu.etaxonomy.cdm.model.taxon.Classification;
51 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
52 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDtoByNameComparator;
53 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDtoByRankAndNameComparator;
54 import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDtoNaturalComparator;
55 import eu.etaxonomy.taxeditor.preference.NavigatorOrderEnum;
56 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
57 import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
58 import eu.etaxonomy.taxeditor.store.CdmStore;
59
60 /**
61 * ExportToFileDestinationWizardPage class.
62 *
63 * @author n.hoffmann
64 * @created 15.06.2009
65 */
66 public class ExportToFileDestinationWizardPage extends WizardPage implements SelectionListener {
67
68 /** Constant <code>DATE_FORMAT_NOW="yyyyMMddHHmm"</code> */
69 public static final String DATE_FORMAT_NOW = "yyyyMMddHHmm";
70
71 /** Constant <code>JAXB_EXPORT="JAXB_EXPORT"</code> */
72 public static final String JAXB_EXPORT = "JAXB_EXPORT";
73
74 /** Constant <code>TCS_EXPORT="TCS_EXPORT"</code> */
75 public static final String TCS_EXPORT = "TCS_EXPORT";
76
77 /** Constant <code>SDD_EXPORT="SDD_EXPORT"</code> */
78 public static final String SDD_EXPORT = "SDD_EXPORT";
79
80 public static final String DWCA_EXPORT = "DWCA_EXPORT";
81 public static final String WFO_EXPORT = "WFO_EXPORT";
82 public static final String CDM_LIGHT_EXPORT = "CDM_LIGHT(CSV)";
83 public static final String COL_DP_EXPORT = "COL DP";
84 public static final String CSV_EXPORT = "CSV_EXPORT";
85 public static final String CSV_NAME_EXPORT = "CSV_NAME_EXPORT";
86 private static final String CSV_PRINT_EXPORT = "CSV_PRINT_EXPORT";
87 private static final String EXPORT_FOLDER = "EXPORT_FOLDER";
88 public static final String XML = "xml";
89
90 public static final String CSV = "csv";
91
92 public static final String ZIP = "zip";
93
94 private boolean csvExport = false;
95
96 private boolean csvNameExport = false;
97
98 private boolean csvPrintExport = false;
99
100 private boolean cdmLightExport = false;
101
102 private boolean colDPExport = false;
103 private boolean dwcaExport = false;
104 private boolean wfoExport = false;
105
106 private DirectoryDialog folderDialog;
107 private Text text_exportFileName;
108
109 private Text text_folder;
110
111 private final String type;
112
113 private final String extension;
114
115 private Combo classificationSelectionCombo;
116
117 private List<Classification> classifications;
118
119 private Classification selectedClassification;
120
121 private ExportConfiguratorBase<?, ?, ?> configurator;
122 private Button checkUseSelectedTaxonNode;
123
124 private Button checkUseSelectedClassification;
125 private Button checkUseAllClassification;
126
127 private Button checkExportUnpublished;
128 private Button checkExportFactualData;
129 private Button checkExportUnpublishedFactualData;
130
131 private Combo orderSelectionCombo;
132
133 protected ExportToFileDestinationWizardPage(String pageName, String type, String title, String description,
134 String extension, ExportConfiguratorBase<?, ?, ?> configurator) {
135 super(pageName);
136 this.configurator = configurator;
137 this.type = type;
138 switch (type) {
139 case CSV_EXPORT:
140 csvExport = true;
141 break;
142 case CSV_NAME_EXPORT:
143 csvNameExport = true;
144 break;
145 case CDM_LIGHT_EXPORT:
146 cdmLightExport = true;
147 break;
148 case COL_DP_EXPORT:
149 colDPExport = true;
150 break;
151 case CSV_PRINT_EXPORT:
152 csvPrintExport = true;
153 break;
154 case DWCA_EXPORT:
155 dwcaExport = true;
156 break;
157 case WFO_EXPORT:
158 wfoExport = true;
159 break;
160 default:
161 throw new RuntimeException("Export type not yet handeled: " + type);
162 }
163 this.extension = extension;
164 this.setTitle(title);
165 this.setDescription(description);
166 }
167
168 public static ExportToFileDestinationWizardPage Jaxb(JaxbExportConfigurator configurator) {
169 return new ExportToFileDestinationWizardPage(JAXB_EXPORT, "jaxb", "JAXB Export",
170 "Exports the content of the currently selected database into the cdm jaxb format.", XML, configurator);
171 }
172
173 public static ExportToFileDestinationWizardPage Tcs(TcsXmlExportConfigurator config) {
174 return new ExportToFileDestinationWizardPage(TCS_EXPORT, "tcs", "Tcs Export",
175 "Export the content of the currently selected database into TCS format.", XML, config);
176 }
177
178 public static ExportToFileDestinationWizardPage Sdd(SDDExportConfigurator config) {
179 return new ExportToFileDestinationWizardPage(SDD_EXPORT, "sdd", "Sdd Export",
180 "Export the content of the currently selected database into SDD format.", XML, config);
181 }
182
183 public static ExportToFileDestinationWizardPage Dwca(DwcaTaxExportConfigurator config) {
184 return new ExportToFileDestinationWizardPage(DWCA_EXPORT, DWCA_EXPORT, "DwC-Archive Export",
185 "Export the content of the currently selected database into Darwin Core Archive format.", ZIP, config);
186 }
187 public static ExportToFileDestinationWizardPage WFO(WfoExportConfigurator config) {
188 return new ExportToFileDestinationWizardPage(WFO_EXPORT, WFO_EXPORT, "WFO DwC-Archive Classification Export",
189 "Export the content of the currently selected database into WFO "
190 + "Darwin Core Archive format.", ZIP, config);
191 }
192
193 public static ExportToFileDestinationWizardPage CdmLight(CdmLightExportConfigurator config) {
194
195 return new ExportToFileDestinationWizardPage(CDM_LIGHT_EXPORT, CDM_LIGHT_EXPORT, "CDM Light Export (csv)",
196 "Export the content of the currently selected database into the CDM light (csv) format.", CSV, config);
197 }
198
199 public static ExportToFileDestinationWizardPage ColDp(ColDpExportConfigurator config) {
200
201 return new ExportToFileDestinationWizardPage(COL_DP_EXPORT, COL_DP_EXPORT, "Col DP Export (zip)",
202 "Export the content of the currently selected database into the Catalogue of Life Data Package (Col DP) format.", ZIP, config);
203 }
204
205 public static ExportToFileDestinationWizardPage Csv(CsvDemoExportConfigurator config) {
206
207 return new ExportToFileDestinationWizardPage(CSV_EXPORT, CSV_EXPORT, "CSV Export",
208 "Export the content of the currently selected database into Comma Separated Value format.", CSV,
209 config);
210 }
211
212 public static ExportToFileDestinationWizardPage CsvNames(CsvNameExportConfigurator config) {
213
214 return new ExportToFileDestinationWizardPage(CSV_NAME_EXPORT, CSV_NAME_EXPORT, "CSV Name Export",
215 "Export the names of the currently selected database into Semicolon Separated Value format.", CSV,
216 config);
217 }
218
219 public static ExportToFileDestinationWizardPage CsvPrint(CsvNameExportConfigurator config) {
220
221 return new ExportToFileDestinationWizardPage(CSV_PRINT_EXPORT, CSV_NAME_EXPORT, "CSV Print Export",
222 "Export the content of the currently selected database into Semicolon Separated Value format.", CSV,
223 config);
224 }
225
226 /** {@inheritDoc} */
227 @Override
228 public void createControl(Composite parent) {
229
230 setPageComplete(false);
231
232 Composite composite = new Composite(parent, SWT.NONE);
233 GridLayout gridLayout = new GridLayout();
234
235 gridLayout.numColumns = 2;
236 TaxonNode node = null;
237
238 composite.setLayout(gridLayout);
239 if (cdmLightExport || dwcaExport || colDPExport || wfoExport) {
240 checkExportUnpublished = new Button(composite, SWT.CHECK);
241 checkExportUnpublished.setText("Export unpublished taxa");
242 Label emptyLabel = new Label(composite, SWT.NONE);
243 checkExportFactualData = new Button(composite, SWT.CHECK);
244 checkExportFactualData.setText("Export factual data");
245 checkExportFactualData.setSelection(true);
246 checkExportFactualData.addListener(SWT.Selection, e -> {
247 Button b = (Button) e.widget;
248 GridData data = (GridData) checkExportUnpublishedFactualData.getLayoutData();
249 data.exclude = b.getSelection();
250 checkExportUnpublishedFactualData.setEnabled(data.exclude);
251 });
252 if (cdmLightExport || colDPExport) {
253 emptyLabel = new Label(composite, SWT.NONE);
254
255 checkExportUnpublishedFactualData = new Button(composite, SWT.CHECK);
256 checkExportUnpublishedFactualData.setText("Export unpublished factual data");
257 checkExportUnpublishedFactualData.setSelection(false);
258 GridData gridData = new GridData();
259 gridData.horizontalIndent = 20;
260 checkExportUnpublishedFactualData.setLayoutData(gridData);
261 }
262
263 @SuppressWarnings("unused")
264 Label nope = new Label(composite, SWT.NONE);
265
266 Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
267 GridData gridDataSep = new GridData(GridData.FILL_HORIZONTAL);
268 gridDataSep.horizontalSpan = 2;
269 separator.setLayoutData(gridDataSep);
270 }
271 if (classifications == null) {
272 classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
273 Collections.sort(classifications, (o1, o2) -> {
274 if (o1.equals(o2)) {
275 return 0;
276 }
277 int result = o1.getTitleCache().compareTo(o2.getTitleCache());
278 if (result == 0) {
279 return o1.getUuid().compareTo(o2.getUuid());
280 }
281 return result;
282 });
283 if (!configurator.getTaxonNodeFilter().getClassificationFilter().isEmpty()) {
284 selectedClassification = CdmStore.getService(IClassificationService.class)
285 .load(configurator.getTaxonNodeFilter().getClassificationFilter().get(0).getUuid());
286 } else {
287
288 selectedClassification = classifications.iterator().next();
289 }
290 }
291
292 if (csvExport || csvPrintExport || cdmLightExport || csvNameExport || dwcaExport || colDPExport || wfoExport) {
293
294 // Label comboBoxLabel = new Label(composite, SWT.NONE);
295 // comboBoxLabel.setText("Classification");
296 Composite selectNodeOrClassification = new Composite(composite, SWT.NONE);
297 GridLayout grid = new GridLayout();
298 grid.numColumns = 1;
299 selectNodeOrClassification.setLayout(grid);
300 if ((cdmLightExport || dwcaExport || colDPExport) && !configurator.getTaxonNodeFilter().getSubtreeFilter().isEmpty()) {
301 checkUseSelectedTaxonNode = new Button(selectNodeOrClassification, SWT.RADIO);
302 String taxonStr = "";
303 int count = configurator.getTaxonNodeFilter().getSubtreeFilter().size();
304 for (LogicFilter<TaxonNode> filter : configurator.getTaxonNodeFilter().getSubtreeFilter()) {
305 node = CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().load(filter.getUuid());
306 count--;
307 if (node.hasTaxon()) {
308 taxonStr += node.getTaxon().getName().getTitleCache();
309 if (count > 0) {
310 taxonStr += ", ";
311 }
312 }
313 }
314
315 checkUseSelectedTaxonNode.setText("Export selected subtree(s) (" + taxonStr + ")");
316 checkUseSelectedTaxonNode.addListener(SWT.Selection, e -> {
317 Button b = (Button) e.widget;
318 GridData data = (GridData) classificationSelectionCombo.getLayoutData();
319 data.exclude = b.getSelection();
320 classificationSelectionCombo.setEnabled(!data.exclude);
321 });
322 checkUseSelectedTaxonNode.setSelection(true);
323 }
324 if (cdmLightExport || dwcaExport || colDPExport || wfoExport) {
325 if (dwcaExport) {
326 checkUseAllClassification = new Button(selectNodeOrClassification, SWT.RADIO);
327 checkUseAllClassification.setText("Export all classifications");
328 checkUseAllClassification.addListener(SWT.Selection, new Listener() {
329 @Override
330 public void handleEvent(Event e) {
331 Button b = (Button) e.widget;
332 GridData data = (GridData) classificationSelectionCombo.getLayoutData();
333 data.exclude = b.getSelection();
334 classificationSelectionCombo.setEnabled(!data.exclude);
335
336 }
337 });
338 }
339 checkUseSelectedClassification = new Button(selectNodeOrClassification, SWT.RADIO);
340 checkUseSelectedClassification.setText("Export selected classification");
341 checkUseSelectedClassification.addListener(SWT.Selection, e -> {
342 Button b = (Button) e.widget;
343 GridData data = (GridData) classificationSelectionCombo.getLayoutData();
344 data.exclude = b.getSelection();
345 classificationSelectionCombo.setEnabled(data.exclude);
346 });
347 }
348
349 if (node != null) {
350 selectedClassification = node.getClassification();
351 }
352 createClassificationSelectionCombo(selectNodeOrClassification);
353 if (cdmLightExport) {
354 Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
355 GridData gridDataSep = new GridData();
356 gridDataSep = new GridData(GridData.BEGINNING, GridData.CENTER, true, true);
357 gridDataSep.horizontalSpan = 2;
358 separator.setLayoutData(gridDataSep);
359
360 Composite comp = new Composite(composite, SWT.NONE);
361
362 GridData gridData = new GridData();
363 gridData = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
364 gridData.horizontalSpan = 2;
365 comp.setLayoutData(gridData);
366
367 Label label = new Label(comp, SWT.NONE);
368 label.setText("Sorting of taxa");
369
370 orderSelectionCombo = new Combo(comp, SWT.BORDER | SWT.READ_ONLY);
371
372 GridLayoutFactory.fillDefaults().applyTo(comp);
373 for (NavigatorOrderEnum display : NavigatorOrderEnum.values()) {
374 orderSelectionCombo.add(display.getLabel());
375 }
376
377 int index = 0;
378 if (PreferencesUtil.getStringValue(PreferencePredicate.TaxonNodeOrder.getKey()) != null) {
379 NavigatorOrderEnum orderInNavigator = NavigatorOrderEnum
380 .valueOf(PreferencesUtil.getStringValue(PreferencePredicate.TaxonNodeOrder.getKey()));
381
382 for (String itemLabel : orderSelectionCombo.getItems()) {
383 if (itemLabel.equalsIgnoreCase(orderInNavigator.getLabel())) {
384 orderSelectionCombo.select(index);
385 setComparatorToConfig();
386 break;
387 }
388 index++;
389 }
390 }
391
392 orderSelectionCombo.addSelectionListener(new SelectionListener() {
393
394 @Override
395 public void widgetSelected(SelectionEvent e) {
396 setComparatorToConfig();
397 }
398
399 @Override
400 public void widgetDefaultSelected(SelectionEvent e) {
401 // TODO Auto-generated method stub
402 }
403 });
404 }
405
406 if (checkUseSelectedTaxonNode != null) {
407 if (checkUseSelectedTaxonNode.getSelection()) {
408 classificationSelectionCombo.setEnabled(false);
409 }
410 } else {
411 classificationSelectionCombo.setEnabled(true);
412 classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
413 }
414 Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
415 GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
416 gridData.horizontalSpan = 2;
417 separator.setLayoutData(gridData);
418
419 }
420
421 Label folderLabel = new Label(composite, SWT.NONE);
422 folderLabel.setText("Select Folder for exported files");
423 folderLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
424 folderDialog = new DirectoryDialog(parent.getShell());
425 String exportFolder = PreferencesUtil.getStringValue(EXPORT_FOLDER, true);
426 folderDialog.setFilterPath(exportFolder);
427
428 text_folder = new Text(composite, SWT.BORDER);
429 text_folder.setEditable(false);
430 text_folder.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
431 if (exportFolder != null) {
432 text_folder.setText(exportFolder);
433 setPageComplete(true);
434 }
435
436 Button button = new Button(composite, SWT.PUSH);
437 button.setText("Browse...");
438
439 button.addSelectionListener(new SelectionAdapter() {
440 @Override
441 public void widgetSelected(SelectionEvent e) {
442 super.widgetSelected(e);
443
444 String path = folderDialog.open();
445 if (path != null) { // a folder was selected
446 text_folder.setText(path);
447 PreferencesUtil.setStringValue(EXPORT_FOLDER, path);
448 setPageComplete(true);
449 }
450 }
451 });
452 if (!cdmLightExport) {
453
454 Label fileLabel = new Label(composite, SWT.NONE);
455 fileLabel.setText("File");
456 text_exportFileName = new Text(composite, SWT.BORDER);
457 text_exportFileName.setText(generateFilename());
458 text_exportFileName.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
459 }
460
461 // make the composite the wizard pages control
462 setControl(composite);
463 }
464
465 protected void setComparatorToConfig() {
466 if (orderSelectionCombo.getText().equals(NavigatorOrderEnum.NaturalOrder.getLabel())) {
467 ((CdmLightExportConfigurator) configurator).setTaxonNodeComparator(new TaxonNodeDtoNaturalComparator());
468 } else if (orderSelectionCombo.getText().equals(NavigatorOrderEnum.AlphabeticalOrder.getLabel())) {
469 ((CdmLightExportConfigurator) configurator).setTaxonNodeComparator(new TaxonNodeDtoByNameComparator());
470 } else {
471 ((CdmLightExportConfigurator) configurator)
472 .setTaxonNodeComparator(new TaxonNodeDtoByRankAndNameComparator());
473 }
474 }
475
476 protected String generateFilename() {
477 StringBuffer buffer = new StringBuffer();
478
479 Calendar cal = Calendar.getInstance();
480 SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
481 buffer.append(sdf.format(cal.getTime()));
482
483 buffer.append("-");
484 buffer.append(type + "_");
485
486 String source = ((ICdmRemoteSource) CdmStore.getActiveCdmSource()).toString();
487 source = source.substring(source.indexOf("/") + 1);
488 buffer.append(source);
489
490 buffer.append(".");
491 buffer.append(extension);
492
493 return buffer.toString();
494 }
495
496 public String getExportFileName() {
497 return text_exportFileName.getText();
498 }
499
500 public String getFolderText() {
501 return text_folder.getText();
502 }
503
504 public Text getFolderComposite() {
505 return text_folder;
506 }
507
508 public boolean isExportUnpublishedData() {
509 return checkExportUnpublished.getSelection();
510 }
511
512 public boolean isExportFactualData() {
513 return checkExportFactualData.getSelection();
514 }
515
516 public boolean isExportUnpublishedFactualData() {
517 return checkExportUnpublishedFactualData.getSelection();
518 }
519
520 private void createClassificationSelectionCombo(Composite parent) {
521
522 // Composite classificationSelection = new Composite(parent, SWT.NULL);
523 // classificationSelection.setLayoutData(new GridData(SWT.FILL, SWT.TOP,
524 // true, false, 1, 1));
525
526 // GridLayout layout = new GridLayout();
527 // classificationSelection.setLayout(layout);
528 GridData gridData = new GridData();
529 gridData = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
530 gridData.horizontalIndent = 5;
531 // classificationSelection.setLayoutData(gridData);
532
533 classificationSelectionCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
534 classificationSelectionCombo.setLayoutData(gridData);
535 for (Classification tree : classifications) {
536 classificationSelectionCombo.add(tree.getTitleCache(), classifications.indexOf(tree));
537 }
538
539 classificationSelectionCombo.select(classifications.indexOf(selectedClassification));
540
541 // TODO remember last selection
542 classificationSelectionCombo.addSelectionListener(this);
543
544 // return classificationSelection;
545 }
546
547 public Combo getCombo() {
548 return classificationSelectionCombo;
549 }
550
551 @Override
552 public void widgetSelected(SelectionEvent e) {
553 selectedClassification = classifications.get(classificationSelectionCombo.getSelectionIndex());
554 }
555
556 public Classification getSelectedClassification() {
557 return selectedClassification;
558 }
559
560 @Override
561 public void widgetDefaultSelected(SelectionEvent e) {
562 // not needed here
563 }
564
565 public UUID getSelectedClassificationUUID() {
566 return selectedClassification.getUuid();
567 }
568
569 public boolean getCheckUseSelectedTaxonNode() {
570 if (checkUseSelectedTaxonNode == null) {
571 return false;
572 }
573 return checkUseSelectedTaxonNode.getSelection();
574 }
575
576 public boolean getCheckUseAllClassifications() {
577 if (checkUseAllClassification == null) {
578 return false;
579 }
580 return checkUseAllClassification.getSelection();
581 }
582
583 public Set<UUID> getAllClassificationUuids() {
584 Set<UUID> allClassificationUuids = new HashSet<>();
585 for (Classification classification : this.classifications) {
586 allClassificationUuids.add(classification.getUuid());
587 }
588 return allClassificationUuids;
589 }
590
591 @Override
592 public boolean canFlipToNextPage() {
593 return getFolderText() != null;
594 }
595 }