From 97c8f777a14d3a9a16d3962a9922194ce00dbe23 Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Tue, 15 Sep 2015 12:48:01 -0500 Subject: [PATCH] Omaha #4880 remove dead avnfps java code Change-Id: Iefdc821cdb21f7947ee8c2d97a346ff532a61fb3 Former-commit-id: 50136bba2d368b68d41ce76c0ce0a660ff5e73ce --- .../META-INF/MANIFEST.MF | 3 +- .../raytheon/viz/aviation/AviationDialog.java | 32 +- .../raytheon/viz/aviation/BackupRestart.java | 72 + .../aviation/climatology/ClimateMenuDlg.java | 24 +- .../viz/aviation/editor/EditorTafTabComp.java | 67 +- .../aviation/editor/TafViewerEditorDlg.java | 80 +- .../viz/aviation/guidance/IChangeAction.java | 41 - .../viz/aviation/model/CloudGroup.java | 144 -- .../viz/aviation/model/ForecastModel.java | 208 --- .../viz/aviation/model/TimeGroup.java | 1193 ----------------- .../viz/aviation/model/WeatherGroup.java | 150 --- .../viz/aviation/observer/TafMonitorDlg.java | 6 +- .../raytheon/viz/aviation/package-info.java | 23 - .../viz/aviation/utility/BackupDialog.java | 22 +- .../aviation/utility/LoadStationConfig.java | 118 -- .../xml/AviationForecasterConfig.java | 5 +- .../aviation/xml/AviationMonitoringRules.java | 76 -- .../aviation/xml/AviationStationConfig.java | 105 -- .../viz/aviation/xml/ClimateDataFTPArgs.java | 5 +- .../viz/aviation/xml/ClimateTimeouts.java | 5 +- .../raytheon/viz/aviation/xml/LabelMenu.java | 39 +- .../viz/aviation/xml/MonitorArgs.java | 39 +- .../raytheon/viz/aviation/xml/MonitorCfg.java | 107 +- .../viz/aviation/xml/MonitoringRule.java | 261 ---- .../viz/aviation/xml/PlotViewerCfg.java | 9 +- .../viz/aviation/xml/StationConfig.java | 101 -- .../viz/aviation/xml/TafMonitorCfg.java | 9 +- .../aviation/xml/TafViewerEditorConfig.java | 28 +- .../viz/aviation/xml/ViewerTabConfig.java | 52 +- .../raytheon/viz/aviation/xml/WxPlotCfg.java | 7 +- .../META-INF/MANIFEST.MF | 2 +- 31 files changed, 303 insertions(+), 2730 deletions(-) create mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/BackupRestart.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/IChangeAction.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/CloudGroup.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/ForecastModel.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/TimeGroup.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/WeatherGroup.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/package-info.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/LoadStationConfig.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationMonitoringRules.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationStationConfig.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitoringRule.java delete mode 100644 cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/StationConfig.java diff --git a/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF index ec41572b41..098014f18b 100644 --- a/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Aviation Plug-in Bundle-SymbolicName: com.raytheon.viz.aviation;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.aviation.activator.Activator Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.ui, @@ -34,7 +34,6 @@ Export-Package: com.raytheon.viz.aviation, com.raytheon.viz.aviation.climatology, com.raytheon.viz.aviation.editor, com.raytheon.viz.aviation.guidance, - com.raytheon.viz.aviation.model, com.raytheon.viz.aviation.observer, com.raytheon.viz.aviation.resource, com.raytheon.viz.aviation.utility, diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/AviationDialog.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/AviationDialog.java index 7915e54a81..fa6f2ba68c 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/AviationDialog.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/AviationDialog.java @@ -54,7 +54,6 @@ import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.localization.LocalizationManager; import com.raytheon.uf.viz.datacube.DataCubeContainer; import com.raytheon.viz.aviation.climatology.ClimateMenuDlg; -import com.raytheon.viz.aviation.model.ForecastModel; import com.raytheon.viz.aviation.observer.TafMonitorDlg; import com.raytheon.viz.aviation.resource.ResourceConfigMgr; import com.raytheon.viz.aviation.utility.IBackupRestart; @@ -96,13 +95,12 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 10/09/2012 1229 rferrel Changes for non-blocking TafMonitorDlg. * 04/10/2013 1735 rferrel Changes for taf monitor speed up. * 08/09/2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR - * 12 Aug 2013 #2256 lvenable Removed unnecessary font code and other code clean up. + * 12 Aug 2013 2256 lvenable Removed unnecessary font code and other code clean up. * 06 May 2014 3091 rferrel Use OUP authorization to bring up send dialog. + * 15 Sep 2015 4880 njensen Removed ForecastModel reference * * * - * @author grichard - * @version 1.0 */ public class AviationDialog extends CaveSWTDialog implements IBackupRestart { private static final transient IUFStatusHandler statusHandler = UFStatus @@ -171,24 +169,14 @@ public class AviationDialog extends CaveSWTDialog implements IBackupRestart { | CAVE.INDEPENDENT_SHELL | CAVE.DO_NOT_BLOCK); setText("AvnFPS Menu"); - ForecastModel.getInstance().setBackupRestartUtility(this); + BackupRestart.setBackupRestartUtility(this); } - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#constructShellLayout() - */ @Override protected Layout constructShellLayout() { return new GridLayout(1, false); } - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#disposed() - */ @Override protected void disposed() { for (Font f : fontList) { @@ -208,13 +196,6 @@ public class AviationDialog extends CaveSWTDialog implements IBackupRestart { } } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org - * .eclipse.swt.widgets.Shell) - */ @Override protected void initializeComponents(Shell shell) { setReturnValue(false); @@ -491,13 +472,6 @@ public class AviationDialog extends CaveSWTDialog implements IBackupRestart { displayTafMonitorDialog(); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.aviation.utility.IBackupRestart#backupTafMonitor(java - * .lang.String) - */ @Override public void backupTafMonitor(java.util.List productDisplayList, Map> stationMap) { diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/BackupRestart.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/BackupRestart.java new file mode 100644 index 0000000000..bc9ab3ca15 --- /dev/null +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/BackupRestart.java @@ -0,0 +1,72 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.viz.aviation; + +import com.raytheon.viz.aviation.utility.IBackupRestart; + +/** + * Holds a single backup/restart utility. Code originally extracted from + * ForecastModel. + * + *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 15, 2015 4880       njensen     Extracted from ForecastModel
+ *
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class BackupRestart { + + /** + * Backup/Restart Utility for backing-up or restarting the TAF Monitor GUI. + */ + private static IBackupRestart backupRestartUtility; + + private BackupRestart() { + // don't allow instantiation + } + + /** + * Getter for backup/restart utility. + * + * @return the backup/restart utility + */ + public static IBackupRestart getBackupRestartUtility() { + return backupRestartUtility; + } + + /** + * Setter for backup/restart utility. + * + * @param backupRestartUtility + */ + public static void setBackupRestartUtility( + IBackupRestart backupRestartUtility) { + BackupRestart.backupRestartUtility = backupRestartUtility; + } + +} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java index c9e25a0954..e0a38b84d7 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/climatology/ClimateMenuDlg.java @@ -34,7 +34,6 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Layout; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; -import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; import com.raytheon.uf.common.site.SiteMap; @@ -71,6 +70,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * 10/09/2012 1229 rferrel Changes for non-blocking MetarDisplayDialog. * 10/09/2012 1229 rferrel Changes for non-blocking CigVisTrendDlg. * 10/15/2012 1229 rferrel Changes for non-blocking HelpUsageDlg. + * Sep 15, 2015 4880 njensen Removed dead code * * * @@ -217,18 +217,6 @@ public class ClimateMenuDlg extends CaveSWTDialog { Menu helpMenu = new Menu(menuBar); helpMenuItem.setMenu(helpMenu); - // -------------------------------------------------- - // Create About menu item - // -------------------------------------------------- - MenuItem aboutMenuItem = new MenuItem(helpMenu, SWT.NONE); - aboutMenuItem.setText("About..."); - aboutMenuItem.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent event) { - notImplementedYet("About..."); - } - }); - // -------------------------------------------------- // Create Usage menu item // -------------------------------------------------- @@ -380,14 +368,4 @@ public class ClimateMenuDlg extends CaveSWTDialog { } } - // TODO - remove this when needed... - // this is a convenience method to show a dialog - // when functionality has not been implemented... - // - private void notImplementedYet(String information) { - MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); - mb.setText("Notice"); - mb.setMessage("Functionality not implemented yet:\n\n" + information); - mb.open(); - } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/EditorTafTabComp.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/EditorTafTabComp.java index bdd975ed7d..f247266752 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/EditorTafTabComp.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/EditorTafTabComp.java @@ -19,8 +19,12 @@ **/ package com.raytheon.viz.aviation.editor; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; import java.util.HashMap; +import java.util.TimeZone; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.ExtendedModifyEvent; @@ -52,8 +56,8 @@ import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.Text; +import com.raytheon.uf.common.time.SimulatedTime; import com.raytheon.viz.aviation.editor.TafViewerEditorDlg.TafSettings; -import com.raytheon.viz.aviation.model.ForecastModel; import com.raytheon.viz.aviation.resource.ResourceConfigMgr; import com.raytheon.viz.aviation.resource.ResourceConfigMgr.ResourceTag; @@ -75,6 +79,7 @@ import com.raytheon.viz.aviation.resource.ResourceConfigMgr.ResourceTag; * 3/18/2011 7888 rferrel Added getLargeTF method. * 02/19/2014 16980 zhao added getter and setter for the Alt flag * 06/27/2015 4588 skorolev Removed unnecessary insert toggle. + * Sep 15, 2015 4880 njensen Moved getTimeNow... methods here from ForecastModel * * * @@ -186,7 +191,7 @@ public class EditorTafTabComp extends Composite { // Enumeration for amendment type of report public static enum AmendmentType { RTN, AMD, RTD, COR - }; + } /** * Constructor. @@ -1015,7 +1020,8 @@ public class EditorTafTabComp extends Composite { /** * Set routine radio button selection. * - * @param -- the selection predicate + * @param select + * the selection predicate */ public void setRtnRdo(boolean select) { rtnRdo.setSelection(select); @@ -1033,7 +1039,8 @@ public class EditorTafTabComp extends Composite { /** * set amended radio button selection. * - * @param -- the selection predicate + * @param select + * the selection predicate */ public void setAmdRdo(boolean select) { amdRdo.setSelection(select); @@ -1051,7 +1058,8 @@ public class EditorTafTabComp extends Composite { /** * Set routine delay radio button selection. * - * @param -- the selection predicate + * @param select + * the selection predicate */ public void setRtdRdo(boolean select) { rtdRdo.setSelection(select); @@ -1069,7 +1077,8 @@ public class EditorTafTabComp extends Composite { /** * Set correction radio button selection. * - * @param -- the selection predicate + * @param select + * the selection predicate */ public void setCorRdo(boolean select) { corRdo.setSelection(select); @@ -1078,7 +1087,8 @@ public class EditorTafTabComp extends Composite { /** * Set WMO ID Label * - * @param -- the text to put in the label + * @param s + * the text to put in the label * */ public void setWmoIdLbl(String s) { @@ -1088,7 +1098,8 @@ public class EditorTafTabComp extends Composite { /** * Set WMO Site Label * - * @param -- the text to put in the label + * @param s + * the text to put in the label * */ public void setWmoSiteLbl(String s) { @@ -1098,7 +1109,8 @@ public class EditorTafTabComp extends Composite { /** * Set large text control * - * @param -- the text to put in the control + * @param s + * the text to put in the control * */ public void setLargeTF(String s) { @@ -1108,7 +1120,8 @@ public class EditorTafTabComp extends Composite { /** * Set small text control * - * @param -- the text to put in the control + * @param s + * the text to put in the control * */ public void setSmallTF(String s) { @@ -1169,8 +1182,7 @@ public class EditorTafTabComp extends Composite { public void updateTimes() { tafEditorTxt.setText(tafEditorTxt.getText().replaceAll( ISSUE_TIME, - ForecastModel.getInstance().getTimeNowInDdHhMmFormat(0) + "Z " - + ForecastModel.getInstance().getTimeNowInDdHhFormat(0) + getTimeNowInDdHhMmFormat(0) + "Z " + getTimeNowInDdHhFormat(0) + "/")); } @@ -1361,4 +1373,35 @@ public class EditorTafTabComp extends Composite { public void setAlt(boolean b) { alt = b; } + + /** + * Method gets the time now of a forecast. + * + * @return String representing the time now in DDHH format + */ + public String getTimeNowInDdHhFormat(int deltaHours) { + Date now = SimulatedTime.getSystemTime().getTime(); + SimpleDateFormat formatter = new SimpleDateFormat("ddHH"); + formatter.setTimeZone(TimeZone.getTimeZone("UTC")); + Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); + cal.setTime(now); + cal.add(Calendar.HOUR_OF_DAY, deltaHours); + return (formatter.format(cal.getTime())); + } + + /** + * Method gets the time now of a forecast. + * + * @return String representing the time now in DDHHMM format + */ + public String getTimeNowInDdHhMmFormat(int deltaHours) { + Date now = SimulatedTime.getSystemTime().getTime(); + SimpleDateFormat formatter = new SimpleDateFormat("ddHHmm"); + formatter.setTimeZone(TimeZone.getTimeZone("UTC")); + Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); + cal.setTime(now); + cal.add(Calendar.HOUR_OF_DAY, deltaHours); + return (formatter.format(cal.getTime())); + } + } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/TafViewerEditorDlg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/TafViewerEditorDlg.java index 9ff076bcd1..e15b75d9f5 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/TafViewerEditorDlg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/TafViewerEditorDlg.java @@ -31,7 +31,6 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -103,18 +102,15 @@ import com.raytheon.uf.common.python.PythonScript; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; -import com.raytheon.uf.common.time.SimulatedTime; import com.raytheon.uf.viz.core.RGBColors; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.localization.LocalizationManager; import com.raytheon.viz.aviation.AviationDialog; -import com.raytheon.viz.aviation.editor.EditorTafTabComp.AmendmentType; import com.raytheon.viz.aviation.editor.tools.AvnSmartToolFinishedListener; import com.raytheon.viz.aviation.editor.tools.AvnSmartToolJob; import com.raytheon.viz.aviation.editor.tools.AvnSmartToolRequest; import com.raytheon.viz.aviation.guidance.MetarViewer; import com.raytheon.viz.aviation.guidance.ViewerTab; -import com.raytheon.viz.aviation.model.ForecastModel; import com.raytheon.viz.aviation.monitor.AvnPyUtil; import com.raytheon.viz.aviation.monitor.TafUtil; import com.raytheon.viz.aviation.observer.SendDialog; @@ -243,6 +239,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 04/07/2015 17332 zhao Added code to handle case of "Cancel" in "Restore From..." * 06/23/2015 2282 skorolev Corrected "CLEAR" case in updateSettings. * 06/26/2015 4588 skorolev Fixed Insert/Overwrite issue. + * Sep 15, 2015 4880 njensen Removed dead code * * * @@ -656,36 +653,6 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, // Mark the tabs as not current so they get updated. markTabsAsNotCurrent(); - - break; - - case OPEN_RTN: - // Select the editor tab on the tab folder. - tabFolder.setSelection(editorTab); - // Find an open tab item to use to load the requested taf(s). - if (findEditOpenTab() == false) { - break; - } - // Update the contents of the open tab item with the first - // selected site. - ti.setText(stationName); - editorTafTabComp.setRtnRdo(true); - editorTafTabComp.setAmdRdo(false); - editorTafTabComp.setRtdRdo(false); - editorTafTabComp.setCorRdo(false); - try { - editorTafTabComp.setWmoIdLbl(getWmoId()); - editorTafTabComp.setWmoSiteLbl(getSiteId()); - editorTafTabComp.setLargeTF(getCurrentDate()); - editorTafTabComp.setSmallTF(""); - } catch (RuntimeException e) { - // e.printStackTrace(); - } - TafRecord taf = TafUtil.getLatestTaf(stationName); - editorTafTabComp.getTextEditorControl().setText( - TafUtil.safeFormatTaf(taf, false)); - - editorTafTabComp.amendTaf(AmendmentType.RTN); break; case OPEN_AMD: @@ -810,46 +777,6 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, qcColors[3] = new Color(display, syntaxFatalRGB); } - /** - * Get the WFO's WMO ID - * - * @return the WMO identifier of the WFO - */ - private String getWmoId() { - String[] wmoHeadings = (ForecastModel - .getInstance() - .getAvnForecast(stationName) - .get(ForecastModel.getInstance().getAvnForecast(stationName) - .firstKey()).getWmoHeader()).split(" "); - return wmoHeadings[0]; - } - - /** - * Get the WFO's Site ID - * - * @return the site identifier of the WFO - */ - private String getSiteId() { - String[] wmoHeadings = (ForecastModel - .getInstance() - .getAvnForecast(stationName) - .get(ForecastModel.getInstance().getAvnForecast(stationName) - .firstKey()).getWmoHeader()).split(" "); - return wmoHeadings[1]; - } - - /** - * Get the current date in the ddHHmm format used for weather data - * - * @return the current date in ddHHmm format as a String - */ - private String getCurrentDate() { - Date now = SimulatedTime.getSystemTime().getTime(); - SimpleDateFormat formatter = new SimpleDateFormat("ddHHmm"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - return (formatter.format(now)); - } - /** * Method to inform user when an action is to be taken prior to another * action @@ -3318,7 +3245,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, return; } finally { if (python != null) { - python.dispose(); + python.close(); + python = null; } } @@ -3934,7 +3862,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, } finally { if (python != null) { // Always dispose the script! - python.dispose(); + python.close(); python = null; } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/IChangeAction.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/IChangeAction.java deleted file mode 100644 index 2425a88032..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/IChangeAction.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation.guidance; - -/** - * Callback used when a weather change occurs. - * - *
- *
- * SOFTWARE HISTORY
- *
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jul 17, 2009            lvenable     Initial creation
- *
- * 
- * - * @author lvenable - * @version 1.0 - */ -public interface IChangeAction { - - void wxChanged(); -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/CloudGroup.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/CloudGroup.java deleted file mode 100644 index d7f4c71dc0..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/CloudGroup.java +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.viz.aviation.model; - -/** - * CloudGroup class represents the cloud group within the common part of a - * normalized TAF and a normalized METAR. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * 3/13/2008    933         grichard    Initial creation.
- * 5/29/2008    937         grichard    Taf refactor first cut.
- * 
- * 
- * - * @author grichard - * @version 1.0 - * - */ - -public class CloudGroup { - - /** - * The Cloud Category of a forecast. - */ - private CloudCategory cloudCategory; - - /** - * Method that returns the cloud category for a forecast. - * - * @return cloudCategory - */ - public CloudCategory getCldCat() { - return cloudCategory; - } - - /** - * Method that sets the cloud category for a forecast. - * - * @param cldCat - */ - public void setCldCat(CloudCategory cldCat) { - cloudCategory = cldCat; - } - - /** - * Cloud Categories - */ - public static enum CloudCategory { - /* Sky Clear (SKC) -- used in TAF */ - /* Clear (CLR) -- unused in TAF */ - /* Sky Clear (SKT) */ - /* Few (FEW) */ - /* Scattered (SCT) */ - /* Broken (BKN) */ - /* Overcast (OVC) */ - /* Vertical Visibility (VV) */ - /* No Cloud Detected (NCD) -- unused in TAF */ - /* No Significant Cloud (NSC) -- unused in TAF */ - SKC("SKC"), CLR("CLR"), SKT("SKT"), FEW("FEW"), SCT("SCT"), BKN("BKN"), OVC( - "OVC"), VV("VV"), NCD("NCD"), NSC("NSC"); - /* - * See: NWS Operations Manual W/OM12 Part D-31 for more information. - */ - - CloudCategory(String value) { - this.value = value; - } - - private final String value; - - public String value() { - return value; - } - } - - /** - * The Cloud Height of a forecast. - */ - private int cloudHeight; - - /** - * Method that returns the cloud height for a forecast. - * - * @return cloudHeight - */ - public int getCldHgt() { - return cloudHeight; - } - - /** - * Method that sets the cloud height for a forecast. - * - * @param cldHgt - */ - public void setCldHgt(int cldHgt) { - cloudHeight = cldHgt; - } - - /** Genus for convective low level cloud - CB */ - private String genus; - - /** - * Method that gets the genus. - * - * @return the genus - */ - public String getGenus() { - return genus; - } - - /** - * Method that sets the genus. - * - * @param genus - * the genus to set - */ - public void setGenus(String genus) { - this.genus = genus; - } - -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/ForecastModel.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/ForecastModel.java deleted file mode 100644 index d38aeb2dda..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/ForecastModel.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.viz.aviation.model; - -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.SortedMap; -import java.util.TimeZone; - -import org.apache.commons.collections.MultiMap; -import org.apache.commons.collections.map.MultiValueMap; - -import com.raytheon.uf.common.time.SimulatedTime; -import com.raytheon.viz.aviation.utility.IBackupRestart; -import com.raytheon.viz.aviation.xml.MonitoringRule; - -/** - * ForecastModel class is a singleton class that contains the forecast model for - * aviation. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * 3/14/2008    933         grichard    Initial creation.
- * 5/21/2008    1119        grichard    Added anvObservation to model.
- * 5/22/2008    937         grichard    Added sitesSelected attribute.
- * 5/29/2008    937         grichard    Taf refactor first cut.
- * 5/30/2008    937         grichard    Added Weather Group.
- * 6/3/2008     937         grichard    Added remarks to TAFs.
- * 6/3/2008     937         grichard    Added probability to TAFs.
- * 6/16/2008    937         grichard    Improved viewer/editor interaction.
- * 7/29/2008    1342        grichard    Get calendar instance in UTC time zone.
- * 7/30/2008    1139        grichard    Added TAF Valid Period support.
- * 9/19/2008    1444        grichard    Add Taf wx quality check capability.
- * 12/2/2008    1588        grichard    Updated metar guidance contents.
- * 12/3/2008    1588        grichard    Added wmo header display option for metars.
- * 12/3/2008    1515        grichard    Implement 30 hour TAF modifications.
- * 1/8/2009     1839        grichard    Correct the 30 hour TAF format.
- * 1/15/2009    1816        grichard    Correct TAF to conform to 10-813 NWSI.
- * 5/11/2009    1982        grichard    Added backup/restart monitor feature.
- * 5/13/2009    1982        grichard    Refactor findTheCurrentElement method.
- * 8/18/2009    2838        grichard    Display PROB groups same line as predecessor.
- * 8/19/2009    2836        grichard    PROB and TEMPO groups should not affect MetWatch.
- * 
- * 
- * - * @author grichard - * @version 1.0 - */ -public final class ForecastModel { - - /** - * The static singleton instance. - */ - private static ForecastModel instance; - - /** - * Aviation Forecast. - */ - private Map> avnForecast = new HashMap>(); - - /** - * Aviation TAF Guidance. - */ - private MultiMap avnTafGuidance = new MultiValueMap(); - - /** - * Aviation Observation. - */ - private Map avnObservation = new HashMap(); - - /** - * Aviation Current Element of Forecast. - */ - private Map avnCurrentElement = new HashMap(); - - /** - * Aviation Persist 1 Hour Element of Forecast. - */ - private Map avnPersist1HrElement = new HashMap(); - - /** - * Aviation Persist 2 Hour Element of Forecast. - */ - private Map avnPersist2HrElement = new HashMap(); - - /** - * Aviation Persist 3 Hour Element of Forecast. - */ - private Map avnPersist3HrElement = new HashMap(); - - /** - * Backup/Restart Utility for backing-up or restarting the TAF Monitor GUI. - */ - private IBackupRestart backupRestartUtility; - - /** - * The rule map. - */ - private final Map> ruleMap = new HashMap>(); - - public static enum TafOptions { - LoadTafs, LoadTafsWithHeaders, LoadMetars, LoadAllMetars, LoadMetarsWithHeaders, LoadAllMetarsWithHeaders, LoadDecodedMetars, AdjustTimes, CopyForecasts, UseMetarForPrevailing, WestFlow, LoadGfsMos, LoadGfsLamp, LoadEtaMos, LoadNgmMos, LoadTafGfsLamp, LoadNamWrf, LoadGrids - } - - /** - * Singleton constructor. - * - * @return the forecast model. - */ - public static synchronized ForecastModel getInstance() { - if (instance == null) { - instance = new ForecastModel(); - } - - return instance; - } - - /** - * Private constructor: Use getInstance(). - */ - private ForecastModel() { - } - - /** - * Getter/Accessor of Aviation Forecast. - * - * @param icao - * the International Civil Aviation Organization identifier - * @return avnForecast - */ - public SortedMap getAvnForecast(String icao) { - return avnForecast.get(icao); - } - - /** - * Method gets the time now of a forecast. - * - * @return String representing the time now in DDHH format - */ - public String getTimeNowInDdHhFormat(int deltaHours) { - Date now = SimulatedTime.getSystemTime().getTime(); - SimpleDateFormat formatter = new SimpleDateFormat("ddHH"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); - cal.setTime(now); - cal.add(Calendar.HOUR_OF_DAY, deltaHours); - return (formatter.format(cal.getTime())); - } - - /** - * Method gets the time now of a forecast. - * - * @return String representing the time now in DDHHMM format - */ - public String getTimeNowInDdHhMmFormat(int deltaHours) { - Date now = SimulatedTime.getSystemTime().getTime(); - SimpleDateFormat formatter = new SimpleDateFormat("ddHHmm"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); - cal.setTime(now); - cal.add(Calendar.HOUR_OF_DAY, deltaHours); - return (formatter.format(cal.getTime())); - } - - /** - * Getter for backup/restart utility. - * - * @return the backup/restart utility - */ - public IBackupRestart getBackupRestartUtility() { - return backupRestartUtility; - } - - /** - * Setter for backup/restart utility. - * - * @param backupRestartUtility - */ - public void setBackupRestartUtility(IBackupRestart backupRestartUtility) { - this.backupRestartUtility = backupRestartUtility; - } - -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/TimeGroup.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/TimeGroup.java deleted file mode 100644 index 08a26105dc..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/TimeGroup.java +++ /dev/null @@ -1,1193 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.viz.aviation.model; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.TimeZone; - -import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord; -import com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover; -import com.raytheon.uf.common.dataplugin.taf.TafConstants; -import com.raytheon.viz.aviation.model.CloudGroup.CloudCategory; - -/** - * TimeGroup class represents the common part of a normalized TAF and a - * normalized METAR. The key field is the time of the observation in minutes. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * 3/13/2008    933         grichard    Initial creation.
- * 4/15/2008    934         grichard    Added wind shear.
- * 5/29/2008    937         grichard    Taf refactor first cut.
- * 5/30/2008    937         grichard    Added Weather Group.
- * 6/2/2008     937         grichard    Added date formatter methods.
- * 6/3/2008     937         grichard    Added probability to TAFs.
- * 6/4/2008     937         grichard    Ordered cloud groups by height.
- * 6/4/2008     937         grichard    Ordered wx groups by significance.
- * 6/24/2008    934         grichard    Updated ceiling thresholding.
- * 7/30/2008    1139        grichard    Added TAF Valid Period support.
- * 9/4/2008     1444        grichard    Import constants from TafConstants class.
- * 12/2/2008    1588        grichard    Updated metar guidance contents.
- * 12/3/2008    1515        grichard    Implement 30 hour TAF modifications.
- * 1/15/2009    1816        grichard    Correct TAF to conform to 10-813 NWSI.
- * 4/29/2009    1982        grichard    Correct TAF to conform to 10-813 NWSI.
- * 5/11/2009    1816        grichard    Corrected visibility for metar change.
- * May 15, 2014 3002        bgonzale    Moved common taf code to com.raytheon.uf.common.dataplugin.taf.
- * 
- * 
- * - * @author grichard - * @version 1.0 - * - */ - -public class TimeGroup implements Comparable { - - /** - * The integer default for observations consistent with the metar (obs) and - * taf plugins - */ - public static final int INT_DEFAULT = -9999; - - /** Raw data from the message */ - private String rawData; - - /** WMO Header for the data */ - private String wmoHeader; - - /** Station Identifier for the data */ - private String stationId; - - /** The Change Indicator of a forecast */ - private ChangeIndicator changeIndicator; - - /** Probability percentage for PROB change group */ - private Integer probability; - - /** The Correction Indicator of a forecast */ - private String tafCorIndicator; - - /** The Amendment Indicator of a forecast */ - private String amdIndicator; - - /** Start Time of forecast/observation in minutes */ - private Calendar startTime; - - /** End Time of forecast/observation in minutes */ - private Calendar endTime; - - /** Issue date */ - private Calendar issueTime; - - /** Valid Period Start Time */ - private Calendar validPeriodStartTime; - - /** Valid Period End Time */ - private Calendar validPeriodEndTime; - - /** METAR/SPECI Report type extracted from WMO header * */ - private String reportType; - - /** The Correction Indicator of an observation */ - private String obsCorIndicator; - - /** - * A string denoting the type of automated station (AO1 or AO2) for an - * observation - */ - private String autoStationType; - - /** The latitude of the station for an observation */ - private double stationLat = INT_DEFAULT; - - /** The longitude of the station for an observation */ - private double stationLon = INT_DEFAULT; - - /** The sea level pressure in millibars for an observation */ - private float seaLevelPress = INT_DEFAULT; - - /** The temperature in degrees Celsius in an observation */ - private int temperature = INT_DEFAULT; - - /** The current dew point in degrees Celsius in an observation */ - private int dewPoint = INT_DEFAULT; - - /** The altimeter reading in in/Hg in an observation */ - private float altimeter = INT_DEFAULT; - - /** The precipitation reading in inches in an hourly observation */ - private float precip1Hour = INT_DEFAULT; - - /** Any remarks contained in the TAF record */ - private String remarks; - - /** Wind direction in degrees from north */ - private String windDir; - - /** Wind speed in knots */ - private int windSpeed = INT_DEFAULT; - - /** Wind gusts in knots */ - private int windGust = INT_DEFAULT; - - /** Wind shear in knots */ - private int windShear = INT_DEFAULT; - - /** Visibility in statute miles */ - private String visibility; - - /** A string denoting the vertical visibility */ - private int vertVisibility = INT_DEFAULT; - - /** Sky Conditions */ - private ArrayList cloudGroup = new ArrayList(); - - /** Weather Conditions */ - private ArrayList weatherGroup = new ArrayList(); - - /** - * The Flight Category of a forecast. - */ - private FlightCategory flightCategory; - - /** - * The Ceiling Threshold of a forecast. - */ - private CeilingThreshold ceilingThreshold; - - /** - * The Visibility Threshold of a forecast. - */ - private VisibilityThreshold visibilityThreshold; - - /** - * Tool Tip is text that contains a message, a forecast, and an observation. - */ - private String toolTip = ""; - - /** - * Flight Categories - */ - public static enum FlightCategory { - /* Low Instrument Flight Rules (LIFR) */ - /* Instrument Flight Rules (IFR) */ - /* Marginal Visual Flight Rules (MVFR) */ - /* Visual Flight Rules (VFR) */ - LIFR, IFR, MVFR, VFR; - /* - * See: NWS Operations Manual W/OM12 Part D-31 for more information. - */ - } - - /** - * Method that gets the flight category for a forecast. - * - * @return flightCategory - */ - public FlightCategory getCategory() { - return flightCategory; - } - - /** - * Method that sets the flight category for a forecast. - * - * @param fltCat - */ - public void setCategory(FlightCategory fltCat) { - flightCategory = fltCat; - } - - /** - * Method that gets the ceiling threshold for a forecast. - * - * @return ceilingThreshold - */ - public CeilingThreshold getCigThresh() { - return ceilingThreshold; - } - - /** - * Method that sets the ceiling threshold for a forecast. - * - * @param ceilingThreshold - */ - public void setCigThresh(CeilingThreshold ceilingThreshold) { - this.ceilingThreshold = ceilingThreshold; - } - - /** - * Method that determines the ceiling threshold for a forecast. - * - * @param cldGp - * -- a list of cloud groups - */ - public void determineCigThresh(ArrayList cldGp) { - for (CloudGroup cg : cldGp) { - CloudCategory cldCat = cg.getCldCat(); - try { - // Set default ceiling threshold to sunny and a million. - ceilingThreshold = CeilingThreshold.FOURTEEN; - // Determine actual ceiling threshold if broken or - // overcast sky cover. - if (cldCat == CloudCategory.BKN || cldCat == CloudCategory.OVC) { - if (cg.getCldHgt() <= 200) { - ceilingThreshold = CeilingThreshold.ONE; - } else if (cg.getCldHgt() <= 500) { - ceilingThreshold = CeilingThreshold.TWO; - } else if (cg.getCldHgt() <= 1000) { - ceilingThreshold = CeilingThreshold.THREE; - } else if (cg.getCldHgt() <= 3000) { - ceilingThreshold = CeilingThreshold.FOUR; - } else if (cg.getCldHgt() <= 3500) { - ceilingThreshold = CeilingThreshold.FIVE; - } else if (cg.getCldHgt() <= 4000) { - ceilingThreshold = CeilingThreshold.SIX; - } else if (cg.getCldHgt() <= 5000) { - ceilingThreshold = CeilingThreshold.SEVEN; - } else if (cg.getCldHgt() <= 8000) { - ceilingThreshold = CeilingThreshold.EIGHT; - } else if (cg.getCldHgt() <= 10000) { - ceilingThreshold = CeilingThreshold.NINE; - } else if (cg.getCldHgt() <= 12000) { - ceilingThreshold = CeilingThreshold.TEN; - } else if (cg.getCldHgt() <= 15000) { - ceilingThreshold = CeilingThreshold.ELEVEN; - } else if (cg.getCldHgt() <= 18000) { - ceilingThreshold = CeilingThreshold.TWELVE; - } else if (cg.getCldHgt() <= 20000) { - ceilingThreshold = CeilingThreshold.THIRTEEN; - } else { - ceilingThreshold = CeilingThreshold.FOURTEEN; - } - break; - } - } catch (NullPointerException e) { - // use default ceiling information - ceilingThreshold = CeilingThreshold.ONE; - } - } - } - - /** - * The AvnFPS Ceiling (CIG) Threshold enumeration - */ - public static enum CeilingThreshold { - ONE(0), TWO(200), THREE(500), FOUR(1000), FIVE(3000), SIX(3500), SEVEN( - 4000), EIGHT(5000), NINE(8000), TEN(10000), ELEVEN(12000), TWELVE( - 15000), THIRTEEN(18000), FOURTEEN(20000); - CeilingThreshold(int value) { - this.value = value; - } - - /** - * Value of Ceiling Height in units of feet. - */ - private final int value; - - public int value() { - return value; - } - } - - /** - * Method that gets the visibility threshold for a forecast. - * - * @return visibilityThreshold - */ - public VisibilityThreshold getVsbyThresh() { - return visibilityThreshold; - } - - /** - * Method that sets the visibility threshold for a forecast. - * - * @param vsbyThresh - */ - public void setVsbyThresh(VisibilityThreshold vsbyThresh) { - visibilityThreshold = vsbyThresh; - } - - /** - * The AvnFPS Visibility (VIS) Threshold enumeration - */ - public static enum VisibilityThreshold { - ONE(0), TWO(0.5), THREE(1), FOUR(3), FIVE(5); - VisibilityThreshold(double value) { - this.value = value; - } - - /** - * Value of Visibility in units of statute miles. - */ - private final double value; - - public double value() { - return value; - } - } - - /** - * Method that gets the visibility of a forecast. - * - * @return the visibility - */ - public String getVisibility() { - return visibility; - } - - /** - * Overloaded method that sets the visibility of a forecast. - * - * @param visibility - * the visibility to set - */ - public void setVisibility(float visibility) { - String[] vsbyFloatRepresentation = String.valueOf(visibility).split( - "\\."); - this.visibility = vsbyFloatRepresentation[0]; - } - - /** - * Overloaded method that sets the visibility of a forecast. - * - * @param visibility - * the visibility to set - */ - public void setVisibility(String visibility) { - this.visibility = visibility; - } - - /** - * Method that determines the visibility threshold of a forecast. - */ - public void determineVisibilityThreshold() { - if (getVisibility().matches("[0]|(1\\u002F16)|([1]\\u002F[248])")) { - setVsbyThresh(VisibilityThreshold.ONE); - } else if (getVisibility().matches("([3]\\u002F[4])|[1]")) { - setVsbyThresh(VisibilityThreshold.TWO); - } else if (getVisibility() - .matches( - "([12]\\u0020[1]\\u002F[24])|([12]\\u0020[3]\\u002F[4])|([23])")) { - setVsbyThresh(VisibilityThreshold.THREE); - } else if (getVisibility() - .matches( - "([34]\\u0020[1]\\u002F[24])|([34]\\u0020[3]\\u002F[4])|([45])")) { - setVsbyThresh(VisibilityThreshold.FOUR); - } else { - setVsbyThresh(VisibilityThreshold.FIVE); - } - } - - /** - * Method that determines the flight category of a report. The method - * applied is based on AvnLib.py's flightCategory method. - * - * @param vsby - * -- the visibility in statute miles - * @param cig - * -- the ceiling category - */ - public void determineFlightCategory(float vsby, CeilingThreshold cig) { - - if (cig.value < 500 || vsby < 1.0) { - flightCategory = FlightCategory.LIFR; - } else if (cig.value < 1000 || vsby < 3.0) { - flightCategory = FlightCategory.IFR; - } else if (cig.value < 3100 || vsby < 6.0) { - flightCategory = FlightCategory.MVFR; - } else { - flightCategory = FlightCategory.VFR; - } - } - - /** - * Method that gets the vertical visibility of a forecast. - * - * @return the vertical visibility - */ - public int getVertVisibility() { - return vertVisibility; - } - - /** - * Method that sets the vertical visibility of a forecast. - * - * @param vertVisibility - * the vertical visibility to set - */ - public void setVertVisibility(int vertVisibility) { - this.vertVisibility = vertVisibility; - } - - /** - * Method that gets the wind direction of a forecast. - * - * @return the windDir - */ - public String getWindDir() { - return windDir; - } - - /** - * Method that sets the wind direction of a forecast. - * - * @param windDir - * the windDir to set - */ - public void setWindDir(String windDir) { - this.windDir = windDir; - } - - /** - * Method that gets the wind speed of a forecast. - * - * @return the windSpeed - */ - public int getWindSpeed() { - return windSpeed; - } - - /** - * Method that sets the wind speed of a forecast. - * - * @param windSpeed - * the windSpeed to set - */ - public void setWindSpeed(int windSpeed) { - this.windSpeed = windSpeed; - } - - /** - * Method that gets the wind gust of a forecast. - * - * @return the windGust - */ - public int getWindGust() { - return windGust; - } - - /** - * Method that sets the wind gust of a forecast. - * - * @param windGust - * the windGust to set - */ - public void setWindGust(int windGust) { - this.windGust = windGust; - } - - /** - * Method that gets the wind shear of a forecast. - * - * @return the windShear - */ - public int getWindShear() { - return windShear; - } - - /** - * Method that sets the wind shear of a forecast. - * - * @param windShear - * the windShear to set - */ - public void setWindShear(int windShear) { - this.windShear = windShear; - } - - /** - * Method that gets the start time of a forecast/observation. - * - * @return the startTime - */ - public Calendar getStartTime() { - return startTime; - } - - /** - * Method that sets the start time of a forecast/observation. - * - * @param startTime - * the start time of the forecast/observation to set - */ - public void setStartTime(Calendar startTime) { - this.startTime = startTime; - } - - /** - * Method that gets the start time of a forecast/observation in DD format. - * - * @return the startTime - */ - public String getStartTimeInDdFormat() { - SimpleDateFormat formatter = new SimpleDateFormat("dd"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - return (formatter.format(startTime.getTime())); - } - - /** - * Method that gets the start time of a forecast/observation in HH format. - * - * @return the startTime - */ - public String getStartTimeInHhFormat() { - SimpleDateFormat formatter = new SimpleDateFormat("HH"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - return (formatter.format(startTime.getTime())); - } - - /** - * Method that gets the start time of a forecast/observation in DDHH format. - * - * @return the startTime - */ - public String getStartTimeInDdHhFormat() { - SimpleDateFormat formatter = new SimpleDateFormat("ddHH"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - return (formatter.format(startTime.getTime())) + "/"; - } - - /** - * Method that gets the start time of a forecast/observation in DDHHMM - * format. - * - * @return the startTime - */ - public String getStartTimeInDdHhMmFormat() { - SimpleDateFormat formatter = new SimpleDateFormat("ddHHmm"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - return (formatter.format(startTime.getTime())); - } - - /** - * Method that gets the end time of a forecast/observation. - * - * @return the endTime - */ - public Calendar getEndTime() { - return endTime; - } - - /** - * Method that sets the end time of a forecast/observation. - * - * @param endTime - * the end time of the forecast/observation to set - */ - public void setEndTime(Calendar endTime) { - this.endTime = endTime; - } - - /** - * Method that gets the end time of a forecast/observation in ddHH format. - * - * @return the endTime - */ - public String getEndTimeInDdHhFormat() { - SimpleDateFormat formatter = new SimpleDateFormat("ddHH"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - return (formatter.format(endTime.getTime())); - } - - /** - * Method that gets the end time of a forecast/observation in HH format. - * - * @return the endTime - */ - public String getEndTimeInHhFormat() { - SimpleDateFormat formatter = new SimpleDateFormat("HH"); - formatter.setTimeZone(TimeZone.getTimeZone("UTC")); - return (formatter.format(endTime.getTime())); - } - - /** - * Method that gets the issue time for a forecast. - * - * @return the issueTime - */ - public Calendar getIssueTime() { - return issueTime; - } - - /** - * Method that sets the issue time for a forecast. - * - * @param issueTime - * the issueTime to set - */ - public void setIssueTime(Calendar issueTime) { - this.issueTime = issueTime; - } - - /** - * Method that gets the remarks for a forecast. - * - * @return the remarks - */ - public String getRemarks() { - return remarks; - } - - /** - * Method that sets the remarks for a forecast. - * - * @param remarks - * the remarks to set - */ - public void setRemarks(String remarks) { - this.remarks = remarks; - } - - /** - * Method that gets the cloud group for a forecast. - * - * @return the cloud group - */ - public ArrayList getCloudGroup() { - return cloudGroup; - } - - /** - * Method that sets the cloud group for a forecast. - * - * @param the - * cloud group - */ - public void setCloudGroup(ArrayList cloudGroup) { - this.cloudGroup = cloudGroup; - } - - /** - * Method that adds the cloud group for a forecast. - * - * @param cloudGp - * the cloud group to add - */ - public void addCloudGroup(CloudGroup cloudGp) { - // TODO Enforce rules from NWSI 10-813 - // http://www.nws.noaa.gov/directives/. - // Clouds sort by height, so height is a key for performing an insertion - // sort by cloud height. - // cloudGroup.add(cloudGp); - if (cloudGroup.isEmpty()) { - cloudGroup.add(cloudGp); - } else { - if (cloudGp.getCldHgt() >= cloudGroup.get(cloudGroup.size() - 1) - .getCldHgt()) { - cloudGroup.add(cloudGp); - } else { - cloudGroup.add(cloudGroup.size() - 1, cloudGp); - } - } - } - - /** - * Method to aggregate the cloud group based on the observation. - * - * @param mr - * -- the metar record - */ - public void aggregateCloudGroup(MetarRecord mr) { - for (SkyCover sc : mr.getSkyCoverage()) { - CloudGroup cldGp = new CloudGroup(); - cldGp.setCldCat(CloudGroup.CloudCategory.valueOf(sc.getType())); - if (sc.getHeight() != null) { - cldGp.setCldHgt(sc.getHeight()); - } else { - cldGp.setCldHgt(-1); - } - if (sc.getGenus() != null) { - cldGp.setGenus(sc.getGenus()); - } - addCloudGroup(cldGp); - } - } - - /** - * Method that gets the weather group for a forecast. - * - * @return the weather group - */ - public ArrayList getWeatherGroup() { - return weatherGroup; - } - - /** - * Method that sets the weather group for a forecast. - * - * @param the - * weather group - */ - public void setWeatherGroup(ArrayList weatherGroup) { - this.weatherGroup = weatherGroup; - } - - /** - * Method that adds the weather group for a forecast. - * - * @param wxGp - * the weather group to add - */ - public void addWeatherGroup(WeatherGroup wxGp) { - // TODO Enforce rules from NWSI 10-813 - // http://www.nws.noaa.gov/directives/. - // This document contains some hints as to how to combine elements. - // weatherGroup.add(wxGp); - if (weatherGroup.isEmpty()) { - weatherGroup.add(wxGp); - } else { - if ((!(wxGp.getDescriptor().equals("TS"))) - && (!(wxGp.getDescriptor().equals("SH"))) - && (!(wxGp.getPrecipitation().equals("RA"))) - && (!(wxGp.getPrecipitation().equals("DZ"))) - && ((!(wxGp.getPrecipitation().equals("SN"))) || (((wxGp - .getPrecipitation().equals("SN"))) && ((!(wxGp - .getDescriptor().equals(""))))))) { - weatherGroup.add(wxGp); - } else if ((!weatherGroup.get(0).getDescriptor().equals("TS")) - && (!weatherGroup.get(0).getDescriptor().equals("SH")) - && (!weatherGroup.get(0).getPrecipitation().equals("RA")) - && (!weatherGroup.get(0).getPrecipitation().equals("DZ"))) { - weatherGroup.add(0, wxGp); - } else { - weatherGroup.add(1, wxGp); - } - } - } - - /** - * Method that gets the change indicator for a forecast. - * - * @return changeIndicator - */ - public ChangeIndicator getChgInd() { - return changeIndicator; - } - - /** - * Method that sets the change indicator for a forecast. - * - * @param chgInd - */ - public void setChgInd(ChangeIndicator chgInd) { - changeIndicator = chgInd; - } - - /** - * Change Indicators for forecasts - */ - public static enum ChangeIndicator { - /* From (FM) */ - /* Becoming (BECMG) */ - /* Tempo (TEMPO) */ - /* Probability (PROB) */ - FM(TafConstants.CG_FM), BECMG(TafConstants.CG_BECMG), INITIAL( - TafConstants.CG_INITIAL), TEMPO(TafConstants.CG_TEMPO), PROB( - TafConstants.CG_PROB), PROB_TEMPO(TafConstants.CG_PROB_TEMPO); - /* - * See: NWS Operations Manual W/OM12 Part D-31 for more information. - */ - - ChangeIndicator(String value) { - this.value = value; - } - - private final String value; - - public String value() { - return value; - } - } - - /** - * Method that gets the correction indicator for a forecast. - * - * @return the tafCorIndicator - */ - public String getTafCorIndicator() { - return tafCorIndicator; - } - - /** - * Method that sets the correction indicator for a forecast. - * - * @param corIndicator - * the tafCorIndicator to set - */ - public void setTafCorIndicator(String corIndicator) { - this.tafCorIndicator = corIndicator; - } - - /** - * Method that gets the amendment indicator for a forecast. - * - * @return the amdIndicator - */ - public String getAmdIndicator() { - return amdIndicator; - } - - /** - * Method that sets the amendment indicator for a forecast. - * - * @param amdIndicator - * the amdIndicator to set - */ - public void setAmdIndicator(String amdIndicator) { - this.amdIndicator = amdIndicator; - } - - /** - * Method that gets the raw data for a forecast or observation. - * - * @return the rawData - */ - public String getRawData() { - return rawData; - } - - /** - * Method that sets the raw data for a forecast or observation. - * - * @param rawData - */ - public void setRawData(String rawData) { - this.rawData = rawData; - } - - /** - * Method that gets the station identifier for a forecast. - * - * @return the station identifier - */ - public String getStationId() { - return stationId; - } - - /** - * Method that sets the station identifier for a forecast. - * - * @param stationID - */ - public void setStationId(String stationID) { - this.stationId = stationID; - } - - /** - * Method that gets the WMO header for a forecast. - * - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * Method that sets the WMO header for a forecast. - * - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * Method that gets the tool tip for a forecast. - * - * @return tool tip - */ - public String getToolTip() { - return toolTip; - } - - /** - * Method that sets the tool tip for a forecast. - * - * @param tip - * -- the tool tip - */ - public void setToolTip(String tip) { - toolTip = tip; - } - - /** - * Method that gets the probability of a forecast. - * - * @return the probability - */ - public Integer getProbability() { - return probability; - } - - /** - * Method that sets the probability of a forecast. - * - * @param probability - * the probability to set - */ - public void setProbability(Integer probability) { - this.probability = probability; - } - - /** - * Method that gets the report type for an observation. - * - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * Method that sets the report type for an observation. - * - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * Method that gets the correction indicator for an observation. - * - * @return the obsCorIndicator - */ - public String getObsCorIndicator() { - return obsCorIndicator; - } - - /** - * Method that sets the correction indicator for an observation. - * - * @param corIndicator - * the obsCorIndicator to set - */ - public void setObsCorIndicator(String corIndicator) { - this.obsCorIndicator = corIndicator; - } - - /** - * Method that gets the temperature for an observation. - * - * @return the temperature - */ - public int getTemperature() { - return temperature; - } - - /** - * Method that sets the temperature for an observation. - * - * @param temperature - * the temperature to set - */ - public void setTemperature(int temperature) { - this.temperature = temperature; - } - - /** - * Method that gets the dew point for an observation. - * - * @return the dewPoint - */ - public int getDewPoint() { - return dewPoint; - } - - /** - * Method that sets the dew point for an observation. - * - * @param dewPoint - * the dewPoint to set - */ - public void setDewPoint(int dewPoint) { - this.dewPoint = dewPoint; - } - - /** - * Method that gets the altimeter for an observation. - * - * @return the altimeter - */ - public float getAltimeter() { - return altimeter; - } - - /** - * Method that sets the altimeter for an observation. - * - * @param altimeter - * the altimeter to set - */ - public void setAltimeter(float altimeter) { - this.altimeter = altimeter; - } - - /** - * Method that gets the auto station type for an observation. - * - * @return the autoStationType - */ - public String getAutoStationType() { - return autoStationType; - } - - /** - * Method that sets the auto station type for an observation. - * - * @param autoStationType - * the autoStationType to set - */ - public void setAutoStationType(String autoStationType) { - this.autoStationType = autoStationType; - } - - /** - * Method that gets the station latitude for an observation. - * - * @return the stationLat - */ - public double getStationLat() { - return stationLat; - } - - /** - * Method that sets the station latitude for an observation. - * - * @param stationLat - * the stationLat to set - */ - public void setStationLat(double stationLat) { - this.stationLat = stationLat; - } - - /** - * Method that gets the station longitude for an observation. - * - * @return the stationLon - */ - public double getStationLon() { - return stationLon; - } - - /** - * Method that sets the station longitude for an observation. - * - * @param stationLon - * the stationLon to set - */ - public void setStationLon(double stationLon) { - this.stationLon = stationLon; - } - - /** - * Method that gets the sea level pressure for an observation. - * - * @return the seaLevelPress - */ - public float getSeaLevelPress() { - return seaLevelPress; - } - - /** - * Method that sets the sea level pressure for an observation. - * - * @param seaLevelPress - * the seaLevelPress to set - */ - public void setSeaLevelPress(float seaLevelPress) { - this.seaLevelPress = seaLevelPress; - } - - /** - * Method that gets the one hour precipitation for an observation. - * - * @return the precip1Hour - */ - public float getPrecip1Hour() { - return precip1Hour; - } - - /** - * Method that sets the one hour precipitation for an observation. - * - * @param precip1Hour - * the precip1Hour to set - */ - public void setPrecip1Hour(float precip1Hour) { - this.precip1Hour = precip1Hour; - } - - /** - * Method that gets the valid period start time. - * - * @return the validPeriodStartTime - */ - public Calendar getValidPeriodStartTime() { - return validPeriodStartTime; - } - - /** - * Method that sets the valid period start time. - * - * @param validPeriodStartTime - * the validPeriodStartTime to set - */ - public void setValidPeriodStartTime(Calendar validPeriodStartTime) { - this.validPeriodStartTime = validPeriodStartTime; - } - - /** - * Method that gets the valid period end time. - * - * @return the validPeriodEndTime - */ - public Calendar getValidPeriodEndTime() { - return validPeriodEndTime; - } - - /** - * Method that sets the valid period end time. - * - * @param validPeriodEndTime - * the validPeriodEndTime to set - */ - public void setValidPeriodEndTime(Calendar validPeriodEndTime) { - this.validPeriodEndTime = validPeriodEndTime; - } - - /** - * Method that implements comparable interface for sorting. - */ - @Override - public int compareTo(TimeGroup t) { - return startTime.compareTo(t.startTime); - } - -} \ No newline at end of file diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/WeatherGroup.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/WeatherGroup.java deleted file mode 100644 index ca051daa2c..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/model/WeatherGroup.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation.model; - -/** - * WeatherGroup class represents the weather group within the common part of a - * normalized TAF and a normalized METAR. - * - *
- * SOFTWARE HISTORY
- * Date			Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * May 30, 2008	937			grichard	Initial creation.
- * 
- * 
- * - * @author grichard - * @version 1.0 - */ - -public class WeatherGroup { - - /** The intensity proximity notation * */ - private String intensityProximity = ""; - - /** The descriptor notation * */ - private String descriptor = ""; - - /** The precipitation notation * */ - private String precipitation = ""; - - /** The obscuration notation * */ - private String obscuration = ""; - - /** The other notation * */ - private String other = ""; - - /** - * Method that gets the intensity proximity. - * - * @return the intensityProximity - */ - public String getIntensityProximity() { - return intensityProximity; - } - - /** - * Method that sets the intensity proximity. - * - * @param intensityProximity - * the intensityProximity to set - */ - public void setIntensityProximity(String intensityProximity) { - this.intensityProximity = intensityProximity; - } - - /** - * Method that gets the descriptor. - * - * @return the descriptor - */ - public String getDescriptor() { - return descriptor; - } - - /** - * Method that sets the descriptor. - * - * @param descriptor - * the descriptor to set - */ - public void setDescriptor(String descriptor) { - this.descriptor = descriptor; - } - - /** - * Method that gets the precipitation. - * - * @return the precipitation - */ - public String getPrecipitation() { - return precipitation; - } - - /** - * Method that sets the precipitation. - * - * @param precipitation - * the precipitation to set - */ - public void setPrecipitation(String precipitation) { - this.precipitation = precipitation; - } - - /** - * Method that gets the obscuration. - * - * @return the obscuration - */ - public String getObscuration() { - return obscuration; - } - - /** - * Method that sets the obscuration. - * - * @param obscuration - * the obscuration to set - */ - public void setObscuration(String obscuration) { - this.obscuration = obscuration; - } - - /** - * Method that gets the other. - * - * @return the other - */ - public String getOther() { - return other; - } - - /** - * Method that sets the other. - * - * @param other - * the other to set - */ - public void setOther(String other) { - this.other = other; - } - -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/observer/TafMonitorDlg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/observer/TafMonitorDlg.java index b8fff63b20..2250ba1112 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/observer/TafMonitorDlg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/observer/TafMonitorDlg.java @@ -53,6 +53,7 @@ import org.eclipse.ui.actions.ActionFactory; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.viz.alerts.observers.ProductAlertObserver; +import com.raytheon.viz.aviation.BackupRestart; import com.raytheon.viz.aviation.climatology.ClimateMenuDlg; import com.raytheon.viz.aviation.climatology.WeatherPlotDialog; import com.raytheon.viz.aviation.editor.ITafSettable; @@ -60,7 +61,6 @@ import com.raytheon.viz.aviation.editor.TafViewerEditorDlg; import com.raytheon.viz.aviation.editor.TafViewerEditorDlg.TafSettings; import com.raytheon.viz.aviation.guidance.PythonGuidanceJob; import com.raytheon.viz.aviation.guidance.ViewerTab; -import com.raytheon.viz.aviation.model.ForecastModel; import com.raytheon.viz.aviation.monitor.CcfpMonitorObserver; import com.raytheon.viz.aviation.monitor.CheckNowJob; import com.raytheon.viz.aviation.monitor.EtaBufMonitorObserver; @@ -146,6 +146,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 01/02/2013 15606 gzhang Remove GridData widthHint so button/label size change with GUI * 03/07/2013 1735 rferrel Performance speed up for retrieving grid data. * 08/09/2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR + * Sep 15, 2015 4880 njensen Removed reference to ForecastModel * * * @@ -509,8 +510,7 @@ public class TafMonitorDlg extends CaveSWTDialog implements restartMenuItem.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - IBackupRestart brs = ForecastModel.getInstance() - .getBackupRestartUtility(); + IBackupRestart brs = BackupRestart.getBackupRestartUtility(); brs.restartTafMonitor(); } }); diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/package-info.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/package-info.java deleted file mode 100644 index c1ea9417b3..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -/** - * Contains the classes implementing the Aviation Forecast Preparation System functionality. - */ -package com.raytheon.viz.aviation; \ No newline at end of file diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/BackupDialog.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/BackupDialog.java index 919c70a29f..4e5bf893c4 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/BackupDialog.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/BackupDialog.java @@ -36,7 +36,9 @@ import org.eclipse.swt.widgets.Layout; import org.eclipse.swt.widgets.List; import org.eclipse.swt.widgets.Shell; -import com.raytheon.viz.aviation.model.ForecastModel; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.viz.aviation.BackupRestart; import com.raytheon.viz.aviation.resource.ResourceConfigMgr; import com.raytheon.viz.avnconfig.TafSiteConfigFactory; import com.raytheon.viz.ui.dialogs.CaveSWTDialog; @@ -55,7 +57,9 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * in initializeComponents. * 10/06/2010 6009 rferrel Use product to get initial selected item. * 3/14/2011 8588 rferrel Allow selection of multiple products. - * 20121010 1229 jkorman Added DO_NOT_BLOCK so dialog does not block on open. + * 20121010 1229 jkorman Added DO_NOT_BLOCK so dialog does not block on open. + * Sep 15, 2015 4880 njensen Removed reference to ForecastModel + * * * * @author lvenable @@ -64,6 +68,9 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; */ public class BackupDialog extends CaveSWTDialog { + private static final transient IUFStatusHandler logger = UFStatus + .getHandler(BackupDialog.class); + /** * List control containing backup sites. */ @@ -83,12 +90,13 @@ public class BackupDialog extends CaveSWTDialog { * * @param parent * - Parent shell. - * @param product + * @param productDisplayList * - Current product whose sites are displayed in the monitor */ public BackupDialog(Shell parent, java.util.List productDisplayList) { super(parent, SWT.DIALOG_TRIM | SWT.RESIZE, - CAVE.PERSPECTIVE_INDEPENDENT | CAVE.MODE_INDEPENDENT | CAVE.DO_NOT_BLOCK); + CAVE.PERSPECTIVE_INDEPENDENT | CAVE.MODE_INDEPENDENT + | CAVE.DO_NOT_BLOCK); setText("AvnFPS Backup"); this.productDisplayList = productDisplayList; } @@ -214,14 +222,14 @@ public class BackupDialog extends CaveSWTDialog { } // int index = backupList.getSelectionIndex(); - IBackupRestart brs = ForecastModel.getInstance() + IBackupRestart brs = BackupRestart .getBackupRestartUtility(); try { brs.backupTafMonitor(productList, TafSiteConfigFactory .getInstance().getAllProducts()); - } catch (ConfigurationException e) { - } catch (FileNotFoundException e) { + } catch (Exception e) { + logger.error("Error loading backup configuration", e); } setReturnValue(true); shell.dispose(); diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/LoadStationConfig.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/LoadStationConfig.java deleted file mode 100644 index e3852435b4..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/utility/LoadStationConfig.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation.utility; - -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.bind.JAXB; - -import com.raytheon.uf.common.localization.IPathManager; -import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; -import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; -import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.status.IUFStatusHandler; -import com.raytheon.uf.common.status.UFStatus; -import com.raytheon.uf.common.status.UFStatus.Priority; -import com.raytheon.viz.aviation.xml.AviationStationConfig; -import com.raytheon.viz.aviation.xml.StationConfig; - -/** - * The LoadStationConfig class loads station configuration from the XML station - * configuration file. - * - *
- * SOFTWARE HISTORY
- * Date			Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * Apr 1, 2008	934			grichard	Initial creation.
- * 8/11/2008    1314        grichard    Used PathManager for pathnames.
- * Aug 9, 2013  2033        mschenke    Switched File.separator to IPathManager.SEPARATOR
- * 
- * 
- * - * @author grichard - * @version 1.0 - */ - -public class LoadStationConfig { - private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(LoadStationConfig.class); - - /** - * Configured Station Map or Taf Product Map. - */ - private final Map> stationMap = new HashMap>(); - - /** - * Configured Station List or Taf Station List. - */ - private ArrayList stationConfig = new ArrayList(); - - /** - * Get the Aviation Configuration information - */ - public Map> getStationConfig(String name) { - IPathManager pm = PathManagerFactory.getPathManager(); - - File path = pm.getFile(pm.getContext(LocalizationType.CAVE_STATIC, - LocalizationLevel.BASE), "aviation" + IPathManager.SEPARATOR - + "avnwatch" + IPathManager.SEPARATOR + name + ".xml"); - - // System.out.println(path); - - AviationStationConfig ac; - try { - ac = JAXB.unmarshal(path, AviationStationConfig.class); - } catch (Exception e) { - // VizApp.logAndAlert(Status.ERROR, e, - // "Error loading station config", - // "Error loading the station config file", Activator - // .getDefault(), Activator.PLUGIN_ID); - statusHandler.handle(Priority.PROBLEM, - "Error loading station config", e); - return null; - } - - // System.out.println(ac); - - stationConfig = ac.getStationConfig(); - String[] icao; - try { - for (int i = 0; i < stationConfig.size(); i++) { - ArrayList stationList = new ArrayList(); - if ((icao = stationConfig.get(i).getIcaosOfInterest()) != null) { - for (int j = 0; j < icao.length; ++j) { - stationList.add(icao[j]); - } - } - stationMap.put(stationConfig.get(i).getWfoSite().trim(), - stationList); - } - } catch (Exception e1) { - // Less than the full complement of ICAO IDs present. - } - - return stationMap; - } - -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationForecasterConfig.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationForecasterConfig.java index 0a7fadedb2..baccb83ff3 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationForecasterConfig.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationForecasterConfig.java @@ -26,8 +26,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * Aviation Forecaster Configuration * @@ -38,6 +36,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 2/7/2008 817 grichard Initial Creation. + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * * @@ -46,7 +45,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; */ @XmlRootElement(name = "aviationForecasterConfig") @XmlAccessorType(XmlAccessType.NONE) -public class AviationForecasterConfig implements ISerializableObject { +public class AviationForecasterConfig { /** * The aviation forecaster configuration. diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationMonitoringRules.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationMonitoringRules.java deleted file mode 100644 index 5b08ccd35c..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationMonitoringRules.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation.xml; - -import java.util.ArrayList; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import com.raytheon.uf.common.serialization.ISerializableObject; - -/** - * Aviation Monitoring Rules - * - *
- * 
- *    SOFTWARE HISTORY
- *   
- *    Date         Ticket#     Engineer    Description
- *    ------------ ----------  ----------- --------------------------
- *    3/21/2008    934         grichard    Initial Creation.
- * 
- * 
- * - * @author grichard - * @version 1.0 - */ -@XmlRootElement(name = "aviationMonitoringRules") -@XmlAccessorType(XmlAccessType.NONE) -public class AviationMonitoringRules implements ISerializableObject { - - /** - * The aviation monitoring rules - */ - @XmlElement(name = "rule") - private ArrayList monitoringRules; - - /** - * Method that gets the monitoring rules - * - * @return monitoringRules - */ - public ArrayList getRule() { - return monitoringRules; - } - - /** - * Method that sets the monitoring rules - * - * @param monitoringRules - * -- the monitoring rules - */ - public void setRule(ArrayList monitoringRules) { - this.monitoringRules = monitoringRules; - } - -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationStationConfig.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationStationConfig.java deleted file mode 100644 index 1a526c06b5..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/AviationStationConfig.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation.xml; - -import java.io.File; -import java.util.ArrayList; - -import javax.xml.bind.JAXB; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import com.raytheon.uf.common.serialization.ISerializableObject; - -/** - * Aviation Station Configuration - * - *
- * 
- *    SOFTWARE HISTORY
- *   
- *    Date         Ticket#     Engineer    Description
- *    ------------ ----------  ----------- --------------------------
- *    2/7/2008     817         grichard    Initial Creation.
- * 
- * 
- * - * @author grichard - * @version 1.0 - */ -@XmlRootElement(name = "aviationStationConfig") -@XmlAccessorType(XmlAccessType.NONE) -public class AviationStationConfig implements ISerializableObject { - - /** - * The aviation station configuration - */ - @XmlElement(name = "station") - private ArrayList stationConfig; - - /** - * Method to get the aviation station configuration - * - * @return stationConfig - */ - public ArrayList getStationConfig() { - return stationConfig; - } - - /** - * Method to set the aviation station configuration - * - * @param stationConfig - * -- the aviation station configuration - */ - public void setStationConfig(ArrayList stationConfig) { - this.stationConfig = stationConfig; - } - - /** - * Method that marshalls a sample configuration to an XML file - * - * @param argv - * -- the arguments to the main function - */ - public static void main(String[] args) { - AviationStationConfig ac = new AviationStationConfig(); - StationConfig sc = new StationConfig(); - sc.setWfoSite("KOAX"); - String[] icaos = { "KLNK", "KOFK", "KOMA" }; - sc.setIcaosOfInterest(icaos); - ArrayList arr = new ArrayList(); - arr.add(sc); - ac.setStationConfig(arr); - - try { - JAXB.marshal(ac, - "/home/grichard/workspace/build/static/common/cave" - + File.separatorChar + "etc" + File.separatorChar - + "aviation" + File.separatorChar + "avnwatch" - + File.separatorChar + "myXML" + ".xml"); - } catch (RuntimeException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateDataFTPArgs.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateDataFTPArgs.java index 7afc542126..551a145130 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateDataFTPArgs.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateDataFTPArgs.java @@ -24,8 +24,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * Contains static information used to generate the Climate Data FTP scripts. * @@ -36,6 +34,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jan 19, 2011 #4864 rferrel Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * * @@ -44,7 +43,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; */ @XmlRootElement(name = "ClimateDataFTPArgs") @XmlAccessorType(XmlAccessType.NONE) -public class ClimateDataFTPArgs implements ISerializableObject { +public class ClimateDataFTPArgs { @XmlElement(name = "Site") private String site; diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateTimeouts.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateTimeouts.java index 21e7d32ea2..9b6e1bcc9f 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateTimeouts.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ClimateTimeouts.java @@ -24,8 +24,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * Contains static information used by the Climate Menu Dialogs. * @@ -36,6 +34,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 1, 2011 8896 rferrel Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * * @@ -44,7 +43,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; */ @XmlRootElement(name = "ClimateTimeouts") @XmlAccessorType(XmlAccessType.NONE) -public class ClimateTimeouts implements ISerializableObject { +public class ClimateTimeouts { @XmlElement(name = "ClimateMetarTimeout") private int climateMetarTimeout; diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/LabelMenu.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/LabelMenu.java index f22edf5c09..6e73984538 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/LabelMenu.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/LabelMenu.java @@ -23,8 +23,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * * This class contains the label menu information. @@ -35,68 +33,69 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 7, 2009 2537 lvenable Initial creation + * Aug 7, 2009 2537 lvenable Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * - * + * * @author lvenable * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) -public class LabelMenu implements ISerializableObject -{ +public class LabelMenu { /** * Menu name. */ @XmlAttribute(name = "menuName") private String menuName; - + /** * Value. */ @XmlAttribute(name = "value") private String value; - + /** * Constructor. */ - public LabelMenu() - { + public LabelMenu() { } /** * Get the menu name. + * * @return The menu name. */ - public String getMenuName() - { + public String getMenuName() { return menuName; } /** * Set the menu name. - * @param menuName The menu name. + * + * @param menuName + * The menu name. */ - public void setMenuName(String menuName) - { + public void setMenuName(String menuName) { this.menuName = menuName; } /** * Get the value. + * * @return The value. */ - public String getValue() - { + public String getValue() { return value; } /** * Set the value. - * @param value The value. + * + * @param value + * The value. */ - public void setValue(String value) - { + public void setValue(String value) { this.value = value; } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorArgs.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorArgs.java index 1fcb1dd4a3..681ede042c 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorArgs.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorArgs.java @@ -23,8 +23,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * This class contains the option arguments for the monitor. * @@ -34,68 +32,69 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 7, 2009 2537 lvenable Initial creation + * Aug 7, 2009 2537 lvenable Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * - * + * * @author lvenable * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) -public class MonitorArgs implements ISerializableObject -{ +public class MonitorArgs { /** * Argument name. */ @XmlAttribute(name = "name") private String name; - + /** * Argument value. */ @XmlAttribute(name = "value") private String value; - + /** * Constructor. */ - public MonitorArgs() - { + public MonitorArgs() { } /** * Get the argument name. + * * @return The argument name. */ - public String getName() - { + public String getName() { return name; } /** * Set the argument name. - * @param name The argument name. + * + * @param name + * The argument name. */ - public void setName(String name) - { + public void setName(String name) { this.name = name; } /** * Get the argument value. + * * @return The argument value. */ - public String getValue() - { + public String getValue() { return value; } /** * Set the argument value. - * @param value The argument value. + * + * @param value + * The argument value. */ - public void setValue(String value) - { + public void setValue(String value) { this.value = value; } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorCfg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorCfg.java index 3e6a3a8705..f3cbd9fb37 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorCfg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitorCfg.java @@ -27,8 +27,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * Class contains information for the TAF monitor. * @@ -38,116 +36,119 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 7, 2009 2537 lvenable Initial creation + * Aug 7, 2009 2537 lvenable Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * - * + * * @author lvenable * @version 1.0 */ @XmlRootElement(name = "Monitor") @XmlAccessorType(XmlAccessType.NONE) -public class MonitorCfg implements ISerializableObject -{ +public class MonitorCfg { /** * Name for the label. */ @XmlElement(name = "LabelName") private String labelName; - + /** * Package and class name of the object to be created. */ @XmlElement(name = "ClassName") private String className; - + /** * A single string containing a comma separated list of monitor labels. */ @XmlElement(name = "MonitorLabels") private String monitorLabels; - + /** * A single string containing a comma separated list of monitor items. */ @XmlElement(name = "MonitorItems") private String monitorItems; - + /** - * Array of label menus. Used for pop-up menus. + * Array of label menus. Used for pop-up menus. */ - @XmlElements( { @XmlElement(name = "LabelMenu", type = LabelMenu.class) }) + @XmlElements({ @XmlElement(name = "LabelMenu", type = LabelMenu.class) }) private ArrayList labelMenus; - + /** * Array of additional arguments that may be needed. */ - @XmlElements( { @XmlElement(name = "Args", type = MonitorArgs.class) }) + @XmlElements({ @XmlElement(name = "Args", type = MonitorArgs.class) }) private ArrayList argsArray; - + /** * Constructor. */ - public MonitorCfg() - { + public MonitorCfg() { } /** * Get the label name. + * * @return The label name. */ - public String getLabelName() - { + public String getLabelName() { return labelName; } /** * Set the label name. - * @param labelName The label name. + * + * @param labelName + * The label name. */ - public void setLabelName(String labelName) - { + public void setLabelName(String labelName) { this.labelName = labelName; } /** * Get the class name. + * * @return The class name. */ - public String getClassName() - { + public String getClassName() { return className; } /** * Set the class name. - * @param className The class name. + * + * @param className + * The class name. */ - public void setClassName(String className) - { + public void setClassName(String className) { this.className = className; } /** * Get the monitor labels. + * * @return The monitor labels. */ - public String getMonitorLabels() - { + public String getMonitorLabels() { return monitorLabels; } /** * Set the monitor labels. - * @param monitorLabels The monitor labels. + * + * @param monitorLabels + * The monitor labels. */ - public void setMonitorLabels(String monitorLabels) - { + public void setMonitorLabels(String monitorLabels) { this.monitorLabels = monitorLabels; } /** * Get the monitor items. + * * @return The monitor items. */ public String getMonitorItems() { @@ -156,7 +157,9 @@ public class MonitorCfg implements ISerializableObject /** * Set the monitor items. - * @param monitorItems The monitor items. + * + * @param monitorItems + * The monitor items. */ public void setMonitorItems(String monitorItems) { this.monitorItems = monitorItems; @@ -164,53 +167,51 @@ public class MonitorCfg implements ISerializableObject /** * Get an array of arguments (arguments are optional). + * * @return An array of arguments. */ - public ArrayList getArgsArray() - { - for (MonitorArgs mArgs : argsArray) - { - if (mArgs.getName() == null && mArgs.getValue() == null) - { + public ArrayList getArgsArray() { + for (MonitorArgs mArgs : argsArray) { + if (mArgs.getName() == null && mArgs.getValue() == null) { return null; } } - + return argsArray; } /** * Set the array of arguments. - * @param argsArray Array of arguments. + * + * @param argsArray + * Array of arguments. */ - public void setArgsArray(ArrayList argsArray) - { + public void setArgsArray(ArrayList argsArray) { this.argsArray = argsArray; } /** * Get the label menus (label menus are optional). + * * @return An array of label menus. */ - public ArrayList getLabelMenus() - { - for (LabelMenu lm : labelMenus) - { - if (lm.getMenuName() == null && lm.getValue() == null) - { + public ArrayList getLabelMenus() { + for (LabelMenu lm : labelMenus) { + if (lm.getMenuName() == null && lm.getValue() == null) { return null; } } - + return labelMenus; } /** * Set the label menus. - * @param labelMenus An array of label menus. + * + * @param labelMenus + * An array of label menus. */ - public void setLabelMenus(ArrayList labelMenus) - { + public void setLabelMenus(ArrayList labelMenus) { this.labelMenus = labelMenus; } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitoringRule.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitoringRule.java deleted file mode 100644 index 0afb297445..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/MonitoringRule.java +++ /dev/null @@ -1,261 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation.xml; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -/** - * MonitoringRule class. - * - *
- * 
- *    SOFTWARE HISTORY
- *   
- *    Date         Ticket#     Engineer    Description
- *    ------------ ----------  ----------- --------------------------
- *    3/21/2008    934         grichard    Initial Creation.
- * 
- * 
- * - * @author grichard - * @version 1.0 - */ -@XmlAccessorType(XmlAccessType.NONE) -public class MonitoringRule { - - /** - * The verbose name of the method to be applied based on configurable rules. - */ - @XmlElement - private String verboseMethod; - - /** - * Severity is the index of the severity color which will be associated with - * this rule. - */ - @XmlElement - private int severity; - - /** - * Message is a brief message that will be displayed in the TAF Monitor when - * the monitoring rule is triggered. Message, if set, is the text displayed - * in the popup window, when the rule evaluates to "True." If message is an - * empty string, it will be generated by the software. - */ - @XmlElement - private String msg; - - /** - * Unique is a toggle which determines whether the TAF Monitor will show two - * or more alerts of this type or limit its display to the most severe of - * the alerts. This feature is useful for rules that key on category - * differences. If one rule describes a difference of three categories as - * red while another rule describes a difference of two categories as - * yellow, situations that satisfy the red rule will always satisfy the - * yellow rule as well. If the Unique toggle is off, both rules will display - * in the TAF Monitor. If the Unique toggle is on, only the red rule will - * display. - */ - @XmlElement - private String unique; - - /** - * Type is the name of the weather element which is monitored by this rule. - * With each type there is an associated label in the monitoring GUI. This - * is set in the configuration file etc/gui.cfg. If a rule is used, its type - * must be listed on the items line. - */ - @XmlElement - private String type; - - /** - * The kind of method to be applied based on configurable rules. - */ - @XmlElement - private String method; - - /** - * Args is an array of String arguments for the monitoring rule. - */ - @XmlElement(name = "arg") - @XmlElementWrapper(name = "args") - private String[] args; - - /** - * Default Constructor - */ - public MonitoringRule() { - } - - /** - * Copy Constructor - * - * @param rule - */ - public MonitoringRule(MonitoringRule rule) { - this.severity = rule.getSeverity(); - this.msg = rule.getMsg(); - this.unique = rule.getUnique(); - this.type = rule.getType(); - this.method = rule.getMethod(); - this.args = rule.getArgs(); - } - - /** - * Getters and Setters - */ - - /** - * Method that gets the verbose method - * - * @return the verboseMethod - */ - public String getVerboseMethod() { - return verboseMethod; - } - - /** - * Method that sets the verbose method - * - * @param verboseMethod - * the verboseMethod to set - */ - public void setVerboseMethod(String verboseMethod) { - this.verboseMethod = verboseMethod; - } - - /** - * Method that gets the severity - * - * @return the severity - */ - public int getSeverity() { - return severity; - } - - /** - * Method that sets the severity - * - * @param severity - * the severity to set - */ - public void setSeverity(int severity) { - this.severity = severity; - } - - /** - * Method that gets the message - * - * @return the msg - */ - public String getMsg() { - return msg; - } - - /** - * Method that sets the message - * - * @param msg - * the msg to set - */ - public void setMsg(String msg) { - this.msg = msg; - } - - /** - * Method that gets the unique setting - * - * @return the unique - */ - public String getUnique() { - return unique; - } - - /** - * Method that sets the unique setting - * - * @param unique - * the unique to set - */ - public void setUnique(String unique) { - this.unique = unique; - } - - /** - * Method that gets the type - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Method that sets the type - * - * @param type - * the type to set - */ - public void setType(String type) { - this.type = type; - } - - /** - * Method that gets the method - * - * @return the method - */ - public String getMethod() { - return method; - } - - /** - * Method that sets the method - * - * @param method - * the method to set - */ - public void setMethod(String method) { - this.method = method; - } - - /** - * Method that gets the arguments - * - * @return the args - */ - public String[] getArgs() { - return args; - } - - /** - * Method that sets the arguments - * - * @param args - * the args to set - */ - public void setArgs(String[] args) { - this.args = args; - } - -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/PlotViewerCfg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/PlotViewerCfg.java index 8f5ed1129c..c972229cda 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/PlotViewerCfg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/PlotViewerCfg.java @@ -23,8 +23,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * * Contains information for the initializing the plot viewer check box controls. @@ -35,8 +33,9 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 11, 2009 lvenable Initial creation - * Nov 18, 2010 6701 rferrel Created enum of valid class names. + * Aug 11, 2009 lvenable Initial creation + * Nov 18, 2010 6701 rferrel Created enum of valid class names. + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * * @@ -44,7 +43,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) -public class PlotViewerCfg implements ISerializableObject { +public class PlotViewerCfg { /** * The Xml configuration ClassName's tags valid values. diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/StationConfig.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/StationConfig.java deleted file mode 100644 index 41ddb4b806..0000000000 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/StationConfig.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.viz.aviation.xml; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; - -/** - * StationConfig class. - * - *
- *   
- *    SOFTWARE HISTORY
- *   
- *    Date         Ticket#     Engineer    Description
- *    ------------ ----------  ----------- --------------------------
- *    2/5/2008     817         grichard    Initial Creation.
- *   
- * 
- * - * @author grichard - * @version 1.0 - */ -@XmlAccessorType(XmlAccessType.NONE) -public class StationConfig { - - /** - * The Weather Forecast Office. - */ - @XmlElement - private String wfoSite; - - /** - * The International Civil Aviation Organizations of interest. - */ - @XmlElement(name = "icaoOfInterest") - @XmlElementWrapper(name = "icaosOfInterest") - private String[] icaosOfInterest; - - /** - * Getters and Setters - */ - - /** - * Method that gets the WFO site. - * - * @return the wfoSite - */ - public String getWfoSite() { - return wfoSite; - } - - /** - * Method that sets the WFO site. - * - * @param wfoSite - * the wfoSite to set - */ - public void setWfoSite(String wfoSite) { - this.wfoSite = wfoSite; - } - - /** - * Method that gets the ICAOs of interest. - * - * @return the icaosOfInterest - */ - public String[] getIcaosOfInterest() { - return icaosOfInterest; - } - - /** - * Method that sets the ICAOs of interest. - * - * @param icaosOfInterest - * the icaosOfInterest to set - */ - public void setIcaosOfInterest(String[] icaosOfInterest) { - this.icaosOfInterest = icaosOfInterest; - } - -} diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafMonitorCfg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafMonitorCfg.java index 877e2b1643..8ca535c487 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafMonitorCfg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafMonitorCfg.java @@ -29,8 +29,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * * The class contains the TAF monitor configuration data. @@ -41,8 +39,9 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 7, 2009 2537 lvenable Initial creation - * Oct 11, 2011 11239 rferrel Added unmarshal method. + * Aug 07, 2009 2537 lvenable Initial creation + * Oct 11, 2011 11239 rferrel Added unmarshal method. + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * * @@ -51,7 +50,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; */ @XmlRootElement(name = "TafMonitorConfig") @XmlAccessorType(XmlAccessType.NONE) -public class TafMonitorCfg implements ISerializableObject { +public class TafMonitorCfg { /** * Array of monitor configuration data. */ diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafViewerEditorConfig.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafViewerEditorConfig.java index 4dfd2321ba..a98c2cfc14 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafViewerEditorConfig.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/TafViewerEditorConfig.java @@ -27,8 +27,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * * Class containing code for the Array of ViewerTabConfig data read in from XML. @@ -39,45 +37,45 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 3, 2009 lvenable Initial creation + * Aug 3, 2009 lvenable Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * - * + * * @author lvenable * @version 1.0 */ @XmlRootElement(name = "TafViewerEditorConfig") @XmlAccessorType(XmlAccessType.NONE) -public class TafViewerEditorConfig implements ISerializableObject -{ +public class TafViewerEditorConfig { /** * Array of ViewerTabConfig data. */ - @XmlElements( { @XmlElement(name = "ViewerTabConfig", type = ViewerTabConfig.class) }) + @XmlElements({ @XmlElement(name = "ViewerTabConfig", type = ViewerTabConfig.class) }) private ArrayList viewerTabs; - + /** * Constructor. */ - public TafViewerEditorConfig() - { + public TafViewerEditorConfig() { } /** * Get the viewer tab configuration data. + * * @return Return an array of ViewerTabConfig data. */ - public ArrayList getViewerTabs() - { + public ArrayList getViewerTabs() { return viewerTabs; } /** * Set the viewer tab configuration data array. - * @param viewerTabs An array of ViewerTabConfig data. + * + * @param viewerTabs + * An array of ViewerTabConfig data. */ - public void setViewerTabs(ArrayList viewerTabs) - { + public void setViewerTabs(ArrayList viewerTabs) { this.viewerTabs = viewerTabs; } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ViewerTabConfig.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ViewerTabConfig.java index 6be85b5772..9f2f54677d 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ViewerTabConfig.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/ViewerTabConfig.java @@ -23,8 +23,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * * Class containing configuration data for a viewer tab (read in from XML). @@ -35,92 +33,94 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 3, 2009 lvenable Initial creation + * Aug 3, 2009 lvenable Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * - * + * * @author lvenable * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) -public class ViewerTabConfig implements ISerializableObject -{ +public class ViewerTabConfig { /** * Label name. */ @XmlElement(name = "LabelName") private String labelName; - + /** * Name of the class to be instantiated. */ @XmlElement(name = "ClassName") private String className; - + /** * Name of the model. */ @XmlElement(name = "ModelName") private String modelName; - + /** * Constructor. */ - public ViewerTabConfig() - { + public ViewerTabConfig() { } /** * Get the label name. + * * @return The label name. */ - public String getLabelName() - { + public String getLabelName() { return labelName; } /** * Set the label name. - * @param labelName The label name. + * + * @param labelName + * The label name. */ - public void setLabelName(String labelName) - { + public void setLabelName(String labelName) { this.labelName = labelName; } /** * Get the class name; + * * @return The class name; */ - public String getClassName() - { + public String getClassName() { return className; } /** * Set the class name. - * @param className The class name. + * + * @param className + * The class name. */ - public void setClassName(String className) - { + public void setClassName(String className) { this.className = className; } /** * Get the model name. + * * @return The model name. */ - public String getModelName() - { + public String getModelName() { return modelName; } /** * Set the model name. - * @param modelName The model name. + * + * @param modelName + * The model name. */ - public void setModelName(String modelName) - { + public void setModelName(String modelName) { this.modelName = modelName; } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/WxPlotCfg.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/WxPlotCfg.java index 0501d15431..e1127b92ce 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/WxPlotCfg.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/xml/WxPlotCfg.java @@ -27,8 +27,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * * Contains information for the initializing the plot viewer. @@ -39,7 +37,8 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Aug 11, 2009 lvenable Initial creation + * Aug 11, 2009 lvenable Initial creation + * Sep 15, 2015 4880 njensen Removed ISerializableObject * * * @@ -48,7 +47,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; */ @XmlRootElement(name = "WxPlotConfig") @XmlAccessorType(XmlAccessType.NONE) -public class WxPlotCfg implements ISerializableObject { +public class WxPlotCfg { /** * Number of hours back from current time. */ diff --git a/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF index db40dd7415..5f30f67ae6 100644 --- a/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Avnconfig Plug-in Bundle-SymbolicName: com.raytheon.viz.avnconfig;singleton:=true -Bundle-Version: 1.12.1174.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.avnconfig.Activator Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.ui,