Merge branch 'master_14.4.1' into asm_14.4.1
Former-commit-id: 4a76f9bb72ade29ca23a158c0cb2ef038905fd07
This commit is contained in:
commit
08b89e7978
439 changed files with 9933 additions and 79826 deletions
|
@ -124,7 +124,7 @@ public class RadarServer implements RadarEventListener {
|
|||
addListener(new DedicatedRadarActivator(this));
|
||||
addListener(new RequestScheduler(this));
|
||||
addListener(new RadarServerAvailable(this));
|
||||
addListener(new RadarWatchdogListener(configuration));
|
||||
addListener(new RadarWatchdogListener(this));
|
||||
}
|
||||
|
||||
public void addListener(RadarEventListener l) {
|
||||
|
|
|
@ -29,7 +29,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.raytheon.rcm.config.Configuration;
|
||||
import com.raytheon.rcm.config.RadarConfig;
|
||||
import com.raytheon.rcm.server.StatusManager.RadarStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,6 +44,8 @@ import com.raytheon.rcm.config.Configuration;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------- ---------- ----------- --------------------------
|
||||
* May 12, 2014 DR 16319 dhuffman Initial creation.
|
||||
* Feb 10, 2015 DR 17112 D. Friedman Only alarm on dedicated radars and
|
||||
* once per detected failure.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -56,18 +59,16 @@ public class RadarWatchdog extends Thread {
|
|||
|
||||
protected static class GsmItem {
|
||||
protected String radarID;
|
||||
protected int vcp;
|
||||
protected long time;
|
||||
protected long alarmTime;
|
||||
protected long nextAlarmTime;
|
||||
protected int trackedVcp;
|
||||
protected int currentVcp;
|
||||
protected boolean failed;
|
||||
|
||||
protected GsmItem() {
|
||||
}
|
||||
}
|
||||
|
||||
protected static class RadarItem {
|
||||
protected String radarID;
|
||||
protected String mnemonic;
|
||||
protected boolean isNew;
|
||||
protected long time;
|
||||
protected long messageTime;
|
||||
|
||||
|
@ -75,7 +76,10 @@ public class RadarWatchdog extends Thread {
|
|||
}
|
||||
}
|
||||
|
||||
private long startTime = 0;
|
||||
protected static class WatchedRadar {
|
||||
|
||||
}
|
||||
|
||||
private long shortestWait = 0;
|
||||
private static final long fudgeTime = 30;
|
||||
|
||||
|
@ -84,13 +88,13 @@ public class RadarWatchdog extends Thread {
|
|||
private static Map<Integer, Integer> mapDuration = new ConcurrentHashMap<Integer, Integer>();
|
||||
private static List<String> mapMnemonicProducts = new ArrayList<String>();
|
||||
|
||||
protected Configuration configuration;
|
||||
protected RadarServer radarServer;
|
||||
private static String configFileName = "radarWatchdog.txt";
|
||||
|
||||
protected RadarWatchdog(Configuration conf) {
|
||||
protected RadarWatchdog(RadarServer radarServer) {
|
||||
super("Watchdog");
|
||||
setDaemon(true);
|
||||
startTime = System.currentTimeMillis();
|
||||
configuration = conf;
|
||||
this.radarServer = radarServer;
|
||||
|
||||
loadConfigFile(configFileName);
|
||||
|
||||
|
@ -102,112 +106,145 @@ public class RadarWatchdog extends Thread {
|
|||
}
|
||||
}
|
||||
|
||||
public GsmItem getGSMItem(final String radarID) {
|
||||
return mapGSM.get(radarID);
|
||||
}
|
||||
|
||||
public void putGSMItem(GsmItem gi) {
|
||||
if (gi != null) {
|
||||
mapGSM.put(gi.radarID, gi);
|
||||
}
|
||||
}
|
||||
|
||||
public RadarItem getRadarItem(final String Mnemonic, final String radarID) {
|
||||
Map<String, RadarItem> mapRadar = mapMnemonic.get(Mnemonic);
|
||||
if (mapRadar != null)
|
||||
return mapRadar.get(radarID);
|
||||
return null;
|
||||
}
|
||||
|
||||
public void putRadarItem(RadarItem ri) {
|
||||
if (ri != null) {
|
||||
Map<String, RadarItem> mapRadar = mapMnemonic.get(ri.mnemonic);
|
||||
if (mapRadar != null) {
|
||||
mapRadar.put(ri.radarID, ri);
|
||||
public synchronized void notifyGsm(String radarID, int vcp) {
|
||||
GsmItem item = mapGSM.get(radarID);
|
||||
if (item != null) {
|
||||
item.currentVcp = vcp;
|
||||
notifyWatchdog();
|
||||
} else {
|
||||
if (isTrackedRadar(radarID)) {
|
||||
item = new GsmItem();
|
||||
item.radarID = radarID;
|
||||
item.currentVcp = vcp;
|
||||
mapGSM.put(radarID, item);
|
||||
notifyWatchdog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isTrackedRadar(String radarID) {
|
||||
RadarConfig rc = radarServer.getConfiguration().getConfigForRadar(radarID);
|
||||
return rc != null && rc.isDedicated();
|
||||
}
|
||||
|
||||
public synchronized void notifyRadarItem(String radarID, String mnemonic, long messageTime, long time) {
|
||||
if (! isTrackedRadar(radarID))
|
||||
return;
|
||||
|
||||
RadarItem ri = getRadarItem(mnemonic, radarID);
|
||||
if (ri != null) {
|
||||
ri.isNew = false;
|
||||
ri.messageTime = messageTime;
|
||||
ri.time = time;
|
||||
}
|
||||
}
|
||||
|
||||
private RadarItem getRadarItem(final String mnemonic, final String radarID) {
|
||||
Map<String, RadarItem> mapRadar = mapMnemonic.get(mnemonic);
|
||||
if (mapRadar != null) {
|
||||
RadarItem ri = mapRadar.get(radarID);
|
||||
if (ri == null) {
|
||||
ri = new RadarItem();
|
||||
ri.isNew = true;
|
||||
mapRadar.put(radarID, ri);
|
||||
}
|
||||
return ri;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
long currentTime = 0;
|
||||
shortestWait = 0;
|
||||
while (true) {
|
||||
|
||||
try {
|
||||
synchronized (semifore) {
|
||||
semifore.wait(shortestWait < 800 ? 800 : shortestWait);
|
||||
currentTime = System.currentTimeMillis();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
patrol(currentTime);
|
||||
patrol(System.currentTimeMillis());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void patrol(long currentTime) {
|
||||
private synchronized void patrol(long currentTime) {
|
||||
long duration = 0;
|
||||
long adjustedTime = currentTime - fudgeTime;
|
||||
shortestWait = 0;
|
||||
long earliestCheckTime = 0;
|
||||
Iterator<GsmItem> git = mapGSM.values().iterator();
|
||||
while (git.hasNext()) {
|
||||
GsmItem gi = git.next();
|
||||
if (mapDuration.get(gi.vcp) != null) {
|
||||
duration = mapDuration.get(gi.vcp) * 1000;
|
||||
|
||||
Iterator<String> mnem = mapMnemonicProducts.iterator();
|
||||
while (mnem.hasNext()) {
|
||||
String mn = mnem.next();
|
||||
Map<String, RadarItem> mapRadar = mapMnemonic.get(mn);
|
||||
if (mapRadar == null)
|
||||
continue;
|
||||
RadarItem ri = mapRadar.get(gi.radarID);
|
||||
if (! isTrackedRadar(gi.radarID)) {
|
||||
git.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ri == null) {
|
||||
if (duration + startTime < adjustedTime
|
||||
&& gi.alarmTime != startTime) {
|
||||
alert(duration, gi, mn);
|
||||
gi.alarmTime = startTime;
|
||||
gi.nextAlarmTime = startTime + duration;
|
||||
}
|
||||
|
||||
if (shortestWait < 1 || duration < shortestWait)
|
||||
shortestWait = duration;
|
||||
}
|
||||
/* There will be an alarm when the radar connection goes down, so
|
||||
* do not do any additional alarming.
|
||||
*/
|
||||
RadarStatus rs = radarServer.getStatusManager().getRadarStatus(gi.radarID);
|
||||
if (rs != null && rs.getCurrentGSM() == null) {
|
||||
gi.trackedVcp = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gi.currentVcp != gi.trackedVcp) {
|
||||
for (String mn : mapMnemonicProducts) {
|
||||
RadarItem ri = getRadarItem(mn, gi.radarID);
|
||||
if (ri != null) {
|
||||
ri.isNew = true;
|
||||
}
|
||||
}
|
||||
gi.trackedVcp = gi.currentVcp;
|
||||
}
|
||||
|
||||
if (ri.time + duration < adjustedTime) {
|
||||
if (ri.time <= gi.alarmTime
|
||||
&& gi.nextAlarmTime < currentTime) {
|
||||
alert(duration, gi, ri.mnemonic);
|
||||
gi.alarmTime = ri.time;
|
||||
gi.nextAlarmTime = currentTime + duration;
|
||||
}
|
||||
if (gi.nextAlarmTime < currentTime)
|
||||
gi.alarmTime = ri.time;
|
||||
}
|
||||
if (mapDuration.get(gi.trackedVcp) != null) {
|
||||
boolean allOk = true;
|
||||
duration = (mapDuration.get(gi.trackedVcp) + fudgeTime) * 1000;
|
||||
|
||||
if ((duration + ri.time) - adjustedTime < shortestWait
|
||||
&& 1 <= (duration + ri.time) - adjustedTime)
|
||||
shortestWait = (duration + ri.time) - adjustedTime;
|
||||
if (shortestWait < 1)
|
||||
shortestWait = duration;
|
||||
for (String mn : mapMnemonicProducts) {
|
||||
RadarItem ri = getRadarItem(mn, gi.radarID);
|
||||
if (ri == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ri.isNew) {
|
||||
ri.isNew = false;
|
||||
ri.time = currentTime;
|
||||
} else {
|
||||
long diff = currentTime - ri.time;
|
||||
if (diff < duration) {
|
||||
long nextTime = ri.time + duration;
|
||||
if (earliestCheckTime == 0 || nextTime < earliestCheckTime) {
|
||||
earliestCheckTime = nextTime;
|
||||
}
|
||||
} else {
|
||||
allOk = false;
|
||||
alert(duration, gi, mn);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (allOk) {
|
||||
gi.failed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shortestWait = earliestCheckTime > 0 ? earliestCheckTime - currentTime : 0;
|
||||
}
|
||||
|
||||
private void alert(final long duration, final GsmItem gi, final String mn) {
|
||||
String AlertVizMessage = "Watchdog: Radar ";
|
||||
AlertVizMessage += gi.radarID + " has not produced a '" + mn
|
||||
+ "' product in the last " + duration / 1000 + " seconds.";
|
||||
RadarServerAvailable.sendNotification(gi.radarID, AlertVizMessage);
|
||||
if (! gi.failed) {
|
||||
gi.failed = true;
|
||||
String AlertVizMessage = "Watchdog: Radar ";
|
||||
AlertVizMessage += gi.radarID + " has not produced a '" + mn
|
||||
+ "' product in the last " + duration / 1000 + " seconds.";
|
||||
RadarServerAvailable.sendNotification(gi.radarID, AlertVizMessage);
|
||||
}
|
||||
}
|
||||
|
||||
public void notifyWatchdog() {
|
||||
|
@ -218,7 +255,8 @@ public class RadarWatchdog extends Thread {
|
|||
|
||||
private boolean loadConfigFile(final String filename) {
|
||||
try {
|
||||
InputStream inFile = configuration.getDropInData(filename);
|
||||
InputStream inFile = radarServer.getConfiguration().
|
||||
getDropInData(filename);
|
||||
InputStreamReader reader = new InputStreamReader(inFile);
|
||||
BufferedReader in = new BufferedReader(reader);
|
||||
String line;
|
||||
|
|
|
@ -44,6 +44,8 @@ import com.raytheon.rcm.server.RadarWatchdog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------- ---------- ----------- --------------------------
|
||||
* May 12, 2014 DR 16319 dhuffman Initial creation.
|
||||
* Feb 10, 2015 DR 17112 D. Friedman Only alarm on dedicated radars and
|
||||
* once per detected failure.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -61,8 +63,8 @@ public class RadarWatchdogListener extends RadarEventAdapter {
|
|||
mnemonicMap.put("HSW", "SW");
|
||||
}
|
||||
|
||||
public RadarWatchdogListener(Configuration configuration) {
|
||||
radarWatchdog = new RadarWatchdog(configuration);
|
||||
public RadarWatchdogListener(RadarServer radarServer) {
|
||||
radarWatchdog = new RadarWatchdog(radarServer);
|
||||
radarWatchdog.start();
|
||||
}
|
||||
|
||||
|
@ -81,25 +83,14 @@ public class RadarWatchdogListener extends RadarEventAdapter {
|
|||
}
|
||||
|
||||
if (gsm != null) {
|
||||
RadarWatchdog.GsmItem gi = new RadarWatchdog.GsmItem();
|
||||
gi.radarID = event.getRadarID();
|
||||
gi.vcp = gsm.vcp;
|
||||
gi.time = gsm.time.getTimeInMillis();
|
||||
|
||||
RadarWatchdog.GsmItem oldgi = radarWatchdog
|
||||
.getGSMItem(gi.radarID);
|
||||
if (oldgi == null
|
||||
|| (oldgi != null && oldgi.time <= gi.time)) {
|
||||
radarWatchdog.putGSMItem(gi);
|
||||
}
|
||||
radarWatchdog.notifyGsm(event.getRadarID(), gsm.vcp);
|
||||
}
|
||||
|
||||
} else if (16 <= messageCode) {
|
||||
int mcode = 0;
|
||||
PDB pdb = null;
|
||||
RadarWatchdog.RadarItem ri = new RadarWatchdog.RadarItem();
|
||||
mcode = Message.messageCodeOf(msg);
|
||||
ri.messageTime = (Message.decodeHeader(msg).time)
|
||||
long messageTime = (Message.decodeHeader(msg).time)
|
||||
.getTimeInMillis();
|
||||
|
||||
RadarProduct rp = ProductInfo.getInstance().getPoductForCode(
|
||||
|
@ -107,10 +98,9 @@ public class RadarWatchdogListener extends RadarEventAdapter {
|
|||
if (rp == null)
|
||||
return;
|
||||
|
||||
ri.mnemonic = rp.mnemonic;
|
||||
String newMnemonic = mnemonicMap.get(ri.mnemonic);
|
||||
if (newMnemonic != null)
|
||||
ri.mnemonic = newMnemonic;
|
||||
String mnemonic = mnemonicMap.get(rp.mnemonic);
|
||||
if (mnemonic == null)
|
||||
mnemonic = rp.mnemonic;
|
||||
|
||||
try {
|
||||
pdb = GraphicProduct.pdbOfMessage(msg);
|
||||
|
@ -120,17 +110,8 @@ public class RadarWatchdogListener extends RadarEventAdapter {
|
|||
}
|
||||
|
||||
if (pdb != null) {
|
||||
ri.radarID = event.getRadarID();
|
||||
ri.time = System.currentTimeMillis();
|
||||
|
||||
RadarWatchdog.RadarItem oldri = radarWatchdog.getRadarItem(
|
||||
ri.mnemonic, ri.radarID);
|
||||
|
||||
if (oldri == null
|
||||
|| (oldri != null && oldri.messageTime <= ri.messageTime)) {
|
||||
radarWatchdog.putRadarItem(ri);
|
||||
radarWatchdog.notifyWatchdog();
|
||||
}
|
||||
radarWatchdog.notifyRadarItem(event.getRadarID(), mnemonic,
|
||||
messageTime, System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -41,8 +41,8 @@ SET A2_JAVA_REG=
|
|||
SET A2_PYTHON_REG=
|
||||
|
||||
REM Determine where we will be logging to.
|
||||
SET HOME_DIRECTORY=%HOMEDRIVE%%HOMEPATH%
|
||||
SET CAVEDATA_LOG_DIRECTORY=%HOMEDRIVE%%HOMEPATH%\caveData\logs
|
||||
SET HOME_DIRECTORY=%USERPROFILE%
|
||||
SET CAVEDATA_LOG_DIRECTORY=%HOME_DIRECTORY%\caveData\logs
|
||||
SET CONSOLE_LOG_DIRECTORY=%CAVEDATA_LOG_DIRECTORY%\consoleLogs\%COMPUTERNAME%
|
||||
IF NOT EXIST "%CONSOLE_LOG_DIRECTORY%" (MKDIR "%CONSOLE_LOG_DIRECTORY%")
|
||||
|
||||
|
@ -58,6 +58,10 @@ REM instead of -formatter- strings like Linux allows.
|
|||
python -c "from datetime import datetime; print datetime.now().strftime('%%Y%%m%%d_%%H%%M%%S');" > %RND_DATETIME_FILE%
|
||||
SET /p LOG_DATETIME= < %RND_DATETIME_FILE%
|
||||
DEL %RND_DATETIME_FILE%
|
||||
|
||||
SET LOGFILE_CONSOLE=%CAVEDATA_LOG_DIRECTORY%\alertviz_%LOG_DATETIME%_console.log
|
||||
SET LOGFILE_ALERTVIZ=%CAVEDATA_LOG_DIRECTORY%\alertviz_%LOG_DATETIME%_admin.log
|
||||
|
||||
"%CONTAINING_DIRECTORY%alertviz.exe" %* > "%CONSOLE_LOG_DIRECTORY%\alertviz_%LOG_DATETIME%.log" 2>&1
|
||||
IF %ERRORLEVEL% == 0 (EXIT)
|
||||
echo Restarting AlertViz.
|
||||
|
|
|
@ -44,8 +44,8 @@ SET A2_JAVA_REG=
|
|||
SET A2_PYTHON_REG=
|
||||
|
||||
REM Determine where we will be logging to.
|
||||
SET HOME_DIRECTORY=%HOMEDRIVE%%HOMEPATH%
|
||||
SET CAVEDATA_LOG_DIRECTORY=%HOMEDRIVE%%HOMEPATH%\caveData\logs
|
||||
SET HOME_DIRECTORY=%USERPROFILE%
|
||||
SET CAVEDATA_LOG_DIRECTORY=%HOME_DIRECTORY%\caveData\logs
|
||||
SET CONSOLE_LOG_DIRECTORY=%CAVEDATA_LOG_DIRECTORY%\consoleLogs\%COMPUTERNAME%
|
||||
IF NOT EXIST "%CONSOLE_LOG_DIRECTORY%" (MKDIR "%CONSOLE_LOG_DIRECTORY%")
|
||||
|
||||
|
@ -59,6 +59,11 @@ python -c "from datetime import datetime; print datetime.now().strftime('%%Y%%m%
|
|||
SET /p LOG_DATETIME= < %RND_DATETIME_FILE%
|
||||
DEL %RND_DATETIME_FILE%
|
||||
|
||||
SET LOGFILE_CAVE=%CAVEDATA_LOG_DIRECTORY%\cave_%LOG_DATETIME%_logs.log
|
||||
SET LOGFILE_CONSOLE=%CAVEDATA_LOG_DIRECTORY%\cave_%LOG_DATETIME%_console.log
|
||||
SET LOGFILE_PERFORMANCE=%CAVEDATA_LOG_DIRECTORY%\cave_%LOG_DATETIME%_perf.log
|
||||
SET LOGFILE_PRODUCT_EDITOR=%CAVEDATA_LOG_DIRECTORY%\cave_%LOG_DATETIME%_productEditor.log
|
||||
|
||||
echo THIS CMD WINDOW CAN BE CLOSED AT ANY TIME!
|
||||
cd %HOMEPATH%
|
||||
REM Start CAVE.
|
||||
|
|
|
@ -108,6 +108,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
|
|||
* May 14, 2014 3061 bclement added better checks for when to send invite/session payloads
|
||||
* Jun 16, 2014 3288 bclement feed venue configuration changes
|
||||
* Jun 17, 2014 3078 bclement peer to peer communication uses private chat
|
||||
* Feb 12, 2015 4117 bclement fixed 14.3/14.4 peer-to-peer messaging
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -232,10 +233,6 @@ public class SharedDisplaySession extends VenueSession implements
|
|||
if (obj == null) {
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* TODO it would be nice to use MUC private chat for this, but it would
|
||||
* break backwards compatibility
|
||||
*/
|
||||
boolean doSend = true;
|
||||
if (hasRole(SharedDisplayRole.DATA_PROVIDER)
|
||||
&& !isSharedDisplayClient(participant)) {
|
||||
|
@ -248,9 +245,20 @@ public class SharedDisplaySession extends VenueSession implements
|
|||
doSend = false;
|
||||
}
|
||||
if (doSend) {
|
||||
String to;
|
||||
/*
|
||||
* clients older than 14.4 expect peer to peer messages sent
|
||||
* directly to the user ID. When all clients are 14.4 or above it
|
||||
* will be safe to always send to the room handle.
|
||||
*/
|
||||
if (participant.hasActualUserId()) {
|
||||
to = participant.getUserid().getFQName();
|
||||
} else {
|
||||
to = participant.getFQName();
|
||||
}
|
||||
SessionPayload payload = new SessionPayload(PayloadType.Command,
|
||||
obj);
|
||||
Message msg = new Message(participant.getFQName(), Type.normal);
|
||||
Message msg = new Message(to, Type.normal);
|
||||
msg.addExtension(payload);
|
||||
msg.setFrom(conn.getUser());
|
||||
msg.setProperty(Tools.PROP_SESSION_ID, getSessionId());
|
||||
|
|
|
@ -72,6 +72,7 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
|
|||
* to display messages.
|
||||
* Jun 16, 2014 3288 bclement feed venue configuration changes
|
||||
* Oct 08, 2014 3705 bclement moved venue joining code to CollaborationConnection
|
||||
* Mar 10, 2015 4238 njensen null check in getSessionId()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -109,12 +110,15 @@ public class DisplayFeedAction extends Action {
|
|||
CollaborationConnection connection = CollaborationConnection
|
||||
.getConnection();
|
||||
String sessionId = null;
|
||||
for (ISession session : connection.getSessions()) {
|
||||
if (session instanceof IVenueSession) {
|
||||
FeedVenueConfig config = FeedVenueConfigManager.getConfig();
|
||||
if (((IVenueSession) session).getVenueName().equalsIgnoreCase(
|
||||
config.getName())) {
|
||||
sessionId = session.getSessionId();
|
||||
// connection can be null in rare cases
|
||||
if (connection != null) {
|
||||
for (ISession session : connection.getSessions()) {
|
||||
if (session instanceof IVenueSession) {
|
||||
FeedVenueConfig config = FeedVenueConfigManager.getConfig();
|
||||
if (((IVenueSession) session).getVenueName()
|
||||
.equalsIgnoreCase(config.getName())) {
|
||||
sessionId = session.getSessionId();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ import org.eclipse.swt.widgets.Display;
|
|||
import org.eclipse.swt.widgets.FileDialog;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Layout;
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
|
@ -69,6 +68,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Mar 05, 2014 2632 mpduff Changed task set to map of user->task.
|
||||
* Mar 27, 2014 2632 mpduff Sorted users in combo box, changed how Add action works.
|
||||
* Jun 12, 2014 3269 mpduff Changed to use the unsaved values upon open.
|
||||
* Feb 25, 2015 4154 mapeters Added null check in constructor, removed editFlag field.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -82,10 +82,10 @@ public class AddNotifierDlg extends CaveSWTDialog {
|
|||
private final String[] userIds;
|
||||
|
||||
/** Map of buttons to Notifiers */
|
||||
private final Map<Button, Notifier> buttonMap = new HashMap<Button, Notifier>();
|
||||
private final Map<Button, Notifier> buttonMap = new HashMap<>();
|
||||
|
||||
/** Set of NotifierTask objects */
|
||||
private Map<String, NotifierTask> taskMap = new HashMap<String, NotifierTask>();
|
||||
private Map<String, NotifierTask> taskMap;
|
||||
|
||||
/** The user select Combo box */
|
||||
private Combo userCbo;
|
||||
|
@ -102,28 +102,28 @@ public class AddNotifierDlg extends CaveSWTDialog {
|
|||
/** Close callback */
|
||||
private final ICloseCallback callback;
|
||||
|
||||
/** Flag for dialog mode, edit or new */
|
||||
private boolean editFlag;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param parent
|
||||
* @param userIds
|
||||
* @param editFlag
|
||||
* Flag for dialog mode (edit or new)
|
||||
* @param taskMap
|
||||
* @param callback
|
||||
*/
|
||||
public AddNotifierDlg(Shell parent, String[] userIds, boolean editFlag, Map<String, NotifierTask> taskMap,
|
||||
ICloseCallback callback) {
|
||||
public AddNotifierDlg(Shell parent, String[] userIds, boolean editFlag,
|
||||
Map<String, NotifierTask> taskMap, ICloseCallback callback) {
|
||||
super(parent, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK);
|
||||
if (editFlag) {
|
||||
setText("Edit Notifier");
|
||||
setText("Edit Notifier");
|
||||
} else {
|
||||
setText("Add Notifier");
|
||||
setText("Add Notifier");
|
||||
}
|
||||
this.userIds = userIds;
|
||||
this.callback = callback;
|
||||
this.editFlag = editFlag;
|
||||
this.taskMap = taskMap;
|
||||
this.taskMap = taskMap == null ? new HashMap<String, NotifierTask>()
|
||||
: taskMap;
|
||||
}
|
||||
|
||||
public AddNotifierDlg(Shell parent, String[] userIds) {
|
||||
|
@ -319,7 +319,7 @@ public class AddNotifierDlg extends CaveSWTDialog {
|
|||
|
||||
GridData btnData = new GridData(75, SWT.DEFAULT);
|
||||
Button okBtn = new Button(comp, SWT.PUSH);
|
||||
okBtn.setText("OK");
|
||||
okBtn.setText("OK");
|
||||
okBtn.setLayoutData(btnData);
|
||||
okBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
|
|
@ -22,8 +22,11 @@ package com.raytheon.uf.viz.hpe.rsc;
|
|||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
|
@ -32,6 +35,7 @@ import org.eclipse.core.runtime.jobs.Job;
|
|||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
|
||||
import com.raytheon.uf.common.plugin.hpe.data.HpeLabelKey;
|
||||
import com.raytheon.uf.common.plugin.hpe.request.HpeLabelDataRequest;
|
||||
import com.raytheon.uf.common.plugin.hpe.request.HpeLabelDataResponse;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -66,6 +70,7 @@ import com.raytheon.viz.grid.rsc.general.D2DGridResource;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* May 5, 2014 3026 mpduff Initial creation
|
||||
* Dec 16, 2014 3026 mpduff Change location of text
|
||||
* Feb 13, 2015 4121 mpduff Change label caching.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -80,8 +85,8 @@ public class HpeLabelResource extends
|
|||
private final IUFStatusHandler logger = UFStatus
|
||||
.getHandler(HpeLabelResource.class);
|
||||
|
||||
private final Map<Date, String> hpeTextCache = Collections
|
||||
.synchronizedMap(new HashMap<Date, String>());
|
||||
private final Map<HpeLabelKey, String> hpeTextCache = Collections
|
||||
.synchronizedMap(new HashMap<HpeLabelKey, String>());
|
||||
|
||||
private DrawableString drawableString = null;
|
||||
|
||||
|
@ -98,7 +103,16 @@ public class HpeLabelResource extends
|
|||
public void resourceChanged(ChangeType type, Object object) {
|
||||
if (type == ChangeType.DATA_REMOVE) {
|
||||
if (object instanceof DataTime) {
|
||||
hpeTextCache.remove(((DataTime) object).getRefTime());
|
||||
Set<Entry<HpeLabelKey, String>> entrySet = hpeTextCache
|
||||
.entrySet();
|
||||
Iterator<Entry<HpeLabelKey, String>> iter = entrySet.iterator();
|
||||
while (iter.hasNext()) {
|
||||
Entry<HpeLabelKey, String> entry = iter.next();
|
||||
HpeLabelKey key = entry.getKey();
|
||||
if (key.getDate().equals(((DataTime) object).getRefTime())) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +177,8 @@ public class HpeLabelResource extends
|
|||
}
|
||||
|
||||
private String getText(Date date, String productId) {
|
||||
String text = hpeTextCache.get(date);
|
||||
HpeLabelKey key = new HpeLabelKey(productId, date);
|
||||
String text = hpeTextCache.get(key);
|
||||
if (text == null) {
|
||||
dataJob.scheduleRetrieval(date, productId);
|
||||
}
|
||||
|
@ -214,7 +229,8 @@ public class HpeLabelResource extends
|
|||
.sendRequest(req);
|
||||
Map<Date, String> data = response.getData();
|
||||
for (Date d : data.keySet()) {
|
||||
hpeTextCache.put(d, data.get(d));
|
||||
HpeLabelKey key = new HpeLabelKey(productId, d);
|
||||
hpeTextCache.put(key, data.get(d));
|
||||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler.error(e.getLocalizedMessage(), e);
|
||||
|
@ -223,4 +239,4 @@ public class HpeLabelResource extends
|
|||
return Status.OK_STATUS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -81,6 +81,7 @@ import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager;
|
|||
import com.raytheon.uf.common.monitor.xml.DomainXML;
|
||||
import com.raytheon.uf.common.monitor.xml.ProductXML;
|
||||
import com.raytheon.uf.common.monitor.xml.SourceXML;
|
||||
import com.raytheon.uf.common.plugin.hpe.data.HpeLabelKey;
|
||||
import com.raytheon.uf.common.plugin.hpe.request.HpeLabelDataRequest;
|
||||
import com.raytheon.uf.common.plugin.hpe.request.HpeLabelDataResponse;
|
||||
import com.raytheon.uf.common.status.IPerformanceStatusHandler;
|
||||
|
@ -91,7 +92,6 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.time.util.ITimer;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.StringUtil;
|
||||
import com.raytheon.uf.viz.core.DrawableLine;
|
||||
import com.raytheon.uf.viz.core.DrawableString;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
|
@ -198,7 +198,8 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* assignments.
|
||||
* Sep 23, 2014 3009 njensen Overrode recycleInternal()
|
||||
* Nov 10, 2014 3026 dhladky HPE BIAS displays.
|
||||
* Dec 16, 2014 3026 mpduff Change location of text
|
||||
* Dec 16, 2014 3026 mpduff Change location of text.
|
||||
* Feb 13, 2015 4121 mpduff Change label caching.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -268,6 +269,9 @@ public class FFMPResource extends
|
|||
/** HPE Constant */
|
||||
private static final String HPE = "HPE";
|
||||
|
||||
/** BiasHPE Constant */
|
||||
private static final String BHPE = "BHPE";
|
||||
|
||||
/** the stream cross hatched area **/
|
||||
private IWireframeShape streamOutlineShape = null;
|
||||
|
||||
|
@ -424,6 +428,8 @@ public class FFMPResource extends
|
|||
|
||||
private DrawableString basinLocatorString = null;
|
||||
|
||||
private DrawableString hpeLabelString = null;
|
||||
|
||||
private RGB basinTraceColor = null;
|
||||
|
||||
private RGB basinBoundaryColor = null;
|
||||
|
@ -440,8 +446,12 @@ public class FFMPResource extends
|
|||
private boolean restoreTable = false;
|
||||
|
||||
/** HPE bias source legend cache */
|
||||
private final Map<Date, String> hpeLegendMap = Collections
|
||||
.synchronizedMap(new HashMap<Date, String>());
|
||||
private final Map<HpeLabelKey, String> hpeLegendMap = Collections
|
||||
.synchronizedMap(new HashMap<HpeLabelKey, String>());
|
||||
|
||||
/** Lookup of Date to product ids displaying for that date */
|
||||
private final Map<Date, List<String>> hpeCacheLookup = Collections
|
||||
.synchronizedMap(new HashMap<Date, List<String>>());
|
||||
|
||||
/** Flag denoting data as HPE */
|
||||
private boolean isHpe;
|
||||
|
@ -538,11 +548,30 @@ public class FFMPResource extends
|
|||
PluginDataObject[] pdos = (PluginDataObject[]) object;
|
||||
for (PluginDataObject pdo : pdos) {
|
||||
FFMPRecord ffmpRec = (FFMPRecord) pdo;
|
||||
hpeLegendMap.remove(ffmpRec.getDataTime().getRefTime());
|
||||
Date date = ffmpRec.getDataTime().getRefTime();
|
||||
removeHpeLabels(date);
|
||||
}
|
||||
} else if (object instanceof DataTime) {
|
||||
DataTime dt = (DataTime) object;
|
||||
hpeLegendMap.remove(dt.getRefTime());
|
||||
removeHpeLabels(dt.getRefTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the labels in the cache for the given time and product.
|
||||
*
|
||||
* @param date
|
||||
* The time to remove
|
||||
* @param productId
|
||||
* The product to remove
|
||||
*/
|
||||
private void removeHpeLabels(Date date) {
|
||||
List<String> products = hpeCacheLookup.remove(date);
|
||||
if (products != null) {
|
||||
for (String product : products) {
|
||||
HpeLabelKey key = new HpeLabelKey(product, date);
|
||||
hpeLegendMap.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1253,12 +1282,19 @@ public class FFMPResource extends
|
|||
basinLocatorString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
basinLocatorString.verticallAlignment = VerticalAlignment.MIDDLE;
|
||||
basinLocatorString.addTextStyle(TextStyle.BLANKED);
|
||||
|
||||
hpeLabelString = new DrawableString("", getCapability(
|
||||
ColorableCapability.class).getColor());
|
||||
hpeLabelString.font = font;
|
||||
hpeLabelString.horizontalAlignment = HorizontalAlignment.CENTER;
|
||||
hpeLabelString.verticallAlignment = VerticalAlignment.TOP;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Set flag for HPE data
|
||||
isHpe = resourceData.siteKey.equalsIgnoreCase(HPE)
|
||||
|| resourceData.siteKey.equalsIgnoreCase("BHPE");
|
||||
isHpe = resourceData.dataKey.equalsIgnoreCase(HPE)
|
||||
|| resourceData.dataKey.equalsIgnoreCase(BHPE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1479,6 +1515,24 @@ public class FFMPResource extends
|
|||
paintUpAndDownStream(aTarget, paintProps);
|
||||
}
|
||||
|
||||
// draw hpe strings if HPE
|
||||
if (isHpe) {
|
||||
// Paint the HPE bias source text if HPE
|
||||
String text = getHpeText(paintTime.getRefTime());
|
||||
|
||||
if (text != null && text.trim().length() > 0) {
|
||||
double[] pixel = paintProps.getView().getDisplayCoords(
|
||||
new double[] { 110, 120 }, aTarget);
|
||||
hpeLabelString
|
||||
.setText(text,
|
||||
getCapability(ColorableCapability.class)
|
||||
.getColor());
|
||||
hpeLabelString.setCoordinates(pixel[0], pixel[1]);
|
||||
aTarget.drawStrings(hpeLabelString);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// always reset
|
||||
isQuery = false;
|
||||
} finally {
|
||||
|
@ -1503,15 +1557,6 @@ public class FFMPResource extends
|
|||
.append(FFMPRecord.getFieldLongDescription(getField()));
|
||||
}
|
||||
|
||||
// Paint the HPE bias source text if HPE
|
||||
if (isHpe && qpeRecord != null) {
|
||||
String text = getText(paintTime.getRefTime());
|
||||
if (text != null) {
|
||||
sb.append(StringUtil.NEWLINE);
|
||||
sb.append(text);
|
||||
}
|
||||
}
|
||||
|
||||
fieldDescString.setText(sb.toString(),
|
||||
getCapability(ColorableCapability.class).getColor());
|
||||
fieldDescString.setCoordinates(pixel[0], pixel[1]);
|
||||
|
@ -4178,14 +4223,44 @@ public class FFMPResource extends
|
|||
* @param date
|
||||
* @return
|
||||
*/
|
||||
private String getText(Date date) {
|
||||
String text = hpeLegendMap.get(date);
|
||||
private String getHpeText(Date date) {
|
||||
List<String> products = hpeCacheLookup.get(date);
|
||||
if (products == null) {
|
||||
products = new ArrayList<String>(0);
|
||||
}
|
||||
HpeLabelKey key = new HpeLabelKey();
|
||||
key.setDate(date);
|
||||
for (String product : products) {
|
||||
key.setProductName(product);
|
||||
}
|
||||
String text = hpeLegendMap.get(key);
|
||||
if (text == null) {
|
||||
FFMPRecord hpeQpeRecord = getQpeRecord();
|
||||
String wfo = null;
|
||||
String siteKey = null;
|
||||
String dataKey = null;
|
||||
String sourceName = null;
|
||||
|
||||
if (qpeRecord != null) {
|
||||
wfo = qpeRecord.getWfo();
|
||||
siteKey = qpeRecord.getSiteKey();
|
||||
dataKey = qpeRecord.getDataKey();
|
||||
sourceName = qpeRecord.getSourceName();
|
||||
} else if (qpfRecord != null) {
|
||||
wfo = qpfRecord.getWfo();
|
||||
siteKey = qpfRecord.getSiteKey();
|
||||
dataKey = qpfRecord.getDataKey();
|
||||
sourceName = qpfRecord.getSourceName();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
String productId = monitor.getProductID(paintTime.getRefTime(),
|
||||
hpeQpeRecord.getWfo(), hpeQpeRecord.getSiteKey(),
|
||||
hpeQpeRecord.getDataKey(), hpeQpeRecord.getSourceName());
|
||||
wfo, siteKey, dataKey, sourceName);
|
||||
dataJob.scheduleRetrieval(date, productId);
|
||||
statusHandler.info("Loading product " + productId);
|
||||
}
|
||||
|
||||
if (text == null) {
|
||||
text = "";
|
||||
}
|
||||
|
||||
return text;
|
||||
|
@ -4237,7 +4312,12 @@ public class FFMPResource extends
|
|||
.sendRequest(req);
|
||||
Map<Date, String> data = response.getData();
|
||||
for (Date d : data.keySet()) {
|
||||
hpeLegendMap.put(d, data.get(d));
|
||||
HpeLabelKey key = new HpeLabelKey(productId, d);
|
||||
hpeLegendMap.put(key, data.get(d));
|
||||
if (!hpeCacheLookup.containsKey(d)) {
|
||||
hpeCacheLookup.put(d, new ArrayList<String>());
|
||||
}
|
||||
hpeCacheLookup.get(d).add(productId);
|
||||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler.error(e.getLocalizedMessage(), e);
|
||||
|
|
|
@ -29,6 +29,9 @@ import java.util.SortedMap;
|
|||
import java.util.TreeMap;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
|
@ -37,6 +40,7 @@ import com.raytheon.uf.common.dataplugin.fog.FogRecord.FOG_THREAT;
|
|||
import com.raytheon.uf.common.geospatial.SpatialException;
|
||||
import com.raytheon.uf.common.monitor.MonitorAreaUtils;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.AdjacentWfoMgr;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -48,6 +52,7 @@ import com.raytheon.uf.viz.monitor.IMonitor;
|
|||
import com.raytheon.uf.viz.monitor.Monitor;
|
||||
import com.raytheon.uf.viz.monitor.ObsMonitor;
|
||||
import com.raytheon.uf.viz.monitor.data.AreaContainer;
|
||||
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
|
||||
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
|
||||
import com.raytheon.uf.viz.monitor.data.ObReport;
|
||||
import com.raytheon.uf.viz.monitor.data.ObsData;
|
||||
|
@ -59,6 +64,7 @@ import com.raytheon.uf.viz.monitor.fog.threshold.FogThresholdMgr;
|
|||
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
|
||||
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogZoneTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||
import com.raytheon.uf.viz.monitor.util.MonitorThresholdConfiguration;
|
||||
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
@ -82,11 +88,9 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Oct.31 2012 1297 skorolev Clean code
|
||||
* Feb 15, 2013 1638 mschenke Changed code to reference DataURI.SEPARATOR instead of URIFilter
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Sep 04, 2014 3220 skorolev
|
||||
* Sep 23, 2014 3356 njensen Remove unnecessary import
|
||||
* Jan 27, 2015 3220 skorolev Corrected fogConfig assignment.Moved refreshing of table in the UI thread.
|
||||
* Updated configUpdate method and added updateMonitoringArea.
|
||||
* Replaced MonitoringArea with fogConfig.Updated code for better performance.
|
||||
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
* Sep 23, 2014 3356 njensen Remove unnecessary import
|
||||
* Mar 09, 2014 3888 dhladky Stopped processing when dialogs are null or disposed.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -104,12 +108,21 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
/** Singleton instance of this class */
|
||||
private static FogMonitor monitor = null;
|
||||
|
||||
/**
|
||||
* This object contains all observation data necessary for the table dialogs
|
||||
* and trending plots [this replaces the objects of ObsData and TableData
|
||||
* below Jan 21, 2010, zhao]
|
||||
*/
|
||||
private ObMultiHrsReports obData;
|
||||
|
||||
/** data holder for FOG **/
|
||||
private ObsData obsData;
|
||||
|
||||
/** data holder for FOG ALG data **/
|
||||
private SortedMap<Date, Map<String, FOG_THREAT>> algorithmData = null;
|
||||
|
||||
private Date dialogTime = null;
|
||||
|
||||
/** list of coordinates for each zone **/
|
||||
private Map<String, Geometry> zoneGeometries = null;
|
||||
|
||||
|
@ -120,7 +133,7 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
private MonitoringAreaConfigDlg areaDialog = null;
|
||||
|
||||
/** area config manager **/
|
||||
private static FSSObsMonitorConfigurationManager fogConfig = null;
|
||||
private FSSObsMonitorConfigurationManager fogConfig = null;
|
||||
|
||||
/** table data for the station table **/
|
||||
private final TableData stationTableData = new TableData(
|
||||
|
@ -149,10 +162,13 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
*/
|
||||
private FogMonitor() {
|
||||
pluginPatterns.add(fogPattern);
|
||||
fogConfig = FSSObsMonitorConfigurationManager.getFogObsManager();
|
||||
fogConfig = new FSSObsMonitorConfigurationManager(MonName.fog.name());
|
||||
updateMonitoringArea();
|
||||
initObserver(OBS, this);
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.FOG);
|
||||
obData.setThresholdMgr(FogThresholdMgr.getInstance());
|
||||
obData.getZoneTableData();
|
||||
readTableConfig(MonitorThresholdConfiguration.FOG_THRESHOLD_CONFIG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,10 +179,13 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
public static synchronized FogMonitor getInstance() {
|
||||
if (monitor == null) {
|
||||
monitor = new FogMonitor();
|
||||
// Pre-populate dialog with an observations from DB
|
||||
monitor.createDataStructures();
|
||||
monitor.getAdjAreas();
|
||||
monitor.processProductAtStartup(fogConfig);
|
||||
monitor.processProductAtStartup(MonName.fog.name());
|
||||
monitor.fireMonitorEvent(monitor);
|
||||
}
|
||||
|
||||
return monitor;
|
||||
}
|
||||
|
||||
|
@ -190,11 +209,12 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
// [Jan 21, 2010, zhao]
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.FOG);
|
||||
obData.setThresholdMgr(FogThresholdMgr.getInstance());
|
||||
|
||||
obsData = new ObsData();
|
||||
algorithmData = new TreeMap<Date, Map<String, FOG_THREAT>>();
|
||||
|
||||
for (String zone : fogConfig.getAreaList()) {
|
||||
obsData.addArea(zone, fogConfig.getAreaStations(zone));
|
||||
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
|
||||
obsData.addArea(zone, MonitoringArea.getPlatformMap().get(zone));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,10 +252,38 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
@Override
|
||||
public void processProductMessage(final AlertMessage filtered) {
|
||||
if (fogPattern.matcher(filtered.dataURI).matches()) {
|
||||
processURI(filtered.dataURI, filtered, fogConfig);
|
||||
processURI(filtered.dataURI, filtered);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
* @param file
|
||||
* -- the xml configuration filename
|
||||
*/
|
||||
public void readTableConfig(String file) {
|
||||
// TODO update for Maritime
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and stations list
|
||||
try {
|
||||
for (String zone : fogConfig.getAreaList()) {
|
||||
// add the unique
|
||||
List<String> stations = fogConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
} catch (Exception ve) {
|
||||
String msg = "FOG Monitor failed to load configuration..."
|
||||
+ this.getClass().getName();
|
||||
ErrorDialog.openError(Display.getCurrent().getActiveShell(),
|
||||
"FOG Monitor failed to load configuration", msg,
|
||||
new Status(IStatus.ERROR, Activator.PLUGIN_ID, msg, ve));
|
||||
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -269,9 +317,9 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
@Override
|
||||
public void configUpdate(IMonitorConfigurationEvent me) {
|
||||
fogConfig = (FSSObsMonitorConfigurationManager) me.getSource();
|
||||
obData.getObHourReports().updateZones(fogConfig);
|
||||
updateMonitoringArea();
|
||||
if (zoneDialog != null && !zoneDialog.isDisposed()) {
|
||||
obData.updateTableCache();
|
||||
zoneDialog.refreshZoneTableData(obData);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
@ -286,6 +334,21 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
monitor = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the zone based on the icao passed into it
|
||||
*
|
||||
* @param icao
|
||||
* @return zone
|
||||
*/
|
||||
public String findZone(String icao) {
|
||||
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
|
||||
if (MonitoringArea.getPlatformMap().get(zone).contains(icao)) {
|
||||
return zone;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the main map
|
||||
*
|
||||
|
@ -304,21 +367,21 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
*/
|
||||
@Override
|
||||
protected void process(ObReport result) throws Exception {
|
||||
obData.addReport(result);
|
||||
// update table cache
|
||||
obData.getZoneTableData(result.getRefHour());
|
||||
// Get zones containing station
|
||||
List<String> zones = fogConfig.getAreaByStationId(result
|
||||
.getPlatformId());
|
||||
if (!zones.isEmpty() || zones != null) {
|
||||
for (String zn : zones) {
|
||||
AreaContainer ac = getTableData().getArea(zn);
|
||||
|
||||
if (zoneDialog != null && !zoneDialog.isDisposed()) {
|
||||
|
||||
obData.addReport(result);
|
||||
String zone = findZone(result.getPlatformId());
|
||||
if (zone != null) {
|
||||
AreaContainer ac = getTableData().getArea(zone);
|
||||
if (ac != null) {
|
||||
ac.addReport(result.getObservationTime(), result);
|
||||
fireMonitorEvent(this);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
monitor.nullifyMonitor();
|
||||
}
|
||||
fireMonitorEvent(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -338,20 +401,26 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
*/
|
||||
public void launchDialog(String type, Shell shell) {
|
||||
if (type.equals("zone")) {
|
||||
zoneDialog = new FogZoneTableDlg(shell, obData);
|
||||
addMonitorListener(zoneDialog);
|
||||
zoneDialog.addMonitorControlListener(this);
|
||||
if (zoneDialog == null) {
|
||||
zoneDialog = new FogZoneTableDlg(shell, obData);
|
||||
addMonitorListener(zoneDialog);
|
||||
zoneDialog.addMonitorControlListener(this);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
zoneDialog.open();
|
||||
} else if (type.equals("area")) {
|
||||
areaDialog = new FogMonitoringAreaConfigDlg(shell,
|
||||
"Fog Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
if (areaDialog == null) {
|
||||
areaDialog = new FogMonitoringAreaConfigDlg(shell,
|
||||
"Fog Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
areaDialog.open();
|
||||
}
|
||||
}
|
||||
|
@ -383,7 +452,7 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
algData = algorithmData.get(time);
|
||||
} else {
|
||||
// by default is nothing in the ALG column
|
||||
for (String zone : fogConfig.getAreaList()) {
|
||||
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
|
||||
algData.put(zone, FOG_THREAT.GRAY);
|
||||
}
|
||||
}
|
||||
|
@ -471,18 +540,21 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
*
|
||||
* @param drawTime
|
||||
*/
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.monitor.ObsMonitor#updateDialogTime(java.util.Date)
|
||||
*/
|
||||
@Override
|
||||
public void updateDialogTime(Date dialogTime) {
|
||||
this.dialogTime = dialogTime;
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* The date for the dialog to stay in step with
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Date getDialogDate() {
|
||||
return dialogTime;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -557,14 +629,9 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
@Override
|
||||
protected void processAtStartup(ObReport report) {
|
||||
obData.addReport(report);
|
||||
List<String> zones = fogConfig.getAreaByStationId(report
|
||||
.getPlatformId());
|
||||
if (!zones.isEmpty() || zones != null) {
|
||||
for (String zn : zones) {
|
||||
getTableData().getArea(zn).addReport(
|
||||
report.getObservationTime(), report);
|
||||
}
|
||||
}
|
||||
String zone = findZone(report.getPlatformId());
|
||||
getTableData().getArea(zone).addReport(report.getObservationTime(),
|
||||
report);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -577,11 +644,20 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets Fog Area configuration dialog
|
||||
* Reads Table Configuration.
|
||||
*
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public MonitoringAreaConfigDlg getAreaDialog() {
|
||||
return areaDialog;
|
||||
private void updateMonitoringArea() {
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
for (String zone : fogConfig.getAreaList()) {
|
||||
List<String> stations = fogConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
22
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/threshold/FogThresholdMgr.java
Normal file → Executable file
22
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/threshold/FogThresholdMgr.java
Normal file → Executable file
|
@ -22,6 +22,7 @@ package com.raytheon.uf.viz.monitor.fog.threshold;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
||||
|
@ -41,7 +42,6 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.FogMonitor;
|
|||
* Feb 03, 2014 #2757 skorolev Fixed reInitialize()
|
||||
* May 20, 2014 3086 skorolev Cleaned code.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site".
|
||||
* Oct 16, 2014 3220 skorolev Corrected areaConfigMgr assignment.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -61,7 +61,8 @@ public class FogThresholdMgr extends AbstractThresholdMgr {
|
|||
super("DefaultFogDisplayThresholds.xml",
|
||||
"DefaultFogMonitorThresholds.xml", AppName.FOG.name()
|
||||
.toLowerCase());
|
||||
areaConfigMgr = FSSObsMonitorConfigurationManager.getFogObsManager();
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -74,6 +75,7 @@ public class FogThresholdMgr extends AbstractThresholdMgr {
|
|||
if (classInstance == null) {
|
||||
classInstance = new FogThresholdMgr();
|
||||
}
|
||||
|
||||
return classInstance;
|
||||
}
|
||||
|
||||
|
@ -116,4 +118,20 @@ public class FogThresholdMgr extends AbstractThresholdMgr {
|
|||
}
|
||||
return threshKeys;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr#
|
||||
* getMonitorAreaConfigInstance()
|
||||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (areaConfigMgr == null) {
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
}
|
||||
return areaConfigMgr;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.eclipse.core.commands.ExecutionException;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.uf.viz.monitor.fog.FogMonitor;
|
||||
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* The Fog Monitor Action
|
||||
|
@ -42,7 +42,6 @@ import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
|
|||
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
|
||||
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
* Jan 08, 2015 3220 skorolev Used area type for launchDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -66,13 +65,19 @@ public class FogAreaConfigAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
FogMonitor fog = FogMonitor.getInstance();
|
||||
|
||||
if (fog.getAreaDialog() == null || fog.getAreaDialog().isDisposed()) {
|
||||
if (areaDialog == null || areaDialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
fog.launchDialog("area", shell);
|
||||
areaDialog = new FogMonitoringAreaConfigDlg(shell,
|
||||
"Fog Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
areaDialog.open();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- -------------
|
||||
* May 21, 2014 3086 skorolev Cleaned code.
|
||||
* Oct 16, 2014 3220 skorolev Added condition to avoid NPE.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -179,23 +178,22 @@ public class FogMonitorMeteoTab extends TabItemComp implements
|
|||
ThresholdsXML threshXML = ftm.getThresholdsXmlData(duKey);
|
||||
|
||||
List<AreaXML> areasArray = threshXML.getAreas();
|
||||
if (areasArray != null) {
|
||||
for (AreaXML area : areasArray) {
|
||||
String areaID = area.getAreaId();
|
||||
FogMonitorMeteoData fmmd = new FogMonitorMeteoData();
|
||||
fmmd.setAreaID(areaID);
|
||||
|
||||
/*
|
||||
* Visibility
|
||||
*/
|
||||
String xmlKey = FogMonitor.FOG_MONITOR_METEO_VIS.getXmlKey();
|
||||
fmmd.setMeteoVisR(ftm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
fmmd.setMeteoVisY(ftm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
for (AreaXML area : areasArray) {
|
||||
String areaID = area.getAreaId();
|
||||
FogMonitorMeteoData fmmd = new FogMonitorMeteoData();
|
||||
fmmd.setAreaID(areaID);
|
||||
|
||||
fogDataArray.add(fmmd);
|
||||
}
|
||||
/*
|
||||
* Visibility
|
||||
*/
|
||||
String xmlKey = FogMonitor.FOG_MONITOR_METEO_VIS.getXmlKey();
|
||||
fmmd.setMeteoVisR(ftm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
fmmd.setMeteoVisY(ftm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
fogDataArray.add(fmmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
32
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogMonitoringAreaConfigDlg.java
Normal file → Executable file
32
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogMonitoringAreaConfigDlg.java
Normal file → Executable file
|
@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Display;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
|
@ -48,11 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Apr 28, 2014 3086 skorolev Updated getConfigManager.
|
||||
* Sep 04, 2014 3220 skorolev Added fireConfigUpdateEvent method. Updated handler.
|
||||
* Sep 19, 2014 2757 skorolev Updated handlers for dialog buttons.
|
||||
* Oct 16, 2014 3220 skorolev Corrected getInstance() method.
|
||||
* Oct 27, 2014 3667 skorolev Cleaned code.
|
||||
* Nov 21, 2014 3841 skorolev Corrected handleOkBtnSelection.
|
||||
* Dec 11, 2014 3220 skorolev Removed unnecessary code.
|
||||
* Feb 03, 2015 3841 skorolev Replaced resetParams with resetStatus.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -72,6 +69,7 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
public FogMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||
super(parent, title, AppName.FOG);
|
||||
FogMonitor.getInstance();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -87,8 +85,13 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
"Fog Monitor Confirm Changes", "Save changes?");
|
||||
if (choice == SWT.YES) {
|
||||
// Save the config xml file.
|
||||
saveConfigs();
|
||||
resetAndSave();
|
||||
/**
|
||||
* DR#11279: re-initialize threshold manager and the monitor
|
||||
* using new monitor area configuration
|
||||
*/
|
||||
FogThresholdMgr.reInitialize();
|
||||
fireConfigUpdateEvent();
|
||||
// Open Threshold Dialog if zones/stations are added.
|
||||
if ((!configMgr.getAddedZones().isEmpty())
|
||||
|| (!configMgr.getAddedStations().isEmpty())) {
|
||||
|
@ -98,19 +101,19 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
fogMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
// Clean added zones and stations. Close dialog.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
});
|
||||
fogMonitorDlg.open();
|
||||
}
|
||||
// Clean added zones and stations.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
}
|
||||
/**
|
||||
* DR#11279: re-initialize threshold manager and the monitor
|
||||
* using new monitor area configuration
|
||||
*/
|
||||
fireConfigUpdateEvent();
|
||||
resetStatus();
|
||||
} else { // Return back to continue edit.
|
||||
return;
|
||||
}
|
||||
|
@ -127,6 +130,7 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
private void fireConfigUpdateEvent() {
|
||||
final IMonitorConfigurationEvent me = new IMonitorConfigurationEvent(
|
||||
configMgr);
|
||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -144,7 +148,11 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getInstance() {
|
||||
return FSSObsMonitorConfigurationManager.getFogObsManager();
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
55
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java
Normal file → Executable file
55
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java
Normal file → Executable file
|
@ -28,6 +28,7 @@ import org.eclipse.swt.widgets.Display;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DisplayVarName;
|
||||
|
@ -58,9 +59,8 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg;
|
|||
* Dec 03, 2012 15216/15639 zhao fixed a bug related to Link-to-Frame
|
||||
* Dec 7, 2012 1351 skorolev Changes for non-blocking dialogs.
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigMgr method.
|
||||
* Jan 27, 2015 3220 skorolev Removed "site".Added check on dispose.Corrected configMgr assignment.
|
||||
* Added table cache update.
|
||||
* Feb 04, 2015 3841 skorolev Corrected notify method for empty table update.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site". Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author ?
|
||||
|
@ -79,10 +79,6 @@ public class FogZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
public FogZoneTableDlg(Shell parent, ObMultiHrsReports obData) {
|
||||
super(parent, obData, CommonConfig.AppName.FOG);
|
||||
configMgr = FSSObsMonitorConfigurationManager.getFogObsManager();
|
||||
obData.updateTableCache();
|
||||
zoneTblData = obData.getZoneTableData();
|
||||
zoneTblData.sortData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,11 +145,12 @@ public class FogZoneTableDlg extends ZoneTableDlg {
|
|||
// The algorithm output.
|
||||
|
||||
if (me.getSource() instanceof FogMonitor) {
|
||||
|
||||
FogMonitor fog = (FogMonitor) me.getSource();
|
||||
ObMultiHrsReports obData = fog.getObData();
|
||||
Date date = fog.getDialogTime();
|
||||
Date date = fog.getDialogDate();
|
||||
if (date != null) {
|
||||
Date nominalTime = date;
|
||||
ObMultiHrsReports obData = fog.getObData();
|
||||
if (!isLinkedToFrame()) {
|
||||
nominalTime = obData.getLatestNominalTime();
|
||||
}
|
||||
|
@ -162,12 +159,33 @@ public class FogZoneTableDlg extends ZoneTableDlg {
|
|||
.getAlgorithmData(nominalTime));
|
||||
obData.setFogAlgCellType(fogAlgCellType);
|
||||
this.updateTableDlg(obData.getObHourReports(nominalTime));
|
||||
} else {
|
||||
this.updateZoneTable(obData.getLatestNominalTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Jan 25, 2010, #4281, zhao, Modified to pass an ObMultiHrsReports object
|
||||
* to table dialog
|
||||
*
|
||||
* @Override public void notify(IMonitorEvent me) { if
|
||||
* (zoneTable.isDisposed()) return;
|
||||
*
|
||||
* if (me.getSource() instanceof FogMonitor) { FogMonitor monitor
|
||||
* = (FogMonitor)me.getSource();
|
||||
* this.updateTableDlg(monitor.getObData()); }
|
||||
*
|
||||
* //if (me.getSource() instanceof FogMonitor) { //
|
||||
* IMPORTANT!!!!!! For now we just grab the most recent time from
|
||||
* the OBSTable // When we have the CAVE rendering working we will
|
||||
* grab it from the CaveResource! // Date date = new Date(); //
|
||||
* FogMonitor fog = (FogMonitor)me.getSource(); //
|
||||
* FogDataGenerator fdg = new FogDataGenerator(); // TableData
|
||||
* tZoneTableData = fdg.generateZoneData(fog.getTableData(),
|
||||
* fog.getAlgorithmData(), date); //
|
||||
* updateZoneTable(tZoneTableData, fog.getStationTableData(),
|
||||
* date); //} }
|
||||
*/
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -276,4 +294,19 @@ public class FogZoneTableDlg extends ZoneTableDlg {
|
|||
protected void shellDisposeAction() {
|
||||
// Not used
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg#
|
||||
* getMonitorAreaConfigInstance()
|
||||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (configMgr == null || configMgr.isPopulated()) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import com.raytheon.uf.common.dataplugin.fog.FogRecord.FOG_THREAT;
|
|||
import com.raytheon.uf.common.geospatial.SpatialException;
|
||||
import com.raytheon.uf.common.monitor.MonitorAreaUtils;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.AdjacentWfoMgr;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -48,6 +49,7 @@ import com.raytheon.uf.viz.monitor.IMonitor;
|
|||
import com.raytheon.uf.viz.monitor.Monitor;
|
||||
import com.raytheon.uf.viz.monitor.ObsMonitor;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.CellType;
|
||||
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
|
||||
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
|
||||
import com.raytheon.uf.viz.monitor.data.ObReport;
|
||||
import com.raytheon.uf.viz.monitor.data.TableCellData;
|
||||
|
@ -59,6 +61,8 @@ import com.raytheon.uf.viz.monitor.safeseas.listeners.ISSResourceListener;
|
|||
import com.raytheon.uf.viz.monitor.safeseas.threshold.SSThresholdMgr;
|
||||
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSMonitoringAreaConfigDlg;
|
||||
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSZoneTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.util.MonitorThresholdConfiguration;
|
||||
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
@ -81,9 +85,8 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Oct 26, 2012 1280 skorolev Clean code and made changes for non-blocking dialog
|
||||
* Oct 30, 2012 1297 skorolev Changed HashMap to Map
|
||||
* Feb 15, 2013 1638 mschenke Changed code to reference DataURI.SEPARATOR instead of URIFilter
|
||||
* Jan 27, 2015 3220 skorolev Removed local getMonitorAreaConfig method.Updated configUpdate method and added updateMonitoringArea.
|
||||
* Corrected ssAreaConfig assignment. Moved refreshing of table in the UI thread.
|
||||
* Replaced MonitoringArea with ssAreaConfig.Updated code for better performance.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -107,7 +110,13 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
private SSMonitoringAreaConfigDlg areaDialog = null;
|
||||
|
||||
/** configuration manager **/
|
||||
private static FSSObsMonitorConfigurationManager ssAreaConfig = null;
|
||||
private FSSObsMonitorConfigurationManager ssAreaConfig = null;
|
||||
|
||||
/**
|
||||
* This object contains all observation data necessary for the table dialogs
|
||||
* and trending plots
|
||||
*/
|
||||
private ObMultiHrsReports obData;
|
||||
|
||||
/** table data for the zone table **/
|
||||
private final TableData zoneTableData = new TableData(
|
||||
|
@ -126,6 +135,9 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
/** List of SAFESEAS resource listeners **/
|
||||
private final List<ISSResourceListener> safeSeasResources = new ArrayList<ISSResourceListener>();
|
||||
|
||||
/** Time which Zone/County dialog shows. **/
|
||||
private Date dialogTime = null;
|
||||
|
||||
/** list of coordinates for each zone **/
|
||||
private Map<String, Geometry> zoneGeometries = null;
|
||||
|
||||
|
@ -149,10 +161,14 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
*/
|
||||
private SafeSeasMonitor() {
|
||||
pluginPatterns.add(ssPattern);
|
||||
ssAreaConfig = FSSObsMonitorConfigurationManager.getSsObsManager();
|
||||
ssAreaConfig = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
updateMonitoringArea();
|
||||
initObserver(OBS, this);
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.SAFESEAS);
|
||||
obData.setThresholdMgr(SSThresholdMgr.getInstance());
|
||||
obData.getZoneTableData();
|
||||
readTableConfig(MonitorThresholdConfiguration.SAFESEAS_THRESHOLD_CONFIG);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,9 +177,11 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
public static synchronized SafeSeasMonitor getInstance() {
|
||||
if (monitor == null) {
|
||||
monitor = new SafeSeasMonitor();
|
||||
// Pre-populate dialog with an observation (METAR) for KOMA
|
||||
monitor.createDataStructures();
|
||||
monitor.getAdjAreas();
|
||||
monitor.processProductAtStartup(ssAreaConfig);
|
||||
monitor.processProductAtStartup("ss");
|
||||
monitor.fireMonitorEvent(monitor);
|
||||
}
|
||||
return monitor;
|
||||
}
|
||||
|
@ -198,21 +216,26 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
*/
|
||||
public void launchDialog(String type, Shell shell) {
|
||||
if (type.equals("zone")) {
|
||||
zoneDialog = new SSZoneTableDlg(shell, obData);
|
||||
addMonitorListener(zoneDialog);
|
||||
zoneDialog.addMonitorControlListener(this);
|
||||
if (zoneDialog == null) {
|
||||
zoneDialog = new SSZoneTableDlg(shell, obData);
|
||||
addMonitorListener(zoneDialog);
|
||||
zoneDialog.addMonitorControlListener(this);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
zoneDialog.open();
|
||||
} else if (type.equals("area")) {
|
||||
areaDialog = new SSMonitoringAreaConfigDlg(shell,
|
||||
"SAFESEAS Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
if (areaDialog == null) {
|
||||
areaDialog = new SSMonitoringAreaConfigDlg(shell,
|
||||
"Safe Seas Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
areaDialog.open();
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +274,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
@Override
|
||||
public void processProductMessage(final AlertMessage filtered) {
|
||||
if (ssPattern.matcher(filtered.dataURI).matches()) {
|
||||
processURI(filtered.dataURI, filtered, ssAreaConfig);
|
||||
processURI(filtered.dataURI, filtered);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,6 +297,31 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
stationTableData.addReplaceDataRow(stationRowData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads Table Configuration.
|
||||
*
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
* @param file
|
||||
* -- the xml configuration filename
|
||||
*/
|
||||
public void readTableConfig(String file) {
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
try {
|
||||
for (String zone : ssAreaConfig.getAreaList()) {
|
||||
List<String> stations = ssAreaConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.CRITICAL,
|
||||
"SafeSeas failed to load configuration..."
|
||||
+ this.getClass().getName(), e);
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -307,9 +355,9 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
@Override
|
||||
public void configUpdate(IMonitorConfigurationEvent me) {
|
||||
ssAreaConfig = (FSSObsMonitorConfigurationManager) me.getSource();
|
||||
obData.getObHourReports().updateZones(ssAreaConfig);
|
||||
updateMonitoringArea();
|
||||
if (zoneDialog != null && !zoneDialog.isDisposed()) {
|
||||
obData.updateTableCache();
|
||||
zoneDialog.refreshZoneTableData(obData);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
@ -365,8 +413,6 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
@Override
|
||||
protected void process(ObReport result) throws Exception {
|
||||
obData.addReport(result);
|
||||
// update table cache
|
||||
obData.getZoneTableData(result.getRefHour());
|
||||
fireMonitorEvent(this);
|
||||
}
|
||||
|
||||
|
@ -375,18 +421,30 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
*
|
||||
* @param dialogTime
|
||||
*/
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.monitor.ObsMonitor#updateDialogTime(java.util.Date)
|
||||
*/
|
||||
@Override
|
||||
public void updateDialogTime(Date dialogTime) {
|
||||
this.dialogTime = dialogTime;
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Dialog Time.
|
||||
*
|
||||
* @return dialogTime
|
||||
*/
|
||||
public Date getDialogTime() {
|
||||
return dialogTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the dialogTime
|
||||
*
|
||||
* @param dialogTime
|
||||
*/
|
||||
public void setDialogTime(Date dialogTime) {
|
||||
this.dialogTime = dialogTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds recourse listener
|
||||
*
|
||||
|
@ -432,6 +490,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
*/
|
||||
@Override
|
||||
public ArrayList<Date> getTimeOrderedKeys(IMonitor monitor, String type) {
|
||||
// Not used
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -485,7 +544,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
algData = algorithmData.get(time);
|
||||
} else {
|
||||
// by default is nothing in the Fog column
|
||||
for (String zone : ssAreaConfig.getAreaList()) {
|
||||
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
|
||||
algData.put(zone, FOG_THREAT.GRAY);
|
||||
}
|
||||
}
|
||||
|
@ -526,6 +585,15 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets zone dialog
|
||||
*
|
||||
* @return zoneDialog
|
||||
*/
|
||||
public ZoneTableDlg getDialog() {
|
||||
return zoneDialog;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets adjacent areas
|
||||
*/
|
||||
|
@ -602,11 +670,20 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets SAFESEAS Area configuration dialog
|
||||
* Reads Table Configuration.
|
||||
*
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SSMonitoringAreaConfigDlg getAreaDialog() {
|
||||
return areaDialog;
|
||||
public void updateMonitoringArea() {
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
for (String zone : ssAreaConfig.getAreaList()) {
|
||||
List<String> stations = ssAreaConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 21, 2010 4891 skorolev Initial Creation.
|
||||
* Sep 11, 2013 2277 mschenke Got rid of ScriptCreator references
|
||||
* Feb 24, 2015 3220 dhladky removed misnamed un-needed method.
|
||||
* </pre>
|
||||
*
|
||||
* @author skorolev
|
||||
|
|
19
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/threshold/SSThresholdMgr.java
Normal file → Executable file
19
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/threshold/SSThresholdMgr.java
Normal file → Executable file
|
@ -22,6 +22,7 @@ package com.raytheon.uf.viz.monitor.safeseas.threshold;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
||||
|
@ -41,7 +42,6 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.SafeSeasMonitor;
|
|||
* Feb 03, 2014 #2757 skorolev Fixed reInitialize().
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site".
|
||||
* Oct 16, 2014 3220 skorolev Corrected areaConfigMgr assignment.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,7 +59,7 @@ public class SSThresholdMgr extends AbstractThresholdMgr {
|
|||
super("DefaultSSDisplayThresholds.xml",
|
||||
"DefaultSSMonitorThresholds.xml", AppName.SAFESEAS.name()
|
||||
.toLowerCase());
|
||||
areaConfigMgr = FSSObsMonitorConfigurationManager.getSsObsManager();
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -113,4 +113,19 @@ public class SSThresholdMgr extends AbstractThresholdMgr {
|
|||
}
|
||||
return threshKeys;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr#
|
||||
* getMonitorAreaConfigInstance()
|
||||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (areaConfigMgr == null) {
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.ss.name());
|
||||
}
|
||||
return areaConfigMgr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@ import org.eclipse.core.commands.ExecutionException;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
|
||||
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSMonitoringAreaConfigDlg;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* The SAFESEAS Action
|
||||
|
@ -41,7 +42,6 @@ import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
|
|||
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
|
||||
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
* Jan 08, 2015 3220 skorolev Used area type for launchDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -51,6 +51,11 @@ import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
|
|||
|
||||
public class SafeseasAreaConfigAction extends AbstractHandler {
|
||||
|
||||
/**
|
||||
* SAFESEAS Monitoring Area Configuration Dialog.
|
||||
*/
|
||||
private SSMonitoringAreaConfigDlg configDlg;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -60,14 +65,19 @@ public class SafeseasAreaConfigAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
|
||||
SafeSeasMonitor monitor = SafeSeasMonitor.getInstance();
|
||||
if (monitor.getAreaDialog() == null
|
||||
|| monitor.getAreaDialog().isDisposed()) {
|
||||
if (configDlg == null || configDlg.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
monitor.launchDialog("area", shell);
|
||||
configDlg = new SSMonitoringAreaConfigDlg(shell,
|
||||
"SAFESEAS Monitor Area Configuration");
|
||||
configDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
configDlg = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
configDlg.open();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,309 +41,305 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
|||
* SAFESEAS Monitor Meteo Table.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 17, 2014 2757 skorolev Removed unnecessary printouts.
|
||||
* Oct 16, 2014 3220 skorolev Added condition to avoid NPE.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author skorolev
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SSMonitorMeteoTab extends TabItemComp implements
|
||||
IUpdateMonitorMeteo {
|
||||
public class SSMonitorMeteoTab extends TabItemComp implements IUpdateMonitorMeteo
|
||||
{
|
||||
private SSMonitorMeteoEditDlg monitorMeteoEditDlg;
|
||||
|
||||
|
||||
private ArrayList<String> areaIDArray;
|
||||
|
||||
|
||||
private ArrayList<SSMonitorMeteoData> ssDataArray;
|
||||
|
||||
public SSMonitorMeteoTab(TabFolder parent, DataUsageKey duKey) {
|
||||
|
||||
public SSMonitorMeteoTab(TabFolder parent, DataUsageKey duKey)
|
||||
{
|
||||
super(parent, duKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createListHeader(Composite parentComp) {
|
||||
@Override
|
||||
protected void createListHeader(Composite parentComp)
|
||||
{
|
||||
Composite lblComp = new Composite(parentComp, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(5, false);
|
||||
gl.horizontalSpacing = 0;
|
||||
gl.horizontalSpacing = 0;
|
||||
gl.marginHeight = 0;
|
||||
gl.marginWidth = 0;
|
||||
lblComp.setLayout(gl);
|
||||
|
||||
|
||||
/*
|
||||
* Create filler label.
|
||||
*/
|
||||
GridData gd = new GridData(75, SWT.DEFAULT);
|
||||
Label fillerLbl = new Label(lblComp, SWT.CENTER);
|
||||
fillerLbl.setLayoutData(gd);
|
||||
|
||||
|
||||
/*
|
||||
* Meteo
|
||||
*/
|
||||
Composite meteoComp = createGroupComposite(lblComp, 5, null);
|
||||
createLabelComp(meteoComp, "Wind", "Speed(kt)", false);
|
||||
createLabelComp(meteoComp, "Peak", "Wind(kt)", false);
|
||||
Composite meteoComp = createGroupComposite(lblComp, 5, null);
|
||||
createLabelComp(meteoComp, "Wind", "Speed(kt)", false);
|
||||
createLabelComp(meteoComp, "Peak", "Wind(kt)", false);
|
||||
createLabelComp(meteoComp, "Gust", "Speed(kt)", false);
|
||||
createLabelComp(meteoComp, "Wave", "Height(ft)", false);
|
||||
createLabelComp(meteoComp, "Vis(mi)", "", true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void populateList() {
|
||||
if (ssDataArray == null) {
|
||||
protected void populateList()
|
||||
{
|
||||
if (ssDataArray == null)
|
||||
{
|
||||
createDataArray();
|
||||
}
|
||||
|
||||
|
||||
boolean update = false;
|
||||
if (dataList.getItemCount() > 0) {
|
||||
if (dataList.getItemCount() > 0)
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
||||
|
||||
RangesUtil rangeUtil = RangesUtil.getInstance();
|
||||
|
||||
|
||||
areaIDArray = new ArrayList<String>();
|
||||
|
||||
|
||||
String tmpVisStr;
|
||||
String currentAreaID;
|
||||
|
||||
|
||||
double visVal = 0.0;
|
||||
|
||||
StringBuilder sb = null;
|
||||
|
||||
StringBuilder sb = null;
|
||||
SSMonitorMeteoData ssmmd = null;
|
||||
|
||||
for (int i = 0; i < ssDataArray.size(); i++) {
|
||||
|
||||
for (int i = 0; i < ssDataArray.size(); i++)
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
|
||||
|
||||
ssmmd = ssDataArray.get(i);
|
||||
|
||||
|
||||
currentAreaID = ssmmd.getAreaID();
|
||||
areaIDArray.add(currentAreaID);
|
||||
|
||||
|
||||
sb.append(String.format(areaIdFmt, currentAreaID));
|
||||
|
||||
|
||||
/*
|
||||
* Wind Speed
|
||||
*/
|
||||
appendIntData(sb, ssmmd.getWindSpeedR(), ssmmd.getWindSpeedY());
|
||||
|
||||
|
||||
/*
|
||||
* Peak Wind
|
||||
*/
|
||||
appendIntData(sb, ssmmd.getPeakWindR(), ssmmd.getPeakWindY());
|
||||
|
||||
|
||||
/*
|
||||
* Gust Wind
|
||||
*/
|
||||
appendIntData(sb, ssmmd.getGustSpeedR(), ssmmd.getGustSpeedY());
|
||||
|
||||
|
||||
/*
|
||||
* Wave Height
|
||||
*/
|
||||
appendIntData(sb, ssmmd.getWaveHgtR(), ssmmd.getWaveHgtY());
|
||||
|
||||
|
||||
/*
|
||||
* Visibility
|
||||
*/
|
||||
visVal = ssmmd.getVisR();
|
||||
tmpVisStr = rangeUtil.getVisString((int) visVal);
|
||||
*/
|
||||
visVal = ssmmd.getVisR();
|
||||
tmpVisStr = rangeUtil.getVisString((int)visVal);
|
||||
sb.append(String.format(dataFmt, tmpVisStr));
|
||||
|
||||
visVal = ssmmd.getVisY();
|
||||
tmpVisStr = rangeUtil.getVisString((int) visVal);
|
||||
sb.append(String.format(dataFmt, tmpVisStr));
|
||||
|
||||
|
||||
visVal = ssmmd.getVisY();
|
||||
tmpVisStr = rangeUtil.getVisString((int)visVal);
|
||||
sb.append(String.format(dataFmt, tmpVisStr));
|
||||
|
||||
/*
|
||||
* Append a space and add the data line to the list.
|
||||
*/
|
||||
sb.append(" ");
|
||||
|
||||
if (update == true) {
|
||||
|
||||
if (update == true)
|
||||
{
|
||||
dataList.setItem(i, sb.toString());
|
||||
} else {
|
||||
dataList.add(sb.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
dataList.add(sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
packListControls();
|
||||
}
|
||||
|
||||
private void createDataArray() {
|
||||
|
||||
private void createDataArray()
|
||||
{
|
||||
ssDataArray = new ArrayList<SSMonitorMeteoData>();
|
||||
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
String xmlKey;
|
||||
String areaID;
|
||||
|
||||
String areaID;
|
||||
|
||||
ThresholdsXML threshXML = sstm.getThresholdsXmlData(duKey);
|
||||
|
||||
|
||||
ArrayList<AreaXML> areasArray = threshXML.getAreas();
|
||||
|
||||
if (areasArray != null) {
|
||||
for (AreaXML area : areasArray) {
|
||||
areaID = area.getAreaId();
|
||||
SSMonitorMeteoData ssmmd = new SSMonitorMeteoData();
|
||||
|
||||
ssmmd.setAreaID(areaID);
|
||||
|
||||
/*
|
||||
* Wind Speed
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_WIND_SPEED.getXmlKey();
|
||||
ssmmd.setWindSpeedR(sstm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
ssmmd.setWindSpeedY(sstm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Peak Wind
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_PEAK_WIND.getXmlKey();
|
||||
ssmmd.setPeakWindR(sstm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
ssmmd.setPeakWindY(sstm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Gust Speed
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_GUST_SPEED.getXmlKey();
|
||||
ssmmd.setGustSpeedR(sstm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
ssmmd.setGustSpeedY(sstm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Wave Height
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_WAVE_HT.getXmlKey();
|
||||
ssmmd.setWaveHgtR(sstm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
ssmmd.setWaveHgtY(sstm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Visibility
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_VIS.getXmlKey();
|
||||
ssmmd.setVisR(sstm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
ssmmd.setVisY(sstm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/*
|
||||
* Add data to array.
|
||||
*/
|
||||
ssDataArray.add(ssmmd);
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private SSMonitorMeteoData getDataAtFirstSelection() {
|
||||
int index = dataList.getSelectionIndex();
|
||||
|
||||
return ssDataArray.get(index);
|
||||
}
|
||||
|
||||
private void updateDataArray(SSMonitorMeteoData ssmmd) {
|
||||
int[] dataListIndexes = dataList.getSelectionIndices();
|
||||
int currentIndex = 0;
|
||||
|
||||
for (int i = 0; i < dataListIndexes.length; i++) {
|
||||
currentIndex = dataListIndexes[i];
|
||||
|
||||
ssDataArray.get(currentIndex).updateData(ssmmd);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commitDataToXML() {
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
String xmlKey;
|
||||
String areaID;
|
||||
|
||||
for (SSMonitorMeteoData ssmmd : ssDataArray) {
|
||||
areaID = ssmmd.getAreaID();
|
||||
|
||||
|
||||
for (AreaXML area : areasArray)
|
||||
{
|
||||
areaID = area.getAreaId();
|
||||
SSMonitorMeteoData ssmmd = new SSMonitorMeteoData();
|
||||
|
||||
ssmmd.setAreaID(areaID);
|
||||
|
||||
/*
|
||||
* Wind Speed
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_WIND_SPEED.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
ssmmd.getWindSpeedR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
ssmmd.getWindSpeedY());
|
||||
|
||||
ssmmd.setWindSpeedR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
ssmmd.setWindSpeedY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Peak Wind
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_PEAK_WIND.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
ssmmd.getPeakWindR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
ssmmd.getPeakWindY());
|
||||
|
||||
ssmmd.setPeakWindR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
ssmmd.setPeakWindY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Gust Speed
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_GUST_SPEED.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
ssmmd.getGustSpeedR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
ssmmd.getGustSpeedY());
|
||||
|
||||
ssmmd.setGustSpeedR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
ssmmd.setGustSpeedY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Wave Height
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_WAVE_HT.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
ssmmd.getWaveHgtR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
ssmmd.getWaveHgtY());
|
||||
ssmmd.setWaveHgtR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
ssmmd.setWaveHgtY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Visibility
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_VIS.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
ssmmd.getVisR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
ssmmd.getVisY());
|
||||
ssmmd.setVisR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
ssmmd.setVisY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Add data to array.
|
||||
*/
|
||||
ssDataArray.add(ssmmd);
|
||||
}
|
||||
}
|
||||
|
||||
private SSMonitorMeteoData getDataAtFirstSelection()
|
||||
{
|
||||
int index = dataList.getSelectionIndex();
|
||||
|
||||
return ssDataArray.get(index);
|
||||
}
|
||||
|
||||
private void updateDataArray(SSMonitorMeteoData ssmmd)
|
||||
{
|
||||
int[] dataListIndexes = dataList.getSelectionIndices();
|
||||
int currentIndex = 0;
|
||||
|
||||
for (int i = 0; i < dataListIndexes.length; i++)
|
||||
{
|
||||
currentIndex = dataListIndexes[i];
|
||||
|
||||
ssDataArray.get(currentIndex).updateData(ssmmd);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commitDataToXML()
|
||||
{
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
String xmlKey;
|
||||
String areaID;
|
||||
|
||||
for (SSMonitorMeteoData ssmmd : ssDataArray)
|
||||
{
|
||||
areaID = ssmmd.getAreaID();
|
||||
|
||||
/*
|
||||
* Wind Speed
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_WIND_SPEED.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, ssmmd.getWindSpeedR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, ssmmd.getWindSpeedY());
|
||||
|
||||
/*
|
||||
* Peak Wind
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_PEAK_WIND.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, ssmmd.getPeakWindR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, ssmmd.getPeakWindY());
|
||||
|
||||
/*
|
||||
* Gust Speed
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_GUST_SPEED.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, ssmmd.getGustSpeedR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, ssmmd.getGustSpeedY());
|
||||
|
||||
/*
|
||||
* Wave Height
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_WAVE_HT.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, ssmmd.getWaveHgtR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, ssmmd.getWaveHgtY());
|
||||
|
||||
/*
|
||||
* Visibility
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_METEO_VIS.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, ssmmd.getVisR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, ssmmd.getVisY());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reloadData() {
|
||||
public void reloadData()
|
||||
{
|
||||
dataList.removeAll();
|
||||
ssDataArray.clear();
|
||||
ssDataArray = null;
|
||||
|
||||
populateList();
|
||||
|
||||
populateList();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void editDataAction() {
|
||||
protected void editDataAction()
|
||||
{
|
||||
SSMonitorMeteoData ssmmd = getDataAtFirstSelection();
|
||||
|
||||
if (monitorMeteoEditDlg == null) {
|
||||
monitorMeteoEditDlg = new SSMonitorMeteoEditDlg(getParent()
|
||||
.getShell(), ssmmd, this);
|
||||
|
||||
if (monitorMeteoEditDlg == null)
|
||||
{
|
||||
monitorMeteoEditDlg = new SSMonitorMeteoEditDlg(getParent().getShell(), ssmmd, this);
|
||||
monitorMeteoEditDlg.open();
|
||||
monitorMeteoEditDlg = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void updateThresholdData(SSMonitorMeteoData ssmmd) {
|
||||
public void updateThresholdData(SSMonitorMeteoData ssmmd)
|
||||
{
|
||||
updateDataArray(ssmmd);
|
||||
populateList();
|
||||
populateList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,404 +36,312 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.SafeSeasMonitor;
|
|||
import com.raytheon.uf.viz.monitor.xml.AreaXML;
|
||||
import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
||||
|
||||
/**
|
||||
* SAFESEAS Monitor Swell Table.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 16, 2014 3220 skorolev Added condition to avoid NPE.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SSMonitorSwellTab extends TabItemComp implements
|
||||
IUpdateDisplayMonitorSwell {
|
||||
public class SSMonitorSwellTab extends TabItemComp implements IUpdateDisplayMonitorSwell
|
||||
{
|
||||
private SSDispMonSwellEditDlg monitorSwellEditDlg;
|
||||
|
||||
|
||||
private ArrayList<String> areaIDArray;
|
||||
|
||||
|
||||
private ArrayList<SSDispMonSwellData> ssDataArray;
|
||||
|
||||
public SSMonitorSwellTab(TabFolder parent, DataUsageKey duKey) {
|
||||
|
||||
public SSMonitorSwellTab(TabFolder parent, DataUsageKey duKey)
|
||||
{
|
||||
super(parent, duKey, true);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.monitor.ui.dialogs.TabItemComp#createListHeader(org
|
||||
* .eclipse.swt.widgets.Composite)
|
||||
*/
|
||||
@Override
|
||||
protected void createListHeader(Composite parentComp) {
|
||||
@Override
|
||||
protected void createListHeader(Composite parentComp)
|
||||
{
|
||||
Composite lblComp = new Composite(parentComp, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(5, false);
|
||||
gl.horizontalSpacing = 0;
|
||||
gl.horizontalSpacing = 0;
|
||||
gl.marginHeight = 0;
|
||||
gl.marginWidth = 0;
|
||||
lblComp.setLayout(gl);
|
||||
|
||||
|
||||
/*
|
||||
* Create filler label.
|
||||
*/
|
||||
GridData gd = new GridData(75, SWT.DEFAULT);
|
||||
Label fillerLbl = new Label(lblComp, SWT.CENTER);
|
||||
fillerLbl.setLayoutData(gd);
|
||||
|
||||
|
||||
/*
|
||||
* Primary Swell
|
||||
*/
|
||||
Composite priSwellComp = createGroupComposite(lblComp, 4,
|
||||
"Primary Swell");
|
||||
Composite priSwellComp = createGroupComposite(lblComp, 4, "Primary Swell");
|
||||
createLabelComp(priSwellComp, "Height(ft)", "", false);
|
||||
createLabelComp(priSwellComp, "Periods(s)", "", false);
|
||||
createLabelComp(priSwellComp, "Dir(deg)", "(from)", false);
|
||||
createLabelComp(priSwellComp, "Dir(deg)", "(to)", false);
|
||||
|
||||
createLabelComp(priSwellComp, "Dir(deg)", "(to)", false);
|
||||
|
||||
/*
|
||||
* Secondary Swell
|
||||
*/
|
||||
Composite secSwellComp = createGroupComposite(lblComp, 4,
|
||||
"Secondary Swell");
|
||||
Composite secSwellComp = createGroupComposite(lblComp, 4, "Secondary Swell");
|
||||
createLabelComp(secSwellComp, "Height(ft)", "", false);
|
||||
createLabelComp(secSwellComp, "Periods(s)", "", false);
|
||||
createLabelComp(secSwellComp, "Dir(deg)", "(from)", false);
|
||||
createLabelComp(secSwellComp, "Dir(deg)", "(to)", false);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TabItemComp#populateList()
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void populateList() {
|
||||
if (ssDataArray == null) {
|
||||
protected void populateList()
|
||||
{
|
||||
if (ssDataArray == null)
|
||||
{
|
||||
createDataArray();
|
||||
}
|
||||
|
||||
|
||||
boolean update = false;
|
||||
if (dataList.getItemCount() > 0) {
|
||||
if (dataList.getItemCount() > 0)
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
||||
|
||||
areaIDArray = new ArrayList<String>();
|
||||
|
||||
|
||||
String currentAreaID;
|
||||
|
||||
StringBuilder sb = null;
|
||||
|
||||
StringBuilder sb = null;
|
||||
SSDispMonSwellData sssd = null;
|
||||
|
||||
for (int i = 0; i < ssDataArray.size(); i++) {
|
||||
|
||||
for (int i = 0; i < ssDataArray.size(); i++)
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
|
||||
|
||||
sssd = ssDataArray.get(i);
|
||||
|
||||
|
||||
currentAreaID = sssd.getAreaID();
|
||||
areaIDArray.add(currentAreaID);
|
||||
|
||||
sb.append(String.format(areaIdFmt, currentAreaID));
|
||||
|
||||
|
||||
sb.append(String.format(areaIdFmt, currentAreaID));
|
||||
|
||||
/*
|
||||
* Primary Swell
|
||||
*/
|
||||
appendIntData(sb, sssd.getPriSwellHeightR(),
|
||||
sssd.getPriSwellHeightY());
|
||||
|
||||
double higherThreshold = Math.max(sssd.getPriSwellPeriodR(),
|
||||
sssd.getPriSwellPeriodY());
|
||||
double lowerThreshold = Math.min(sssd.getPriSwellPeriodR(),
|
||||
sssd.getPriSwellPeriodY());
|
||||
if (rankSwellPeriodHigh) {
|
||||
sssd.setRankSwellPeriodHigh(true);
|
||||
sssd.setPriSwellPeriodR(higherThreshold);
|
||||
sssd.setPriSwellPeriodY(lowerThreshold);
|
||||
appendIntData(sb, sssd.getPriSwellHeightR(), sssd.getPriSwellHeightY());
|
||||
|
||||
double higherThreshold = Math.max(sssd.getPriSwellPeriodR(), sssd.getPriSwellPeriodY());
|
||||
double lowerThreshold = Math.min(sssd.getPriSwellPeriodR(), sssd.getPriSwellPeriodY());
|
||||
if ( rankSwellPeriodHigh ) {
|
||||
sssd.setRankSwellPeriodHigh(true);
|
||||
sssd.setPriSwellPeriodR(higherThreshold);
|
||||
sssd.setPriSwellPeriodY(lowerThreshold);
|
||||
} else {
|
||||
sssd.setRankSwellPeriodHigh(false);
|
||||
sssd.setPriSwellPeriodR(lowerThreshold);
|
||||
sssd.setPriSwellPeriodY(higherThreshold);
|
||||
sssd.setRankSwellPeriodHigh(false);
|
||||
sssd.setPriSwellPeriodR(lowerThreshold);
|
||||
sssd.setPriSwellPeriodY(higherThreshold);
|
||||
}
|
||||
appendIntData(sb, sssd.getPriSwellPeriodR(),
|
||||
sssd.getPriSwellPeriodY());
|
||||
|
||||
appendIntData(sb, sssd.getPriSwellDirFromR(),
|
||||
sssd.getPriSwellDirFromY());
|
||||
appendIntData(sb, sssd.getPriSwellDirToR(),
|
||||
sssd.getPriSwellDirToY());
|
||||
|
||||
appendIntData(sb, sssd.getPriSwellPeriodR(), sssd.getPriSwellPeriodY());
|
||||
|
||||
appendIntData(sb, sssd.getPriSwellDirFromR(), sssd.getPriSwellDirFromY());
|
||||
appendIntData(sb, sssd.getPriSwellDirToR(), sssd.getPriSwellDirToY());
|
||||
|
||||
/*
|
||||
* Secondary Swell
|
||||
*/
|
||||
appendIntData(sb, sssd.getSecSwellHeightR(),
|
||||
sssd.getSecSwellHeightY());
|
||||
|
||||
higherThreshold = Math.max(sssd.getSecSwellPeriodR(),
|
||||
sssd.getSecSwellPeriodY());
|
||||
lowerThreshold = Math.min(sssd.getSecSwellPeriodR(),
|
||||
sssd.getSecSwellPeriodY());
|
||||
if (rankSwellPeriodHigh) {
|
||||
// sssd.setRankSwellPeriodHigh(true);
|
||||
sssd.setSecSwellPeriodR(higherThreshold);
|
||||
sssd.setSecSwellPeriodY(lowerThreshold);
|
||||
appendIntData(sb, sssd.getSecSwellHeightR(), sssd.getSecSwellHeightY());
|
||||
|
||||
higherThreshold = Math.max(sssd.getSecSwellPeriodR(), sssd.getSecSwellPeriodY());
|
||||
lowerThreshold = Math.min(sssd.getSecSwellPeriodR(), sssd.getSecSwellPeriodY());
|
||||
if ( rankSwellPeriodHigh ) {
|
||||
//sssd.setRankSwellPeriodHigh(true);
|
||||
sssd.setSecSwellPeriodR(higherThreshold);
|
||||
sssd.setSecSwellPeriodY(lowerThreshold);
|
||||
} else {
|
||||
// sssd.setRankSwellPeriodHigh(false);
|
||||
sssd.setSecSwellPeriodR(lowerThreshold);
|
||||
sssd.setSecSwellPeriodY(higherThreshold);
|
||||
//sssd.setRankSwellPeriodHigh(false);
|
||||
sssd.setSecSwellPeriodR(lowerThreshold);
|
||||
sssd.setSecSwellPeriodY(higherThreshold);
|
||||
}
|
||||
appendIntData(sb, sssd.getSecSwellPeriodR(),
|
||||
sssd.getSecSwellPeriodY());
|
||||
|
||||
appendIntData(sb, sssd.getSecSwellDirFromR(),
|
||||
sssd.getSecSwellDirFromY());
|
||||
appendIntData(sb, sssd.getSecSwellDirToR(),
|
||||
sssd.getSecSwellDirToY());
|
||||
|
||||
appendIntData(sb, sssd.getSecSwellPeriodR(), sssd.getSecSwellPeriodY());
|
||||
|
||||
appendIntData(sb, sssd.getSecSwellDirFromR(), sssd.getSecSwellDirFromY());
|
||||
appendIntData(sb, sssd.getSecSwellDirToR(), sssd.getSecSwellDirToY());
|
||||
|
||||
/*
|
||||
* Append a space and add the data line to the list.
|
||||
*/
|
||||
sb.append(" ");
|
||||
|
||||
if (update == true) {
|
||||
|
||||
if (update == true)
|
||||
{
|
||||
dataList.setItem(i, sb.toString());
|
||||
} else {
|
||||
dataList.add(sb.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
dataList.add(sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
packListControls();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Data Array.
|
||||
*/
|
||||
private void createDataArray() {
|
||||
|
||||
private void createDataArray()
|
||||
{
|
||||
ssDataArray = new ArrayList<SSDispMonSwellData>();
|
||||
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
String xmlKey;
|
||||
String areaID;
|
||||
|
||||
String areaID;
|
||||
|
||||
ThresholdsXML threshXML = sstm.getThresholdsXmlData(duKey);
|
||||
|
||||
|
||||
ArrayList<AreaXML> areasArray = threshXML.getAreas();
|
||||
|
||||
if (areasArray != null) {
|
||||
for (AreaXML area : areasArray) {
|
||||
areaID = area.getAreaId();
|
||||
SSDispMonSwellData sssd = new SSDispMonSwellData();
|
||||
|
||||
sssd.setAreaID(areaID);
|
||||
|
||||
/*
|
||||
* Primary Swell
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_HT.getXmlKey();
|
||||
sssd.setPriSwellHeightR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellHeightY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_PD.getXmlKey();
|
||||
sssd.setPriSwellPeriodR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellPeriodY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_DIR_FROM.getXmlKey();
|
||||
sssd.setPriSwellDirFromR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellDirFromY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_DIR_TO.getXmlKey();
|
||||
sssd.setPriSwellDirToR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellDirToY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Secondary Swell
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_HT.getXmlKey();
|
||||
sssd.setSecSwellHeightR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellHeightY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_PD.getXmlKey();
|
||||
sssd.setSecSwellPeriodR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellPeriodY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_DIR_FROM.getXmlKey();
|
||||
sssd.setSecSwellDirFromR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellDirFromY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_DIR_TO.getXmlKey();
|
||||
sssd.setSecSwellDirToR(sstm.getThresholdValue(duKey,
|
||||
threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellDirToY(sstm.getThresholdValue(duKey,
|
||||
threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Add data to array.
|
||||
*/
|
||||
ssDataArray.add(sssd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Data at first selection.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private SSDispMonSwellData getDataAtFirstSelection() {
|
||||
int index = dataList.getSelectionIndex();
|
||||
|
||||
return ssDataArray.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Data Array.
|
||||
*
|
||||
* @param sssd
|
||||
*/
|
||||
private void updateDataArray(SSDispMonSwellData sssd) {
|
||||
int[] dataListIndexes = dataList.getSelectionIndices();
|
||||
int currentIndex = 0;
|
||||
|
||||
for (int i = 0; i < dataListIndexes.length; i++) {
|
||||
currentIndex = dataListIndexes[i];
|
||||
|
||||
ssDataArray.get(currentIndex).updateData(sssd);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TabItemComp#commitDataToXML()
|
||||
*/
|
||||
@Override
|
||||
public void commitDataToXML() {
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
String xmlKey;
|
||||
String areaID;
|
||||
|
||||
for (SSDispMonSwellData sssd : ssDataArray) {
|
||||
areaID = sssd.getAreaID();
|
||||
|
||||
for (AreaXML area : areasArray)
|
||||
{
|
||||
areaID = area.getAreaId();
|
||||
SSDispMonSwellData sssd = new SSDispMonSwellData();
|
||||
|
||||
sssd.setAreaID(areaID);
|
||||
|
||||
/*
|
||||
* Primary Swell
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_HT.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getPriSwellHeightR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getPriSwellHeightY());
|
||||
|
||||
sssd.setPriSwellHeightR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellHeightY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_PD.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getPriSwellPeriodR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getPriSwellPeriodY());
|
||||
|
||||
sssd.setPriSwellPeriodR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellPeriodY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_DIR_FROM.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getPriSwellDirFromR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getPriSwellDirFromY());
|
||||
|
||||
sssd.setPriSwellDirFromR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellDirFromY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_DIR_TO.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getPriSwellDirToR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getPriSwellDirToY());
|
||||
|
||||
sssd.setPriSwellDirToR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setPriSwellDirToY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Secondary Swell
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_HT.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getSecSwellHeightR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getSecSwellHeightY());
|
||||
|
||||
sssd.setSecSwellHeightR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellHeightY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_PD.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getSecSwellPeriodR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getSecSwellPeriodY());
|
||||
|
||||
sssd.setSecSwellPeriodR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellPeriodY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_DIR_FROM.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getSecSwellDirFromR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getSecSwellDirFromY());
|
||||
|
||||
sssd.setSecSwellDirFromR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellDirFromY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_DIR_TO.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey,
|
||||
sssd.getSecSwellDirToR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey,
|
||||
sssd.getSecSwellDirToY());
|
||||
sssd.setSecSwellDirToR(sstm.getThresholdValue(duKey, threshKeyR, areaID, xmlKey));
|
||||
sssd.setSecSwellDirToY(sstm.getThresholdValue(duKey, threshKeyY, areaID, xmlKey));
|
||||
|
||||
/*
|
||||
* Add data to array.
|
||||
*/
|
||||
ssDataArray.add(sssd);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TabItemComp#reloadData()
|
||||
*/
|
||||
|
||||
private SSDispMonSwellData getDataAtFirstSelection()
|
||||
{
|
||||
int index = dataList.getSelectionIndex();
|
||||
|
||||
return ssDataArray.get(index);
|
||||
}
|
||||
|
||||
private void updateDataArray(SSDispMonSwellData sssd)
|
||||
{
|
||||
int[] dataListIndexes = dataList.getSelectionIndices();
|
||||
int currentIndex = 0;
|
||||
|
||||
for (int i = 0; i < dataListIndexes.length; i++)
|
||||
{
|
||||
currentIndex = dataListIndexes[i];
|
||||
|
||||
ssDataArray.get(currentIndex).updateData(sssd);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reloadData() {
|
||||
public void commitDataToXML()
|
||||
{
|
||||
SSThresholdMgr sstm = SSThresholdMgr.getInstance();
|
||||
|
||||
String xmlKey;
|
||||
String areaID;
|
||||
|
||||
for (SSDispMonSwellData sssd : ssDataArray)
|
||||
{
|
||||
areaID = sssd.getAreaID();
|
||||
|
||||
/*
|
||||
* Primary Swell
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_HT.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getPriSwellHeightR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getPriSwellHeightY());
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_PD.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getPriSwellPeriodR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getPriSwellPeriodY());
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_DIR_FROM.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getPriSwellDirFromR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getPriSwellDirFromY());
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_PRIM_DIR_TO.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getPriSwellDirToR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getPriSwellDirToY());
|
||||
|
||||
/*
|
||||
* Secondary Swell
|
||||
*/
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_HT.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getSecSwellHeightR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getSecSwellHeightY());
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_PD.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getSecSwellPeriodR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getSecSwellPeriodY());
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_DIR_FROM.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getSecSwellDirFromR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getSecSwellDirFromY());
|
||||
|
||||
xmlKey = SafeSeasMonitor.SS_MON_SWELL_SEC_DIR_TO.getXmlKey();
|
||||
sstm.setThresholdValue(duKey, threshKeyR, areaID, xmlKey, sssd.getSecSwellDirToR());
|
||||
sstm.setThresholdValue(duKey, threshKeyY, areaID, xmlKey, sssd.getSecSwellDirToY());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reloadData()
|
||||
{
|
||||
dataList.removeAll();
|
||||
ssDataArray.clear();
|
||||
ssDataArray = null;
|
||||
|
||||
populateList();
|
||||
|
||||
populateList();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TabItemComp#editDataAction()
|
||||
*/
|
||||
@Override
|
||||
protected void editDataAction() {
|
||||
protected void editDataAction()
|
||||
{
|
||||
SSDispMonSwellData sssd = getDataAtFirstSelection();
|
||||
|
||||
if (monitorSwellEditDlg == null) {
|
||||
monitorSwellEditDlg = new SSDispMonSwellEditDlg(getParent()
|
||||
.getShell(), sssd, this, false);
|
||||
|
||||
if (monitorSwellEditDlg == null)
|
||||
{
|
||||
monitorSwellEditDlg = new SSDispMonSwellEditDlg(getParent().getShell(), sssd, this, false);
|
||||
monitorSwellEditDlg.open();
|
||||
monitorSwellEditDlg = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.IUpdateDisplayMonitorSwell
|
||||
* #updateThresholdData(com.raytheon.uf.viz.monitor.safeseas.threshold.
|
||||
* SSDispMonSwellData)
|
||||
*/
|
||||
@Override
|
||||
public void updateThresholdData(SSDispMonSwellData sssd) {
|
||||
public void updateThresholdData(SSDispMonSwellData sssd)
|
||||
{
|
||||
updateDataArray(sssd);
|
||||
populateList();
|
||||
populateList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
25
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSMonitoringAreaConfigDlg.java
Normal file → Executable file
25
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSMonitoringAreaConfigDlg.java
Normal file → Executable file
|
@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Display;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
|
@ -48,11 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Apr 28, 2014 3086 skorolev Updated getConfigManager.
|
||||
* Sep 04, 2014 3220 skorolev Added fireConfigUpdateEvent method. Updated handler.
|
||||
* Sep 19, 2014 2757 skorolev Updated handlers for dialog buttons.
|
||||
* Oct 16, 2014 3220 skorolev Corrected getInstance() method.
|
||||
* Oct 27, 2014 3667 skorolev Cleaned code.
|
||||
* Nov 21, 2014 3841 skorolev Corrected handleOkBtnSelection.
|
||||
* Dec 11, 2014 3220 skorolev Removed unnecessary code.
|
||||
* Feb 03, 2015 3841 skorolev Replaced resetParams with resetStatus.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -73,6 +70,7 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
public SSMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||
super(parent, title, AppName.SAFESEAS);
|
||||
SafeSeasMonitor.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,11 +80,12 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
"SAFESEAS Monitor Confirm Changes", "Save changes?");
|
||||
if (choice == SWT.YES) {
|
||||
// Save the config xml file.
|
||||
saveConfigs();
|
||||
resetAndSave();
|
||||
SSThresholdMgr.reInitialize();
|
||||
fireConfigUpdateEvent();
|
||||
// Open Threshold Dialog if zones/stations are added.
|
||||
if ((!configMgr.getAddedZones().isEmpty())
|
||||
|| (!configMgr.getAddedStations().isEmpty())) {
|
||||
// Open Threshold Dialog if zones/stations are added.
|
||||
if (editDialog() == SWT.YES) {
|
||||
ssMonitorDlg = new SSDispMonThreshDlg(shell,
|
||||
CommonConfig.AppName.SAFESEAS,
|
||||
|
@ -94,15 +93,19 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
ssMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
// Clean added zones and stations. Close dialog.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
});
|
||||
ssMonitorDlg.open();
|
||||
}
|
||||
// Clean added zones and stations.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
}
|
||||
fireConfigUpdateEvent();
|
||||
resetStatus();
|
||||
} else { // Return back to continue edit.
|
||||
return;
|
||||
}
|
||||
|
@ -119,6 +122,7 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
private void fireConfigUpdateEvent() {
|
||||
final IMonitorConfigurationEvent me = new IMonitorConfigurationEvent(
|
||||
configMgr);
|
||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -136,7 +140,10 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
@Override
|
||||
public FSSObsMonitorConfigurationManager getInstance() {
|
||||
return FSSObsMonitorConfigurationManager.getSsObsManager();
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
31
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSZoneTableDlg.java
Normal file → Executable file
31
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSZoneTableDlg.java
Normal file → Executable file
|
@ -29,6 +29,7 @@ import org.eclipse.swt.widgets.Shell;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.fog.FogRecord.FOG_THREAT;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DisplayVarName;
|
||||
|
@ -54,11 +55,9 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
|
|||
* Dec 30, 2009 3424 zhao use ObMultiHrsReports for obs data archive
|
||||
* Oct 30, 2012 1297 skorolev Changed HashMap to Map
|
||||
* Nov 10, 2012 1297 skorolev Added initiateProdArray
|
||||
* Dec 7, 2012 1351 skorolev Changes for non-blocking dialogs.
|
||||
* Dec 7, 2012 #1351 skorolev Changes for non-blocking dialogs.
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigMgr method.
|
||||
* Jan 27, 2015 3220 skorolev Removed "site". Added check on dispose.Corrected configMgr assignment.
|
||||
* Added table cache update.
|
||||
* Feb 04, 2015 3841 skorolev Corrected notify method for empty table update.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site". Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -81,10 +80,6 @@ public class SSZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
public SSZoneTableDlg(Shell parent, ObMultiHrsReports obData) {
|
||||
super(parent, obData, CommonConfig.AppName.SAFESEAS);
|
||||
configMgr = FSSObsMonitorConfigurationManager.getSsObsManager();
|
||||
obData.updateTableCache();
|
||||
zoneTblData = obData.getZoneTableData();
|
||||
zoneTblData.sortData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -155,10 +150,10 @@ public class SSZoneTableDlg extends ZoneTableDlg {
|
|||
|
||||
if (me.getSource() instanceof SafeSeasMonitor) {
|
||||
SafeSeasMonitor monitor = (SafeSeasMonitor) me.getSource();
|
||||
ObMultiHrsReports obData = monitor.getObData();
|
||||
Date date = monitor.getDialogTime();
|
||||
if (date != null) {
|
||||
Date nominalTime = date;
|
||||
ObMultiHrsReports obData = monitor.getObData();
|
||||
if (!isLinkedToFrame()) {
|
||||
nominalTime = obData.getLatestNominalTime();
|
||||
}
|
||||
|
@ -167,8 +162,6 @@ public class SSZoneTableDlg extends ZoneTableDlg {
|
|||
obData.setFogAlgCellType(monitor.getAlgCellTypes(fogAlgThreats));
|
||||
this.updateTableDlg(monitor.getObData().getObHourReports(
|
||||
nominalTime));
|
||||
} else {
|
||||
this.updateZoneTable(obData.getLatestNominalTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -286,7 +279,7 @@ public class SSZoneTableDlg extends ZoneTableDlg {
|
|||
* setZoneSortColumnAndDirection()
|
||||
*/
|
||||
@Override
|
||||
public void setZoneSortColumnAndDirection() {
|
||||
protected void setZoneSortColumnAndDirection() {
|
||||
if (zoneTblData != null) {
|
||||
zoneSortColumn = zoneTblData.getSortColumn();
|
||||
zoneSortDirection = zoneTblData.getSortDirection();
|
||||
|
@ -326,4 +319,18 @@ public class SSZoneTableDlg extends ZoneTableDlg {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg#
|
||||
* getMonitorAreaConfigInstance()
|
||||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (configMgr == null || configMgr.isPopulated()) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,14 +20,18 @@
|
|||
package com.raytheon.uf.viz.monitor.snow;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -36,6 +40,7 @@ import com.raytheon.uf.viz.core.notification.NotificationMessage;
|
|||
import com.raytheon.uf.viz.monitor.IMonitor;
|
||||
import com.raytheon.uf.viz.monitor.Monitor;
|
||||
import com.raytheon.uf.viz.monitor.ObsMonitor;
|
||||
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
|
||||
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
|
||||
import com.raytheon.uf.viz.monitor.data.ObReport;
|
||||
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
|
||||
|
@ -68,10 +73,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Nov. 1, 2012 1297 skorolev Changed HashMap to Map and clean code
|
||||
* Feb 15, 2013 1638 mschenke Changed code to reference DataURI.SEPARATOR instead of URIFilter
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Jan 27, 2015 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
* Corrected snowConfig assignment.Corrected snowConfig assignment.
|
||||
* Moved refreshing of table in the UI thread.Replaced MonitoringArea with snowAreaConfig.
|
||||
* Updated code for better performance.
|
||||
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -95,7 +97,13 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
private SnowMonitoringAreaConfigDlg areaDialog = null;
|
||||
|
||||
/** SNOW configuration manager **/
|
||||
private static FSSObsMonitorConfigurationManager snowAreaConfig = null;
|
||||
private FSSObsMonitorConfigurationManager snowConfig = null;
|
||||
|
||||
/**
|
||||
* This object contains all observation data necessary for the table dialogs
|
||||
* and trending plots
|
||||
*/
|
||||
private ObMultiHrsReports obData;
|
||||
|
||||
/** All SNOW datauri start with this */
|
||||
private final String OBS = "fssobs";
|
||||
|
@ -103,6 +111,9 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
/** regex wild card filter */
|
||||
private final String wildCard = "[\\w\\(\\)-_:.]+";
|
||||
|
||||
/** Time which Zone/County dialog shows. **/
|
||||
private Date dialogTime = null;
|
||||
|
||||
/** Array of snow listeners **/
|
||||
private final List<ISnowResourceListener> snowResources = new ArrayList<ISnowResourceListener>();
|
||||
|
||||
|
@ -117,10 +128,12 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
*/
|
||||
private SnowMonitor() {
|
||||
pluginPatterns.add(snowPattern);
|
||||
snowAreaConfig = FSSObsMonitorConfigurationManager.getSnowObsManager();
|
||||
snowConfig = new FSSObsMonitorConfigurationManager(MonName.snow.name());
|
||||
updateMonitoringArea();
|
||||
initObserver(OBS, this);
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.SNOW);
|
||||
obData.setThresholdMgr(SnowThresholdMgr.getInstance());
|
||||
obData.getZoneTableData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,17 +144,12 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
public static synchronized SnowMonitor getInstance() {
|
||||
if (monitor == null) {
|
||||
monitor = new SnowMonitor();
|
||||
monitor.createDataStructures();
|
||||
monitor.processProductAtStartup(snowAreaConfig);
|
||||
monitor.processProductAtStartup("snow");
|
||||
monitor.fireMonitorEvent(monitor);
|
||||
}
|
||||
return monitor;
|
||||
}
|
||||
|
||||
private void createDataStructures() {
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.SNOW);
|
||||
obData.setThresholdMgr(SnowThresholdMgr.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-initialization of monitor.
|
||||
*
|
||||
|
@ -162,21 +170,26 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
*/
|
||||
public void launchDialog(String type, Shell shell) {
|
||||
if (type.equals("zone")) {
|
||||
zoneDialog = new SnowZoneTableDlg(shell, obData);
|
||||
addMonitorListener(zoneDialog);
|
||||
zoneDialog.addMonitorControlListener(this);
|
||||
if (zoneDialog == null) {
|
||||
zoneDialog = new SnowZoneTableDlg(shell, obData);
|
||||
addMonitorListener(zoneDialog);
|
||||
zoneDialog.addMonitorControlListener(this);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
zoneDialog.open();
|
||||
} else if (type.equals("area")) {
|
||||
areaDialog = new SnowMonitoringAreaConfigDlg(shell,
|
||||
"SNOW Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
if (areaDialog == null) {
|
||||
areaDialog = new SnowMonitoringAreaConfigDlg(shell,
|
||||
"SNOW Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
areaDialog.open();
|
||||
}
|
||||
}
|
||||
|
@ -224,10 +237,40 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
@Override
|
||||
public void processProductMessage(final AlertMessage filtered) {
|
||||
if (snowPattern.matcher(filtered.dataURI).matches()) {
|
||||
processURI(filtered.dataURI, filtered, snowAreaConfig);
|
||||
processURI(filtered.dataURI, filtered);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort by Date.
|
||||
*
|
||||
* @author dhladky
|
||||
*
|
||||
*/
|
||||
public class SortByDate implements Comparator<Date> {
|
||||
@Override
|
||||
public int compare(Date o1, Date o2) {
|
||||
return o1.compareTo(o2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads Table Configuration.
|
||||
*
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
*/
|
||||
public void updateMonitoringArea() {
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
for (String zone : snowConfig.getAreaList()) {
|
||||
List<String> stations = snowConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -260,10 +303,10 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
*/
|
||||
@Override
|
||||
public void configUpdate(IMonitorConfigurationEvent me) {
|
||||
snowAreaConfig = (FSSObsMonitorConfigurationManager) me.getSource();
|
||||
obData.getObHourReports().updateZones(snowAreaConfig);
|
||||
snowConfig = (FSSObsMonitorConfigurationManager) me.getSource();
|
||||
updateMonitoringArea();
|
||||
if (zoneDialog != null && !zoneDialog.isDisposed()) {
|
||||
obData.updateTableCache();
|
||||
zoneDialog.refreshZoneTableData(obData);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
@ -293,10 +336,27 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
@Override
|
||||
protected void process(ObReport result) throws Exception {
|
||||
obData.addReport(result);
|
||||
obData.getZoneTableData(result.getRefHour());
|
||||
fireMonitorEvent(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Dialog Time.
|
||||
*
|
||||
* @return dialogTime
|
||||
*/
|
||||
public Date getDialogTime() {
|
||||
return dialogTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets dialog time.
|
||||
*
|
||||
* @param dialogTime
|
||||
*/
|
||||
public void setDialogTime(Date dialogTime) {
|
||||
this.dialogTime = dialogTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a listener.
|
||||
*
|
||||
|
@ -317,6 +377,16 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
snowResources.remove(isru);
|
||||
}
|
||||
|
||||
/**
|
||||
* SnowResource sets the Drawtime.
|
||||
*
|
||||
* @param dialogTime
|
||||
*/
|
||||
public void updateDialogTime(Date dialogTime) {
|
||||
this.dialogTime = dialogTime;
|
||||
fireMonitorEvent(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Close SNOW zone table dialog.
|
||||
*/
|
||||
|
@ -348,7 +418,7 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets SNOW Zone Dialog.
|
||||
* Gets Zone Dialog.
|
||||
*
|
||||
* @return zoneDialog
|
||||
*/
|
||||
|
@ -356,15 +426,6 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
|||
return zoneDialog;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets SNOW Area configuration dialog
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SnowMonitoringAreaConfigDlg getAreaDialog() {
|
||||
return areaDialog;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the zoneDialog
|
||||
*
|
||||
|
|
21
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/threshold/SnowThresholdMgr.java
Normal file → Executable file
21
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/threshold/SnowThresholdMgr.java
Normal file → Executable file
|
@ -22,6 +22,7 @@ package com.raytheon.uf.viz.monitor.snow.threshold;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
||||
|
@ -41,7 +42,6 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.SnowMonitor;
|
|||
* Feb 03, 2014 #2757 skorolev Fixed reInitialize()
|
||||
* May 21, 2014 3086 skorolev Cleaned code.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site".
|
||||
* Oct 16, 2014 3220 skorolev Corrected areaConfigMgr assignment.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,7 +58,9 @@ public class SnowThresholdMgr extends AbstractThresholdMgr {
|
|||
super("DefaultSnowDisplayThresholds.xml",
|
||||
"DefaultSnowMonitorThresholds.xml", AppName.SNOW.name()
|
||||
.toLowerCase());
|
||||
areaConfigMgr = FSSObsMonitorConfigurationManager.getSnowObsManager();
|
||||
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -112,4 +114,19 @@ public class SnowThresholdMgr extends AbstractThresholdMgr {
|
|||
}
|
||||
return threshKeys;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr#
|
||||
* getMonitorAreaConfigInstance()
|
||||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (areaConfigMgr == null) {
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
}
|
||||
return areaConfigMgr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@ import org.eclipse.core.commands.ExecutionException;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.uf.viz.monitor.snow.SnowMonitor;
|
||||
import com.raytheon.uf.viz.monitor.snow.ui.dialogs.SnowMonitoringAreaConfigDlg;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* The Snow Area Action
|
||||
|
@ -50,6 +51,11 @@ import com.raytheon.uf.viz.monitor.snow.SnowMonitor;
|
|||
|
||||
public class SnowAreaConfigAction extends AbstractHandler {
|
||||
|
||||
/**
|
||||
* SNOW Monitoring Area Configuration Dialog.
|
||||
*/
|
||||
private SnowMonitoringAreaConfigDlg configDlg;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -59,12 +65,19 @@ public class SnowAreaConfigAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
SnowMonitor snow = SnowMonitor.getInstance();
|
||||
if (snow.getAreaDialog() == null || snow.getAreaDialog().isDisposed()) {
|
||||
if (configDlg == null || configDlg.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
snow.launchDialog("area", shell);
|
||||
configDlg = new SnowMonitoringAreaConfigDlg(shell,
|
||||
"SNOW Monitor Area Configuration");
|
||||
configDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
configDlg = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
configDlg.open();
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -48,7 +48,6 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 21, 2014 3086 skorolev Cleaned code.
|
||||
* Oct 16, 2014 3220 skorolev Added condition to avoid NPE.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -214,86 +213,84 @@ public class SnowDisplayMeteoTab extends TabItemComp implements
|
|||
|
||||
List<AreaXML> areasArray = threshXML.getAreas();
|
||||
|
||||
if (areasArray != null) {
|
||||
for (AreaXML area : areasArray) {
|
||||
areaID = area.getAreaId();
|
||||
SnowDisplayMeteoData sdmd = new SnowDisplayMeteoData();
|
||||
for (AreaXML area : areasArray) {
|
||||
areaID = area.getAreaId();
|
||||
SnowDisplayMeteoData sdmd = new SnowDisplayMeteoData();
|
||||
|
||||
sdmd.setAreaID(areaID);
|
||||
sdmd.setAreaID(areaID);
|
||||
|
||||
/* Tempature */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_TEMP.getXmlKey();
|
||||
sdmd.setTempR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setTempY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
/* Tempature */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_TEMP.getXmlKey();
|
||||
sdmd.setTempR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setTempY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* Dew point */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_DEWPT.getXmlKey();
|
||||
sdmd.setDewpointR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setDewpointY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
/* Dew point */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_DEWPT.getXmlKey();
|
||||
sdmd.setDewpointR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setDewpointY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* Visibility */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_VIS.getXmlKey();
|
||||
sdmd.setVisR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setVisY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
/* Visibility */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_VIS.getXmlKey();
|
||||
sdmd.setVisR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setVisY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* SLP */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SLP.getXmlKey();
|
||||
sdmd.setSlpR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setSlpY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
/* SLP */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SLP.getXmlKey();
|
||||
sdmd.setSlpR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setSlpY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* Hourly Precipitation */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_HOURLY_PRECIP.getXmlKey();
|
||||
sdmd.setHrPrecipR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setHrPrecipY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
/* Hourly Precipitation */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_HOURLY_PRECIP.getXmlKey();
|
||||
sdmd.setHrPrecipR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setHrPrecipY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* Wind Chill */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_WIND_CHILL.getXmlKey();
|
||||
sdmd.setWindChillR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setWindChillY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
/* Wind Chill */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_WIND_CHILL.getXmlKey();
|
||||
sdmd.setWindChillR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setWindChillY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* Frost Bite */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_FROSTBITE.getXmlKey();
|
||||
sdmd.setFrostBiteR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setFrostBiteY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
/* Frost Bite */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_FROSTBITE.getXmlKey();
|
||||
sdmd.setFrostBiteR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setFrostBiteY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* Snow Depth */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SNOW_DEPTH.getXmlKey();
|
||||
sdmd.setSnowDepthR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setSnowDepthY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
/* Snow Depth */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SNOW_DEPTH.getXmlKey();
|
||||
sdmd.setSnowDepthR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setSnowDepthY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* SNINCR Hourly */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SNINCR_HOURLY.getXmlKey();
|
||||
sdmd.setSnincrHrlyR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setSnincrHrlyY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
/* SNINCR Hourly */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SNINCR_HOURLY.getXmlKey();
|
||||
sdmd.setSnincrHrlyR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setSnincrHrlyY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
|
||||
/* SNINCR Total */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SNINCR_TOTAL.getXmlKey();
|
||||
sdmd.setSnincrTotR(stm.getThresholdValue(duKey, threshKeyR,
|
||||
areaID, xmlKey));
|
||||
sdmd.setSnincrTotY(stm.getThresholdValue(duKey, threshKeyY,
|
||||
areaID, xmlKey));
|
||||
/* SNINCR Total */
|
||||
xmlKey = SnowDisplay.SNOW_DISP_METEO_SNINCR_TOTAL.getXmlKey();
|
||||
sdmd.setSnincrTotR(stm.getThresholdValue(duKey, threshKeyR, areaID,
|
||||
xmlKey));
|
||||
sdmd.setSnincrTotY(stm.getThresholdValue(duKey, threshKeyY, areaID,
|
||||
xmlKey));
|
||||
|
||||
/* Add data to array. */
|
||||
snowDataArray.add(sdmd);
|
||||
}
|
||||
/* Add data to array. */
|
||||
snowDataArray.add(sdmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
25
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowMonitoringAreaConfigDlg.java
Normal file → Executable file
25
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowMonitoringAreaConfigDlg.java
Normal file → Executable file
|
@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Display;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
|
@ -48,12 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Apr 28, 2014 3086 skorolev Updated snowConfigManager.
|
||||
* Sep 04, 2014 3220 skorolev Added fireConfigUpdateEvent method. Updated handler.
|
||||
* Sep 19, 2014 2757 skorolev Updated handlers for dialog buttons.
|
||||
* Oct 16, 2014 3220 skorolev Corrected getInstance() method.
|
||||
* Oct 27, 2014 3667 skorolev Cleaned code.
|
||||
* Nov 21, 2014 3841 skorolev Corrected handleOkBtnSelection.
|
||||
* Dec 11, 2014 3220 skorolev Removed unnecessary code.
|
||||
* Feb 03, 2015 3841 skorolev Replaced resetParams with resetStatus.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -72,6 +68,7 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
public SnowMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||
super(parent, title, AppName.SNOW);
|
||||
SnowMonitor.getInstance();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -87,8 +84,9 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
"SNOW Monitor Confirm Changes", "Save changes?");
|
||||
if (choice == SWT.YES) {
|
||||
// Save the config xml file.
|
||||
saveConfigs();
|
||||
resetAndSave();
|
||||
SnowThresholdMgr.reInitialize();
|
||||
fireConfigUpdateEvent();
|
||||
// Open Threshold Dialog if zones/stations are added.
|
||||
if ((!configMgr.getAddedZones().isEmpty())
|
||||
|| (!configMgr.getAddedStations().isEmpty())) {
|
||||
|
@ -103,15 +101,19 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
// Clean added zones and stations. Close dialog.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
});
|
||||
snowMonitorDlg.open();
|
||||
}
|
||||
// Clean added zones and stations.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
}
|
||||
fireConfigUpdateEvent();
|
||||
resetStatus();
|
||||
} else { // Return back to continue edit.
|
||||
return;
|
||||
}
|
||||
|
@ -131,7 +133,11 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getInstance() {
|
||||
return FSSObsMonitorConfigurationManager.getSnowObsManager();
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -151,6 +157,7 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
private void fireConfigUpdateEvent() {
|
||||
final IMonitorConfigurationEvent me = new IMonitorConfigurationEvent(
|
||||
configMgr);
|
||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
30
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowZoneTableDlg.java
Normal file → Executable file
30
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowZoneTableDlg.java
Normal file → Executable file
|
@ -26,6 +26,7 @@ import java.util.List;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DisplayVarName;
|
||||
|
@ -53,9 +54,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg;
|
|||
* Nov. 8, 2012 1297 skorolev Added initiateProdArray method
|
||||
* Dec 7, 2012 1351 skorolev Changes for non-blocking dialogs
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigMgr method.
|
||||
* Jan 27, 2015 3220 skorolev Removed "site". Added check on dispose.Corrected configMgr assignment.
|
||||
* Added table cache update.
|
||||
* Feb 04, 2015 3841 skorolev Corrected notify method for empty table update.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site". Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -76,10 +75,6 @@ public class SnowZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
public SnowZoneTableDlg(Shell parent, ObMultiHrsReports obData) {
|
||||
super(parent, obData, CommonConfig.AppName.SNOW);
|
||||
configMgr = FSSObsMonitorConfigurationManager.getSnowObsManager();
|
||||
obData.updateTableCache();
|
||||
zoneTblData = obData.getZoneTableData();
|
||||
zoneTblData.sortData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -148,15 +143,12 @@ public class SnowZoneTableDlg extends ZoneTableDlg {
|
|||
|
||||
if (me.getSource() instanceof SnowMonitor) {
|
||||
SnowMonitor monitor = (SnowMonitor) me.getSource();
|
||||
ObMultiHrsReports obData = monitor.getObData();
|
||||
Date date = monitor.getDialogTime();
|
||||
if (date != null) {
|
||||
if (!isLinkedToFrame()) {
|
||||
date = obData.getLatestNominalTime();
|
||||
date = monitor.getObData().getLatestNominalTime();
|
||||
}
|
||||
this.updateTableDlg(obData.getObHourReports(date));
|
||||
} else {
|
||||
this.updateZoneTable(obData.getLatestNominalTime());
|
||||
this.updateTableDlg(monitor.getObData().getObHourReports(date));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -264,4 +256,18 @@ public class SnowZoneTableDlg extends ZoneTableDlg {
|
|||
protected void shellDisposeAction() {
|
||||
// Not used
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg#getInstance()
|
||||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (configMgr == null || configMgr.isPopulated()) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,19 +21,18 @@ package com.raytheon.uf.viz.monitor;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecordTransform;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.inventory.exception.DataCubeException;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -44,7 +43,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationMessage;
|
||||
import com.raytheon.uf.viz.datacube.DataCubeContainer;
|
||||
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
|
||||
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
|
||||
import com.raytheon.uf.viz.monitor.data.ObReport;
|
||||
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
|
||||
import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent;
|
||||
|
@ -62,7 +61,7 @@ import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent;
|
|||
* Sep 11, 2013 2277 mschenke Got rid of ScriptCreator references
|
||||
* Feb 04, 2014 2757 skorolev Added filter for removed stations
|
||||
* May 08, 2014 3086 skorolev Added current site definition.
|
||||
* Jan 27, 2015 3220 skorolev Removed cwa and monitorUsefrom vals.Added zones parameter to processURI.Updated code for better performance.
|
||||
* Sep 04, 2014 3220 skorolev Removed cwa and monitorUsefrom vals.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -104,15 +103,6 @@ public abstract class ObsMonitor extends Monitor {
|
|||
/** these are the patterns for the stations **/
|
||||
protected ArrayList<Pattern> stationPatterns = new ArrayList<Pattern>();
|
||||
|
||||
/**
|
||||
* This object contains all observation data necessary for the table dialogs
|
||||
* and trending plots
|
||||
*/
|
||||
protected ObMultiHrsReports obData;
|
||||
|
||||
/** current time of monitor dialog */
|
||||
protected Date dialogTime;
|
||||
|
||||
/** Current CWA **/
|
||||
public static String cwa = LocalizationManager.getInstance().getSite();
|
||||
|
||||
|
@ -197,30 +187,45 @@ public abstract class ObsMonitor extends Monitor {
|
|||
*
|
||||
* @param dataURI
|
||||
* @param filtered
|
||||
* @param areaConfig
|
||||
*/
|
||||
public void processURI(String dataURI, AlertMessage filtered,
|
||||
final FSSObsMonitorConfigurationManager areaConfig) {
|
||||
List<String> zones = areaConfig.getAreaList();
|
||||
public void processURI(String dataURI, AlertMessage filtered) {
|
||||
try {
|
||||
Map<String, RequestConstraint> constraints = RequestConstraint
|
||||
.toConstraintMapping(DataURIUtil.createDataURIMap(dataURI));
|
||||
FSSObsRecord[] pdos = requestFSSObs(constraints, null);
|
||||
if (pdos.length > 0 && pdos[0].getTimeObs() != null) {
|
||||
final FSSObsRecord objectToSend = pdos[0];
|
||||
if (!zones.isEmpty()) {
|
||||
ObReport result = GenerateFSSObReport
|
||||
.generateObReport(objectToSend);
|
||||
statusHandler.handle(Priority.INFO, "New FSSrecord ===> "
|
||||
+ objectToSend.getDataURI());
|
||||
try {
|
||||
process(result);
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"An error has occured processing the incoming messages.",
|
||||
e);
|
||||
}
|
||||
try {
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
// Filter removed stations
|
||||
ArrayList<String> zones = MonitoringArea
|
||||
.getZoneIds(objectToSend
|
||||
.getPlatformId());
|
||||
if (!zones.isEmpty()) {
|
||||
ObReport result = GenerateFSSObReport
|
||||
.generateObReport(objectToSend);
|
||||
statusHandler
|
||||
.handle(Priority.INFO,
|
||||
"New FSSrecord ===> "
|
||||
+ objectToSend
|
||||
.getDataURI());
|
||||
process(result);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"An error has occured processing the incoming messages.",
|
||||
e);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"An error has occured processing incoming dataURIs.",
|
||||
e);
|
||||
}
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
|
@ -232,58 +237,56 @@ public abstract class ObsMonitor extends Monitor {
|
|||
/**
|
||||
* Process products at startup
|
||||
*
|
||||
* @param zones
|
||||
* @param monitorName
|
||||
*
|
||||
*/
|
||||
public void processProductAtStartup(
|
||||
FSSObsMonitorConfigurationManager areaConfig) {
|
||||
public void processProductAtStartup(String monitorName) {
|
||||
|
||||
List<String> zones = areaConfig.getAreaList();
|
||||
if (!zones.isEmpty()) {
|
||||
/**
|
||||
* Assume this number for MaxNumObsTimes is larger enough to cover
|
||||
* data of all observations (at least 24 hours' worth of data) in
|
||||
* database [changed from 10 to 240 on May, 18, 2010 for DR #6015,
|
||||
* zhao]
|
||||
*/
|
||||
int MaxNumObsTimes = 240;
|
||||
Map<String, RequestConstraint> vals = new HashMap<String, RequestConstraint>();
|
||||
try {
|
||||
vals.put(FSSObsRecord.PLUGIN_NAME_ID, new RequestConstraint(
|
||||
FSSObsRecord.PLUGIN_NAME));
|
||||
/**
|
||||
* Assume this number for MaxNumObsTimes is larger enough to cover data
|
||||
* of all observations (at least 24 hours' worth of data) in database
|
||||
* [changed from 10 to 240 on May, 18, 2010 for DR #6015, zhao]
|
||||
*/
|
||||
int MaxNumObsTimes = 240;
|
||||
Map<String, RequestConstraint> vals = new HashMap<String, RequestConstraint>();
|
||||
try {
|
||||
vals.put(FSSObsRecord.PLUGIN_NAME_ID, new RequestConstraint(
|
||||
FSSObsRecord.PLUGIN_NAME));
|
||||
|
||||
DataTime[] dataTimesAvailable = DataCubeContainer
|
||||
.performTimeQuery(vals, false);
|
||||
DataTime[] selectedTimes = dataTimesAvailable;
|
||||
DataTime[] dataTimesAvailable = DataCubeContainer.performTimeQuery(
|
||||
vals, false);
|
||||
DataTime[] selectedTimes = dataTimesAvailable;
|
||||
|
||||
// Ensure that the latest product is retrieved.
|
||||
// [Modified: retrieve at most MaxNumObsTimes data
|
||||
// points, Feb
|
||||
// 19, 2010, zhao]
|
||||
if (dataTimesAvailable.length > 0) {
|
||||
Arrays.sort(dataTimesAvailable);
|
||||
// at most, MaxNumObsTimes observation times are
|
||||
// considered
|
||||
if (dataTimesAvailable.length > MaxNumObsTimes) {
|
||||
selectedTimes = new DataTime[MaxNumObsTimes];
|
||||
System.arraycopy(dataTimesAvailable,
|
||||
dataTimesAvailable.length - MaxNumObsTimes,
|
||||
selectedTimes, 0, MaxNumObsTimes);
|
||||
}
|
||||
// Ensure that the latest product is retrieved.
|
||||
// [Modified: retrieve at most MaxNumObsTimes data
|
||||
// points, Feb
|
||||
// 19, 2010, zhao]
|
||||
if (dataTimesAvailable.length > 0) {
|
||||
Arrays.sort(dataTimesAvailable);
|
||||
// at most, MaxNumObsTimes observation times are
|
||||
// considered
|
||||
if (dataTimesAvailable.length > MaxNumObsTimes) {
|
||||
selectedTimes = new DataTime[MaxNumObsTimes];
|
||||
System.arraycopy(dataTimesAvailable,
|
||||
dataTimesAvailable.length - MaxNumObsTimes,
|
||||
selectedTimes, 0, MaxNumObsTimes);
|
||||
}
|
||||
|
||||
FSSObsRecord[] obsRecords = requestFSSObs(vals,
|
||||
selectedTimes);
|
||||
for (FSSObsRecord objectToSend : obsRecords) {
|
||||
// Filter removed stations
|
||||
final ObReport result = GenerateFSSObReport
|
||||
FSSObsRecord[] obsRecords = requestFSSObs(vals, selectedTimes);
|
||||
for (FSSObsRecord objectToSend : obsRecords) {
|
||||
// Filter removed stations
|
||||
ArrayList<String> zones = MonitoringArea
|
||||
.getZoneIds(objectToSend.getPlatformId());
|
||||
if (!zones.isEmpty()) {
|
||||
ObReport result = GenerateFSSObReport
|
||||
.generateObReport(objectToSend);
|
||||
processAtStartup(result);
|
||||
}
|
||||
}
|
||||
} catch (DataCubeException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"No data in database at startup.");
|
||||
}
|
||||
} catch (DataCubeException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"No data in database at startup. " + monitorName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -312,35 +315,4 @@ public abstract class ObsMonitor extends Monitor {
|
|||
constraints);
|
||||
return FSSObsRecordTransform.toFSSObsRecords(pdc);
|
||||
}
|
||||
|
||||
public ObMultiHrsReports getObData() {
|
||||
return obData;
|
||||
}
|
||||
|
||||
public void setObData(ObMultiHrsReports obData) {
|
||||
this.obData = obData;
|
||||
}
|
||||
|
||||
/**
|
||||
* The date for the dialog to stay in step with
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Date getDialogTime() {
|
||||
return dialogTime;
|
||||
}
|
||||
|
||||
public void setDialogTime(Date dialogTime) {
|
||||
this.dialogTime = dialogTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resource sets the Drawtime.
|
||||
*
|
||||
* @param dialogTime
|
||||
*/
|
||||
public void updateDialogTime(Date dialogTime) {
|
||||
this.dialogTime = dialogTime;
|
||||
fireMonitorEvent(this);
|
||||
}
|
||||
}
|
||||
|
|
152
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/MonitorAreaThresholds.java
Executable file → Normal file
152
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/MonitorAreaThresholds.java
Executable file → Normal file
|
@ -20,10 +20,8 @@
|
|||
package com.raytheon.uf.viz.monitor.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.ChosenAppKey;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.ThreatLevel;
|
||||
|
@ -42,7 +40,6 @@ import com.raytheon.uf.common.monitor.data.ObConst.VarName;
|
|||
* Feb 17, 2009 1999 grichard Initial creation.
|
||||
* 3/16/2009 2047 grichard Add threat monitoring routines.
|
||||
* Dec 24, 2009 3424 zhao added getDualValuedThresholdMap and getSingleValuedThresholdMap
|
||||
* Jan 12, 2015 3220 skorolev Replaced MonitoringArea with areaConfig.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -65,6 +62,56 @@ public final class MonitorAreaThresholds {
|
|||
// Map containing the display thresholds
|
||||
private static Map<String, DisplayThresholdsSet> zoneDisplayThresholds = new HashMap<String, DisplayThresholdsSet>();
|
||||
|
||||
/**
|
||||
* This method receives an observation report and a variable name, and
|
||||
* returns the threat level of that single variable.
|
||||
*
|
||||
* @param report
|
||||
* -- the observation report
|
||||
* @param varName
|
||||
* -- the variable name within the report
|
||||
* @return -- the threat level
|
||||
*/
|
||||
public static ObConst.ThreatLevel getThreatLevel(ObReport report,
|
||||
VarName varName) {
|
||||
|
||||
ThreatLevel threatLevel = ThreatLevel.GRAY;
|
||||
ThreatLevel temp = ThreatLevel.GRAY;
|
||||
float varValue = ObConst.MISSING;
|
||||
|
||||
try {
|
||||
varValue = getReportVarValue(report, varName);
|
||||
|
||||
String zoneId = report.getZoneId();
|
||||
// TEMPORARILY USE DEFAULT ZONE ID, NAMELY, DEFAULT STATION.
|
||||
zoneId = ObConst.DEFAULT_STATION_NAME;
|
||||
if (report.isStationary()) {
|
||||
if (MonitoringArea.listZonesToPlatform(report.getPlatformId())
|
||||
.isEmpty()) {
|
||||
// use the default zone if there are no zones
|
||||
temp = getZoneThreatLevel(zoneId, varName, varValue);
|
||||
if (temp.ordinal() < threatLevel.ordinal()) {
|
||||
threatLevel = temp;
|
||||
}
|
||||
} else {
|
||||
for (String z : MonitoringArea.listZonesToPlatform(report
|
||||
.getPlatformId())) {
|
||||
temp = getZoneThreatLevel(z, varName, varValue);
|
||||
if (temp.ordinal() < threatLevel.ordinal()) {
|
||||
threatLevel = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
temp = getZoneThreatLevel(zoneId, varName, varValue);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// return the default threat level
|
||||
}
|
||||
|
||||
return threatLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method receives an observation report and a variable name, and
|
||||
* returns the threat level of that single variable.
|
||||
|
@ -80,13 +127,12 @@ public final class MonitorAreaThresholds {
|
|||
|
||||
ThreatLevel threatLevel = ThreatLevel.GRAY;
|
||||
ThreatLevel temp = ThreatLevel.GRAY;
|
||||
String station = report.getPlatformId();
|
||||
|
||||
try {
|
||||
if (report.isStationary()) {
|
||||
if (chosenAppKey == ChosenAppKey.SAFESEAS) {
|
||||
List<String> ssZones = FSSObsMonitorConfigurationManager
|
||||
.getSsObsManager().getAreaByStationId(station);
|
||||
if (ssZones.isEmpty()) {
|
||||
if (MonitoringArea.listZonesToPlatform(
|
||||
report.getPlatformId()).isEmpty()) {
|
||||
// use the default zone if there are no zones
|
||||
for (VarName v : VarName.values()) {
|
||||
if (v == VarName.TEMPERATURE
|
||||
|
@ -104,7 +150,8 @@ public final class MonitorAreaThresholds {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
for (String z : ssZones) {
|
||||
for (String z : MonitoringArea
|
||||
.listZonesToPlatform(report.getPlatformId())) {
|
||||
for (VarName v : VarName.values()) {
|
||||
if (v == VarName.TEMPERATURE
|
||||
|| v == VarName.WIND_CHILL
|
||||
|
@ -122,9 +169,8 @@ public final class MonitorAreaThresholds {
|
|||
}
|
||||
}
|
||||
} else if (chosenAppKey == ChosenAppKey.SNOW) {
|
||||
List<String> snowZones = FSSObsMonitorConfigurationManager
|
||||
.getSnowObsManager().getAreaByStationId(station);
|
||||
if (snowZones.isEmpty()) {
|
||||
if (MonitoringArea.listZonesToPlatform(
|
||||
report.getPlatformId()).isEmpty()) {
|
||||
// use the default zone if there are no zones
|
||||
for (VarName v : VarName.values()) {
|
||||
if (v == VarName.PRIM_SWELL_HT) {
|
||||
|
@ -139,7 +185,8 @@ public final class MonitorAreaThresholds {
|
|||
}
|
||||
|
||||
} else {
|
||||
for (String z : snowZones) {
|
||||
for (String z : MonitoringArea
|
||||
.listZonesToPlatform(report.getPlatformId())) {
|
||||
for (VarName v : VarName.values()) {
|
||||
if (v == VarName.PRIM_SWELL_HT) {
|
||||
break;
|
||||
|
@ -152,10 +199,9 @@ public final class MonitorAreaThresholds {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {// chosenAppKey = FOG
|
||||
List<String> fogZones = FSSObsMonitorConfigurationManager
|
||||
.getFogObsManager().getAreaByStationId(station);
|
||||
if (fogZones.isEmpty()) {
|
||||
} else {
|
||||
if (MonitoringArea.listZonesToPlatform(
|
||||
report.getPlatformId()).isEmpty()) {
|
||||
// use the default zone if there are no zones
|
||||
temp = getZoneThreatLevel(ObConst.DEFAULT_STATION_NAME,
|
||||
VarName.PRES_WX, report.getPresentWx());
|
||||
|
@ -163,21 +209,20 @@ public final class MonitorAreaThresholds {
|
|||
threatLevel = temp;
|
||||
}
|
||||
temp = getZoneThreatLevel(ObConst.DEFAULT_STATION_NAME,
|
||||
VarName.VISIBILITY,
|
||||
getReportVarValue(report, VarName.VISIBILITY));
|
||||
VarName.VISIBILITY, getReportVarValue(report,
|
||||
VarName.VISIBILITY));
|
||||
if (temp.ordinal() < threatLevel.ordinal()) {
|
||||
threatLevel = temp;
|
||||
}
|
||||
} else {
|
||||
for (String z : fogZones) {
|
||||
for (String z : MonitoringArea
|
||||
.listZonesToPlatform(report.getPlatformId())) {
|
||||
temp = getZoneThreatLevel(z, VarName.PRES_WX,
|
||||
report.getPresentWx());
|
||||
if (temp.ordinal() < threatLevel.ordinal()) {
|
||||
threatLevel = temp;
|
||||
}
|
||||
temp = getZoneThreatLevel(
|
||||
z,
|
||||
VarName.VISIBILITY,
|
||||
temp = getZoneThreatLevel(z, VarName.VISIBILITY,
|
||||
getReportVarValue(report,
|
||||
VarName.VISIBILITY));
|
||||
if (temp.ordinal() < threatLevel.ordinal()) {
|
||||
|
@ -186,7 +231,6 @@ public final class MonitorAreaThresholds {
|
|||
}
|
||||
}
|
||||
}
|
||||
// report is not Stationary
|
||||
} else {
|
||||
if (chosenAppKey == ChosenAppKey.SAFESEAS) {
|
||||
String zoneId = report.getZoneId();
|
||||
|
@ -199,8 +243,8 @@ public final class MonitorAreaThresholds {
|
|||
} else if (v == VarName.STATIONARY) {
|
||||
break;
|
||||
}
|
||||
temp = getZoneThreatLevel(zoneId, v,
|
||||
getReportVarValue(report, v));
|
||||
temp = getZoneThreatLevel(zoneId, v, getReportVarValue(
|
||||
report, v));
|
||||
if (temp.ordinal() < threatLevel.ordinal()) {
|
||||
threatLevel = temp;
|
||||
}
|
||||
|
@ -213,13 +257,13 @@ public final class MonitorAreaThresholds {
|
|||
if (v == VarName.PRIM_SWELL_HT) {
|
||||
break;
|
||||
}
|
||||
temp = getZoneThreatLevel(zoneId, v,
|
||||
getReportVarValue(report, v));
|
||||
temp = getZoneThreatLevel(zoneId, v, getReportVarValue(
|
||||
report, v));
|
||||
if (temp.ordinal() < threatLevel.ordinal()) {
|
||||
threatLevel = temp;
|
||||
}
|
||||
}
|
||||
} else {// chosenAppKey = FOG
|
||||
} else {
|
||||
String zoneId = report.getZoneId();
|
||||
// TEMPORARILY USE DEFAULT ZONE ID, NAMELY, DEFAULT STATION.
|
||||
zoneId = ObConst.DEFAULT_STATION_NAME;
|
||||
|
@ -561,44 +605,32 @@ public final class MonitorAreaThresholds {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [Dec 24, 2009, zhao]
|
||||
*
|
||||
* @param zone
|
||||
* the zone ID
|
||||
* @param varName
|
||||
* enumerated-type variable name
|
||||
* @return single-valued threshold map, or null if the variable name is
|
||||
* invalid or if the map contains no mapping for the key
|
||||
* @param zone the zone ID
|
||||
* @param varName enumerated-type variable name
|
||||
* @return single-valued threshold map, or null if the variable
|
||||
* name is invalid or if the map contains no mapping for the key
|
||||
*/
|
||||
public static Map<ObConst.ThreatLevel, Float> getSingleValuedThresholdMap(
|
||||
String zone, ObConst.VarName varName) {
|
||||
if (varName == VarName.WIND_DIR || varName == VarName.PRIM_SWELL_DIR
|
||||
|| varName == VarName.SEC_SWELL_DIR) {
|
||||
return null;
|
||||
}
|
||||
return zoneMonitorThresholds.get(zone).getSingleValuedThresholdMap(
|
||||
varName);
|
||||
public static Map<ObConst.ThreatLevel,Float> getSingleValuedThresholdMap(String zone, ObConst.VarName varName) {
|
||||
if (varName == VarName.WIND_DIR || varName == VarName.PRIM_SWELL_DIR || varName == VarName.SEC_SWELL_DIR ) {
|
||||
return null;
|
||||
}
|
||||
return zoneMonitorThresholds.get(zone).getSingleValuedThresholdMap(varName);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [Dec 24, 2009, zhao]
|
||||
*
|
||||
* @param zone
|
||||
* the zone ID
|
||||
* @param varName
|
||||
* enumerated-type variable name
|
||||
* @return duel-valued threshold map, or null if the variable name is
|
||||
* invalid or if the map contains no mapping for the key
|
||||
* @param zone the zone ID
|
||||
* @param varName enumerated-type variable name
|
||||
* @return duel-valued threshold map, or null if the variable
|
||||
* name is invalid or if the map contains no mapping for the key
|
||||
*/
|
||||
public static Map<ObConst.ThreatLevel, Float[]> getDualValuedThresholdMap(
|
||||
String zone, ObConst.VarName varName) {
|
||||
if (varName != VarName.WIND_DIR || varName != VarName.PRIM_SWELL_DIR
|
||||
|| varName != VarName.SEC_SWELL_DIR) {
|
||||
return null;
|
||||
}
|
||||
return zoneMonitorThresholds.get(zone).getDualValuedThresholdMap(
|
||||
varName);
|
||||
public static Map<ObConst.ThreatLevel,Float[]> getDualValuedThresholdMap(String zone, ObConst.VarName varName) {
|
||||
if (varName != VarName.WIND_DIR || varName != VarName.PRIM_SWELL_DIR || varName != VarName.SEC_SWELL_DIR ) {
|
||||
return null;
|
||||
}
|
||||
return zoneMonitorThresholds.get(zone).getDualValuedThresholdMap(varName);
|
||||
}
|
||||
}
|
||||
|
|
112
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObHourReports.java
Normal file → Executable file
112
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObHourReports.java
Normal file → Executable file
|
@ -23,8 +23,8 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -40,14 +40,13 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
|||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec. 1, 2009 3424 zhao Initial creation.
|
||||
* Oct.29, 2012 1297 skorolev Changed HashMap to Map
|
||||
* Oct.31, 2012 1297 skorolev Cleaned code.
|
||||
* Sep 04, 2014 3220 skorolev Added updateZones method.
|
||||
* Dec 18, 2014 3841 skorolev Corrected updateZones method.
|
||||
* Jan 27, 2015 3220 skorolev Replaced MonitoringArea with areaConfig.Changed updateZones method.
|
||||
* Oct.31 2012 1297 skorolev Cleaned code.
|
||||
* Sep 04 2014 3220 skorolev Added updateZones method.
|
||||
* Mar 17 2015 3888 dhladky check for nulls
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -74,9 +73,6 @@ public class ObHourReports {
|
|||
*/
|
||||
private Map<String, ObZoneHourReports> hourReports;
|
||||
|
||||
/**
|
||||
* current threshold manager
|
||||
*/
|
||||
private AbstractThresholdMgr thresholdMgr;
|
||||
|
||||
/**
|
||||
|
@ -90,8 +86,9 @@ public class ObHourReports {
|
|||
this.appName = appName;
|
||||
this.thresholdMgr = thresholdMgr;
|
||||
hourReports = new HashMap<String, ObZoneHourReports>();
|
||||
List<String> zones = thresholdMgr.getAreaConfigMgr().getAreaList();
|
||||
for (String zone : zones) {
|
||||
Map<String, List<String>> zoneStationMap = MonitoringArea
|
||||
.getPlatformMap();
|
||||
for (String zone : zoneStationMap.keySet()) {
|
||||
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
|
||||
appName, thresholdMgr));
|
||||
}
|
||||
|
@ -104,25 +101,28 @@ public class ObHourReports {
|
|||
*/
|
||||
public void addReport(ObReport report) {
|
||||
String station = report.getPlatformId();
|
||||
List<String> zones = thresholdMgr.getAreaConfigMgr()
|
||||
.getAreaByStationId(station);
|
||||
List<String> zones = MonitoringArea.getZoneIds(station);
|
||||
if (zones.size() == 0) {
|
||||
statusHandler
|
||||
.info("Error: station: "
|
||||
.error("Error: station: "
|
||||
+ station
|
||||
+ " is not associated with any zone in the monitoring area");
|
||||
return;
|
||||
}
|
||||
boolean hasZone = false;
|
||||
for (String zone : zones) {
|
||||
if (hourReports.containsKey(zone)) {
|
||||
hasZone = true;
|
||||
hourReports.get(zone).addReport(report);
|
||||
}
|
||||
}
|
||||
if (hasZone == false) {
|
||||
statusHandler
|
||||
.error("Error in addreport() of ObHourReports: unable to add obs report to data archive");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets HourReports
|
||||
*
|
||||
* @return hourReports
|
||||
*/
|
||||
public Map<String, ObZoneHourReports> getHourReports() {
|
||||
|
@ -186,8 +186,8 @@ public class ObHourReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets ObZoneHourReports Returns the ObZoneHourReports object of a
|
||||
* caller-specified zone. If such object not available, returns null.
|
||||
* Returns the ObZoneHourReports object of a caller-specified zone. If such
|
||||
* object not available, returns null.
|
||||
*
|
||||
* @param zone
|
||||
* @return hour reports
|
||||
|
@ -200,8 +200,6 @@ public class ObHourReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets NominalTime
|
||||
*
|
||||
* @return nominalTime
|
||||
*/
|
||||
public Date getNominalTime() {
|
||||
|
@ -209,8 +207,6 @@ public class ObHourReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets AppName
|
||||
*
|
||||
* @return appName
|
||||
*/
|
||||
public CommonConfig.AppName getAppName() {
|
||||
|
@ -219,43 +215,51 @@ public class ObHourReports {
|
|||
|
||||
/**
|
||||
* Updates zones in the Hour Reports
|
||||
*
|
||||
* @param configMgr
|
||||
*/
|
||||
public void updateZones(FSSObsMonitorConfigurationManager configMgr) {
|
||||
// Updated list of zones
|
||||
List<String> updtZones = configMgr.getAreaList();
|
||||
// remove zones
|
||||
hourReports.keySet().retainAll(updtZones);
|
||||
public void updateZones() {
|
||||
Map<String, List<String>> zoneStationMap = MonitoringArea
|
||||
.getPlatformMap();
|
||||
// remove zones or stations
|
||||
List<String> hourZones = new CopyOnWriteArrayList<String>(
|
||||
hourReports.keySet());
|
||||
for (String zone : hourZones) {
|
||||
if (hourReports.keySet().contains(zone)) {
|
||||
List<String> stations = new CopyOnWriteArrayList<String>(
|
||||
hourReports.get(zone).getZoneHourReports().keySet());
|
||||
for (String stn : stations) {
|
||||
if (zoneStationMap.get(zone) != null) {
|
||||
if (!zoneStationMap.get(zone).contains(stn)) {
|
||||
hourReports.get(zone).getZoneHourReports()
|
||||
.remove(stn);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!zoneStationMap.keySet().contains(zone)) {
|
||||
hourReports.remove(zone);
|
||||
}
|
||||
}
|
||||
}
|
||||
// add zones
|
||||
for (String zone : updtZones) {
|
||||
if (!hourReports.keySet().contains(zone)) {
|
||||
for (String zone : zoneStationMap.keySet()) {
|
||||
List<String> stations = new CopyOnWriteArrayList<String>(
|
||||
zoneStationMap.get(zone));
|
||||
for (String stn : stations) {
|
||||
if (hourReports.get(zone) != null) {
|
||||
if (!hourReports.get(zone).getZoneHourReports()
|
||||
.containsKey(stn)) {
|
||||
hourReports
|
||||
.get(zone)
|
||||
.getZoneHourReports()
|
||||
.put(stn,
|
||||
new ObStnHourReports(nominalTime, zone,
|
||||
stn, appName, thresholdMgr));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hourReports.containsKey(zone)) {
|
||||
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
|
||||
appName, thresholdMgr));
|
||||
}
|
||||
}
|
||||
// add and(or) remove stations
|
||||
for (String zone : updtZones) {
|
||||
// Updated list of stations in this zone
|
||||
List<String> updtStns = thresholdMgr.getAreaConfigMgr()
|
||||
.getAreaStations(zone);
|
||||
// remove stations
|
||||
hourReports.get(zone).getZoneHourReports().keySet()
|
||||
.retainAll(updtStns);
|
||||
// add stations
|
||||
for (String stn : updtStns) {
|
||||
if (!hourReports.get(zone).getZoneHourReports()
|
||||
.containsKey(stn)) {
|
||||
hourReports
|
||||
.get(zone)
|
||||
.getZoneHourReports()
|
||||
.put(stn,
|
||||
new ObStnHourReports(nominalTime, zone,
|
||||
stn, appName, thresholdMgr));
|
||||
}
|
||||
}
|
||||
// update hourReports for current zone
|
||||
hourReports.get(zone).getZoneHourReports();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,14 +24,11 @@ import java.util.Calendar;
|
|||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst;
|
||||
|
@ -54,11 +51,9 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
|||
* Dec 24, 2009 3424 zhao added getTrendDataSet() that returns ObTrendDataSet object
|
||||
* Jan 25, 2010 4281, 3888, 3877 wkwock/zhao added getHistTableData method
|
||||
* Oct.31, 2012 1297 skorolev Clean code.
|
||||
* Jan.29, 2013 15654 zhao add Wind Chill calculation for SNOW
|
||||
* Jan 27, 2015 3220 skorolev Updated getStationTableData method.Replaced MonitoringArea with cfgMgr.
|
||||
* Added multiHrsTabData - Table data cache.
|
||||
* Feb 04, 2015 3841 skorolev Corrected getEmptyZoneTableData method.
|
||||
*
|
||||
* Jan. 29, 2013 15654 zhao add Wind Chill calculation for SNOW
|
||||
* Sep 04, 2014 3220 skorolev Updated getStationTableData method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author zhao
|
||||
|
@ -83,14 +78,9 @@ public class ObMultiHrsReports {
|
|||
private CommonConfig.AppName appName;
|
||||
|
||||
/**
|
||||
* FSSObs records cache. Key is nominal time, value is ObHourReports object
|
||||
* key is nominal time, value is ObHourReports object
|
||||
*/
|
||||
private SortedMap<Date, ObHourReports> multiHrsReports = new TreeMap<Date, ObHourReports>();
|
||||
|
||||
/**
|
||||
* Monitor Table data cache. Key is nominal time, value is TableData
|
||||
*/
|
||||
private ConcurrentHashMap<Date, TableData> multiHrsTabData = new ConcurrentHashMap<Date, TableData>();
|
||||
private SortedMap<Date, ObHourReports> multiHrsReports;
|
||||
|
||||
/**
|
||||
* The maximum number of most recent hours within which observation reports
|
||||
|
@ -107,10 +97,29 @@ public class ObMultiHrsReports {
|
|||
*/
|
||||
public ObMultiHrsReports(CommonConfig.AppName appName) {
|
||||
this.appName = appName;
|
||||
multiHrsReports = new TreeMap<Date, ObHourReports>();
|
||||
if (appName.equals(AppName.FOG) || appName.equals(AppName.SAFESEAS)) {
|
||||
initFogAlgCellType();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an array of ObReport objects to the ObMultiHrsReports object (Don't
|
||||
* use! VK)
|
||||
*
|
||||
* @param result
|
||||
*/
|
||||
public void addReports(ObReport[] results) {
|
||||
for (ObReport report : results) {
|
||||
/**
|
||||
* DR #8723: if wind speed is zero, wind direction should be N/A,
|
||||
* not 0
|
||||
*/
|
||||
if (report.getWindSpeed() < 0.0001) { // zero wind speed
|
||||
report.setWindDir(ObConst.MISSING);
|
||||
}
|
||||
addReport(report);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -120,6 +129,8 @@ public class ObMultiHrsReports {
|
|||
* @return returns multiHrsReports
|
||||
*/
|
||||
public void addReport(ObReport report) {
|
||||
// Date nominalTime = TableUtil
|
||||
// .getNominalTime(report.getObservationTime());
|
||||
Date nominalTime = report.getRefHour();
|
||||
/**
|
||||
* DR #8723: if wind speed is zero, wind direction should be N/A, not 0
|
||||
|
@ -140,54 +151,50 @@ public class ObMultiHrsReports {
|
|||
/**
|
||||
* DR15654: set Wind Chill for SNOW
|
||||
*/
|
||||
if (appName == AppName.SNOW) {
|
||||
if (report.getTemperature() != ObConst.MISSING
|
||||
&& report.getWindSpeed() != ObConst.MISSING) {
|
||||
report.setWindChill(calcWindChill(report.getTemperature(),
|
||||
report.getWindSpeed()));
|
||||
if ( appName == AppName.SNOW ) {
|
||||
if ( report.getTemperature() != ObConst.MISSING && report.getWindSpeed() != ObConst.MISSING ) {
|
||||
report.setWindChill(calcWindChill( report.getTemperature(), report.getWindSpeed() ));
|
||||
}
|
||||
|
||||
}
|
||||
ObHourReports obHourReports;
|
||||
// new nominal time; create a new ObHourReports object
|
||||
if (multiHrsReports.isEmpty()
|
||||
|| !multiHrsReports.containsKey(nominalTime)) {
|
||||
obHourReports = new ObHourReports(nominalTime, appName,
|
||||
thresholdMgr);
|
||||
|
||||
if (multiHrsReports.containsKey(nominalTime)) {
|
||||
multiHrsReports.get(nominalTime).addReport(report);
|
||||
} else {
|
||||
// the map is full; delete the oldest entry
|
||||
// new nominal time; create a new ObHourReports object
|
||||
if (multiHrsReports.size() >= maxFrames) {
|
||||
// the map is full; delete the oldest entry
|
||||
multiHrsReports.remove(multiHrsReports.firstKey());
|
||||
}
|
||||
// update multiHrsReports with new data
|
||||
obHourReports = multiHrsReports.get(nominalTime);
|
||||
ObHourReports obHourReports = new ObHourReports(nominalTime,
|
||||
appName, thresholdMgr);
|
||||
obHourReports.addReport(report);
|
||||
multiHrsReports.put(nominalTime, obHourReports);
|
||||
}
|
||||
obHourReports.addReport(report);
|
||||
// update data cache
|
||||
multiHrsReports.put(nominalTime, obHourReports);
|
||||
}
|
||||
|
||||
/**
|
||||
* DR 15654: Wind Chill calculation formula based on
|
||||
* http://www.nws.noaa.gov/om/windchill/ as of Jan. 29, 2013
|
||||
*
|
||||
* @param temp
|
||||
* in degree F
|
||||
* @param windSpd
|
||||
* in knots
|
||||
* @return wind chill in degree F
|
||||
*/
|
||||
private float calcWindChill(float temp, float windSpd) {
|
||||
if (temp > 50.0 || windSpd < 3.0) {
|
||||
return ObConst.MISSING;
|
||||
}
|
||||
/**
|
||||
* 1 knots = 1.15078 mph
|
||||
*/
|
||||
float spd = (float) Math.pow(1.15078 * windSpd, 0.16);
|
||||
return 35.74f + 0.6215f * temp - 35.75f * spd + 0.4275f * temp * spd;
|
||||
}
|
||||
/**
|
||||
* DR 15654:
|
||||
* Wind Chill calculation formula based on
|
||||
* http://www.nws.noaa.gov/om/windchill/
|
||||
* as of Jan. 29, 2013
|
||||
*
|
||||
* @param temperature in degree F
|
||||
* @param windSpeed in knots
|
||||
* @return wind chill in degree F
|
||||
*/
|
||||
private float calcWindChill(float temp, float windSpd) {
|
||||
if ( temp > 50.0 || windSpd < 3.0 ) {
|
||||
return ObConst.MISSING;
|
||||
}
|
||||
/**
|
||||
* 1 knots = 1.15078 mph
|
||||
*/
|
||||
float spd = (float) Math.pow(1.15078*windSpd, 0.16);
|
||||
return 35.74f + 0.6215f*temp - 35.75f*spd + 0.4275f*temp*spd;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns a zone TableData object of the latest nominal time. If no data
|
||||
* available (the map is empty), returns an empty zone TableData object
|
||||
* (table cells filled with "N/A").
|
||||
|
@ -204,31 +211,26 @@ public class ObMultiHrsReports {
|
|||
/**
|
||||
* Returns a zone TableData object for a caller-specified nominal-time. If
|
||||
* no data available, returns an empty/default zone TableData object (table
|
||||
* cells filled with "N/A"). Updates multiHrsTabData table cache.
|
||||
* cells filled with "N/A").
|
||||
*
|
||||
* @param nominalTime
|
||||
* @return
|
||||
*/
|
||||
public TableData getZoneTableData(Date nominalTime) {
|
||||
TableData tabData = null;
|
||||
if (nominalTime == null || !multiHrsReports.containsKey(nominalTime)) {
|
||||
return getEmptyZoneTableData();
|
||||
}
|
||||
if (appName == AppName.FOG) {
|
||||
tabData = this.getObHourReports(nominalTime).getFogZoneTableData(
|
||||
return this.getObHourReports(nominalTime).getFogZoneTableData(
|
||||
fogAlgCellType);
|
||||
} else if (appName == AppName.SAFESEAS) {
|
||||
tabData = this.getObHourReports(nominalTime).getSSZoneTableData(
|
||||
}
|
||||
if (appName == AppName.SAFESEAS) {
|
||||
return this.getObHourReports(nominalTime).getSSZoneTableData(
|
||||
fogAlgCellType);
|
||||
}
|
||||
|
||||
} else {
|
||||
tabData = this.getObHourReports(nominalTime).getZoneTableData();
|
||||
}
|
||||
// update table data cache
|
||||
if (multiHrsTabData.replace(nominalTime, tabData) == null) {
|
||||
multiHrsTabData.put(nominalTime, tabData);
|
||||
}
|
||||
return tabData;
|
||||
return this.getObHourReports(nominalTime).getZoneTableData();
|
||||
// return multiHrsReports.get(nominalTime).getZoneTableData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -241,27 +243,15 @@ public class ObMultiHrsReports {
|
|||
.getSystemTime().getTime());
|
||||
ObHourReports hourReports = new ObHourReports(nominalTime, appName,
|
||||
thresholdMgr);
|
||||
TableData tabData = null;
|
||||
if (appName == AppName.FOG) {
|
||||
tabData = hourReports.getFogZoneTableData(fogAlgCellType);
|
||||
} else {
|
||||
tabData = hourReports.getZoneTableData();
|
||||
return hourReports.getFogZoneTableData(fogAlgCellType);
|
||||
}
|
||||
// update data cache
|
||||
multiHrsReports.put(nominalTime, hourReports);
|
||||
// update cache with empty table data
|
||||
if (multiHrsTabData.replace(nominalTime, tabData) == null) {
|
||||
multiHrsTabData.put(nominalTime, tabData);
|
||||
}
|
||||
return tabData;
|
||||
return hourReports.getZoneTableData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the station TableData object for the latest nominal time. If no
|
||||
* data available, an empty/default station TableData object is returned
|
||||
*
|
||||
* @param zone
|
||||
* @return
|
||||
*/
|
||||
public TableData getStationTableData(String zone) {
|
||||
if (multiHrsReports.isEmpty()) {
|
||||
|
@ -274,13 +264,9 @@ public class ObMultiHrsReports {
|
|||
* Returns a station TableData object for a caller-specified nominal-time
|
||||
* and zone ID. If no data available, an empty/default station TableData
|
||||
* object is returned.
|
||||
*
|
||||
* @param nominalTime
|
||||
* @param zone
|
||||
* @return
|
||||
*/
|
||||
public TableData getStationTableData(Date nominalTime, String zone) {
|
||||
if (zone.equals("")) {
|
||||
if(zone.equals("")){
|
||||
return this.getEmptyZoneTableData();
|
||||
}
|
||||
if (nominalTime == null) {
|
||||
|
@ -310,7 +296,6 @@ public class ObMultiHrsReports {
|
|||
* @param zone
|
||||
* @param Station
|
||||
* @param varName
|
||||
* @param productName
|
||||
* @return ObTrendDataSet object, or null if no data available
|
||||
*/
|
||||
public ObTrendDataSet getTrendDataSet(String zone, String station,
|
||||
|
@ -388,15 +373,12 @@ public class ObMultiHrsReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets Histogram Table Data
|
||||
*
|
||||
* @param zone
|
||||
* : current zone
|
||||
* @param station
|
||||
* : station ID
|
||||
* station ID
|
||||
* @param obsType
|
||||
* : ObsHistType
|
||||
* @return
|
||||
* ObsHistType
|
||||
* @return TableData object for obs history table
|
||||
*/
|
||||
public TableData getHistTableData(String zone, String station,
|
||||
ObsHistType obsType) {
|
||||
|
@ -485,46 +467,41 @@ public class ObMultiHrsReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets table cache
|
||||
* Returns a SortedMap object <nominal time, ObHourReports object>
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ConcurrentHashMap<Date, TableData> getMultiHrsTabData() {
|
||||
return multiHrsTabData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets table cache
|
||||
*
|
||||
* @param multiHrsTabData
|
||||
*/
|
||||
public void setMultiHrsTabData(
|
||||
ConcurrentHashMap<Date, TableData> multiHrsTabData) {
|
||||
this.multiHrsTabData = multiHrsTabData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets data cache
|
||||
*
|
||||
* @return SortedMap object <nominal time, ObHourReports object>
|
||||
* @return multiHrsReports
|
||||
*/
|
||||
public SortedMap<Date, ObHourReports> getMultiHrsReports() {
|
||||
return multiHrsReports;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets data cache
|
||||
* Returns a SortedMap object (key is nominal time, value is zone TableData
|
||||
* object)
|
||||
*
|
||||
* @param multiHrsReports
|
||||
* @return
|
||||
*/
|
||||
public void setMultiHrsReports(
|
||||
SortedMap<Date, ObHourReports> multiHrsReports) {
|
||||
this.multiHrsReports = multiHrsReports;
|
||||
public SortedMap<Date, TableData> getMultiHrsTableData() {
|
||||
SortedMap<Date, TableData> multiHrsTblData = new TreeMap<Date, TableData>();
|
||||
if (appName == AppName.FOG) {
|
||||
for (Date nominalTime : multiHrsReports.keySet()) {
|
||||
multiHrsTblData.put(
|
||||
nominalTime,
|
||||
multiHrsReports.get(nominalTime).getFogZoneTableData(
|
||||
fogAlgCellType));
|
||||
}
|
||||
return multiHrsTblData;
|
||||
}
|
||||
for (Date nominalTime : multiHrsReports.keySet()) {
|
||||
multiHrsTblData.put(nominalTime, multiHrsReports.get(nominalTime)
|
||||
.getZoneTableData());
|
||||
}
|
||||
return multiHrsTblData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Latest NominalTime Returns the latest nominal time if the map is
|
||||
* not empty; otherwise, returns the nominal time of the present date-time
|
||||
* Returns the latest nominal time if the map is not empty; otherwise,
|
||||
* returns the nominal time of the present date-time
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
@ -540,38 +517,31 @@ public class ObMultiHrsReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets Nominal Times
|
||||
* Returns a set of nominal times
|
||||
*
|
||||
* @return a set of nominal times
|
||||
* @return
|
||||
*/
|
||||
public Set<Date> getNominalTimes() {
|
||||
return multiHrsReports.keySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets ObHourReports Returns the ObHourReports object of the latest nominal
|
||||
* time. If no data available, returns an empty ObHourReports object.
|
||||
* Returns the ObHourReports object of the latest nominal time. If no data
|
||||
* available, returns an empty ObHourReports object.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ObHourReports getObHourReports() {
|
||||
if (multiHrsReports.isEmpty()) {
|
||||
ObHourReports obHrsReps = new ObHourReports(
|
||||
TableUtil.getNominalTime(SimulatedTime.getSystemTime()
|
||||
.getTime()), appName, thresholdMgr);
|
||||
Date refTm = obHrsReps.getNominalTime();
|
||||
TableData tabData = obHrsReps.getZoneTableData();
|
||||
multiHrsTabData.clear();
|
||||
multiHrsTabData.put(refTm, tabData);
|
||||
return obHrsReps;
|
||||
return new ObHourReports(TableUtil.getNominalTime(SimulatedTime
|
||||
.getSystemTime().getTime()), appName, thresholdMgr);
|
||||
}
|
||||
return multiHrsReports.get(multiHrsReports.lastKey());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets ObHourReports Returns an ObHourReports object of a caller-specified
|
||||
* nominal time. If no data available, returns an empty ObHourReports
|
||||
* object.
|
||||
* Returns an ObHourReports object of a caller-specified nominal time. If no
|
||||
* data available, returns an empty ObHourReports object.
|
||||
*
|
||||
* @param nominalTime
|
||||
* @return
|
||||
|
@ -604,7 +574,6 @@ public class ObMultiHrsReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets Threshold Manager
|
||||
*
|
||||
* @return the threshold manager
|
||||
*/
|
||||
|
@ -622,7 +591,6 @@ public class ObMultiHrsReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets map of types for ALG cell
|
||||
*
|
||||
* @return fogAlgCellType
|
||||
*/
|
||||
|
@ -635,26 +603,11 @@ public class ObMultiHrsReports {
|
|||
*/
|
||||
private void initFogAlgCellType() {
|
||||
fogAlgCellType = new HashMap<String, CellType>();
|
||||
FSSObsMonitorConfigurationManager cfgMgr = null;
|
||||
if (appName.equals(CommonConfig.AppName.FOG)) {
|
||||
cfgMgr = FSSObsMonitorConfigurationManager.getFogObsManager();
|
||||
} else if (appName.equals(CommonConfig.AppName.SAFESEAS)) {
|
||||
cfgMgr = FSSObsMonitorConfigurationManager.getSsObsManager();
|
||||
}
|
||||
List<String> zones = cfgMgr.getAreaList();
|
||||
Set<String> zones = MonitoringArea.getPlatformMap().keySet();
|
||||
Iterator<String> itr = zones.iterator();
|
||||
while (itr.hasNext()) {
|
||||
fogAlgCellType.put(itr.next(), CellType.NotAvailable);
|
||||
}
|
||||
setFogAlgCellType(fogAlgCellType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates table cache
|
||||
*/
|
||||
public void updateTableCache() {
|
||||
for (Date time : multiHrsReports.keySet()) {
|
||||
getZoneTableData(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
1022
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObZoneHourReports.java
Executable file → Normal file
1022
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObZoneHourReports.java
Executable file → Normal file
File diff suppressed because it is too large
Load diff
|
@ -25,12 +25,10 @@ import java.util.Date;
|
|||
import com.raytheon.uf.common.geospatial.ISpatialQuery;
|
||||
import com.raytheon.uf.common.geospatial.SpatialQueryFactory;
|
||||
import com.raytheon.uf.common.monitor.MonitorAreaUtils;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.CellType;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.ObsHistType;
|
||||
|
@ -52,8 +50,6 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
|
|||
* May 23, 2012 14410 zhao Modified getCellTypeForBlizWarn and getCellTypeForHsnowWarn modules
|
||||
* Feb 28, 2013 14410 zhao Modified getCellTypeForBlizWarn
|
||||
* May 23, 2014 3086 skorolev Corrected ObsHistType. Cleaned code.
|
||||
* Nov 21, 2014 3841 skorolev Added coordinates in the hover text for a newly added zones.
|
||||
* Jan 08, 2015 3220 skorolev Corrected code for Fog and SNOW table data.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -114,13 +110,9 @@ public final class TableUtil {
|
|||
isZone = true;
|
||||
}
|
||||
|
||||
String hoverText = "";
|
||||
String hoverText = null;
|
||||
if (isZone) {
|
||||
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
|
||||
.getFogObsManager().getAreaXml(zone);
|
||||
if (zoneXML != null) {
|
||||
hoverText = getZoneHoverText(zoneXML);
|
||||
}
|
||||
hoverText = getZoneHoverText(areaId);
|
||||
} else {
|
||||
hoverText = getStationHoverText(areaId);
|
||||
}
|
||||
|
@ -328,8 +320,7 @@ public final class TableUtil {
|
|||
* dialog)
|
||||
* @param zone
|
||||
* @param report
|
||||
* @param tm
|
||||
* Abstract Threshold Manager
|
||||
* @param tm Abstract Threshold Manager
|
||||
* @param fogCellType
|
||||
* @return
|
||||
*/
|
||||
|
@ -345,13 +336,9 @@ public final class TableUtil {
|
|||
isZone = true;
|
||||
}
|
||||
|
||||
String hoverText = "";
|
||||
String hoverText = null;
|
||||
if (isZone) {
|
||||
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
|
||||
.getSsObsManager().getAreaXml(zone);
|
||||
if (zoneXML != null) {
|
||||
hoverText = getZoneHoverText(zoneXML);
|
||||
}
|
||||
hoverText = getZoneHoverText(areaId);
|
||||
} else {
|
||||
hoverText = getStationHoverText(areaId);
|
||||
}
|
||||
|
@ -650,13 +637,9 @@ public final class TableUtil {
|
|||
isZone = true;
|
||||
}
|
||||
|
||||
String hoverText = "";
|
||||
String hoverText = null;
|
||||
if (isZone) {
|
||||
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
|
||||
.getSnowObsManager().getAreaXml(zone);
|
||||
if (zoneXML != null) {
|
||||
hoverText = getZoneHoverText(zoneXML);
|
||||
}
|
||||
hoverText = getZoneHoverText(areaId);
|
||||
} else {
|
||||
hoverText = getStationHoverText(areaId);
|
||||
}
|
||||
|
@ -901,9 +884,8 @@ public final class TableUtil {
|
|||
* @param zone
|
||||
* @return
|
||||
*/
|
||||
private static String getZoneHoverText(AreaIdXML zoneXML) {
|
||||
private static String getZoneHoverText(String zone) {
|
||||
|
||||
String zone = zoneXML.getAreaId();
|
||||
ISpatialQuery sq = null;
|
||||
String sql = null;
|
||||
String hoverText = zone.substring(0, 2) + ", ";
|
||||
|
@ -932,11 +914,6 @@ public final class TableUtil {
|
|||
} else {
|
||||
hoverText += (String) results[0].toString();
|
||||
}
|
||||
} else {
|
||||
if (zoneXML.getCLat() != null) {
|
||||
hoverText += "(" + zoneXML.getCLat() + ", "
|
||||
+ zoneXML.getCLon() + ")";
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
47
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/thresholds/AbstractThresholdMgr.java
Executable file → Normal file
47
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/thresholds/AbstractThresholdMgr.java
Executable file → Normal file
|
@ -33,9 +33,6 @@ import com.raytheon.uf.common.localization.PathManagerFactory;
|
|||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.CellType;
|
||||
import com.raytheon.uf.viz.monitor.filename.DefaultFilenameMgr;
|
||||
|
@ -56,8 +53,6 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
|||
* Mar 22, 2010 #4282 zhao obtain zone IDs from monitoring-area-config-manager
|
||||
* Feb 16, 2011 #7346 zhao added getDirectionalThresholdValueCellType(...)
|
||||
* Apr 28, 2014 3086 skorolev Updated getAreaConfigMgr method.
|
||||
* Oct 17, 2014 3220 skorolev Replaced System.out.print with debug statusHandler.
|
||||
* Jan 08, 2015 3220 skorolev Added getAreaConfigMgr.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -66,13 +61,10 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
|||
*/
|
||||
public abstract class AbstractThresholdMgr {
|
||||
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(AbstractThresholdMgr.class);
|
||||
|
||||
/**
|
||||
* Monitor Area Configuration Manager.
|
||||
*/
|
||||
public FSSObsMonitorConfigurationManager areaConfigMgr;
|
||||
protected FSSObsMonitorConfigurationManager areaConfigMgr;
|
||||
|
||||
/**
|
||||
* Default file name for the FOG display thresholds.
|
||||
|
@ -142,6 +134,7 @@ public abstract class AbstractThresholdMgr {
|
|||
this.defMonitorThreshName = defMonitorThreshName;
|
||||
this.appName = appName;
|
||||
this.site = LocalizationManager.getInstance().getCurrentSite();
|
||||
this.areaConfigMgr = getMonitorAreaConfigInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -208,7 +201,7 @@ public abstract class AbstractThresholdMgr {
|
|||
LocalizationFile locFile = pm.getLocalizationFile(context,
|
||||
pathAndFileName);
|
||||
|
||||
statusHandler.handle(Priority.DEBUG, "--- validate path = "
|
||||
System.out.println("--- validate path = "
|
||||
+ locFile.getFile().getAbsolutePath());
|
||||
|
||||
return locFile.getFile().exists();
|
||||
|
@ -533,8 +526,7 @@ public abstract class AbstractThresholdMgr {
|
|||
|
||||
ArrayList<String> threshKeys = getThresholdKeys(DataUsageKey.DISPLAY);
|
||||
|
||||
statusHandler.handle(Priority.DEBUG, "---- "
|
||||
+ currFullDisplayXmlFileName);
|
||||
System.out.println("---- " + currFullDisplayXmlFileName);
|
||||
|
||||
displayThreshMgr.createConfigFromDefaults(
|
||||
currFullDisplayXmlFileName, areaIDs, threshKeys);
|
||||
|
@ -772,17 +764,14 @@ public abstract class AbstractThresholdMgr {
|
|||
ArrayList<AreaXML> areasArray = displayXML.getAreas();
|
||||
|
||||
for (AreaXML area : areasArray) {
|
||||
statusHandler.handle(Priority.DEBUG, "--- " + area.getAreaId());
|
||||
System.out.println("--- " + area.getAreaId());
|
||||
|
||||
ArrayList<AreaThresholdXML> atXmlArray = area.getAreaThresholds();
|
||||
|
||||
for (AreaThresholdXML atXml : atXmlArray) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"****** " + atXml.getKey());
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
" R " + atXml.getRed());
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
" Y " + atXml.getYellow());
|
||||
System.out.println("****** " + atXml.getKey());
|
||||
System.out.println(" R " + atXml.getRed());
|
||||
System.out.println(" Y " + atXml.getYellow());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -795,27 +784,23 @@ public abstract class AbstractThresholdMgr {
|
|||
ArrayList<AreaXML> areasArray = threshXmlCopy.getAreas();
|
||||
|
||||
for (AreaXML area : areasArray) {
|
||||
statusHandler.handle(Priority.DEBUG, "--- " + area.getAreaId());
|
||||
System.out.println("--- " + area.getAreaId());
|
||||
|
||||
ArrayList<AreaThresholdXML> atXmlArray = area.getAreaThresholds();
|
||||
|
||||
for (AreaThresholdXML atXml : atXmlArray) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"****** " + atXml.getKey());
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
" R " + atXml.getRed());
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
" Y " + atXml.getYellow());
|
||||
System.out.println("****** " + atXml.getKey());
|
||||
System.out.println(" R " + atXml.getRed());
|
||||
System.out.println(" Y " + atXml.getYellow());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets current Area configuration manager.
|
||||
* Gets Monitor Area Configuration manager.
|
||||
*
|
||||
* @return
|
||||
* @return manager
|
||||
*/
|
||||
public FSSObsMonitorConfigurationManager getAreaConfigMgr() {
|
||||
return areaConfigMgr;
|
||||
}
|
||||
protected abstract FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance();
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 15, 2009 #3963 lvenable Initial creation
|
||||
* Dec 4, 2012 #1351 skorolev Cleaned code
|
||||
* Oct 16, 2014 #3220 skorolev Added error message when Default threshold configuration file is corrupted or empty.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -146,11 +145,7 @@ public class ThresholdMgr {
|
|||
ThresholdsXML.class);
|
||||
createXmlFromDefaults(cfgXmlDefaults, areaIDs, keys);
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.ERROR,
|
||||
"Default threshold configuration file "
|
||||
+ fullDefaultPathName
|
||||
+ " is corrupted.\nDelete the files in the folder on the server side and restart CAVE.");
|
||||
statusHandler.handle(Priority.ERROR, e.getMessage());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -56,7 +56,6 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Nov 20, 2012 1297 skorolev Changes for non-blocking dialog.
|
||||
* Apr 23, 2014 3054 skorolev Added MESONET handling.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Nov 21, 2014 3841 skorolev Corrected handleAddNewStation method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -262,8 +261,8 @@ public class AddNewStationDlg extends CaveSWTDialog {
|
|||
return;
|
||||
}
|
||||
macDlg.addNewStationAction(stn);
|
||||
macDlg.configMgr.addStation(area, stn, type, false);
|
||||
macDlg.configMgr.getStations().add(stn);
|
||||
macDlg.getInstance().addStation(area, stn, type, false);
|
||||
macDlg.getInstance().getStations().add(stn);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.eclipse.swt.widgets.Button;
|
|||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Layout;
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
|
@ -48,7 +49,6 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Nov 20, 2012 1297 skorolev Changes for non-blocking dialog.
|
||||
* Apr 23, 2014 3054 skorolev Deleted unnecessary parameter in addArea method.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Nov 21, 2014 3841 skorolev Corrected handleAddNewAction method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -234,12 +234,9 @@ public class AddNewZoneDlg extends CaveSWTDialog {
|
|||
addBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
String areaId = idTF.getText();
|
||||
String latString = centroidLatTF.getText();
|
||||
String lonString = centroidLonTF.getText();
|
||||
if (macDlg.formIsValid(areaId, latString, lonString)) {
|
||||
handleAddNewAction(areaId, latString, lonString);
|
||||
}
|
||||
handleAddNewAction(latString, lonString);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -259,32 +256,61 @@ public class AddNewZoneDlg extends CaveSWTDialog {
|
|||
/**
|
||||
* Adds a new zone.
|
||||
*
|
||||
* @param areaId
|
||||
* @param latString
|
||||
* @param lonString
|
||||
* @throws NumberFormatException
|
||||
*/
|
||||
private void handleAddNewAction(String areaId, String latString,
|
||||
String lonString) throws NumberFormatException {
|
||||
private void handleAddNewAction(String latString, String lonString) {
|
||||
String areaId = idTF.getText();
|
||||
if (areaId.equals("") || areaId.length() != 6
|
||||
|| (areaId.charAt(2) != 'C' && areaId.charAt(2) != 'Z')) {
|
||||
displayInputErrorMsg("Invalid Area ID = '" + areaId
|
||||
+ "' entered. Please enter a correctly formatted Area ID.");
|
||||
return;
|
||||
}
|
||||
if (macDlg.isExistingZone(areaId)) {
|
||||
macDlg.displayInputErrorMsg("The Area ID, "
|
||||
displayInputErrorMsg("The Area ID, "
|
||||
+ areaId
|
||||
+ ", is already in your Monitoring Area or among your Additional Zones.");
|
||||
return;
|
||||
}
|
||||
double lat = Double.parseDouble(latString.trim());
|
||||
double lon = Double.parseDouble(lonString.trim());
|
||||
ZoneType type = ZoneType.REGULAR;
|
||||
if (appName != AppName.SNOW) {
|
||||
if (marineZoneRdo.getSelection() || idTF.getText().charAt(2) == 'Z') {
|
||||
type = ZoneType.MARITIME;
|
||||
}
|
||||
}
|
||||
if (lat > 90.0 || lat < -90.0 || lon > 180.0 || lon < -180.0) {
|
||||
if (latString == null || latString.isEmpty() || lonString == null
|
||||
|| lonString.isEmpty()) {
|
||||
macDlg.latLonErrorMsg(latString, lonString);
|
||||
return;
|
||||
} else {
|
||||
try {
|
||||
double lat = Double.parseDouble(latString.trim());
|
||||
double lon = Double.parseDouble(lonString.trim());
|
||||
ZoneType type = ZoneType.REGULAR;
|
||||
if (appName != AppName.SNOW) {
|
||||
if (marineZoneRdo.getSelection()) {
|
||||
type = ZoneType.MARITIME;
|
||||
}
|
||||
}
|
||||
if (lat > 90.0 || lat < -90.0 || lon > 180.0 || lon < -180.0) {
|
||||
macDlg.latLonErrorMsg(latString, lonString);
|
||||
return;
|
||||
}
|
||||
macDlg.configMgr.addArea(areaId, lat, lon, type);
|
||||
macDlg.addNewZoneAction(areaId, centroidLatTF.getText(),
|
||||
centroidLonTF.getText());
|
||||
} catch (NumberFormatException e) {
|
||||
macDlg.latLonErrorMsg(latString, lonString);
|
||||
return;
|
||||
}
|
||||
}
|
||||
macDlg.configMgr.addArea(areaId, lat, lon, type);
|
||||
macDlg.addZoneToMA(areaId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays Input Error Message
|
||||
*
|
||||
* @param msg
|
||||
*/
|
||||
private void displayInputErrorMsg(String msg) {
|
||||
MessageBox messageBox = new MessageBox(shell, SWT.ICON_INFORMATION
|
||||
| SWT.OK);
|
||||
messageBox.setText("Invalid input");
|
||||
messageBox.setMessage(msg);
|
||||
messageBox.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Nov 20, 2012 1297 skorolev Changes for non-blocking dialog.
|
||||
* Apr 23, 2014 3054 skorolev Fixed issue with deleting a new station.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Nov 21, 2014 3841 skorolev Corrected deleteSelected method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -190,8 +189,8 @@ public class DeleteStationDlg extends CaveSWTDialog {
|
|||
if (stationList.getSelectionIndex() != -1) {
|
||||
int idx = stationList.getSelectionIndex();
|
||||
String selection = stationList.getItem(idx);
|
||||
retval = macDlg.configMgr.getAddedStations().get(idx);
|
||||
macDlg.configMgr.getAddedStations().remove(idx);
|
||||
retval = configMgr.getAddedStations().get(idx);
|
||||
configMgr.getAddedStations().remove(idx);
|
||||
stationList.remove(selection);
|
||||
populate();
|
||||
} else {
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.monitor.ui.dialogs;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
|
@ -39,7 +37,6 @@ import org.eclipse.swt.widgets.Text;
|
|||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML.ZoneType;
|
||||
import com.raytheon.uf.common.monitor.xml.StationIdXML;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
/**
|
||||
|
@ -56,8 +53,6 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Apr 23, 2014 3054 skorolev Fixed issues with removing a new zone from list.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getAreaConfigMgr method.
|
||||
* Nov 10, 2014 3741 skorolev Fixed configXML issue.
|
||||
* Nov 21, 2014 3841 skorolev Content of ID field made an editable.
|
||||
* Feb 03, 2015 3841 skorolev Fixed deleteSelected method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -90,11 +85,17 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
/** Control font. */
|
||||
private Font controlFont;
|
||||
|
||||
/** Marine station radio button. */
|
||||
private Button marineRdo;
|
||||
|
||||
/** None Marine station radio button. */
|
||||
private Button nonMarineRdo;
|
||||
|
||||
/** Bottom label */
|
||||
private Label bottomLbl;
|
||||
|
||||
/** Deleted zone */
|
||||
private boolean delZone = false;
|
||||
private String delZone;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -226,6 +227,21 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
lonTF = new Text(textButtonComp, SWT.BORDER);
|
||||
lonTF.setLayoutData(gd);
|
||||
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 2;
|
||||
gd.verticalIndent = 15;
|
||||
marineRdo = new Button(textButtonComp, SWT.RADIO);
|
||||
marineRdo.setLayoutData(gd);
|
||||
marineRdo.setSelection(false);
|
||||
marineRdo.setText("Marine Station");
|
||||
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 2;
|
||||
nonMarineRdo = new Button(textButtonComp, SWT.RADIO);
|
||||
nonMarineRdo.setLayoutData(gd);
|
||||
nonMarineRdo.setSelection(true);
|
||||
nonMarineRdo.setText("Non-Marine Station");
|
||||
|
||||
gd = new GridData(SWT.CENTER, SWT.DEFAULT, false, true);
|
||||
gd.widthHint = 80;
|
||||
gd.verticalIndent = 5;
|
||||
|
@ -235,17 +251,7 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
saveBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (zoneList.getItemCount() != 0) {
|
||||
String area = zoneList.getItem(zoneList.getSelectionIndex());
|
||||
String areaStr = idTF.getText();
|
||||
String latStr = latTF.getText();
|
||||
String lonStr = lonTF.getText();
|
||||
if (macDlg.formIsValid(areaStr, latStr, lonStr)) {
|
||||
saveSelected(area, areaStr, latStr, lonStr);
|
||||
}
|
||||
} else {
|
||||
bottomLbl.setText("No zones have been edited.");
|
||||
}
|
||||
saveSelected();
|
||||
}
|
||||
});
|
||||
gd = new GridData(SWT.CENTER, SWT.DEFAULT, false, true);
|
||||
|
@ -304,21 +310,7 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
* Populate list of added zones.
|
||||
*/
|
||||
private void populate() {
|
||||
java.util.List<String> newList = new ArrayList<String>();
|
||||
java.util.List<AreaIdXML> maList = macDlg.configMgr.getConfigXml()
|
||||
.getAreaIds();
|
||||
for (AreaIdXML maZone : maList) {
|
||||
if (maZone.getCLat() != null) {
|
||||
newList.add(maZone.getAreaId());
|
||||
}
|
||||
}
|
||||
java.util.List<AreaIdXML> adtnlList = macDlg.configMgr
|
||||
.getAdjAreaConfigXml().getAreaIds();
|
||||
for (AreaIdXML aZone : adtnlList) {
|
||||
if (aZone.getCLat() != null) {
|
||||
newList.add(aZone.getAreaId());
|
||||
}
|
||||
}
|
||||
java.util.List<String> newList = macDlg.configMgr.getAddedZones();
|
||||
zoneList.setItems(newList.toArray(new String[newList.size()]));
|
||||
}
|
||||
|
||||
|
@ -328,25 +320,26 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
private void handleZoneSelection() {
|
||||
String zone = zoneList.getItem(zoneList.getSelectionIndex());
|
||||
AreaIdXML areaXml = macDlg.configMgr.getAreaXml(zone);
|
||||
AreaIdXML adjAreaXml = macDlg.configMgr.getAdjAreaXML(zone);
|
||||
// DR #7343: a null areaXml causes an "Unhandled event loop exception"
|
||||
if (areaXml != null) {
|
||||
idTF.setText(areaXml.getAreaId());
|
||||
// idTF.setEnabled(false);
|
||||
idTF.setEnabled(false);
|
||||
latTF.setText(String.valueOf(areaXml.getCLat()));
|
||||
lonTF.setText(String.valueOf(areaXml.getCLon()));
|
||||
} else if (adjAreaXml != null) {
|
||||
idTF.setText(adjAreaXml.getAreaId());
|
||||
// idTF.setEnabled(false);
|
||||
latTF.setText(String.valueOf(adjAreaXml.getCLat()));
|
||||
lonTF.setText(String.valueOf(adjAreaXml.getCLon()));
|
||||
if (areaXml.getType() == ZoneType.REGULAR) {
|
||||
nonMarineRdo.setSelection(true);
|
||||
marineRdo.setSelection(false);
|
||||
} else {
|
||||
nonMarineRdo.setSelection(false);
|
||||
marineRdo.setSelection(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete selected zones.
|
||||
*/
|
||||
private Boolean deleteSelected() {
|
||||
private String deleteSelected() {
|
||||
if (zoneList.getItemCount() != 0) {
|
||||
if (zoneList.getSelectionIndex() == -1) {
|
||||
MessageBox messageBox = new MessageBox(shell,
|
||||
|
@ -355,86 +348,62 @@ public class EditNewZoneDlg extends CaveSWTDialog {
|
|||
messageBox.setMessage("Please select zone to be deleted.");
|
||||
messageBox.open();
|
||||
zoneList.select(0);
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
String area = zoneList.getItem(zoneList.getSelectionIndex());
|
||||
zoneList.remove(zoneList.getSelectionIndex());
|
||||
zoneList.select(0);
|
||||
if (zoneList.getItemCount() != 0) {
|
||||
handleZoneSelection();
|
||||
} else {
|
||||
idTF.setText("");
|
||||
latTF.setText("");
|
||||
lonTF.setText("");
|
||||
}
|
||||
if (macDlg.getMaZones().contains(area)) {
|
||||
macDlg.getMaZones().remove(area);
|
||||
macDlg.configMgr.removeArea(area);
|
||||
}
|
||||
if (macDlg.getAdditionalZones().contains(area)) {
|
||||
macDlg.getAdditionalZones().remove(area);
|
||||
macDlg.configMgr.removeAdjArea(area);
|
||||
}
|
||||
macDlg.maZonesRemoved = true;
|
||||
return true;
|
||||
macDlg.configMgr.removeArea(area);
|
||||
idTF.setText("");
|
||||
latTF.setText("");
|
||||
lonTF.setText("");
|
||||
return area;
|
||||
} else {
|
||||
bottomLbl.setText("No zones have been deleted.");
|
||||
}
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save selected zones.
|
||||
*/
|
||||
/**
|
||||
* @param area
|
||||
* Original zone ID
|
||||
* @param areaStr
|
||||
* New zone ID
|
||||
* @param latStr
|
||||
* Latitude
|
||||
* @param lonStr
|
||||
* Longitude
|
||||
* @throws NumberFormatException
|
||||
*/
|
||||
private void saveSelected(String area, String areaStr, String latStr,
|
||||
String lonStr) throws NumberFormatException {
|
||||
private void saveSelected() {
|
||||
|
||||
ArrayList<StationIdXML> stationIds = macDlg.configMgr.getAreaXml(area)
|
||||
.getStationIds();
|
||||
|
||||
double lat = Double.parseDouble(latStr);
|
||||
double lon = Double.parseDouble(lonStr);
|
||||
if (lat > 90.0 || lat < -90.0 || lon > 180.0 || lon < -180.0) {
|
||||
macDlg.latLonErrorMsg(latStr, lonStr);
|
||||
return;
|
||||
}
|
||||
ZoneType type = ZoneType.REGULAR;
|
||||
if (areaStr.charAt(2) != 'C') {
|
||||
type = (ZoneType.MARITIME);
|
||||
}
|
||||
AreaIdXML areaXML = new AreaIdXML();
|
||||
areaXML.setAreaId(areaStr);
|
||||
areaXML.setCLat(lat);
|
||||
areaXML.setCLon(lon);
|
||||
areaXML.setType(type);
|
||||
areaXML.setStationIds(stationIds);
|
||||
// Replace previously added zone
|
||||
if (macDlg.configMgr.getAreaList().contains(area)) {
|
||||
if (macDlg.getMaZones().contains(area)) {
|
||||
macDlg.getMaZones().remove(area);
|
||||
if (zoneList.getItemCount() != 0) {
|
||||
String area = zoneList.getItem(zoneList.getSelectionIndex());
|
||||
String latStr = latTF.getText();
|
||||
String lontStr = lonTF.getText();
|
||||
if (latStr == null || latStr.isEmpty() || lontStr == null
|
||||
|| lontStr.isEmpty()) {
|
||||
macDlg.latLonErrorMsg(latStr, lontStr);
|
||||
return;
|
||||
} else {
|
||||
try {
|
||||
double lat = Double.parseDouble(latStr);
|
||||
double lon = Double.parseDouble(lontStr);
|
||||
if (lat > 90.0 || lat < -90.0 || lon > 180.0
|
||||
|| lon < -180.0) {
|
||||
macDlg.latLonErrorMsg(latStr, lontStr);
|
||||
return;
|
||||
}
|
||||
ZoneType type = ZoneType.REGULAR;
|
||||
if (marineRdo.getSelection()) {
|
||||
type = ZoneType.MARITIME;
|
||||
}
|
||||
// Replace previously added zone
|
||||
macDlg.configMgr.removeArea(area);
|
||||
macDlg.configMgr.removeAddedArea(area);
|
||||
macDlg.configMgr.addArea(area, lat, lon, type);
|
||||
populate();
|
||||
// Return cursor to the top of the list.
|
||||
zoneList.select(0);
|
||||
} catch (NumberFormatException e) {
|
||||
macDlg.latLonErrorMsg(latStr, lontStr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
macDlg.configMgr.removeAddedArea(area);
|
||||
macDlg.configMgr.removeArea(area);
|
||||
macDlg.configMgr.addArea(areaXML);
|
||||
} else if (macDlg.getAdditionalZones().contains(area)) {
|
||||
macDlg.getAdditionalZones().remove(area);
|
||||
macDlg.configMgr.removeAdjArea(area);
|
||||
macDlg.configMgr.addAdjArea(areaXML);
|
||||
} else {
|
||||
bottomLbl.setText("No zones have been edited.");
|
||||
}
|
||||
populate();
|
||||
// Return cursor to the list.
|
||||
zoneList.select(zoneList.indexOf(areaStr));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -45,7 +45,7 @@ import org.eclipse.swt.widgets.Text;
|
|||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML.ZoneType;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -78,9 +78,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Sep 24, 2014 2757 skorolev Fixed problem with adding and removing zones.
|
||||
* Oct 27, 2014 3667 skorolev Corrected functionality of dialog. Cleaned code.
|
||||
* Nov 12, 2014 3650 skorolev Added confirmation box for unsaved changes in the dialog.
|
||||
* Nov 21, 2014 3841 skorolev Added formIsValid method.
|
||||
* Dec 18, 2014 3841 skorolev Corrected addZoneStn method.
|
||||
* Feb 03, 2015 3841 skorolev Fixed saving problem for distance and time.
|
||||
* Mar 08, 2015 3888 dhladky Restored threshold pop-up when adding new stations/zones.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -880,7 +878,6 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
* Handles the Add New button click.
|
||||
*/
|
||||
private void handleAddNewAction() {
|
||||
// Zone configure
|
||||
if (zoneRdo.getSelection() == true) {
|
||||
if (addNewZoneDlg == null) {
|
||||
addNewZoneDlg = new AddNewZoneDlg(shell, appName, this);
|
||||
|
@ -896,9 +893,9 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
});
|
||||
}
|
||||
addNewZoneDlg.open();
|
||||
} else { // Station configure
|
||||
if (maRegionalList.getSelectionIndex() != -1) {
|
||||
String area = maRegionalList.getItem(maRegionalList
|
||||
} else {
|
||||
if (associatedList.getSelectionIndex() != -1) {
|
||||
String area = associatedList.getItem(associatedList
|
||||
.getSelectionIndex());
|
||||
if (addNewStnDlg == null) {
|
||||
addNewStnDlg = new AddNewStationDlg(shell, appName, area,
|
||||
|
@ -919,9 +916,9 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
MessageBox messageBox = new MessageBox(shell,
|
||||
SWT.ICON_INFORMATION | SWT.NONE);
|
||||
messageBox.setText("Selection error.");
|
||||
messageBox.setMessage("Please select a monitoring zone.");
|
||||
messageBox.setMessage("Please select associated zone.");
|
||||
messageBox.open();
|
||||
maRegionalList.select(0);
|
||||
associatedList.select(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -936,8 +933,10 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
editDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
if ((boolean) returnValue) {
|
||||
if (returnValue instanceof String) {
|
||||
// Update the edit dialog
|
||||
String selectedZone = returnValue.toString();
|
||||
maZones.remove(selectedZone);
|
||||
populateLeftLists();
|
||||
}
|
||||
editDlg = null;
|
||||
|
@ -1086,20 +1085,20 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
if (mode == Mode.Zone) {
|
||||
String zone = additionalList.getItem(additionalList
|
||||
.getSelectionIndex());
|
||||
AreaIdXML zoneXML = configMgr.getAdjAreaXML(zone);
|
||||
additionalList.remove(additionalList.getSelectionIndex());
|
||||
maZones.add(zone);
|
||||
Collections.sort(maZones);
|
||||
monitorAreaList
|
||||
.setItems(maZones.toArray(new String[maZones.size()]));
|
||||
monitorAreaList.setSelection(maZones.indexOf(zone));
|
||||
handleMonitorAreaListSelection();
|
||||
additionalZones.remove(zone);
|
||||
configMgr.addArea(zoneXML);
|
||||
configMgr.addArea(zone, zone.charAt(2) == 'Z' ? ZoneType.MARITIME
|
||||
: ZoneType.REGULAR);
|
||||
if (!configMgr.getAddedZones().contains(zone)) {
|
||||
configMgr.getAddedZones().add(zone);
|
||||
}
|
||||
configMgr.removeAdjArea(zone);
|
||||
handleMonitorAreaListSelection();
|
||||
} else { // Station mode
|
||||
if (associatedList.getSelectionCount() == 0) {
|
||||
showMessage(shell, SWT.ERROR, "Selection Needed",
|
||||
|
@ -1144,8 +1143,6 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
monitorAreaList.remove(monitorAreaList.getSelectionIndex());
|
||||
associatedList.removeAll();
|
||||
if (mode == Mode.Zone) {
|
||||
// entry is a zone to remove.
|
||||
AreaIdXML zoneXML = configMgr.getAreaXml(entry);
|
||||
if (!additionalZones.contains(entry)) {
|
||||
additionalZones.add(entry);
|
||||
}
|
||||
|
@ -1158,9 +1155,11 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
if (configMgr.getAddedZones().contains(entry)) {
|
||||
configMgr.getAddedZones().remove(entry);
|
||||
}
|
||||
configMgr.addAdjArea(zoneXML);
|
||||
|
||||
configMgr.addAdjArea(entry,
|
||||
entry.charAt(2) == 'Z' ? ZoneType.MARITIME
|
||||
: ZoneType.REGULAR);
|
||||
} else { // Station mode
|
||||
// entry is a station to remove.
|
||||
additionalStns.add(entry);
|
||||
Collections.sort(additionalStns);
|
||||
additionalList.setItems(additionalStns
|
||||
|
@ -1239,12 +1238,13 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
} else { // Station mode
|
||||
if (regionalRdo.getSelection()) {
|
||||
// entry is a zone selected from additional zones
|
||||
AreaIdXML zoneXML = configMgr.getAdjAreaXML(entry);
|
||||
maZones.add(entry);
|
||||
Collections.sort(maZones);
|
||||
additionalZones.remove(entry);
|
||||
maRegionalList.remove(maRegionalList.getSelectionIndex());
|
||||
configMgr.addArea(zoneXML);
|
||||
configMgr.addArea(entry,
|
||||
entry.charAt(2) == 'Z' ? ZoneType.MARITIME
|
||||
: ZoneType.REGULAR);
|
||||
}
|
||||
String stn = monitorAreaList.getItem(monitorAreaList
|
||||
.getSelectionIndex());
|
||||
|
@ -1338,10 +1338,11 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Saving configuration parameters.
|
||||
* Reset and Saving configuration parameters.
|
||||
*/
|
||||
protected void saveConfigs() {
|
||||
protected void resetAndSave() {
|
||||
getValues();
|
||||
resetStatus();
|
||||
configMgr.saveConfigXml();
|
||||
configMgr.saveAdjacentAreaConfigXml();
|
||||
}
|
||||
|
@ -1410,27 +1411,6 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean formIsValid(String area, String latString, String lonString) {
|
||||
boolean retVal = true;
|
||||
if (area.equals("") || area.length() != 6
|
||||
|| (area.charAt(2) != 'C' && area.charAt(2) != 'Z')) {
|
||||
displayInputErrorMsg("Invalid Area ID = '"
|
||||
+ area
|
||||
+ "' entered.\n"
|
||||
+ "Please enter a correctly formatted Area ID:\n"
|
||||
+ "Zone ID must have six characters.\n"
|
||||
+ "A third character should be C for county and Z for marine zone.\n"
|
||||
+ "Use only capital characters.");
|
||||
retVal = false;
|
||||
}
|
||||
if (latString == null || latString.isEmpty() || lonString == null
|
||||
|| lonString.isEmpty()) {
|
||||
latLonErrorMsg(latString, lonString);
|
||||
retVal = false;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -1497,12 +1477,7 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
* Reset data status.
|
||||
*/
|
||||
protected void resetStatus() {
|
||||
if (!configMgr.getAddedZones().isEmpty()) {
|
||||
configMgr.getAddedZones().clear();
|
||||
}
|
||||
if (!configMgr.getAddedStations().isEmpty()) {
|
||||
configMgr.getAddedStations().clear();
|
||||
}
|
||||
|
||||
this.timeWindowChanged = false;
|
||||
this.maZonesRemoved = false;
|
||||
this.maStationsRemoved = false;
|
||||
|
@ -1558,35 +1533,6 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
return state;
|
||||
}
|
||||
|
||||
public java.util.List<String> getMaZones() {
|
||||
return maZones;
|
||||
}
|
||||
|
||||
public java.util.List<String> getMaStations() {
|
||||
return maStations;
|
||||
}
|
||||
|
||||
public java.util.List<String> getAdditionalZones() {
|
||||
return additionalZones;
|
||||
}
|
||||
|
||||
public java.util.List<String> getAdditionalStns() {
|
||||
return additionalStns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays Input Error Message
|
||||
*
|
||||
* @param msg
|
||||
*/
|
||||
public void displayInputErrorMsg(String msg) {
|
||||
MessageBox messageBox = new MessageBox(shell, SWT.ICON_INFORMATION
|
||||
| SWT.OK);
|
||||
messageBox.setText("Invalid input");
|
||||
messageBox.setMessage(msg);
|
||||
messageBox.open();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Configuration manager.
|
||||
*
|
||||
|
|
|
@ -94,8 +94,8 @@ import com.vividsolutions.jts.io.ParseException;
|
|||
* Nov.11, 2012 1297 skorolev new abstract initiateProdArray()
|
||||
* May 13, 2014 3133 njensen Updated getting ObsHistType from configMgr
|
||||
* May 15, 2014 3086 skorolev Replaced MonitorConfigurationManager with FSSObsMonitorConfigurationManager.
|
||||
* Sep 15, 2014 3220 skorolev Added refreshZoneTableData method.
|
||||
* Nov 03, 2014 3741 skorolev Updated zoom procedures.
|
||||
* Jan 27, 2015 3220 skorolev Added refreshZoneTableData method.Added condition into launchTrendPlot to avoid NPE.Updated code for better performance.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -259,6 +259,9 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
this.site = LocalizationManager.getInstance().getCurrentSite();
|
||||
dFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
this.obData = obData;
|
||||
// the zone table data of the latest nominal time:
|
||||
zoneTblData = obData.getZoneTableData();
|
||||
zoneTblData.sortData();
|
||||
nominalTime = obData.getLatestNominalTime();
|
||||
}
|
||||
|
||||
|
@ -454,16 +457,12 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
* their current values
|
||||
*/
|
||||
setZoneSortColumnAndDirection();
|
||||
// get tab cache data
|
||||
zoneTblData = obData.getMultiHrsTabData().get(date);
|
||||
// update table if there are tab data in cache
|
||||
if (zoneTblData != null) {
|
||||
zoneTblData.setSortColumnAndDirection(zoneSortColumn,
|
||||
zoneSortDirection);
|
||||
zoneTblData.sortData();
|
||||
zoneTable.setTableData(zoneTblData);
|
||||
zoneTable.table.redraw();
|
||||
}
|
||||
zoneTblData = obData.getZoneTableData(date);
|
||||
zoneTblData
|
||||
.setSortColumnAndDirection(zoneSortColumn, zoneSortDirection);
|
||||
zoneTblData.sortData();
|
||||
zoneTable.setTableData(zoneTblData);
|
||||
zoneTable.table.redraw();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -495,7 +494,7 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
/**
|
||||
* Sets Column and Sort Direction for Zone table.
|
||||
*/
|
||||
public void setZoneSortColumnAndDirection() {
|
||||
protected void setZoneSortColumnAndDirection() {
|
||||
if (zoneTblData != null) {
|
||||
zoneSortColumn = zoneTblData.getSortColumn();
|
||||
zoneSortDirection = zoneTblData.getSortDirection();
|
||||
|
@ -605,9 +604,6 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
@Override
|
||||
public void zoneTableAction(int rowNum) {
|
||||
|
||||
zoneTblData = obData.getZoneTableData(nominalTime);
|
||||
zoneTblData.sortData();
|
||||
// set selectedZone to the selected zone
|
||||
selectedZone = zoneTblData.getTableRows().get(rowNum)
|
||||
.getTableCellData(0).getCellText();
|
||||
|
@ -739,14 +735,10 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
.getTableCellData(0).getCellText();
|
||||
// Set dialog index
|
||||
String dialogID = appName.name() + station;
|
||||
ObsHistType histType = null;
|
||||
if (configMgr != null) {
|
||||
String strHistType = configMgr
|
||||
.getStationType(selectedZone, station);
|
||||
histType = ObsHistType.valueOf(strHistType);
|
||||
}
|
||||
if (histType == null)
|
||||
return;
|
||||
String strHistType = getMonitorAreaConfigInstance().getStationType(
|
||||
selectedZone, station);
|
||||
ObsHistType histType = ObsHistType.valueOf(strHistType);
|
||||
|
||||
/**
|
||||
* For Snow monitor, no history table is displayed for a Maritime
|
||||
* station
|
||||
|
@ -971,4 +963,21 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
}
|
||||
return varName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Configuration manager.
|
||||
*
|
||||
* @return manager
|
||||
*/
|
||||
protected abstract FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance();
|
||||
|
||||
/**
|
||||
* Refreshes Zone Table.
|
||||
*
|
||||
* @param obData
|
||||
*/
|
||||
public void refreshZoneTableData(ObMultiHrsReports obData) {
|
||||
obData.getObHourReports().updateZones();
|
||||
this.updateTableDlg(obData.getObHourReports());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ import com.raytheon.viz.ui.personalities.awips.CAVE;
|
|||
* Nov 14, 2013 2361 njensen Remove initializeSerialization()
|
||||
* Nov 06, 2014 3356 njensen Always initialize ILocalizationAdapter
|
||||
* in case cache preference is not enabled
|
||||
* Feb 23, 2015 4164 dlovely Call AlertViz initialize.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -211,6 +212,7 @@ public class ThinClientComponent extends CAVE implements IThinClientComponent {
|
|||
// JMS Enabled, register product alerts
|
||||
registerProductAlerts();
|
||||
}
|
||||
initializeAlertViz();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -48,7 +48,7 @@ import com.raytheon.viz.ui.EditorUtil;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* May 2009 # bsteffen Initial creation
|
||||
* Nov 2013 # mccaslin Only one GUI dialog at a time
|
||||
* Oct 2014 # mccaslin Improved error handeling
|
||||
* Oct 2014 # mccaslin Improved error handeling
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -56,7 +56,8 @@ import com.raytheon.viz.ui.EditorUtil;
|
|||
* @version 1.0
|
||||
*/
|
||||
public class LapsToolsAction extends AbstractHandler {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(LapsToolsAction.class);
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LapsToolsAction.class);
|
||||
|
||||
/**
|
||||
* LAPS Tools dialog.
|
||||
|
@ -65,50 +66,49 @@ public class LapsToolsAction extends AbstractHandler {
|
|||
|
||||
public static LAPSToolsDlg getLapsToolsDlg() {
|
||||
return lapsToolsDlg;
|
||||
}
|
||||
}
|
||||
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
|
||||
if (lapsToolsDlg == null) {
|
||||
try {
|
||||
lapsToolsDlg = new LAPSToolsDlg(shell);
|
||||
lapsToolsDlg.addListener(SWT.Dispose, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
lapsToolsDlg = null;
|
||||
}
|
||||
});
|
||||
|
||||
if (lapsToolsDlg.isLapsInstalled()) {
|
||||
lapsToolsDlg.open();
|
||||
} else {
|
||||
String whatLapsIs ="LAPS data assimilation system, system requirements: " +
|
||||
"\n\to LAPS v2.0 installed" +
|
||||
"\n\to EDEX 'SITE' file containing LAPS domain, i.e. domain.xml" +
|
||||
"\n\n\n(Sorry LAPS does not work in the ADAM implementation of AWIPS.)";
|
||||
//Note: Go through the LAPS v2.0 Scripting Interface first, if you find that LAPS is not installed.
|
||||
|
||||
MessageBox mb = new MessageBox(EditorUtil.getActiveEditor().getSite().getShell(), SWT.ICON_WARNING | SWT.OK);
|
||||
mb.setText("Cannot open LAPS V2.0 Tools GUI");
|
||||
mb.setMessage(whatLapsIs);
|
||||
mb.open();
|
||||
lapsToolsDlg = null;
|
||||
lapsToolsDlg = new LAPSToolsDlg(shell);
|
||||
lapsToolsDlg.addListener(SWT.Dispose, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
lapsToolsDlg = null;
|
||||
}
|
||||
});
|
||||
|
||||
//int val = mb.open();
|
||||
//if (val == SWT.OK) {
|
||||
// AlertViz Customization Update
|
||||
//return false;
|
||||
//}
|
||||
if (lapsToolsDlg.isLapsInstalled()) {
|
||||
lapsToolsDlg.open();
|
||||
} else {
|
||||
String whatLapsIs = "LAPS is not installed. ";
|
||||
// Note: Go through the LAPS v2.0 Scripting Interface first,
|
||||
// if you find that LAPS is not installed.
|
||||
|
||||
}
|
||||
MessageBox mb = new MessageBox(EditorUtil.getActiveEditor()
|
||||
.getSite().getShell(), SWT.ICON_ERROR | SWT.OK);
|
||||
mb.setText("Cannot open the LAPS tool");
|
||||
mb.setMessage(whatLapsIs);
|
||||
mb.open();
|
||||
lapsToolsDlg = null;
|
||||
|
||||
// int val = mb.open();
|
||||
// if (val == SWT.OK) {
|
||||
// AlertViz Customization Update
|
||||
// return false;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error: Cannot open LAPS V2.0 Tools GUI", e);
|
||||
}
|
||||
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error: Cannot open LAPS V2.0 Tools GUI", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.io.File;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
@ -27,6 +28,7 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel
|
|||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.time.SimulatedTime;
|
||||
|
@ -36,8 +38,8 @@ import com.raytheon.viz.awipstools.ui.action.LapsToolsData.LapsDomain;
|
|||
import com.vividsolutions.jts.geom.Envelope;
|
||||
|
||||
/**
|
||||
* This class no longer performs all the file system, server input/output for laps.
|
||||
* LAPS support scripts now conduct the localization process.
|
||||
* This class no longer performs all the file system, server input/output for
|
||||
* laps. LAPS support scripts now conduct the localization process.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -55,147 +57,150 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
*/
|
||||
public class LapsToolsIO {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(LapsToolsIO.class);
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LapsToolsIO.class);
|
||||
|
||||
private static final String WHATGOTIN_FILE_FRMT = "%s/%s.wgi";
|
||||
|
||||
private static File fxaData;
|
||||
|
||||
private static File lapsLogs;
|
||||
|
||||
|
||||
private static List<String> whatgotinFiles;
|
||||
|
||||
private static List<String> dataChoices;
|
||||
|
||||
|
||||
static {
|
||||
// TODO all this configuration should be customizable by the user.
|
||||
// --- For what got in log files ---
|
||||
// --- For what got in log files ---
|
||||
if (System.getenv("FXA_DATA") == null) {
|
||||
fxaData = new File("/data/fxa");
|
||||
fxaData = new File("/data/fxa");
|
||||
} else {
|
||||
fxaData = new File(System.getenv("FXA_DATA"));
|
||||
}
|
||||
lapsLogs = new File(fxaData + "/laps/log/wgi");
|
||||
whatgotinFiles = Arrays.asList("sfc", "wind", "lq3driver", "cloud", "temp");
|
||||
dataChoices = Arrays.asList("Surface Analysis",
|
||||
"Wind Analysis",
|
||||
"Humidity Analysis",
|
||||
"Cloud Analysis",
|
||||
"Temperature Analysis");
|
||||
whatgotinFiles = Arrays.asList("sfc", "wind", "lq3driver", "cloud",
|
||||
"temp");
|
||||
dataChoices = Arrays.asList("Surface Analysis", "Wind Analysis",
|
||||
"Humidity Analysis", "Cloud Analysis", "Temperature Analysis");
|
||||
}
|
||||
|
||||
public static Collection<String> getDataChoices() {
|
||||
return dataChoices;
|
||||
}
|
||||
|
||||
public static String getLogs(String type) throws IOException,
|
||||
VizException {
|
||||
public static String getLogs(String type) throws IOException, VizException {
|
||||
String wgiFile = String.format(WHATGOTIN_FILE_FRMT, lapsLogs,
|
||||
whatgotinFiles.get(dataChoices.indexOf(type)));
|
||||
whatgotinFiles.get(dataChoices.indexOf(type)));
|
||||
String resultIO = loadWhatGotInFile(wgiFile, type);
|
||||
return (resultIO);
|
||||
return (resultIO);
|
||||
}
|
||||
|
||||
private static String loadWhatGotInFile(String wfile, String type)
|
||||
throws IOException {
|
||||
BufferedReader reader;
|
||||
StringBuilder output = new StringBuilder();
|
||||
File file = new File(wfile);
|
||||
|
||||
try {
|
||||
reader = new BufferedReader(new FileReader(file));
|
||||
} catch (FileNotFoundException e) {
|
||||
String arg = String.format("*** Cannot find expected log file for %s." +
|
||||
"\n*** File %s ....does not appear to exist.\n\n",
|
||||
type, file.getAbsolutePath());
|
||||
output.append(arg);
|
||||
return output.toString();
|
||||
}
|
||||
private static String loadWhatGotInFile(String wfile, String type)
|
||||
throws IOException {
|
||||
BufferedReader reader;
|
||||
StringBuilder output = new StringBuilder();
|
||||
File file = new File(wfile);
|
||||
|
||||
try {
|
||||
reader = new BufferedReader(new FileReader(file));
|
||||
} catch (FileNotFoundException e) {
|
||||
String arg = String
|
||||
.format("*** Cannot find expected log file for %s."
|
||||
+ "\n*** File %s ....does not appear to exist.\n\n",
|
||||
type, file.getAbsolutePath());
|
||||
output.append(arg);
|
||||
return output.toString();
|
||||
}
|
||||
String line;
|
||||
int lineNumber = 0;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
String arg = String.format("%04d: %s%n", ++lineNumber, line);
|
||||
output.append(arg);
|
||||
output.append(arg);
|
||||
}
|
||||
reader.close();
|
||||
return output.toString();
|
||||
}
|
||||
|
||||
|
||||
public static LapsToolsData loadData() throws IOException, VizException,
|
||||
SpatialException {
|
||||
LapsToolsData data = new LapsToolsData();
|
||||
if(LapsToolsIO.readXmlFile(data)) {
|
||||
LapsToolsIO.readCountyWarningArea(data);
|
||||
if (LapsToolsIO.readXmlFile(data)) {
|
||||
LapsToolsIO.readCountyWarningArea(data);
|
||||
} else {
|
||||
data = null;
|
||||
data = null;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
public static boolean readXmlFile(LapsToolsData data)
|
||||
throws IOException, VizException {
|
||||
|
||||
|
||||
public static boolean readXmlFile(LapsToolsData data) throws IOException,
|
||||
VizException {
|
||||
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE);
|
||||
LocalizationFile xmlLocalizationFile = pm.getLocalizationFile(lc, "LAPS/domain" +
|
||||
".xml");
|
||||
if(!xmlLocalizationFile.exists()) return false;
|
||||
|
||||
LapsDomain domain = new LapsDomain();
|
||||
try {
|
||||
JAXBContext jaxbContext = JAXBContext.newInstance(LapsDomain.class);
|
||||
//unmarshal XML file to java object
|
||||
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
|
||||
domain = (LapsDomain) jaxbUnmarshaller.unmarshal(xmlLocalizationFile.getFile());
|
||||
|
||||
} catch (JAXBException e) {
|
||||
throw new VizException("xml is unreadable: "+e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE);
|
||||
LocalizationFile xmlLocalizationFile = pm.getLocalizationFile(lc,
|
||||
"LAPS/domain" + ".xml");
|
||||
if (!xmlLocalizationFile.exists())
|
||||
return false;
|
||||
|
||||
LapsDomain domain = new LapsDomain();
|
||||
try {
|
||||
JAXBContext jaxbContext = JAXBContext.newInstance(LapsDomain.class);
|
||||
// unmarshal XML file to java object
|
||||
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
|
||||
domain = (LapsDomain) jaxbUnmarshaller
|
||||
.unmarshal(xmlLocalizationFile.getFile());
|
||||
|
||||
} catch (JAXBException e) {
|
||||
throw new VizException("xml is unreadable: "
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
data.setNx(domain.getNx());
|
||||
data.setNy(domain.getNy());
|
||||
data.setNz(domain.getNz());
|
||||
data.setGridSpacing(domain.getGridSpacing());
|
||||
data.setGridCenterLon(domain.getGridCenLon());
|
||||
data.setGridCenterLat(domain.getGridCenLat());
|
||||
data.setGridCenterLat(domain.getGridCenLat());
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void defaultDomain(LapsToolsData data)
|
||||
throws IOException, VizException {
|
||||
double distance = 111; //111 km per 1 degree
|
||||
double gridSpacingDefault = 3500.;
|
||||
public static void defaultDomain(LapsToolsData data) throws IOException,
|
||||
VizException {
|
||||
double distance = 111; // 111 km per 1 degree
|
||||
double gridSpacingDefault = 3500.;
|
||||
double dim = 200;
|
||||
double N = dim * dim;
|
||||
|
||||
|
||||
Envelope shapeArea = data.getValidAreaOrig();
|
||||
double widthY = Math.abs(shapeArea.getHeight() * distance);
|
||||
double widthX = Math.abs( (shapeArea.getWidth() * distance) * (Math.cos(shapeArea.centre().x) ) );
|
||||
double widthX = Math.abs((shapeArea.getWidth() * distance)
|
||||
* (Math.cos(shapeArea.centre().x)));
|
||||
double aspectRatio = widthY / widthX;
|
||||
double buffer = 0.5;
|
||||
int nX = (int) (Math.sqrt(N/aspectRatio) + buffer);
|
||||
int nX = (int) (Math.sqrt(N / aspectRatio) + buffer);
|
||||
int nY = (int) ((aspectRatio * nX) + buffer);
|
||||
|
||||
System.out.print("LAPS Tools IO:\nheight = "+shapeArea.getHeight()+ " width = "+shapeArea.getWidth());
|
||||
System.out.print("\naspect ratio = "+aspectRatio);
|
||||
System.out.print("\nnX = "+nX+", nY = "+nY+"\n");
|
||||
|
||||
LapsDomain domain = new LapsDomain();
|
||||
System.out.print("LAPS Tools IO:\nheight = " + shapeArea.getHeight()
|
||||
+ " width = " + shapeArea.getWidth());
|
||||
System.out.print("\naspect ratio = " + aspectRatio);
|
||||
System.out.print("\nnX = " + nX + ", nY = " + nY + "\n");
|
||||
|
||||
LapsDomain domain = new LapsDomain();
|
||||
domain.setNx(nX);
|
||||
domain.setNy(nY);
|
||||
domain.setNz(43);
|
||||
domain.setGridSpacing(gridSpacingDefault);
|
||||
domain.setGridCenLon(data.getCwaCenter().x);
|
||||
domain.setGridCenLat(data.getCwaCenter().y);
|
||||
|
||||
domain.setGridCenLat(data.getCwaCenter().y);
|
||||
|
||||
data.setNx(domain.getNx());
|
||||
data.setNy(domain.getNy());
|
||||
data.setNz(domain.getNz());
|
||||
data.setGridSpacing(domain.getGridSpacing());
|
||||
data.setGridCenterLon(data.getCwaCenter().x);
|
||||
data.setGridCenterLat(data.getCwaCenter().y);
|
||||
data.setGridCenterLat(data.getCwaCenter().y);
|
||||
}
|
||||
|
||||
private static void readCountyWarningArea(LapsToolsData data)
|
||||
|
@ -209,23 +214,25 @@ public class LapsToolsIO {
|
|||
return;
|
||||
}
|
||||
data.setCwaArea(result[0].geometry.getEnvelopeInternal());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String getWriteXmlQuestion() {
|
||||
String date = new SimpleDateFormat("HH:mm").format(SimulatedTime
|
||||
.getSystemTime().getTime());
|
||||
return String.format("Are you sure you want write domain.xml?" +
|
||||
"\nNote: Its %s and LAPS runs at ~20 minutes after the hour.",date);
|
||||
return String
|
||||
.format("Are you sure you want write domain.xml?"
|
||||
+ "\nNote: Its %s and LAPS runs at ~20 minutes after the hour.",
|
||||
date);
|
||||
}
|
||||
|
||||
public static void writeXmlFile(LapsToolsData data) throws IOException,
|
||||
InterruptedException, VizException {
|
||||
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE);
|
||||
LocalizationFile xmlLocalizationFile = pm.getLocalizationFile(lc, "LAPS/domain-output" +
|
||||
".xml");
|
||||
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.USER);
|
||||
LocalizationFile xmlLocalizationFile = pm.getLocalizationFile(lc,
|
||||
"LAPS" + IPathManager.SEPARATOR + "domain.xml");
|
||||
LapsDomain lapsdomain = new LapsDomain();
|
||||
lapsdomain.setNx(data.getNx());
|
||||
lapsdomain.setNy(data.getNy());
|
||||
|
@ -233,7 +240,15 @@ public class LapsToolsIO {
|
|||
lapsdomain.setGridSpacing(data.getGridSpacing());
|
||||
lapsdomain.setGridCenLat(data.getGridCenter().y);
|
||||
lapsdomain.setGridCenLon(data.getGridCenter().x);
|
||||
//marshal java object to XML file
|
||||
JAXB.marshal(lapsdomain, xmlLocalizationFile.getFile());
|
||||
// marshal java object to XML file
|
||||
OutputStream stream;
|
||||
try {
|
||||
stream = xmlLocalizationFile.openOutputStream();
|
||||
JAXB.marshal(lapsdomain, stream);
|
||||
stream.close();
|
||||
xmlLocalizationFile.save();
|
||||
} catch (LocalizationException e) {
|
||||
throw new VizException("Unable to save LapsDomain to xml.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,8 +77,9 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
|
|||
* @version 1.0
|
||||
*/
|
||||
public class LAPSToolsDlg extends CaveSWTDialog {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(LAPSToolsDlg.class);
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(LAPSToolsDlg.class);
|
||||
|
||||
private final LapsToolsData data;
|
||||
|
||||
|
@ -109,7 +110,7 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
*/
|
||||
private boolean isLapsInstalled = false;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Flag indicating which tool is active.
|
||||
*/
|
||||
private boolean isDataUsedByAnalysis = true;
|
||||
|
@ -175,9 +176,9 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
*/
|
||||
private StackLayout stackLayout;
|
||||
|
||||
private MessageBox areaDialog;
|
||||
private MessageBox areaDialog;
|
||||
|
||||
private Label areaStrLbl;
|
||||
private Label areaStrLbl;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -192,16 +193,15 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
|
||||
try {
|
||||
this.data = LapsToolsIO.loadData();
|
||||
if(data==null){
|
||||
isLapsInstalled = false;
|
||||
if (data == null) {
|
||||
isLapsInstalled = false;
|
||||
} else {
|
||||
isLapsInstalled = true;
|
||||
isLapsInstalled = true;
|
||||
}
|
||||
|
||||
|
||||
} catch (VizException e) {
|
||||
MessageDialog
|
||||
.openInformation(shell, "LAPS Tools GUI cannot run.",
|
||||
e.getLocalizedMessage());
|
||||
MessageDialog.openInformation(shell, "LAPS Tools GUI cannot run.",
|
||||
e.getLocalizedMessage());
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Laps Dialog Failed to open", e);
|
||||
|
@ -242,8 +242,7 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
createMainControls();
|
||||
|
||||
// create dialog with OK and cancel button and info icon
|
||||
areaDialog =
|
||||
new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
|
||||
areaDialog = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
|
||||
areaDialog.setText("Size of LAPS Domain");
|
||||
}
|
||||
|
||||
|
@ -352,27 +351,27 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
// Create the Help menu item with a Help "dropdown" menu
|
||||
Menu helpMenu = new Menu(menuBar);
|
||||
helpMenuItem.setMenu(helpMenu);
|
||||
|
||||
|
||||
// create dialog with OK and cancel button and info icon
|
||||
final MessageBox dialog =
|
||||
new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
|
||||
final MessageBox dialog = new MessageBox(shell, SWT.ICON_INFORMATION
|
||||
| SWT.OK);
|
||||
dialog.setText("About LAPS details");
|
||||
dialog.setMessage("For additional detailed information about LAPS Tools go to the URL" +
|
||||
"\n\t http://laps.noaa.gov/awipsii/");
|
||||
|
||||
dialog.setMessage("For additional detailed information about LAPS Tools go to the URL"
|
||||
+ "\n\t http://laps.noaa.gov/awipsii/");
|
||||
|
||||
// ------------------------------------------------------
|
||||
// Create all the items in the Help dropdown menu
|
||||
// ------------------------------------------------------
|
||||
|
||||
// Administration menu item
|
||||
// Administration menu item
|
||||
MenuItem aboutMI = new MenuItem(helpMenu, SWT.NONE);
|
||||
aboutMI.setText("About LAPS...");
|
||||
aboutMI.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
dialog.open();
|
||||
dialog.open();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -430,22 +429,24 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
Combo c = (Combo) e.widget;
|
||||
if(c.getSelectionIndex() == 0 && c.getItem(0) == "-- Select a Type --") {
|
||||
//no action
|
||||
} else if(c.getSelectionIndex() != 0 && c.getItem(0) == "-- Select a Type --") {
|
||||
c.remove(0);
|
||||
typeAction((c.getItem(c.getSelectionIndex())));
|
||||
if (c.getSelectionIndex() == 0
|
||||
&& c.getItem(0) == "-- Select a Type --") {
|
||||
// no action
|
||||
} else if (c.getSelectionIndex() != 0
|
||||
&& c.getItem(0) == "-- Select a Type --") {
|
||||
c.remove(0);
|
||||
typeAction((c.getItem(c.getSelectionIndex())));
|
||||
} else {
|
||||
typeAction((c.getItem(c.getSelectionIndex())));
|
||||
typeAction((c.getItem(c.getSelectionIndex())));
|
||||
}
|
||||
}
|
||||
});
|
||||
typeCbo.select(0);
|
||||
typeCbo.setToolTipText("Select one of the options to see what got into this LAPS product." );
|
||||
|
||||
typeCbo.setToolTipText("Select one of the options to see what got into this LAPS product.");
|
||||
|
||||
Label blank = new Label(controlComp, SWT.NONE);
|
||||
blank.setText(" ");
|
||||
|
||||
|
||||
Button clearBtn = new Button(controlComp, SWT.PUSH);
|
||||
clearBtn.setText(" Clear ");
|
||||
clearBtn.addSelectionListener(new SelectionAdapter() {
|
||||
|
@ -455,7 +456,7 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
}
|
||||
});
|
||||
clearBtn.setToolTipText("Clear screen.");
|
||||
|
||||
|
||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gd.widthHint = 500;
|
||||
gd.heightHint = 300;
|
||||
|
@ -491,12 +492,13 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
writeDomainBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
writeXmlfileAction();
|
||||
writeXmlfileAction();
|
||||
}
|
||||
});
|
||||
writeDomainBtn.setToolTipText("Write LAPS domain.xml file AND Exit.\n" +
|
||||
"This step will cause scripts to run that redefine the LAPS domain.\n" +
|
||||
"Next cycle of the analysis will show the change in domain made here." );
|
||||
writeDomainBtn
|
||||
.setToolTipText("Write LAPS domain.xml file AND Exit.\n"
|
||||
+ "This step will cause scripts to run that redefine the LAPS domain.\n"
|
||||
+ "Next cycle of the analysis will show the change in domain made here.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -606,36 +608,31 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
nxSpnr.setEnabled(true);
|
||||
nxSpnr.setLayoutData(gd);
|
||||
nxSpnr.addListener(SWT.Verify, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
data.setNx(nxSpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
data.setNx(nxSpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
});
|
||||
/*nxSpnr.addFocusListener(new FocusListener() {
|
||||
@Override
|
||||
public void focusGained(FocusEvent e) {
|
||||
data.setNx(nxSpnr.getSelection());
|
||||
//areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
data.setNx(nxSpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
});
|
||||
nxSpnr.addSelectionListener(new SelectionListener() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
data.setNx(nxSpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
@Override
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
* nxSpnr.addFocusListener(new FocusListener() {
|
||||
*
|
||||
* @Override public void focusGained(FocusEvent e) {
|
||||
* data.setNx(nxSpnr.getSelection());
|
||||
* //areaStrLbl.setText(data.getAreaCoverageString()); }
|
||||
*
|
||||
* @Override public void focusLost(FocusEvent e) {
|
||||
* data.setNx(nxSpnr.getSelection());
|
||||
* areaStrLbl.setText(data.getAreaCoverageString()); } });
|
||||
* nxSpnr.addSelectionListener(new SelectionListener() {
|
||||
*
|
||||
* @Override public void widgetSelected(SelectionEvent e) {
|
||||
* data.setNx(nxSpnr.getSelection());
|
||||
* areaStrLbl.setText(data.getAreaCoverageString()); }
|
||||
*
|
||||
* @Override public void widgetDefaultSelected(SelectionEvent e) { } });
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ny
|
||||
*/
|
||||
|
@ -655,23 +652,21 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
nySpnr.setEnabled(true);
|
||||
nySpnr.setLayoutData(gd);
|
||||
nySpnr.addListener(SWT.Verify, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
data.setNy(nySpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
data.setNy(nySpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
});
|
||||
/*nySpnr.addSelectionListener(new SelectionListener() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
data.setNy(nySpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
@Override
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
}
|
||||
});
|
||||
*/
|
||||
/*
|
||||
* nySpnr.addSelectionListener(new SelectionListener() {
|
||||
*
|
||||
* @Override public void widgetSelected(SelectionEvent e) {
|
||||
* data.setNy(nySpnr.getSelection());
|
||||
* areaStrLbl.setText(data.getAreaCoverageString()); }
|
||||
*
|
||||
* @Override public void widgetDefaultSelected(SelectionEvent e) { } });
|
||||
*/
|
||||
/*
|
||||
* Dx(m)
|
||||
*/
|
||||
|
@ -691,23 +686,21 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
dxmSpnr.setLayoutData(gd);
|
||||
dxmSpnr.setMinimum(1000);
|
||||
dxmSpnr.addListener(SWT.Verify, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
data.setGridSpacing((double) dxmSpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
data.setGridSpacing((double) dxmSpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
});
|
||||
/*dxmSpnr.addSelectionListener(new SelectionListener() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
data.setGridSpacing((double) dxmSpnr.getSelection());
|
||||
areaStrLbl.setText(data.getAreaCoverageString());
|
||||
}
|
||||
@Override
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
}
|
||||
});
|
||||
*/
|
||||
/*
|
||||
* dxmSpnr.addSelectionListener(new SelectionListener() {
|
||||
*
|
||||
* @Override public void widgetSelected(SelectionEvent e) {
|
||||
* data.setGridSpacing((double) dxmSpnr.getSelection());
|
||||
* areaStrLbl.setText(data.getAreaCoverageString()); }
|
||||
*
|
||||
* @Override public void widgetDefaultSelected(SelectionEvent e) { } });
|
||||
*/
|
||||
/*
|
||||
* Vertical label
|
||||
*/
|
||||
|
@ -744,7 +737,6 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
gridGroup.setLayout(new GridLayout(1, false));
|
||||
gridGroup.setLayoutData(gd);
|
||||
gridGroup.setText(" Area of Coverage ");
|
||||
|
||||
|
||||
/*
|
||||
* Calculated Area label
|
||||
|
@ -768,7 +760,8 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
|
||||
Composite groupComp = new Composite(configureAnalysisComp, SWT.NONE);
|
||||
groupComp.setLayout(gl);
|
||||
groupComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
|
||||
groupComp
|
||||
.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
|
||||
|
||||
/*
|
||||
* Settings
|
||||
|
@ -790,8 +783,9 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
setDefaultDomain();
|
||||
}
|
||||
});
|
||||
//defaultBtn.setToolTipText("Set to the default");
|
||||
defaultBtn.setToolTipText("Reset all variables to values so that the LAPS domain will fully include the CWA area");
|
||||
// defaultBtn.setToolTipText("Set to the default");
|
||||
defaultBtn
|
||||
.setToolTipText("Reset all variables to values so that the LAPS domain will fully include the CWA area");
|
||||
|
||||
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
|
||||
gd.widthHint = buttonWidth;
|
||||
|
@ -804,8 +798,8 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
resetDomain();
|
||||
}
|
||||
});
|
||||
resetBtn.setToolTipText("Set to the values that you started with" );
|
||||
|
||||
resetBtn.setToolTipText("Set to the values that you started with");
|
||||
|
||||
/*
|
||||
* LAPS Relocator
|
||||
*/
|
||||
|
@ -826,8 +820,8 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
loadAction();
|
||||
}
|
||||
});
|
||||
loadBtn.setToolTipText("Load the grid info into the display." +
|
||||
"\nRelocate the domain by selecting and moving the grid center.");
|
||||
loadBtn.setToolTipText("Load the grid info into the display."
|
||||
+ "\nRelocate the domain by selecting and moving the grid center.");
|
||||
|
||||
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
|
||||
gd.widthHint = buttonWidth;
|
||||
|
@ -841,8 +835,8 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
applyAction();
|
||||
}
|
||||
});
|
||||
applyBtn.setToolTipText("Fill the selectors with new values, if you" +
|
||||
"\nmoved the domain by relocating the center point." );
|
||||
applyBtn.setToolTipText("Fill the selectors with new values, if you"
|
||||
+ "\nmoved the domain by relocating the center point.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -880,29 +874,29 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
|
||||
private void populateTypeCombo(Combo combo) {
|
||||
combo.add("-- Select a Type --");
|
||||
for (String choice : LapsToolsIO.getDataChoices()) {
|
||||
for (String choice : LapsToolsIO.getDataChoices()) {
|
||||
combo.add(choice);
|
||||
}
|
||||
}
|
||||
|
||||
private void typeAction(String type) {
|
||||
try {
|
||||
stText.append("Begin "+type+"\n");
|
||||
stText.append("Begin " + type + "\n");
|
||||
stText.append(LapsToolsIO.getLogs(type));
|
||||
stText.append("End of "+type);
|
||||
stText.append("End of " + type);
|
||||
stText.append("\n__________________________________________\n\n");
|
||||
stText.setTopIndex(stText.getLineCount());
|
||||
} catch (Exception ex) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
ex.getLocalizedMessage(), ex);
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM, ex.getLocalizedMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void populateSpinners() {
|
||||
configureSpinner(cenLatSpnr, data.getGridCenter().y,
|
||||
data.getValidArea().getMinY(), data.getValidArea().getMaxY());
|
||||
configureSpinner(cenLonSpnr, data.getGridCenter().x,
|
||||
data.getValidArea().getMinX(), data.getValidArea().getMaxX());
|
||||
configureSpinner(cenLatSpnr, data.getGridCenter().y, data
|
||||
.getValidArea().getMinY(), data.getValidArea().getMaxY());
|
||||
configureSpinner(cenLonSpnr, data.getGridCenter().x, data
|
||||
.getValidArea().getMinX(), data.getValidArea().getMaxX());
|
||||
configureSpinner(nxSpnr, data.getNx());
|
||||
configureSpinner(nySpnr, data.getNy());
|
||||
configureSpinner(dxmSpnr, data.getGridSpacing());
|
||||
|
@ -945,14 +939,16 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
|
||||
private void setDefaultDomain() {
|
||||
boolean ok = MessageDialog
|
||||
.openConfirm(getShell(), "Confirm Exit",
|
||||
.openConfirm(
|
||||
getShell(),
|
||||
"Confirm Exit",
|
||||
"This will reset all variables to values so that the LAPS domain will fully includes the CWA area.");
|
||||
if (ok) {
|
||||
try {
|
||||
LapsToolsIO.defaultDomain(data);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
e.getLocalizedMessage(), e);
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
|
||||
e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
populateSpinners();
|
||||
|
@ -967,23 +963,28 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
try {
|
||||
LapsToolsIO.readXmlFile(data);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
e.getLocalizedMessage(), e);
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
|
||||
e);
|
||||
}
|
||||
populateSpinners();
|
||||
}
|
||||
}
|
||||
|
||||
private void applyAction() {
|
||||
if(data.getLimits()) {
|
||||
System.out.print("LAPS Tools Dlg: problem with domain not covering CWA");
|
||||
if (data.getLimits()) {
|
||||
System.out
|
||||
.print("LAPS Tools Dlg: problem with domain not covering CWA");
|
||||
boolean yes = MessageDialog
|
||||
.openQuestion(getShell(), "Domain Size Error",
|
||||
"The size of the LAPS domain does not cover the entire CWA." +
|
||||
"\nWould you like to move and recenter domain?" +
|
||||
"\n\n(Answering 'No' will allow you to reedit text values, instead.)");
|
||||
if(yes){ return; }
|
||||
}
|
||||
.openQuestion(
|
||||
getShell(),
|
||||
"Domain Size Error",
|
||||
"The size of the LAPS domain does not cover the entire CWA."
|
||||
+ "\nWould you like to move and recenter domain?"
|
||||
+ "\n\n(Answering 'No' will allow you to reedit text values, instead.)");
|
||||
if (yes) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
cenLatSpnr.setEnabled(true);
|
||||
cenLonSpnr.setEnabled(true);
|
||||
nxSpnr.setEnabled(true);
|
||||
|
@ -1011,7 +1012,7 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
private void loadAction() {
|
||||
private void loadAction() {
|
||||
cenLatSpnr.setEnabled(false);
|
||||
cenLonSpnr.setEnabled(false);
|
||||
nxSpnr.setEnabled(false);
|
||||
|
@ -1023,7 +1024,7 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
defaultBtn.setEnabled(false);
|
||||
writeDomainBtn.setEnabled(false);
|
||||
readSpinners();
|
||||
|
||||
|
||||
GenericToolsResourceData<LapsToolLayer> rd = new GenericToolsResourceData<LapsToolLayer>(
|
||||
LapsToolLayer.DEFAULT_NAME, LapsToolLayer.class);
|
||||
|
||||
|
@ -1047,29 +1048,30 @@ public class LAPSToolsDlg extends CaveSWTDialog {
|
|||
desc.getResourceList().add(rsc);
|
||||
rsc.getCapability(EditableCapability.class).setEditable(true);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
e.getLocalizedMessage(), e);
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void writeXmlfileAction() {
|
||||
private void writeXmlfileAction() {
|
||||
if (MessageDialog.openQuestion(getShell(), "Confirmation",
|
||||
LapsToolsIO.getWriteXmlQuestion())) {
|
||||
try {
|
||||
LapsToolsIO.writeXmlFile(data);
|
||||
statusHandler.handle(Priority.INFO, //SIGNIFICANT
|
||||
"Write EDEX domain.xml file. This action will initiated a LAPS Localization process.");
|
||||
statusHandler
|
||||
.handle(Priority.INFO, // SIGNIFICANT
|
||||
"Write EDEX domain.xml file. This action will initiate a LAPS Localization process.");
|
||||
close();
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
e.getLocalizedMessage(), e);
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean isLapsInstalled() {
|
||||
return isLapsInstalled;
|
||||
}
|
||||
|
||||
return isLapsInstalled;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ Lakes_graphicColor = 'blue'
|
|||
# MAP BACKGROUNDS
|
||||
#MapBackgrounds_default = ['Counties','Marine_Zones_XXX','Interstates']
|
||||
MapBackgrounds_default = ['Zones_XXX','Marine_Zones_XXX','Interstates','States','Lakes']
|
||||
XXX_mask = "XXX_CWA"
|
||||
XXX_mask = "XXX"
|
||||
|
||||
DefaultSamples = ['XXXTornadoThreat']
|
||||
# Customize FONT SIZES here
|
||||
|
|
|
@ -1689,7 +1689,7 @@ Scripts = [
|
|||
"-d {productDB} ",
|
||||
|
||||
"Make and Send HTI:" +
|
||||
"xterm -e ssh px2f /awips2/GFESuite/hti/bin/make_hti.sh",
|
||||
"xterm -e ssh px2f /awips2/GFESuite/hti/bin/make_hti.sh {site}",
|
||||
|
||||
"Official Grids to LDAD: " +
|
||||
"ifpAG -h {host} -r {port} -o - -d {productDB} | gzip -9 > " +
|
||||
|
|
|
@ -213,7 +213,7 @@ class Procedure (SmartScript.SmartScript):
|
|||
elif threatWEName == "FloodingRainThreat":
|
||||
editArea = self.getEditArea("MFL")
|
||||
elif threatWEName == "TornadoThreat":
|
||||
editArea = self.getEditArea("MFL_CWA")
|
||||
editArea = self.getEditArea("MFL")
|
||||
else:
|
||||
editArea = self.getEditArea("Marinezones")
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -43,7 +43,7 @@ VariableList = [("DEFAULT: Typical. Should only be changed in coordination with
|
|||
"Higher (40% Exceedance; for well-behaved systems within 6 hours of the event)",
|
||||
"Highest (50% Exceedance; for well-behaved systems at time of the event)"]),
|
||||
("Grid Smoothing?", "Yes", "radio", ["Yes","No"]),
|
||||
("Make grids from PHISH\n or ICS?\n", "PHISH", "radio", ["PHISH", "ISC"]),
|
||||
("Make grids from PHISH\n or ISC?\n", "PHISH", "radio", ["PHISH", "ISC"]),
|
||||
]
|
||||
|
||||
class Procedure (SmartScript.SmartScript):
|
||||
|
@ -432,7 +432,7 @@ class Procedure (SmartScript.SmartScript):
|
|||
# List of elements
|
||||
# See if we should copy from ISC. If so, do the copy and exit
|
||||
smoothThreatGrid = varDict["Grid Smoothing?"]
|
||||
PHISHorISC = varDict["Make grids from PHISH\n or ICS?\n"]
|
||||
PHISHorISC = varDict["Make grids from PHISH\n or ISC?\n"]
|
||||
#PHISHorISC = "PHISH"
|
||||
topodb = "NED"
|
||||
#topodb = varDict["Topographic Database?"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Version 2014.12.17-0
|
||||
# Version 2015.2.10-1
|
||||
|
||||
import GenericHazards
|
||||
import JsonSupport
|
||||
|
@ -19,7 +19,6 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
def __init__(self):
|
||||
GenericHazards.TextProduct.__init__(self)
|
||||
self._pp = pprint.PrettyPrinter()
|
||||
|
||||
|
||||
###############################################################
|
||||
### Hazards and Additional Hazards
|
||||
|
@ -106,9 +105,9 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
error = self._getVariables(argDict)
|
||||
if error is not None:
|
||||
return error
|
||||
|
||||
self._backupFullStationID = self._fullStationID
|
||||
|
||||
self._argDict = argDict
|
||||
self._productID = self._pil[0:3].upper()
|
||||
|
||||
argDict["definition"] = self._definition
|
||||
|
||||
|
@ -123,6 +122,7 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
# Set up the areaDictionary for all to use
|
||||
accessor = ModuleAccessor.ModuleAccessor()
|
||||
self._areaDict = accessor.variable(self._areaDictionary, "AreaDictionary")
|
||||
|
||||
self._tpc = TextProductCommon()
|
||||
self._tpc.setUp(self._areaDict)
|
||||
|
||||
|
@ -168,7 +168,7 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
def _wmoHeader(self, productDict, productSegmentGroup, arguments=None):
|
||||
headerDict = collections.OrderedDict()
|
||||
headerDict['TTAAii'] = self._wmoID
|
||||
headerDict['originatingOffice'] = self._backupFullStationID # Will be siteID if not in backup mode
|
||||
headerDict['originatingOffice'] = self._fullStationID
|
||||
headerDict['productID'] = self._productID
|
||||
headerDict['siteID'] = self._site
|
||||
headerDict['fullStationID'] = self._fullStationID
|
||||
|
@ -180,6 +180,7 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
headerDict['disclaimer'] = 'This XML wrapped text product should be considered COMPLETELY EXPERIMENTAL. The National Weather Service currently makes NO GUARANTEE WHATSOEVER that this product will continue to be supplied without interruption. The format of this product MAY CHANGE AT ANY TIME without notice.'
|
||||
headerDict['cityState'] = self._wfoCityState
|
||||
headerDict['stormNumber'] = self._getStormNumberStringFromTCP()
|
||||
# Modify the product name to indicate test or experimental mode if necessary
|
||||
self._productName = self.checkTestMode(
|
||||
self._argDict, productSegmentGroup.get('productName') + self._areaName)
|
||||
headerDict['productName'] = self._productName
|
||||
|
@ -194,13 +195,14 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
################# Mixed Level
|
||||
|
||||
def _ugcHeader(self, productDict, productSegmentGroup, productSegment):
|
||||
productDict['ugcCodes'] = self._formatUGC_entries()
|
||||
self._ugcHeader_value = self._tpc.formatUGCs(self._ugcs, self._expireTime)
|
||||
productDict['ugcHeader'] = self._ugcHeader_value
|
||||
# The UGC header is the formatted list of UGCs along with an expire time
|
||||
# For example: 'FLZ066>068-071-072-063-069-073>075-168-172>174-070-230515-'
|
||||
ugcHeader = self._tpc.formatUGCs(self._ugcs, self._expireTime)
|
||||
productDict['ugcHeader'] = ugcHeader
|
||||
|
||||
################# Product Parts Processing
|
||||
|
||||
def _processProductParts(self, productGenerator, productDict, productSegmentGroup, productParts):
|
||||
def _processProductParts(self, productGenerator, productDict, productSegmentGroup, productParts):
|
||||
'''
|
||||
@param productDict
|
||||
@param productSegmentGroup
|
||||
|
@ -249,46 +251,18 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
"Removing product part = %s" % (part), 1)
|
||||
partsList.remove(part)
|
||||
|
||||
################# Product Parts Helper Methods
|
||||
|
||||
def _formatUGC_entries(self):
|
||||
ugcCodeList = []
|
||||
for ugc in self._ugcs:
|
||||
areaDictEntry = self._areaDict.get(ugc)
|
||||
if areaDictEntry is None:
|
||||
# We are not localized correctly for the hazard
|
||||
# So get the first dictionary entry
|
||||
self.logger.info('Not Localized for the hazard area -- ugc' + ugc)
|
||||
keys = self._areaDict.keys()
|
||||
areaDictEntry = self._areaDict.get(keys[0])
|
||||
ugcEntry = collections.OrderedDict()
|
||||
ugcEntry['state'] = areaDictEntry.get('stateAbbr')
|
||||
ugcEntry['type'] = self._getUgcInfo(ugc, 'type')
|
||||
ugcEntry['number'] = self._getUgcInfo(ugc, 'number')
|
||||
ugcEntry['text'] = ugc
|
||||
ugcEntry['subArea'] = ''
|
||||
ugcCodeList.append(ugcEntry)
|
||||
return ugcCodeList
|
||||
|
||||
def _getUgcInfo(self, ugc, part='type'):
|
||||
if part == 'type':
|
||||
if ugc[2] == 'C':
|
||||
return 'County'
|
||||
else:
|
||||
return 'Zone'
|
||||
if part == 'number':
|
||||
return ugc[3:]
|
||||
|
||||
###############################################################
|
||||
### Product Dictionary methods for creating, populating and
|
||||
### formatting the product dictionary
|
||||
|
||||
def _createProductDictionary(self, segmentList):
|
||||
def _createProductDictionary(self, productPartsGenerator, segments, areProductPartsSegmented):
|
||||
# Create the product dictionary
|
||||
productSegmentGroup = self._groupSegments(segmentList)
|
||||
productSegmentGroup = self._groupSegments(productPartsGenerator,
|
||||
segments,
|
||||
areProductPartsSegmented)
|
||||
|
||||
productDict = self._initializeProductDictionary(productSegmentGroup)
|
||||
productParts = productSegmentGroup.get('productParts')
|
||||
productParts = productSegmentGroup.get('productParts')
|
||||
productDict['productParts'] = productParts
|
||||
self._processProductParts(self, productDict, productSegmentGroup, productParts)
|
||||
|
||||
|
@ -323,13 +297,9 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
WGUS63 KBOU 080400
|
||||
FFWBOU
|
||||
|
||||
'''
|
||||
self._productID = productSegmentGroup.get('productID', 'NNN')
|
||||
'''
|
||||
if self._areaName != '':
|
||||
self._areaName = ' FOR ' + self._areaName + '\n'
|
||||
self._geoType = productSegmentGroup.get('geoType')
|
||||
self._mapType = productSegmentGroup.get('mapType')
|
||||
self._productTimeZones = []
|
||||
|
||||
# Fill in product dictionary information
|
||||
productDict = collections.OrderedDict()
|
||||
|
@ -346,14 +316,26 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
### Sampling and Statistics related methods
|
||||
|
||||
def _getStatValue(self, statDict, element, method=None, dataType=None):
|
||||
|
||||
self.debug_print("*"*90, 1)
|
||||
self.debug_print("In _getStatValue looking for '%s'" % (element), 1)
|
||||
self.debug_print("statDict =\n%s" % (pprint.pformat(statDict)), 1)
|
||||
|
||||
stats = statDict.get(element, None)
|
||||
self.debug_print("stats =\n%s" % (pprint.pformat(stats)), 1)
|
||||
|
||||
if stats is None: return None
|
||||
if type(stats) is types.ListType:
|
||||
stats = stats[0]
|
||||
stats, tr = stats
|
||||
if dataType==self.VECTOR():
|
||||
stats, dir = stats
|
||||
|
||||
return self.getValue(stats, method)
|
||||
|
||||
# Define a class to handle missing statistics
|
||||
class StatisticsException(Exception):
|
||||
pass
|
||||
|
||||
###############################################################
|
||||
### Area, Zone and Segment related methods
|
||||
|
@ -361,18 +343,47 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
def _allAreas(self):
|
||||
return self._inlandAreas() + self._coastalAreas()
|
||||
|
||||
def _groupSegments(self, productPartsGenerator, segments, areProductPartsSegmented):
|
||||
'''
|
||||
Group the segments into the products. The TCV and HLS product generators
|
||||
only create a single product each so there is only one product segment group.
|
||||
'''
|
||||
|
||||
segment_vtecRecords_tuples = self._getSegmentVTECRecordsTuples(segments)
|
||||
|
||||
productSegmentGroup = {
|
||||
'productID' : self._productID,
|
||||
'productName': self._productName,
|
||||
'geoType': 'area',
|
||||
'vtecEngine': self._hazardsTable,
|
||||
'mapType': 'publicZones',
|
||||
'segmented': areProductPartsSegmented,
|
||||
'productParts': productPartsGenerator(segment_vtecRecords_tuples),
|
||||
}
|
||||
|
||||
return productSegmentGroup
|
||||
|
||||
def _getSegmentVTECRecordsTuples(self, segments):
|
||||
segment_vtecRecords_tuples = []
|
||||
for segment in segments:
|
||||
vtecRecords = self._getVtecRecords(segment)
|
||||
self.debug_print("vtecRecords for %s =\n\n%s\n" % (segment, self._pp.pformat(vtecRecords)))
|
||||
segment_vtecRecords_tuples.append((segment, vtecRecords))
|
||||
|
||||
return segment_vtecRecords_tuples
|
||||
|
||||
def _computeIntersectAreas(self, editAreas, argDict):
|
||||
editAreaUtils = EditAreaUtils.EditAreaUtils()
|
||||
editAreaUtils.setUp(None, argDict)
|
||||
surgeEditArea = editAreaUtils.getEditArea("StormSurgeWW_EditArea", argDict)
|
||||
intersectAreas =[]
|
||||
intersectAreas = []
|
||||
for (_, editAreaLabel) in editAreas:
|
||||
editArea = editAreaUtils.getEditArea(editAreaLabel, argDict)
|
||||
intersectAreaLabel = "intersect_"+editAreaLabel
|
||||
intersectArea = editAreaUtils.intersectAreas(intersectAreaLabel, editArea, surgeEditArea)
|
||||
grid = intersectArea.getGrid()
|
||||
if grid.isAnyBitsSet():
|
||||
editAreaUtils.saveEditAreas([intersectArea])
|
||||
if grid.isAnyBitsSet(): # Make sure the intersection isn't empty
|
||||
editAreaUtils.saveEditAreas([intersectArea]) # Register the new edit area with the system
|
||||
intersectAreas.append((intersectAreaLabel, intersectAreaLabel))
|
||||
|
||||
return intersectAreas
|
||||
|
@ -382,8 +393,7 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
|
||||
def _initializeHazardsTable(self, argDict):
|
||||
import VTECMessageType
|
||||
productID = self._pil[0:3]
|
||||
vtecMode = VTECMessageType.getVTECMessageType(productID.upper())
|
||||
vtecMode = VTECMessageType.getVTECMessageType(self._productID)
|
||||
argDict["vtecMode"] = vtecMode
|
||||
|
||||
self._setVTECActiveTable(argDict)
|
||||
|
@ -394,10 +404,8 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
self._hazardsTable = self._getHazardsTable(argDict, self.filterMethod)
|
||||
argDict["hazards"] = self._hazardsTable
|
||||
|
||||
def _getHazardsTable(self, argDict, filterMethod, editAreas=None):
|
||||
def _getHazardsTable(self, argDict, filterMethod):
|
||||
# Set up edit areas as list of lists
|
||||
# Need to check hazards against all edit areas in the CWA MAOR
|
||||
argDict["combinations"]= [(self._allAreas(),"Region1")]
|
||||
dfEditAreas = argDict["combinations"]
|
||||
editAreas = []
|
||||
for area, label in dfEditAreas:
|
||||
|
@ -408,21 +416,19 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
else:
|
||||
editAreas.append([area])
|
||||
# Get Product ID and other info for HazardsTable
|
||||
pil = self._pil.upper() # Ensure PIL is in UPPERCASE
|
||||
stationID4 = self._fullStationID
|
||||
productCategory = pil[0:3] #part of the pil
|
||||
productCategory = self._productID
|
||||
definition = argDict['definition']
|
||||
sampleThreshold = definition.get("hazardSamplingThreshold", (10, None))
|
||||
# Process the hazards
|
||||
accurateCities = definition.get('accurateCities', 0)
|
||||
cityRefData = []
|
||||
import HazardsTable
|
||||
hazards = HazardsTable.HazardsTable(
|
||||
argDict["ifpClient"], editAreas, productCategory, filterMethod,
|
||||
argDict["databaseID"],
|
||||
stationID4, argDict["vtecActiveTable"], argDict["vtecMode"], sampleThreshold,
|
||||
creationTime=argDict["creationTime"], accurateCities=accurateCities,
|
||||
cityEditAreas=cityRefData, dataMgr=argDict['dataMgr'])
|
||||
cityEditAreas=[], dataMgr=argDict['dataMgr'])
|
||||
return hazards
|
||||
|
||||
def _ignoreActions(self):
|
||||
|
@ -443,11 +449,20 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
else:
|
||||
argDict["vtecActiveTable"] = "active"
|
||||
|
||||
def _getVtecRecords(self, segment, vtecEngine=None):
|
||||
def _getVtecRecords(self, segment):
|
||||
vtecRecords = self._hazardsTable.getHazardList(segment)
|
||||
# Tropical hazards shouldn't ever have EXT and EXB actions since
|
||||
# they are "until further notice"
|
||||
for record in vtecRecords:
|
||||
if record['act'] == "EXT":
|
||||
record['act'] = "CON"
|
||||
elif record['act'] == "EXB":
|
||||
record['act'] = "EXA"
|
||||
|
||||
return vtecRecords
|
||||
|
||||
def _getAllowedHazardList(self, allowedHazardList=None):
|
||||
# Get the list of allowed phenSigs (ie. "HU.W")
|
||||
if allowedHazardList is None:
|
||||
allowedHazardList = self.allowedHazards()
|
||||
hazardList = []
|
||||
|
@ -588,8 +603,8 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
|
||||
self._ddhhmmTime = self.getCurrentTime(
|
||||
argDict, "%d%H%M", shiftToLocal=0, stripLeading=0)
|
||||
self._currentTime = self._issueTime_secs
|
||||
self._expireTime = self._issueTime_secs + self._purgeTime*3600
|
||||
self._purgeHours = self._purgeTime
|
||||
self._expireTime = self._issueTime_secs + self._purgeHours*3600
|
||||
self._timeLabel = self.getCurrentTime(
|
||||
argDict, "%l%M %p %Z %a %b %e %Y", stripLeading=1)
|
||||
|
||||
|
@ -600,14 +615,13 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
startTime = self._calculateStartTime(time.gmtime(self._issueTime_secs))
|
||||
self._timeRange = self.makeTimeRange(startTime, startTime+120*3600)
|
||||
|
||||
# Create a time range to look from the current time back 12 hours
|
||||
# We will use this are to determine if we need to use "additional"
|
||||
# wording with rainfall
|
||||
# Create a time range to look from the current time back 12 hours.
|
||||
# We will use this to determine if we need to use "additional"
|
||||
# wording with rainfall for the TCV
|
||||
self._extraSampleTimeRange = self.makeTimeRange(startTime-12*3600,
|
||||
startTime)
|
||||
|
||||
# Determine the time range list, making sure they are on hour boundaries
|
||||
# w.r.t. midnight today according to the resolution
|
||||
# Determine the time range list according to the resolution
|
||||
subRanges = self.divideRange(self._timeRange, self._resolution())
|
||||
trList = []
|
||||
self._periodList = []
|
||||
|
@ -617,6 +631,7 @@ class TextProduct(GenericHazards.TextProduct):
|
|||
trList.append((tr, "Label"))
|
||||
|
||||
if index == 0:
|
||||
# Create the 10 periods
|
||||
startTime = tr.startTime()
|
||||
localtime = time.localtime(startTime.unixTime())
|
||||
|
||||
|
@ -1027,8 +1042,9 @@ FORECASTER STEWART"""
|
|||
self._loadLastTwoAdvisories()
|
||||
|
||||
def _synchronizeAdvisories(self):
|
||||
|
||||
# Retrieving a directory causes synching to occur
|
||||
# Retrieving a directory causes synching to occur.
|
||||
# This code can throw an exception but don't catch it
|
||||
# so that forecasters can be made aware of the issue.
|
||||
file = LocalizationSupport.getLocalizationFile(LocalizationSupport.CAVE_STATIC,
|
||||
LocalizationSupport.SITE, self._site,
|
||||
self._getAdvisoryPath()).getFile()
|
||||
|
@ -1091,7 +1107,7 @@ FORECASTER STEWART"""
|
|||
self._previousPreviousAdvisory = None
|
||||
if len(lastTwoAdvisories) >= 2:
|
||||
self._previousPreviousAdvisory = self._loadAdvisory(lastTwoAdvisories[1])
|
||||
|
||||
|
||||
def _loadAdvisory(self, advisoryName):
|
||||
self._synchronizeAdvisories()
|
||||
fileName = self._getAdvisoryFilename(advisoryName)
|
||||
|
@ -1370,10 +1386,10 @@ class TextProductCommon(DiscretePhrases.DiscretePhrases):
|
|||
if laterActive is not None:
|
||||
expireTime = min(expireTime, laterActive)
|
||||
elif canExpFound and not activeFound:
|
||||
expireTime = min(expireTime, issueTime+3600) #1hr from now
|
||||
expireTime = min(expireTime, issueTime+3600*1000) #1hr from now
|
||||
|
||||
#ensure expireTime is not before issueTime, and is at least 1 hour
|
||||
if expireTime - issueTime < 3600:
|
||||
if expireTime - issueTime < 3600*1000:
|
||||
expireTime = issueTime + 3600*1000
|
||||
|
||||
#round to next 'roundMinutes'
|
||||
|
@ -1449,7 +1465,9 @@ class TextProductCommon(DiscretePhrases.DiscretePhrases):
|
|||
def formatUGCs(self, ugcs, expireTime):
|
||||
'''
|
||||
Create ugc header with expire time
|
||||
'COC123-112330-'
|
||||
Examples:
|
||||
'COC123-112330-'
|
||||
'FLZ066>068-071-072-063-069-073>075-168-172>174-070-230515-'
|
||||
'''
|
||||
ugcStr = self.makeUGCString(ugcs)
|
||||
ddhhmmTime = self.getFormattedTime(
|
||||
|
@ -1546,6 +1564,10 @@ class TextProductCommon(DiscretePhrases.DiscretePhrases):
|
|||
def makeUGCString(self, ugcs):
|
||||
'''
|
||||
Create the UGC string for product / segment headers.
|
||||
|
||||
Examples:
|
||||
FLZ173-
|
||||
FLZ066>068-071-072-063-069-073>075-168-172>174-070-
|
||||
'''
|
||||
# if nothing in the list, return empty string
|
||||
if len(ugcs) == 0:
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
# __warnETNduplication() and
|
||||
# __highestETNActiveTable.
|
||||
# 11/11/14 4953 randerso Changed type of endTime from float to int
|
||||
# 02/05/15 4099 randerso Fixed exception handling in __getActiveTable
|
||||
#
|
||||
|
||||
|
||||
|
@ -933,7 +934,7 @@ class HazardsTable(VTECTableUtil.VTECTableUtil):
|
|||
|
||||
except:
|
||||
self.log.exception("Unable to access VTEC Active Table: ")
|
||||
raise Exception, s
|
||||
raise
|
||||
|
||||
def __createCityHazards(self):
|
||||
if not self.__accurateCities:
|
||||
|
|
|
@ -675,10 +675,11 @@ class TextUtils:
|
|||
def getPreviousProduct(self, productID, searchString="", version=0):
|
||||
# gets a previous product from the AWIPS database
|
||||
|
||||
from com.raytheon.viz.gfe.core import DataManagerUIFactory
|
||||
from com.raytheon.viz.gfe.product import TextDBUtil
|
||||
|
||||
# DR 15703 - always retrieve operational products
|
||||
opMode = True
|
||||
# Redmine #17120 - return to pre-DR 15703 behavior.
|
||||
opMode = DataManagerUIFactory.getCurrentInstance().getOpMode().name() == "OPERATIONAL"
|
||||
previousProduct = TextDBUtil.retrieveProduct(productID, version, opMode)
|
||||
previousProduct = string.strip(previousProduct)
|
||||
|
||||
|
|
|
@ -0,0 +1,225 @@
|
|||
# ----------------------------------------------------------------------------
|
||||
# This software is in the public domain, furnished "as is", without technical
|
||||
# support, and with no warranty, express or implied, as to its usefulness for
|
||||
# any purpose.
|
||||
#
|
||||
# DefineMaxWindGUI
|
||||
#
|
||||
# Author:
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
try: # See if this is the AWIPS I environment
|
||||
from Numeric import *
|
||||
import AFPS
|
||||
AWIPS_ENVIRON = "AWIPS1"
|
||||
except: # Must be the AWIPS II environment
|
||||
from numpy import *
|
||||
import AbsTime
|
||||
import TimeRange
|
||||
AWIPS_ENVIRON = "AWIPS2"
|
||||
|
||||
import SmartScript
|
||||
import Tkinter
|
||||
import tkFont
|
||||
|
||||
|
||||
class DefineMaxWindGUI(SmartScript.SmartScript):
|
||||
|
||||
def __init__(self, dbss, eaMgr=None):
|
||||
SmartScript.SmartScript.__init__(self, dbss)
|
||||
|
||||
if AWIPS_ENVIRON == "AWIPS1":
|
||||
self.setUp(eaMgr)
|
||||
|
||||
def reportQuadError(self):
|
||||
self.statusBarMsg("Only three quadants at a time may be reduced.\n" + \
|
||||
"...Please toggle another quadrant off first.","S")
|
||||
return
|
||||
|
||||
def toggleButton(self, buttonLabel):
|
||||
b = self._buttonLabels.index(buttonLabel)
|
||||
if self._buttonState[b]: # button was on
|
||||
self._buttonState[b] = False
|
||||
self._buttonList[b].configure(background="gray", activebackground="gray")
|
||||
else: # button was off
|
||||
if sum(self._buttonState) > 2: # only three at a time allowed
|
||||
self.reportQuadError()
|
||||
return
|
||||
self._buttonState[b] = True
|
||||
self._buttonList[b].configure(background="green", activebackground="green")
|
||||
|
||||
|
||||
def NEClick(self):
|
||||
self.toggleButton("NE")
|
||||
return
|
||||
|
||||
def SEClick(self):
|
||||
self.toggleButton("SE")
|
||||
return
|
||||
|
||||
def SWClick(self):
|
||||
self.toggleButton("SW")
|
||||
return
|
||||
|
||||
def NWClick(self):
|
||||
self.toggleButton("NW")
|
||||
return
|
||||
|
||||
def makeLabel(self, frame):
|
||||
|
||||
label = Tkinter.Label(frame, fg="red", font=self._boldFont,
|
||||
text="Max winds will be reduced by\n 20% in selected quadrants")
|
||||
label.grid(row=0)
|
||||
|
||||
return
|
||||
|
||||
def makeBottomButtons(self, frame):
|
||||
# Create the Execute/Cancel buttons
|
||||
self._doneButton = Tkinter.Button(frame, text="Done",
|
||||
command=self.doneCommand)
|
||||
self._doneButton.grid(row=3, column=0, padx=20, pady=5, sticky=Tkinter.W)
|
||||
|
||||
self._cancelButton = Tkinter.Button(frame, text="Cancel",
|
||||
command=self.cancelCommand)
|
||||
self._cancelButton.grid(row=3, column=2, padx=20, pady=5, sticky=Tkinter.E)
|
||||
|
||||
frame.grid(columnspan=3, sticky=Tkinter.EW)
|
||||
|
||||
return
|
||||
|
||||
def makeQuadButtons(self, frame):
|
||||
# Create the quadrant buttons
|
||||
commandList = [self.NWClick, self.SWClick, self.SEClick, self.NEClick]
|
||||
self._buttonLabels = ["NW", "SW", "SE", "NE"]
|
||||
|
||||
# define the button position in geometric order
|
||||
buttonPos = [(0, 0), (1, 0), (1, 1), (0, 1)]
|
||||
for b in range(len(self._buttonLabels)):
|
||||
label = self._buttonLabels[b]
|
||||
|
||||
self._buttonList[b] = Tkinter.Button(frame, text=label,
|
||||
command=commandList[b],
|
||||
font=self._bigFont, width=3)
|
||||
rowPos, colPos = buttonPos[b]
|
||||
self._buttonList[b].grid(row=rowPos, column=colPos, padx=30, pady=10)
|
||||
|
||||
return
|
||||
|
||||
def setUpUI(self):
|
||||
|
||||
self._labelFrame = Tkinter.Frame(self._master)
|
||||
|
||||
self._labelFrame.grid(row=0)
|
||||
|
||||
|
||||
self._buttonFrame = Tkinter.Frame(self._master, borderwidth=3,
|
||||
relief=Tkinter.RIDGE, bd=2, pady=5)
|
||||
self._buttonFrame.grid(row=1, column=0,padx=25,
|
||||
sticky=Tkinter.E+Tkinter.W, pady=5)
|
||||
|
||||
|
||||
self._bottomFrame = Tkinter.Frame(self._master, borderwidth=3,
|
||||
relief=Tkinter.RIDGE, bd=2)
|
||||
self._bottomFrame.grid(row=2, column=0, columnspan=2, padx=25)
|
||||
|
||||
self._master.title("Reduce Max Wind by Quadrant")
|
||||
|
||||
self.makeLabel(self._labelFrame)
|
||||
|
||||
self.makeQuadButtons(self._buttonFrame)
|
||||
|
||||
self.makeBottomButtons(self._bottomFrame)
|
||||
|
||||
return
|
||||
|
||||
def doneCommand(self):
|
||||
self._master.quit()
|
||||
|
||||
quadCount = 4
|
||||
reducePct = 0.80
|
||||
|
||||
# Gather up the maxWind info to return to the main tool
|
||||
self._maxWindDict = {}
|
||||
for h in range(len(self._hourList)):
|
||||
windList = []
|
||||
for quad in range(quadCount):
|
||||
|
||||
# Reduce the value if that quadrant was selected
|
||||
if self._buttonState[quad]:
|
||||
windValue = self._maxWind[quad][h] * self._allTimeMaxWind * reducePct
|
||||
else:
|
||||
windValue = self._maxWind[quad][h] * self._allTimeMaxWind
|
||||
|
||||
windList.append(windValue)
|
||||
|
||||
windList.reverse()
|
||||
self._maxWindDict[self._hourList[h]] = windList
|
||||
|
||||
return
|
||||
|
||||
def cancelCommand(self):
|
||||
self._master.destroy()
|
||||
|
||||
return None
|
||||
|
||||
def displayGUI(self, windDict):
|
||||
|
||||
self._windDict = windDict
|
||||
self._maxWindDict = None
|
||||
self._quadCount = 4
|
||||
|
||||
hourKeys = self._windDict.keys()
|
||||
hourKeys.sort()
|
||||
self._hourList = hourKeys
|
||||
self._initialMinWind = []
|
||||
self._initialMaxWind = []
|
||||
for hour in hourKeys:
|
||||
minWind, maxWind = windDict[hour]
|
||||
self._initialMinWind.append(minWind)
|
||||
self._initialMaxWind.append(maxWind)
|
||||
|
||||
self._hourCount = len(hourKeys)
|
||||
|
||||
if AWIPS_ENVIRON == "AWIPS1":
|
||||
self._allTimeMaxWind = max(self._initialMaxWind)
|
||||
else: # numpy uses "amax"
|
||||
self._allTimeMaxWind = amax(self._initialMaxWind)
|
||||
|
||||
|
||||
|
||||
# Make the topLevel window - different for A1 and A2
|
||||
if AWIPS_ENVIRON == 'AWIPS1':
|
||||
self._master = Tkinter.Toplevel(self.eaMgr().root())
|
||||
self._master.transient(self.eaMgr().root()) # always draw on top of GFE
|
||||
else:
|
||||
self._tkmaster = Tkinter.Tk()
|
||||
self._master = Tkinter.Toplevel(self._tkmaster)
|
||||
self._tkmaster.withdraw()
|
||||
|
||||
self._buttonLabels = ["NW", "SW", "SE", "NE"]
|
||||
|
||||
self._buttonState = [False, False, False, False]
|
||||
self._buttonList = [None, None, None, None]
|
||||
|
||||
self._boldFont = tkFont.Font(family="Helvetica", size=12, weight="bold")
|
||||
self._bigFont = tkFont.Font(family="Helvetica", size=16)
|
||||
|
||||
self.setUpUI()
|
||||
|
||||
self._maxWind = zeros((self._quadCount, self._hourCount)) * 1.0
|
||||
|
||||
for hour in range(len(hourKeys)):
|
||||
for quad in range(self._quadCount):
|
||||
minWind, maxWind = self._windDict[hourKeys[hour]]
|
||||
self._maxWind[quad][hour] = maxWind / self._allTimeMaxWind
|
||||
|
||||
|
||||
#self.updateDisplay() # Draws everything
|
||||
|
||||
|
||||
self._master.mainloop()
|
||||
|
||||
self._master.withdraw()
|
||||
self._master.destroy()
|
||||
|
||||
return self._maxWindDict
|
|
@ -5,6 +5,7 @@
|
|||
# TCV_Dictionary
|
||||
# TCV_Dictionary file
|
||||
# Author: GFE Installation Script
|
||||
# Last Modified: Feb 13, 2015
|
||||
# ----------------------------------------------------------------------------
|
||||
# Needed to prevent an error from the SmartTool module
|
||||
WeatherElementEdited = None
|
||||
|
@ -13,83 +14,83 @@ ThreatStatements = {
|
|||
"Wind": {
|
||||
"Extreme": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3, 4, or 5 intensity.",
|
||||
"planning": "Emergency planning should include a reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3 intensity or higher.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic wind impacts. Efforts should now be underway to secure all properties.",
|
||||
"action": "Life threatening wind is possible. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering.",
|
||||
"action": "Extremely Dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Adjustments to emergency plans should include a reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3, 4, or 5 intensity.",
|
||||
"planning": "Emergency plans should include a reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3 intensity or higher.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic wind impacts. Remaining efforts to secure properties should now be brought to completion.",
|
||||
"action": "Life threatening wind is possible. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering. Move to safe shelter before the wind becomes hazardous.",
|
||||
"action": "Extremely dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering. Move to safe shelter before the wind becomes hazardous.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Brace against the reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3, 4, or 5 intensity. Maintain readiness for emergency response.",
|
||||
"preparation": "To be safe, last minute efforts should fully focus on protecting life. Efforts to secure properties against devastating to catastrophic wind impacts should now be complete.",
|
||||
"action": "Life threatening wind is imminent or ongoing. Now is the time to urgently hide from the wind. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering. Remain sheltered until the hazardous wind subsides. Be ready to quickly move to the safest place within your shelter if extreme wind warnings are issued.",
|
||||
"planning": "Remain braced against the reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3 intensity or higher.",
|
||||
"preparation": "To be safe, efforts should fully focus on protecting life. Properties remain subject to devastating to catastrophic wind impacts.",
|
||||
"action": "Now is the time to urgently hide from the wind. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering. Remain sheltered until the hazardous wind subsides. Be ready to quickly move to the safest place within your shelter if extreme wind warnings are issued.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat of hazardous wind has subsided.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injuries or loss of life.",
|
||||
"planning": "The threat for hazardous wind has subsided.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injury or loss of life. If you have a life-threatening emergency dial 9 1 1.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for major hurricane force wind greater than 110 MPH of equivalent Category 3 or higher.",
|
||||
"preparation": "Be safe and aggressively protect against the potential of devastating to catastrophic wind impacts.",
|
||||
"action": "Extremely dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury, loss of life, or immense human suffering.",
|
||||
},
|
||||
},
|
||||
"High": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for hurricane force wind of 74 to 110 MPH of equivalent Category 1 or 2 intensity.",
|
||||
"planning": "Emergency planning should include a reasonable threat for hurricane force wind of 74 to 110 MPH of equivalent Category 1 to 2 intensity.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive wind impacts. Efforts should now be underway to secure all properties.",
|
||||
"action": "Life threatening wind is possible. Failure to adequately shelter may result in serious injury or loss of life.",
|
||||
"action": "Dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury or loss of life.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Adjustments to emergency plans should include a reasonable threat for hurricane force wind of 74 to 110 MPH of equivalent Category 1 or 2 intensity.",
|
||||
"planning": "Emergency plans should include a reasonable threat for hurricane force wind of 74 to 110 MPH of equivalent Category 1 to 2 intensity.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive wind impacts. Remaining efforts to secure properties should now be brought to completion.",
|
||||
"action": "Life threatening wind is possible. Failure to adequately shelter may result in serious injury or loss of life. Move to safe shelter before the wind becomes hazardous.",
|
||||
"action": "Dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury or loss of life. Move to safe shelter before the wind becomes hazardous.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Brace against the reasonable threat for hurricane force wind of 74 to 110 MPH of equivalent Category 1 or 2 intensity.",
|
||||
"preparation": "To be safe, last minute efforts should fully focus on protecting life. Efforts to secure properties against extensive wind impacts should now be complete.",
|
||||
"action": "Life threatening wind is imminent or ongoing. Now is the time to urgently hide from the wind. Failure to adequately shelter may result in serious injury or loss of life. Remain sheltered until the hazardous wind subsides.",
|
||||
"planning": "Remain braced against the reasonable threat for hurricane force wind of 74 to 110 MPH of equivalent Category 1 to 2 intensity.",
|
||||
"preparation": "To be safe, efforts should fully focus on protecting life. Properties remain subject to extensive wind impacts.",
|
||||
"action": "Now is the time to urgently hide from the wind. Failure to adequately shelter may result in serious injury or loss of life. Remain sheltered until the hazardous wind subsides.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat for hazardous wind has subsided.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injuries or loss of life.",
|
||||
"planning": "The threat for hazardous wind has subsided.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injury or loss of life. If you have a life-threatening emergency dial 9 1 1." ,
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for hurricane force wind of 74 to 110 MPH of equivalent Category 1 to 2 intensity.",
|
||||
"preparation": "Be safe and aggressively protect against for the potential of extensive wind impacts.",
|
||||
"action": "Dangerous and life threatening wind is possible. Failure to adequately shelter may result in serious injury or loss of life.",
|
||||
},
|
||||
},
|
||||
"Mod": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for strong tropical storm force wind of 58 to 73 MPH.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant wind impacts. Efforts should now be underway to secure all properties.",
|
||||
"action": "Failure to adequately shelter may result in serious injury, or in some cases loss of life.",
|
||||
"action": "Dangerous wind is possible. Failure to adequately shelter may result in serious injury, or in some cases loss of life.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Adjustments to emergency plans should include a reasonable threat for strong tropical storm force wind of 58 to 73 MPH.",
|
||||
"planning": "Emergency plans should include a reasonable threat for strong tropical storm force wind of 58 to 73 MPH.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant wind impacts. Remaining efforts to secure properties should now be brought to completion.",
|
||||
"action": "Dangerous wind is possible. Failure to adequately shelter may result in serious injury, or in some cases loss of life. Move to safe shelter before the wind becomes hazardous.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Brace against the reasonable threat for strong tropical storm force wind of 58 to 73 MPH.",
|
||||
"preparation": "To be safe, last minute efforts should fully focus on protecting life. Efforts to secure properties against significant wind impacts should now be complete.",
|
||||
"action": "Dangerous wind is imminent or ongoing. Now is the time to hide from the wind. Failure to adequately shelter may result in serious injury, or in some cases loss of life. Remain sheltered until the hazardous wind subsides.",
|
||||
"planning": "Remain braced against the reasonable threat for strong tropical storm force wind of 58 to 73 MPH.",
|
||||
"preparation": "To be safe, efforts should fully focus on protecting life. Properties remain subject to significant wind impacts.",
|
||||
"action": "Now is the time to hide from the wind. Failure to adequately shelter may result in serious injury, or in some cases loss of life. Remain sheltered until the hazardous wind subsides.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat for hazardous wind has subsided.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injuries, or in some cases loss of life.",
|
||||
"planning": "The threat for hazardous wind has subsided.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injury, or in some cases loss of life. If you have a life-threatening emergency dial 9 1 1.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for strong tropical storm force wind of 58 to 73 MPH.",
|
||||
"preparation": "Be safe and earnestly protect against the potential of significant wind impacts.",
|
||||
"action": "Dangerous wind is possible. Failure to adequately shelter may result in serious injury, or in some cases loss of life.",
|
||||
},
|
||||
},
|
||||
"Elevated": {
|
||||
|
@ -99,49 +100,49 @@ ThreatStatements = {
|
|||
"action": "Hazardous wind is possible. Failure to adequately shelter may result in serious injury.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Adjustments to emergency plans should include a reasonable threat for tropical storm force wind of 39 to 57 MPH.",
|
||||
"planning": "Emergency plans should include a reasonable threat for tropical storm force wind of 39 to 57 MPH.",
|
||||
"preparation": "To be safe, prepare for the potential of limited wind impacts. Remaining efforts to secure properties should now be brought to completion.",
|
||||
"action": "Hazardous wind is possible. Failure to adequately shelter may result in serious injury. Move to safe shelter before the wind becomes hazardous.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Brace against the reasonable threat for tropical storm force wind of 39 to 57 MPH. Maintain a readiness for emergency response.",
|
||||
"preparation": "To be safe, last minute efforts should fully focus on avoiding injury. Efforts to secure properties against limited wind impacts should now be complete.",
|
||||
"action": "Hazardous wind is imminent or ongoing. Now is the time to hide from the wind. Failure to adequately shelter may result in serious injury. Remain sheltered until the hazardous wind subsides.",
|
||||
"planning": "Remain braced against the reasonable threat for tropical storm force wind of 39 to 57 MPH.",
|
||||
"preparation": "To be safe, efforts should fully focus on avoiding injury. Properties remain subject to limited wind impacts.",
|
||||
"action": "Now is the time to hide from the wind. Failure to adequately shelter may result in serious injury. Remain sheltered until the hazardous wind subsides.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat for hazardous wind has subsided.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injuries.",
|
||||
"planning": "The threat for hazardous wind has subsided.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Stay out of restricted areas.",
|
||||
"action": "Failure to exercise due safety may result in additional injury. If you have a life-threatening emergency dial 9 1 1.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for tropical storm force wind of 39 to 57 MPH.",
|
||||
"preparation": "Be safe and protect against the potential of limited wind impacts.",
|
||||
"action": "Hazardous wind is possible. Failure to adequately shelter may result in serious injury.",
|
||||
},
|
||||
},
|
||||
"None": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning for this event need not include a threat for tropical storm force wind. The wind will remain less than 39 MPH, but conditions may still be breezy to windy.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical wind.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical wind event.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical winds at this time.",
|
||||
"action": "Ensure readiness for the next tropical wind event.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning for this event need not include a threat for tropical storm force wind. The wind will remain less than 39 MPH, but conditions may still be breezy to windy.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical wind.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical wind event.",
|
||||
"planning": "Emergency plans for this event need not include a threat for tropical storm force wind. The wind will remain less than 39 MPH, but conditions may still be breezy to windy.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical winds at this time.",
|
||||
"action": "Ensure readiness for the next tropical wind event.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "The wind will remain less than 39 MPH, but conditions may still be breezy to windy.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical wind.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical wind event.",
|
||||
"planning": "Emergency considerations need not include a threat for tropical storm force wind. The wind will remain less than 39 MPH, but conditions may still be breezy to windy.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical winds at this time.",
|
||||
"action": "Ensure readiness for the next tropical wind event.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Conditions may be still breezy to windy.",
|
||||
"planning": "Conditions may still be breezy to windy.",
|
||||
"preparation": "Exercise due safety when moving about.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical wind event.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "Conditions may be breezy to windy.",
|
||||
"default": {
|
||||
"planning": "Conditions may still be breezy to windy.",
|
||||
"preparation": "Exercise due safety when moving about.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical wind event.",
|
||||
},
|
||||
|
@ -152,134 +153,134 @@ ThreatStatements = {
|
|||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for extreme storm surge flooding greater than 9 feet above ground.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic storm surge flooding impacts. Evacuation efforts should now be underway.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury, significant loss of life, or immense human suffering. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury, significant loss of life, or immense human suffering. Leave immediately if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Adjustments to emergency plans should include a reasonable threat for extreme storm surge flooding greater than 9 feet above ground.",
|
||||
"planning": "Emergency plans should include a reasonable threat for extreme storm surge flooding greater than 9 feet above ground.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic storm surge flooding impacts. Evacuation efforts should now be brought to completion. Evacuations must be complete before driving conditions become unsafe.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury, significant loss of life, or immense human suffering. Leave immediately if evacuation orders have been given for your area. Consider voluntary evacuation if recommended. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury, significant loss of life, or immense human suffering. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency response should posture for a reasonable threat for extreme storm surge flooding greater than 9 feet above ground.",
|
||||
"preparation": "To be safe, evacuees should now be located within prescribed shelters and well away from deadly storm surge flooding capable of devastating to catastrophic impacts.",
|
||||
"action": "Life threatening inundation is imminent or ongoing. Failure to have heeded evacuation orders may result in serious injury, significant loss of life, or immense human suffering.",
|
||||
"planning": "Emergency considerations should posture for a reasonable threat for extreme storm surge flooding greater than 9 feet above ground.",
|
||||
"preparation": "To be safe, evacuees should be located within prescribed shelters and well away from deadly storm surge flooding capable of devastating to catastrophic impacts.",
|
||||
"action": "Life threatening inundation is possible. Those who failed to heed evacuation orders risk serious injury, significant loss of life, or immense human suffering.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat of deadly storm surge is abating as flood waters recede.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Do not return to evacuated areas until flood waters completely recede and the all-clear is officially given.",
|
||||
"action": "Failure to exercise due safety may result in additional injuries or loss of life.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Do not return to evacuated areas until flood waters completely recede and the all-clear is officially given.",
|
||||
"action": "Failure to exercise due safety may result in additional injury or loss of life. If you have a life-threatening emergency dial 9 1 1.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for extreme storm surge flooding greater than 9 feet above ground.",
|
||||
"preparation": "Be safe and aggressively guard against the potential of devastating to catastrophic storm surge flooding impacts.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed official instructions may result in serious injury, significant loss of life, or immense human suffering. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
},
|
||||
},
|
||||
"High": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for major storm surge flooding of 6 to 9 feet above ground.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive storm surge flooding impacts. Evacuate efforts should now be underway.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury, significant loss of life, or human suffering. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive storm surge flooding impacts. Evacuation efforts should now be underway.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury, significant loss of life, or human suffering. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Adjustments to emergency plans should include a reasonable threat for major storm surge flooding of 6 to 9 feet above ground.",
|
||||
"planning": "Emergency plans should include a reasonable threat for major storm surge flooding of 6 to 9 feet above ground.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive storm surge flooding impacts. Evacuation efforts should now be brought to completion. Evacuations must be complete before driving conditions become unsafe.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury, significant loss of life, or human suffering. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency response should posture for a reasonable threat for major storm surge flooding of 6 to 9 feet above ground.",
|
||||
"preparation": "To be safe, evacuees should now be located within prescribed shelters and well away from deadly storm surge flooding capable of extensive impacts.",
|
||||
"action": "Life threatening inundation is imminent or ongoing. Failure to have heeded evacuation orders may result in serious injury, significant loss of life, or human suffering.",
|
||||
"planning": "Emergency considerations should posture for a reasonable threat for major storm surge flooding of 6 to 9 feet above ground.",
|
||||
"preparation": "To be safe, evacuees should be located within prescribed shelters and well away from deadly storm surge flooding capable of extensive impacts.",
|
||||
"action": "Life threatening inundation is possible. Those who failed to heed evacuation orders risk serious injury, significant loss of life, or human suffering.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat of deadly storm surge is abating as flood waters recede.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Do not return to evacuated areas until flood waters completely recede and the all-clear is officially given.",
|
||||
"action": "Failure to exercise due safety may result in additional injuries or loss of life.",
|
||||
"planning": "The threat of deadly storm surge is abating as flood waters recede.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Do not return to evacuated areas until flood waters completely recede and the all-clear is officially given.",
|
||||
"action": "Failure to exercise due safety may result in additional injury or loss of life. If you have a life-threatening emergency dial 9 1 1.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for major storm surge flooding of 6 to 9 feet above ground.",
|
||||
"preparation": "Be safe and aggressively guard against the potential of extensive storm surge flooding impacts.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed official instructions may result in serious injury, significant loss of life, or human suffering. Poor decisions may result in being cut off or needlessly risk lives.",
|
||||
},
|
||||
},
|
||||
"Mod": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for dangerous storm surge flooding of 3 to 6 feet above ground.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant storm surge flooding impacts. Evacuation efforts should now be underway.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders or instructions from local officials may result in serious injury or loss of life. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may needlessly risk lives.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury or loss of life. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may needlessly risk lives.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for dangerous storm surge flooding of 3 to 6 feet above ground.",
|
||||
"planning": "Emergency plans should include a reasonable threat for dangerous storm surge flooding of 3 to 6 feet above ground.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant storm surge flooding impacts. Evacuation efforts should now be brought to completion. Evacuations must be complete before driving conditions become unsafe.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders or instructions from local officials may result in serious injury or loss of life. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may needlessly risk lives.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed evacuation orders may result in serious injury or loss of life. Leave if evacuation orders are given for your area. Consider voluntary evacuation if recommended. Poor decisions may needlessly risk lives.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency response should posture for a reasonable threat for dangerous storm surge flooding of 3 to 6 feet above ground.",
|
||||
"preparation": "To be safe, evacuees should now be located within prescribed shelters and well away from storm surge flooding capable of significant impacts.",
|
||||
"action": "Life threatening inundation is imminent or ongoing. Failure to have heeded evacuation orders or instructions from local officials may result in serious injury or loss of life.",
|
||||
"planning": "Emergency considerations should posture for a reasonable threat for dangerous storm surge flooding of 3 to 6 feet above ground.",
|
||||
"preparation": "To be safe, evacuees should be located within prescribed shelters and well away from storm surge flooding capable of significant impacts.",
|
||||
"action": "Life threatening inundation is possible. Those who failed to heed evacuation orders risk serious injury or loss of life.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat of dangerous storm surge is abating as flood waters recede.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Do not return to evacuated areas until flood waters completely recede and the all-clear is officially given.",
|
||||
"action": "Failure to exercise due safety may result in additional injuries or loss of life.",
|
||||
"planning": "The threat of dangerous storm surge is abating as flood waters recede.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Do not return to evacuated areas until flood waters completely recede and the all-clear is officially given.",
|
||||
"action": "Failure to exercise due safety may result in additional injury or loss of life. If you have a life-threatening emergency dial 9 1 1.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for dangerous storm surge flooding of 3 to 6 feet above ground.",
|
||||
"preparation": "Be safe and earnestly guard against the potential of significant storm surge flooding impacts.",
|
||||
"action": "Life threatening inundation is possible. Failure to heed official instructions may result in serious injury or loss of life. Poor decisions may needlessly risk lives.",
|
||||
},
|
||||
},
|
||||
"Elevated": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for peak storm surge flooding of 1 to 3 feet above ground.",
|
||||
"preparation": "To be safe, prepare for the potential of limited storm surge flooding impacts. Preparedness efforts should be underway.",
|
||||
"action": "Localized inundation is possible. Follow the instructions of local officials. Consider voluntary evacuation if recommended. Leave if evacuation orders are issued.",
|
||||
"planning": "Emergency planning should include a reasonable threat for peak storm surge flooding of 1 to 3 feet above ground.",
|
||||
"preparation": "To be safe, prepare for the potential of limited storm surge flooding impacts. Efforts should now be underway.",
|
||||
"action": "Localized inundation is possible. Follow the instructions of local officials. Consider voluntary evacuation if recommended. Leave if evacuation orders are issued.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Adjustments to emergency plans should include a reasonable threat for peak storm surge flooding of 1 to 3 feet above ground.",
|
||||
"preparation": "To be safe, prepare for the potential of limited storm surge flooding impacts. Preparedness efforts should now be brought to completion before conditions deteriorate.",
|
||||
"planning": "Emergency plans should include a reasonable threat for peak storm surge flooding of 1 to 3 feet above ground.",
|
||||
"preparation": "To be safe, prepare for the potential of limited storm surge flooding impacts. Efforts should now be brought to completion before conditions deteriorate.",
|
||||
"action": "Localized inundation is possible. Follow the instructions of local officials. Consider voluntary evacuation if recommended. Leave immediately if evacuation orders are issued.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency response should posture for a reasonable threat for peak storm surge flooding of 1 to 3 feet above ground.",
|
||||
"planning": "Emergency considerations should posture for a reasonable threat for peak storm surge flooding of 1 to 3 feet above ground.",
|
||||
"preparation": "To be safe, stay away from storm surge flooding capable of limited impacts.",
|
||||
"action": "Localized inundation is imminent or ongoing. Continue to follow the instructions of local officials.",
|
||||
"action": "Localized inundation is possible. Continue to follow the instructions of local officials.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "The threat of hazardous storm surge is abating as flood waters recede.",
|
||||
"preparation": "To be safe, heed the instructions of local officials when moving about. Do not return to flooded areas until the all-clear is officially given.",
|
||||
"action": "Exercise due safety.",
|
||||
"planning": "The threat of hazardous storm surge is abating as flood waters recede.",
|
||||
"preparation": "Be safe and heed the instructions of local officials when moving about. Do not enter flooded areas.",
|
||||
"action": "Exercise due safety.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for peak storm surge flooding of 1 to 3 feet above ground.",
|
||||
"preparation": "Be safe and guard against the potential of limited storm surge flooding impacts.",
|
||||
"action": "Localized inundation is possible. Follow the instructions of local officials.",
|
||||
},
|
||||
},
|
||||
"None": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning for this event need not include a threat for storm surge flooding. The ground will remain largely unflooded from surge water or only have spots minimally affected by surge encroachment. Surf conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Little to no preparations needed to guard against storm surge flooding.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next storm surge event.",
|
||||
"planning": "Emergency planning for this event need not include a threat for storm surge flooding. The ground will remain largely unflooded from surge water or only have spots minimally affected by surge water encroachment. Surf conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Little to no preparations needed to guard against storm surge flooding at this time.",
|
||||
"action": "Ensure readiness for the next storm surge event.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning for this event need not include a threat for storm surge flooding. The ground will remain largely unflooded from surge water or only have spots minimally affected by surge encroachment. Surf conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Little to no preparations needed to guard against storm surge flooding.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next storm surge event.",
|
||||
"planning": "Emergency plans for this event need not include a threat for storm surge flooding. The ground will remain largely unflooded from surge water or only have spots minimally affected by surge water encroachment. Surf conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Little to no preparations needed to guard against storm surge flooding at this time.",
|
||||
"action": "Ensure readiness for the next storm surge event.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "The ground will remain largely unflooded from surge water or only have spots minimally affected by surge encroachment. Surg conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Little to no preparations needed to guard against storm surge flooding.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next storm surge event.",
|
||||
"planning": "Emergency considerations for this event need not include a threat for storm surge flooding. The ground will remain largely unflooded from surge water or only have spots minimally affected by surge water encroachment. Surf conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Little to no preparations needed to guard against storm surge flooding at this time.",
|
||||
"action": "Ensure readiness for the next storm surge event.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Surf conditions may be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Exercise due safety.",
|
||||
"planning": "Surf conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Exercise due safety.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next storm surge event.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "Surf conditions may be rough with some beach erosion. Stronger than normal rip currents may also be present. ",
|
||||
"preparation": "Exercise due safety.",
|
||||
"default": {
|
||||
"planning": "Surf conditions may still be rough with some beach erosion. Stronger than normal rip currents may also be present.",
|
||||
"preparation": "Exercise due safety.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next storm surge event.",
|
||||
},
|
||||
},
|
||||
|
@ -287,273 +288,270 @@ ThreatStatements = {
|
|||
"Flooding Rain": {
|
||||
"Extreme": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat of extreme flooding where peak rainfall totals vastly exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are very likely. ",
|
||||
"planning": "Emergency planning should include a reasonable threat of extreme flooding where peak rainfall totals vastly exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are very likely.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury, significant loss of life, or human suffering. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury, significant loss of life, or human suffering. If flood related watches and warnings are issued, heed recommended actions. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground before flood waters arrive.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for extreme flooding where peak rainfall totals vastly exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are very likely.",
|
||||
"planning": "Emergency plans should include a reasonable threat of extreme flooding where peak rainfall totals vastly exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are very likely.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury, significant loss of life, and human suffering. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury, significant loss of life, or human suffering. If flood related watches and warnings are issued, heed recommended actions. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground before flood waters arrive.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency plans should include a reasonable threat for extreme flooding where peak rainfall totals vastly exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are very likely.",
|
||||
"preparation": "To be safe, remain prepared for the potential of devastating to catastrophic flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury, significant loss of life, and human suffering. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. ",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency plans should include a reasonable threat for extreme flooding where peak rainfall totals vastly exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are very likely.",
|
||||
"preparation": "To be safe, remain prepared for the potential of devastating to catastrophic flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury, significant loss of life, and human suffering. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed and do not let down your guard.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Do not drive through existing flood waters that cover the road.",
|
||||
},
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.", },
|
||||
},
|
||||
"High": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for major flooding where peak rainfall totals well exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are likely.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury or significant loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury or significant loss of life. If flood related watches and warnings are issued, heed recommended actions. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground before flood waters arrive.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for major flooding where peak rainfall totals well exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are likely.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive flooding rain impacts. Life threatening flooding possible from excessive tropical rain.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury or significant loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground.",
|
||||
"planning": "Emergency plans should include a reasonable threat for major flooding where peak rainfall totals well exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are likely.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury or significant loss of life. If flood related watches and warnings are issued, heed recommended actions. Poor decisions may result in being cut off or needlessly risk lives. If vulnerable, relocate to safe shelter on higher ground before flood waters arrive.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency plans should include a reasonable threat for major flooding where peak rainfall totals well exceed amounts conducive for flash flooding and rapid inundation.",
|
||||
"preparation": "To be safe, remain prepared for the potential of extensive flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury or significant loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency plans should continue to include a reasonable threat for major flooding where peak rainfall totals well exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are likely.",
|
||||
"preparation": "To be safe, remain prepared for the potential of extensive flooding rain impacts.",
|
||||
"action": "Life threatening flooding is possible. Failure to take action may result in serious injury or significant loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed and do not let down your guard.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Do not drive through existing flood waters that cover the road.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
},
|
||||
},
|
||||
"Mod": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for moderate flooding where peak rainfall totals notably exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are possible.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant flooding rain impacts.",
|
||||
"action": "Dangerous flooding is possible. Failure to take action may result in serious injury or loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
"action": "Dangerous flooding is possible. Failure to take action may result in serious injury or loss of life. If flood related watches and warnings are issued, heed recommended actions.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for moderate flooding where peak rainfall totals notably exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are possible.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant flooding rain impacts.",
|
||||
"action": "Dangerous flooding is possible. Failure to take action may result in serious injury or loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency plans should include a reasonable threat for moderate flooding where peak rainfall totals notably exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are possible.",
|
||||
"preparation": "To be safe, remain prepared for the potential of significant flooding rain impacts.",
|
||||
"action": "Dangerous flooding is possible. Failure to take action may result in serious injury or loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant flooding rain impacts.",
|
||||
"action": "Dangerous flooding is possible. Failure to take action may result in serious injury or loss of life. If flood related watches and warnings are issued, heed recommended actions.", },
|
||||
"hunker down": {
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency plans should include a reasonable threat for moderate flooding where peak rainfall totals notably exceed amounts conducive for flash flooding and rapid inundation. Rescues and emergency evacuations are possible.",
|
||||
"preparation": "To be safe, remain prepared for the potential of significant flooding rain impacts.",
|
||||
"action": "Dangerous flooding is possible. Failure to take action may result in serious injury or loss of life. If flash flood watches and warnings are issued, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed and do not let down your guard.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Do not drive through existing flood waters that cover the road.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
},
|
||||
},
|
||||
"Elevated": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for minor flooding where peak rainfall totals are near amounts conducive for flash flooding and rapid inundation.",
|
||||
"planning": "Emergency planning should include a reasonable threat for minor flooding where peak rainfall totals are near amounts conducive for localized flash flooding and rapid inundation.",
|
||||
"preparation": "To be safe, prepare for the potential of limited flooding rain impacts.",
|
||||
"action": "Localized flooding is possible. If flash flood watches and warnings are issued, heed recommended actions.",
|
||||
"action": "Localized flooding is possible. If flood related watches and warnings are issued, heed recommended actions.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for minor flooding where peak rainfall totals are near amounts conducive for flash flooding and rapid inundation.",
|
||||
"planning": "Emergency plans should include a reasonable threat for minor flooding where peak rainfall totals are near amounts conducive for localized flash flooding and rapid inundation.",
|
||||
"preparation": "To be safe, prepare for the potential of limited flooding rain impacts.",
|
||||
"action": "Localized flooding is possible. If flash flood watches and warnings are issued, heed recommended actions.",
|
||||
"action": "Localized flooding is possible. If flood related watches and warnings are issued, heed recommended actions.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency plans should include a reasonable threat for minor flooding where peak rainfall totals are near amounts conducive for flash flooding and rapid inundation.",
|
||||
"preparation": "To be safe, remain prepared for the potential of limited flooding rain impacts.",
|
||||
"action": "Localized flooding is possible. If flash flood watches and warnings are issued, heed recommended actions.",
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency plans should include a reasonable threat for minor flooding where peak rainfall totals are near amounts conducive for flash flooding and rapid inundation.",
|
||||
"preparation": "To be safe, remain prepared for the potential of limited flooding rain impacts.",
|
||||
"action": "Localized flooding is possible. If flash flood watches and warnings are issued, heed recommended actions.",
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed and do not let down your guard.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers. Do not drive through existing flood waters that cover the road.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a threat of flooding.",
|
||||
"preparation": "Be safe and remain ready to protect against flooding rain impacts. Stay informed.",
|
||||
"action": "If flood related watches and warnings are in effect, heed recommended actions. Also listen for possible river flood warnings for longer-term impacts along rivers.",
|
||||
},
|
||||
},
|
||||
"None": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning for this event need not include a threat for rainfall flooding. Heavy rain and nuisance flooding may still occur.",
|
||||
"planning": "Emergency planning need not include a threat for rainfall flooding. Locally heavy rain and nuisance flooding may still occur.",
|
||||
"preparation": "Little to no preparations needed to guard against excessive tropical rainfall.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical rainfall flooding event.",
|
||||
"action": "Ensure readiness for the next tropical rainfall event.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning for this event need not include a threat for rainfall flooding. Heavy rain and nuisance flooding may still occur.",
|
||||
"planning": "Emergency plans need not include a threat for rainfall flooding. Locally heavy rain and nuisance flooding may still occur.",
|
||||
"preparation": "Little to no preparations needed to guard against excessive tropical rainfall.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical rainfall flooding event.",
|
||||
"action": "Ensure readiness for the next tropical rainfall event.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency planning for this event need not include a threat for rainfall flooding. Heavy rain and nuisance flooding may still occur.",
|
||||
"planning": "Emergency considerations need not include a threat for rainfall flooding. Locally heavy rain and nuisance flooding may still occur.",
|
||||
"preparation": "Little to no preparations needed to guard against excessive tropical rainfall.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical rainfall flooding event.",
|
||||
"action": "Ensure readiness for the next tropical rainfall event.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Heavy rain and nuisance flooding may still occur. ",
|
||||
"planning": "Locally heavy rain and nuisance flooding may still occur.",
|
||||
"preparation": "Exercise due safety.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical rainfall flooding event.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical rainfall event.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "Heavy rain and nuisance flooding may still occur.",
|
||||
"default": {
|
||||
"planning": "Locally Heavy rain and nuisance flooding may still occur.",
|
||||
"preparation": "Exercise due safety.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical rainfall flooding event.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical rainfall event.",
|
||||
},
|
||||
},
|
||||
},
|
||||
"Tornado": {
|
||||
"Extreme": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for an outbreak of tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths. Numerous tornadoes may occur within short periods of time and in close proximity of one another.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic tornado impacts. Those living in mobile homes should relocate to more substantial shelter. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
"planning": "Emergency planning should include a reasonable threat for an outbreak of tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths. Numerous tornadoes may occur within short periods of time and in close proximity of one another.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic tornado impacts. Those living in mobile homes should relocate to more substantial shelter before severe weather arrives.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for an outbreak of tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths. Numerous tornadoes may occur within short periods of time and in close proximity of one another.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic tornado impacts. Those living in mobile homes should relocate to more substantial shelter. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
"planning": "When implementing emergency plans, include a reasonable threat for an outbreak of tornadoes." ,
|
||||
"preparation": "To be safe, aggressively prepare for the potential of devastating to catastrophic tornado impacts. Those living in mobile homes should relocate to more substantial shelter before severe weather arrives.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency plans should include a reasonable threat for an outbreak of tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths. Numerous tornadoes may occur within short periods of time and in close proximity of one another.",
|
||||
"preparation": "To be safe, remain prepared for the potential of devastating to catastrophic tornado impacts. Stay informed and listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. If tornado warnings are issued for your area, quickly move to the safest place within your shelter. Seconds can save lives.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. If a tornado approaches, quickly move to the safest place within your shelter.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency plans should continue to include a reasonable threat for an outbreak of tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths. Numerous tornadoes may occur within short periods of time and in close proximity of one another.",
|
||||
"preparation": "To be safe, remain prepared for the potential of devastating to catastrophic tornado impacts. Stay informed and do not let down your guard/",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. If tornado watches and warnings are issued, heed recommended actions.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed and do not let down your guard.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for an outbreak of tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against the potential of devastating to catastrophic tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
},
|
||||
"High": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for numerous tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive tornado impacts. Those living in mobile homes should relocate to more substantial shelter. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive tornado impacts. Those living in mobile homes should relocate to more substantial shelter before severe weather arrives.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for numerous tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive tornado impacts. Those living in mobile homes should relocate to more substantial shelter. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
"planning": "When implementing emergency plans, include a reasonable threat for numerous tornadoes.",
|
||||
"preparation": "To be safe, aggressively prepare for the potential of extensive tornado impacts. Those living in mobile homes should relocate to more substantial shelter before severe weather arrives.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency plans should include a reasonable threat for numerous tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths.",
|
||||
"preparation": "To be safe, remain prepared for the potential of extensive tornado impacts. Stay informed and listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. If tornado warnings are issued for your area, quickly move to the safest place within your shelter. Seconds can save lives.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. If a tornado approaches, quickly move to the safest place within your shelter.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency plans should include a reasonable threat for numerous tornadoes, with several possibly strong or violent in intensity and with longer and wider damage paths.",
|
||||
"preparation": "To be safe, remain prepared for the potential of extensive tornado impacts. Stay informed and do not let down your guard.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or significant loss of life. If tornado watches and warnings are issued, heed recommended actions.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed and do not let down your guard.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for numerous tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against the potential of extensive tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
},
|
||||
"Mod": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for scattered tornadoes, with a few possibly strong in intensity.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant tornado impacts. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant tornado impacts.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for scattered tornadoes, with a few possibly strong in intensity.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant tornado impacts. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
},
|
||||
"planning": "When implementing emergency plans, include should include a reasonable threat for scattered tornadoes.",
|
||||
"preparation": "To be safe, earnestly prepare for the potential of significant tornado impacts.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.", },
|
||||
"hunker down": {
|
||||
"planning": "Emergency planning should continue to include a reasonable threat for scattered tornadoes, with a few possibly strong in intensity.",
|
||||
"preparation": "To be safe, remain prepared for the potential of significant tornado impacts. Stay informed and listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or loss of life. If tornado warnings are issued for your area, quickly move to the safest place within your shelter. Seconds can save lives.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. If a tornado approaches, quickly move to the safest place within your shelter.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency planning should include a reasonable threat for scattered tornadoes, with a few possibly strong in intensity.",
|
||||
"preparation": "To be safe, remain prepared prepare for the potential of significant tornado impacts. Stay informed and do not let down your guard.",
|
||||
"action": "Failure to adequately shelter may result in serious injury or loss of life. If tornado watches and warnings are issued for your area, heed recommended actions.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed and do not let down your guard.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for scattered tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against the potential of significant tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
},
|
||||
"Elevated": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning should include a reasonable threat for isolated tornadoes, mostly with shorter and narrower damage paths.",
|
||||
"preparation": "To be safe, prepare for the potential of limited tornado impacts. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury, and in some cases loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
"planning": "Emergency planning should include a reasonable threat for isolated tornadoes, mostly with shorter and narrower damage paths.",
|
||||
"preparation": "To be safe, prepare for the potential of limited tornado impacts.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning should include a reasonable threat for isolated tornadoes, mostly with shorter and narrower damage paths.",
|
||||
"preparation": "To be safe, prepare for the potential of limited tornado impacts. Listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury, and in some cases loss of life. Keep a watchful eye to the sky and a listening ear for warning alerts. Be ready to find shelter quickly.",
|
||||
"planning": "When implementing emergency plans, include a reasonable threat for isolated tornadoes.",
|
||||
"preparation": "To be safe, prepare for the potential of limited tornado impacts.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency planning should include a reasonable threat for isolated tornadoes, mostly with shorter and narrower damage paths.",
|
||||
"preparation": "To be safe, remain prepared for the potential of limited tornado impacts. Stay informed and listen for tornado watches and warnings.",
|
||||
"action": "Failure to adequately shelter may result in serious injury, and in some cases loss of life. If tornado warnings are issued for your area, quickly move to the safest place within your shelter. Seconds can save lives.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. If a tornado approaches, quickly move to the safest place within your shelter.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Emergency planning should continue to include a reasonable threat for isolated tornadoes, mostly with shorter and narrower damage paths.",
|
||||
"preparation": "To be safe, remain prepared for the potential of limited tornado impacts. Stay informed and do not let down your guard.",
|
||||
"action": "Failure to adequately shelter may result in serious injury, and in some cases loss of life. If tornado watches and warnings are issued for your area, heed recommended actions.",
|
||||
"planning": "Emergency considerations should include a reasonable threat for tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against tornado impacts. Stay informed and do not let down your guard.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "",
|
||||
"preparation": "",
|
||||
"action": "",
|
||||
"default": {
|
||||
"planning": "Emergency considerations should include a reasonable threat for isolated tornadoes.",
|
||||
"preparation": "Be safe and remain ready to protect against the potential of limited tornado impacts. Stay informed.",
|
||||
"action": "Listen for tornado watches and warnings. Be ready to shelter quickly if a tornado approaches.",
|
||||
},
|
||||
},
|
||||
"None": {
|
||||
"check plans": {
|
||||
"planning": "Emergency planning for this event need not include a threat for tornadoes. Showers and thunderstorms with strong wind gusts may still occur.",
|
||||
"planning": "Emergency planning need not include a threat for tornadoes. Showers and thunderstorms with strong gusty winds may still occur.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical tornadoes.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical tornado event.",
|
||||
"action": "Ensure readiness for the next tropical tornado event.",
|
||||
},
|
||||
"complete preparations": {
|
||||
"planning": "Emergency planning for this event need not include a threat for tornadoes. Showers and thunderstorms with strong wind gusts may still occur.",
|
||||
"planning": "Emergency plans need not include a threat for tornadoes. Showers and thunderstorms with strong gusty winds may still occur.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical tornadoes.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical tornado event.",
|
||||
"action": "Ensure readiness for the next tropical tornado event.",
|
||||
},
|
||||
"hunker down": {
|
||||
"planning": "Emergency plans for this event need not include a threat for tornadoes. Showers and thunderstorms with strong wind gusts may still occur.",
|
||||
"planning": "Emergency considerations need not include a threat for tornadoes. Showers and thunderstorms with strong gusty winds may still occur.",
|
||||
"preparation": "Little to no preparations needed to guard against tropical tornadoes.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical tornado event.",
|
||||
"action": "Ensure readiness for the next tropical tornado event.",
|
||||
},
|
||||
"recovery": {
|
||||
"planning": "Showers and thunderstorms with strong wind gusts may still occur.",
|
||||
"preparation": "Exercise due safety when moving about.",
|
||||
"planning": "Showers and thunderstorms with strong gusty winds may still occur.",
|
||||
"preparation": "Exercise due safety.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical tornado event.",
|
||||
},
|
||||
"nothing to see here": {
|
||||
"planning": "Showers and thunderstorms with strong wind gusts may occur.",
|
||||
"preparation": "Exercise due safety when moving about.",
|
||||
"default": {
|
||||
"planning": "Showers and thunderstorms with strong gusty winds may still occur.",
|
||||
"preparation": "Exercise due safety.",
|
||||
"action": "Review your seasonal plan and ensure readiness for the next tropical tornado event.",
|
||||
},
|
||||
},
|
||||
|
@ -561,21 +559,21 @@ ThreatStatements = {
|
|||
}
|
||||
PotentialImpactStatements = {
|
||||
"Wind": {
|
||||
"Extreme": ["Structural damage to sturdy buildings with some experiencing complete roof and wall failures. Complete destruction of mobile homes. Damage greatly accentuated by large airborne projectiles. Locations may be uninhabitable for weeks or months.",
|
||||
"Extreme": ["Structural damage to sturdy buildings, some with complete roof and wall failures. Complete destruction of mobile homes. Damage greatly accentuated by large airborne projectiles. Locations may be uninhabitable for weeks or months.",
|
||||
"Numerous large trees snapped or uprooted along with fences and roadway signs blown over.",
|
||||
"Many roads impassible from large debris, and more within urban or heavily wooded places. Many bridges, causeways, and access routes impassible.",
|
||||
"Many roads impassable from large debris, and more within urban or heavily wooded places. Many bridges, causeways, and access routes impassable.",
|
||||
"Widespread power and communications outages."],
|
||||
"High": ["Considerable roof damage to sturdy buildings, with some having window, door, and garage door failures leading to structural damage. Mobile homes severely damaged, with some destroyed. Damage accentuated by airborne projectiles. Locations may be uninhabitable for weeks.",
|
||||
"High": ["Considerable roof damage to sturdy buildings, with some having window, door, and garage door failures leading to structural damage. Mobile homes severely damaged, with some destroyed. Damage accentuated by airborne projectiles. Locations may be uninhabitable for weeks.",
|
||||
"Many large trees snapped or uprooted along with fences and roadway signs blown over.",
|
||||
"Some roads impassible from large debris, and more within urban or heavily wooded places. Several bridges, causeways, and access routes impassible.",
|
||||
"Some roads impassable from large debris, and more within urban or heavily wooded places. Several bridges, causeways, and access routes impassable.",
|
||||
"Large areas with power and communications outages."],
|
||||
"Mod": ["Some damage to roofing and siding materials, along with damage to porches, awnings, carports, and sheds. A few buildings experiencing window, door, and garage door failures. Mobile homes damaged, especially if unanchored. Unsecured lightweight objects become dangerous projectiles.",
|
||||
"Several large trees snapped or uprooted, but with greater numbers in places where trees are shallow rooted. Several fences and roadway signs blown over.",
|
||||
"Some roads impassible from large debris, and more within urban or heavily wooded places. A few bridges, causeways, and access routes impassible.",
|
||||
"Some roads impassable from large debris, and more within urban or heavily wooded places. A few bridges, causeways, and access routes impassable.",
|
||||
"Scattered power and communications outages, but more prevalent in areas with above ground lines."],
|
||||
"Elevated": ["Damage to porches, awnings, carports, sheds, and unanchored mobile homes. Unsecured lightweight objects blown about.",
|
||||
"Many large tree limbs broken off. A few trees snapped or uprooted, but with greater numbers in places where trees are shallow rooted. Some fences and roadway signs blown over.",
|
||||
"A few roads impassible from debris, particularly within urban or heavily wooded places. Hazardous driving conditions on bridges and other elevated roadways.",
|
||||
"A few roads impassable from debris, particularly within urban or heavily wooded places. Hazardous driving conditions on bridges and other elevated roadways.",
|
||||
"Scattered power and communications outages."],
|
||||
"None": ["Little to no potential impacts from wind."],
|
||||
},
|
||||
|
@ -584,7 +582,7 @@ PotentialImpactStatements = {
|
|||
"Near-shore escape routes and secondary roads washed out or severely flooded. Flood control systems and barriers may become stressed.",
|
||||
"Extreme beach erosion. New shoreline cuts possible.",
|
||||
"Massive damage to marinas, docks, boardwalks, and piers. Numerous small craft broken away from moorings with many lifted onshore and stranded."],
|
||||
"High": ["Large areas of deep inundation, with storm surge flooding accentuated by battering waves. Structural damage to buildings, with several washing away. Damage compounded by floating debris. Locations may be uninhabitable for an extended period.",
|
||||
"High": ["Large areas of deep inundation with storm surge flooding accentuated by battering waves. Structural damage to buildings, with several washing away. Damage compounded by floating debris. Locations may be uninhabitable for an extended period.",
|
||||
"Large sections of near-shore escape routes and secondary roads washed out or severely flooded. Flood control systems and barriers may become stressed.",
|
||||
"Severe beach erosion with significant dune loss.",
|
||||
"Major damage to marinas, docks, boardwalks, and piers. Many small craft broken away from moorings, especially in unprotected anchorages with some lifted onshore and stranded."],
|
||||
|
@ -601,20 +599,20 @@ PotentialImpactStatements = {
|
|||
"Flooding Rain": {
|
||||
"Extreme": ["Extreme rainfall flooding may prompt numerous evacuations and rescues.",
|
||||
"Rivers and tributaries may overwhelmingly overflow their banks in many places with deep moving water. Small streams, creeks, canals, arroyos, and ditches may become raging rivers. In mountain areas, deadly runoff may rage down valleys while increasing susceptibility to rockslides and mudslides. Flood control systems and barriers may become stressed.",
|
||||
"Flood waters can enter numerous structures within multiple communities, with some structures becoming uninhabitable or washed away. Numerous places where flood waters may cover escape routes. Streets and parking lots become rivers of raging water with underpasses submerged. Driving conditions become very dangerous. Numerous road and bridge closures with some weakened or washed out."],
|
||||
"Flood waters can enter numerous structures within multiple communities, some structures becoming uninhabitable or washed away. Numerous places where flood waters may cover escape routes. Streets and parking lots become rivers of raging water with underpasses submerged. Driving conditions become very dangerous. Numerous road and bridge closures with some weakened or washed out."],
|
||||
"High": ["Major rainfall flooding may prompt many evacuations and rescues.",
|
||||
"Rivers and tributaries may rapidly overflow their banks in multiple places. Small streams, creeks, canals, arroyos, and ditches may become dangerous rivers. In mountain areas, destructive runoff may run quickly down valleys while increasing susceptibility to rockslides and mudslides. Flood control systems and barriers may become stressed.",
|
||||
"Flood waters can enter many structures within multiple communities, with some structures becoming uninhabitable or washed away. Many places where flood waters may cover escape routes. Streets and parking lots become rivers of moving water with underpasses submerged. Driving conditions become dangerous. Many road and bridge closures with some weakened or washed out."],
|
||||
"Flood waters can enter many structures within multiple communities, some structures becoming uninhabitable or washed away. Many places where flood waters may cover escape routes. Streets and parking lots become rivers of moving water with underpasses submerged. Driving conditions become dangerous. Many road and bridge closures with some weakened or washed out."],
|
||||
"Mod": ["Moderate rainfall flooding may prompt several evacuations and rescues.",
|
||||
"Rivers and tributaries may quickly become swollen with swifter currents and overspill their banks in a few places, especially in usually vulnerable spots. Small streams, creeks, canals, arroyos, and ditches overflow.",
|
||||
"Flood waters can enter some structures or weaken foundations. Several places may experience expanded areas of rapid inundation at underpasses, low-lying spots, and poor drainage areas. Some streets and parking lots take on moving water as storm drains and retention ponds overflow. Driving conditions become hazardous. Some road and bridge closures."],
|
||||
"Elevated": ["Localized rainfall flooding may prompt a few evacuations.",
|
||||
"Rivers and tributaries may quickly rise with swifter currents. Small streams, creeks, canals, arroyos, and ditches may become swollen and overflow in spots.",
|
||||
"Flood waters can enter a few structures, especially in usually vulnerable spots. A few places where rapid ponding of water occurs at underpasses, low-lying spots, and poor drainage areas. Several storm drains and retention ponds may become near-full and begin to overflow. Some brief road and bridge closures."],
|
||||
"Flood waters can enter a few structures, especially in usually vulnerable spots. A few places where rapid ponding of water occurs at underpasses, low-lying spots, and poor drainage areas. Several storm drains and retention ponds become near-full and begin to overflow. Some brief road and bridge closures."],
|
||||
"None": ["Little to no potential impacts from flooding rain."],
|
||||
},
|
||||
"Tornado": {
|
||||
"Extreme": ["The occurrence of an outbreak of tornadoes can greatly hinder the execution of emergency plans during tropical events.",
|
||||
"Extreme": ["The occurrence of an outbreak of tornadoes can greatly hinder the execution of emergency plans during tropical events. ",
|
||||
"Many places may experience tornado damage, with several spots of immense destruction, power loss, and communications failures.",
|
||||
"Locations could realize sturdy buildings demolished, structures upon weak foundations swept away, mobile homes obliterated, large trees twisted and snapped with some debarked, vehicles lifted off the ground and thrown with distance, and small boats destroyed. Large and deadly projectiles can add considerably to the toll."],
|
||||
"High": ["The occurrence of numerous tornadoes can greatly hinder the execution of emergency plans during tropical events.",
|
||||
|
@ -630,9 +628,13 @@ PotentialImpactStatements = {
|
|||
},
|
||||
}
|
||||
|
||||
EvacuationStatements = ["For those under evacuation orders, leave as soon as practical with a destination in mind. Gas up your vehicle well ahead of time. Be sure that you take essential materials from your Emergency Supplies Kit. Let others know where you are going and when you intend to arrive.",
|
||||
"If evacuating the area, stick to prescribed evacuation routes. Look for additional traffic information on roadway smart signs and listen to select radio channels for further travel instructions. Do not use your cell phone while driving."
|
||||
"For those not under evacuation orders, understand that there are inherent risks to evacuation (such as traffic congestion, accidents, and driving in bad weather), so evacuate only if necessary. Help keep roadways open for those that are under evacuation orders."]
|
||||
EvacuationStatements = ["WATCH/WARNING PHASE - For those under evacuation orders, leave as soon as practical with a destination in mind. Gas up your vehicle well ahead of time. Be sure that you take all essential materials from your emergency supplies kit. Let others know where you are going and when you intend to arrive.",
|
||||
"WATCH/WARNING PHASE - If evacuating the area, stick to prescribed evacuation routes. Look for additional traffic information on roadway smart signs and listen to select radio channels for further travel instructions. Drivers should not use cell phones while operating vehicles.",
|
||||
"WATCH/WARNING PHASE - For those not under evacuation orders, understand that there are inherent risks to evacuation (such as traffic congestion, accidents, and driving in bad weather), so evacuate only if necessary. Help keep roadways open for those that are under evacuation orders.",
|
||||
"WATCH/WARNING PHASE - If you are exceptionally vulnerable to wind or water hazards from tropical systems, consider voluntary evacuation, especially if being officially recommended. Relocate to a predetermined shelter or safe destination.",
|
||||
"WATCH/WARNING PHASE - If evacuating away from the area or relocating to a nearby shelter, leave early before weather conditions become hazardous.",
|
||||
"IMMINENT/ONGOING PHASE - Do not return to evacuated areas until hazardous winds diminish and flood waters abate.",
|
||||
"RECOVERY PHASE - Do not return to evacuated areas until it is safe. Listen for the all-clear signal from local authorities."]
|
||||
|
||||
OtherPreparednessActions = {
|
||||
|
||||
|
@ -650,7 +652,7 @@ OtherPreparednessActions = {
|
|||
"Outside preparations should be wrapped up as soon as possible before weather conditions completely deteriorate. Any remaining evacuations and relocations should be expedited before the onset of tropical storm force wind.",
|
||||
"If you are relocating to safe shelter, leave as early as possible. If heading to a community shelter, become familiar with the shelter rules before arrival, especially if you have special needs or own a pet. Take essential items with you from your Emergency Supplies Kit. Check the latest weather forecast before departing.",
|
||||
"Failure to adequately shelter may result in serious injury or loss of life. Always heed the advice of local officials and comply with any orders that are issued. Remember, during the storm 9 1 1 Emergency Services may not be able to immediately respond if conditions are unsafe. This should be a big factor in your decision making.",
|
||||
"Check-in with your Emergency Points of Contact among family, friends, and workmates. Inform them of your status and well-being. Let them know how you intend to ride out the storm and when you plan to check-in again.",
|
||||
"Check-in with your emergency points of contact among family, friends, and workmates. Inform them of your status and well-being. Let them know how you intend to ride out the storm and when you plan to check-in again.",
|
||||
"Keep cell phones well charged and handy. Also, cell phone chargers for automobiles can be helpful after the storm. Locate your chargers and keep them with your cell phone.",
|
||||
"In emergencies it is best to remain calm. Stay informed and focused on the situation at hand. Exercise patience with those you encounter. Be a Good Samaritan and helpful to others.",
|
||||
"If relocating to a nearby shelter or to the home of a family member or friend, drive with extra caution, especially on secondary roads. Remember, many bridges and causeways will be closed once higher winds arrive. Also, if you encounter water covering the road, seek an alternate route. Always obey official road signs for closures and detours.",
|
||||
|
@ -662,20 +664,20 @@ OtherPreparednessActions = {
|
|||
"Do not venture outside while in the eye of a hurricane. Within the eye, weather conditions may temporarily improve which can be misleading. Once the eye passes, the wind will change direction and return to dangerous speeds. Heavy rain will also return. Be smart and remain safely hidden from the storm.",
|
||||
"Do not be a thrill seeker or risk your life for senseless photos or videos. Be wise and avoid becoming another statistic.",
|
||||
"Be ready to move to the identified safe room if your home or shelter begins to fail. Quickly move to an interior room on the lowest floor. Put as many sturdy walls between you and the storm as you can. Protect your head and body.",
|
||||
"When major hurricanes make landfall, extreme winds bring a tremendous threat to life and cause devastating to catastrophic damage. The extent of these extreme winds is usually confined to locations near the coast and does not tend to cover an overly large area. Yet, this area will realize the brunt of the storm. At the onset of landfall, listen for extreme wind warnings. If issued for you area, move to the safest place within your home or shelter. Take the same life-saving actions as if it were a violent tornado."],
|
||||
"When major hurricanes make landfall, extreme winds bring a tremendous threat to life and cause devastating to catastrophic damage. During landfall, listen for extreme wind warnings which indicate the exact timing and location of these incredible life-threatening winds. If issued for you area, move to the safest place within your home or shelter. Take the same life-saving actions as if it were a violent tornado."],
|
||||
"recovery": ["Remain safely sheltered until the storm fully passes. Once conditions improve, be careful going outside. Stay away from downed power lines and hazardous debris.",
|
||||
"If your home or shelter was damaged, be alert to the smell of natural gas leaks and cautious around exposed electrical wiring, broken glass, jagged metal and wood, and protruding nails and screws.",
|
||||
"Check to see if everyone in your group is OK. Administer first aid to those who are injured. Call 9 1 1 for any serious injuries. Remember, it may be more difficult for emergency responders to arrive quickly in the time period immediately following the storm.",
|
||||
"Check-in with your Emergency Points of Contact. Let them know of your status and well-being. Keep conversations short and to the point. Do not tie up communications systems.",
|
||||
"Check-in with your emergency points of contact. Let them know of your status and well-being. Keep conversations short and to the point. Do not tie up communications systems.",
|
||||
"Be a good neighbor and check on those living next to you. Be neighborly and lend a helping hand.",
|
||||
"Those who rode out the storm away from their home or business are likely anxious to return. However, allow some time for work crews to make a clear path for emergency vehicles. Downed power lines and trees may be blocking roads and flood waters may have washed out or overspread sections of key travel routes. Traffic lights may also be out of service.",
|
||||
"Do not attempt to return to evacuated areas until local authorities give the All-Clear signal.",
|
||||
"Do not go sightseeing within impacted communities simply to observe storm damage. Sightseers can interfere with the timeliness of rescuers and first responders while needlessly jeopardizing their own lives and the lives of others.",
|
||||
"Do not go sightseeing within impacted communities simply to observe storm damage. Sightseers can interfere with the timeliness of rescuers and first responders to needlessly jeopardize lives.",
|
||||
"When inspecting damage, use flashlights rather than candles or flamed lighting. Be aware of sparks that can ignite leaking gas or other flammables.",
|
||||
"Do not go up on your roof until the rain and strong winds have subsided. Ladders can be slippery in the rain and unexpected wind gusts can blow you off of the roof. Do not risk bodily harm in an attempt to reduce property damage.",
|
||||
"When clearing out fallen trees, be careful with chain saws and axes. Always wear protective gear and keep others at a safe distance. Use these tools according to operating manuals and safety instruction. Leaning trees and those which have fallen on roof tops can be especially challenging. If you are not in good health or unsure about what you are doing, have someone else with tree cutting experience do the job. Never cut trees without a partner.",
|
||||
"If using a generator, avoid carbon monoxide poisoning by following instructions by the manufacturer. Make sure that the generator is run in a well ventilated space.",
|
||||
"Problems with sewer backups can contaminate standing flood waters. Keep children away. Also, listen for boil water alerts relative to communities whose tap water may have become temporarily non-potable."],
|
||||
"Problems with sewer backups can further contaminate standing flood waters. Keep children away. Also, listen for boil water alerts relative to communities whose tap water may have become non-potable."],
|
||||
}
|
||||
|
||||
AdditionalSources = ["- For information on appropriate preparations see ready.gov",
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.gfe.dialogs.formatterlauncher;
|
||||
|
||||
/**
|
||||
* Interface for storing/transmitting a product.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 18 APR 2008 ### lvenable Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
public interface IStoreTransmitProduct {
|
||||
/**
|
||||
* Store/Transmit method call.
|
||||
*/
|
||||
void storeTransmitProduct();
|
||||
}
|
|
@ -1,225 +0,0 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.gfe.dialogs.formatterlauncher;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.ProgressBar;
|
||||
|
||||
import com.raytheon.viz.core.mode.CAVEMode;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
|
||||
/**
|
||||
* Thread used for counting down Storing/Transmitting products.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 18 APR 2008 ### lvenable Initial creation
|
||||
* 20 AUG 2010 4687 cjeanbap "null" showed up in
|
||||
* countdown message.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
public class StoreTransmitCountdownThread extends Thread {
|
||||
/**
|
||||
* Parent display.
|
||||
*/
|
||||
private Display display;
|
||||
|
||||
/**
|
||||
* Progress bar to be updated.
|
||||
*/
|
||||
private ProgressBar progressBar;
|
||||
|
||||
/**
|
||||
* Flag indicating if the thread is done running.
|
||||
*/
|
||||
private boolean isDone = false;
|
||||
|
||||
/**
|
||||
* Flag indicating if the thread has been canceled.
|
||||
*/
|
||||
private boolean isCancelled = false;
|
||||
|
||||
/**
|
||||
* Count down label.
|
||||
*/
|
||||
private Label countdownLbl;
|
||||
|
||||
/**
|
||||
* Count down string.
|
||||
*/
|
||||
private String countdownStr;
|
||||
|
||||
/**
|
||||
* Counter.
|
||||
*/
|
||||
private int counter = 5;
|
||||
|
||||
/**
|
||||
* Store/Transmit callback.
|
||||
*/
|
||||
private IStoreTransmitProduct storeCB;
|
||||
|
||||
/**
|
||||
* Count down prefix string.
|
||||
*/
|
||||
private String countdownPrefix;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param display
|
||||
* Parent display.
|
||||
* @param progressBar
|
||||
* Progress bar.
|
||||
* @param countdownLbl
|
||||
* Count down label.
|
||||
* @param countdownStr
|
||||
* Count down string.
|
||||
* @param cb
|
||||
* Callback interface.
|
||||
* @param isStore
|
||||
* True to display store, false to display transmit.
|
||||
*/
|
||||
public StoreTransmitCountdownThread(Display display,
|
||||
ProgressBar progressBar, Label countdownLbl, String countdownStr,
|
||||
IStoreTransmitProduct cb, boolean isStore) {
|
||||
this.display = display;
|
||||
this.progressBar = progressBar;
|
||||
this.countdownLbl = countdownLbl;
|
||||
this.countdownStr = countdownStr;
|
||||
this.storeCB = cb;
|
||||
countdownPrefix = new String();
|
||||
CAVEMode opMode = DataManager.getCurrentInstance().getOpMode();
|
||||
if (!opMode.equals(CAVEMode.OPERATIONAL)) {
|
||||
countdownPrefix = "Simulated ";
|
||||
}
|
||||
if (isStore == true) {
|
||||
countdownPrefix += "Store in ";
|
||||
} else {
|
||||
countdownPrefix += "Transmit in ";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Thread's run method.
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
isDone = false;
|
||||
countdownLabelStart();
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (isCancelled == false) {
|
||||
display.asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
if (progressBar.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
// Increment the progress bar
|
||||
progressBar.setSelection(progressBar.getSelection() + 1);
|
||||
countdownLbl.setText(countdownPrefix + counter
|
||||
+ " seconds...");
|
||||
--counter;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isCancelled == false) {
|
||||
countdownLabelFinished();
|
||||
}
|
||||
|
||||
isDone = true;
|
||||
|
||||
storeCB.storeTransmitProduct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the thread is done running.
|
||||
*
|
||||
* @return True if the thread is done running, false if it is still running.
|
||||
*/
|
||||
public boolean isDone() {
|
||||
return isDone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel the running thread.
|
||||
*/
|
||||
public void cancelThread() {
|
||||
isCancelled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the thread has been canceled.
|
||||
*
|
||||
* @return True if the thread was canceled, false otherwise.
|
||||
*/
|
||||
public boolean threadCancelled() {
|
||||
return isCancelled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the count down label to have a red background and white text while
|
||||
* the Store/Transmit is in count down mode.
|
||||
*/
|
||||
private void countdownLabelStart() {
|
||||
display.asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
countdownLbl.setBackground(display
|
||||
.getSystemColor(SWT.COLOR_RED));
|
||||
countdownLbl.setForeground(display
|
||||
.getSystemColor(SWT.COLOR_WHITE));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the count down label back to its original state.
|
||||
*/
|
||||
private void countdownLabelFinished() {
|
||||
display.asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
countdownLbl.setText(countdownStr);
|
||||
countdownLbl.setBackground(display
|
||||
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
|
||||
countdownLbl.setForeground(display
|
||||
.getSystemColor(SWT.COLOR_BLACK));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -26,6 +26,8 @@ import java.util.Map;
|
|||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
@ -33,7 +35,6 @@ import org.eclipse.swt.layout.GridData;
|
|||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.ProgressBar;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
@ -50,7 +51,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.SimulatedTime;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
|
@ -85,6 +86,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Jan 06, 2014 2649 dgilling Make ETN assignment process optional.
|
||||
* Feb 17, 2014 2774 dgilling Merge changes from 14.1 baseline to 14.2.
|
||||
* Nov 14, 2014 4953 randerso Cleaned up practice product requests
|
||||
* Feb 26, 2015 4126 randerso Ensure transmit/store is properly cancelled if dialog is closed
|
||||
* Code cleanup
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -92,22 +95,23 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
public class StoreTransmitDlg extends CaveSWTDialog implements
|
||||
IStoreTransmitProduct {
|
||||
public class StoreTransmitDlg extends CaveSWTDialog {
|
||||
private static final int COUNT_DOWN_SECONDS = 5;
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(StoreTransmitDlg.class);
|
||||
|
||||
private static int SEQ_NUMBER = 0;
|
||||
|
||||
/**
|
||||
* PRoduct ID text control.
|
||||
* Product ID text control.
|
||||
*/
|
||||
private Text productIdTF;
|
||||
private Text productIdText;
|
||||
|
||||
/**
|
||||
* Count down progress label.
|
||||
*/
|
||||
private Label progressLbl;
|
||||
private Label progressLabel;
|
||||
|
||||
/**
|
||||
* Count down text string.
|
||||
|
@ -117,13 +121,7 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
/**
|
||||
* Count down progress bar.
|
||||
*/
|
||||
private ProgressBar progBar;
|
||||
|
||||
/**
|
||||
* Thread used to count down the store/transmit. A separate thread is needed
|
||||
* so updates can be made to the display with user interruption.
|
||||
*/
|
||||
private StoreTransmitCountdownThread countdownThread;
|
||||
private ProgressBar progressBar;
|
||||
|
||||
/**
|
||||
* Label image that will display the Store/Transmit image.
|
||||
|
@ -150,6 +148,10 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
|
||||
private final boolean updateVtec;
|
||||
|
||||
private String countdownFormat;
|
||||
|
||||
private boolean isCancelled;
|
||||
|
||||
/**
|
||||
* @param parent
|
||||
* Parent shell.
|
||||
|
@ -177,33 +179,28 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
this.productText = editor.getProductText();
|
||||
this.pid = pid;
|
||||
this.updateVtec = updateVtec;
|
||||
CAVEMode opMode = CAVEMode.getMode();
|
||||
String title = null;
|
||||
if (isStoreDialog) {
|
||||
countdownFormat = "Store in %s seconds...";
|
||||
countdownText = "Store Countdown";
|
||||
title = "Store in AWIPS TextDB";
|
||||
} else {
|
||||
countdownFormat = "Transmit in %s seconds...";
|
||||
countdownText = "Transmit Countdown";
|
||||
title = "Transmit to AWIPS *WAN*";
|
||||
}
|
||||
|
||||
if (!opMode.equals(CAVEMode.OPERATIONAL)) {
|
||||
countdownFormat = "Simulated " + countdownFormat;
|
||||
countdownText = "Simulated " + countdownText;
|
||||
title += " (" + opMode.name() + " MODE)";
|
||||
}
|
||||
setText(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
String title = null;
|
||||
CAVEMode opMode = CAVEMode.getMode();
|
||||
if (opMode.equals(CAVEMode.OPERATIONAL)) {
|
||||
if (isStoreDialog == true) {
|
||||
title = "Store in AWIPS TextDB";
|
||||
countdownText = "Store Countdown";
|
||||
} else {
|
||||
title = "Transmit to AWIPS *WAN*";
|
||||
countdownText = "Transmit Countdown";
|
||||
}
|
||||
} else {
|
||||
|
||||
if (isStoreDialog == true) {
|
||||
title = "Store in AWIPS TextDB";
|
||||
countdownText = "Simulated Store Countdown";
|
||||
} else {
|
||||
title = "Store Transmit to AWIPS *WAN*";
|
||||
countdownText = "Simulated Transmit Countdown";
|
||||
}
|
||||
title += " (" + opMode.name() + " MODE)";
|
||||
|
||||
}
|
||||
shell.setText(title);
|
||||
|
||||
// Create the main layout for the shell.
|
||||
GridLayout mainLayout = new GridLayout(1, false);
|
||||
|
@ -214,19 +211,26 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
|
||||
// Initialize all of the controls and layouts
|
||||
initializeComponents();
|
||||
|
||||
shell.addDisposeListener(new DisposeListener() {
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
doCancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void preOpened() {
|
||||
super.preOpened();
|
||||
productIdTF.insert(pid);
|
||||
productIdText.insert(pid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the controls on the display.
|
||||
*/
|
||||
private void initializeComponents() {
|
||||
if (isStoreDialog == true) {
|
||||
if (isStoreDialog) {
|
||||
labelImg = parentEditor.getImageRegistry().get("yieldsign");
|
||||
} else {
|
||||
labelImg = parentEditor.getImageRegistry().get("stopsign");
|
||||
|
@ -234,11 +238,6 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
|
||||
createMainControls();
|
||||
createBottomButtons();
|
||||
|
||||
Display display = shell.getParent().getDisplay();
|
||||
|
||||
countdownThread = new StoreTransmitCountdownThread(display, progBar,
|
||||
progressLbl, countdownText, this, isStoreDialog);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -258,19 +257,19 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
productIdLbl.setText("AWIPS Product ID:");
|
||||
|
||||
GridData gd = new GridData(200, SWT.DEFAULT);
|
||||
productIdTF = new Text(leftComp, SWT.BORDER);
|
||||
productIdTF.setLayoutData(gd);
|
||||
productIdText = new Text(leftComp, SWT.BORDER);
|
||||
productIdText.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
progressLbl = new Label(leftComp, SWT.CENTER);
|
||||
progressLbl.setText(countdownText);
|
||||
progressLbl.setLayoutData(gd);
|
||||
progressLabel = new Label(leftComp, SWT.CENTER);
|
||||
progressLabel.setText(countdownText);
|
||||
progressLabel.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
progBar = new ProgressBar(leftComp, SWT.SMOOTH);
|
||||
progBar.setMinimum(0);
|
||||
progBar.setMaximum(5);
|
||||
progBar.setLayoutData(gd);
|
||||
progressBar = new ProgressBar(leftComp, SWT.SMOOTH);
|
||||
progressBar.setMinimum(0);
|
||||
progressBar.setMaximum(COUNT_DOWN_SECONDS);
|
||||
progressBar.setLayoutData(gd);
|
||||
|
||||
// -------------------------------------
|
||||
// Create the right side image control
|
||||
|
@ -300,30 +299,35 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
buttons.setLayout(new GridLayout(2, true));
|
||||
|
||||
gd = new GridData(150, SWT.DEFAULT);
|
||||
final Button actionBtn = new Button(buttons, SWT.PUSH);
|
||||
final Button actionButton = new Button(buttons, SWT.PUSH);
|
||||
|
||||
CAVEMode opMode = CAVEMode.getMode();
|
||||
if (opMode.equals(CAVEMode.OPERATIONAL)) {
|
||||
if (isStoreDialog == true) {
|
||||
actionBtn.setText("Store");
|
||||
if (isStoreDialog) {
|
||||
actionButton.setText("Store");
|
||||
} else {
|
||||
actionBtn.setText("Transmit");
|
||||
actionButton.setText("Transmit");
|
||||
}
|
||||
} else if (isStoreDialog == true) {
|
||||
actionBtn.setText("Simulated Store");
|
||||
} else if (isStoreDialog) {
|
||||
actionButton.setText("Simulated Store");
|
||||
} else {
|
||||
actionBtn.setText("Simulated Transmit");
|
||||
actionButton.setText("Simulated Transmit");
|
||||
}
|
||||
|
||||
actionBtn.setLayoutData(gd);
|
||||
actionBtn.addSelectionListener(new SelectionAdapter() {
|
||||
actionButton.setLayoutData(gd);
|
||||
actionButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
// Disable the store button.
|
||||
actionBtn.setEnabled(false);
|
||||
actionButton.setEnabled(false);
|
||||
progressLabel.setText(String.format(countdownFormat,
|
||||
COUNT_DOWN_SECONDS));
|
||||
progressLabel.setBackground(progressLabel.getDisplay()
|
||||
.getSystemColor(SWT.COLOR_RED));
|
||||
progressLabel.setForeground(progressLabel.getDisplay()
|
||||
.getSystemColor(SWT.COLOR_WHITE));
|
||||
|
||||
// Start the countdown thread.
|
||||
countdownThread.start();
|
||||
countDown();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -334,19 +338,6 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
cancelBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (countdownThread != null) {
|
||||
if (countdownThread.isDone() == false) {
|
||||
countdownThread.cancelThread();
|
||||
progressLbl.setText(countdownText);
|
||||
Display display = shell.getParent().getDisplay();
|
||||
progressLbl.setBackground(display
|
||||
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
|
||||
progressLbl.setForeground(display
|
||||
.getSystemColor(SWT.COLOR_BLACK));
|
||||
}
|
||||
}
|
||||
|
||||
setReturnValue(null);
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
@ -355,11 +346,9 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
/**
|
||||
* Method to store or transmit the product.
|
||||
*/
|
||||
@Override
|
||||
public void storeTransmitProduct() {
|
||||
// Store/Transmit the product...
|
||||
|
||||
if (!countdownThread.threadCancelled()) {
|
||||
if (!this.isCancelled) {
|
||||
try {
|
||||
if (updateVtec) {
|
||||
// With GFE VTEC products, it's possible to have multiple
|
||||
|
@ -433,113 +422,105 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
etnCache);
|
||||
}
|
||||
|
||||
VizApp.runSync(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
String pid = productIdTF.getText();
|
||||
if (parentEditor.isTestVTEC()) {
|
||||
if (isStoreDialog) {
|
||||
parentEditor.devStore(pid.substring(3));
|
||||
} else {
|
||||
parentEditor.devStore(pid.substring(4));
|
||||
transmitProduct(true);
|
||||
}
|
||||
} else {
|
||||
if (isStoreDialog) {
|
||||
TextDBUtil.storeProduct(pid, productText,
|
||||
parentEditor.isTestVTEC());
|
||||
} else {
|
||||
transmitProduct(false);
|
||||
}
|
||||
}
|
||||
String pid = productIdText.getText();
|
||||
if (parentEditor.isTestVTEC()) {
|
||||
if (isStoreDialog) {
|
||||
parentEditor.devStore(pid.substring(3));
|
||||
} else {
|
||||
parentEditor.devStore(pid.substring(4));
|
||||
transmitProduct(true);
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
if (isStoreDialog) {
|
||||
TextDBUtil.storeProduct(pid, productText,
|
||||
parentEditor.isTestVTEC());
|
||||
} else {
|
||||
transmitProduct(false);
|
||||
}
|
||||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.CRITICAL,
|
||||
"Error preparing product for transmission.", e);
|
||||
VizApp.runAsync(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
sendTransmissionStatus(ConfigData.productStateEnum.Failed);
|
||||
StoreTransmitDlg.this.parentEditor.revive();
|
||||
}
|
||||
});
|
||||
sendTransmissionStatus(ConfigData.productStateEnum.Failed);
|
||||
StoreTransmitDlg.this.parentEditor.revive();
|
||||
}
|
||||
}
|
||||
|
||||
// The asyncExec call is used to dispose of the shell since it is
|
||||
// called outside the GUI thread (count down thread).
|
||||
VizApp.runAsync(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
close();
|
||||
}
|
||||
});
|
||||
close();
|
||||
}
|
||||
|
||||
private Integer getNextEtn(VtecObject vtec) throws VizException {
|
||||
GetNextEtnResponse serverResponse = GFEVtecUtil.getNextEtn(
|
||||
vtec.getOffice(), vtec.getPhensig(), true, true);
|
||||
if (!serverResponse.isOkay()) {
|
||||
final VtecObject vtecToFix = vtec;
|
||||
final boolean[] exitLoopContainer = { false };
|
||||
final Exception[] exceptionContainer = { null };
|
||||
final GetNextEtnResponse[] responseContainer = { serverResponse };
|
||||
boolean exitLoop = false;
|
||||
Exception exception = null;
|
||||
|
||||
do {
|
||||
getDisplay().syncExec(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GetNextEtnResponse serverResponse = responseContainer[0];
|
||||
ETNConfirmationDialog dlg = new ETNConfirmationDialog(
|
||||
getShell(), serverResponse);
|
||||
if (dlg.open() == ETNConfirmationDialog.OK) {
|
||||
int etn = dlg.getProposedEtn();
|
||||
statusHandler.info(String.format(
|
||||
"User confirmed ETN for %s: %04d",
|
||||
serverResponse.getPhensig(), etn));
|
||||
try {
|
||||
GetNextEtnResponse followupResp = GFEVtecUtil
|
||||
.getNextEtn(vtecToFix.getOffice(),
|
||||
vtecToFix.getPhensig(), true,
|
||||
true, true, etn);
|
||||
responseContainer[0] = followupResp;
|
||||
} catch (VizException e) {
|
||||
exceptionContainer[0] = e;
|
||||
exitLoopContainer[0] = true;
|
||||
}
|
||||
} else {
|
||||
statusHandler.info(
|
||||
"User declined to fix ETN for %s",
|
||||
serverResponse.getPhensig());
|
||||
exitLoopContainer[0] = true;
|
||||
}
|
||||
ETNConfirmationDialog dlg = new ETNConfirmationDialog(
|
||||
getShell(), serverResponse);
|
||||
if (dlg.open() == ETNConfirmationDialog.OK) {
|
||||
int etn = dlg.getProposedEtn();
|
||||
statusHandler.info(String.format(
|
||||
"User confirmed ETN for %s: %04d",
|
||||
serverResponse.getPhensig(), etn));
|
||||
try {
|
||||
GetNextEtnResponse followupResp = GFEVtecUtil
|
||||
.getNextEtn(vtec.getOffice(),
|
||||
vtec.getPhensig(), true, true, true,
|
||||
etn);
|
||||
serverResponse = followupResp;
|
||||
} catch (VizException e) {
|
||||
exception = e;
|
||||
exitLoop = true;
|
||||
}
|
||||
});
|
||||
} while (!responseContainer[0].isOkay() && !exitLoopContainer[0]);
|
||||
} else {
|
||||
statusHandler.info("User declined to fix ETN for %s",
|
||||
serverResponse.getPhensig());
|
||||
exitLoop = true;
|
||||
}
|
||||
} while (!serverResponse.isOkay() && !exitLoop);
|
||||
|
||||
if (!responseContainer[0].isOkay()) {
|
||||
if (!serverResponse.isOkay()) {
|
||||
String msg = "Unable to set ETN for phensig "
|
||||
+ responseContainer[0].getPhensig() + "\nStatus: "
|
||||
+ responseContainer[0].toString();
|
||||
Exception e = exceptionContainer[0];
|
||||
+ serverResponse.getPhensig() + "\nStatus: "
|
||||
+ serverResponse.toString();
|
||||
Exception e = exception;
|
||||
if (e == null) {
|
||||
throw new VizException(msg);
|
||||
} else {
|
||||
throw new VizException(msg, e);
|
||||
}
|
||||
} else {
|
||||
serverResponse = responseContainer[0];
|
||||
}
|
||||
}
|
||||
|
||||
return serverResponse.getNextEtn();
|
||||
}
|
||||
|
||||
private void countDown() {
|
||||
getShell().getDisplay().timerExec(1000, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
bumpCounter();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void bumpCounter() {
|
||||
if (!progressBar.isDisposed()) {
|
||||
// Increment the progress bar
|
||||
int count = progressBar.getSelection() + 1;
|
||||
if (count < COUNT_DOWN_SECONDS) {
|
||||
progressBar.setSelection(count);
|
||||
progressLabel.setText(String.format(countdownFormat,
|
||||
(COUNT_DOWN_SECONDS - count)));
|
||||
countDown();
|
||||
} else {
|
||||
storeTransmitProduct();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to transmit the product.
|
||||
*
|
||||
|
@ -566,13 +547,13 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
OfficialUserProduct oup = new OfficialUserProduct();
|
||||
// make sure the awipsWanPil is exactly 10 characters space-padded
|
||||
// long
|
||||
String awipsWanPil = String.format("%-10s", productIdTF.getText()
|
||||
String awipsWanPil = String.format("%-10s", productIdText.getText()
|
||||
.trim());
|
||||
oup.setAwipsWanPil(awipsWanPil);
|
||||
oup.setProductText(productText);
|
||||
|
||||
String tempName = awipsWanPil + "-" + SEQ_NUMBER + "-"
|
||||
+ (System.currentTimeMillis() / 1000);
|
||||
+ (System.currentTimeMillis() / TimeUtil.MILLIS_PER_SECOND);
|
||||
oup.setFilename(tempName);
|
||||
|
||||
String type = parentEditor.getProductType();
|
||||
|
@ -590,8 +571,8 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
|
||||
try {
|
||||
Object response = ThriftClient.sendRequest(req);
|
||||
// TODO need a response on the other one? it's going
|
||||
// async....
|
||||
// TODO need a response on the other one?
|
||||
// it's going async....
|
||||
if (response instanceof OUPResponse) {
|
||||
OUPResponse resp = (OUPResponse) response;
|
||||
Priority p = null;
|
||||
|
@ -646,8 +627,13 @@ public class StoreTransmitDlg extends CaveSWTDialog implements
|
|||
}
|
||||
|
||||
private void sendTransmissionStatus(ConfigData.productStateEnum status) {
|
||||
if (isStoreDialog == false) {
|
||||
if (!isStoreDialog) {
|
||||
transmissionCB.setTransmissionState(status);
|
||||
}
|
||||
}
|
||||
|
||||
private void doCancel() {
|
||||
this.isCancelled = true;
|
||||
storeTransmitProduct();
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
Name Organization Date Info
|
||||
Darrel Kingfield NOAA/NSSL/CIMMS 09-02-2014 Initial File Creation
|
||||
Name - Organization - Date - Info
|
||||
Darrel Kingfield - NOAA/NSSL/CIMMS - 09-02-2014 - Initial File Creation
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!-- Set the initial top level menu -->
|
||||
<contribute xsi:type="titleItem" titleText="---Multiple-Radar/Multiple-Sensor---" id="MRMS-SVR"/>
|
||||
<!-- <contribute xsi:type="subinclude" fileName="menus/mrms/mrmsProducts.xml"/> -->
|
||||
<contribute xsi:type="subinclude" fileName="menus/mrms/mrmsProducts.xml"/>
|
||||
</menuTemplate>
|
||||
|
|
|
@ -8,243 +8,243 @@
|
|||
<contribute xsi:type="subMenu" menuText="Hail Products" id="MRMS_HAIL">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Maximum Estimated Size of Hail (MESH)" id="MESH">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MESH"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="MESH Tracks (30 min. accum.)" id="MESH30">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MESHTrack30min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="MESH Tracks (60 min. accum.)" id="MESH60">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MESHTrack60min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="MESH Tracks (120 min. accum.)" id="MESH120">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MESHTrack120min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="MESH Tracks (240 min. accum.)" id="MESH240">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MESHTrack240min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="MESH Tracks (360 min. accum.)" id="MESH360">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MESHTrack360min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="MESH Tracks (1440 min. accum.)" id="MESH1440">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MESHTrack1440min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Probability Of Severe Hail (POSH)" id="POSH">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="POSH"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Severe Hail Index (SHI)" id="SHI">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="SHI"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Lightning Products" id="MRMS_LIGHTNING">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Cloud-to-Ground Lightning Density (1 min.)" id="LightDensity1min">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="LightningDensity1min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Cloud-to-Ground Lightning Density (5 min.)" id="LightDensity5min">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="LightningDensity5min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Cloud-to-Ground Lightning Density (15 min.)" id="LightDensity15min">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="LightningDensity15min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Cloud-to-Ground Lightning Density (30 min.)" id="LightDensity30min">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="LightningDensity30min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Cloud-to-Ground Lightning Probability (0-30 min.)" id="LightProb30min">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="LightningProbabilityNext30min"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Precipitation Products" id="MRMS_PRECIPITATION">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Surface Precipitation Type (SPT)" id="SfcPrecipType">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="PrecipType"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Surface Precipitation Rate (SPR)" id="RadarPrecipRate">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="PrecipRate"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Radar Quality Index (RQI)" id="RadarQualityIndex">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarQualityIndex"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Seamless Hybrid Scan Reflectivity (SHSR)" id="SHSRVPR">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="SeamlessHSR"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="QPE - Radar Only">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="1 hour Accumulation" id="RadarOnly01hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarOnlyQPE01H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="3 hour Accumulation" id="RadarOnly03hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarOnlyQPE03H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="6 hour Accumulation" id="RadarOnly06hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarOnlyQPE06H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="12 hour Accumulation" id="RadarOnly12hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarOnlyQPE12H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="24 hour Accumulation" id="RadarOnly24hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarOnlyQPE24H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="48 hour Accumulation" id="RadarOnly48hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarOnlyQPE48H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="72 hour Accumulation" id="RadarOnly72hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="RadarOnlyQPE72H"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="QPE - Gauge Only">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="1 hour Accumulation" id="GaugeOnly01hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeOnlyQPE01H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="3 hour Accumulation" id="GaugeOnly03hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeOnlyQPE03H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="6 hour Accumulation" id="GaugeOnly06hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeOnlyQPE06H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="12 hour Accumulation" id="GaugeOnly12hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeOnlyQPE12H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="24 hour Accumulation" id="GaugeOnly24hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeOnlyQPE24H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="48 hour Accumulation" id="GaugeOnly48hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeOnlyQPE48H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="72 hour Accumulation" id="GaugeOnly72hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeOnlyQPE72H"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="QPE - Radar w/ Gauge Bias Correction">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="1 hour Accumulation" id="GaugeCorr01hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeCorrQPE01H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="3 hour Accumulation" id="GaugeCorr03hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeCorrQPE03H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="6 hour Accumulation" id="GaugeCorr06hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeCorrQPE06H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="12 hour Accumulation" id="GaugeCorr12hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeCorrQPE12H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="24 hour Accumulation" id="GaugeCorr24hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeCorrQPE24H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="48 hour Accumulation" id="GaugeCorr48hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeCorrQPE48H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="72 hour Accumulation" id="GaugeCorr72hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="GaugeCorrQPE72H"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="QPE - Mountain Mapper">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="1 hour Accumulation" id="MountainMapper01hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MountainMapperQPE01H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="3 hour Accumulation" id="MountainMapper03hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MountainMapperQPE03H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="6 hour Accumulation" id="MountainMapper06hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MountainMapperQPE06H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="12 hour Accumulation" id="MountainMapper12hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MountainMapperQPE12H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="24 hour Accumulation" id="MountainMapper24hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MountainMapperQPE24H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="48 hour Accumulation" id="MountainMapper48hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MountainMapperQPE48H"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="72 hour Accumulation" id="MountainMapper72hr">
|
||||
<substitute key="levelOneValue" value="0.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MountainMapperQPE72H"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
|
@ -252,97 +252,97 @@
|
|||
<contribute xsi:type="subMenu" menuText="Reflectivity Products" id="MRMS_REFLECTIVITY">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Composite Reflectivity" id="CompZ">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MergedReflectivityQCComposite"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Composite Reflectivity Height" id="CompZH">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="HeightCompositeReflectivity"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Reflectivity At Lowest Altitude (RALA)" id="REFLA">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="ReflectivityAtLowestAltitude"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Vertically Integrated Ice (VII)" id="VII">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="VII"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Vertically Integrated Liquid (VIL)" id="MRMSVIL">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="MRMSVIL"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Echo Tops" id="MRMS_ECHO">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="18 dBZ Echo Top" id="18ET">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="EchoTop18"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="30 dBZ Echo Top" id="30ET">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="EchoTop30"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="50 dBZ Echo Top" id="50ET">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="EchoTop50"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="60 dBZ Echo Top" id="60ET">
|
||||
<substitute key="levelOneValue" value="500.0" />
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="EchoTop60"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Isothermal Reflectivity" id="REF_ISOTHERMAL">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Reflectivity at 0°C" id="REF0C">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="Reflectivity0C"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Reflectivity at -5°C" id="REFM5C">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="ReflectivityM5C"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Reflectivity at -10°C" id="REFM10C">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="ReflectivityM10C"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Reflectivity at -15°C" id="REFM15C">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="ReflectivityM15C"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Reflectivity at -20°C" id="REFM20C">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="ReflectivityM20C"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Thickness" id="REF_THICKNESS">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Height of 50dBZ Echo Above -20°C" id="H50253">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="H50AboveM20C"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Height of 60dBZ Echo Above -20°C" id="H60253">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="H60AboveM20C"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Height of 50dBZ Echo Above 0°C" id="H50273">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="H50Above0C"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Height of 60dBZ Echo Above 0°C" id="H60273">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_1000"/>
|
||||
<substitute key="parameterID" value="H60Above0C"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
|
@ -350,73 +350,73 @@
|
|||
<contribute xsi:type="subMenu" menuText="Velocity Products" id="MRMS_VELOCITY">
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Low-Level Azimuthal Shear (0-2km AGL)" id="AZ02">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="MergedAzShear02kmAGL"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Low-Level Rotation Tracks (30 min. accum.)" id="ROTLL30">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackLL30min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Low-Level Rotation Tracks (60 min. accum.)" id="ROTLL60">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackLL60min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Low-Level Rotation Tracks (120 min. accum.)" id="ROTLL120">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackLL120min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Low-Level Rotation Tracks (240 min. accum.)" id="ROTLL240">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackLL240min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Low-Level Rotation Tracks (360 min. accum.)" id="ROTLL360">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackLL360min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Low-Level Rotation Tracks (1440 min. accum.)" id="ROTLL1440">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackLL1440min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Mid-Level Azimuthal Shear (3-6km AGL)" id="AZ36">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="MergedAzShear36kmAGL"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Mid-Level Rotation Tracks (30 min. accum.)" id="ROTML30">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackML30min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Mid-Level Rotation Tracks (60 min. accum.)" id="ROTML60">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackML60min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Mid-Level Rotation Tracks (120 min. accum.)" id="ROTML120">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackML120min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Mid-Level Rotation Tracks (240 min. accum.)" id="ROTML240">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackML240min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Mid-Level Rotation Tracks (360 min. accum.)" id="ROTML360">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackML360min"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/mrms/mrms2D.xml" menuText="Mid-Level Rotation Tracks (1440 min. accum.)" id="ROTML1440">
|
||||
<substitute key="levelOneValue" value="500.0"/>
|
||||
<substitute key="datasetID" value="MRMS"/>
|
||||
<substitute key="datasetID" value="MRMS_0500"/>
|
||||
<substitute key="parameterID" value="RotationTrackML1440min"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
</menuTemplate>
|
||||
</menuTemplate>
|
||||
|
|
|
@ -42,48 +42,6 @@
|
|||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
|
|
|
@ -64,48 +64,6 @@
|
|||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true"/>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0" />
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
|
|
|
@ -42,48 +42,6 @@
|
|||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="300" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="300" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
|
|
|
@ -41,48 +41,6 @@
|
|||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="3600" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="3600" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="true" handlingNegativeStrikes="false">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0" />
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true"/>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0" />
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true"/>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0" />
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="900" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
|
||||
<binOffset posOffset="0" negOffset="300" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="300" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="300" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="true" handlingNegativeStrikes="true">
|
||||
<binOffset posOffset="0" negOffset="3600" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingCloudFlashes="true">
|
||||
<binOffset posOffset="0" negOffset="3600" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="false" />
|
||||
<resourceData xsi:type="lightningResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true"
|
||||
handlingPositiveStrikes="false" handlingNegativeStrikes="false"
|
||||
handlingPulses="true">
|
||||
<binOffset posOffset="0" negOffset="3600" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="binlightning" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="source">
|
||||
<constraint constraintValue="${source}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
</displays>
|
||||
</displayList>
|
||||
</bundle>
|
|
@ -19,16 +19,16 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/LightningPlot60Min.xml"
|
||||
<contribute xsi:type="bundleItem" file="bundles/TotalLightningPlot60Min.xml"
|
||||
menuText="1hr plot" id="1HrLightningFlashPlot">
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LightningPlot15Min.xml"
|
||||
<contribute xsi:type="bundleItem" file="bundles/TotalLightningPlot15Min.xml"
|
||||
menuText="15min plot" id="15MinLightningFlashPlot">
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LightningPlot15MinPN.xml"
|
||||
<contribute xsi:type="bundleItem" file="bundles/TotalLightningPlot15MinPN.xml"
|
||||
menuText="15min Pos/Neg plot" id="15MinPNLightningFlashPlot">
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LightningPlot5Min.xml"
|
||||
<contribute xsi:type="bundleItem" file="bundles/TotalLightningPlot5Min.xml"
|
||||
menuText="5min plot" id="5MinLightningFlashPlot">
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LightningSeq.xml"
|
||||
|
|
|
@ -24,51 +24,13 @@
|
|||
menuText="60min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="60min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="60min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="60min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="15min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="15min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="15min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="15min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="5min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="5min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="5min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="5min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
|
||||
</menuTemplate>
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="60min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="60min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="60min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="60min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="3600"/>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="15min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="15min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="15min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="15min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="900"/>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCGPlot.xml"
|
||||
menuText="5min cloud to ground density" id="1HrGridLightningCGPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningCloudFlashPlot.xml"
|
||||
menuText="5min cloud flash density" id="1HrGridLightningCloudFlashPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningTotalFlashPlot.xml"
|
||||
menuText="5min total flash density" id="1HrGridLightningFlashPlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/GridLightningPulsePlot.xml"
|
||||
menuText="5min pulse density" id="1HrGridLightningPulsePlot">
|
||||
<substitute key="negOffset" value="300"/>
|
||||
</contribute>
|
||||
|
||||
</menuTemplate>
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
|
||||
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
|
||||
|
||||
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
|
||||
This_software_product_contains_export-restricted_data_whose
|
||||
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
|
||||
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
|
||||
an_export_license_or_other_authorization.
|
||||
|
||||
Contractor_Name:________Raytheon_Company
|
||||
Contractor_Address:_____6825_Pine_Street,_Suite_340
|
||||
________________________Mail_Stop_B8
|
||||
________________________Omaha,_NE_68106
|
||||
________________________402.291.0100
|
||||
|
||||
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
|
||||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="subMenu" menuText="1km" id="${source}1kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridTotalLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="1" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="3km" id="${source}3kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridTotalLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="3" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="5km" id="${source}5kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridTotalLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="5" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="8km" id="${source}8kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridTotalLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="8" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="20km" id="${source}20kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridTotalLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="20" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="40km" id="${source}40kmLightningGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridTotalLightningBundleItems.xml">
|
||||
<substitute key="resolution" value="40" />
|
||||
</contribute>
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -45,8 +45,9 @@
|
|||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Total Lightning Grid" id="entlnGridSubmenu">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridLightningMenuItems.xml">
|
||||
<contribute xsi:type="subinclude" fileName="menus/lightning/gridTotalLightningMenuItems.xml">
|
||||
<substitute key="source" value="ENTLN"/>
|
||||
</contribute>
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="LMATotalLightning" visible="false" />
|
||||
</menuTemplate>
|
|
@ -34,7 +34,4 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/LightningSeq.xml"
|
||||
menuText="1min Lgtng Seq Plot" id="1MinLightningFlashSeq">
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LightningCloudSeq.xml"
|
||||
menuText="1min Cloud Flash Seq Plot" id="1MinLightningCloudFlashSeq">
|
||||
</contribute>
|
||||
</menuTemplate>
|
|
@ -75,6 +75,7 @@ import com.raytheon.viz.lightning.cache.LightningFrameRetriever;
|
|||
* Jul 22, 2014 3333 bclement ignores strikes that aren't on map
|
||||
* Jul 28, 2014 3451 bclement uses intended range min
|
||||
* Jul 29, 2014 3463 bclement uses sparse data source
|
||||
* Mar 05, 2015 4233 bsteffen include source in cache key.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -274,7 +275,8 @@ public class GridLightningResource extends
|
|||
* no local reference to cache object, create key and get cache
|
||||
* object which may be new or from another resource
|
||||
*/
|
||||
LightningFrameMetadata key = new LightningFrameMetadata(time,
|
||||
LightningFrameMetadata key = new LightningFrameMetadata(
|
||||
resourceData.getSource(), time,
|
||||
resourceData.getBinOffset());
|
||||
co = CacheObject.newCacheObject(key, retriever);
|
||||
cacheObjectMap.put(time, co);
|
||||
|
|
|
@ -32,8 +32,6 @@ import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.LightningConstants;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
@ -92,6 +90,7 @@ import com.raytheon.viz.lightning.cache.LightningFrameRetriever;
|
|||
* moved name formatting to static method
|
||||
* Aug 04, 2014 3488 bclement added sanity check for record bin range
|
||||
* Aug 19, 2014 3542 bclement fixed strike count clipping issue
|
||||
* Mar 05, 2015 4233 bsteffen include source in cache key.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -111,7 +110,7 @@ public class LightningResource extends
|
|||
private boolean needsUpdate;
|
||||
|
||||
private String resourceName;
|
||||
|
||||
|
||||
private int posAdj;
|
||||
|
||||
private IFont font;
|
||||
|
@ -222,11 +221,9 @@ public class LightningResource extends
|
|||
rval += modifier;
|
||||
}
|
||||
|
||||
HashMap<String, RequestConstraint> metadata = resourceData
|
||||
.getMetadataMap();
|
||||
if (metadata != null && metadata.containsKey(LightningConstants.SOURCE)) {
|
||||
rval += metadata.get(LightningConstants.SOURCE)
|
||||
.getConstraintValue() + " ";
|
||||
String source = resourceData.getSource();
|
||||
if (source != null) {
|
||||
rval += source + " ";
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
@ -283,9 +280,10 @@ public class LightningResource extends
|
|||
int negCount = 0;
|
||||
int cloudCount = 0;
|
||||
int pulseCount = 0;
|
||||
|
||||
if (magnification == 0.0) magnification=(float) 0.01;
|
||||
|
||||
|
||||
if (magnification == 0.0)
|
||||
magnification = (float) 0.01;
|
||||
|
||||
/*
|
||||
* we only want strikes that are visible so we have to filter any
|
||||
* strikes that aren't in both the clipping pane and the view
|
||||
|
@ -448,7 +446,8 @@ public class LightningResource extends
|
|||
* we know about, return without removing the time.
|
||||
*/
|
||||
if (dataTimes.indexOf(dataTime) == dataTimes.size() - 1) {
|
||||
CacheObject<LightningFrameMetadata, LightningFrame> co = cacheObjectMap.get(dataTime);
|
||||
CacheObject<LightningFrameMetadata, LightningFrame> co = cacheObjectMap
|
||||
.get(dataTime);
|
||||
if (co != null) {
|
||||
LightningFrameMetadata metadata = co.getMetadata();
|
||||
synchronized (metadata) {
|
||||
|
@ -468,13 +467,12 @@ public class LightningResource extends
|
|||
Map<DataTime, List<BinLightningRecord>> recordMap = new HashMap<DataTime, List<BinLightningRecord>>();
|
||||
|
||||
for (BinLightningRecord obj : objs) {
|
||||
long duration = obj.getDataTime().getValidPeriod()
|
||||
.getDuration();
|
||||
if (duration > MAX_RECORD_BIN_MILLIS) {
|
||||
statusHandler.error("Record bin time larger than maximum "
|
||||
+ "supported period. Skipping record: " + obj);
|
||||
continue;
|
||||
}
|
||||
long duration = obj.getDataTime().getValidPeriod().getDuration();
|
||||
if (duration > MAX_RECORD_BIN_MILLIS) {
|
||||
statusHandler.error("Record bin time larger than maximum "
|
||||
+ "supported period. Skipping record: " + obj);
|
||||
continue;
|
||||
}
|
||||
DataTime time = new DataTime(obj.getStartTime());
|
||||
DataTime end = new DataTime(obj.getStopTime());
|
||||
time = this.getResourceData().getBinOffset()
|
||||
|
@ -518,7 +516,8 @@ public class LightningResource extends
|
|||
* no local reference to cache object, create key and get
|
||||
* cache object which may be new or from another resource
|
||||
*/
|
||||
LightningFrameMetadata key = new LightningFrameMetadata(dt,
|
||||
LightningFrameMetadata key = new LightningFrameMetadata(
|
||||
resourceData.getSource(), dt,
|
||||
resourceData.getBinOffset());
|
||||
co = CacheObject.newCacheObject(key, retriever);
|
||||
cacheObjectMap.put(dt, co);
|
||||
|
|
|
@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
|
||||
import com.raytheon.uf.common.dataplugin.binlightning.LightningConstants;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -47,7 +48,7 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
|||
* Feb 27, 2013 DCS 152 jgerth Support for WWLLN and multiple sources
|
||||
* Jun 19, 2014 3214 bclement added pulse and cloud flash support
|
||||
* Jul 07, 2014 3333 bclement removed plotLightSource field
|
||||
*
|
||||
* Mar 05, 2015 4233 bsteffen include source in cache key.
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -208,6 +209,15 @@ public class LightningResourceData extends AbstractRequestableResourceData {
|
|||
this.countPosition = countPosition;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
if (metadataMap != null
|
||||
&& metadataMap.containsKey(LightningConstants.SOURCE)) {
|
||||
return metadataMap.get(LightningConstants.SOURCE)
|
||||
.getConstraintValue();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 9, 2014 3333 bclement moved from LightningResource
|
||||
* Mar 05, 2015 4233 bsteffen include source in cache key.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,6 +45,8 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
*/
|
||||
public class LightningFrameMetadata {
|
||||
|
||||
private final String source;
|
||||
|
||||
private final BinOffset offset;
|
||||
|
||||
private final DataTime frameTime;
|
||||
|
@ -52,7 +55,9 @@ public class LightningFrameMetadata {
|
|||
|
||||
private final List<BinLightningRecord> processed = new ArrayList<BinLightningRecord>();
|
||||
|
||||
public LightningFrameMetadata(DataTime frameTime, BinOffset offset) {
|
||||
public LightningFrameMetadata(String source, DataTime frameTime,
|
||||
BinOffset offset) {
|
||||
this.source = source;
|
||||
this.frameTime = frameTime;
|
||||
this.offset = offset;
|
||||
}
|
||||
|
@ -92,6 +97,7 @@ public class LightningFrameMetadata {
|
|||
result = prime * result
|
||||
+ ((frameTime == null) ? 0 : frameTime.hashCode());
|
||||
result = prime * result + ((offset == null) ? 0 : offset.hashCode());
|
||||
result = prime * result + ((source == null) ? 0 : source.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -114,6 +120,11 @@ public class LightningFrameMetadata {
|
|||
return false;
|
||||
} else if (!offset.equals(other.offset))
|
||||
return false;
|
||||
if (source == null) {
|
||||
if (other.source != null)
|
||||
return false;
|
||||
} else if (!source.equals(other.source))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.viz.mpe.util.ReadTemperatureStationList;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 31, 2009 snaples Initial creation
|
||||
* Feb 5, 2015 17101 snaples Updated max_stations to use size of dqc.precip_stations.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -72,13 +73,9 @@ public class GroupEditCalls {
|
|||
|
||||
int pcpn_time = dqc.pcpn_time;
|
||||
|
||||
ReadPrecipStationList rp = new ReadPrecipStationList();
|
||||
int max_stations = dqc.precip_stations.size();
|
||||
|
||||
ReadTemperatureStationList rt = new ReadTemperatureStationList();
|
||||
|
||||
int max_stations = rp.getNumPstations();
|
||||
|
||||
int max_tstations = rt.getNumTstations();
|
||||
int max_tstations = dqc.temperature_stations.size();
|
||||
|
||||
public void apply_group()
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
|
||||
* Feb 4, 2015 17094 cgobs Fix for fieldType being too long for mapx_field_type column in RWResult table.
|
||||
* </pre>
|
||||
**/
|
||||
package com.raytheon.viz.mpe.ui.actions;
|
||||
|
@ -33,8 +34,10 @@ import java.io.IOException;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageWriter;
|
||||
|
@ -337,7 +340,10 @@ public class SaveBestEstimate {
|
|||
Rwresult pRWResultNode = pRWResultHead.get(0);
|
||||
|
||||
/* Update the elements in the RWResult node. */
|
||||
pRWResultNode.setMapxFieldType(fldtype);
|
||||
|
||||
fldtype = checkAndModifyMapxFieldType(fldtype);
|
||||
|
||||
pRWResultNode.setMapxFieldType(fldtype.toLowerCase());
|
||||
pRWResultNode.setAutoSave(asave);
|
||||
pRWResultNode.setDrawPrecip(drpr);
|
||||
pRWResultNode.setLastSaveTime(SimulatedTime.getSystemTime()
|
||||
|
@ -359,4 +365,32 @@ public class SaveBestEstimate {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
private static String checkAndModifyMapxFieldType(String fieldType) {
|
||||
|
||||
// This method changes fieldType to lowercase.
|
||||
// It also shortens fieldTypes as needed to fit into the mapx_field_type column in the RWResult table.
|
||||
// Note: the mapx_field_type column is informational only. It is not used by the code
|
||||
// other than reading and writing from and to the database.
|
||||
|
||||
String newFieldType = null;
|
||||
String lowerCaseFieldType = fieldType.toLowerCase();
|
||||
|
||||
final Map<String,String> conversionTable = new HashMap<String , String>();
|
||||
|
||||
conversionTable.put("localfield1", "localfld1");
|
||||
conversionTable.put("localfield2", "localfld2");
|
||||
conversionTable.put("localfield3", "localfld3");
|
||||
|
||||
conversionTable.put("avgrdmosaic", "avgrdmos");
|
||||
conversionTable.put("maxrdmosaic", "maxrdmos");
|
||||
|
||||
|
||||
newFieldType = conversionTable.get(lowerCaseFieldType);
|
||||
if (newFieldType == null)
|
||||
{
|
||||
newFieldType = lowerCaseFieldType;
|
||||
}
|
||||
return newFieldType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||
* Apr 28, 2014 16707 snaples Added code to save and set location of dialog box when moved.
|
||||
* Jan 12, 2015 16993 snaples Restored code for Substitute Field Combo box.
|
||||
*
|
||||
* Feb 26, 2015 17209 cgobs Ensured that there is an initial selection of Substitution field, prevents empty selection.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -387,16 +387,22 @@ public class DrawPolygonDlg extends CaveSWTDialog {
|
|||
// spaceLabel.setText("***** ");
|
||||
|
||||
int selectedFieldIndex = 0;
|
||||
|
||||
boolean found = false;
|
||||
//find the index of the selected field
|
||||
for (selectedFieldIndex = 0; selectedFieldIndex < displayFieldDataArray.length; selectedFieldIndex++)
|
||||
{
|
||||
if (displayFieldDataArray[selectedFieldIndex] == subType)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
selectedFieldIndex = 0;
|
||||
}
|
||||
|
||||
//create and initialize the display field type name array
|
||||
displayTypeNameArray = new String[displayFieldDataArray.length];
|
||||
|
||||
|
@ -411,27 +417,42 @@ public class DrawPolygonDlg extends CaveSWTDialog {
|
|||
fieldTypeCombo.setTextLimit(35);
|
||||
fieldTypeCombo.setLayoutData(gd);
|
||||
fieldTypeCombo.setItems(displayTypeNameArray);
|
||||
fieldTypeCombo.select(selectedFieldIndex);
|
||||
// fieldTypeCombo.select(selectedFieldIndex);
|
||||
|
||||
fieldTypeCombo.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
String selectedFieldString = fieldTypeCombo.getText();
|
||||
|
||||
setSubstitutionField();
|
||||
|
||||
// String selectedFieldString = fieldTypeCombo.getText();
|
||||
|
||||
// System.out.println("DrawPolygon.createFieldCombo(): selectedFieldString = " +
|
||||
// selectedFieldString);
|
||||
|
||||
subType = DisplayFieldData.fromDisplayNameString(selectedFieldString);
|
||||
// subType = DisplayFieldData.fromDisplayNameString(selectedFieldString);
|
||||
|
||||
// if (subType != null)
|
||||
// {
|
||||
// System.out.println("DrawPolygon.createFieldCombo(): subType = " +
|
||||
// subType.toString());
|
||||
// }
|
||||
// {
|
||||
// System.out.println("DrawPolygon.createFieldCombo(): subType = " +
|
||||
// subType.toString());
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//select the substitution field
|
||||
|
||||
fieldTypeCombo.select(selectedFieldIndex);
|
||||
setSubstitutionField();
|
||||
|
||||
}
|
||||
|
||||
private void setSubstitutionField()
|
||||
{
|
||||
String selectedFieldString = fieldTypeCombo.getText();
|
||||
subType = DisplayFieldData.fromDisplayNameString(selectedFieldString);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -160,7 +160,7 @@ public class BestEstimate1HrQpeDlg extends BasePostAnalysisDlg {
|
|||
applyGridAdjustments(adjustedGrid, biasRatioGrid, disaggGrid);
|
||||
|
||||
float[] dataArray = paMgr.convertToSingleArray(adjustedGrid, false, true);
|
||||
short[] shortArray= paMgr.convertToShortArray(dataArray, 100.0f);
|
||||
short[] shortArray= paMgr.convertToShortArray(dataArray, 1.0f);
|
||||
|
||||
XmrgFile file = new XmrgFile();
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* December 2013 DCS 167 C. Gobs Initial version
|
||||
*
|
||||
* February 2015 C. Gobs Fixed issue with parsing unexpected file name formats in xmrg directory
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
|
@ -156,6 +156,7 @@ public class PostAnalysisManager
|
|||
try
|
||||
{
|
||||
shiftedDate = utcSdf2.parse(timeString);
|
||||
longTime = shiftedDate.getTime();
|
||||
}
|
||||
catch(ParseException e)
|
||||
{
|
||||
|
@ -164,7 +165,7 @@ public class PostAnalysisManager
|
|||
|
||||
}
|
||||
|
||||
longTime = shiftedDate.getTime();
|
||||
|
||||
|
||||
return longTime;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Station;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 9, 2009 snaples Initial creation
|
||||
* Feb 5, 2015 17101 snaples Fixed issue with writing zero length bad values file.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -51,8 +52,7 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Station;
|
|||
public class BadValues {
|
||||
BufferedReader in = null;
|
||||
DailyQcUtils dqc = DailyQcUtils.getInstance();
|
||||
ReadPrecipStationList rp = new ReadPrecipStationList();
|
||||
private int max_stations = rp.getNumPstations();
|
||||
private int max_stations = dqc.precip_stations.size();
|
||||
|
||||
|
||||
public void read_bad_values(String precd, int m) {
|
||||
|
@ -194,7 +194,7 @@ public class BadValues {
|
|||
// ier=sprintf(ibuf,"%s %s %d %f\n",bad_values[i].hb5,bad_values[i].parm,
|
||||
// bad_values[i].quart,bad_values[i].fvalue);
|
||||
|
||||
ibuf = String.format("%s %s %d %f", bad_values[i].hb5,
|
||||
ibuf = String.format("%s %s %d %4.2f", bad_values[i].hb5,
|
||||
bad_values[i].parm, bad_values[i].quart,
|
||||
bad_values[i].fvalue);
|
||||
out.write(ibuf);
|
||||
|
|
|
@ -41,6 +41,7 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Station;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 11, 2009 snaples Initial creation
|
||||
* Feb 5, 2015 17101 snaples Updated max_stations to use size of dqc.precip_stations.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,8 +69,7 @@ public class GetBadSnotel {
|
|||
/* Retrieve the number of days to QC data for. */
|
||||
num_qc_days = dqc.qcDays;
|
||||
|
||||
ReadPrecipStationList pl = new ReadPrecipStationList();
|
||||
int max_stations = pl.getNumPstations();
|
||||
int max_stations = dqc.precip_stations.size();
|
||||
// Pdata[] pdata = DailyQcUtils.pdata;
|
||||
|
||||
for (j = 0; j < num_qc_days; j++) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.viz.mpe.util.DailyQcUtils.Station;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 23, 2009 snaples Initial creation
|
||||
* Feb 3, 2015 16993 snaples Fixed if condition on cparm.
|
||||
* Mar 2, 2015 15660 snaples Fixed issue with if statement testing CPARM and checking for both values to be true, broken logic.
|
||||
*
|
||||
* </pre>
|
||||
|
|
|
@ -43,8 +43,9 @@ import com.raytheon.viz.mpe.core.MPEDataManager;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 24, 2009 snaples Initial creation
|
||||
* April , 2012 8672 lbousaidi fixed the reading of the PRISM data.
|
||||
* Mar 2, 2015 15660 snaples Fixed problem with color scale using wrong values. Causing grids to be all zeros.
|
||||
* April , 2012 8672 lbousaidi fixed the reading of the PRISM data.
|
||||
* Feb 3, 2015 16993 snaples fixed color scale data conversion issue.
|
||||
* Mar 2, 2015 15660 snaples Fixed problem with color scale using wrong values. Causing grids to be all zeros.
|
||||
* </pre>
|
||||
*
|
||||
* @author snaples
|
||||
|
|
|
@ -45,6 +45,7 @@ import com.raytheon.uf.common.colormap.prefs.DataMappingPreferences;
|
|||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.satellite.SatMapCoverage;
|
||||
import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord;
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.generic.GenericPixel;
|
||||
import com.raytheon.uf.common.geospatial.IGridGeometryProvider;
|
||||
import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
|
||||
import com.raytheon.uf.common.geospatial.data.GeographicDataSource;
|
||||
|
@ -123,6 +124,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Jun 12, 2014 3238 bsteffen Implement Interrogatable
|
||||
* Aug 21, 2014 DR 17313 jgerth Set no data value if no data mapping
|
||||
* Oct 15, 2014 3681 bsteffen create renderable in interrogate if necessary.
|
||||
* Feb 17, 2015 4135 bsteffen Set no data value for derived products.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -396,8 +399,19 @@ public class SatResource extends
|
|||
if (persisted != null) {
|
||||
colorMapParameters.applyPersistedParameters(persisted);
|
||||
}
|
||||
if (colorMapParameters.getDataMapping() == null)
|
||||
colorMapParameters.setNoDataValue(0);
|
||||
if (colorMapParameters.getDataMapping() == null) {
|
||||
if (unit instanceof GenericPixel) {
|
||||
/**
|
||||
* Generic Pixel only comes from derived parameter which used
|
||||
* signed data so 0 is valid but -128 is used as a no data
|
||||
* value.
|
||||
*/
|
||||
colorMapParameters.setNoDataValue(Byte.MIN_VALUE);
|
||||
} else {
|
||||
colorMapParameters.setNoDataValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getCapability(ColorMapCapability.class).setColorMapParameters(
|
||||
colorMapParameters);
|
||||
|
|
|
@ -64,6 +64,7 @@ import com.raytheon.uf.viz.personalities.cave.component.CAVEApplication;
|
|||
* startComponent.
|
||||
* Aug 26, 2014 3356 njensen Explicitly set localization adapter
|
||||
* Sep 10, 2014 3612 mschenke Refactored to extend CAVEApplication
|
||||
* Feb 23, 2015 4164 dlovely Extracted AlertViz initialize.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -200,6 +201,13 @@ public abstract class AbstractAWIPSComponent extends CAVEApplication {
|
|||
@Override
|
||||
protected void initializeObservers() {
|
||||
super.initializeObservers();
|
||||
initializeAlertViz();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize AlertViz.
|
||||
*/
|
||||
protected void initializeAlertViz() {
|
||||
// Setup AlertViz observer
|
||||
if ((getRuntimeModes() & ALERT_VIZ) != 0) {
|
||||
// Set up alertviz
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<vbSource key="Guam-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="GWW233" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HurWind250" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HI-MOSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="MOSGuide-HI" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HI-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HI-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
<vbSource key="HPCqpfNDFD" category="SfcGrid" views="PLANVIEW TIMESERIES" />
|
||||
|
|
|
@ -51,7 +51,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 20, 2014 3353 rferrel Initial creation
|
||||
*
|
||||
* Feb 26, 2015 3353 rjpeter Make modal optional.
|
||||
* </pre>
|
||||
*
|
||||
* @author rferrel
|
||||
|
@ -71,9 +71,10 @@ public class GenerateGeoDataSetDialog extends CaveSWTDialog {
|
|||
* @param parentShell
|
||||
* @param site
|
||||
* @param gmd
|
||||
* @param modal
|
||||
*/
|
||||
protected GenerateGeoDataSetDialog(Shell parentShell, String site,
|
||||
GeospatialMetadata gmd) {
|
||||
GeospatialMetadata gmd, boolean modal) {
|
||||
/*
|
||||
* This needs to be a blocking dialog. The return value is used to
|
||||
* placed an entry in WarngenLayer's siteMap. Several layers of calls in
|
||||
|
@ -84,7 +85,8 @@ public class GenerateGeoDataSetDialog extends CaveSWTDialog {
|
|||
* way of being informed when the siteMap is updated. Also synchronize
|
||||
* on siteMap become more complicated.
|
||||
*/
|
||||
super(parentShell, SWT.PRIMARY_MODAL | SWT.BORDER, CAVE.NONE);
|
||||
super(parentShell, (modal ? SWT.PRIMARY_MODAL : 0) | SWT.BORDER,
|
||||
CAVE.NONE);
|
||||
this.site = site;
|
||||
this.gmd = gmd;
|
||||
}
|
||||
|
|
|
@ -121,18 +121,18 @@ import com.vividsolutions.jts.geom.Polygon;
|
|||
* Apr 27, 2011 #9250 bkowal getStyle and getName are now used to
|
||||
* get the style and name associated with
|
||||
* a FontData object.
|
||||
* Apr 16, 2012 #14515 Qinglu Lin Added return at the beginning of changeTemplate()
|
||||
* Apr 16, 2012 #14515 Qinglu Lin Added return at the beginning of changeTemplate()
|
||||
* if the newly selected product is same as current one.
|
||||
* Jul 10, 2012 #15099 Qinglu Lin Add updatePolygon() and apply it in xxxSelected methods.
|
||||
* Jul 10, 2012 #15099 Qinglu Lin Add updatePolygon() and apply it in xxxSelected methods.
|
||||
* Jul 26, 2012 #15227 Qinglu Lin Added removeDuplicateVertices(), removeOverlaidSegments(),
|
||||
* adjustLatLon(), etc.
|
||||
* Sep 05, 2012 DR 15261 D. Friedman Prevent additional counties from being selected for EXPs
|
||||
* Sep 27, 2012 #1196 rferrel Refactored to use non-blocking dialogs
|
||||
* Oct 03, 2012 DR 15426 Qinglu Lin Unlock WarnGen GUI for COR, implemented in corSelected();
|
||||
* but lock immediate cause, implemented in individual template.
|
||||
* Nov 02, 2012 DR 15455 Qinglu Lin Added warngenLayer.setWarningAction() in resetPressed()
|
||||
* Nov 02, 2012 DR 15455 Qinglu Lin Added warngenLayer.setWarningAction() in resetPressed()
|
||||
* and in updateListSelected().
|
||||
* Dec 20, 2012 DR 15537 Qinglu Lin Changed the assigned value to trackEditable from false
|
||||
* Dec 20, 2012 DR 15537 Qinglu Lin Changed the assigned value to trackEditable from false
|
||||
* to true in boxSelected().
|
||||
* Jan 24, 2013 DR 15723 Qinglu Lin Invoked WarngenLayer's initRemovedGids().
|
||||
* Feb 7, 2013 DR 15799 Qinglu Lin Added setPolygonLocked(false) to conSelected(), newSelected(); added
|
||||
|
@ -158,6 +158,7 @@ import com.vividsolutions.jts.geom.Polygon;
|
|||
* May 09, 2014 DR16694 m.gamazaychikov Fixed disabled duration menu after creating text for a COR SVS.
|
||||
* Jul 01, 2014 DR 17450 D. Friedman Use list of templates from backup site.
|
||||
* Jul 21, 2014 3419 jsanchez Created a hidden button to make recreating polygons easier.
|
||||
* Feb 26, 2015 3353 rjpeter Fixed NPE on clear.
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -172,7 +173,7 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
* This flag allows a hidden button to appear to help recreating warning
|
||||
* polygons that had issues in the feed.
|
||||
*/
|
||||
private boolean debug = false;
|
||||
private final boolean debug = false;
|
||||
|
||||
private static final int BULLET_WIDTH = 390;
|
||||
|
||||
|
@ -181,7 +182,7 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
private static final int FONT_HEIGHT = 9;
|
||||
|
||||
private class TemplateRunnerInitJob extends Job {
|
||||
private String site;
|
||||
private final String site;
|
||||
|
||||
public TemplateRunnerInitJob() {
|
||||
super("Template Runner Initialization");
|
||||
|
@ -1132,16 +1133,18 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
|
||||
if ((followupData != null)
|
||||
&& (WarningAction.valueOf(followupData.getAct()) == WarningAction.NEW)) {
|
||||
if (!redrawFromWarned())
|
||||
if (!redrawFromWarned()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (((followupData == null) || ((WarningAction.valueOf(followupData
|
||||
.getAct()) == WarningAction.CON) && warngenLayer
|
||||
.conWarnAreaChanged(followupData)))
|
||||
&& !polygonLocked && !trackLocked) {
|
||||
if (!redrawFromWarned())
|
||||
if (!redrawFromWarned()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Need to check again because redraw may have failed.
|
||||
|
@ -1313,7 +1316,8 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
warngenLayer.resetState();
|
||||
warngenLayer.getStormTrackState().duration = ((DurationData) durationList
|
||||
.getData(durationList.getItem(durationList.getSelectionIndex()))).minutes;
|
||||
durationList.setEnabled(warngenLayer.getConfiguration().isEnableDuration());
|
||||
durationList.setEnabled(warngenLayer.getConfiguration()
|
||||
.isEnableDuration());
|
||||
if (lineOfStorms.getSelection()) {
|
||||
selectLineOfStorms();
|
||||
} else {
|
||||
|
@ -1587,7 +1591,9 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
warngenLayer.setOldWarningPolygon(null);
|
||||
warngenLayer.resetInitialFrame();
|
||||
warngenLayer.setTemplateName(templateName);
|
||||
warngenLayer.state.followupData = null;
|
||||
if (warngenLayer.state != null) {
|
||||
warngenLayer.state.followupData = null;
|
||||
}
|
||||
warngenLayer.getStormTrackState().endTime = null;
|
||||
damBreakInstruct = null;
|
||||
extEndTime = null;
|
||||
|
|
|
@ -154,24 +154,24 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* 02/01/2012 DR 14491 D. Friedman Load/unload only the maps not already loaded
|
||||
* 02/28/2012 DR 13596 Qinglu Lin Call GisUtil.restoreAlaskaLon() in figurePoint().
|
||||
* 03/19/2012 DR 14690 Qinglu Lin While newHatchedArea==null, handle the polygon differently
|
||||
* for initial warning and followup (CON); and
|
||||
* for initial warning and followup (CON); and
|
||||
* convert ratio to percentage while doing comparison.
|
||||
* 10/29/2012 DR 15479 Qinglu Lin Added code to call removeDuplicateCoordinate()
|
||||
* 10/29/2012 DR 15479 Qinglu Lin Added code to call removeDuplicateCoordinate()
|
||||
* in redrawBoxFromHatched().
|
||||
* 11/02/2012 DR 15455 Qinglu Lin Added setWarningAction(), called redrawBoxFromTrack() while
|
||||
* warningAction is neither null nor WarningAction.NEW, removed
|
||||
* some code from redrawBoxFromHatched().
|
||||
* warningAction is neither null nor WarningAction.NEW, removed
|
||||
* some code from redrawBoxFromHatched().
|
||||
* 11/15/2012 DR 15430 D. Friedman Use correct county/zone in createGeometryForWatches.
|
||||
* 11/29/2012 DR 15571 Qinglu Lin Called compuateCurrentStormCenter() in getStormLocations();
|
||||
* For CON, CAN, and COR, calculate Coordinate array, cc, specifically in
|
||||
* For CON, CAN, and COR, calculate Coordinate array, cc, specifically in
|
||||
* getStormLocations().
|
||||
* 12/10/2012 DR 15571 Qinglu Lin Change warningAction's initialization from null to WarningAction.NEW, and add code
|
||||
* in getStormLocations() for handling case when warningAction equals WarningAction.NEW;
|
||||
* 12/13/2012 DR 15559 Qinglu Lin Added code to call WarngenUIState's adjustPolygon().
|
||||
* 12/17/2012 DR 15571 Qinglu Lin For hydro products,futurePoints is null. Resolved an issue caused by trying to get
|
||||
* 12/17/2012 DR 15571 Qinglu Lin For hydro products,futurePoints is null. Resolved an issue caused by trying to get
|
||||
* Coordinate[] from futurePoints.
|
||||
* 12/18/2012 DR 15571 Qinglu Lin Resolved coordinate issue in TML line caused by clicking Restart button.
|
||||
* 01/24/2013 DR 15723 Qinglu Lin Added initRemovedGids() and updated updateWarnedAreas() to prevent the removed
|
||||
* 01/24/2013 DR 15723 Qinglu Lin Added initRemovedGids() and updated updateWarnedAreas() to prevent the removed
|
||||
* counties from being re-hatched.
|
||||
* 03/06/2013 DR 15831 D. Friedman Use area inclusion filter in followups.
|
||||
* 03/28/2013 DR 15973 Qinglu Lin Added adjustVertex() and applied it invalid polygon.
|
||||
|
@ -207,12 +207,12 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* 12/17/2013 DR 16567 Qinglu Lin Added findLargestGeometry() and findLargestQuadrant(), and updated
|
||||
* populateStrings() and paintText().
|
||||
* 01/09/2014 DR 16974 D. Friedman Improve followup redraw-from-hatched-area polygons.
|
||||
* 02/07/2014 DR16090 m.gamazaychikov Added GeomMetaDataUpdateNotificationObserver class to get notification
|
||||
* 02/07/2014 DR16090 m.gamazaychikov Added GeomMetaDataUpdateNotificationObserver class to get notification
|
||||
* when geometry file get updated to re-read them in.
|
||||
* 02/19/2014 2819 randerso Removed unnecessary .clone() call
|
||||
* 03/17/2014 DR 16309 Qinglu Lin Updated getWarningAreaFromPolygon(); changed searchCountyGeospatialDataAccessor) to
|
||||
* 03/17/2014 DR 16309 Qinglu Lin Updated getWarningAreaFromPolygon(); changed searchCountyGeospatialDataAccessor) to
|
||||
* searchGeospatialDataAccessor() and updated it; changed getCountyGeospatialDataAcessor()
|
||||
* to getGeospatialDataAcessor(); changed getAllCountyUgcs() to getAllUgcs(); changed
|
||||
* to getGeospatialDataAcessor(); changed getAllCountyUgcs() to getAllUgcs(); changed
|
||||
* getUgcsForWatches() to getUgcsForCountyWatches().
|
||||
* 04/15/2014 DR 17247 D. Friedman Rework error handling in AreaHatcher.
|
||||
* 04/23/2014 DR 16356 Qinglu Lin Updated initializeState() and added reset().
|
||||
|
@ -221,7 +221,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* 06/23/2014 DR16322 m.gamazaychikov Fix Warngen unloading previously loaded maps.
|
||||
* 07/01/2014 DR 17450 D. Friedman Use list of templates from backup site.
|
||||
* 07/24/2014 3429 mapeters Updated deprecated drawLine() calls.
|
||||
* 07/28/2014 DR 17475 Qinglu Lin Updated populateStrings() and findLargestQuadrant(), removed findLargestGeometry(),
|
||||
* 07/28/2014 DR 17475 Qinglu Lin Updated populateStrings() and findLargestQuadrant(), removed findLargestGeometry(),
|
||||
* added createAreaAndCentroidMaps() and movePopulatePt(), updated paintText() to center W.
|
||||
* 08/01/2014 3471 mapeters Updated deprecated createShadedShape() calls.
|
||||
* 08/20/2014 3353 rferrel Generating Geo Spatial data set no longer on the UI thread.
|
||||
|
@ -233,6 +233,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* 09/17/2014 ASM #15465 Qinglu Lin get backupOfficeShort and backupOfficeLoc from backup WFO config.xml, and pop up AlertViz if
|
||||
* any of them is missing.
|
||||
* 11/03/2014 3353 rferrel Ignore GeoSpatialData notification when this is the instance layer will do an update.
|
||||
* 02/25/2014 3353 rjpeter Fix synchronized use case, updated to not create dialog before init is finished.
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
|
@ -285,9 +286,13 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
|
||||
public GeospatialDataAccessor(GeospatialDataList geoData,
|
||||
AreaSourceConfiguration areaConfig) {
|
||||
if ((geoData == null) || (areaConfig == null)) {
|
||||
if (geoData == null) {
|
||||
throw new IllegalArgumentException(
|
||||
"GeospatialDataAccessor must not be null");
|
||||
"GeospatialDataAccessor must have geospatial data, geoData is null.");
|
||||
}
|
||||
if (areaConfig == null) {
|
||||
throw new IllegalArgumentException(
|
||||
"GeospatialDataAccessor must have area source configuration, areaConfig is null.");
|
||||
}
|
||||
this.geoData = geoData;
|
||||
this.areaConfig = areaConfig;
|
||||
|
@ -385,7 +390,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
|
||||
private class CustomMaps extends Job {
|
||||
|
||||
private Set<String> customMaps = new HashSet<String>();
|
||||
private final Set<String> customMaps = new HashSet<>();
|
||||
|
||||
private Set<String> mapsToLoad;
|
||||
|
||||
|
@ -479,7 +484,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
this.warningArea = this.warningPolygon = null;
|
||||
}
|
||||
|
||||
if (warningArea != null && warningPolygon != null) {
|
||||
if ((warningArea != null) && (warningPolygon != null)) {
|
||||
Polygon inputWarningPolygon = warningPolygon;
|
||||
Polygon outputHatchedArea = null;
|
||||
Geometry outputHatchedWarningArea = null;
|
||||
|
@ -518,7 +523,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
adjustPolygon_counter += 1;
|
||||
}
|
||||
int counter = 0;
|
||||
if (!outputHatchedArea.isValid() && counter < 2) {
|
||||
if (!outputHatchedArea.isValid() && (counter < 2)) {
|
||||
System.out
|
||||
.println("calling adjustVertex & alterVertexes: loop #"
|
||||
+ counter);
|
||||
|
@ -541,7 +546,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
int inner_counter = 0;
|
||||
System.out.println("");
|
||||
while (!outputHatchedArea.isValid()
|
||||
&& inner_counter < 5) {
|
||||
&& (inner_counter < 5)) {
|
||||
System.out
|
||||
.println(" Calling alterVertexes #"
|
||||
+ inner_counter);
|
||||
|
@ -670,14 +675,11 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
Object payload = message.getMessagePayload();
|
||||
if (payload instanceof GenerateGeospatialDataResult) {
|
||||
GenerateGeospatialDataResult result = (GenerateGeospatialDataResult) payload;
|
||||
synchronized (warngenLayer.ignoreNotifications) {
|
||||
synchronized (siteMap) {
|
||||
String curKey = result.getArea() + "."
|
||||
+ result.getSite();
|
||||
|
||||
if (warngenLayer.ignoreNotifications
|
||||
.contains(curKey)) {
|
||||
warngenLayer.ignoreNotifications.remove(curKey);
|
||||
} else {
|
||||
if (warngenLayer.ignoreNotifications.remove(curKey) == false) {
|
||||
siteMap.remove(curKey);
|
||||
initWarngen = true;
|
||||
}
|
||||
|
@ -1288,20 +1290,24 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
if (dataSet != null) {
|
||||
updateGeoData(gData, dataSet, gmd, currKey, tq0);
|
||||
} else {
|
||||
// This makes sure dialog exists and is open
|
||||
createDialog();
|
||||
|
||||
/*
|
||||
* Add to list prior to opening the genDialog. That
|
||||
* way if the notfication arrives prior to or after
|
||||
* closing the genDialog the notfication will be
|
||||
* ignored.
|
||||
*/
|
||||
synchronized (ignoreNotifications) {
|
||||
ignoreNotifications.add(currKey);
|
||||
ignoreNotifications.add(currKey);
|
||||
GenerateGeoDataSetDialog genDialog = null;
|
||||
|
||||
if (dialog != null && dialog.isDisposed() == false) {
|
||||
genDialog = new GenerateGeoDataSetDialog(
|
||||
dialog.getShell(), site, gmd, true);
|
||||
} else {
|
||||
genDialog = new GenerateGeoDataSetDialog(
|
||||
PlatformUI.getWorkbench()
|
||||
.getActiveWorkbenchWindow()
|
||||
.getShell(), site, gmd, false);
|
||||
}
|
||||
GenerateGeoDataSetDialog genDialog = new GenerateGeoDataSetDialog(
|
||||
dialog.getShell(), site, gmd);
|
||||
|
||||
// Assume this is a blocking dialog.
|
||||
genDialog.open();
|
||||
|
@ -1513,7 +1519,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
"Unable to load local WarnGen configuration.", e);
|
||||
}
|
||||
}
|
||||
if (dc != null && dialogConfig != null) {
|
||||
if ((dc != null) && (dialogConfig != null)) {
|
||||
dialogConfig.setDefaultTemplate(dc.getDefaultTemplate());
|
||||
dialogConfig.setMainWarngenProducts(dc.getMainWarngenProducts());
|
||||
dialogConfig.setOtherWarngenProducts(dc.getOtherWarngenProducts());
|
||||
|
@ -1523,12 +1529,12 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
boolean shortTag = false;
|
||||
boolean locTag = false;
|
||||
String infoType = null;
|
||||
if (backupOfficeShort == null
|
||||
|| backupOfficeShort.trim().length() == 0) {
|
||||
if ((backupOfficeShort == null)
|
||||
|| (backupOfficeShort.trim().isEmpty())) {
|
||||
shortTag = true;
|
||||
}
|
||||
if (backupOfficeLoc == null
|
||||
|| backupOfficeLoc.trim().length() == 0) {
|
||||
if ((backupOfficeLoc == null)
|
||||
|| (backupOfficeLoc.trim().isEmpty())) {
|
||||
locTag = true;
|
||||
}
|
||||
if (shortTag && locTag) {
|
||||
|
@ -1654,8 +1660,9 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
throws Exception {
|
||||
Set<String> ugcs = new HashSet<String>();
|
||||
GeospatialDataAccessor gda = getGeospatialDataAcessor(type);
|
||||
for (String fips : gda.getAllFipsInArea(gda.buildArea(polygon)))
|
||||
for (String fips : gda.getAllFipsInArea(gda.buildArea(polygon))) {
|
||||
ugcs.add(FipsUtil.getUgcFromFips(fips));
|
||||
}
|
||||
return ugcs;
|
||||
}
|
||||
|
||||
|
@ -1682,13 +1689,14 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
* changed again? A ticket should be opened for this to be resolved.
|
||||
*/
|
||||
String templateName;
|
||||
if (type == GeoFeatureType.COUNTY)
|
||||
if (type == GeoFeatureType.COUNTY) {
|
||||
templateName = "tornadoWarning";
|
||||
else if (type == GeoFeatureType.MARINE)
|
||||
} else if (type == GeoFeatureType.MARINE) {
|
||||
templateName = "specialMarineWarning";
|
||||
else
|
||||
} else {
|
||||
throw new IllegalArgumentException(
|
||||
"Unsupported geo feature type " + type);
|
||||
}
|
||||
WarngenConfiguration config = WarngenConfiguration.loadConfig(
|
||||
templateName, getLocalizedSite(), null);
|
||||
loadGeodataForConfiguration(config);
|
||||
|
@ -3369,7 +3377,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
}
|
||||
areaM = warningAreaM.getArea();
|
||||
geomIndex = i;
|
||||
while (i + 1 < geomNum) {
|
||||
while ((i + 1) < geomNum) {
|
||||
warningAreaN = warningArea.getGeometryN(i + 1);
|
||||
prefixN = GeometryUtil.getPrefix(warningAreaN.getUserData());
|
||||
if (prefixN.equals(prefixM)) {
|
||||
|
@ -3404,7 +3412,8 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
warningAreaM = warningArea.getGeometryN(iter.next().intValue());
|
||||
prefixM = GeometryUtil.getPrefix(warningAreaM.getUserData());
|
||||
area = warningAreaM.getArea();
|
||||
if (area < minArea || area / geomArea.get(prefixM) < threshold) {
|
||||
if ((area < minArea)
|
||||
|| ((area / geomArea.get(prefixM)) < threshold)) {
|
||||
// Hatched area inside a county is small, move W toward to
|
||||
// default centroid
|
||||
centroid = movePopulatePt(gf, warningAreaM,
|
||||
|
@ -3423,7 +3432,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
geomN = gd.getGeometry();
|
||||
CountyUserData cud = (CountyUserData) geomN.getUserData();
|
||||
prefixN = cud.gid;
|
||||
if (prefixN.length() > 0 && prefixM.length() > 0
|
||||
if ((prefixN.length() > 0) && (prefixM.length() > 0)
|
||||
&& !prefixN.equals(prefixM)) {
|
||||
if (GeometryUtil.contains(geomN, populatePtGeom)) {
|
||||
// W is inside a county. Use default centroid of a
|
||||
|
@ -3436,7 +3445,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
}
|
||||
loop = 1;
|
||||
while (GeometryUtil.contains(geomN, populatePtGeom)
|
||||
&& loop < maxLoop) {
|
||||
&& (loop < maxLoop)) {
|
||||
// W is still inside a county, move W to the largest
|
||||
// quadrant
|
||||
warningAreaM = findLargestQuadrant(gf, warningAreaM);
|
||||
|
@ -3460,8 +3469,8 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
Point point, double weight) {
|
||||
Point centroid = geom.getCentroid();
|
||||
Coordinate coord = new Coordinate();
|
||||
coord.x = centroid.getX() * weight + point.getX() * (1.0 - weight);
|
||||
coord.y = centroid.getY() * weight + point.getY() * (1.0 - weight);
|
||||
coord.x = (centroid.getX() * weight) + (point.getX() * (1.0 - weight));
|
||||
coord.y = (centroid.getY() * weight) + (point.getY() * (1.0 - weight));
|
||||
return gf.createPoint(new Coordinate(coord.x, coord.y));
|
||||
}
|
||||
|
||||
|
@ -3767,9 +3776,9 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
;
|
||||
}
|
||||
}
|
||||
if (null != intersections[index] && intersections[index].isValid())
|
||||
if ((null != intersections[index]) && intersections[index].isValid()) {
|
||||
return intersections[index];
|
||||
else {
|
||||
} else {
|
||||
return geom;
|
||||
}
|
||||
}
|
||||
|
|
22
deltaScripts/14.4.1/DR4209/updateSatSpatialDiffTypes.sh
Normal file
22
deltaScripts/14.4.1/DR4209/updateSatSpatialDiffTypes.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# DR #4209 - this update script will convert the satellite_spatial dx and dy columns to double precision
|
||||
# This is only necessary on sites installed before 14.2 but there is no harm running it everywhere.
|
||||
|
||||
PSQL="/awips2/psql/bin/psql"
|
||||
|
||||
echo "INFO: Updating satellite spatial table"
|
||||
|
||||
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite_spatial ALTER COLUMN dx SET DATA TYPE double precision;"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to update column type for dx column of satellite_spatial table"
|
||||
echo "FATAL: The update has failed."
|
||||
exit 1
|
||||
fi
|
||||
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite_spatial ALTER COLUMN dy SET DATA TYPE double precision;"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to update column type for dy column of satellite_spatial table"
|
||||
echo "FATAL: The update has failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: Satellite spatial table successfully updated."
|
|
@ -4,128 +4,150 @@
|
|||
<property file="${basedir}/edex/common.properties" />
|
||||
<property file="${basedir}/edex/developer.properties" />
|
||||
<condition property="wa.enabled">
|
||||
<not><equals arg1="${wa.to.deploy}" arg2="" /></not>
|
||||
<not>
|
||||
<equals arg1="${wa.to.deploy}" arg2="" />
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
|
||||
<dirname property="antfile.dir" file="${ant.file}" />
|
||||
<echo message="ANT FILE DIR:${antfile.dir}"/>
|
||||
<echo message="ANT FILE DIR:${antfile.dir}" />
|
||||
<dirname property="base.dir" file="${antfile.dir}" />
|
||||
<echo message="BASE DIR:${base.dir}"/>
|
||||
<basename property="base.name" file="${base.dir}"/>
|
||||
<echo message="BASE NAME:${base.name}"/>
|
||||
<echo message="BASE DIR:${base.dir}" />
|
||||
<basename property="base.name" file="${base.dir}" />
|
||||
<echo message="BASE NAME:${base.name}" />
|
||||
<if>
|
||||
<equals arg1="${base.name}" arg2="edexOsgi" />
|
||||
<then>
|
||||
<!-- we are in the distributed development environment -->
|
||||
<echo message="BUILDING: in distributed development environment"/>
|
||||
<echo message="BUILDING: in distributed development environment" />
|
||||
<dirname property="awips.baseline.directory" file="${base.dir}" />
|
||||
<dirname property="git.directory" file="${awips.baseline.directory}" />
|
||||
<echo message="GIT.DIRECTORY:${git.directory}"/>
|
||||
<var name="repository.directories"
|
||||
value="${awips.baseline.directory}" />
|
||||
<echo message="GIT.DIRECTORY:${git.directory}" />
|
||||
<var name="repository.directories" value="${awips.baseline.directory}" />
|
||||
<for list="${core.repositories}" param="repo.directory">
|
||||
<sequential>
|
||||
<var name="repository.directories"
|
||||
value="${repository.directories},${git.directory}${file.separator}@{repo.directory}" />
|
||||
<var name="repository.directories" value="${repository.directories},${git.directory}${file.separator}@{repo.directory}" />
|
||||
</sequential>
|
||||
</for>
|
||||
<property name="tab" value=" "/>
|
||||
<echo level="info" message=" "/>
|
||||
<echo level="info" message="Deploy checks the following directories for source:"/>
|
||||
<echo level="info" message=" "/>
|
||||
<for list="${repository.directories}" param="repository.directory">
|
||||
<sequential>
|
||||
<echo level="info" message="${tab}@{repository.directory}" />
|
||||
<if>
|
||||
<not>
|
||||
<available file="@{repository.directory}" type="dir" />
|
||||
</not>
|
||||
<then>
|
||||
<echo level="error" message="${tab}@{repository.directory} does not exist!"/>
|
||||
<property name="missingDir"
|
||||
value="true" />
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
<if>
|
||||
<isset property="missingDir" />
|
||||
<then>
|
||||
<echo level="error" message=" "/>
|
||||
<echo level="error" message="Edit core.repositories=${core.repositories} in common.properties, rename source directories or create a symlink!"/>
|
||||
<echo level="error" message=" "/>
|
||||
<fail message="Unable to locate source directories."/>
|
||||
</then>
|
||||
</if>
|
||||
<echo level="info" message=" "/>
|
||||
|
||||
<echo message="${optional.repositories}"/>
|
||||
<for list="${optional.repositories}" param="repo.directory">
|
||||
<sequential>
|
||||
<if>
|
||||
<isset property="optional.directories" />
|
||||
<then>
|
||||
<var name="optional.directories" value="${optional.directories},${git.directory}${file.separator}@{repo.directory}" />
|
||||
</then>
|
||||
<else>
|
||||
<var name="optional.directories" value="${git.directory}${file.separator}@{repo.directory}" />
|
||||
</else>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
|
||||
<property name="tab" value=" " />
|
||||
<echo level="info" message=" " />
|
||||
<echo level="info" message="Deploy checks the following directories for source:" />
|
||||
<echo level="info" message=" " />
|
||||
<for list="${repository.directories}" param="repository.directory">
|
||||
<sequential>
|
||||
<echo level="info" message="${tab}@{repository.directory}" />
|
||||
<if>
|
||||
<not>
|
||||
<available file="@{repository.directory}" type="dir" />
|
||||
</not>
|
||||
<then>
|
||||
<echo level="error" message="${tab}@{repository.directory} does not exist!" />
|
||||
<property name="missingDir" value="true" />
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
<if>
|
||||
<isset property="missingDir" />
|
||||
<then>
|
||||
<echo level="error" message=" " />
|
||||
<echo level="error" message="Edit core.repositories=${core.repositories} in common.properties, rename source directories or create a symlink!" />
|
||||
<echo level="error" message=" " />
|
||||
<fail message="Unable to locate source directories." />
|
||||
</then>
|
||||
</if>
|
||||
<echo level="info" message=" " />
|
||||
</then>
|
||||
<else>
|
||||
<!-- all of the projects are in the workspace or one single directory -->
|
||||
<echo message="BUILDING: in workspace or flattened directory structure"/>
|
||||
<var name="awips.baseline.directory"
|
||||
value="${base.dir}" />
|
||||
<var name="repository.directories"
|
||||
value="${base.dir}" />
|
||||
<echo message="BUILDING: in workspace or flattened directory structure" />
|
||||
<var name="awips.baseline.directory" value="${base.dir}" />
|
||||
<var name="repository.directories" value="${base.dir}" />
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<echo message="AWIPS.BASELINE.DIRECTORY:${awips.baseline.directory}"/>
|
||||
<echo message="REPOSITORY.DIRECTORIES:${repository.directories}"/>
|
||||
<echo message="AWIPS.BASELINE.DIRECTORY:${awips.baseline.directory}" />
|
||||
<echo message="REPOSITORY.DIRECTORIES:${repository.directories}" />
|
||||
|
||||
<!-- construct the list of "basedirectories" -->
|
||||
<propertyselector property="baseline.variables"
|
||||
delimiter="${path.separator}"
|
||||
match="dir.([0-9][0-9])"
|
||||
select="\1"
|
||||
casesensitive="true" />
|
||||
|
||||
<var name="basedirectories"
|
||||
value="${awips.baseline.directory}" />
|
||||
|
||||
<for list="${baseline.variables}" param="index"
|
||||
delimiter="${path.separator}">
|
||||
<sequential>
|
||||
<propertycopy property="variable.name"
|
||||
override="true"
|
||||
from="dir.@{index}" />
|
||||
<for list="${repository.directories}" param="repo.directory">
|
||||
<sequential>
|
||||
<var name="base.directory"
|
||||
value="@{repo.directory}/${variable.name}" />
|
||||
<if>
|
||||
<available file="${base.directory}" type="dir" />
|
||||
<then>
|
||||
<echo message="BASE.DIRECTORY:${base.directory}"/>
|
||||
<var name="basedirectories"
|
||||
value="${base.directory};${basedirectories}" />
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
|
||||
<!-- Loop through the WA directories, if they exist. -->
|
||||
<if>
|
||||
<isset property="wa.enabled" />
|
||||
<then>
|
||||
<for list="${wa.to.deploy}" param="wa"
|
||||
delimiter="${path.separator}">
|
||||
<sequential>
|
||||
<var name="wa.base.directory"
|
||||
value="@{wa}/${variable.name}" />
|
||||
|
||||
<if>
|
||||
<available file="${wa.base.directory}"
|
||||
type="dir" />
|
||||
<then>
|
||||
<var name="basedirectories"
|
||||
value="${wa.base.directory};${basedirectories}" />
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
<propertyselector property="baseline.variables" delimiter="${path.separator}" match="dir.([0-9][0-9])" select="\1" casesensitive="true" />
|
||||
|
||||
<var name="basedirectories" value="${awips.baseline.directory}" />
|
||||
|
||||
<for list="${baseline.variables}" param="index" delimiter="${path.separator}">
|
||||
<sequential>
|
||||
<propertycopy property="variable.name" override="true" from="dir.@{index}" />
|
||||
<for list="${repository.directories}" param="repo.directory">
|
||||
<sequential>
|
||||
<var name="base.directory" value="@{repo.directory}/${variable.name}" />
|
||||
<if>
|
||||
<available file="${base.directory}" type="dir" />
|
||||
<then>
|
||||
<echo message="BASE.DIRECTORY:${base.directory}" />
|
||||
<var name="basedirectories" value="${base.directory};${basedirectories}" />
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
|
||||
<for list="${optional.directories}" param="repo.directory">
|
||||
<sequential>
|
||||
<var name="optional.directory" value="@{repo.directory}/${variable.name}" />
|
||||
<if>
|
||||
<available file="${optional.directory}" type="dir" />
|
||||
<then>
|
||||
<echo message="OPTIONAL.DIRECTORY:${optional.directory}" />
|
||||
<if>
|
||||
<isset property="optionaldirectories"/>
|
||||
<then>
|
||||
<var name="optionaldirectories" value="${optional.directory};${optionaldirectories}" />
|
||||
</then>
|
||||
<else>
|
||||
<var name="optionaldirectories" value="${optional.directory}" />
|
||||
</else>
|
||||
|
||||
</if>
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
|
||||
|
||||
<!-- Loop through the WA directories, if they exist. -->
|
||||
<if>
|
||||
<isset property="wa.enabled" />
|
||||
<then>
|
||||
<for list="${wa.to.deploy}" param="wa" delimiter="${path.separator}">
|
||||
<sequential>
|
||||
<var name="wa.base.directory" value="@{wa}/${variable.name}" />
|
||||
|
||||
<if>
|
||||
<available file="${wa.base.directory}" type="dir" />
|
||||
<then>
|
||||
<var name="basedirectories" value="${wa.base.directory};${basedirectories}" />
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
</then>
|
||||
</if>
|
||||
</sequential>
|
||||
</for>
|
||||
</target>
|
||||
</project>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue