Commit 294ce7ed authored by Robert Butora's avatar Robert Butora
Browse files

removes DataLink from ServletCutout response-serialization (uses CutResult instead)

parent 3a8d8608
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -13,17 +13,31 @@ class Coord
   Band band;
   Time time;
   Pol  pol;
   String pixels;

   Coord(String skySystem, Pos pos, String specSystem, Band band, Time time, Pol pol)
   Coord(String skySystem, Pos pos, String specSystem, Band band, Time time, Pol pol, String pixels)
   {
      this.pos  = pos;
      this.band = band;
      this.time = time;
      this.pol  = pol;
      this.pixels  = pixels;

      this.skySystem  = skySystem;
      this.specSystem = specSystem;
   }

   Coord(String skySystem, Pos pos, String specSystem, Band band, Time time, Pol pol)
   {
      this(skySystem, pos, specSystem, band, time, pol, null);
   }
 
   Coord(Pos pos, Band band, Time time, Pol pol, String pixels)
   {
      this( (pos ==null)? null : pos.system.toString(), pos,
            (band==null)? null : band.system.toString(), band,
            time, pol, pixels);
   }
 
}
+3 −2
Original line number Diff line number Diff line
@@ -3,9 +3,10 @@

class CutResult
{
   String filename;
   long filesize;
   String fileName;
   long fileSize;
   NullValueCount nullValueCount;
   String pixels;


   CutResult()
+4 −2
Original line number Diff line number Diff line
@@ -339,8 +339,8 @@ class CutoutImpl implements Cutout
            doStream(relPathname, hdunum, pos, band, time, pol, pixels, fileOutputStream);

            // engine returns absPathname see common/cutout.cpp::do_cutout_file()
            cutResult.filename = absSubimgPathname;
            cutResult.filesize = Files.size(Paths.get(absSubimgPathname));
            cutResult.fileName = absSubimgPathname;
            cutResult.fileSize = Files.size(Paths.get(absSubimgPathname));

            if(countNullValues)
            {
@@ -351,6 +351,8 @@ class CutoutImpl implements Cutout
            {
               LOGGER.info("Adding extraCards to cut-file not implemented when using 'vlkb' exec (implemented in engine vlkbd/AMQP)");
            }

            cutResult.pixels = null;
         }
         else
         {
+3 −3
Original line number Diff line number Diff line
@@ -213,8 +213,8 @@ class DatasetsImpl implements Datasets

         // 3. Merge cut-files

         //String[] strar_results = mergefiles_parallel(id, logFileName,  // logfilename
         //String[] strar_results = mergefiles_split_execution(id, logFileName,  // logfilename
         //String[] strar_results = mergefiles_parallel(id, logFileName,  // logfileName
         //String[] strar_results = mergefiles_split_execution(id, logFileName,  // logfileName
         CutResult strar_results = mergefiles(
               String.valueOf(dim),  // prefix: "2D" or "3D"
               allCutPathnames);     // files to merge
@@ -455,7 +455,7 @@ class DatasetsImpl implements Datasets
                     default:
                     LOGGER.severe("Assert(Results.toXML): results msg has unhandled msgtype code : " + res);
                     }*/
         data.add(res.filename);
         data.add(res.fileName);
      }

      return data.toArray(new String[data.size()]);
+2 −2
Original line number Diff line number Diff line
@@ -68,8 +68,8 @@ public class JsonDecoder
            long null_count  = (long) jnvc.get("nullcount");
            long total_count = (long) jnvc.get("totalcount");

            cut.filesize = fileSize;
            cut.filename = fileName;
            cut.fileSize = fileSize;
            cut.fileName = fileName;
            cut.nullValueCount.percent    = fillRatio;
            cut.nullValueCount.nullCount  = null_count;
            cut.nullValueCount.totalCount = total_count;
Loading