Revision 27ebde42
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/SpecimenSearchWizardPage.java | ||
---|---|---|
47 | 47 |
String accessionNumber = specimenSearchController.getAccessionNumber(); |
48 | 48 |
String collector = specimenSearchController.getCollector(); |
49 | 49 |
String collectorsNumber = specimenSearchController.getCollectorNumber(); |
50 |
String country = specimenSearchController.getCountry(); |
|
50 |
String country = specimenSearchController.getCountry(false);
|
|
51 | 51 |
Calendar dateFrom = specimenSearchController.getDateFrom(); |
52 | 52 |
Calendar dateTo = specimenSearchController.getDateTo(); |
53 | 53 |
String herbarium = specimenSearchController.getHerbarium(); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/e4/SpecimenSearchWizardE4.java | ||
---|---|---|
74 | 74 |
providerSelectionPage.getController().saveLastState(); |
75 | 75 |
ServiceWrapperBase serviceWrapper; |
76 | 76 |
DataImportViewE4<?> dataImportView = null; |
77 |
query = searchPage.getQuery(); |
|
77 |
boolean biocase = providerSelectionPage.getQueryType().equals(QueryType.BIOCASE); |
|
78 |
query = searchPage.getQuery(biocase); |
|
78 | 79 |
Abcd206ImportConfigurator configurator = CdmStore.getImportManager().AbcdConfigurator(); |
79 | 80 |
configurator.setOccurenceQuery(query); |
80 | 81 |
configurator.setSourceUri(providerSelectionPage.getEndPoint()); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/e4/SpecimenSearchWizardPageE4.java | ||
---|---|---|
46 | 46 |
* Returns an {@link OccurenceQuery} filled with the parameters defined in this wizard page |
47 | 47 |
* @return |
48 | 48 |
*/ |
49 |
public OccurenceQuery getQuery() { |
|
49 |
public OccurenceQuery getQuery(boolean biocase) {
|
|
50 | 50 |
String accessionNumber = specimenSearchController.getAccessionNumber(); |
51 | 51 |
String collector = specimenSearchController.getCollector(); |
52 | 52 |
String collectorsNumber = specimenSearchController.getCollectorNumber(); |
53 |
String country = specimenSearchController.getCountry(); |
|
53 |
String country = specimenSearchController.getCountry(biocase);
|
|
54 | 54 |
Calendar dateFrom = specimenSearchController.getDateFrom(); |
55 | 55 |
Calendar dateTo = specimenSearchController.getDateTo(); |
56 | 56 |
String herbarium = specimenSearchController.getHerbarium(); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenSearchController.java | ||
---|---|---|
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
public void saveLastSate() { |
95 |
lastQuery = new OccurenceQuery(getTaxonName(), getCollector(), getCollectorNumber(), getAccessionNumber(), getHerbarium(), getCountry(), getLocality(), getDateFrom(), getDateTo()); |
|
95 |
lastQuery = new OccurenceQuery(getTaxonName(), getCollector(), getCollectorNumber(), getAccessionNumber(), getHerbarium(), getCountry(false), getLocality(), getDateFrom(), getDateTo());
|
|
96 | 96 |
} |
97 | 97 |
|
98 | 98 |
/** |
... | ... | |
153 | 153 |
* @return the country as a {@link String} |
154 | 154 |
* @see eu.etaxonomy.taxeditor.view.specimenSearch.SpecimenSearchComposite#getComboCountry() |
155 | 155 |
*/ |
156 |
public String getCountry() { |
|
156 |
public String getCountry(boolean biocase) { |
|
157 |
|
|
157 | 158 |
String result = specimenSearchComposite.getTextCountry().getText(); |
158 |
if (result.contains("-")){ |
|
159 |
if (result.contains("-") && biocase){
|
|
159 | 160 |
result = result.substring(4).trim(); |
161 |
}else if (result.contains("-")){ |
|
162 |
result = result.substring(0,2).trim(); |
|
160 | 163 |
} |
161 | 164 |
return result; |
162 | 165 |
|
Also available in: Unified diff
for GBIF search use Iso3166_A2 of the country