Revision 49908
Added by Panagiotis Kanakakis over 6 years ago
- Default country name/code (Greece / GR ) due to api problem
RepositoryApiImpl.java | ||
---|---|---|
126 | 126 |
int size = 100; |
127 | 127 |
|
128 | 128 |
String countryCode = countriesMap.get(country); |
129 |
countryCode = "GR"; |
|
129 | 130 |
String filterKey = "UNKNOWN"; |
130 | 131 |
if(mode.equalsIgnoreCase("opendoar")) { |
131 | 132 |
filterKey = "openaire____::opendoar"; |
... | ... | |
160 | 161 |
rs = restTemplate.getForObject(uriComponents.toUri(), String.class); |
161 | 162 |
} |
162 | 163 |
for(Repository r : resultSet) |
163 |
r.setCountryName(getCountryName(r.getCountryCode())); |
|
164 |
r.setCountryName("Greece"); |
|
165 |
// r.setCountryName(getCountryName(r.getCountryCode())); |
|
164 | 166 |
return resultSet; |
165 | 167 |
} |
166 | 168 |
|
... | ... | |
267 | 269 |
.build() |
268 | 270 |
.encode(); |
269 | 271 |
|
270 |
LOGGER.debug("Repository equals : " + Converter.repositoryObjectToJson(repository)); |
|
272 |
try { |
|
273 |
LOGGER.debug("Repository equals : " + Converter.repositoryObjectToJson(repository)); |
|
274 |
}catch (Exception e){ |
|
275 |
LOGGER.debug("JSON exception ", e); |
|
276 |
throw e; |
|
277 |
} |
|
278 |
|
|
271 | 279 |
restTemplate.postForObject(uriComponents.toUri(),Converter.repositoryObjectToJson(repository),String.class); |
272 | 280 |
} |
273 | 281 |
|
... | ... | |
283 | 291 |
@Override |
284 | 292 |
public RepositoryInterface addRepositoryInterface(RepositoryInterface iFace) throws JSONException { |
285 | 293 |
|
294 |
try { |
|
295 |
LOGGER.debug("Repository iface equals : " + Converter.repositoryInterfaceObjectToJson(iFace)); |
|
296 |
}catch (Exception e){ |
|
297 |
LOGGER.debug("JSON exception ", e); |
|
298 |
throw e; |
|
299 |
} |
|
300 |
|
|
286 | 301 |
UriComponents uriComponents = UriComponentsBuilder |
287 | 302 |
.fromHttpUrl(baseAddress + "/ds/api/add/") |
288 | 303 |
.build() |
Also available in: Unified diff