1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2013 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.taxeditor.editor.view.dataimport;
|
11
|
|
12
|
import org.eclipse.jface.wizard.WizardPage;
|
13
|
import org.eclipse.swt.widgets.Composite;
|
14
|
|
15
|
import eu.etaxonomy.taxeditor.view.specimenSearch.SpecimenProviderSelectionController;
|
16
|
|
17
|
|
18
|
/**
|
19
|
* Wizard page for selecting the specimen provider
|
20
|
* @author pplitzner
|
21
|
* @date 12.09.2013
|
22
|
*
|
23
|
*/
|
24
|
public class SpecimenProviderSelectionWizardPage extends WizardPage{
|
25
|
|
26
|
private SpecimenProviderSelectionController specimenProviderSelectionController;
|
27
|
|
28
|
protected SpecimenProviderSelectionWizardPage(String pageName) {
|
29
|
super(pageName);
|
30
|
setTitle("Select Specimen Provider");
|
31
|
setDescription("Select the provider to query for specimens.\nTo query a BioCASE " +
|
32
|
"provider the access point URL must be entered.");
|
33
|
}
|
34
|
|
35
|
/* (non-Javadoc)
|
36
|
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
|
37
|
*/
|
38
|
@Override
|
39
|
public void createControl(Composite parent) {
|
40
|
specimenProviderSelectionController = new SpecimenProviderSelectionController(parent);
|
41
|
setControl(specimenProviderSelectionController.getComposite());
|
42
|
}
|
43
|
|
44
|
public QueryType getQueryType(){
|
45
|
if(specimenProviderSelectionController.getComposite().getBtnBioCaseProvider().getSelection()){
|
46
|
return QueryType.BIOCASE;
|
47
|
}
|
48
|
else {// if(specimenProviderSelectionController.getComposite().getBtnGbif().getSelection()){
|
49
|
return QueryType.GBIF;
|
50
|
}
|
51
|
}
|
52
|
|
53
|
}
|