Merged 13.5.5 -2 and -3 into 1412

Former-commit-id: 4e921dbeab89e61635144b441ae0015155376c59
This commit is contained in:
Brian.Dyke 2014-04-24 13:01:50 -04:00
parent 35ad867281
commit e82fc8f89c
24 changed files with 821 additions and 665 deletions

View file

@ -68,11 +68,6 @@
<actions>EXT</actions>
<actions>EXA</actions>
<actions>EXB</actions>
<phenSigs>SV.W</phenSigs>
<phenSigs>TO.W</phenSigs>
<pils>SVR</pils>
<pils>SVS</pils>
<pils>TOR</pils>
</currentAlerts>
<currentFont>SMALL_FONT</currentFont>
<currentFilter>
@ -92,38 +87,6 @@
<actions>EXB</actions>
<actions>EXT</actions>
</currentFilter>
<filters>
<item>
<key>filter-1</key>
<value>
<currentHazards>false</currentHazards>
<name>filter-1</name>
<combineGeoId>true</combineGeoId>
<combineSegments>true</combineSegments>
<combinePurgeTimes>false</combinePurgeTimes>
<combineActions>false</combineActions>
<includeAlerts>true</includeAlerts>
<includeMapSelections>true</includeMapSelections>
<includePastEvents>false</includePastEvents>
<includeOrgPilEvents>false</includeOrgPilEvents>
</value>
</item>
<item>
<key>filter-2</key>
<value>
<currentHazards>true</currentHazards>
<name>filter-2</name>
<combineGeoId>false</combineGeoId>
<combineSegments>false</combineSegments>
<combinePurgeTimes>true</combinePurgeTimes>
<combineActions>true</combineActions>
<includeAlerts>true</includeAlerts>
<includeMapSelections>true</includeMapSelections>
<includePastEvents>false</includePastEvents>
<includeOrgPilEvents>false</includeOrgPilEvents>
</value>
</item>
</filters>
<visibleColumns>ACTION</visibleColumns>
<visibleColumns>ETN</visibleColumns>
<visibleColumns>PHEN_SIG</visibleColumns>
@ -136,4 +99,5 @@
<!-- <visibleColumns>GEO_ID</visibleColumns>-->
<sortColumn>PURGE</sortColumn>
<descending>false</descending>
<identifyTestEvents>true</identifyTestEvents>
</ghgConfig>

View file

@ -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.
*
* </pre>
*
@ -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;
}
}

View file

@ -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.
*
* </pre>
*
@ -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<CacheGuidanceRequest> waitList;
/**
* Object to synchronize threads waiting on requests.
*/
private Object waitMonitor;
private Set<CacheGuidanceRequest> 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<String, Map<String, String>>();
waitMonitor = new Object();
suspendMonitor = new Object();
suspendJob = false;
waitList = new ArrayList<CacheGuidanceRequest>();
waitSet = new HashSet<CacheGuidanceRequest>();
}
/**
@ -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<CacheGuidanceRequest> cacheRequests) {
ArrayList<CacheGuidanceRequest> queueList = new ArrayList<CacheGuidanceRequest>();
Set<CacheGuidanceRequest> queueSet = new LinkedHashSet<CacheGuidanceRequest>(
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<String, Object> 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<String, Object> 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;

View file

@ -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.
*
* </pre>
*
@ -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;
}
}

View file

@ -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.
*
* </pre>
*
@ -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<StyleRange, String> syntaxMap = new HashMap<StyleRange, String>();
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);

View file

@ -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.
*
* </pre>
*
@ -212,6 +213,19 @@ public class GuidanceRequest extends QueueJobRequest<String[]> {
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)
*

View file

@ -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).
*
* </pre>
*
@ -127,8 +130,10 @@ public class MetarViewer extends ViewerTab implements
*/
private static final HashMap<String, String[]> alertMap = new HashMap<String, String[]>();
static {
//alertMap.put("cat", new String[] { "<vsby>", "</vsby>", "<sky>", "</sky>" }); // 14570
alertMap.put("tempo", new String[] { "<vsby>", "</vsby>", "<wind>", "</wind>", "<wx>", "</wx>", "<sky>", "</sky>" }); // 14570
// alertMap.put("cat", new String[] { "<vsby>", "</vsby>", "<sky>",
// "</sky>" }); // 14570
alertMap.put("tempo", new String[] { "<vsby>", "</vsby>", "<wind>",
"</wind>", "<wx>", "</wx>", "<sky>", "</sky>" }); // 14570
alertMap.put("vsby", new String[] { "<vsby>", "</vsby>" });
alertMap.put("wind", new String[] { "<wind>", "</wind>" });
alertMap.put("wx", new String[] { "<wx>", "</wx>" });
@ -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);
}
}
}
}

View file

@ -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.
*
* </pre>
*
@ -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<CacheGuidanceRequest> 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() {

View file

@ -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.
*
* </pre>
*
@ -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;
}
}

View file

