Commit 21216be6 authored by Matija Obreza's avatar Matija Obreza

Delete accessions by id, list institute accessions, reindex crop

taxonomies 
parent 6d141a3b
......@@ -322,6 +322,10 @@ public class GenesysClient {
return query(Verb.PUT, "/acn/" + instCode + "/delete", null, array.toString());
}
public String deleteAccession(String instCode, ArrayNode ids) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.POST, "/acn/" + instCode + "/delete", null, ids.toString());
}
public String getAuthorizationUrl(Token accessToken) {
return this.service.getAuthorizationUrl(accessToken);
}
......@@ -436,6 +440,10 @@ public class GenesysClient {
return query(Verb.POST, "/crops/rebuild", null, null);
}
public String rebuildCropTaxa(String shortName) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.POST, "/crops/" + shortName + "/rebuild", null, null);
}
public String listOrganizations(int page) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
Map<String, String> qs = new HashMap<String, String>();
qs.put("page", String.valueOf(page));
......@@ -476,4 +484,10 @@ public class GenesysClient {
return query(Verb.POST, "/kpi/observation/" + executionName + "/", qs, StringUtils.defaultIfBlank(dimensionFilter, ""));
}
public String listAccessions(String instCode, int page, String query) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
Map<String, String> params = new HashMap<String, String>();
params.put("page", String.valueOf(page));
params.put("query", query);
return query(Verb.GET, "/acn/" + instCode + "/list", params, null);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment