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
.editor
.view
.dataimport
;
12 import org
.eclipse
.jface
.wizard
.WizardPage
;
13 import org
.eclipse
.swt
.widgets
.Composite
;
15 import eu
.etaxonomy
.cdm
.ext
.occurrence
.OccurenceQuery
;
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 an {@link OccurenceQuery} filled with the parameters defined in this wizard page
48 public OccurenceQuery
getQuery() {
49 String accessionNumber
= specimenSearchController
.getAccessionNumber();
50 String collector
= specimenSearchController
.getCollector();
51 String collectorsNumber
= specimenSearchController
.getCollectorNumber();
52 String country
= specimenSearchController
.getCountry();
53 // date = specimenSearchController.getDate();
54 String herbarium
= specimenSearchController
.getHerbarium();
55 String locality
= specimenSearchController
.getLocality();
56 String taxonName
= specimenSearchController
.getTaxonName();
57 return new OccurenceQuery(taxonName
, collector
, collectorsNumber
, accessionNumber
, herbarium
, country
, locality
, null);