Revision de8249cf
Added by Andreas Müller over 3 years ago
cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/occurrence/gbif/GbifQueryServiceWrapper.java | ||
---|---|---|
9 | 9 |
package eu.etaxonomy.cdm.ext.occurrence.gbif; |
10 | 10 |
|
11 | 11 |
import java.io.IOException; |
12 |
import java.net.URI; |
|
13 | 12 |
import java.net.URISyntaxException; |
14 | 13 |
import java.util.Calendar; |
15 | 14 |
import java.util.Collection; |
... | ... | |
19 | 18 |
import org.apache.http.client.ClientProtocolException; |
20 | 19 |
import org.apache.http.client.utils.URIBuilder; |
21 | 20 |
|
21 |
import eu.etaxonomy.cdm.common.URI; |
|
22 | 22 |
import eu.etaxonomy.cdm.common.UriUtils; |
23 | 23 |
import eu.etaxonomy.cdm.ext.common.ServiceWrapperBase; |
24 | 24 |
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery; |
... | ... | |
65 | 65 |
|
66 | 66 |
if(UriUtils.isServiceAvailable(uri, 10000)){ |
67 | 67 |
logger.info("Querying GBIF service with " + builder.build()); |
68 |
return GbifJsonOccurrenceParser.parseJsonRecords(executeHttpGet(builder.build(), null));
|
|
68 |
return GbifJsonOccurrenceParser.parseJsonRecords(executeHttpGet(new URI(builder.build()), null));
|
|
69 | 69 |
} |
70 | 70 |
else{ |
71 | 71 |
logger.error("Querying " + uri + " got a timeout!"); |
Also available in: Unified diff
ref #9114 add URI Wrapper and replace all java.net.URI occurrences by the wrapper in cdmlib