|
a/src/net/timbusproject/dpes/alternative/ReasonerClient/REST/DependencyReasonerClient.java |
|
b/src/net/timbusproject/dpes/alternative/ReasonerClient/REST/DependencyReasonerClient.java |
|
... |
|
... |
17 |
*/
|
17 |
*/
|
18 |
|
18 |
|
19 |
package net.timbusproject.dpes.alternative.ReasonerClient.REST;
|
19 |
package net.timbusproject.dpes.alternative.ReasonerClient.REST;
|
20 |
|
20 |
|
21 |
import net.timbusproject.dpes.alternative.ReasonerClient.common.ReasonerClientException;
|
21 |
import net.timbusproject.dpes.alternative.ReasonerClient.common.ReasonerClientException;
|
|
|
22 |
import net.timbusproject.dpes.alternative.ReasonerClient.common.RequestData;
|
22 |
import org.json.JSONObject;
|
23 |
import org.json.JSONObject;
|
23 |
import org.slf4j.LoggerFactory;
|
24 |
import org.slf4j.LoggerFactory;
|
24 |
|
25 |
|
25 |
import java.io.IOException;
|
26 |
import java.io.IOException;
|
26 |
|
27 |
|
|
... |
|
... |
63 |
JSONObject response = client.requestReasoning(requestData.toString());
|
64 |
JSONObject response = client.requestReasoning(requestData.toString());
|
64 |
String status = response.getString("status");
|
65 |
String status = response.getString("status");
|
65 |
if (!status.equalsIgnoreCase("started")) {
|
66 |
if (!status.equalsIgnoreCase("started")) {
|
66 |
throw new ReasonerClientException("Request failed, returned status: " + status);
|
67 |
throw new ReasonerClientException("Request failed, returned status: " + status);
|
67 |
}
|
68 |
}
|
68 |
return response.getString("uuid");
|
69 |
return String.valueOf(response.getInt("id"));
|
69 |
}
|
70 |
}
|
70 |
}
|
71 |
}
|