Skip to content
Snippets Groups Projects
Commit 8ed792b9 authored by Robert Butora's avatar Robert Butora
Browse files

fixes json-encoder inconsistency in mergefiles (use Pos Band Time Pol and...

fixes json-encoder inconsistency in mergefiles (use Pos Band Time Pol and remove 'parameters' level from json-msg )
parent bdbd7ec3
No related branches found
No related tags found
No related merge requests found
......@@ -158,16 +158,27 @@ class DatasetsImpl implements Datasets
Resolver rsl = new ResolverFromId();//settings.dbConn, subsurveys);
rsl.resolve(publisherDid);
FitsCard[] extraCards = null;//Subsurvey.subsurveysFindCards(subsurveys, rsl.obsCollection());//rsl.subsurveyId);
String absSubimgPathname = settings.fitsPaths.cutouts() + "/" + generateSubimgPathname(rsl.relPathname(), rsl.hdunum());
FitsCard[] extraCards = null;
//Subsurvey.subsurveysFindCards(subsurveys, rsl.obsCollection());//rsl.subsurveyId);
String absSubimgPathname = settings.fitsPaths.cutouts() + "/"
+ generateSubimgPathname(rsl.relPathname(), rsl.hdunum());
LOGGER.info("absSubimgPathname: " + absSubimgPathname);
String inJson = JsonEncoderMerge.subimgToJson(
rsl.relPathname(), rsl.hdunum(),
coord,
absSubimgPathname,
extraCards,
countNullValues);
LOGGER.info("Using AMQP");
JsonEncoder jReq = new JsonEncoder();
jReq.add(rsl.relPathname(), rsl.hdunum());
jReq.add(coord.pos);
jReq.add(coord.band);
jReq.add(coord.time);
jReq.add(coord.pol);
// jReq.add(pixels), FIXME implement to supoort PIXLES in vlkb-legacy by AMQP
jReq.add(countNullValues);
jReq.add(extraCards);
String inJson = jReq.toString();
return JsonDecoder.responseFromCutoutJson( doRpc(inJson) );
}
......
......@@ -178,18 +178,15 @@ public class JsonEncoderMerge
String dimensionality,
String[] filestomerge )
{
JSONObject objParameters = new JSONObject();
objParameters.put("dimensionality", dimensionality);
JSONArray fnames = new JSONArray();
for(String fn : filestomerge){
fnames.add(fn);
}
objParameters.put("files_to_merge", fnames);
JSONObject obj = new JSONObject();
obj.put("service", "MERGEF");
obj.put("parameters", objParameters);
obj.put("dimensionality", dimensionality);
obj.put("files_to_merge", fnames);
return obj.toJSONString();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment