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

mcutout: fixes bug when bandsys, band not given in input json-JDL

parent 29fbbb1e
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@
<dependency>
<groupId>vo</groupId>
<artifactId>vlkb-volib</artifactId>
<version>0.9.6</version>
<version>0.9.7</version>
</dependency>
<!-- dependency>
......
import java.util.logging.Logger;
import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
/* 'JSON-Simple' library */
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
......@@ -48,9 +47,8 @@ import vo.parameter.*;
//}
// FIXME or call this Jdl.java ?
// FIXME or clla this Jdl.java ?
class CutArgs
{
static final Logger LOGGER = Logger.getLogger(CutArgs.class.getName());
......@@ -76,8 +74,8 @@ class CutArgs
CutArgs args = new CutArgs();
args.id = (String) jElem.get("id");
if(args.id == null)
args.id = (String) jElem.get("pubdid");
//if(args.id == null)
// args.id = (String) jElem.get("pubdid");
Object jCNV = jElem.get("countNullVals");
args.countNullValues = (jCNV == null) ? false : (Boolean) jElem.get("countNullVals");
......@@ -85,7 +83,7 @@ class CutArgs
// FIXME first check if array (or null?) and then cast
String defaultPosSystem = "GALACTIC";
Pos pos = Pos.parsePosCirclePolygonFromJson(jElem, defaultPosSystem);
Pos pos = Pos.parsePosFromJson(jElem, defaultPosSystem);
args.pos = pos;
String defaultBandSystem = "VELO_LSRK";
......@@ -95,7 +93,7 @@ class CutArgs
// TBD: * legacy is parsed inside POS and BAND, not here -> do modif
// * still missing TIME and POL and ID and (?)countNullValues
LOGGER.warning("VLKB: legacy param parasing from MCutout jsodn-JDL disbaled");
LOGGER.warning("VLKB: legacy param parsing from MCutout jsodn-JDL disabled");
/* FIXME removes VLKB_legacy param parsing from MCutout JDL
// FIXME explicit converions: check if exists and then check type first
......@@ -162,6 +160,6 @@ class CutArgs
Boolean countNullValues;
// legacy
Double lon, lat, radius, dl, db, vl, vu; // double throws except if json-null
//Double lon, lat, radius, dl, db, vl, vu; // double throws except if json-null
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment