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
Branches
Tags
No related merge requests found
...@@ -158,16 +158,27 @@ class DatasetsImpl implements Datasets ...@@ -158,16 +158,27 @@ class DatasetsImpl implements Datasets
Resolver rsl = new ResolverFromId();//settings.dbConn, subsurveys); Resolver rsl = new ResolverFromId();//settings.dbConn, subsurveys);
rsl.resolve(publisherDid); rsl.resolve(publisherDid);
FitsCard[] extraCards = null;//Subsurvey.subsurveysFindCards(subsurveys, rsl.obsCollection());//rsl.subsurveyId); FitsCard[] extraCards = null;
String absSubimgPathname = settings.fitsPaths.cutouts() + "/" + generateSubimgPathname(rsl.relPathname(), rsl.hdunum()); //Subsurvey.subsurveysFindCards(subsurveys, rsl.obsCollection());//rsl.subsurveyId);
String absSubimgPathname = settings.fitsPaths.cutouts() + "/"
+ generateSubimgPathname(rsl.relPathname(), rsl.hdunum());
LOGGER.info("absSubimgPathname: " + absSubimgPathname); LOGGER.info("absSubimgPathname: " + absSubimgPathname);
String inJson = JsonEncoderMerge.subimgToJson( LOGGER.info("Using AMQP");
rsl.relPathname(), rsl.hdunum(),
coord, JsonEncoder jReq = new JsonEncoder();
absSubimgPathname, jReq.add(rsl.relPathname(), rsl.hdunum());
extraCards, jReq.add(coord.pos);
countNullValues); 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) ); return JsonDecoder.responseFromCutoutJson( doRpc(inJson) );
} }
......
...@@ -178,18 +178,15 @@ public class JsonEncoderMerge ...@@ -178,18 +178,15 @@ public class JsonEncoderMerge
String dimensionality, String dimensionality,
String[] filestomerge ) String[] filestomerge )
{ {
JSONObject objParameters = new JSONObject();
objParameters.put("dimensionality", dimensionality);
JSONArray fnames = new JSONArray(); JSONArray fnames = new JSONArray();
for(String fn : filestomerge){ for(String fn : filestomerge){
fnames.add(fn); fnames.add(fn);
} }
objParameters.put("files_to_merge", fnames);
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
obj.put("service", "MERGEF"); obj.put("service", "MERGEF");
obj.put("parameters", objParameters); obj.put("dimensionality", dimensionality);
obj.put("files_to_merge", fnames);
return obj.toJSONString(); return obj.toJSONString();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment