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

updates new vlkb-volib: shape changed to enum

parent cda67320
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,8 @@ class CutoutImpl implements Cutout
if(band != null)
{
String specSystem = band.system.name();
double vl = band.wavelength[0];
double vu = band.wavelength[1];
double vl = band.getMin();
double vu = band.getMax();
region =region + "specsystem=" + specSystem + "&vl=" + String.valueOf(vl) + "&vu=" + String.valueOf(vu);
}
......
......@@ -57,7 +57,8 @@ public class JsonEncoder
j.put("system", band.system.toString());
JSONArray arr = new JSONArray();
for(double dbl : band.wavelength) arr.add(dbl);
arr.add(band.getMin());
arr.add(band.getMax());
j.put("interval",arr);
this.obj.put("band", j);
......@@ -73,7 +74,8 @@ public class JsonEncoder
j.put("system", time.system.toString());
JSONArray arr = new JSONArray();
for(double dbl : time.mjdUtc) arr.add(dbl);
arr.add(time.getMin());
arr.add(time.getMax());
j.put("interval",arr);
this.obj.put("time", j);
......
......@@ -86,15 +86,17 @@ public class JsonEncoderMerge
private static JSONArray arrJBand(Band band)
{
JSONArray arr = new JSONArray();
for(double dbl : band.wavelength) arr.add(dbl);
arr.add(band.getMin());
arr.add(band.getMax());
return arr;
}
private static JSONArray genTimeJsonArr(Time time)
{
JSONArray jarr = new JSONArray();
for(double dbl : time.mjdUtc) jarr.add(dbl);
return jarr;
JSONArray arr = new JSONArray();
arr.add(time.getMin());
arr.add(time.getMax());
return arr;
}
private static JSONArray genPolyLonJsonArr(Polygon polygon)
......
......@@ -105,9 +105,9 @@ public class ServletCutout extends javax.servlet.http.HttpServlet
Resolver rsl = new ResolverFromId();
rsl.resolve(id);
// if(pos != null) pos.setSystem(Pos.System.valueOf(DEFAULT_SKY_SYSTEM));
if(band != null) band.setSystem(Band.System.valueOf(DEFAULT_SPEC_SYSTEM));
if(time != null) time.setSystem(Time.System.valueOf(DEFAULT_TIME_SYSTEM));
// if(pos != null) pos.setSystem(DEFAULT_SKY_SYSTEM);
if(band != null) band.setSystem(DEFAULT_SPEC_SYSTEM);
if(time != null) time.setSystem(DEFAULT_TIME_SYSTEM);
cutout.doStream(rsl.relPathname(), rsl.hdunum(), pos, band, time, pol, respOutputStream);
}
......@@ -153,9 +153,9 @@ public class ServletCutout extends javax.servlet.http.HttpServlet
final String DEFAULT_TIME_SYSTEM = "MJD_UTC"; // FIXME take from confif file
if(pos != null) pos.setSystem(Pos.System.valueOf(DEFAULT_SKY_SYSTEM));
if(band != null) band.setSystem(Band.System.valueOf(DEFAULT_SPEC_SYSTEM));
if(time != null) time.setSystem(Time.System.valueOf(DEFAULT_TIME_SYSTEM));
if(pos != null) pos.setSystem(DEFAULT_SKY_SYSTEM);
if(band != null) band.setSystem(DEFAULT_SPEC_SYSTEM);
if(time != null) time.setSystem(DEFAULT_TIME_SYSTEM);
CutResult cutResult = cutout.doFile(relPathname, hdunum, pos, band, time, pol, false, null);
......
......@@ -84,8 +84,8 @@ public final class XmlSerializer
if(coord.band != null)
{
xml.append("<vl>" + String.valueOf(coord.band.wavelength[0]) +"</vl>");
xml.append("<vu>" + String.valueOf(coord.band.wavelength[1]) +"</vu>");
xml.append("<vl>" + String.valueOf(coord.band.getMin()) +"</vl>");
xml.append("<vu>" + String.valueOf(coord.band.getMax()) +"</vu>");
xml.append("<vtype>" + coord.specSystem + "</vtype>");
}
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment