3 * Copyright (C) 2013 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.dataimport
.wizard
;
12 import org
.eclipse
.jface
.wizard
.WizardPage
;
13 import org
.eclipse
.swt
.widgets
.Composite
;
15 import eu
.etaxonomy
.cdm
.ext
.biocase
.BioCaseQuery
;
16 import eu
.etaxonomy
.taxeditor
.view
.specimenSearch
.SpecimenSearchController
;
20 * Wizard page for entering search parameters
25 public class SpecimenSearchWizardPage
extends WizardPage
{
27 private SpecimenSearchController specimenSearchController
;
29 protected SpecimenSearchWizardPage(String pageName
) {
31 setDescription("Specify search parameters for external search query.");
32 setTitle("Search Specimens");
36 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
39 public void createControl(Composite parent
) {
40 specimenSearchController
= new SpecimenSearchController(parent
);
41 setControl(specimenSearchController
.getComposite());
45 * Returns a {@link BioCaseQuery} filled with the parameters defined in this wizard page
48 public BioCaseQuery
getQuery() {
49 BioCaseQuery query
= new BioCaseQuery();
50 query
.accessionNumber
= specimenSearchController
.getAccessionNumber();
51 query
.collector
= specimenSearchController
.getCollector();
52 query
.collectorsNumber
= specimenSearchController
.getCollectorNumber();
53 query
.country
= specimenSearchController
.getCountry();
54 // query.date = specimenSearchController.getDate();
55 query
.herbarium
= specimenSearchController
.getHerbarium();
56 query
.locality
= specimenSearchController
.getLocality();
57 query
.taxonName
= specimenSearchController
.getTaxonName();