Project

General

Profile

« Previous | Next » 

Revision bce192f4

Added by Patrick Plitzner almost 10 years ago

  • refactored BioCaseQuery to more generic OccurrenceQuery
    • for import wizard
    • for DataImportEditor
    • exported new cdmlib package structure for gbif and biocase querying in taxeditor.cdmlib

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/SpecimenSearchWizardPage.java
12 12
import org.eclipse.jface.wizard.WizardPage;
13 13
import org.eclipse.swt.widgets.Composite;
14 14

  
15
import eu.etaxonomy.cdm.ext.biocase.BioCaseQuery;
15
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
16 16
import eu.etaxonomy.taxeditor.view.specimenSearch.SpecimenSearchController;
17 17

  
18 18

  
......
42 42
    }
43 43

  
44 44
    /**
45
     * Returns a {@link BioCaseQuery} filled with the parameters defined in this wizard page
45
     * Returns an {@link OccurenceQuery} filled with the parameters defined in this wizard page
46 46
     * @return
47 47
     */
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();
58
        return query;
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);
59 58
    }
60 59

  
61 60
}

Also available in: Unified diff