Loading data-access/servlet/src/main/java/webapi/ServletCutout.java +2 −26 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ public class ServletCutout extends javax.servlet.http.HttpServlet rsl.resolve(id); relPathname = rsl.relPathname(); hdunum = rsl.hdunum(); String subsurveyId = rsl.obsCollection(); //this implementation assumes ObsCore::obs_collection holds ssID String subsurveyId = rsl.obsCollection(); FitsCard[] extraCards = null; if(subsurveyId != null) { Loading @@ -173,31 +173,7 @@ public class ServletCutout extends javax.servlet.http.HttpServlet CutResult cutResult = cutout.doFile(relPathname, hdunum, pos, band, time, pol, pixels, false, null); DataLink dlk = new DataLink(); dlk.id = id; dlk.accessUrl = dlk.convertLocalPathnameToRemoteUrl(cutResult.filename, settings.fitsPaths.cutouts(), settings.fitsPaths.cutoutsUrl()); dlk.serviceDef = null; dlk.errorMessage = null; dlk.description = "A cutout from " + id;// + " by parameters " // + pos.toString() + " " + band.toString() + " " + time.toString() + " " + pol.toString(); dlk.semantics = "http://www.ivoa.net/rdf/datalink/core#proc#cutout"; dlk.contentType = "application/fits"; dlk.contentLength = cutResult.filesize; // VLKB-extension to DataLink: Coord coord = new Coord(DEFAULT_SKY_SYSTEM, pos, DEFAULT_SPEC_SYSTEM, band, time, pol); LOGGER.info(coord.toString()); dlk.inputs = new Inputs(id, coord, countNullValues); dlk.versionString = Version.asString; dlk.cut = null; dlk.absCutPathname = cutResult.filename; dlk.datacubeCount = 1; dlk.nullVals = ((cutResult.nullValueCount.percent < 0) || (cutResult.nullValueCount.totalCount < 1)) ? null : cutResult.nullValueCount; dlk.mcutResultArr = null; DataLink dlk = new DataLink(settings, cutResult, id, pos, band, time, pol, countNullValues); return dlk; } Loading data-access/servlet/src/main/java/webapi/output/DataLink.java +33 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import java.util.logging.Logger; import java.util.List; import java.util.ArrayList; import vo.parameter.*; class DataLink { Loading Loading @@ -38,6 +39,37 @@ class DataLink this.datacubeCount = 1; } // used in ServeltCutout public DataLink(Settings settings, CutResult cutResult, String id, Pos pos, Band band, Time time, Pol pol, boolean countNullValues) { this.id = id; this.accessUrl = convertLocalPathnameToRemoteUrl(cutResult.filename, settings.fitsPaths.cutouts(), settings.fitsPaths.cutoutsUrl()); this.serviceDef = null; this.errorMessage = null; this.description = "A cutout from " + id; // + " by parameters " // + pos.toString() + " " + band.toString() + " " + time.toString() + " " + pol.toString(); this.semantics = "http://www.ivoa.net/rdf/datalink/core#proc#cutout"; this.contentType = "application/fits"; this.contentLength = cutResult.filesize; // VLKB-extension to DataLink: Coord coord = new Coord(pos.system.toString(), pos, band.system.toString(), band, time, pol); LOGGER.info(coord.toString()); this.inputs = new Inputs(id, coord, countNullValues); this.versionString = Version.asString; this.cut = null; this.absCutPathname = cutResult.filename; this.datacubeCount = 1; this.nullVals = ((cutResult.nullValueCount.percent < 0) || (cutResult.nullValueCount.totalCount < 1)) ? null : cutResult.nullValueCount; this.mcutResultArr = null; } // FIXME fake, only to compile MCutout and Merge public DataLink(CutResult cutResult) { Loading @@ -63,6 +95,7 @@ class DataLink } // used in MCutout public DataLink(MCutResult cutResult) { this.nullVals = new NullValueCount(); Loading Loading
data-access/servlet/src/main/java/webapi/ServletCutout.java +2 −26 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ public class ServletCutout extends javax.servlet.http.HttpServlet rsl.resolve(id); relPathname = rsl.relPathname(); hdunum = rsl.hdunum(); String subsurveyId = rsl.obsCollection(); //this implementation assumes ObsCore::obs_collection holds ssID String subsurveyId = rsl.obsCollection(); FitsCard[] extraCards = null; if(subsurveyId != null) { Loading @@ -173,31 +173,7 @@ public class ServletCutout extends javax.servlet.http.HttpServlet CutResult cutResult = cutout.doFile(relPathname, hdunum, pos, band, time, pol, pixels, false, null); DataLink dlk = new DataLink(); dlk.id = id; dlk.accessUrl = dlk.convertLocalPathnameToRemoteUrl(cutResult.filename, settings.fitsPaths.cutouts(), settings.fitsPaths.cutoutsUrl()); dlk.serviceDef = null; dlk.errorMessage = null; dlk.description = "A cutout from " + id;// + " by parameters " // + pos.toString() + " " + band.toString() + " " + time.toString() + " " + pol.toString(); dlk.semantics = "http://www.ivoa.net/rdf/datalink/core#proc#cutout"; dlk.contentType = "application/fits"; dlk.contentLength = cutResult.filesize; // VLKB-extension to DataLink: Coord coord = new Coord(DEFAULT_SKY_SYSTEM, pos, DEFAULT_SPEC_SYSTEM, band, time, pol); LOGGER.info(coord.toString()); dlk.inputs = new Inputs(id, coord, countNullValues); dlk.versionString = Version.asString; dlk.cut = null; dlk.absCutPathname = cutResult.filename; dlk.datacubeCount = 1; dlk.nullVals = ((cutResult.nullValueCount.percent < 0) || (cutResult.nullValueCount.totalCount < 1)) ? null : cutResult.nullValueCount; dlk.mcutResultArr = null; DataLink dlk = new DataLink(settings, cutResult, id, pos, band, time, pol, countNullValues); return dlk; } Loading
data-access/servlet/src/main/java/webapi/output/DataLink.java +33 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import java.util.logging.Logger; import java.util.List; import java.util.ArrayList; import vo.parameter.*; class DataLink { Loading Loading @@ -38,6 +39,37 @@ class DataLink this.datacubeCount = 1; } // used in ServeltCutout public DataLink(Settings settings, CutResult cutResult, String id, Pos pos, Band band, Time time, Pol pol, boolean countNullValues) { this.id = id; this.accessUrl = convertLocalPathnameToRemoteUrl(cutResult.filename, settings.fitsPaths.cutouts(), settings.fitsPaths.cutoutsUrl()); this.serviceDef = null; this.errorMessage = null; this.description = "A cutout from " + id; // + " by parameters " // + pos.toString() + " " + band.toString() + " " + time.toString() + " " + pol.toString(); this.semantics = "http://www.ivoa.net/rdf/datalink/core#proc#cutout"; this.contentType = "application/fits"; this.contentLength = cutResult.filesize; // VLKB-extension to DataLink: Coord coord = new Coord(pos.system.toString(), pos, band.system.toString(), band, time, pol); LOGGER.info(coord.toString()); this.inputs = new Inputs(id, coord, countNullValues); this.versionString = Version.asString; this.cut = null; this.absCutPathname = cutResult.filename; this.datacubeCount = 1; this.nullVals = ((cutResult.nullValueCount.percent < 0) || (cutResult.nullValueCount.totalCount < 1)) ? null : cutResult.nullValueCount; this.mcutResultArr = null; } // FIXME fake, only to compile MCutout and Merge public DataLink(CutResult cutResult) { Loading @@ -63,6 +95,7 @@ class DataLink } // used in MCutout public DataLink(MCutResult cutResult) { this.nullVals = new NullValueCount(); Loading