119 |
119 |
private Button checkUseSelectedClassification;
|
120 |
120 |
private Button checkUseAllClassification;
|
121 |
121 |
|
|
122 |
private Button checkExportUnpublished;
|
|
123 |
|
122 |
124 |
protected ExportToFileDestinationWizardPage(String pageName, String type,
|
123 |
125 |
String title, String description, String extension, ExportConfiguratorBase configurator) {
|
124 |
126 |
super(pageName);
|
... | ... | |
236 |
238 |
TaxonNode node = null;
|
237 |
239 |
|
238 |
240 |
composite.setLayout(gridLayout);
|
|
241 |
if (outputModelExport || dwcaExport){
|
|
242 |
checkExportUnpublished = new Button(composite, SWT.CHECK);
|
|
243 |
checkExportUnpublished.setText("Export unpublished taxa");
|
|
244 |
Label label = new Label(composite, SWT.NONE);
|
|
245 |
Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
|
|
246 |
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
|
|
247 |
gridData.horizontalSpan = 2;
|
|
248 |
separator.setLayoutData(gridData);
|
|
249 |
}
|
239 |
250 |
if(classifications == null){
|
240 |
251 |
classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null);
|
241 |
252 |
Collections.sort(classifications, new Comparator<Classification>() {
|
... | ... | |
283 |
294 |
}
|
284 |
295 |
}
|
285 |
296 |
}
|
286 |
|
|
|
297 |
|
287 |
298 |
checkUseSelectedtaxonNode.setText("Export selected subtree(s) ("+ taxonStr+")");
|
288 |
299 |
checkUseSelectedtaxonNode.addListener(SWT.Selection, new Listener() {
|
289 |
300 |
@Override
|
... | ... | |
308 |
319 |
GridData data = (GridData) classificationSelectionCombo.getLayoutData();
|
309 |
320 |
data.exclude = b.getSelection();
|
310 |
321 |
classificationSelectionCombo.setVisible(!data.exclude);
|
311 |
|
|
|
322 |
|
312 |
323 |
}
|
313 |
324 |
});
|
314 |
|
}
|
|
325 |
}
|
315 |
326 |
checkUseSelectedClassification= new Button(selectNodeOrClassification, SWT.RADIO);
|
316 |
327 |
checkUseSelectedClassification.setText("Export selected classification");
|
317 |
328 |
checkUseSelectedClassification.addListener(SWT.Selection, new Listener() {
|
... | ... | |
325 |
336 |
}
|
326 |
337 |
});
|
327 |
338 |
}
|
328 |
|
|
|
339 |
|
329 |
340 |
if (node!= null){
|
330 |
341 |
selectedClassification = node.getClassification();
|
331 |
342 |
}
|
... | ... | |
344 |
355 |
classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
|
345 |
356 |
true, false, 2, 1));
|
346 |
357 |
}
|
|
358 |
Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
|
|
359 |
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
|
|
360 |
gridData.horizontalSpan = 2;
|
|
361 |
separator.setLayoutData(gridData);
|
347 |
362 |
|
348 |
363 |
}
|
349 |
364 |
|
... | ... | |
388 |
403 |
text_exportFileName.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
|
389 |
404 |
true, false));
|
390 |
405 |
}
|
|
406 |
|
|
407 |
|
391 |
408 |
// make the composite the wizard pages control
|
392 |
409 |
setControl(composite);
|
393 |
410 |
}
|
... | ... | |
426 |
443 |
return text_folder;
|
427 |
444 |
}
|
428 |
445 |
|
|
446 |
public boolean isExportUnpublishedData(){
|
|
447 |
return checkExportUnpublished.getSelection();
|
|
448 |
}
|
|
449 |
|
429 |
450 |
private void createClassificationSelectionCombo(Composite parent){
|
430 |
451 |
|
431 |
452 |
// Composite classificationSelection = new Composite(parent, SWT.NULL);
|
... | ... | |
488 |
509 |
}
|
489 |
510 |
return checkUseAllClassification.getSelection();
|
490 |
511 |
}
|
491 |
|
|
|
512 |
|
492 |
513 |
public Set<UUID> getAllClassificationUuids(){
|
493 |
514 |
Set<UUID> allClassificationUuids = new HashSet();
|
494 |
515 |
for (Classification classification: this.classifications){
|
add possibility to choose whether unpublished data should be exported or not