Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmi-aw committed May 29, 2022
1 parent 8cdfda4 commit 5eb3dd5
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main/java/fr/enit/industryportal/fairtoexcel/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
public class Controller implements Config {


/**
* creates the Excel file and return the result
*/
@GetMapping("")
public void getExcelFile(@RequestParam String ontologies,
HttpServletResponse httpResponse) throws IOException {
Expand Down Expand Up @@ -88,14 +91,23 @@ public void getExcelFile(@RequestParam String ontologies,
httpResponse.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
}

/**
*
*/
private static String getErrorMessage(JsonObject response) {
return response.getAsJsonObject("status").get("message").getAsString();
}

/**
*
*/
private static boolean isResponseOK(JsonObject response) {
return response != null && response.getAsJsonObject("status").get("success").getAsBoolean();
}

/**
*
*/
private static JsonObject getJsonFromFairService(String URI) throws IOException {
JsonObject out;
URL url = new URL(URI);
Expand All @@ -106,7 +118,9 @@ private static JsonObject getJsonFromFairService(String URI) throws IOException
return out;
}


/**
*
*/
private static Options getOptions() {
final Options options = new Options();

Expand Down

0 comments on commit 5eb3dd5

Please sign in to comment.