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

renames Datasets DatasetsAmqp/Cli -> Vlkb VlkbAmqp/Cli

parent f73b770f
No related branches found
No related tags found
No related merge requests found
Showing with 35 additions and 35 deletions
......@@ -8,9 +8,9 @@ class Reproject implements Runnable
String prefix;
String fileName;
String[] response;
DatasetsAmqp datasets;
VlkbAmqp datasets;
public Reproject(DatasetsAmqp datasets, String id, String prefix, String fileName)
public Reproject(VlkbAmqp datasets, String id, String prefix, String fileName)
{
this.datasets = datasets;
this.id = id;
......@@ -23,9 +23,9 @@ class Reproject implements Runnable
public void run()
{
String name = Thread.currentThread().getName();
DatasetsAmqp.LOGGER.info("Start of " + name);
VlkbAmqp.LOGGER.info("Start of " + name);
response = datasets.mergefiles_reproject(id, prefix, fileName);
DatasetsAmqp.LOGGER.info("End of " + name);
VlkbAmqp.LOGGER.info("End of " + name);
}
}
......
......@@ -11,7 +11,7 @@ import java.time.Instant;//Timestamp in cut-filename
import vo.parameter.*;
public interface Datasets
public interface Vlkb
{
public CutResult doFile(String relPathname, int hdunum,
Pos pos, Band band, Time time, Pol pol, String pixels,
......
......@@ -27,30 +27,30 @@ import java.io.ByteArrayOutputStream; // for SODA direct streaming doSubimgStrea
import vo.parameter.*;
class DatasetsAmqp implements Datasets
class VlkbAmqp implements Vlkb
{
static final Logger LOGGER = Logger.getLogger(DatasetsAmqp.class.getName());
static final Logger LOGGER = Logger.getLogger("VlkbAmqp");
private Settings settings = null;
private Subsurvey[] subsurveys = null;
public DatasetsAmqp()
public VlkbAmqp()
{
LOGGER.info("trace DatasetsAmqp()");
LOGGER.info("trace VlkbAmqp()");
this.settings = Settings.getInstance();
}
public DatasetsAmqp(Settings settings)
public VlkbAmqp(Settings settings)
{
LOGGER.info("trace DatasetsAmqp(settings)");
LOGGER.info("trace VlkbAmqp(settings)");
this.settings = settings;
}
public DatasetsAmqp(Settings settings, Subsurvey[] subsurveys)
public VlkbAmqp(Settings settings, Subsurvey[] subsurveys)
{
LOGGER.info("trace DatasetsAmqp(settings, subsurveys)");
LOGGER.info("trace VlkbAmqp(settings, subsurveys)");
this.settings = settings;
this.subsurveys = subsurveys;
}
......@@ -345,7 +345,7 @@ class DatasetsAmqp implements Datasets
LOGGER.info("mergefiles_parallel()");
String[] responseCH = mergefiles_common_header(jobId, logfilename, prefix, filestomerge);
for(String sentence : responseCH) DatasetsAmqp.LOGGER.info("responseCmnHdr: " + sentence);
for(String sentence : responseCH) VlkbAmqp.LOGGER.info("responseCmnHdr: " + sentence);
// check if response errored -> abort with 500: Internal Server Error & log details
int threadsCount = filestomerge.length;
......@@ -377,7 +377,7 @@ class DatasetsAmqp implements Datasets
}
for(String sentence : reprojectArr[i].response) DatasetsAmqp.LOGGER.info("response[" + String.valueOf(i) + "]: " + sentence);
for(String sentence : reprojectArr[i].response) VlkbAmqp.LOGGER.info("response[" + String.valueOf(i) + "]: " + sentence);
if(!isResponseOk(reprojectArr[i].response))
{
;// FIXME response incorrect -> abort merge-job, free resources
......
......@@ -37,33 +37,33 @@ import org.json.simple.JSONArray;
import vo.parameter.*;
class DatasetsCli implements Datasets
class VlkbCli implements Vlkb
{
static final Logger LOGGER = Logger.getLogger("DatasetsCli");
static final Logger LOGGER = Logger.getLogger("VlkbCli");
private Settings settings = null;
private Subsurvey[] subsurveys = null;
private Soda soda = null;
public DatasetsCli()
public VlkbCli()
{
LOGGER.info("trace DatasetsCli()");
LOGGER.info("trace VlkbCli()");
this.settings = Settings.getInstance();
soda = new SodaImpl(settings, subsurveys);
}
public DatasetsCli(Settings settings)
public VlkbCli(Settings settings)
{
LOGGER.info("trace DatasetsCli(settings)");
LOGGER.info("trace VlkbCli(settings)");
this.settings = settings;
this.soda = new SodaImpl(settings, subsurveys);
}
public DatasetsCli(Settings settings, Subsurvey[] subsurveys)
public VlkbCli(Settings settings, Subsurvey[] subsurveys)
{
LOGGER.info("trace DatasetsCli(settings, subsurveys)");
LOGGER.info("trace VlkbCli(settings, subsurveys)");
this.settings = settings;
this.subsurveys = subsurveys;
this.soda = new SodaImpl(settings, subsurveys);
......
......@@ -60,7 +60,7 @@ public class ServletCutout extends javax.servlet.http.HttpServlet
private Subsurvey[] subsurveys = null;
protected Soda soda = new SodaImpl(settings, subsurveys);
protected Datasets datasets = ( settings.amqpConn.isHostnameEmpty() ? new DatasetsCli(settings): new DatasetsAmqp(settings) );
protected Vlkb vlkb = ( settings.amqpConn.isHostnameEmpty() ? new VlkbCli(settings): new VlkbAmqp(settings) );
public void init() throws ServletException
{
......@@ -136,7 +136,7 @@ public class ServletCutout extends javax.servlet.http.HttpServlet
{
LOGGER.info("trace");
return datasets.doFileById(id, pos, band, time, pol, pixels, countNullValues, subsurveys);
return vlkb.doFileById(id, pos, band, time, pol, pixels, countNullValues, subsurveys);
}
......
......@@ -40,7 +40,7 @@ public class ServletMCutout extends javax.servlet.http.HttpServlet
private static final Logger LOGGER = Logger.getLogger(ServletMCutout.class.getName());
private static final Settings settings = Settings.getInstance();
protected Datasets datasets = ( settings.amqpConn.isHostnameEmpty() ? new DatasetsCli(settings): new DatasetsAmqp(settings) );
protected Vlkb vlkb = ( settings.amqpConn.isHostnameEmpty() ? new VlkbCli(settings): new VlkbAmqp(settings) );
public void init() throws ServletException
......@@ -95,7 +95,7 @@ public class ServletMCutout extends javax.servlet.http.HttpServlet
OutputStream respOutputStream = response.getOutputStream();
MCutResult result = datasets.doMCutout(reqJsonString);
MCutResult result = vlkb.doMCutout(reqJsonString);
final String contentType = "text/xml"; // FIXME
final String respEncoding = "utf-8"; // FIXME
......
......@@ -47,7 +47,7 @@ public class ServletMerge extends javax.servlet.http.HttpServlet
final String DEFAULT_SPEC_SYSTEM = settings.defaults.specSystem;
protected Datasets datasets = ( settings.amqpConn.isHostnameEmpty() ? new DatasetsCli(settings): new DatasetsAmqp(settings) );
protected Vlkb vlkb = ( settings.amqpConn.isHostnameEmpty() ? new VlkbCli(settings): new VlkbAmqp(settings) );
public void init() throws ServletException
......@@ -133,7 +133,7 @@ public class ServletMerge extends javax.servlet.http.HttpServlet
response.setContentType(respContentType);
CutResult cutResult = datasets.doMerge(parseLegacyPubdidArr(id), coord, countNullValues);
CutResult cutResult = vlkb.doMerge(parseLegacyPubdidArr(id), coord, countNullValues);
String contentType = respContentType;
String respEncoding = RESPONSE_ENCODING;
......
......@@ -39,7 +39,7 @@ public class UWSMCutoutWork extends JobThread
private Settings settings = UWSMCutout.settings;
protected Datasets datasets = ( settings.amqpConn.isHostnameEmpty() ? new DatasetsCli(settings): new DatasetsAmqp(settings) );
protected Vlkb vlkb = ( settings.amqpConn.isHostnameEmpty() ? new VlkbCli(settings): new VlkbAmqp(settings) );
/* NOTE needed if cutouts dir served by vlkb-datasets */
private String webappRootRequestUrl = null;
......@@ -83,7 +83,7 @@ public class UWSMCutoutWork extends JobThread
/* SODA -> Implementation */
MCutResult mresult = datasets.doMCutout(reqJsonString);
MCutResult mresult = vlkb.doMCutout(reqJsonString);
/* Implement -> SODA */
......
......@@ -35,7 +35,7 @@ public class UWSMergeWork extends JobThread
final String DEFAULT_SPEC_SYSTEM = settings.defaults.specSystem;
final String DEFAULT_TIME_SYSTEM = "MJD_UTC";
protected Datasets datasets = ( settings.amqpConn.isHostnameEmpty() ? new DatasetsCli(settings): new DatasetsAmqp(settings) );
protected Vlkb vlkb = ( settings.amqpConn.isHostnameEmpty() ? new VlkbCli(settings): new VlkbAmqp(settings) );
/* NOTE needed if cutouts dir served by vlkb-datasets */
private String webappRootRequestUrl = null;
......@@ -84,7 +84,7 @@ public class UWSMergeWork extends JobThread
*/
Coord coord = new Coord(pos, band, time, pol, pixels);
CutResult cutResult = datasets.doMerge(parseLegacyPubdidArr(id), coord, false);//countNullValues);
CutResult cutResult = vlkb.doMerge(parseLegacyPubdidArr(id), coord, false);//countNullValues);
final String respFormat = "text/xml";// FIXME read from param RESPONSEFORMAT ?
......
......@@ -32,7 +32,7 @@ public class UWSSodaWork extends JobThread
/* NOTE needed if cutouts dir served by vlkb-datasets */
private String webappRootRequestUrl = null;
protected Datasets datasets = ( settings.amqpConn.isHostnameEmpty() ? new DatasetsCli(settings): new DatasetsAmqp(settings) );$
protected Vlkb vlkb = ( settings.amqpConn.isHostnameEmpty() ? new VlkbCli(settings): new VlkbAmqp(settings) );$
public UWSSodaWork(UWSJob j) throws UWSException
......@@ -100,7 +100,7 @@ public class UWSSodaWork extends JobThread
if(band != null) band.setSystem(Band.System.valueOf(DEFAULT_SPEC_SYSTEM));
if(time != null) time.setSystem(Time.System.valueOf(DEFAULT_TIME_SYSTEM));
CutResult cutResult = datasets.doCutoutFile(rsl.relPathname, rsl.hdunum, pos, band, time, pol, false, null);
CutResult cutResult = vlkb.doCutoutFile(rsl.relPathname, rsl.hdunum, pos, band, time, pol, false, null);
/* send Results */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment