Revision 1103732d
Added by Katja Luther almost 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/GbifResponseImportView.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.taxeditor.view.dataimport; |
11 | 11 |
|
12 | 12 |
import java.io.IOException; |
13 |
import java.io.InputStream; |
|
13 | 14 |
import java.net.URISyntaxException; |
15 |
import java.util.ArrayList; |
|
14 | 16 |
import java.util.Collection; |
17 |
import java.util.HashSet; |
|
18 |
import java.util.Set; |
|
15 | 19 |
|
16 | 20 |
import org.apache.http.client.ClientProtocolException; |
21 |
import org.eclipse.core.runtime.jobs.Job; |
|
17 | 22 |
|
23 |
import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper; |
|
24 |
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifDataSetProtocol; |
|
18 | 25 |
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifQueryServiceWrapper; |
19 | 26 |
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse; |
27 |
import eu.etaxonomy.cdm.io.common.CdmDefaultImport; |
|
28 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE; |
|
29 |
import eu.etaxonomy.cdm.io.dwca.in.DwcaImportConfigurator; |
|
30 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
|
31 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
20 | 32 |
|
21 | 33 |
/** |
22 | 34 |
* @author pplitzner |
... | ... | |
48 | 60 |
public void query() { |
49 | 61 |
String errorMessage = "Could not execute query " + query; |
50 | 62 |
try{ |
51 |
Collection<GbifResponse> results = new GbifQueryServiceWrapper().query(query); |
|
52 |
setResults(results); |
|
53 |
} catch (ClientProtocolException e) { |
|
54 |
logger.error(errorMessage, e); |
|
55 |
} catch (IOException e) { |
|
56 |
logger.error(errorMessage, e); |
|
57 |
} catch (URISyntaxException e) { |
|
58 |
logger.error(errorMessage, e); |
|
63 |
//Collection<GbifResponse> results = new GbifQueryServiceWrapper().query(query); |
|
64 |
//setResults(results); |
|
65 |
|
|
66 |
// String errorMessage = "Could not execute query " + query; |
|
67 |
|
|
68 |
// Collection<SpecimenOrObservationBase<?>> results = new ArrayList<SpecimenOrObservationBase<?>>(); |
|
69 |
Collection<GbifResponse> results = new GbifQueryServiceWrapper().query(query); |
|
70 |
|
|
71 |
setResults(results); |
|
72 |
|
|
73 |
|
|
74 |
// |
|
75 |
// results = repo.getUnits(); |
|
76 |
|
|
77 |
} catch (ClientProtocolException e) { |
|
78 |
logger.error(errorMessage, e); |
|
79 |
} catch (IOException e) { |
|
80 |
logger.error(errorMessage, e); |
|
81 |
} catch (URISyntaxException e) { |
|
82 |
// TODO Auto-generated catch block |
|
83 |
e.printStackTrace(); |
|
84 |
} |
|
59 | 85 |
} |
60 | 86 |
|
61 |
} |
|
87 |
// setResults(results); |
|
88 |
// |
|
89 |
// } |
|
90 |
// } catch (ClientProtocolException e) { |
|
91 |
// logger.error(errorMessage, e); |
|
92 |
// } catch (IOException e) { |
|
93 |
// logger.error(errorMessage, e); |
|
94 |
// } catch (URISyntaxException e) { |
|
95 |
// logger.error(errorMessage, e); |
|
96 |
// } |
|
97 |
|
|
98 |
// } |
|
62 | 99 |
|
63 | 100 |
} |
Also available in: Unified diff
minor