Commit 7dc8933231da557d394e523075ee85c6b90ceb69
1 parent
4ce406a8
Exists in
master
remove TODOs, use GitLab issues instead.
Showing
10 changed files
with
6 additions
and
35 deletions
Show diff stats
src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java
@@ -21,6 +21,8 @@ import java.util.logging.Logger; | @@ -21,6 +21,8 @@ import java.util.logging.Logger; | ||
21 | import javax.swing.JFrame; | 21 | import javax.swing.JFrame; |
22 | import javax.swing.SwingUtilities; | 22 | import javax.swing.SwingUtilities; |
23 | 23 | ||
24 | +import com.google.gson.Gson; | ||
25 | + | ||
24 | import eu.omp.irap.vespa.epntapclient.controller.EpnTapController; | 26 | import eu.omp.irap.vespa.epntapclient.controller.EpnTapController; |
25 | 27 | ||
26 | /** | 28 | /** |
@@ -44,7 +46,7 @@ public class EpnTapMainApp { | @@ -44,7 +46,7 @@ public class EpnTapMainApp { | ||
44 | * @param args The program arguments (not used). | 46 | * @param args The program arguments (not used). |
45 | */ | 47 | */ |
46 | public static void main(final String[] args) { | 48 | public static void main(final String[] args) { |
47 | - EpnTapMainApp.logger.info("Lauching EPN-TAP application..."); | 49 | + EpnTapMainApp.logger.info("Lauching EPNTAP app with arguments: " + new Gson().toJson(args)); |
48 | SwingUtilities.invokeLater(new Runnable() { | 50 | SwingUtilities.invokeLater(new Runnable() { |
49 | 51 | ||
50 | @Override | 52 | @Override |
src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java
@@ -127,10 +127,10 @@ public class EpnTapController implements ViewListener { | @@ -127,10 +127,10 @@ public class EpnTapController implements ViewListener { | ||
127 | try { | 127 | try { |
128 | voTablePath = resultsController.fillTable(selectedTableServiceURL, "ADQL", query); | 128 | voTablePath = resultsController.fillTable(selectedTableServiceURL, "ADQL", query); |
129 | } catch (CantDisplayVOTableException e) { | 129 | } catch (CantDisplayVOTableException e) { |
130 | - // TODO Auto-generated catch block | 130 | + // TODO Create exception |
131 | e.printStackTrace(); | 131 | e.printStackTrace(); |
132 | } catch (CantSendQueryException e) { | 132 | } catch (CantSendQueryException e) { |
133 | - // TODO Auto-generated catch block | 133 | + // TODO Create exception |
134 | e.printStackTrace(); | 134 | e.printStackTrace(); |
135 | } | 135 | } |
136 | } | 136 | } |
src/main/java/eu/omp/irap/vespa/epntapclient/view/ParamField.java
@@ -110,7 +110,6 @@ public abstract class ParamField extends JPanel { | @@ -110,7 +110,6 @@ public abstract class ParamField extends JPanel { | ||
110 | this.paramName = paramName; | 110 | this.paramName = paramName; |
111 | 111 | ||
112 | buildParamField(); | 112 | buildParamField(); |
113 | - // TODO: Add tooltip text based on rr.table_column.column_description | ||
114 | } | 113 | } |
115 | 114 | ||
116 | private void buildParamField() { | 115 | private void buildParamField() { |
@@ -440,7 +439,6 @@ public abstract class ParamField extends JPanel { | @@ -440,7 +439,6 @@ public abstract class ParamField extends JPanel { | ||
440 | for (int i = 0; i < count; i++) { | 439 | for (int i = 0; i < count; i++) { |
441 | JsonObject elmt = hits.get(i).getAsJsonObject(); | 440 | JsonObject elmt = hits.get(i).getAsJsonObject(); |
442 | targetNames[i] = elmt.get("name").toString().replace("\"", ""); | 441 | targetNames[i] = elmt.get("name").toString().replace("\"", ""); |
443 | - // TODO: Display "[name] ([type])" on the JComboBox, but only "[name]" on the query. | ||
444 | } | 442 | } |
445 | return targetNames; | 443 | return targetNames; |
446 | } | 444 | } |
src/main/java/eu/omp/irap/vespa/epntapclient/view/panels/RequestPanel.java
@@ -78,9 +78,6 @@ public class RequestPanel extends JPanel { | @@ -78,9 +78,6 @@ public class RequestPanel extends JPanel { | ||
78 | setPreferredSize(new Dimension(GUIDim.RIGHT_PANEL_WIDTH, GUIDim.TOP_PANEL_HEIGHT)); | 78 | setPreferredSize(new Dimension(GUIDim.RIGHT_PANEL_WIDTH, GUIDim.TOP_PANEL_HEIGHT)); |
79 | setMinimumSize(new Dimension(GUIDim.RIGHT_PANEL_MIN_WIDTH, GUIDim.TOP_PANEL_MIN_HEIGHT)); | 79 | setMinimumSize(new Dimension(GUIDim.RIGHT_PANEL_MIN_WIDTH, GUIDim.TOP_PANEL_MIN_HEIGHT)); |
80 | 80 | ||
81 | - // TODO: Use a JScrollPane. | ||
82 | - // TODO: Get max row number from the GUI | ||
83 | - | ||
84 | this.add(buildParamPanel(), this); | 81 | this.add(buildParamPanel(), this); |
85 | this.add(buildQueryPanel(), this); | 82 | this.add(buildQueryPanel(), this); |
86 | this.add(buildButtonPanel(), this); | 83 | this.add(buildButtonPanel(), this); |
@@ -92,10 +89,6 @@ public class RequestPanel extends JPanel { | @@ -92,10 +89,6 @@ public class RequestPanel extends JPanel { | ||
92 | * @return The JPanel. | 89 | * @return The JPanel. |
93 | */ | 90 | */ |
94 | private JPanel buildParamPanel() { | 91 | private JPanel buildParamPanel() { |
95 | - // TODO: new GUI field column to allow the user to select the comparison operator: | ||
96 | - // - if the field is a String: listbox with 'xx', '%xx', 'xx%', and '%xx%'. | ||
97 | - // - if the field is a numeric value: listbox with <, <=, =, =>, >. | ||
98 | - // TODO use enums for the parameters names | ||
99 | paramFields = new ArrayList<>(); | 92 | paramFields = new ArrayList<>(); |
100 | paramFields.add(new TargetNameField(viewListener, "target_name")); | 93 | paramFields.add(new TargetNameField(viewListener, "target_name")); |
101 | paramFields.add(new DateRangeField(viewListener, "time_")); | 94 | paramFields.add(new DateRangeField(viewListener, "time_")); |
src/main/java/eu/omp/irap/vespa/epntapclient/view/panels/ServicesPanel.java
@@ -73,7 +73,6 @@ public class ServicesPanel extends JPanel { | @@ -73,7 +73,6 @@ public class ServicesPanel extends JPanel { | ||
73 | setPreferredSize(new Dimension(GUIDim.LEFT_PANEL_WIDTH, GUIDim.TOP_PANEL_HEIGHT)); | 73 | setPreferredSize(new Dimension(GUIDim.LEFT_PANEL_WIDTH, GUIDim.TOP_PANEL_HEIGHT)); |
74 | setMinimumSize(new Dimension(GUIDim.LEFT_PANEL_MIN_WIDTH, GUIDim.TOP_PANEL_MIN_HEIGHT)); | 74 | setMinimumSize(new Dimension(GUIDim.LEFT_PANEL_MIN_WIDTH, GUIDim.TOP_PANEL_MIN_HEIGHT)); |
75 | 75 | ||
76 | - // TODO: Support multi-selection | ||
77 | voTableView.getTable().getSelectionModel() | 76 | voTableView.getTable().getSelectionModel() |
78 | .addListSelectionListener(new ListSelectionListener() { | 77 | .addListSelectionListener(new ListSelectionListener() { |
79 | 78 |
src/main/java/eu/omp/irap/vespa/epntapclient/votable/VOTableApp.java
@@ -45,27 +45,14 @@ public class VOTableApp { | @@ -45,27 +45,14 @@ public class VOTableApp { | ||
45 | /** | 45 | /** |
46 | * Main function to start the application as standalone. | 46 | * Main function to start the application as standalone. |
47 | * | 47 | * |
48 | - * <pre> | ||
49 | - * **Usage 1**: `VOtableApp pathToVOTable` | ||
50 | - * Display the VOTable stored in the specified XML file. | ||
51 | - * - `pathToVOTable`: The path to an XML file representing a VOtable; | ||
52 | - * | ||
53 | - * **Usage 2**: `VOtableApp targetURL type language query` | ||
54 | - * Display the VOTable resulting the service or registry request. | ||
55 | - * - `targetURL`: The URL of the service or registry to ask, ie `http://cdpp-epntap.cesr.fr`; | ||
56 | - * - `language`: The language of the query, ie `ADQL`; | ||
57 | - * - `query`: The query in the specified language in double quotes, ie. `"SELECT * FROM amdadb.epn_core"` | ||
58 | - * </pre> | ||
59 | - * | ||
60 | * @param args The program arguments | 48 | * @param args The program arguments |
61 | */ | 49 | */ |
62 | public static void main(final String[] args) { | 50 | public static void main(final String[] args) { |
63 | - VOTableApp.logger.info("Lauching VOTable app with arguments:\n" + new Gson().toJson(args)); | 51 | + VOTableApp.logger.info("Lauching VOTable app with arguments: " + new Gson().toJson(args)); |
64 | SwingUtilities.invokeLater(new Runnable() { | 52 | SwingUtilities.invokeLater(new Runnable() { |
65 | 53 | ||
66 | @Override | 54 | @Override |
67 | public void run() { | 55 | public void run() { |
68 | - // TODO: Add option to export to CSV and HTML in CLI. | ||
69 | VOTableController voTableControl; | 56 | VOTableController voTableControl; |
70 | if (args.length == 1) { | 57 | if (args.length == 1) { |
71 | try { | 58 | try { |
src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableController.java
@@ -102,12 +102,10 @@ public class VOTableController { | @@ -102,12 +102,10 @@ public class VOTableController { | ||
102 | 102 | ||
103 | voTable = VOTableParser.parseVOTable(voTablePath); | 103 | voTable = VOTableParser.parseVOTable(voTablePath); |
104 | 104 | ||
105 | - // TODO: Handle the case when there are more than 1 resource or table. | ||
106 | if (voTable.getRESOURCE().size() > 1) { | 105 | if (voTable.getRESOURCE().size() > 1) { |
107 | throw new SeveralResourcesException(voTablePath); | 106 | throw new SeveralResourcesException(voTablePath); |
108 | } | 107 | } |
109 | 108 | ||
110 | - // TODO: Iterate over all potential ERROR tags | ||
111 | if ("ERROR".equals(voTable.getRESOURCE().get(0).getINFO().get(0).getValueAttribute())) { | 109 | if ("ERROR".equals(voTable.getRESOURCE().get(0).getINFO().get(0).getValueAttribute())) { |
112 | String errorInfo = voTable.getRESOURCE().get(0).getINFO().get(0).getValue(); | 110 | String errorInfo = voTable.getRESOURCE().get(0).getINFO().get(0).getValue(); |
113 | throw new ErrorMessageInVOTableException(errorInfo); | 111 | throw new ErrorMessageInVOTableException(errorInfo); |
src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java
@@ -278,7 +278,6 @@ public class VOTableDataParser { | @@ -278,7 +278,6 @@ public class VOTableDataParser { | ||
278 | */ | 278 | */ |
279 | private static void parseBinary2Stream(Stream stream, List<Field> fields) { | 279 | private static void parseBinary2Stream(Stream stream, List<Field> fields) { |
280 | VOTableDataParser.logger.info("Parsing data in BINARY2 stream..."); | 280 | VOTableDataParser.logger.info("Parsing data in BINARY2 stream..."); |
281 | - // TODO Implement parseBinary2Stream() | ||
282 | } | 281 | } |
283 | 282 | ||
284 | /** | 283 | /** |
@@ -287,7 +286,6 @@ public class VOTableDataParser { | @@ -287,7 +286,6 @@ public class VOTableDataParser { | ||
287 | */ | 286 | */ |
288 | private static void parseTableDataStream(TableData tabledata, List<Field> fields) { | 287 | private static void parseTableDataStream(TableData tabledata, List<Field> fields) { |
289 | VOTableDataParser.logger.info("Parsing data in TABLEDATA stream..."); | 288 | VOTableDataParser.logger.info("Parsing data in TABLEDATA stream..."); |
290 | - // TODO Implement parseTableDataStream() | ||
291 | } | 289 | } |
292 | 290 | ||
293 | /** | 291 | /** |
@@ -296,6 +294,5 @@ public class VOTableDataParser { | @@ -296,6 +294,5 @@ public class VOTableDataParser { | ||
296 | */ | 294 | */ |
297 | private static void parseFITSStream(Stream stream, List<Field> fields) { | 295 | private static void parseFITSStream(Stream stream, List<Field> fields) { |
298 | VOTableDataParser.logger.info("Parsing data in FITS stream..."); | 296 | VOTableDataParser.logger.info("Parsing data in FITS stream..."); |
299 | - // TODO Implement parseFITSStream() | ||
300 | } | 297 | } |
301 | } | 298 | } |
src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableParser.java
@@ -72,7 +72,6 @@ public final class VOTableParser { | @@ -72,7 +72,6 @@ public final class VOTableParser { | ||
72 | * @throws CantDisplayVOTableException VOTable is not valid or not writable. | 72 | * @throws CantDisplayVOTableException VOTable is not valid or not writable. |
73 | */ | 73 | */ |
74 | public static VOTABLE parseVOTable(String voTablePath) throws CantDisplayVOTableException { | 74 | public static VOTABLE parseVOTable(String voTablePath) throws CantDisplayVOTableException { |
75 | - // TODO: Change the name of the 2nd INFO tag instead of editing the XSD file. | ||
76 | VOTABLE voTable; | 75 | VOTABLE voTable; |
77 | JAXBContext jc; | 76 | JAXBContext jc; |
78 | try { | 77 | try { |
src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java
@@ -36,7 +36,6 @@ import eu.omp.irap.vespa.epntapclient.votable.utils.Utils; | @@ -36,7 +36,6 @@ import eu.omp.irap.vespa.epntapclient.votable.utils.Utils; | ||
36 | */ | 36 | */ |
37 | public class VOTableView extends JPanel implements TableModelListener { | 37 | public class VOTableView extends JPanel implements TableModelListener { |
38 | 38 | ||
39 | - // TODO: Create class VOTableCLI the view for a CLI usage | ||
40 | /** The serial version UID. */ | 39 | /** The serial version UID. */ |
41 | private static final long serialVersionUID = 1L; | 40 | private static final long serialVersionUID = 1L; |
42 | 41 | ||
@@ -110,7 +109,6 @@ public class VOTableView extends JPanel implements TableModelListener { | @@ -110,7 +109,6 @@ public class VOTableView extends JPanel implements TableModelListener { | ||
110 | if (e.getType() != TableModelEvent.UPDATE) { | 109 | if (e.getType() != TableModelEvent.UPDATE) { |
111 | return; | 110 | return; |
112 | } | 111 | } |
113 | - // TODO : Create VOTableListener interface | ||
114 | } | 112 | } |
115 | 113 | ||
116 | } | 114 | } |