Skip to content

Commit

Permalink
LOCAL: patch but be aware for future upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
holmbergius committed Nov 12, 2024
1 parent 0605c40 commit 77ce3d9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/main/java/org/ecocean/servlet/IAGateway.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response)
try {
String containerName = IA.getProperty("context0", "containerName");
baseUrl = CommonConfiguration.getServerURL(request, request.getContextPath());
if (containerName != null && containerName != "") {
System.out.println("BASEURL: "+baseUrl); if (containerName != null && containerName != "") {
baseUrl = baseUrl.replace("localhost", containerName);
}
} catch (Exception e) {
Expand Down Expand Up @@ -289,15 +289,23 @@ public static JSONObject _doIdentify(JSONObject jin, JSONObject res, Shepherd my
String taskId = res.optString("taskId", null);
if (taskId == null)
throw new RuntimeException("IAGateway._doIdentify() has no taskId passed in");
if (baseUrl == null) return res;
if (jin == null) return res;
if (baseUrl == null) {
System.out.println("baseUrl is null -> ");
baseUrl = CommonConfiguration.getServerURL(myShepherd);
}
if (jin == null) {System.out.println("jin is null -> "); return res;}
JSONObject j = jin.optJSONObject("identify");
if (j == null) return res; // "should never happen"
if (j == null) {System.out.println("jin is null -> ");return res;} // "should never happen"
/*
TODO? right now this 'opt' is directly from IBEISIA.identOpts() ????? hmmmm....
note then that for IBEIS this effectively gets mapped via queryConfigDict to usable values we also might consider incorporating j.opt (passed
within identify:{} object itself, from the api/gateway) ???
*/
System.out.println("HEEEEEEERE");

JSONObject opt = jin.optJSONObject("opt");
ArrayList<Annotation> anns = new ArrayList<Annotation>(); // what we ultimately run on. occurrences are irrelevant now right?
ArrayList<String> validIds = new ArrayList<String>();
Expand Down

0 comments on commit 77ce3d9

Please sign in to comment.