From d6fbc362a014e981e612f0918db4123f09782fe5 Mon Sep 17 00:00:00 2001 From: "Brian.Dyke" Date: Thu, 24 Apr 2014 13:01:50 -0400 Subject: [PATCH] Merged 13.5.5 -2 and -3 into 1412 Former-commit-id: b8877334969122b92235a367e6e9fe54d02b8049 [formerly 81d39113fe32cebbb42068cc266e4b71a1b3fc97] [formerly eff27f55049855e85c33ff6417761d483ddc9c56] [formerly eff27f55049855e85c33ff6417761d483ddc9c56 [formerly a19f01c6205bf4f52d7ae91b19de1f16669f9802]] [formerly e82fc8f89c5fdc4710c69accee490c1c629ff358 [formerly eff27f55049855e85c33ff6417761d483ddc9c56 [formerly a19f01c6205bf4f52d7ae91b19de1f16669f9802] [formerly e82fc8f89c5fdc4710c69accee490c1c629ff358 [formerly 4e921dbeab89e61635144b441ae0015155376c59]]]] Former-commit-id: e82fc8f89c5fdc4710c69accee490c1c629ff358 Former-commit-id: a94bde642e773797f661f239d22ee6b96fd6269a [formerly 57b2a8a44845dea3266c201818f90765ddf026ee] [formerly af2d8f5bad23a29b3689faa042b19ceb0c3a94a1 [formerly df6f06bef569894181b5fffb975f2b107f6e66d8]] Former-commit-id: af2d8f5bad23a29b3689faa042b19ceb0c3a94a1 Former-commit-id: f1ebebbac1ac194e563f9b39986f5e30a2412249 --- .../ghg/config/DefaultGHGMonitorConfig.xml | 38 +-- .../cachedata/CacheGuidanceRequest.java | 10 + .../cachedata/PythonCacheGuidanceJob.java | 157 +++++------ .../viz/aviation/editor/HeaderTextComp.java | 32 ++- .../aviation/editor/TafViewerEditorDlg.java | 252 ++++++++++-------- .../aviation/guidance/GuidanceRequest.java | 14 + .../viz/aviation/guidance/MetarViewer.java | 25 +- .../viz/aviation/guidance/ViewerTab.java | 27 +- .../viz/ghg/monitor/GhgDisplayManager.java | 22 +- .../viz/ghg/monitor/GhgFilterDlg.java | 17 +- .../viz/ghg/monitor/GhgMonitorDlg.java | 45 ++-- .../viz/ghg/monitor/config/GhgConfigXml.java | 18 ++ .../viz/ghg/monitor/data/GhgConfigData.java | 188 +++++++------ .../viz/ghg/monitor/data/GhgTableRowData.java | 5 +- .../ghg/monitor/filter/GhgFilterEngine.java | 7 +- .../viz/ui/statusline/StatusStore.java | 32 ++- .../ui/statusline/UrgentMessagesDialog.java | 26 ++ .../raytheon/viz/warngen/gis/PolygonUtil.java | 149 +++++++++-- .../viz/warngen/gui/WarngenLayer.java | 99 ++++--- .../viz/warnings/rsc/WarningsResource.java | 14 + .../base/config/gfe/serverConfig.py | 5 +- .../gfe/server/database/D2DGridDatabase.java | 93 +------ .../base/grid/parameterInfo/TPCSurgeProb.xml | 209 +++++++-------- .../uf/common/dataplugin/qc/QCRecord.java | 2 +- 24 files changed, 821 insertions(+), 665 deletions(-) diff --git a/cave/build/static/common/cave/etc/ghg/config/DefaultGHGMonitorConfig.xml b/cave/build/static/common/cave/etc/ghg/config/DefaultGHGMonitorConfig.xml index ed5785b176..985a35b045 100644 --- a/cave/build/static/common/cave/etc/ghg/config/DefaultGHGMonitorConfig.xml +++ b/cave/build/static/common/cave/etc/ghg/config/DefaultGHGMonitorConfig.xml @@ -68,11 +68,6 @@ EXT EXA EXB - SV.W - TO.W - SVR - SVS - TOR SMALL_FONT @@ -92,38 +87,6 @@ EXB EXT - - - filter-1 - - false - filter-1 - true - true - false - false - true - true - false - false - - - - filter-2 - - true - filter-2 - false - false - true - true - true - true - false - false - - - ACTION ETN PHEN_SIG @@ -136,4 +99,5 @@ PURGE false + true \ No newline at end of file diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/CacheGuidanceRequest.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/CacheGuidanceRequest.java index 0f605f729d..066c711967 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/CacheGuidanceRequest.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/CacheGuidanceRequest.java @@ -34,6 +34,7 @@ import com.raytheon.viz.aviation.guidance.GuidanceRequest; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 20, 2011 8065 rferrel Initial creation + * 09Apr2014 #3005 lvenable Added hashcode method. * * * @@ -76,4 +77,13 @@ public class CacheGuidanceRequest extends GuidanceRequest { } return false; } + + @Override + public int hashCode() { + int result = super.hashCode(); + final int prime = 31; + result = (prime * result) + ((siteID == null) ? 0 : siteID.hashCode()); + return result; + } + } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/PythonCacheGuidanceJob.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/PythonCacheGuidanceJob.java index 7e906888b8..bf632a6214 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/PythonCacheGuidanceJob.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/cachedata/PythonCacheGuidanceJob.java @@ -22,8 +22,11 @@ package com.raytheon.viz.aviation.cachedata; import java.io.File; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; import jep.JepException; @@ -56,6 +59,10 @@ import com.raytheon.viz.aviation.monitor.AvnPyUtil; * adding dispose listener when not on the * UI thread. * Aug 26, 2013 #2283 lvenable Cleaned up some synchronized code. + * 09Apr2014 #3005 lvenable Remove waitMonitor, replaced waitList array with a Set, + * updated queueList to be a LinkedHashSet, added a catch + * to capture a throwable to prevent the thread from dying + * prematurely. * * * @@ -90,17 +97,12 @@ public class PythonCacheGuidanceJob extends /** * Current executing thread or null if none pending. */ - private CacheGuidanceRequest request = null; + private volatile CacheGuidanceRequest request = null; /** - * List of requests whose results are waiting to be cached. + * Set of requests whose results are waiting to be cached. */ - private List waitList; - - /** - * Object to synchronize threads waiting on requests. - */ - private Object waitMonitor; + private Set waitSet; /** * Object to synchronize suspending/restarting the instance of this class. @@ -146,10 +148,9 @@ public class PythonCacheGuidanceJob extends private PythonCacheGuidanceJob(String name) { super(name); siteObjMaps = new HashMap>(); - waitMonitor = new Object(); suspendMonitor = new Object(); suspendJob = false; - waitList = new ArrayList(); + waitSet = new HashSet(); } /** @@ -202,9 +203,9 @@ public class PythonCacheGuidanceJob extends * @param req */ private void waitAdd(CacheGuidanceRequest req) { - synchronized (waitMonitor) { - if (waitList.contains(req) == false) { - waitList.add(req); + synchronized (waitSet) { + if (waitSet.contains(req) == false) { + waitSet.add(req); } } } @@ -215,9 +216,9 @@ public class PythonCacheGuidanceJob extends * @param req */ private void waitRemove(CacheGuidanceRequest req) { - synchronized (waitMonitor) { - waitList.remove(req); - waitMonitor.notify(); + synchronized (waitSet) { + waitSet.remove(req); + waitSet.notifyAll(); } } @@ -229,31 +230,21 @@ public class PythonCacheGuidanceJob extends */ private synchronized void addToQueue( List cacheRequests) { - ArrayList queueList = new ArrayList(); + + Set queueSet = new LinkedHashSet( + cacheRequests); + for (CacheGuidanceRequest req : cacheRequests) { waitAdd(req); } - // Get pending request to add after the cacheRequests. - while (queue.peek() != null) { - CacheGuidanceRequest qReq = queue.poll(); - if (cacheRequests.contains(qReq) == false) { - queueList.add(qReq); - } + queue.drainTo(queueSet); + + if (request != null) { + queueSet.remove(request); } - // Add cache request to head of the queue unless it is the current - // request. - for (CacheGuidanceRequest req : cacheRequests) { - if (req.equals(request) == false) { - queue.add(req); - } - } - - // Queue other pending requests. - for (CacheGuidanceRequest qReq : queueList) { - queue.add(qReq); - } + queue.addAll(queueSet); } /** @@ -266,15 +257,15 @@ public class PythonCacheGuidanceJob extends addToQueue(cacheRequests); try { for (CacheGuidanceRequest req : cacheRequests) { - synchronized (waitMonitor) { - while (waitList.contains(req)) { - waitMonitor.wait(); - // Notify another waiting thread. - waitMonitor.notify(); + synchronized (waitSet) { + while (waitSet.contains(req)) { + waitSet.wait(); } } } } catch (InterruptedException e) { + statusHandler.handle(Priority.PROBLEM, + "Error occurred when requested were being cached...", e); } } @@ -368,60 +359,60 @@ public class PythonCacheGuidanceJob extends } try { while (shutdown == false) { - if (suspendJob == true) { - synchronized (suspendMonitor) { - queue.clear(); - siteObjMaps.clear(); - suspendMonitor.wait(); - } - continue; - } - if (queue.peek() != null) { - request = queue.poll(); - Map args = request.getPythonArguments(); - String methodName = request.getGuidanceType() - .getPythonMethod() + "Retrieve"; - try { - // long t0 = System.currentTimeMillis(); - String result = (String) python.execute(methodName, - args); - // long t1 = System.currentTimeMillis(); - String siteID = request.getSiteID(); - String tag = request.getTag(); - setSiteObj(siteID, tag, result); - // System.out.println("Python cache guidance time: " - // + (t1 - t0) + ", " + siteID + " - " + tag); - waitRemove(request); - } catch (JepException e) { - if (e.getMessage().contains("NoDataException")) { - String msg = e.getMessage().split("'")[3]; - statusHandler.handle(Priority.PROBLEM, msg, e); - } else { - statusHandler.handle(Priority.PROBLEM, - "Error generating guidance", e); + + try { + if (suspendJob == true) { + synchronized (suspendMonitor) { + queue.clear(); + siteObjMaps.clear(); + suspendMonitor.wait(); } - } finally { - request = null; + continue; } - } else { - try { - Thread.sleep(20); - } catch (InterruptedException e) { - break; + if (queue.peek() != null) { + request = queue.poll(); + Map args = request.getPythonArguments(); + String methodName = request.getGuidanceType() + .getPythonMethod() + "Retrieve"; + try { + String result = (String) python.execute(methodName, + args); + String siteID = request.getSiteID(); + String tag = request.getTag(); + setSiteObj(siteID, tag, result); + waitRemove(request); + } catch (JepException e) { + if (e.getMessage().contains("NoDataException")) { + String msg = e.getMessage().split("'")[3]; + statusHandler.handle(Priority.PROBLEM, msg, e); + } else { + statusHandler.handle(Priority.PROBLEM, + "Error generating guidance", e); + } + } finally { + request = null; + } + } else { + try { + Thread.sleep(20); + } catch (InterruptedException e) { + break; + } } + } catch (Throwable t) { + statusHandler.handle(Priority.PROBLEM, + "Error generating guidance", t); } } - } catch (InterruptedException e) { - // Just go away } finally { siteObjMaps.clear(); if (python != null) { python.dispose(); python = null; } - synchronized (waitMonitor) { - waitList.clear(); - waitMonitor.notify(); + synchronized (waitSet) { + waitSet.clear(); + waitSet.notifyAll(); } } return Status.OK_STATUS; diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/HeaderTextComp.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/HeaderTextComp.java index 7fe38d68bd..b6b5f7e1f7 100755 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/HeaderTextComp.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/editor/HeaderTextComp.java @@ -56,7 +56,9 @@ import com.raytheon.viz.aviation.resource.ResourceConfigMgr.ResourceTag; * 12/01/2010 3263 rferrel Added mouse track listener in order to * display tool tip in dataStTxt. * 12/09/2010 7380 rferrel Remove no longer needed constructor and now - * adjust both hight and width of text filed. + * adjust both height and width of text filed. + * 09Apr2014 #3005 lvenable Added methods to clear the header and data text controls or + * mark then as updating. Removed unused methods. * * * @@ -319,13 +321,19 @@ public class HeaderTextComp extends Composite { } /** - * Method that sets the header styled text edit area. - * - * @param headerStTxt - * the headerStTxt to set + * Clear the header text and data text controls. */ - public void setHeaderStTxt(StyledText headerStTxt) { - this.headerStTxt = headerStTxt; + public void clearTextControls() { + headerStTxt.setText(""); + dataStTxt.setText(""); + } + + /** + * Set the header text and data text controls to display "updating...". + */ + public void markTextAsUpdating() { + headerStTxt.setText("updating..."); + dataStTxt.setText("updating..."); } /** @@ -336,14 +344,4 @@ public class HeaderTextComp extends Composite { public StyledText getDataStTxt() { return dataStTxt; } - - /** - * Method that sets the data styled text edit area. - * - * @param dataStTxt - * the dataStTxt to set - */ - public void setDataStTxt(StyledText dataStTxt) { - this.dataStTxt = dataStTxt; - } } 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 b1e55b751d..6b392a2826 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 @@ -229,6 +229,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 10/24/2013 16478 zhao add syntax check for extra '=' sign * 02/12/2014 17076 lvenable Mark guidance tabs as not current so they get refreshed * 02/19/2014 16980 zhao add code to ensure the Alt flag is false after the Alt kay is released + * 09Apr2014 #3005 lvenable Added calls to mark the tabs as not current when the tabs are changed. + * This will show the tab as updating in the header and data text controls. * * * @@ -775,19 +777,19 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, } } + /** + * Mark the tabs as not current so they get refreshed. + */ + private void markTabsAsNotCurrent() { + for (TabItem tbi : guidanceViewerFolder.getItems()) { + if (tbi.getControl() instanceof ViewerTab) { + ((ViewerTab) tbi.getControl()).setDisplayCurrent(false); + ((ViewerTab) tbi.getControl()).markTextAsUpdating(); + } + } + } - /** - * Mark the tabs as not current so they get refreshed. - */ - private void markTabsAsNotCurrent() { - for (TabItem tbi : guidanceViewerFolder.getItems()) { - if (tbi.getControl() instanceof ViewerTab) { - ((ViewerTab) tbi.getControl()).setDisplayCurrent(false); - } - } - } - - @Override + @Override public void clearAll() { if (shell == null) { return; @@ -1093,7 +1095,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, fileMenuItem.setMenu(fileMenu); fileMenu.addListener(SWT.Show, new Listener() { public void handleEvent(Event event) { - setAltFlagForEditorTafTabComp(); + setAltFlagForEditorTafTabComp(); } }); @@ -1204,7 +1206,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, optionsMenuItem.setMenu(optionsMenu); optionsMenu.addListener(SWT.Show, new Listener() { public void handleEvent(Event event) { - setAltFlagForEditorTafTabComp(); + setAltFlagForEditorTafTabComp(); } }); @@ -1283,10 +1285,10 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, editMenuItem.setMenu(editMenu); editMenu.addListener(SWT.Show, new Listener() { public void handleEvent(Event event) { - setAltFlagForEditorTafTabComp(); + setAltFlagForEditorTafTabComp(); } }); - + // ------------------------------------------------- // Create all the items in the Edit dropdown menu // ------------------------------------------------- @@ -1360,19 +1362,18 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, } }); } - + /** - * When respectively using alt+'f', alt+'e', alt+'o' and alt+'h' - * to open/display menus 'File', 'Edit', 'Options' and 'Help', - * the alt flag of the editorTafTabComp object is set to true; - * it needs to be re-set to false - * (DR16980) + * When respectively using alt+'f', alt+'e', alt+'o' and alt+'h' to + * open/display menus 'File', 'Edit', 'Options' and 'Help', the alt flag of + * the editorTafTabComp object is set to true; it needs to be re-set to + * false (DR16980) */ - private void setAltFlagForEditorTafTabComp() { - if ( editorTafTabComp.getAlt() ) { - editorTafTabComp.setAlt(false); - } - } + private void setAltFlagForEditorTafTabComp() { + if (editorTafTabComp.getAlt()) { + editorTafTabComp.setAlt(false); + } + } /** * Create the Help menu. @@ -1392,7 +1393,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, helpMenuItem.setMenu(helpMenu); helpMenu.addListener(SWT.Show, new Listener() { public void handleEvent(Event event) { - setAltFlagForEditorTafTabComp(); + setAltFlagForEditorTafTabComp(); } }); @@ -1903,8 +1904,11 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, String bbb = editorTafTabComp.getBBB(); String type; - if (ti.getText().equals(tabFillText) || editorTafTabComp.getTextEditorControl().getText().trim().length() == 0) { - MessageBox questionMB = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK ); + if (ti.getText().equals(tabFillText) + || editorTafTabComp.getTextEditorControl().getText() + .trim().length() == 0) { + MessageBox questionMB = new MessageBox(shell, + SWT.ICON_WARNING | SWT.OK); questionMB.setText("Save TAF"); questionMB.setMessage("Cannot save Empty TAF!"); questionMB.open(); @@ -2013,7 +2017,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, configMgr.setDefaultFontAndColors(applyBtn); applyBtn.addSelectionListener(new SelectionAdapter() { @Override - public void widgetSelected(SelectionEvent event) { + public void widgetSelected(SelectionEvent event) { if (editorTafTabComp.getTextEditorControl().getText() != null && !editorTafTabComp.getTextEditorControl().getText() .isEmpty()) { @@ -2026,12 +2030,12 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, String toolName = toolsCbo.getItem(toolsCbo .getSelectionIndex()); String bbb = editorTafTabComp.getBBB(); - + // DR166478 - if ( toolName.equals("UseMetarForPrevailing") ) { - if ( checkBasicSyntaxError(true) ) { - return; - } + if (toolName.equals("UseMetarForPrevailing")) { + if (checkBasicSyntaxError(true)) { + return; + } } // Setup for python request @@ -2101,18 +2105,18 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, /** * * @param doLogMessage - * @return true if error found, otherwise false + * @return true if error found, otherwise false */ private boolean checkBasicSyntaxError(boolean doLogMessage) { - String in = editorTafTabComp.getTextEditorControl().getText(); + String in = editorTafTabComp.getTextEditorControl().getText(); clearSyntaxErrorLevel(); st = editorTafTabComp.getTextEditorControl(); final Map syntaxMap = new HashMap(); - + st.addMouseTrackListener(new MouseTrackAdapter() { @Override public void mouseHover(MouseEvent e) { @@ -2142,62 +2146,69 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, } }); - int tafIndex = in.indexOf("TAF"); + int tafIndex = in.indexOf("TAF"); int equalSignIndex = in.indexOf("="); int lastEqualSignIndex = equalSignIndex; - - if ( tafIndex < 0 && equalSignIndex < 0 ) { // empty TAF - return false; + + if (tafIndex < 0 && equalSignIndex < 0) { // empty TAF + return false; } - + while (tafIndex > -1 || equalSignIndex > -1) { - if ( tafIndex == -1 || tafIndex > equalSignIndex ) { - - int lineIndexOfFirstEqualSign = st.getLineAtOffset(lastEqualSignIndex); - int lineIndexOfSecondEqualSign = st.getLineAtOffset(equalSignIndex); - if ( lineIndexOfFirstEqualSign == lineIndexOfSecondEqualSign ) { - StyleRange sr = new StyleRange(lastEqualSignIndex,1,null,qcColors[3]); - String msg = "Syntax error: there is an extra '=' sign in this line"; - syntaxMap.put(sr, msg); - st.setStyleRange(null); - st.setStyleRange(sr); + if (tafIndex == -1 || tafIndex > equalSignIndex) { + + int lineIndexOfFirstEqualSign = st + .getLineAtOffset(lastEqualSignIndex); + int lineIndexOfSecondEqualSign = st + .getLineAtOffset(equalSignIndex); + if (lineIndexOfFirstEqualSign == lineIndexOfSecondEqualSign) { + StyleRange sr = new StyleRange(lastEqualSignIndex, 1, null, + qcColors[3]); + String msg = "Syntax error: there is an extra '=' sign in this line"; + syntaxMap.put(sr, msg); + st.setStyleRange(null); + st.setStyleRange(sr); if (doLogMessage) { msgStatComp.setMessageText(msg, qcColors[3].getRGB()); } return true; - } - - int startIndex = lastEqualSignIndex; - - while ( !in.substring(startIndex,startIndex+1).matches("[A-Z]") && !in.substring(startIndex,startIndex+1).matches("[0-9]") ) { - startIndex++; - } - int length = 6; - if ( (equalSignIndex-startIndex) < 6 ) { - length = equalSignIndex-startIndex; - } - StyleRange sr = new StyleRange(startIndex,length,null,qcColors[3]); - String msg = "Syntax error: There is an extra '=' sign before this point, or 'TAF' is missing at beginning of TAF"; - syntaxMap.put(sr, msg); - st.setStyleRange(null); - st.setStyleRange(sr); + } + + int startIndex = lastEqualSignIndex; + + while (!in.substring(startIndex, startIndex + 1).matches( + "[A-Z]") + && !in.substring(startIndex, startIndex + 1).matches( + "[0-9]")) { + startIndex++; + } + int length = 6; + if ((equalSignIndex - startIndex) < 6) { + length = equalSignIndex - startIndex; + } + StyleRange sr = new StyleRange(startIndex, length, null, + qcColors[3]); + String msg = "Syntax error: There is an extra '=' sign before this point, or 'TAF' is missing at beginning of TAF"; + syntaxMap.put(sr, msg); + st.setStyleRange(null); + st.setStyleRange(sr); if (doLogMessage) { msgStatComp.setMessageText(msg, qcColors[3].getRGB()); } - - return true; - } - - tafIndex = in.indexOf("TAF", tafIndex+1); - lastEqualSignIndex = equalSignIndex; - equalSignIndex = in.indexOf("=", equalSignIndex+1); - } - - return false; - } - private void syntaxCheck() { + return true; + } + + tafIndex = in.indexOf("TAF", tafIndex + 1); + lastEqualSignIndex = equalSignIndex; + equalSignIndex = in.indexOf("=", equalSignIndex + 1); + } + + return false; + } + + private void syntaxCheck() { // Assume editorTafTabComp is for the active tab. st = editorTafTabComp.getTextEditorControl(); st.setText(st.getText().toUpperCase()); @@ -2378,6 +2389,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, .getSelectionIndex()); String site = currentTab.getSite(siteID); currentTab.generateGuidance(site); + currentTab.markTextAsUpdating(); } } @@ -2445,7 +2457,8 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, private void saveFile(String filename) { String tempTafPath = "aviation/tmp/"; IPathManager pm = PathManagerFactory.getPathManager(); - LocalizationContext context = pm.getContext(LocalizationType.CAVE_STATIC, LocalizationLevel.SITE); + LocalizationContext context = pm.getContext( + LocalizationType.CAVE_STATIC, LocalizationLevel.SITE); String path = pm.getFile(context, tempTafPath).getAbsolutePath(); String filepath = null; @@ -2465,14 +2478,17 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, if (filepath != null) { try { setWaitCursor(true); - String fname = tempTafPath + filepath.substring(filepath.lastIndexOf('/') + 1); + String fname = tempTafPath + + filepath.substring(filepath.lastIndexOf('/') + 1); LocalizationFile lFile = pm.getLocalizationFile(context, fname); File file = lFile.getFile(); if (filename == null && file.exists()) { - MessageBox questionMB = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL); + MessageBox questionMB = new MessageBox(shell, + SWT.ICON_WARNING | SWT.OK | SWT.CANCEL); questionMB.setText("Save TAF"); - questionMB.setMessage("File already exists. Do you want to overwrite it?"); + questionMB + .setMessage("File already exists. Do you want to overwrite it?"); int result = questionMB.open(); if (result == SWT.CANCEL) { @@ -2497,14 +2513,17 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, setMessageStatusOK("File " + filepath + " saved successfully."); } catch (FileNotFoundException e) { e.printStackTrace(); - setMessageStatusError("Unable to open file " + filepath + " for writing."); + setMessageStatusError("Unable to open file " + filepath + + " for writing."); } catch (IOException e) { e.printStackTrace(); - setMessageStatusError("An IOException occured while saving file " + filepath); + setMessageStatusError("An IOException occured while saving file " + + filepath); } catch (LocalizationOpFailedException e) { e.printStackTrace(); - setMessageStatusError("A LocalizationOpFailedException occured while saving file " + filepath); + setMessageStatusError("A LocalizationOpFailedException occured while saving file " + + filepath); } finally { setWaitCursor(false); } @@ -2521,10 +2540,14 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, tabFolder.setSelection(editorTab); // Use the current tab if (!(ti.getText().equals(tabFillText))) { - if (!editorTafTabComp.isTafSent() && !editorTafTabComp.getTextEditorControl().getText().trim().equals("")) { - MessageBox questionMB = new MessageBox(shell,SWT.ICON_WARNING | SWT.OK | SWT.CANCEL); + if (!editorTafTabComp.isTafSent() + && !editorTafTabComp.getTextEditorControl() + .getText().trim().equals("")) { + MessageBox questionMB = new MessageBox(shell, + SWT.ICON_WARNING | SWT.OK | SWT.CANCEL); questionMB.setText("Restore TAF"); - questionMB.setMessage("Forecast not saved. Do you want to continue?"); + questionMB + .setMessage("Forecast not saved. Do you want to continue?"); int result = questionMB.open(); if (result == SWT.CANCEL) { @@ -2535,8 +2558,10 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, String tempTafPath = "aviation/tmp/"; IPathManager pm = PathManagerFactory.getPathManager(); - LocalizationContext context = pm.getContext(LocalizationType.CAVE_STATIC, LocalizationLevel.SITE); - String path = pm.getFile(context, tempTafPath).getAbsolutePath(); + LocalizationContext context = pm.getContext( + LocalizationType.CAVE_STATIC, LocalizationLevel.SITE); + String path = pm.getFile(context, tempTafPath) + .getAbsolutePath(); String filepath = null; File tmp = new File(path); @@ -2557,8 +2582,11 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, try { setWaitCursor(true); - String fname = tempTafPath + filepath.substring(filepath.lastIndexOf('/') + 1); - LocalizationFile lFile = pm.getLocalizationFile(context, fname); + String fname = tempTafPath + + filepath + .substring(filepath.lastIndexOf('/') + 1); + LocalizationFile lFile = pm.getLocalizationFile( + context, fname); File file = lFile.getFile(); FileReader reader = new FileReader(file); BufferedReader input = new BufferedReader(reader); @@ -2575,17 +2603,20 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, if (values.length != 3) { errorMsg = "parse error"; contents.append(line); - contents.append(System.getProperty("line.separator")); + contents.append(System + .getProperty("line.separator")); } else { editorTafTabComp.setWmoIdLbl(values[0].trim()); - editorTafTabComp.setWmoSiteLbl(values[1].trim()); + editorTafTabComp + .setWmoSiteLbl(values[1].trim()); editorTafTabComp.setLargeTF(values[2].trim()); } } while ((line = input.readLine()) != null) { contents.append(line); - contents.append(System.getProperty("line.separator")); + contents.append(System + .getProperty("line.separator")); } input.close(); @@ -2606,20 +2637,25 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, } ti.setText(icao + " " + bbb); - editorTafTabComp.getTextEditorControl().setText(tafText); + editorTafTabComp.getTextEditorControl() + .setText(tafText); if (editorTafTabComp.isTafSent()) { editorTafTabComp.updateTafSent(false); } } catch (FileNotFoundException e) { - setMessageStatusError("File " + filepath + " not found."); + setMessageStatusError("File " + filepath + + " not found."); } catch (IOException e) { - setMessageStatusError("An IOException occured while opening file " + filepath); + setMessageStatusError("An IOException occured while opening file " + + filepath); } finally { if (errorMsg != null) { - setMessageStatusError("File " + filepath + ": " + errorMsg); + setMessageStatusError("File " + filepath + ": " + + errorMsg); } else { - setMessageStatusOK("File " + filepath + " opened successfully."); + setMessageStatusOK("File " + filepath + + " opened successfully."); } setWaitCursor(false); } @@ -2887,7 +2923,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, private boolean checkSyntaxInEditor(boolean doLogMessage) { // Get the content of the Taf Editor. // Assume editorTafTabComp is for the active tab. - // DR15477: trim blank lines before Syntax Checking + // DR15477: trim blank lines before Syntax Checking String in = (editorTafTabComp.getTextEditorControl().getText().trim()); // Declare variables for processing the editor's contents. boolean errorInTaf = false; @@ -4272,11 +4308,7 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable, populateTafViewer(); // Mark tab displays no longer current. - for (TabItem tbi : guidanceViewerFolder.getItems()) { - if (tbi.getControl() instanceof ViewerTab) { - ((ViewerTab) tbi.getControl()).setDisplayCurrent(false); - } - } + markTabsAsNotCurrent(); // Update the metar and mos guidance in the viewer tab. updateViewerTab(stationName); diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/GuidanceRequest.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/GuidanceRequest.java index 4a7e35618c..efcfe49b1c 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/GuidanceRequest.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/GuidanceRequest.java @@ -36,6 +36,7 @@ import com.raytheon.uf.viz.core.jobs.QueueJobRequest; * Jul 28, 2009 njensen Initial creation * Nov 12, 2010 6195 rferrel Added types for clearing cache. * Apr 14, 2011 8065 rferrel Implement equals + * 10Apr2014 #3005 lvenable Added Eclipse generated hashcode method. * * * @@ -212,6 +213,19 @@ public class GuidanceRequest extends QueueJobRequest { this.tag = tag; } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((format == null) ? 0 : format.hashCode()); + result = prime * result + + ((guidanceType == null) ? 0 : guidanceType.hashCode()); + result = prime * result + ((model == null) ? 0 : model.hashCode()); + result = prime * result + ((siteIDs == null) ? 0 : siteIDs.hashCode()); + result = prime * result + ((tag == null) ? 0 : tag.hashCode()); + return result; + } + /* * (non-Javadoc) * diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java index bbd0b85599..cb8c5b3f71 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java @@ -63,7 +63,10 @@ import com.raytheon.viz.aviation.resource.ResourceConfigMgr.ResourceTag; * and set default value for check hours. * 04/28/2011 8065 rferrel Add flag to indicate display is current * and implement data caching - * 31JUL2012 14570 zhao Highlight Metar alert for case of 'cat' + * 31JUL2012 14570 zhao Highlight Metar alert for case of 'cat' + * 09Apr2014 #3005 lvenable Added method call to mark the data and header text + * controls to updating when the number + * of hours has changed (via combo control). * * * @@ -127,8 +130,10 @@ public class MetarViewer extends ViewerTab implements */ private static final HashMap alertMap = new HashMap(); static { - //alertMap.put("cat", new String[] { "", "", "", "" }); // 14570 - alertMap.put("tempo", new String[] { "", "", "", "", "", "", "", "" }); // 14570 + // alertMap.put("cat", new String[] { "", "", "", + // "" }); // 14570 + alertMap.put("tempo", new String[] { "", "", "", + "", "", "", "", "" }); // 14570 alertMap.put("vsby", new String[] { "", "" }); alertMap.put("wind", new String[] { "", "" }); alertMap.put("wx", new String[] { "", "" }); @@ -256,6 +261,7 @@ public class MetarViewer extends ViewerTab implements @Override public void widgetSelected(SelectionEvent event) { // Update the metar in the viewer tab. + markTextAsUpdating(); if (MetarViewer.this.allChk.getSelection()) { allChkHrs = numHrsCbo.getItem(numHrsCbo.getSelectionIndex()); } else { @@ -411,12 +417,13 @@ public class MetarViewer extends ViewerTab implements if (alertMap != null && alertMap.size() > 0) { for (String key : alertMap.keySet()) { - if ( key.equals("cat") ) { // "cat" involves "visibility" and "sky condition" - colorViewerAlert("vsby", configMgr); - colorViewerAlert("sky", configMgr); - } else { - colorViewerAlert(key, configMgr); - } + if (key.equals("cat")) { // "cat" involves "visibility" and + // "sky condition" + colorViewerAlert("vsby", configMgr); + colorViewerAlert("sky", configMgr); + } else { + colorViewerAlert(key, configMgr); + } } } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/ViewerTab.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/ViewerTab.java index 4b14345a15..f0c3f59911 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/ViewerTab.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/ViewerTab.java @@ -63,6 +63,8 @@ import com.raytheon.viz.avnconfig.TafSiteData; * Apr 28,2011 8065 rferrel Add flag to indicate display is current * and implement data caching * Jun 1, 2011 9673 rferrel Added fltCatFontColor. + * 09Apr2014 #3005 lvenable Marked currentTab as volatile, added call through + * methods to the HeaderTextComp class. * * * @@ -141,7 +143,7 @@ public abstract class ViewerTab extends Composite { /** * True when tab is selected for display. */ - private boolean currentTab = false; + private volatile boolean currentTab = false; /** * Flight Category's font color. @@ -303,7 +305,7 @@ public abstract class ViewerTab extends Composite { * to determine the last request queued so it will be the one to populate * the tab. */ - private AtomicInteger generatGuidanceCount = new AtomicInteger( + private AtomicInteger generateGuidanceCount = new AtomicInteger( Integer.MIN_VALUE); /** @@ -317,7 +319,7 @@ public abstract class ViewerTab extends Composite { * @return cnt unique count that increases each time the method is called. */ public int generateGuidance(String siteID) { - int cnt = generatGuidanceCount.incrementAndGet(); + int cnt = generateGuidanceCount.incrementAndGet(); this.siteID = siteID; setDisplayCurrent(false); return cnt; @@ -331,7 +333,7 @@ public abstract class ViewerTab extends Composite { } /** - * This method must to be called by the implementing class' requestComoplete + * This method must be called by the implementing class' requestComplete * method after it has populated the textComp header and data section. This * updates the highlighting of the TAF text in the viewer and adjusts the * width of the this tab's header and data text component so they will stay @@ -533,6 +535,20 @@ public abstract class ViewerTab extends Composite { } } + /** + * Clear the header and data text controls. + */ + public void clearTextControls() { + textComp.clearTextControls(); + } + + /** + * Set the header and data text controls to show as updating. + */ + public void markTextAsUpdating() { + textComp.markTextAsUpdating(); + } + /** * * @return stationList list of sites tab needs to cache data for. @@ -586,6 +602,7 @@ public abstract class ViewerTab extends Composite { */ public void queueCacheRequests(final int cnt, final List cacheRequests) { + Thread thread = new Thread(new Runnable() { @Override public void run() { @@ -593,7 +610,7 @@ public abstract class ViewerTab extends Composite { cacheRequests); // Update tab if still current and waiting for this request if (ViewerTab.this.isDisposed() == false && isCurrentTab() - && generatGuidanceCount.get() == cnt) { + && generateGuidanceCount.get() == cnt) { VizApp.runAsync(new Runnable() { @Override public void run() { diff --git a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgDisplayManager.java b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgDisplayManager.java index b9fbe28bcc..79f1f41028 100644 --- a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgDisplayManager.java +++ b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgDisplayManager.java @@ -32,6 +32,7 @@ import com.raytheon.viz.ghg.Activator; import com.raytheon.viz.ghg.constants.StatusConstants; import com.raytheon.viz.ghg.monitor.constants.GhgMenuConstants; import com.raytheon.viz.ghg.monitor.data.GhgConfigData.DataEnum; +import com.raytheon.viz.ghg.monitor.data.GhgConfigData; import com.raytheon.viz.ghg.monitor.data.GhgData; import com.raytheon.viz.ghg.monitor.event.GhgMonitorFilterChangeEvent; import com.raytheon.viz.ghg.monitor.event.GhgMonitorTableSelectionEvent; @@ -49,6 +50,7 @@ import com.raytheon.viz.ghg.monitor.listener.GhgMonitorZoneSelectionListener; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * May 10, 2010 mpduff Initial creation + * Apr 9, 2014 15769 ryu Moved attribute identifyTestData to configuration, as in A1. * * * @@ -78,11 +80,6 @@ public class GhgDisplayManager { */ private boolean showLabels = false; - /** - * Identify test data flag. - */ - private boolean identifyTestData = false; - /** * List of GhgData records */ @@ -335,19 +332,4 @@ public class GhgDisplayManager { listener.notifyUpdate(evt); } } - - /** - * @return the identifyTestData - */ - public boolean isIdentifyTestData() { - return identifyTestData; - } - - /** - * @param identifyTestData - * the identifyTestData to set - */ - public void setIdentifyTestData(boolean identifyTestData) { - this.identifyTestData = identifyTestData; - } } diff --git a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgFilterDlg.java b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgFilterDlg.java index d040c8463a..d2810e83b0 100644 --- a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgFilterDlg.java +++ b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgFilterDlg.java @@ -66,6 +66,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * 25 MAR 2008 N/A lvenable Initial creation * 17Jun2008 1157 MW Fegan Hooked in configuration. * 28 Nov 2012 1353 rferrel Changes for non-blocking dialog. + * 28 Mar 2014 15769 ryu Removed "include OrgPil" check button. * * * @@ -156,7 +157,7 @@ public class GhgFilterDlg extends CaveSWTDialog { */ private Button incPastEventsChk; - private Button incOrgPilEvents; + //private Button incOrgPilEvents; private GhgDataFilter filter = null; @@ -238,7 +239,7 @@ public class GhgFilterDlg extends CaveSWTDialog { filter.includeAlerts = incAlertsChk.getSelection(); filter.includeMapSelections = incMapSelectionsChk.getSelection(); filter.includePastEvents = incPastEventsChk.getSelection(); - filter.includeOrgPilEvents = incOrgPilEvents.getSelection(); + //filter.includeOrgPilEvents = incOrgPilEvents.getSelection(); filter.name = ""; @@ -269,7 +270,7 @@ public class GhgFilterDlg extends CaveSWTDialog { incAlertsChk.setSelection(filter.includeAlerts); incMapSelectionsChk.setSelection(filter.includeMapSelections); incPastEventsChk.setSelection(filter.includePastEvents); - incOrgPilEvents.setSelection(filter.includeOrgPilEvents); + //incOrgPilEvents.setSelection(filter.includeOrgPilEvents); } /** @@ -571,10 +572,10 @@ public class GhgFilterDlg extends CaveSWTDialog { } }); - incOrgPilEvents = new Button(filterOverrideGroup, SWT.CHECK); - incOrgPilEvents.setText("Include OrgPil Events"); - incOrgPilEvents.setSelection(filter.includeOrgPilEvents); - incOrgPilEvents.addSelectionListener(new SelectionAdapter() { + //incOrgPilEvents = new Button(filterOverrideGroup, SWT.CHECK); + //incOrgPilEvents.setText("Include OrgPil Events"); + //incOrgPilEvents.setSelection(filter.includeOrgPilEvents); + //incOrgPilEvents.addSelectionListener(new SelectionAdapter() { /* * (non-Javadoc) @@ -583,12 +584,14 @@ public class GhgFilterDlg extends CaveSWTDialog { * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse * .swt.events.SelectionEvent) */ + /* @Override public void widgetSelected(SelectionEvent e) { filter.includeOrgPilEvents = incOrgPilEvents.getSelection(); updateDisplay(); } }); + */ } /** diff --git a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgMonitorDlg.java b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgMonitorDlg.java index f52f802bb6..e9166fb512 100644 --- a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgMonitorDlg.java +++ b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/GhgMonitorDlg.java @@ -22,8 +22,10 @@ package com.raytheon.viz.ghg.monitor; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Calendar; import java.util.Collection; import java.util.Collections; +import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; @@ -115,7 +117,9 @@ import com.raytheon.viz.ui.statusline.StatusStore; * Changes for non-blocking GhgSaveDeleteFilterDlg. * 16 Jan 2013 1492 rferrel Changes for non-blocking GhgFontDlg. * 29 Mar 2013 1790 rferrel Bug fix for non-blocking dialogs. - * + * 10 Apr 2014 15769 ryu Modify default configuration and menus to match A1. + * Bring monitor to front before sending alert. + * Adjusted delay for timer so it fires at the top of a minute. * * * @author lvenable @@ -206,6 +210,8 @@ public class GhgMonitorDlg extends CaveSWTDialog implements private FilterDisplay filterDisplay; private Menu columnsMenu; + + private MenuItem identifyTestMI; /** * The status importance map. @@ -264,22 +270,6 @@ public class GhgMonitorDlg extends CaveSWTDialog implements // If this fails, fall back to the hardcoded defaults. GhgConfigData configuration = GhgConfigData.getInstance(); - try { - configuration.loadDefault(); - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "Error loading default configuration", e); - } - - configuration.makeCurrentFilterDefault(); - configuration.makeCurrentAlertsDefault(); - configuration.makeVisibleColumnsDefault(); - - configuration.setDefaultAsCurrent(FeatureEnum.FILTERS); - configuration.setDefaultAsCurrent(FeatureEnum.ALERTS); - configuration.setDefaultAsCurrent(FeatureEnum.COLUMNS); - // configuration.setDefaultAsCurrent(FeatureEnum.COLORS); - try { // Try and read a saved config file configuration.load(false); @@ -645,7 +635,7 @@ public class GhgMonitorDlg extends CaveSWTDialog implements // Show Fire Wx menu item MenuItem showFireWxMI = new MenuItem(mapMenu, SWT.RADIO); - showFireWxMI.setText("Show Fire Wx"); + showFireWxMI.setText("Show FireWx"); showFireWxMI.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { @@ -802,12 +792,13 @@ public class GhgMonitorDlg extends CaveSWTDialog implements }); // Identify TEST Events menu item - final MenuItem identifyTestMI = new MenuItem(appearanceMenu, SWT.CHECK); + identifyTestMI = new MenuItem(appearanceMenu, SWT.CHECK); identifyTestMI.setText("Identify TEST Events"); + identifyTestMI.setSelection(GhgConfigData.getInstance().isIdentifyTestEvents()); identifyTestMI.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - GhgDisplayManager.getInstance().setIdentifyTestData( + GhgConfigData.getInstance().setIdentifyTestEvents( identifyTestMI.getSelection()); } }); @@ -1751,6 +1742,9 @@ public class GhgMonitorDlg extends CaveSWTDialog implements synchColumnsWithConfig(); refresh(false); ghgTableComp.packColumns(); + + identifyTestMI.setSelection( + configuration.isIdentifyTestEvents()); } /** @@ -1955,7 +1949,7 @@ public class GhgMonitorDlg extends CaveSWTDialog implements buffer.append("Event is ongoing, but no current product exists describing event. "); } - buffer.append(" " + headline); + buffer.append(" Event=" + rec.getPhenSig() + " " + headline); StatusMessage.Importance importance = Importance.ALERT1; if (alertData.getAlertType() == AlertsEnum.AlertLvl2) { @@ -1964,6 +1958,7 @@ public class GhgMonitorDlg extends CaveSWTDialog implements importance = Importance.EXPIRED; } + bringToTop(); StatusStore.updateStatus(STATUS_KEY, buffer.toString(), importance); } @@ -2068,7 +2063,13 @@ public class GhgMonitorDlg extends CaveSWTDialog implements * Initialize the auto-update timer */ private void initTimer() { - int delay = 1000 * 60; // delay for 1 min. + Date date = SimulatedTime.getSystemTime().getTime(); + long now = date.getTime(); + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(Calendar.MINUTE, 1); + cal.set(Calendar.SECOND, 0); + int delay = (int) (cal.getTime().getTime() - now); int period = 1000 * 60; // repeat every min. timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { diff --git a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/config/GhgConfigXml.java b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/config/GhgConfigXml.java index 3938e603db..26c582dcd5 100644 --- a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/config/GhgConfigXml.java +++ b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/config/GhgConfigXml.java @@ -117,6 +117,9 @@ public final class GhgConfigXml { @XmlElement private boolean descending; + + @XmlElement + private boolean identifyTestEvents; /** * Default constructor. @@ -363,4 +366,19 @@ public final class GhgConfigXml { public void setDescending(boolean descending) { this.descending = descending; } + + /** + * @return the identifyTestEvents + */ + public boolean isIdentifyTestEvents() { + return identifyTestEvents; + } + + /** + * @param identifyTestEvents + * the identifyTestEvents to set + */ + public void setIdentifyTestEvents(boolean identifyTestEvents) { + this.identifyTestEvents = identifyTestEvents; + } } \ No newline at end of file diff --git a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgConfigData.java b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgConfigData.java index 0098d464a2..c8f3fbe482 100644 --- a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgConfigData.java +++ b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgConfigData.java @@ -82,7 +82,9 @@ import com.raytheon.viz.ui.statusline.StatusStore; * 18Jun2008 1157 MW Fegan Use clone of default filter. * 20Jun2008 1157 MW Fegan Add resetting to default alerts. * 28Nov2012 1353 rferrel Sort the list of filter names for dialog display. - * + * 10Apr2014 15769 ryu Modified default config and GUI items to match A1. + * Default config changed to hard coding instead of reading + * from config file. * * * @author lvenable @@ -104,8 +106,8 @@ public final class GhgConfigData { /** * The VTEC Action Names */ - public static final String[] vtecActionNames = { "CAN", "CON", "COR", - "EXA", "EXB", "EXP", "EXT", "UPG", "NEW", "ROU" }; + public static final String[] vtecActionNames = { "CAN", "CON", + "EXA", "EXB", "EXP", "EXT", "NEW", "UPG"}; /** * The VTEC Afos Product (PIL) Names @@ -199,6 +201,8 @@ public final class GhgConfigData { private boolean descending; + private boolean identifyTestEvents; + /** * Alerts enumeration. Contains the available alerts. {@code display} * attribute contains the text to display in the Alert Dialog. @@ -382,77 +386,12 @@ public final class GhgConfigData { * Initialize the configuration data. */ private void init() { - alertLvl1Colors = new GhgColorData(new RGB(0, 0, 255), new RGB(255, - 255, 0)); - alertLvl2Colors = new GhgColorData(new RGB(255, 255, 255), new RGB(255, - 0, 0)); - expiredAlertColors = new GhgColorData(new RGB(255, 255, 255), new RGB( - 171, 0, 201)); - mapSelectionsColors = new GhgColorData(new RGB(255, 255, 255), new RGB( - 0, 218, 240)); - regularEntriesColors = new GhgColorData(new RGB(0, 0, 0), new RGB(180, - 180, 180)); - monitorSelectionsColors = new GhgColorData(new RGB(255, 255, 255), - new RGB(0, 0, 255)); - testProductsColors = new GhgColorData(new RGB(255, 255, 255), new RGB( - 128, 128, 128)); - - /* create the default alerts data */ - defaultAlerts = new GhgAlertsConfigData(); - defaultAlerts.setLocal(false); - defaultAlerts.setTest(false); - defaultAlerts.addAlert(new GhgAlertData(true, true, 10, - AlertsEnum.AlertLvl1)); - defaultAlerts.addAlert(new GhgAlertData(true, true, 5, - AlertsEnum.AlertLvl2)); - defaultAlerts.addAlert(new GhgAlertData(true, true, 0, - AlertsEnum.ExpiredAlert)); - defaultAlerts.setActions(new String[] { "NEW", "CON", "COR", "EXT", - "EXA", "EXB" }); - defaultAlerts.setPhenSigs(new String[] { "SV.W", "TO.W" }); - defaultAlerts.setPils(new String[] { "SVR", "SVS", "TOR" }); - - final String siteId = SiteMap.getInstance().getSite4LetterId( - DataManager.getCurrentInstance().getSiteID()); - - /* generate some hardcoded default filter data */ - GhgDataFilter filter = new GhgDataFilter() { - { - currentHazards = false; - name = DEFAULT_FILTER_NAME; - actions = new String[] { "CON", "EXA", "EXB", "EXT", "NEW" }; - phenSigs = new String[] {}; - pils = new String[] {}; - wfos = new String[] { siteId }; - geoids = new String[] {}; - etns = new String[] {}; - segs = new String[] {}; - - combineGeoId = true; - combineSegments = true; - combinePurgeTimes = true; - combineActions = true; - - includeAlerts = true; - includeMapSelections = true; - includePastEvents = false; - includeOrgPilEvents = false; - } - }; - defaultFilter = filter; - - /* add a couple of named filters */ - filters = new HashMap(); - - visibleColumns = new ArrayList(DataEnum.values().length); - // The initial columns visible. These need to match the ones set up by - // GhgMonitorDlg. - visibleColumns.addAll(Arrays.asList(DataEnum.ACTION, DataEnum.ETN, - DataEnum.PHEN_SIG, DataEnum.START, DataEnum.END, - DataEnum.PURGE, DataEnum.ISSUE_TIME, DataEnum.PIL, - DataEnum.WFO, DataEnum.GEO_ID)); - sortColumn = DataEnum.PURGE; - + loadDefault(); + + defaultFilter = currentFilter.clone(); + defaultAlerts = currentAlerts.clone(); + defaultColumns = new ArrayList(visibleColumns); + // Get the VTECTable initializePython(); } @@ -839,12 +778,86 @@ public final class GhgConfigData { } } - public void load(boolean reportMissing) { - loadFrom(CONFIG_PATH, reportMissing); + public void loadDefault() { + alertLvl1Colors = new GhgColorData(new RGB(0, 0, 255), new RGB(255, + 255, 0)); + alertLvl2Colors = new GhgColorData(new RGB(255, 255, 255), new RGB(255, + 0, 0)); + expiredAlertColors = new GhgColorData(new RGB(255, 255, 255), new RGB( + 171, 0, 201)); + mapSelectionsColors = new GhgColorData(new RGB(255, 255, 255), new RGB( + 0, 218, 240)); + regularEntriesColors = new GhgColorData(new RGB(0, 0, 0), new RGB(180, + 180, 180)); + monitorSelectionsColors = new GhgColorData(new RGB(255, 255, 255), + new RGB(0, 0, 255)); + testProductsColors = new GhgColorData(new RGB(255, 255, 255), new RGB( + 128, 128, 128)); + + /* create the default alerts data */ + GhgAlertsConfigData alerts = new GhgAlertsConfigData(); + alerts.setLocal(true); + alerts.setTest(true); + alerts.addAlert(new GhgAlertData(true, true, 30, + AlertsEnum.AlertLvl1)); + alerts.addAlert(new GhgAlertData(true, true, 10, + AlertsEnum.AlertLvl2)); + alerts.addAlert(new GhgAlertData(true, true, 0, + AlertsEnum.ExpiredAlert)); + alerts.setActions(new String[] { "NEW", "CON", "COR", "EXT", + "EXA", "EXB" }); + alerts.setPhenSigs(new String[] {}); + alerts.setPils(new String[] {}); + currentAlerts = alerts; + + final String siteId = SiteMap.getInstance().getSite4LetterId( + DataManager.getCurrentInstance().getSiteID()); + + /* generate some hardcoded default filter data */ + currentFilter = new GhgDataFilter() { + { + currentHazards = false; + name = DEFAULT_FILTER_NAME; + actions = new String[] { "CON", "EXA", "EXB", "EXT", "NEW" }; + phenSigs = new String[] {}; + pils = new String[] {}; + wfos = new String[] { siteId }; + geoids = new String[] {}; + etns = new String[] {}; + segs = new String[] {}; + + combineGeoId = true; + combineSegments = true; + combinePurgeTimes = true; + combineActions = true; + + includeAlerts = true; + includeMapSelections = true; + includePastEvents = false; + includeOrgPilEvents = false; + } + }; + + /* add a couple of named filters */ + filters = new HashMap(); + + visibleColumns = new ArrayList(DataEnum.values().length); + // The initial columns visible. These need to match the ones set up by + // GhgMonitorDlg. + visibleColumns.addAll(Arrays.asList(DataEnum.ACTION, DataEnum.ETN, + DataEnum.PHEN_SIG, DataEnum.START, DataEnum.END, + DataEnum.PURGE, DataEnum.ISSUE_TIME, DataEnum.PIL, + DataEnum.WFO)); + sortColumn = DataEnum.PURGE; + + descending = false; + identifyTestEvents = true; + + //loadFrom(DEFAULT_PATH, true); } - public void loadDefault() { - loadFrom(DEFAULT_PATH, true); + public void load(boolean reportMissing) { + loadFrom(CONFIG_PATH, reportMissing); } /** @@ -890,6 +903,9 @@ public final class GhgConfigData { currentFilter = config.getCurrentFilter(); currentFont = config.getCurrentFont(); filters = config.getFilters(); + if (filters == null) { + filters = new HashMap(); + } alertLvl1Colors = config.getAlertLvl1Colors(); alertLvl2Colors = config.getAlertLvl2Colors(); @@ -902,6 +918,7 @@ public final class GhgConfigData { visibleColumns = config.getVisibleColumns(); sortColumn = config.getSortColumn(); descending = config.isDescending(); + identifyTestEvents = config.isIdentifyTestEvents(); } /** @@ -949,6 +966,21 @@ public final class GhgConfigData { this.descending = descending; } + /** + * @return the identifyTestEvents + */ + public boolean isIdentifyTestEvents() { + return identifyTestEvents; + } + + /** + * @param identifyTestEvents + * the identifyTestEvents to set + */ + public void setIdentifyTestEvents(boolean identifyTestEvents) { + this.identifyTestEvents = identifyTestEvents; + } + /** * */ diff --git a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgTableRowData.java b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgTableRowData.java index b35e91a4b1..ef1dd978ce 100644 --- a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgTableRowData.java +++ b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/data/GhgTableRowData.java @@ -34,7 +34,6 @@ import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; import com.raytheon.uf.common.time.SimulatedTime; -import com.raytheon.viz.ghg.monitor.GhgDisplayManager; import com.raytheon.viz.ghg.monitor.IGhgSelectedTableColumn; import com.raytheon.viz.ghg.monitor.data.GhgConfigData.AlertsEnum; import com.raytheon.viz.ghg.monitor.data.GhgConfigData.DataEnum; @@ -49,6 +48,8 @@ import com.raytheon.viz.ghg.monitor.data.GhgConfigData.SelectionEnum; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 25 MAR 2008 N/A lvenable Initial creation + * 10 Apr 2014 15769 ryu Changed isTestData() due to move of identifyTestEvents + * to config data. * * * @@ -439,6 +440,6 @@ public class GhgTableRowData implements Comparable { * @return the testData */ public boolean isTestData() { - return GhgDisplayManager.getInstance().isIdentifyTestData(); + return GhgConfigData.getInstance().isIdentifyTestEvents(); } } \ No newline at end of file diff --git a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/filter/GhgFilterEngine.java b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/filter/GhgFilterEngine.java index cdc4608f13..8f7ec20311 100644 --- a/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/filter/GhgFilterEngine.java +++ b/cave/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/filter/GhgFilterEngine.java @@ -20,6 +20,7 @@ package com.raytheon.viz.ghg.monitor.filter; import java.util.Arrays; +import java.util.Calendar; import java.util.List; import com.raytheon.uf.common.site.SiteMap; @@ -43,6 +44,7 @@ import com.raytheon.viz.ghg.monitor.data.GhgDataFilter; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 26May2010 mpduff Initial creation. + * 11Apr2014 15769 ryu Promote delta minutes if within a few seconds. * * * @@ -213,10 +215,11 @@ public class GhgFilterEngine { long now = SimulatedTime.getSystemTime().getTime().getTime(); // minutes until purge time - int deltaP = (int) ((gd.getPurgeDate().getTime() - now) / MILLIS_PER_MINUTE); + int margin = 4999; // promote the deltas if within 5 seconds + int deltaP = (int) ((gd.getPurgeDate().getTime() - now + margin) / MILLIS_PER_MINUTE); // minutes until end time - int deltaE = (int) ((gd.getEndDate().getTime() - now) / MILLIS_PER_MINUTE); + int deltaE = (int) ((gd.getEndDate().getTime() - now + margin) / MILLIS_PER_MINUTE); long earlierT = Math.min(gd.getPurgeDate().getTime(), gd.getEndDate() .getTime()); diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/StatusStore.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/StatusStore.java index 4edc7ac867..72dd23b351 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/StatusStore.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/StatusStore.java @@ -40,6 +40,8 @@ import com.raytheon.viz.ui.statusline.StatusMessage.Importance; * Jul 14, 2008 randerso Initial creation * Sep 12, 2008 wdougherty Added updateStatusTextI() method * Oct 22, 2012 1229 rferrel Changes for non-blocking ViewMessagesDialog. + * Apr 10, 2014 15769 ryu Resetting parent shell for banners + * so they stay on top. * * * @@ -208,24 +210,22 @@ public class StatusStore { String bannerName = importanceDict.get(importance) .getBannerName(); if (bannerName != null) { + Shell shell = null; + Display display = Display.getCurrent(); + if (display != null) { + shell = display.getActiveShell(); + if (shell == null) { + Shell[] shells = display.getShells(); + if (shells != null && shells.length > 0) { + shell = shells[0]; + } + } + } + UrgentMessagesDialog umd = dialogDict.get(bannerName); if (umd == null) { // Instantiate an UrgentMessageDialog for this banner // name - Shell shell = null; - Display display = Display.getCurrent(); - if (display == null) { - throw new RuntimeException( - "No current display for status message."); - } else { - shell = display.getActiveShell(); - if (shell == null) { - Shell[] shells = display.getShells(); - if (shells != null && shells.length > 0) { - shell = shells[0]; - } - } - } if (shell == null) { throw new RuntimeException( "Unable to obtain a shell for status message."); @@ -236,6 +236,10 @@ public class StatusStore { .get(importance).getBannerBgColor()); dialogDict.put(bannerName, umd); } + else { + umd.reparent(shell); + } + umd.setBlockOnOpen(false); umd.open(); umd.addMessage(message); diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/UrgentMessagesDialog.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/UrgentMessagesDialog.java index 6f9f1ef10a..8aa8b027e5 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/UrgentMessagesDialog.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/statusline/UrgentMessagesDialog.java @@ -25,6 +25,8 @@ import java.util.TimeZone; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.layout.GridData; @@ -48,6 +50,7 @@ import com.raytheon.viz.ui.statusline.StatusMessage.Importance; * ------------ ---------- ----------- -------------------------- * May 19, 2008 Eric Babin Initial Creation * 2008-12-09 + * Apr 10, 2014 15769 ryu Disposing and reparenting dialog shell. * * * @@ -101,6 +104,29 @@ public class UrgentMessagesDialog extends Dialog { sdf.setTimeZone(TimeZone.getTimeZone("GMT")); } + @Override + public void create() { + super.create(); + + getShell().addDisposeListener(new DisposeListener() { + + @Override + public void widgetDisposed(DisposeEvent e) { + urgentBuffer.clear(); + close(); + } + + }); + } + + public void reparent(Shell parent) { + if (getParentShell() != null && !getParentShell().isDisposed()) + return; + if (parent != null) { + setParentShell(parent); + } + } + @Override public boolean close() { if (urgentBuffer.size() > 0) { diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java index a70ead9915..38b92f8d66 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java @@ -80,6 +80,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory; * 10/17/2013 DR 16632 Qinglu Lin Updated removeOverlaidLinesegments(). * 10/18/2013 DR 16632 Qinglu Lin Catch exception thrown when coords length is less than 4 and doing createLinearRing(coords). * 01/09/2014 DR 16974 D. Friedman Improve followup redraw-from-hatched-area polygons. + * 04/15/2014 DR 17247 D. Friedman Prevent some invalid coordinates in adjustVertex. * * * @author mschenke @@ -1120,6 +1121,10 @@ public class PolygonUtil { double x = coordinate.x * Math.pow(10, decimalPlaces); double y = coordinate.y * Math.pow(10, decimalPlaces); + if (Double.isNaN(x) || Double.isNaN(y)) { + throw new IllegalArgumentException("Invalid coordinate " + coordinate); + } + x = Math.round(x); y = Math.round(y); @@ -1435,41 +1440,36 @@ public class PolygonUtil { int replaceIndex; // index of the vertex at the other end of line segment A. int theOtherIndex; + Coordinate b0, b1; if (d[4] < d[5]) { replaceIndex = index[4]; theOtherIndex = indexOfTheOtherEnd[0]; + b0 = coord[index[2]]; + b1 = coord[index[3]]; } else { replaceIndex = index[5]; theOtherIndex = indexOfTheOtherEnd[1]; + b0 = coord[index[0]]; + b1 = coord[index[1]]; } - // move the bad vertex, which is on line segment A and has - // the shortest distance to intersectCoord, - // along line segment A to the other side of line segment B - // which intersects with line segment A. - double delta; - double min = 0.00001; - if (Math.abs(intersectCoord.x - coord[replaceIndex].x) < min) { - // move the bad vertex along a vertical line segment. - delta = intersectCoord.y - coord[theOtherIndex].y; - coord[replaceIndex].y += 0.01 * (delta / Math - .abs(delta)); - } else if (Math.abs(intersectCoord.y - - coord[replaceIndex].y) < min) { - // move the bad vertex along a horizontal line segment. - delta = intersectCoord.x - coord[theOtherIndex].x; - coord[replaceIndex].x += 0.01 * (delta / Math - .abs(delta)); - } else { - // move the bad vertex along a line segment which is - // neither vertical nor horizontal. - double slope = computeSlope(coord, replaceIndex, - theOtherIndex); - delta = coord[theOtherIndex].y - intersectCoord.y; - coord[replaceIndex].y = intersectCoord.y + 0.005 - * (delta / Math.abs(delta)); - coord[replaceIndex].x = (coord[replaceIndex].y - coord[theOtherIndex].y) - / slope + coord[theOtherIndex].x; + + /* + * Move the bad vertex (coord[replaceIndex]), which is on + * line segment A and has the shortest distance to + * intersectCoord, along line segment A to the other side of + * line segment B (b0, b1) which intersects with line + * segment A. + * + * The point is actually moved to the 0.01 grid point + * closest to intersectCoord. That point may not actually be + * on line segment A. + */ + Coordinate c = adjustVertex2(intersectCoord, coord[theOtherIndex], b0, b1); + if (c != null) { + coord[replaceIndex].x = c.x; + coord[replaceIndex].y = c.y; } + //PolygonUtil.round(coord, 2); PolygonUtil.round(coord[replaceIndex], 2); if (replaceIndex == 0) @@ -1487,6 +1487,101 @@ public class PolygonUtil { return coord; } + private static final double SIDE_OF_LINE_THRESHOLD = 1e-9; + + /** Returns 1, -1, or 0 if p is on the left of, on the right of, or on pa -> pb */ + private static int sideOfLine(Coordinate p, Coordinate pa, Coordinate pb) { + double cp = (pb.x - pa.x) * (p.y - pa.y) - (p.x - pa.x) * (pb.y - pa.y); // Cross product + return Math.abs(cp) > SIDE_OF_LINE_THRESHOLD ? + (cp < 0 ? -1 : (cp > 0 ? 1 : 0)) : 0; + } + + /** Returns the angle between p -> pa and p -> pb */ + private static double angleBetween(Coordinate p, Coordinate pa, Coordinate pb) { + double ax = pa.x - p.x; + double ay = pa.y - p.y; + double bx = pb.x - p.x; + double by = pb.y - p.y; + + double m = Math.sqrt((ax * ax + ay * ay) * (bx * bx + by * by)); + return m != 0 ? Math.acos((ax * bx + ay * by) / m ) : 0; + } + + private static int N_CANDIDATE_POINTS = 8; + private static byte[] CANDIDATE_DX = { 1, 1, 1, 0, -1, -1, -1, 0 }; + private static byte[] CANDIDATE_DY = { 1, 0, -1, -1, -1, 0, 1, 1 }; + + /** + * Returns the coordinate within one grid point on the 0.01 grid next to + * intersectCoord that is on the same side of (b0,b1) as 'destination' which + * has the smallest angle to (inserectCoord,destination). The result may not + * be exact so it should be passed to round(Coordinate) if used. + * + * If intersectCoord is on a grid point, there are eight candidate points. + * Otherwise there are four candidates. + * + * Returns null if no point can be found. + */ + private static Coordinate adjustVertex2(Coordinate intersectCoord, + Coordinate destination, Coordinate b0, Coordinate b1) { + int sideOfTheOther = sideOfLine(destination, b0, b1); + if (sideOfTheOther == 0) + return null; + + double pxh = intersectCoord.x * 100; + double pyh = intersectCoord.y * 100; + + double cx = Math.ceil(pxh); + double fx = Math.floor(pxh); + double cy = Math.ceil(pyh); + double fy = Math.floor(pyh); + + double ox, oy; + if (Math.abs(cx - pxh) < SIDE_OF_LINE_THRESHOLD || Math.abs(fx - pxh) < SIDE_OF_LINE_THRESHOLD) + cx = fx = pxh; + if (Math.abs(cy - pyh) < SIDE_OF_LINE_THRESHOLD || Math.abs(fy - pyh) < SIDE_OF_LINE_THRESHOLD) + cy = fy = pyh; + + Coordinate best = null; + double bestAngle = Math.PI * 2; + + for (int ci = 0; ci < N_CANDIDATE_POINTS; ++ci) { + int dx = CANDIDATE_DX[ci]; + int dy = CANDIDATE_DY[ci]; + + if (dx == 0) { + if (cx != fx) + continue; + ox = pxh; + } else { + if (dx > 0) + ox = cx == fx ? pxh + 1 : cx; + else + ox = cx == fx ? pxh - 1 : fx; + } + if (dy == 0) { + if (cy != fy) + continue; + oy = pyh; + } else { + if (dy > 0) + oy = cy == fy ? pyh + 1 : cy; + else + oy = cy == fy ? pyh - 1 : fy; + } + Coordinate c = new Coordinate(ox / 100.0, oy / 100.0); + if (c != null && sideOfLine(c, b0, b1) == sideOfTheOther) { + double a = angleBetween(intersectCoord, c, destination); + if (a < bestAngle) { + best = c; + bestAngle = a; + } + } + } + + return best; + } + /** * Alter the location of two vertexes that cause polygon self-crossing. * This method would be used if polygon is still invalid after using adjustVertex(). diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java index dbbc1303e5..f89e5b85d6 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java @@ -195,6 +195,7 @@ import com.vividsolutions.jts.io.WKTReader; * Use A1 hatching behavior when no county passes the inclusion filter. * 10/29/2013 DR 16734 D. Friedman If redraw-from-hatched-area fails, don't allow the pollygon the be used. * 01/09/2014 DR 16974 D. Friedman Improve followup redraw-from-hatched-area polygons. + * 04/15/2014 DR 17247 D. Friedman Rework error handling in AreaHatcher. * * * @author mschenke @@ -391,14 +392,14 @@ public class WarngenLayer extends AbstractStormTrackResource { private Geometry hatchedWarningArea; + private Exception hatchException; + private Geometry warningArea; private Polygon warningPolygon; private Polygon oldWarningPolygon; - private boolean haveInput; - public AreaHatcher(PolygonUtil polygonUtil) { super("Hatching Warning Area"); setSystem(true); @@ -413,15 +414,19 @@ public class WarngenLayer extends AbstractStormTrackResource { */ @Override protected IStatus run(IProgressMonitor monitor) { - while (this.warningArea != null && this.warningPolygon != null) { - Geometry warningArea; - Polygon warningPolygon; - synchronized (polygonUtil) { - warningArea = this.warningArea; - warningPolygon = this.warningPolygon; - this.warningArea = this.warningPolygon = null; - } + Geometry warningArea; + Polygon warningPolygon; + synchronized (polygonUtil) { + warningArea = this.warningArea; + warningPolygon = this.warningPolygon; + this.warningArea = this.warningPolygon = null; + } + + if (warningArea != null && warningPolygon != null) { + Polygon inputWarningPolygon = warningPolygon; + Polygon outputHatchedArea = null; + Geometry outputHatchedWarningArea = null; try { warningPolygon = PolygonUtil .removeDuplicateCoordinate(warningPolygon); @@ -440,9 +445,9 @@ public class WarngenLayer extends AbstractStormTrackResource { coords = PolygonUtil.removeOverlaidLinesegments(coords); GeometryFactory gf = new GeometryFactory(); LinearRing lr = gf.createLinearRing(coords); - hatchedArea = gf.createPolygon(lr, null); + outputHatchedArea = gf.createPolygon(lr, null); int adjustPolygon_counter = 0; - while (!hatchedArea.isValid() + while (!outputHatchedArea.isValid() && adjustPolygon_counter < 1) { System.out.println("Calling adjustPolygon #" + adjustPolygon_counter); @@ -453,18 +458,18 @@ public class WarngenLayer extends AbstractStormTrackResource { coords = PolygonUtil .removeOverlaidLinesegments(coords); lr = gf.createLinearRing(coords); - hatchedArea = gf.createPolygon(lr, null); + outputHatchedArea = gf.createPolygon(lr, null); adjustPolygon_counter += 1; } int counter = 0; - if (!hatchedArea.isValid() && counter < 2) { + if (!outputHatchedArea.isValid() && counter < 2) { System.out .println("calling adjustVertex & alterVertexes: loop #" + counter); int adjustVertex_counter = 0; lr = gf.createLinearRing(coords); - hatchedArea = gf.createPolygon(lr, null); - while (!hatchedArea.isValid() + outputHatchedArea = gf.createPolygon(lr, null); + while (!outputHatchedArea.isValid() && adjustVertex_counter < 5) { System.out.println(" Calling adjustVertex #" + adjustVertex_counter); @@ -474,12 +479,12 @@ public class WarngenLayer extends AbstractStormTrackResource { coords = PolygonUtil .removeOverlaidLinesegments(coords); lr = gf.createLinearRing(coords); - hatchedArea = gf.createPolygon(lr, null); + outputHatchedArea = gf.createPolygon(lr, null); adjustVertex_counter += 1; } int inner_counter = 0; System.out.println(""); - while (!hatchedArea.isValid() && inner_counter < 5) { + while (!outputHatchedArea.isValid() && inner_counter < 5) { System.out .println(" Calling alterVertexes #" + inner_counter); @@ -489,21 +494,32 @@ public class WarngenLayer extends AbstractStormTrackResource { coords = PolygonUtil .removeOverlaidLinesegments(coords); lr = gf.createLinearRing(coords); - hatchedArea = gf.createPolygon(lr, null); + outputHatchedArea = gf.createPolygon(lr, null); inner_counter += 1; } counter += 1; } - hatchedWarningArea = createWarnedArea( - latLonToLocal(hatchedArea), + for (Coordinate c : outputHatchedArea.getCoordinates()) { + if (Double.isNaN(c.x) || Double.isNaN(c.y)) { + throw new IllegalStateException("Invalid coordinate " + c); + } + } + outputHatchedWarningArea = createWarnedArea( + latLonToLocal(outputHatchedArea), latLonToLocal(warningArea)); - } else { - this.hatchedArea = null; - this.hatchedWarningArea = null; } - } catch (VizException e) { - statusHandler.handle(Priority.PROBLEM, - e.getLocalizedMessage(), e); + this.hatchedArea = outputHatchedArea; + this.hatchedWarningArea = outputHatchedWarningArea; + } catch (Exception e) { + this.hatchException = e; + /* This is DEBUG so as to not distract the user when the + * result may not even be used. If there is an an attempt + * to use the result, the error is reported with a higher + * priority in getHatchedAreas(). + */ + statusHandler.handle(Priority.DEBUG, + String.format("Error redrawing polygon: %s\n Input: %s\n", + e.getLocalizedMessage(), inputWarningPolygon), e); } } @@ -516,26 +532,37 @@ public class WarngenLayer extends AbstractStormTrackResource { this.warningPolygon = warningPolygon; this.warningArea = warningArea; this.oldWarningPolygon = oldWarningPolygon; - this.haveInput = true; + + this.hatchedArea = null; + this.hatchedWarningArea = null; + this.hatchException = null; } schedule(); } public synchronized Geometry[] getHatchedAreas() { - Polygon hatchedArea = null; - Geometry hatchedWarningArea = null; while (getState() != Job.NONE) { try { join(); } catch (InterruptedException e) { - break; + return new Geometry[] { null, null }; } } - if (! this.haveInput) + if (getResult() == null) return null; - hatchedArea = this.hatchedArea; - hatchedWarningArea = this.hatchedWarningArea; - return new Geometry[] { hatchedArea, hatchedWarningArea }; + if (this.hatchException == null) { + return new Geometry[] { hatchedArea, hatchedWarningArea }; + } else { + String message; + if (hatchException instanceof VizException) { + message = hatchException.getLocalizedMessage(); + } else { + message = "Could not redraw box from warned area: " + + hatchException.getLocalizedMessage(); + } + statusHandler.handle(Priority.PROBLEM, message, hatchException ); + return new Geometry[] { null, null }; + } } } @@ -2316,8 +2343,6 @@ public class WarngenLayer extends AbstractStormTrackResource { state.resetMarked(); state.geometryChanged = true; issueRefresh(); - statusHandler.handle(Priority.PROBLEM, - "Could not redraw box from warned area"); result = false; } System.out.println("Time to createWarningPolygon: " diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java index 45a5567ffa..f1aa6e73c6 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java @@ -33,12 +33,14 @@ import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord; import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.DataTime; +import com.raytheon.uf.viz.core.AbstractTimeMatcher; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.drawables.IDescriptor.FramesInfo; import com.raytheon.uf.viz.core.drawables.IWireframeShape; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability; +import com.raytheon.uf.viz.core.time.TimeMatchingJob; import com.raytheon.viz.core.rsc.jts.JTSCompiler; import com.raytheon.viz.texteditor.util.SiteAbbreviationUtil; import com.vividsolutions.jts.geom.Geometry; @@ -62,6 +64,7 @@ import com.vividsolutions.jts.geom.Geometry; * Removed no longer needed frameAltered. Do not set wire frame for a CAN. * Jul 24, 2013 DR16350 mgamazaychikov Fix the problem with plotting EXP warning * Sep 5, 2013 2176 jsanchez Disposed the emergency font. + * Apr 14, 2014 DR 17257 D. Friedman Redo time matching on per-minute refresh. * * * @author jsanchez @@ -82,6 +85,7 @@ public class WarningsResource extends AbstractWWAResource { } for (WarningsResource rsc : rscs) { rsc.issueRefresh(); + rsc.redoTimeMatching(); } } @@ -357,4 +361,14 @@ public class WarningsResource extends AbstractWWAResource { return r.getOfficeid() + '.' + r.getPhensig() + '.' + r.getEtn(); } + /** + * Redo the time matching + */ + protected void redoTimeMatching() { + AbstractTimeMatcher timeMatcher = this.getDescriptor().getTimeMatcher(); + if (timeMatcher != null) { + timeMatcher.redoTimeMatching(this); + TimeMatchingJob.scheduleTimeMatch(this.getDescriptor()); + } + } } diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/serverConfig.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/serverConfig.py index eb7d27fbb3..4f7b26a7d9 100644 --- a/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/serverConfig.py +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/serverConfig.py @@ -28,6 +28,7 @@ # ------------ ---------- ----------- -------------------------- # 10/03/13 2424 randerso Change localTC to use dateutil instead of pytz # to get correct offsets for Alaska +# 04/17/14 2934 dgilling Remove alias for TPCSurgeProb D2D database. #---------------------------------------------------------------------------- # USEFUL DEFINES @@ -1107,7 +1108,7 @@ elif SID in CONUS_EAST_SITES: #DR3511 'HPCdelta', 'GLERL', 'WNAWAVE238', - ('TPCSurgeProb','TPCStormSurge'), # DCS3462 + 'TPCSurgeProb', 'GlobalWave', 'EPwave10', 'AKwave10', @@ -1156,7 +1157,7 @@ else: #######DCS3501 WEST_CONUS #DR3511 'HPCdelta', 'GLERL', 'WNAWAVE238', - ('TPCSurgeProb','TPCStormSurge'), # DCS3462 + 'TPCSurgeProb', 'GlobalWave', 'EPwave10', 'WCwave10', diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java index 9f35eabb27..acd4ad2f0f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java @@ -109,6 +109,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException; * 09/12/2013 #2348 randerso Removed code that called getDb from getD2DDatabaseIdsFromDb * Added function to create a D2DGridDatabase object only if there is * data in postgres for the desired model/reftime + * 04/17/2014 #2934 dgilling Change getGridParmInfo to use D2DParm's GridParmInfo. * * * @@ -601,98 +602,14 @@ public class D2DGridDatabase extends VGridDatabase { @Override public ServerResponse getGridParmInfo(ParmID id) { - ServerResponse sr = new ServerResponse(); GridParmInfo gpi = null; - String mappedModel = config.d2dModelNameMapping(id.getDbId() - .getModelName()); - - if (id.getParmName().equalsIgnoreCase("wind")) { - List modelTimes = GridParamInfoLookup - .getInstance() - .getParameterTimes(mappedModel, id.getDbId().getModelDate()); - TimeConstraints tc = getTimeConstraints(modelTimes); - - // first try getting u-component attributes - ParameterInfo atts = GridParamInfoLookup.getInstance() - .getParameterInfo(mappedModel, "uw"); - - // if not found try wind speed - if (atts == null) { - atts = GridParamInfoLookup.getInstance().getParameterInfo( - mappedModel, "ws"); - } - float minV = 0; - float maxV = atts.getValid_range()[1]; - int precision = calcPrecision(minV, maxV); - gpi = new GridParmInfo(id, this.outputGloc, GridType.VECTOR, - atts.getUnits(), "wind", minV, maxV, precision, false, tc, - false); - sr.setPayload(gpi); - return sr; - - } - - ParameterInfo atts = GridParamInfoLookup.getInstance() - .getParameterInfo(mappedModel, id.getParmName()); - - if (atts == null) { - if (gpi == null) { - TimeConstraints tc = new TimeConstraints( - TimeUtil.SECONDS_PER_HOUR, TimeUtil.SECONDS_PER_HOUR, 0); - gpi = new GridParmInfo(id, this.outputGloc, GridType.SCALAR, - "", "", ParameterInfo.MIN_VALUE, - ParameterInfo.MAX_VALUE, 0, false, tc, false); - } + D2DParm parm = gfeParms.get(id); + if (parm != null) { + gpi = parm.getGpi(); } else { - boolean accParm = false; - List accumParms = config.accumulativeD2DElements(dbId - .getModelName()); - if (accumParms != null) { - if (accumParms.contains(atts.getShort_name())) { - accParm = true; - } - } - - boolean rateParm = false; - // List times = this.getGridInventory(id).getPayload(); - List times = GridParamInfoLookup - .getInstance() - .getParameterTimes(mappedModel, id.getDbId().getModelDate()); - TimeConstraints tc = getTimeConstraints(times); - if (accParm) { - tc = new TimeConstraints(tc.getRepeatInterval(), - tc.getRepeatInterval(), tc.getStartTime()); - rateParm = true; - } - - float minV = -30; - float maxV = 10000; - - if (atts.getValid_range() != null) { - minV = atts.getValid_range()[0]; - maxV = atts.getValid_range()[1]; - } else { - // This is the CDF convention. But we can't use - // it or the GFE will attempt to create billions and - // billions of contours. - // min = MINFLOAT; - // max = MAXFLOAT; - minV = 0; - maxV = 10000; - if (!GridPathProvider.STATIC_PARAMETERS.contains(id - .getParmName())) { - statusHandler.handle(Priority.VERBOSE, - "[valid_range] or [valid_min] or [valid_max] " - + "not found for " + id.toString()); - } - } - - int precision = calcPrecision(minV, maxV); - gpi = new GridParmInfo(id, this.outputGloc, GridType.SCALAR, - atts.getUnits(), atts.getLong_name(), minV, maxV, - precision, false, tc, rateParm); + sr.addMessage("Unknown PID: " + id.toString()); } sr.setPayload(gpi); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/TPCSurgeProb.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/TPCSurgeProb.xml index 05076bddc0..4742e6649f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/TPCSurgeProb.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/TPCSurgeProb.xml @@ -1,6 +1,7 @@ @@ -28,7 +29,7 @@ SURGE10pct -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -44,7 +45,7 @@ SURGE20pct -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -60,7 +61,7 @@ SURGE30pct -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -76,7 +77,7 @@ SURGE40pct -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -92,7 +93,7 @@ SURGE50pct -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -107,9 +108,9 @@ % percent ProbSurge25c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC @@ -122,9 +123,9 @@ % percent ProbSurge24c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC @@ -137,9 +138,9 @@ % percent ProbSurge23c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC @@ -152,9 +153,9 @@ % percent ProbSurge22c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC @@ -167,9 +168,9 @@ % percent ProbSurge21c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC @@ -182,9 +183,9 @@ % percent ProbSurge20c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -198,9 +199,9 @@ % percent ProbSurge19c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -214,9 +215,9 @@ % percent ProbSurge18c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -230,9 +231,9 @@ % percent ProbSurge17c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -246,9 +247,9 @@ % percent ProbSurge16c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -262,9 +263,9 @@ % percent ProbSurge15c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -278,9 +279,9 @@ % percent ProbSurge14c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -294,9 +295,9 @@ % percent ProbSurge13c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -310,9 +311,9 @@ % percent ProbSurge12c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -326,9 +327,9 @@ % percent ProbSurge11c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -342,9 +343,9 @@ % percent ProbSurge10c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -358,9 +359,9 @@ % percent ProbSurge09c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -374,9 +375,9 @@ % percent ProbSurge08c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -390,9 +391,9 @@ % percent ProbSurge07c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -406,9 +407,9 @@ % percent ProbSurge06c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -422,9 +423,9 @@ % percent ProbSurge05c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -438,9 +439,9 @@ % percent ProbSurge04c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -454,9 +455,9 @@ % percent ProbSurge03c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -470,9 +471,9 @@ % percent ProbSurge02c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 SFC 0 FHAG @@ -486,9 +487,9 @@ % percent ProbSurge01c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -501,9 +502,9 @@ % percent ProbSurge00c - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -519,7 +520,7 @@ SURGE10pct_incr -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -534,7 +535,7 @@ SURGE20pct_incr -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -549,7 +550,7 @@ SURGE30pct_incr -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -564,7 +565,7 @@ SURGE40pct_incr -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -579,7 +580,7 @@ SURGE50pct_incr -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -592,9 +593,9 @@ % percent ProbSurge20c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -607,9 +608,9 @@ % percent ProbSurge19c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -622,9 +623,9 @@ % percent ProbSurge18c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -637,9 +638,9 @@ % percent ProbSurge17c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -652,9 +653,9 @@ % percent ProbSurge16c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -667,9 +668,9 @@ % percent ProbSurge15c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -682,9 +683,9 @@ % percent ProbSurge14c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -697,9 +698,9 @@ % percent ProbSurge13c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -712,9 +713,9 @@ % percent ProbSurge12c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -727,9 +728,9 @@ % percent ProbSurge11c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -742,9 +743,9 @@ % percent ProbSurge10c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -757,9 +758,9 @@ % percent ProbSurge09c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -772,9 +773,9 @@ % percent ProbSurge08c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -787,9 +788,9 @@ % percent ProbSurge07c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -802,9 +803,9 @@ % percent ProbSurge06c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -817,9 +818,9 @@ % percent ProbSurge05c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -832,9 +833,9 @@ % percent ProbSurge04c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -847,9 +848,9 @@ % percent ProbSurge03c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -862,9 +863,9 @@ % percent ProbSurge02c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -877,9 +878,9 @@ % percent ProbSurge01c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG @@ -892,9 +893,9 @@ % percent ProbSurge00c_incr - 0.0 + -100.0 100.0 - -9999.0 + -999999.0 0 0 FHAG diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java index 1cfe4322e1..23e755f174 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java @@ -680,7 +680,7 @@ public class QCRecord extends PluginDataObject implements ISpatialEnabled { @Embeddable @DynamicSerialize - private static class FakePointDataView { + public static class FakePointDataView { @DynamicSerializeElement @Column(name = "idx") int curIdx;