diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapConnection.java b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapConnection.java index 0ceb005..4a8d065 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapConnection.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapConnection.java @@ -123,8 +123,8 @@ public class EpnTapConnection implements EpnTapInterface { @Override public List sendADQLQuery(String tapURL, String adqlQuery) throws VOTableException { - VOTableController voTableCtrl = new VOTableController(tapURL, adqlQuery); - voTableCtrl.readTable(); + VOTableController voTableCtrl = new VOTableController(); + voTableCtrl.newVOTable(tapURL, adqlQuery); VOTableData data = voTableCtrl.getVOTableData(); List granules; @@ -137,8 +137,8 @@ public class EpnTapConnection implements EpnTapInterface { public List sendQuery(String tapURL, String schemaName, Query enumeratedQuery) throws VOTableException { String query = String.format(enumeratedQuery.toString(), schemaName); - VOTableController voTableCtrl = new VOTableController(tapURL, query); - voTableCtrl.readTable(); + VOTableController voTableCtrl = new VOTableController(); + voTableCtrl.newVOTable(tapURL, query); VOTableData data = voTableCtrl.getVOTableData(); Debug.writeObject("data", data); diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapController.java b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapController.java index 2c579a9..0fcf784 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapController.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapController.java @@ -53,15 +53,6 @@ public abstract class EpnTapController { /** - * Method constructor, which initialize servicesController, resultsController and mainView. - */ - public EpnTapController() { - String query = String.format(Queries.SELECT_ALL_TAP_SERVICES_WHERE_CORE, - ServiceCore.EPNCORE); - servicesCtrl = new VOTableController(Consts.DEFAULT_REGISTRY_URL, query); - } - - /** * @return The request controller. */ public RequestCtrl getRequestCtrl() { @@ -97,7 +88,9 @@ public abstract class EpnTapController { public void readServices() throws VOTableException { // Here getServicesCtrl() is used instead of class field servicesCtrl to get the // subclass field, since subclasses overrides getServicesCtrl(). - getServicesCtrl().readTable(); + String query = String.format(Queries.SELECT_ALL_TAP_SERVICES_WHERE_CORE, + ServiceCore.EPNCORE); + getServicesCtrl().newVOTable(Consts.DEFAULT_REGISTRY_URL, query); } /** @@ -114,7 +107,7 @@ public abstract class EpnTapController { LOGGER.info("Sending query(ies) on " + StringJoiner.join(servicesUrls)); for (int i = 0; i < servicesUrls.size(); i++) { String query = getRequestCtrl().getQuery(services.getTableNames().get(i)); - getResultsCtrl().updateVOTable(servicesUrls.get(i), query); + getResultsCtrl().appendVOTable(servicesUrls.get(i), query); } } diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelCtrl.java b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelCtrl.java index e9bf271..d7fe433 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelCtrl.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelCtrl.java @@ -80,9 +80,9 @@ public class ResultPanelCtrl extends VOTableController implements ResultPanelLis } @Override - public void updateVOTable(String newTargetURL, String newQuery) { + public void appendVOTable(String newTargetURL, String newQuery) { try { - super.updateVOTable(newTargetURL, newQuery); + super.appendVOTable(newTargetURL, newQuery); } catch (VOTableException e) { listener.displayError("Can not update the VOTable.", e); } diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/service/ServiceCtrl.java b/src/main/java/eu/omp/irap/vespa/epntapclient/service/ServiceCtrl.java index c5b093e..138a566 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/service/ServiceCtrl.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/service/ServiceCtrl.java @@ -151,8 +151,8 @@ public class ServiceCtrl { * @throws VOTableException Can not get the VOTable. */ public static VOTABLE getVoTable(String query) throws VOTableException { - VOTableController voTableCtrl = new VOTableController(Consts.DEFAULT_REGISTRY_URL, query); - voTableCtrl.readTable(); + VOTableController voTableCtrl = new VOTableController(); + voTableCtrl.newVOTable(Consts.DEFAULT_REGISTRY_URL, query); return voTableCtrl.getVOTable(); } -- libgit2 0.21.2