merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / dataimport / wizard / SpecimenSearchWizardPage.java
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.dataimport.wizard;
11
12 import org.eclipse.jface.wizard.WizardPage;
13 import org.eclipse.swt.widgets.Composite;
14
15 import eu.etaxonomy.cdm.ext.biocase.BioCaseQuery;
16 import eu.etaxonomy.taxeditor.ui.campanula.specimenSearch.SpecimenSearchController;
17
18
19 /**
20 * Wizard page for entering search parameters
21 * @author pplitzner
22 * @date 12.09.2013
23 *
24 */
25 public class SpecimenSearchWizardPage extends WizardPage{
26
27 private SpecimenSearchController specimenSearchController;
28
29 protected SpecimenSearchWizardPage(String pageName) {
30 super(pageName);
31 }
32
33 /* (non-Javadoc)
34 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
35 */
36 @Override
37 public void createControl(Composite parent) {
38 specimenSearchController = new SpecimenSearchController(parent);
39 setControl(specimenSearchController.getComposite());
40 }
41
42 /**
43 * Returns a {@link BioCaseQuery} filled with the parameters defined in this wizard page
44 * @return
45 */
46 public BioCaseQuery getQuery() {
47 BioCaseQuery query = new BioCaseQuery();
48 query.accessionNumber = specimenSearchController.getAccessionNumber();
49 query.collector = specimenSearchController.getCollector();
50 query.collectorsNumber = specimenSearchController.getCollectorNumber();
51 query.country = specimenSearchController.getCountry();
52 // query.date = specimenSearchController.getDate();
53 query.herbarium = specimenSearchController.getHerbarium();
54 query.locality = specimenSearchController.getLocality();
55 query.taxonName = specimenSearchController.getTaxonName();
56 return query;
57 }
58
59 }