Blame view

src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java 2 KB
1353e182   Nathanael Jourdane   Add minimal eleme...
1
2
3
4
5
/*
 * This file is a part of EpnTAPClient.
 * This program aims to provide EPN-TAP support for software clients, like CASSIS spectrum analyzer.
 * See draft specifications: https://voparis-confluence.obspm.fr/pages/viewpage.action?pageId=559861
 * Copyright (C) 2016 Institut de Recherche en Astrophysique et Planétologie.
1e543ea0   Nathanael Jourdane   Code clean-up
6
 *
1353e182   Nathanael Jourdane   Add minimal eleme...
7
8
9
10
11
12
13
14
15
16
17
18
 * This program is free software: you can
 * redistribute it and/or modify it under the terms of the GNU General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or (at your option) any later
 * version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE. See the GNU General Public License for more details. You should have received a copy of
 * the GNU General Public License along with this program. If not, see
 * <http://www.gnu.org/licenses/>.
 */

package eu.omp.irap.vespa.epntapclient;

5d3c344e   Nathanael Jourdane   Use Java logging ...
19
20
import java.util.logging.Logger;

7dc89332   Nathanael Jourdane   remove TODOs, use...
21
22
import com.google.gson.Gson;

5672c106   Nathanael Jourdane   Fix Sonar issues.
23
import eu.omp.irap.vespa.epntapclient.gui.mainpanel.MainPanelCtrl;
1353e182   Nathanael Jourdane   Add minimal eleme...
24
25
26

/**
 * Simple class to have a main function to launch the EPNTap client.
1e543ea0   Nathanael Jourdane   Code clean-up
27
 *
1353e182   Nathanael Jourdane   Add minimal eleme...
28
29
30
 * @author N. Jourdane
 */
public class EpnTapMainApp {
aa2a59ba   Nathanael Jourdane   [coding style] 2 ...
31

5d3c344e   Nathanael Jourdane   Use Java logging ...
32
	/** The logger for the class EpnTapMainApp. */
fd93317f   Nathanael Jourdane   Solve Sonar/Eclip...
33
	private static final Logger LOGGER = Logger.getLogger(EpnTapMainApp.class.getName());
7706bfa4   Nathanael Jourdane   Use log4j as logg...
34

eda63a5c   Nathanael Jourdane   Add Javadoc.
35
	/** Error message when the user put a wrong command. */
6dd0d332   Nathanael Jourdane   The controller do...
36
37
	private static final String WRONG_COMMAND = "Usage: EpnTapMainApp";

aa2a59ba   Nathanael Jourdane   [coding style] 2 ...
38

1375d734   Nathanael Jourdane   Create package ep...
39
	/** Private constructor to hide the implicit public one. */
a7aff3e3   Nathanael Jourdane   Fix Sonar issues
40
41
42
	private EpnTapMainApp() {
	}

1353e182   Nathanael Jourdane   Add minimal eleme...
43
44
	/**
	 * Main function to start the application as standalone.
1e543ea0   Nathanael Jourdane   Code clean-up
45
	 *
1353e182   Nathanael Jourdane   Add minimal eleme...
46
47
	 * @param args The program arguments (not used).
	 */
42819b99   Nathanael Jourdane   Make EpnTAPClient...
48
	public static void main(final String[] args) {
d393913e   Nathanael Jourdane   Move the Runnable...
49
		LOGGER.info("Lauching EPNTAP app with arguments: " + new Gson().toJson(args));
6dd0d332   Nathanael Jourdane   The controller do...
50
		if (args.length != 0) {
d393913e   Nathanael Jourdane   Move the Runnable...
51
			System.console().writer().println(WRONG_COMMAND);
6dd0d332   Nathanael Jourdane   The controller do...
52
53
			return;
		}
d393913e   Nathanael Jourdane   Move the Runnable...
54
55
		MainPanelCtrl guiCtrl = new MainPanelCtrl();
		guiCtrl.readServices();
6dd0d332   Nathanael Jourdane   The controller do...
56
	}
1353e182   Nathanael Jourdane   Add minimal eleme...
57
}