From 58bd23d9dc4881bf1a4739d02deaa28a11cb4abc Mon Sep 17 00:00:00 2001 From: Robert Butora <robert.butora@inaf.it> Date: Thu, 30 Jan 2025 15:48:41 +0100 Subject: [PATCH] mcutout: fixes bug when bandsys, band not given in input json-JDL --- data-access/servlet/pom.xml | 2 +- .../servlet/src/main/java/mcutout/CutArgs.java | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/data-access/servlet/pom.xml b/data-access/servlet/pom.xml index 876b662..94280f4 100644 --- a/data-access/servlet/pom.xml +++ b/data-access/servlet/pom.xml @@ -65,7 +65,7 @@ <dependency> <groupId>vo</groupId> <artifactId>vlkb-volib</artifactId> - <version>0.9.6</version> + <version>0.9.7</version> </dependency> <!-- dependency> diff --git a/data-access/servlet/src/main/java/mcutout/CutArgs.java b/data-access/servlet/src/main/java/mcutout/CutArgs.java index f67894f..738dbce 100644 --- a/data-access/servlet/src/main/java/mcutout/CutArgs.java +++ b/data-access/servlet/src/main/java/mcutout/CutArgs.java @@ -1,11 +1,10 @@ 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 } -- GitLab