Commit a6323d71 by Adi Amir

complete latest image

parent 61b50af3
Showing with 11 additions and 12 deletions
...@@ -120,18 +120,18 @@ public class GEManager { ...@@ -120,18 +120,18 @@ public class GEManager {
} }
String fileData = httpFileDataResp.getContent(); String fileData = httpFileDataResp.getContent();
// step 3: get the view direction for this camera (e.g: {{metadataurl}}/assets/CAMERA-STG-HYP1066-CAM-R) // // step 3: get the view direction for this camera (e.g: {{metadataurl}}/assets/CAMERA-STG-HYP1066-CAM-R)
httpRequest = buildGetCameraDetailsRequest(camId); // httpRequest = buildGetCameraDetailsRequest(camId);
SimpleHttpResponse httpCameraDetailsResp = httpClient.processRequest(httpRequest); // SimpleHttpResponse httpCameraDetailsResp = httpClient.processRequest(httpRequest);
if (httpCameraDetailsResp.getStatusCode() != 200) { // if (httpCameraDetailsResp.getStatusCode() != 200) {
logHttpError("getLatestMediaFile/getCameraDetails", httpCameraDetailsResp); // logHttpError("getLatestMediaFile/getCameraDetails", httpCameraDetailsResp);
return errorHttpResponse(httpFileDataResp); // return errorHttpResponse(httpFileDataResp);
} // }
contentObj = objMapper.readTree(httpCameraDetailsResp.getContent()); // contentObj = objMapper.readTree(httpCameraDetailsResp.getContent());
String viewDir = contentObj.at("/properties/VIEW").asText(); // String viewDir = contentObj.at("/properties/VIEW").asText();
// build the final response // build the final response
brr = buildLatestMediaFileResp(httpFileDataResp.getContent(), url, viewDir); brr = buildLatestMediaFileResp(fileData, url);
} catch (Exception e) { } catch (Exception e) {
String err = "getLatestMediaFile() failed with exception. camId=" + camId + " e=" + e.toString(); String err = "getLatestMediaFile() failed with exception. camId=" + camId + " e=" + e.toString();
...@@ -157,7 +157,7 @@ public class GEManager { ...@@ -157,7 +157,7 @@ public class GEManager {
return request; return request;
} }
private BaseRestResponse buildLatestMediaFileResp(String fileData, String url, String viewDir) { private BaseRestResponse buildLatestMediaFileResp(String fileData, String url) {
BaseRestResponse brr = new BaseRestResponse(true,null); BaseRestResponse brr = new BaseRestResponse(true,null);
try { try {
...@@ -177,7 +177,6 @@ public class GEManager { ...@@ -177,7 +177,6 @@ public class GEManager {
dataObj.put("timestamp", Long.valueOf(urlParts[1])); dataObj.put("timestamp", Long.valueOf(urlParts[1]));
dataObj.put("mediaType", urlParts[2]); dataObj.put("mediaType", urlParts[2]);
dataObj.put("fileName", urlParts[3]); dataObj.put("fileName", urlParts[3]);
dataObj.put("viewDir", viewDir);
dataObj.put("fileData", fileData); dataObj.put("fileData", fileData);
brr.objectNode = dataObj; brr.objectNode = dataObj;
......
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 sign in to comment