@ -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.
*
* </pre>
*
@ -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 = "<Custom>";
@ -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();
}
});
*/
}
/**

View file

@ -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.
* </pre>
*
* @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() {

View file

@ -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;
}
}

View file

@ -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.
* </pre>
*
* @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<String, GhgDataFilter>();
visibleColumns = new ArrayList<DataEnum>(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<DataEnum>(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<String, GhgDataFilter>();
visibleColumns = new ArrayList<DataEnum>(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<String, GhgDataFilter>();
}
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;
}
/**
*
*/

View file

@ -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.
*
* </pre>
*
@ -439,6 +440,6 @@ public class GhgTableRowData implements Comparable<GhgTableRowData> {
* @return the testData
*/
public boolean isTestData() {
return GhgDisplayManager.getInstance().isIdentifyTestData();
return GhgConfigData.getInstance().isIdentifyTestEvents();
}
}

View file

@ -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.
*
* </pre>
*
@ -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());

View file

@ -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.
*
* </pre>
*
@ -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);

View file

@ -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.
*
* </pre>
*
@ -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) {

View file

@ -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.
* </pre>
*
* @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().

View file

@ -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.
* </pre>
*
* @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: "

View file

@ -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.
* </pre>
*
* @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());
}
}
}

View file

@ -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',

View file

@ -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.
*
* </pre>
*
@ -601,98 +602,14 @@ public class D2DGridDatabase extends VGridDatabase {
@Override
public ServerResponse<GridParmInfo> getGridParmInfo(ParmID id) {
ServerResponse<GridParmInfo> sr = new ServerResponse<GridParmInfo>();
GridParmInfo gpi = null;
String mappedModel = config.d2dModelNameMapping(id.getDbId()
.getModelName());
if (id.getParmName().equalsIgnoreCase("wind")) {
List<TimeRange> 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<String> accumParms = config.accumulativeD2DElements(dbId
.getModelName());
if (accumParms != null) {
if (accumParms.contains(atts.getShort_name())) {
accParm = true;
}
}
boolean rateParm = false;
// List<TimeRange> times = this.getGridInventory(id).getPayload();
List<TimeRange> 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);

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Mar 20, 2014 #2934 dgilling Added new parameters for PHISH/pSurge 2.0.
Apr 17, 2014 #2934 dgilling Fix fillValue and valid_range values.
-->
<gridParamInfo xmlns:ns2="group">
<valtimeMINUSreftime>
@ -28,7 +29,7 @@
<uiname>SURGE10pct</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -44,7 +45,7 @@
<uiname>SURGE20pct</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -60,7 +61,7 @@
<uiname>SURGE30pct</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -76,7 +77,7 @@
<uiname>SURGE40pct</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -92,7 +93,7 @@
<uiname>SURGE50pct</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -107,9 +108,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge25c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
@ -122,9 +123,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge24c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
@ -137,9 +138,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge23c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
@ -152,9 +153,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge22c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
@ -167,9 +168,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge21c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC</levelsDesc>
<levels>
@ -182,9 +183,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge20c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -198,9 +199,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge19c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -214,9 +215,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge18c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -230,9 +231,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge17c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -246,9 +247,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge16c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -262,9 +263,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge15c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -278,9 +279,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge14c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -294,9 +295,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge13c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -310,9 +311,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge12c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -326,9 +327,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge11c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -342,9 +343,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge10c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -358,9 +359,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge09c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -374,9 +375,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge08c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -390,9 +391,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge07c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -406,9 +407,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge06c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -422,9 +423,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge05c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -438,9 +439,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge04c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -454,9 +455,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge03c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -470,9 +471,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge02c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>SFC 0 FHAG</levelsDesc>
<levels>
@ -486,9 +487,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge01c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -501,9 +502,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge00c</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -519,7 +520,7 @@
<uiname>SURGE10pct_incr</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -534,7 +535,7 @@
<uiname>SURGE20pct_incr</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -549,7 +550,7 @@
<uiname>SURGE30pct_incr</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -564,7 +565,7 @@
<uiname>SURGE40pct_incr</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -579,7 +580,7 @@
<uiname>SURGE50pct_incr</uiname>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -592,9 +593,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge20c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -607,9 +608,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge19c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -622,9 +623,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge18c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -637,9 +638,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge17c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -652,9 +653,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge16c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -667,9 +668,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge15c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -682,9 +683,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge14c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -697,9 +698,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge13c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -712,9 +713,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge12c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -727,9 +728,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge11c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -742,9 +743,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge10c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -757,9 +758,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge09c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -772,9 +773,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge08c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -787,9 +788,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge07c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -802,9 +803,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge06c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -817,9 +818,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge05c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -832,9 +833,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge04c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -847,9 +848,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge03c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -862,9 +863,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge02c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -877,9 +878,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge01c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>
@ -892,9 +893,9 @@
<units>%</units>
<udunits>percent</udunits>
<uiname>ProbSurge00c_incr</uiname>
<valid_range>0.0</valid_range>
<valid_range>-100.0</valid_range>
<valid_range>100.0</valid_range>
<fillValue>-9999.0</fillValue>
<fillValue>-999999.0</fillValue>
<n3D>0</n3D>
<levelsDesc>0 FHAG</levelsDesc>
<levels>

View file

@ -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;