Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery
/
mde
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a6323d71
authored
Mar 14, 2017
by
Adi Amir
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
complete latest image
parent
61b50af3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
src/main/java/logic/GEManager.java
src/main/java/logic/GEManager.java
View file @
a6323d71
...
...
@@ -120,18 +120,18 @@ public class GEManager {
}
String
fileData
=
httpFileDataResp
.
getContent
();
// step 3: get the view direction for this camera (e.g: {{metadataurl}}/assets/CAMERA-STG-HYP1066-CAM-R)
httpRequest
=
buildGetCameraDetailsRequest
(
camId
);
SimpleHttpResponse
httpCameraDetailsResp
=
httpClient
.
processRequest
(
httpRequest
);
if
(
httpCameraDetailsResp
.
getStatusCode
()
!=
200
)
{
logHttpError
(
"getLatestMediaFile/getCameraDetails"
,
httpCameraDetailsResp
);
return
errorHttpResponse
(
httpFileDataResp
);
}
contentObj
=
objMapper
.
readTree
(
httpCameraDetailsResp
.
getContent
());
String
viewDir
=
contentObj
.
at
(
"/properties/VIEW"
).
asText
();
//
// step 3: get the view direction for this camera (e.g: {{metadataurl}}/assets/CAMERA-STG-HYP1066-CAM-R)
//
httpRequest = buildGetCameraDetailsRequest(camId);
//
SimpleHttpResponse httpCameraDetailsResp = httpClient.processRequest(httpRequest);
//
if (httpCameraDetailsResp.getStatusCode() != 200) {
//
logHttpError("getLatestMediaFile/getCameraDetails", httpCameraDetailsResp);
//
return errorHttpResponse(httpFileDataResp);
//
}
//
contentObj = objMapper.readTree(httpCameraDetailsResp.getContent());
//
String viewDir = contentObj.at("/properties/VIEW").asText();
// build the final response
brr
=
buildLatestMediaFileResp
(
httpFileDataResp
.
getContent
(),
url
,
viewDir
);
brr
=
buildLatestMediaFileResp
(
fileData
,
url
);
}
catch
(
Exception
e
)
{
String
err
=
"getLatestMediaFile() failed with exception. camId="
+
camId
+
" e="
+
e
.
toString
();
...
...
@@ -157,7 +157,7 @@ public class GEManager {
return
request
;
}
private
BaseRestResponse
buildLatestMediaFileResp
(
String
fileData
,
String
url
,
String
viewDir
)
{
private
BaseRestResponse
buildLatestMediaFileResp
(
String
fileData
,
String
url
)
{
BaseRestResponse
brr
=
new
BaseRestResponse
(
true
,
null
);
try
{
...
...
@@ -177,7 +177,6 @@ public class GEManager {
dataObj
.
put
(
"timestamp"
,
Long
.
valueOf
(
urlParts
[
1
]));
dataObj
.
put
(
"mediaType"
,
urlParts
[
2
]);
dataObj
.
put
(
"fileName"
,
urlParts
[
3
]);
dataObj
.
put
(
"viewDir"
,
viewDir
);
dataObj
.
put
(
"fileData"
,
fileData
);
brr
.
objectNode
=
dataObj
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment