diff --git a/cave/build/static/common/cave/etc/alertViz/configurations/Default.xml b/cave/build/static/common/cave/etc/alertViz/configurations/Default.xml index dae7665e1d..949d3dac6e 100644 --- a/cave/build/static/common/cave/etc/alertViz/configurations/Default.xml +++ b/cave/build/static/common/cave/etc/alertViz/configurations/Default.xml @@ -5,7 +5,8 @@ 12/26/2011 Xiaochuan DR14236 (trac 11710) request to fix SCAN Alert Visualization BASE configuring file. Changed true or false setting on popup, text, blink and color items followed the A1 configuring master.gcf file. - 01/31/2012 dyninaj DR14427 added category NDFD + 01/31/2012 dyninaj DR14427 added category NDFD + 11/30/2012 jzeng DR14016 update GFE configuration --> @@ -125,12 +126,12 @@ - - - - - - + + + + + + diff --git a/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py b/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py index c5cad4ba33..8f3a42adc9 100644 --- a/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py +++ b/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py @@ -30,8 +30,7 @@ # Heading #----------------------------------------------------------------------------- -#import siteConfig -#GFESUITE_HOME = siteConfig.GFESUITE_HOME +GFESUITE_HOME = "/awips2/GFESuite" GFESUITE_PRDDIR = "/tmp/products" yes = True no = False diff --git a/cave/build/static/common/cave/etc/menus/ncepHydro/nco/baseNCO.xml b/cave/build/static/common/cave/etc/menus/ncepHydro/nco/baseNCO.xml index 00b8a3c466..81c8cd1199 100644 --- a/cave/build/static/common/cave/etc/menus/ncepHydro/nco/baseNCO.xml +++ b/cave/build/static/common/cave/etc/menus/ncepHydro/nco/baseNCO.xml @@ -42,7 +42,7 @@ - + diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseCanadaEastern.xml b/cave/build/static/common/cave/etc/menus/upperair/baseCanadaEastern.xml index b032982927..47048c0dec 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/baseCanadaEastern.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/baseCanadaEastern.xml @@ -65,7 +65,7 @@ diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseCanadaNorth.xml b/cave/build/static/common/cave/etc/menus/upperair/baseCanadaNorth.xml index 6c3d0eccba..4bc4ebf133 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/baseCanadaNorth.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/baseCanadaNorth.xml @@ -20,7 +20,7 @@ --> diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseEastNPN.xml b/cave/build/static/common/cave/etc/menus/upperair/baseEastNPN.xml index c82cdb053e..01d6023e72 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/baseEastNPN.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/baseEastNPN.xml @@ -41,7 +41,7 @@ /profiler/%/3000/74752/% @@ -55,7 +55,7 @@ /profiler/%/3000/74648/% @@ -118,7 +118,7 @@ /profiler/%/3000/74556/% diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseJapan.xml b/cave/build/static/common/cave/etc/menus/upperair/baseJapan.xml index 5059c2c680..160001720f 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/baseJapan.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/baseJapan.xml @@ -30,9 +30,9 @@ - + @@ -158,12 +158,12 @@ diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseMexico.xml b/cave/build/static/common/cave/etc/menus/upperair/baseMexico.xml index 6a73a1b55b..01b6a6b107 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/baseMexico.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/baseMexico.xml @@ -82,7 +82,7 @@ - + diff --git a/cave/build/static/common/cave/etc/menus/upperair/basePacificWest.xml b/cave/build/static/common/cave/etc/menus/upperair/basePacificWest.xml index 31857a57ca..6e030771ab 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/basePacificWest.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/basePacificWest.xml @@ -27,7 +27,7 @@ - + @@ -75,7 +75,7 @@ @@ -90,7 +90,7 @@ @@ -100,7 +100,7 @@ @@ -115,9 +115,9 @@ - + @@ -110,7 +110,7 @@ diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseUSWestern.xml b/cave/build/static/common/cave/etc/menus/upperair/baseUSWestern.xml index 0b8403fd01..6c2a17173d 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/baseUSWestern.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/baseUSWestern.xml @@ -40,7 +40,7 @@ diff --git a/cave/build/static/common/cave/etc/menus/upperair/index.xml b/cave/build/static/common/cave/etc/menus/upperair/index.xml index 2fa24f57ed..75ccaa69bf 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/index.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/index.xml @@ -21,7 +21,7 @@ - + primaryModel=gefs availableModels=gefs:01,02;gfs;nam12 -pluginName=grid +pluginName=ncgrib Forecast,Global,Ensemble EnsembleFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml index 9babedc824..8d1dc479e3 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml @@ -7,7 +7,7 @@ primaryModel=gfs availableModels=gfs -pluginName=grid +pluginName=ncgrib Forecast,Global,Ensemble EnsembleFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml index 875d5a1a0c..5184859ff8 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml @@ -7,7 +7,7 @@ primaryModel=nam availableModels=nam;gefs:01,02,03,04,05,07,09;gfs;ruc80 -pluginName=grid +pluginName=ncgrib Forecast,Ensemble EnsembleFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/CMC/CMC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/CMC/CMC.xml index 901ab27561..a2289715d6 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/CMC/CMC.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/CMC/CMC.xml @@ -6,8 +6,8 @@ GRID GDFILE=cmc -pluginName=grid -info.secondaryId=% +pluginName=ncgrib +eventName=% Forecast,Global ModelFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFG/ECMWFG.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFG/ECMWFG.xml index f715a443d5..8c4fdb2b1c 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFG/ECMWFG.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFG/ECMWFG.xml @@ -6,8 +6,8 @@ GRID GDFILE=ecmwfg -pluginName=grid -info.secondaryId=% +pluginName=ncgrib +eventName=% Forecast,Global ModelFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFT/ECMWFT.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFT/ECMWFT.xml index 705a88b9d3..85d49aa33e 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFT/ECMWFT.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFT/ECMWFT.xml @@ -6,8 +6,8 @@ GRID GDFILE=ecmwft -pluginName=grid -info.secondaryId=% +pluginName=ncgrib +eventName=% Forecast,Global ModelFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FNMOCWAVE/FNMOCWAVE.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FNMOCWAVE/FNMOCWAVE.xml index 61cb7871df..677259dd5a 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FNMOCWAVE/FNMOCWAVE.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FNMOCWAVE/FNMOCWAVE.xml @@ -6,8 +6,8 @@ GRID GDFILE=fnmocwave -pluginName=grid -info.secondaryId=% +pluginName=ncgrib +eventName=% Forecast,Global ModelFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NOGAPS/NOGAPS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NOGAPS/NOGAPS.xml index 262c020ac8..6de101713d 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NOGAPS/NOGAPS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NOGAPS/NOGAPS.xml @@ -6,8 +6,8 @@ GRID GDFILE=nogaps -pluginName=grid -info.secondaryId=% +pluginName=ncgrib +eventName=% Forecast,Global ModelFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NWW3/NWW3.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NWW3/NWW3.xml index e9822aa96a..ff3062a052 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NWW3/NWW3.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NWW3/NWW3.xml @@ -6,8 +6,8 @@ GRID GDFILE=nww3 -pluginName=grid -info.secondaryId=% +pluginName=ncgrib +eventName=% Forecast,Global ModelFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RAP/RAP.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RAP/RAP.xml index 880992793a..ef7242a1ac 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RAP/RAP.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RAP/RAP.xml @@ -5,8 +5,8 @@ GRID GDFILE=rap -pluginName=grid -info.secondaryId=% +pluginName=ncgrib +eventName=% Forecast,Regional ModelFcstGridContours diff --git a/cave/com.raytheon.uf.viz.collaboration.comm.xmpp/com.raytheon.uf.viz.collaboration.comm.xmpp.ecl b/cave/com.raytheon.uf.viz.collaboration.comm.xmpp/com.raytheon.uf.viz.collaboration.comm.xmpp.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.comm/com.raytheon.uf.viz.collaboration.comm.ecl b/cave/com.raytheon.uf.viz.collaboration.comm/com.raytheon.uf.viz.collaboration.comm.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.core.ui/com.raytheon.uf.viz.collaboration.core.ui.ecl b/cave/com.raytheon.uf.viz.collaboration.core.ui/com.raytheon.uf.viz.collaboration.core.ui.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.display/com.raytheon.uf.viz.collaboration.display.ecl b/cave/com.raytheon.uf.viz.collaboration.display/com.raytheon.uf.viz.collaboration.display.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.feature/com.raytheon.uf.viz.collaboration.feature.ecl b/cave/com.raytheon.uf.viz.collaboration.feature/com.raytheon.uf.viz.collaboration.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.pointdata/com.raytheon.uf.viz.collaboration.pointdata.ecl b/cave/com.raytheon.uf.viz.collaboration.pointdata/com.raytheon.uf.viz.collaboration.pointdata.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.product.feature/com.raytheon.uf.viz.collaboration.product.feature.ecl b/cave/com.raytheon.uf.viz.collaboration.product.feature/com.raytheon.uf.viz.collaboration.product.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.product/com.raytheon.uf.viz.collaboration.product.ecl b/cave/com.raytheon.uf.viz.collaboration.product/com.raytheon.uf.viz.collaboration.product.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.radar/com.raytheon.uf.viz.collaboration.radar.ecl b/cave/com.raytheon.uf.viz.collaboration.radar/com.raytheon.uf.viz.collaboration.radar.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/com.raytheon.uf.viz.collaboration.ui.ecl b/cave/com.raytheon.uf.viz.collaboration.ui/com.raytheon.uf.viz.collaboration.ui.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java index a4520a3e5e..1220deda49 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java @@ -130,8 +130,6 @@ public class LocalizationManager implements IPropertyChangeListener { /** The current localization site */ private String currentSite; - private boolean nationalCenter; - private boolean overrideSite; /** Was the alert server launched within cave? */ @@ -396,12 +394,6 @@ public class LocalizationManager implements IPropertyChangeListener { .getString("-site").toUpperCase(); this.overrideSite = true; } - - this.nationalCenter = false; - - if (ProgramArguments.getInstance().getString("-nc") != null) { - this.nationalCenter = true; - } } private void checkForServerOverride() { @@ -958,8 +950,4 @@ public class LocalizationManager implements IPropertyChangeListener { public boolean isOverrideSite() { return overrideSite; } - - public boolean isNationalCenter() { - return nationalCenter; - } } diff --git a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/SideView.java b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/SideView.java index b7952fcaca..8326b0ff29 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/SideView.java +++ b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/SideView.java @@ -93,6 +93,8 @@ import com.vividsolutions.jts.geom.Coordinate; * Oct 22, 2009 #3348 bsteffen limit number of frames in sidepane rather than reseting * Jul 1, 2010 #6146 bkowal Updates the legend mode so that smaller panes will * now include a legend + * Nov 20, 2012 DR 15524 M.Porricelli Changed so interactive screens still editable when + * swapped to side panel * * * @@ -602,11 +604,12 @@ public class SideView extends ViewPart implements IMultiPaneEditor, if (editableResource != null) { EditableManager.makeEditable(editableResource, false); } + + this.editableResource = editableResource; if (this.editableResource != null) { EditableManager.makeEditable(this.editableResource, true); } - this.editableResource = editableResource; - + theEditor.getBackgroundColor().setColor(BGColorMode.EDITOR, myRenderables[0].getBackgroundColor()); diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpD.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpD.xml index 004e6dd514..1b2be38d53 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpD.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpD.xml @@ -18,7 +18,7 @@ See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information. --> - + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpT.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpT.xml index ff51ccef0b..cd075c5df0 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpT.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpT.xml @@ -18,7 +18,7 @@ See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information. --> - + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTmean.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTmean.xml index 167ce9274d..ec41b25c5b 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTmean.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTmean.xml @@ -18,7 +18,7 @@ See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information. --> - + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTsprd.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTsprd.xml index 4ad43d1288..f827ba8762 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTsprd.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/DpTsprd.xml @@ -18,7 +18,7 @@ See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information. --> - + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP6hr.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP6hr.xml index 454959cbb7..c93d707390 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP6hr.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP6hr.xml @@ -22,8 +22,11 @@ - - + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/WD.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/WD.xml index 9682239ceb..ae575d5d3c 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/WD.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/WD.xml @@ -18,7 +18,7 @@ See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information. --> - + diff --git a/cave/com.raytheon.uf.viz.drawing/com.raytheon.uf.viz.drawing.ecl b/cave/com.raytheon.uf.viz.drawing/com.raytheon.uf.viz.drawing.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.kml.export.feature/com.raytheon.uf.viz.kml.export.feature.ecl b/cave/com.raytheon.uf.viz.kml.export.feature/com.raytheon.uf.viz.kml.export.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.kml.export/com.raytheon.uf.viz.kml.export.ecl b/cave/com.raytheon.uf.viz.kml.export/com.raytheon.uf.viz.kml.export.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java b/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java index 286c7d7467..375914e9dd 100644 --- a/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java +++ b/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java @@ -56,6 +56,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg; * Jun 16, 2012 14386 zhao Modified the notify method * Oct 30, 2012 skorolev Changed HashMap to Map * Nov 11, 2012 1297 skorolev Added initiateProdArray + * Dec 03, 2012 15216/15639 zhao fixed a bug related to Link-to-Frame * * * @@ -137,9 +138,11 @@ public class FogZoneTableDlg extends ZoneTableDlg { if (date != null) { Date nominalTime = date; ObMultiHrsReports obData = fog.getObData(); + if (!isLinkedToFrame()) { + nominalTime = obData.getLatestNominalTime(); + } FogDataGenerator fdg = new FogDataGenerator(); - Map fogAlgCellType = fdg.getAlgCellTypes(fog - .getAlgorithmData(nominalTime)); + Map fogAlgCellType = fdg.getAlgCellTypes(fog.getAlgorithmData(nominalTime)); obData.setFogAlgCellType(fogAlgCellType); this.updateTableDlg(obData.getObHourReports(nominalTime)); } diff --git a/cave/com.raytheon.uf.viz.npp.crimss/com.raytheon.uf.viz.npp.crimss.ecl b/cave/com.raytheon.uf.viz.npp.crimss/com.raytheon.uf.viz.npp.crimss.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.points/src/com/raytheon/uf/viz/points/PointsDataManager.java b/cave/com.raytheon.uf.viz.points/src/com/raytheon/uf/viz/points/PointsDataManager.java index db6d844c89..b8352c6dc2 100644 --- a/cave/com.raytheon.uf.viz.points/src/com/raytheon/uf/viz/points/PointsDataManager.java +++ b/cave/com.raytheon.uf.viz.points/src/com/raytheon/uf/viz/points/PointsDataManager.java @@ -86,6 +86,8 @@ import com.vividsolutions.jts.geom.Coordinate; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 10, 2012 #875 rferrel Initial creation + * Dec 05, 2012 #1364 rferrel Replace File.Separator with IPathManager.SEPARATOR + * to work correctly on all platforms. * * * @@ -180,9 +182,10 @@ public class PointsDataManager implements ILocalizationFileObserver { LocalizationLevel.USER); pointsDir = pathMgr.getLocalizationFile(userCtx, AWIPSTOOLS - + File.separator + site + File.separator + POINTS_DIR); + + IPathManager.SEPARATOR + site + IPathManager.SEPARATOR + + POINTS_DIR); userToolsDir = pathMgr.getLocalizationFile(userCtx, AWIPSTOOLS - + File.separator + site); + + IPathManager.SEPARATOR + site); userToolsDir.addFileUpdatedObserver(this); childrenKeyMap = new HashMap>(); @@ -392,7 +395,7 @@ public class PointsDataManager implements ILocalizationFileObserver { */ private void storePoint(LocalizationFile dir, Point point, String fileName) { LocalizationFile lFile = pathMgr.getLocalizationFile(userCtx, dir - .getName().trim() + File.separator + fileName); + .getName().trim() + IPathManager.SEPARATOR + fileName); try { marshalPointToXmlFile(point, lFile); @@ -433,7 +436,7 @@ public class PointsDataManager implements ILocalizationFileObserver { boolean doRequest = false; if (points.isEmpty()) { doRequest = loadPoints(); - String d2dKey = File.separator + D2D_POINTS_GROUP; + String d2dKey = IPathManager.SEPARATOR + D2D_POINTS_GROUP; Point d2dPoint = points.get(d2dKey); if (d2dPoint != null) { if (childrenKeyMap.get(d2dKey).size() == 0) { @@ -444,7 +447,7 @@ public class PointsDataManager implements ILocalizationFileObserver { String dirPath = pointsDir.getName().trim(); String name = D2D_POINTS_GROUP.replace(' ', PointUtilities.DELIM_CHAR); - String path = dirPath + File.separator + name; + String path = dirPath + IPathManager.SEPARATOR + name; LocalizationFile d2dDir = pathMgr.getLocalizationFile(userCtx, path); if (!d2dDir.isDirectory()) { @@ -484,7 +487,7 @@ public class PointsDataManager implements ILocalizationFileObserver { Coordinate center = getHome(); int baseRingSize = 120; int startAngle = -90; - String group = File.separator + D2D_POINTS_GROUP; + String group = IPathManager.SEPARATOR + D2D_POINTS_GROUP; List d2dChildren = childrenKeyMap.get(group); for (char label = 'A'; label <= 'J'; label++) { String name = String.valueOf(label); @@ -527,7 +530,7 @@ public class PointsDataManager implements ILocalizationFileObserver { private Coordinate loadHome() { LocalizationFile lFile = pathMgr.getLocalizationFile( pointsDir.getContext(), pointsDir.getName().trim() - + File.separator + HOME_LOCATION_FILE); + + IPathManager.SEPARATOR + HOME_LOCATION_FILE); Point point = null; if (lFile.exists()) { point = loadPoint(lFile); @@ -574,7 +577,6 @@ public class PointsDataManager implements ILocalizationFileObserver { childrenKeyMap.put(key, new ArrayList()); } if (key.length() > 0) { - // p String parentKey = getParentKey(point); childrenKeyMap.get(parentKey).add(key); } @@ -658,7 +660,7 @@ public class PointsDataManager implements ILocalizationFileObserver { } catch (IOException ex) { StringBuffer sb = new StringBuffer(lFile.toString()); sb.replace(0, pointsDir.toString().length(), ""); - int index = sb.lastIndexOf(File.separator); + int index = sb.lastIndexOf(IPathManager.SEPARATOR); sb.setLength(index); point.setGroup(sb.toString()); @@ -671,7 +673,7 @@ public class PointsDataManager implements ILocalizationFileObserver { if (point != null) { StringBuffer sb = new StringBuffer(lFile.toString()); sb.replace(0, pointsDir.toString().length(), ""); - int index = sb.lastIndexOf(File.separator); + int index = sb.lastIndexOf(IPathManager.SEPARATOR); sb.setLength(index); point.setGroup(sb.toString()); } @@ -770,10 +772,10 @@ public class PointsDataManager implements ILocalizationFileObserver { StringBuilder sb = new StringBuilder(); sb.append(pointsDir.getName().trim()); String group = point.getGroup(); - if (!group.startsWith(File.separator)) { - sb.append(File.separator); + if (!group.startsWith(IPathManager.SEPARATOR)) { + sb.append(IPathManager.SEPARATOR); } - sb.append(point.getGroup()).append(File.separator) + sb.append(point.getGroup()).append(IPathManager.SEPARATOR) .append(POINT_FILENAME_PREFIX).append(point.getName()) .append(POINT_FILENAME_EXT); String filename = sb.toString().replace(' ', PointUtilities.DELIM_CHAR); @@ -791,8 +793,8 @@ public class PointsDataManager implements ILocalizationFileObserver { StringBuilder sb = new StringBuilder(); sb.append(pointsDir.getName().trim()); if (group.length() > 0) { - if (group.charAt(0) != File.separatorChar) { - sb.append(File.separator); + if (group.startsWith(IPathManager.SEPARATOR) == false) { + sb.append(IPathManager.SEPARATOR); } sb.append(group); } @@ -810,7 +812,7 @@ public class PointsDataManager implements ILocalizationFileObserver { String name = null; StringBuilder sb = new StringBuilder(); sb.append(lFile.toString()); - sb.replace(0, sb.lastIndexOf(File.separator) + 1, ""); + sb.replace(0, sb.lastIndexOf(IPathManager.SEPARATOR) + 1, ""); if (!lFile.isDirectory()) { sb.replace(0, POINT_FILENAME_PREFIX.length(), ""); sb.replace(sb.length() - POINT_FILENAME_EXT.length(), sb.length(), @@ -865,7 +867,7 @@ public class PointsDataManager implements ILocalizationFileObserver { String parentKey = point.getGroup(); if (point.isGroup() && parentKey.length() > 0) { parentKey = parentKey.substring(0, - parentKey.lastIndexOf(File.separator)); + parentKey.lastIndexOf(IPathManager.SEPARATOR)); } return parentKey; } @@ -897,7 +899,7 @@ public class PointsDataManager implements ILocalizationFileObserver { LocalizationFile[] dirs = pathMgr.listStaticFiles(sb.toString(), new String[0], false, false); - sb.append(File.separator).append(GROUP_TEMP_PREFIX); + sb.append(IPathManager.SEPARATOR).append(GROUP_TEMP_PREFIX); int end = sb.length(); List names = new ArrayList(); @@ -917,7 +919,7 @@ public class PointsDataManager implements ILocalizationFileObserver { Point node = new GroupNode(); node.setName(name); String parentKey = getPointKey(parent); - node.setGroup(parentKey + File.separator + name); + node.setGroup(parentKey + IPathManager.SEPARATOR + name); String nodeKey = getPointKey(node); PointRequest request = new PointRequest(RequestType.ADD, node); queueRequest(request); @@ -964,7 +966,7 @@ public class PointsDataManager implements ILocalizationFileObserver { childrenKeyMap.get(newParentKey).add(key); } else { Point newGroup = new GroupNode((Point) point); - String newGroupKey = newParentKey + File.separator + String newGroupKey = newParentKey + IPathManager.SEPARATOR + point.getName(); newGroup.setGroup(newGroupKey); PointRequest request = new PointRequest(RequestType.ADD, newGroup); @@ -996,7 +998,7 @@ public class PointsDataManager implements ILocalizationFileObserver { String parentKey = getParentKey((Point) srcNode); Point parent = points.get(parentKey); Point destNode = new GroupNode(parent); - String destKey = parentKey + File.separator + destName; + String destKey = parentKey + IPathManager.SEPARATOR + destName; destNode.setName(destName); destNode.setGroup(destKey); PointRequest request = new PointRequest(RequestType.ADD, destNode); @@ -1025,7 +1027,7 @@ public class PointsDataManager implements ILocalizationFileObserver { StringBuilder sb = new StringBuilder(); sb.append(parent); sb.replace(0, pointsDir.getName().trim().length(), ""); - sb.append(File.separator).append(name); + sb.append(IPathManager.SEPARATOR).append(name); Point gPoint = new GroupNode(name); gPoint.setGroup(sb.toString().replace(PointUtilities.DELIM_CHAR, ' ')); String groupPath = getPointDirName(gPoint); @@ -1045,7 +1047,8 @@ public class PointsDataManager implements ILocalizationFileObserver { try { // Must create a file in the directory to force its creation. - String p = lFile.getName().trim() + File.separator + GROUP_INFO; + String p = lFile.getName().trim() + IPathManager.SEPARATOR + + GROUP_INFO; LocalizationFile lf = pathMgr.getLocalizationFile(userCtx, p); OutputStream outStream = lf.openOutputStream(); outStream.write(gPoint.getGroup().getBytes()); @@ -1163,7 +1166,7 @@ public class PointsDataManager implements ILocalizationFileObserver { StringBuilder sb = new StringBuilder(message.getFileName()); sb.replace(0, pointsDir.getName().length(), ""); - sb.replace(sb.lastIndexOf(File.separator), sb.length(), ""); + sb.replace(sb.lastIndexOf(IPathManager.SEPARATOR), sb.length(), ""); String groupKey = sb.toString().replace(PointUtilities.DELIM_CHAR, ' '); sb.setLength(0); @@ -1290,7 +1293,7 @@ public class PointsDataManager implements ILocalizationFileObserver { } /** - * Determine if this group message needs to be acted upoin by this instance + * Determine if this group message needs to be acted upon by this instance * of CAVE. * * @param message @@ -1299,11 +1302,11 @@ public class PointsDataManager implements ILocalizationFileObserver { private boolean checkGroup(FileUpdatedMessage message) { boolean stateChange = false; StringBuilder sb = new StringBuilder(message.getFileName()); - sb.setLength(sb.lastIndexOf(File.separator)); + sb.setLength(sb.lastIndexOf(IPathManager.SEPARATOR)); sb.replace(0, pointsDir.getName().length(), ""); String key = sb.toString().replace(PointUtilities.DELIM_CHAR, ' '); String parentKey = null; - int index = key.lastIndexOf(File.separator); + int index = key.lastIndexOf(IPathManager.SEPARATOR); if (index >= 0) { parentKey = key.substring(0, index); } @@ -1312,7 +1315,7 @@ public class PointsDataManager implements ILocalizationFileObserver { switch (message.getChangeType()) { case ADDED: if (foundGroup == null) { - sb.replace(0, sb.lastIndexOf(File.separator) + 1, ""); + sb.replace(0, sb.lastIndexOf(IPathManager.SEPARATOR) + 1, ""); String name = sb.toString().replace(PointUtilities.DELIM_CHAR, ' '); Point point = new GroupNode(); @@ -1357,7 +1360,7 @@ public class PointsDataManager implements ILocalizationFileObserver { private void checkGroupDelete(FileUpdatedMessage message) { String filename = message.getFileName(); String deleteKey = filename.substring(0, - filename.lastIndexOf(File.separator)); + filename.lastIndexOf(IPathManager.SEPARATOR)); List childList = groupDeleteMap.get(deleteKey); if (childList != null) { childList.remove(filename); @@ -1553,7 +1556,7 @@ public class PointsDataManager implements ILocalizationFileObserver { // that represents the node. That can not be done until all // entries in the directory are removed. This determines // what we need to have deleted and adds requests to the queue. - String groupInfo = deleteKey + File.separator + GROUP_INFO; + String groupInfo = deleteKey + IPathManager.SEPARATOR + GROUP_INFO; groupDeleteMap.put(deleteKey, new ArrayList()); groupDeleteMap.get(deleteKey).add(groupInfo); @@ -1583,7 +1586,8 @@ public class PointsDataManager implements ILocalizationFileObserver { private void removePoint(Point point) { LocalizationFile lFile = null; if (point.isGroup()) { - String name = getPointDirName(point) + File.separator + GROUP_INFO; + String name = getPointDirName(point) + IPathManager.SEPARATOR + + GROUP_INFO; lFile = pathMgr.getLocalizationFile(userCtx, name); } else { String name = getPointFilename(point); diff --git a/cave/com.raytheon.uf.viz.remote.graphics/com.raytheon.uf.viz.remote.graphics.ecl b/cave/com.raytheon.uf.viz.remote.graphics/com.raytheon.uf.viz.remote.graphics.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.truecolor.gl/com.raytheon.uf.viz.truecolor.gl.ecl b/cave/com.raytheon.uf.viz.truecolor.gl/com.raytheon.uf.viz.truecolor.gl.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.uf.viz.truecolor/com.raytheon.uf.viz.truecolor.ecl b/cave/com.raytheon.uf.viz.truecolor/com.raytheon.uf.viz.truecolor.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/StormTrackState.java b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/StormTrackState.java index e2c9ef02dc..725a9f5e1e 100644 --- a/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/StormTrackState.java +++ b/cave/com.raytheon.viz.awipstools/src/com/raytheon/viz/awipstools/common/stormtrack/StormTrackState.java @@ -44,6 +44,7 @@ import com.vividsolutions.jts.geom.Point; * has been created to calculate the pivot * indexes. * 10-27-2010 #6964 bkowal Added a public class member for the LineStyle. + * 11/29/2012 15571 Qinglu Lin Added compuateCurrentStormCenter(); * * * @@ -189,4 +190,32 @@ public class StormTrackState { /** Set if you the duration needs to be calculated from the end time */ public Calendar endTime = null; + + /** Compute the coordinate of the storm center at the time defined by dataTime via interpolation. */ + public boolean compuateCurrentStormCenter(Coordinate coord, DataTime dateTime) { + if (futurePoints == null) return false; + int length = futurePoints.length; + if (length <=1) return false; + DataTime[] dt = new DataTime[2]; + dt[0] = futurePoints[0].time; + dt[1] = futurePoints[length-1].time; + Coordinate[] cs = new Coordinate[] {futurePoints[0].coord,futurePoints[length-1].coord}; + boolean crossed180 = false; + if (cs[0].x>0 && cs[1].x<0 || cs[0].x<0 && cs[1].x>0) { + crossed180 = true; + if (cs[0].x>0) + cs[0].x = -360. + cs[0].x; + if (cs[1].x>0) + cs[1].x = -360. + cs[1].x; + } + StormTrackUtil trackUtil = new StormTrackUtil(); + coord.x = cs[0].x + (cs[1].x-cs[0].x)/trackUtil.timeBetweenDataTimes(dt[1],dt[0]) + *trackUtil.timeBetweenDataTimes(dateTime,dt[0]); + coord.y = cs[0].y + (cs[1].y-cs[0].y)/trackUtil.timeBetweenDataTimes(dt[1],dt[0]) + *trackUtil.timeBetweenDataTimes(dateTime,dt[0]); + if (crossed180) + if (coord.x<-180.0) + coord.x = 360. + coord.x; + return true; + } } diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java index cd7ab01ed1..f8fc9d01f4 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java @@ -218,13 +218,14 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension checkedLuminance = true; try { renderOffscreen(image); - renderOnscreen(); } catch (VizException e) { // assume we don't support luminance supportsLuminance = false; // Reconstruct image image = constructOffscreenImage(dataType, dimensions, parameters); + } finally { + renderOnscreen(); } } return image; diff --git a/cave/com.raytheon.viz.gfe/help/GFEStartup.html b/cave/com.raytheon.viz.gfe/help/GFEStartup.html index 4924da4858..a6c0052491 100644 --- a/cave/com.raytheon.viz.gfe/help/GFEStartup.html +++ b/cave/com.raytheon.viz.gfe/help/GFEStartup.html @@ -23,7 +23,7 @@ Table of Contents


cave.sh [-server hostname:port/services] [-mode TEST|PRACTICE|OPERATIONAL] [-site xxx] [-u user] [-component componentName] [-perspective perspecitiveName] [-noredirect] -[-consoleLog] [-nc TRUE]
+[-consoleLog]

@@ -77,15 +77,6 @@ Table of Contents
- - - - -
Causes the CAVE log to be output to the console for monitoring/debugging.
-ncYESThis option is only used by Service backup. It is used to indicate that the site is - a national center, consequently a non-primary site gets special permission to export - site configuration to the central server via the Service Backup GUI. This option should - be set to 'true', i.e., -nc true. -

diff --git a/cave/com.raytheon.viz.gfe/icons/isc1.gif b/cave/com.raytheon.viz.gfe/icons/isc1.gif new file mode 100644 index 0000000000..b8b37a03c0 Binary files /dev/null and b/cave/com.raytheon.viz.gfe/icons/isc1.gif differ diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ShowISCGridsAction.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ShowISCGridsAction.java index 9815ede240..f3e0eef932 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ShowISCGridsAction.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/ShowISCGridsAction.java @@ -20,13 +20,19 @@ package com.raytheon.viz.gfe.actions; +import com.raytheon.viz.gfe.Activator; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.resource.ImageDescriptor; import com.raytheon.viz.gfe.core.msgs.Message; import com.raytheon.viz.gfe.core.msgs.ShowISCGridsMsg; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.ToolItem; + /** * Action to show the ISC grids * @@ -37,20 +43,70 @@ import com.raytheon.viz.gfe.core.msgs.ShowISCGridsMsg; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 07/20/09 1995 bphillip Initial release - * + * 12/06/12 DR 15574 jzeng Change the image of + * the icon when it is activated * * * @author bphillip * @version 1 */ public class ShowISCGridsAction extends AbstractHandler { - + /* + * non-active Image + */ + private static Image orgImg = null; + /* + * active Image + */ + private static Image actImg = null; + /* + * ImageDescriptor + */ + private static ImageDescriptor id = null; + /* + * Tool item + */ + private static ToolItem ti = null; + @Override public Object execute(ExecutionEvent arg0) throws ExecutionException { - boolean current = Message.inquireLastMessage(ShowISCGridsMsg.class) - .show(); + boolean current = Message.inquireLastMessage(ShowISCGridsMsg.class).show(); + /* + * Get toolItem + */ + if(ti == null) { + if (arg0.getTrigger() instanceof Event) { + Event e = (Event) arg0.getTrigger(); + if ( e.widget instanceof ToolItem) { + ti = (ToolItem) e.widget; + } + } + } + + /* + * Get Image when it is not activated + */ + if (orgImg == null) orgImg = ti.getImage(); + + /* + * Get Image when it is activated + */ + if ( actImg == null ){ + if (id == null) { + id = Activator.imageDescriptorFromPlugin( + Activator.PLUGIN_ID, "icons/isc1.gif" ); + } + actImg = id.createImage(); + } + + /* + * Change the image when it is active and + * change it back when it is not activated + */ + if (!current) ti.setImage(actImg); + else ti.setImage(orgImg); + new ShowISCGridsMsg(!current).send(); return null; } - } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java index 9b7d4e0fb7..e61b73d7b7 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/ProductScriptsDialog.java @@ -1,19 +1,19 @@ /** * 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. **/ @@ -45,6 +45,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.SimulatedTime; +import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.viz.gfe.Activator; import com.raytheon.viz.gfe.core.DataManager; @@ -57,7 +58,7 @@ import com.raytheon.viz.ui.widgets.ToggleSelectList; /** * The product generation scripts dialog. - * + * *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
@@ -65,10 +66,12 @@ import com.raytheon.viz.ui.widgets.ToggleSelectList;
  * 	Mar 7, 2008			   Eric Babin   Initial Creation
  * Oct 27, 2012 1287       rferrel     Code cleanup for non-blocking dialog.
  * Oct 25, 2012 1287       rferrel     Code changes for non-blocking PublishDialog.
+ * Nov 30, 2012 15575      ryu         Added variable replacement for SelectedStart,
+ *                                     SelectedEnd, and home
  * Nov 13, 2012 1298       rferrel     Code changes for non-blocking UserEntryDialog.
- * 
+ *
  * 
- * + * * @author ebabin * @version 1.0 */ @@ -85,6 +88,8 @@ public class ProductScriptsDialog extends CaveJFACEDialog { private Map scriptDict; + private String gfeHome; + private String prddir; private ToggleSelectList scriptsList; @@ -104,6 +109,8 @@ public class ProductScriptsDialog extends CaveJFACEDialog { this.setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS); this.dataManager = dataManager; + gfeHome = Activator.getDefault().getPreferenceStore() + .getString("GFESUITE_HOME"); prddir = Activator.getDefault().getPreferenceStore() .getString("GFESUITE_PRDDIR"); scripts = Activator.getDefault().getPreferenceStore() @@ -139,7 +146,7 @@ public class ProductScriptsDialog extends CaveJFACEDialog { } /** - * + * */ private void runScripts() { int[] idxs = scriptsList.getSelectionIndices(); @@ -171,6 +178,15 @@ public class ProductScriptsDialog extends CaveJFACEDialog { .getSpatialEditorTime(); Date seEnd = new Date(seStart.getTime() + 60 * 1000); + Date selStart = new Date(0); + Date selEnd = new Date(0); + TimeRange selectedTR = dataManager.getParmOp() + .getSelectionTimeRange(); + if (selectedTR != null) { + selStart = selectedTR.getStart(); + selEnd = selectedTR.getEnd(); + } + // The following variables are replaced by known values: cmd = cmd.replace("{host}", hostParts[0]); cmd = cmd.replace("{port}", hostParts[1]); @@ -178,8 +194,13 @@ public class ProductScriptsDialog extends CaveJFACEDialog { cmd = cmd.replace("{productDB}", productDB.toString()); cmd = cmd.replace("{SEstart}", gmtTime.format(seStart)); cmd = cmd.replace("{SEend}", gmtTime.format(seEnd)); + cmd = cmd.replace("{SelectedStart}", + gmtTime.format(selStart)); + cmd = cmd.replace("{SelectedEnd}", + gmtTime.format(selEnd)); cmd = cmd.replace("{time}", curLocalTime); cmd = cmd.replace("{ztime}", curGMTTime); + cmd = cmd.replace("{home}", gfeHome); cmd = cmd.replace("{prddir}", prddir); // The user is prompted to enter the value with which to replace @@ -404,7 +425,7 @@ public class ProductScriptsDialog extends CaveJFACEDialog { /* * (non-Javadoc) - * + * * @see * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets * .Shell) diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/WeatherElementGroupDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/WeatherElementGroupDialog.java index 20e4ac8abd..0a7c866de0 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/WeatherElementGroupDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/WeatherElementGroupDialog.java @@ -57,6 +57,8 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; * 02/22/2008 Eric Babin Initial Creation * 04/17/2009 #2282 rjpeter Added confirmation message on delete. * 11/14/2012 #1298 rferrel Changes for non-blocking dialog. + * 11/20/2012 DR 15532 jzeng Added popup dialog to make sure group saved with + * valid characters * * * @author ebabin @@ -127,7 +129,7 @@ public class WeatherElementGroupDialog extends CaveJFACEDialog { private void initializeComponents() { - if (names.size() == 0 && !saveType) { + if (names.size() == 0 && !saveType) { Label label = new Label(top, SWT.CENTER); label.setText("No groups available for deletion."); return; @@ -149,7 +151,7 @@ public class WeatherElementGroupDialog extends CaveJFACEDialog { } } }); - + String[] items = names.toArray(new String[names.size()]); Arrays.sort(items); groupList.setItems(items); @@ -158,8 +160,8 @@ public class WeatherElementGroupDialog extends CaveJFACEDialog { groupList.setLayoutData(data); groupField = new Text(top, SWT.BORDER); data = new GridData(GridData.FILL_HORIZONTAL); - groupField.setLayoutData(data); groupField.setEnabled(saveType); + groupField.setLayoutData(data); groupField.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent arg0) { selectedItem = groupField.getText().trim(); @@ -214,7 +216,7 @@ public class WeatherElementGroupDialog extends CaveJFACEDialog { protected void okPressed() { boolean ok = true; String groupName = getSelectedItem(); - + if (!FileUtil.isValidFilename(groupName)) { MessageBox mb = new MessageBox(super.getShell(), SWT.ICON_ERROR | SWT.OK); @@ -223,21 +225,21 @@ public class WeatherElementGroupDialog extends CaveJFACEDialog { + FileUtil.VALID_FILENAME_CHARS); mb.open(); ok = false; - } else if (protectedNames.contains(groupName)) { - statusHandler.handle(Priority.SIGNIFICANT, "Weather Element Group " + } else if (!protectedNames.contains(groupName)){ + statusHandler.handle(Priority.SIGNIFICANT, "Weather Element Group " + getSelectedItem() + " is protected or an invalid name."); ok = false; - } else if (!saveType) { - MessageBox mb = new MessageBox(super.getShell(), SWT.ICON_QUESTION - | SWT.OK | SWT.CANCEL); + } else if (!saveType){ + MessageBox mb = new MessageBox(super.getShell(), SWT.ICON_QUESTION + | SWT.OK | SWT.CANCEL); mb.setText("Item Delete"); mb.setMessage(getSelectedItem() + " will be Deleted."); if (mb.open() == SWT.CANCEL) { ok = false; } - } - + } + if (ok) { super.okPressed(); } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java index ee6beeec5f..9829f7ba9e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/StyledTextComp.java @@ -23,8 +23,10 @@ import static com.raytheon.viz.gfe.product.StringUtil.stringJoin; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -76,6 +78,7 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil; * 19 Feb 2010 4132 ryu Product correction. * 30 Jul 2010 6719 jnjanga Placed cursor at the end of inserted CTA * 26 Sep 2012 15423 ryu Avoid resetting text when possible. + * 03 Dec 2012 15620 ryu Unlock framed cities list for editing. * * * @@ -141,6 +144,10 @@ public class StyledTextComp extends Composite { private boolean highlight = Activator.getDefault().getPreferenceStore() .getBoolean("HighlightFramingCodes"); + private boolean newProduct = false; + + private Set unlockCitySegs; + private boolean autoWrapMode; private int wrapColumn = 80; // TODO: get from external @@ -312,6 +319,7 @@ public class StyledTextComp extends Composite { * The product text. */ public void setProductText(String text) { + newProduct = true; textEditorST.setText(EMPTY); textEditorST.setStyleRange(null); parseProductText(text); @@ -320,6 +328,7 @@ public class StyledTextComp extends Composite { lockText(); findFramingCodes(); textEditorST.getVerticalBar().setSelection(0); + newProduct = false; } /** @@ -339,10 +348,8 @@ public class StyledTextComp extends Composite { * Lock the parts of the text that needs to be uneditable. */ private void lockText() { - int strLen = 0; int startLine = 0; int endLine = 0; - StyleRange sr; // NOTE: For the endline variables we need to exclude the last line // in the for loop because the the parsed index is at line x @@ -360,71 +367,70 @@ public class StyledTextComp extends Composite { if (ciBlockTip != null) { startLine = ciBlockTip.getStartIndex().x; endLine = ciBlockTip.getEndIndex().x; - - for (int i = startLine; i < endLine; i++) { - // Add 1 to the length to account for the \n character - strLen += productTextArray[i].length() + 1; - } - - sr = new StyleRange(textEditorST.getOffsetAtLine(startLine), - strLen, lockColor, null); - textEditorST.setStyleRange(sr); + lockLines(productTextArray, startLine, endLine); } /* * Lock the mnd text. */ - strLen = 0; HashMap mndMap = prodDataStruct.getMndMap(); TextIndexPoints mndTip = mndMap.get("mnd"); if (mndTip != null) { startLine = mndTip.getStartIndex().x; endLine = mndTip.getEndIndex().x; - - for (int i = startLine; i < endLine; i++) { - // Add 1 to the length to account for the \n character - strLen += productTextArray[i].length() + 1; - } - - sr = new StyleRange(textEditorST.getOffsetAtLine(startLine), - strLen, lockColor, null); - textEditorST.setStyleRange(sr); + lockLines(productTextArray, startLine, endLine); } /* * Lock content in the UGC text. */ - strLen = 0; + if (newProduct) { + unlockCitySegs = new HashSet(); + } List segArray = prodDataStruct.getSegmentsArray(); - TextIndexPoints segTip; + TextIndexPoints segTip, cityTip; for (SegmentData segmentData : segArray) { /* * Lock header. */ - strLen = 0; segTip = segmentData.getSegmentDataIndexPoints("header"); + cityTip = segmentData.getSegmentDataIndexPoints("city"); if (segTip != null) { startLine = segTip.getStartIndex().x; endLine = segTip.getEndIndex().x; - for (int i = startLine; i < endLine; i++) { - // Add 1 to the length to account for the \n character - strLen += productTextArray[i].length() + 1; + String ugc = segTip.getText().substring(0, 6); + + // Check if this is a segment for which the cities list + // should be unlocked. Cities list is unlocked for editing + // when framing codes are present. + if (newProduct) { + if (cityTip != null && + cityTip.getText().indexOf("|*") > 0) { + unlockCitySegs.add(ugc); + } } - sr = new StyleRange(textEditorST.getOffsetAtLine(startLine), - strLen, lockColor, null); - textEditorST.setStyleRange(sr); + if (unlockCitySegs.contains(ugc)) { + // Lock the segment header but skip the cities list. + int cityStart = cityTip.getStartIndex().x; + int cityEnd = cityTip.getEndIndex().x; + + lockLines(productTextArray, startLine, cityStart); + lockLines(productTextArray, cityEnd, endLine); + } + else { + lockLines(productTextArray, startLine, endLine); + } } /* * Lock term. */ - strLen = 0; segTip = segmentData.getSegmentDataIndexPoints("term"); if (segTip != null) { @@ -447,18 +453,23 @@ public class StyledTextComp extends Composite { ++endLineOffset; } - for (int i = startLine; i < endLine + endLineOffset; i++) { - // Add 1 to the length to account for the \n character - strLen += productTextArray[i].length() + 1; - } - - sr = new StyleRange(textEditorST.getOffsetAtLine(startLine), - strLen, lockColor, null); - textEditorST.setStyleRange(sr); + lockLines(productTextArray, startLine, endLine + endLineOffset); } } } + private void lockLines(String[] productTextArray, int startLine, int endLine) { + int strLen = 0; + for (int i = startLine; i < endLine; i++) { + // Add 1 to the length to account for the \n character + strLen += productTextArray[i].length() + 1; + } + + StyleRange sr = new StyleRange(textEditorST.getOffsetAtLine(startLine), + strLen, lockColor, null); + textEditorST.setStyleRange(sr); + } + /** * Find the framing codes in the text. */ diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/CheckPermissions.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/CheckPermissions.java index 0a326b07f4..9c8b1f5a81 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/CheckPermissions.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/CheckPermissions.java @@ -21,6 +21,7 @@ package com.raytheon.viz.gfe.dialogs.sbu; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.dataplugin.gfe.request.CheckPermissionsRequest; +import com.raytheon.uf.common.dataplugin.gfe.request.NcCheckRequest; import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse; import com.raytheon.uf.common.site.requests.GetPrimarySiteRequest; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -40,6 +41,7 @@ import com.raytheon.uf.viz.core.requests.ThriftClient; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 11, 2011 bphillip Initial creation + * Nov 14, 2012 jdynina Added check for national center * * * @@ -72,6 +74,25 @@ public class CheckPermissions { } return authorized; } + + @SuppressWarnings("unchecked") + public static boolean isNationalCenter() { + boolean isNationalCenter = false; + NcCheckRequest request = new NcCheckRequest(); + try { + ServerResponse obj = (ServerResponse) ThriftClient + .sendRequest(request); + if (obj.isOkay()) { + isNationalCenter = true; + } else { + isNationalCenter = false; + } + } catch (VizException e) { + statusHandler.error("Error checking site type!", e); + isNationalCenter = false; + } + return isNationalCenter; + } public static boolean runningAsPrimary() { boolean isPrimary = false; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java index 3b02517223..4f03ab588e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java @@ -88,8 +88,9 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 4, 2011 randerso Initial creation - * Sep 19, 2011 10955 rferrel Use RunProcess + * Sep 19,2011 10955 rferrel Use RunProcess * Oct 25, 2012 1287 rferrel Code clean up for non-blocking dialog. + * Nov 15,2012 15614 jdynina Added check for national center * * * @@ -155,6 +156,8 @@ public class ServiceBackupDlg extends CaveJFACEDialog { private Job updateJob; private boolean authorized; + + private boolean nationalCenter; private SVCBU_OP currentOperation = SVCBU_OP.no_backup; @@ -165,6 +168,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog { super(parentShell); authorized = CheckPermissions.getAuthorization(); this.site = LocalizationManager.getInstance().getCurrentSite(); + this.nationalCenter = CheckPermissions.isNationalCenter(); this.runningAsPrimary = CheckPermissions.runningAsPrimary(); if (!ServiceBackupJobManager.getInstance().isRunning()) { ServiceBackupJobManager.getInstance().start(); @@ -1199,8 +1203,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog { + UserController.getUserObject().uniqueId()); } - if ((!runningAsPrimary) - && (!LocalizationManager.getInstance().isNationalCenter())) { + if ((!runningAsPrimary) & (!nationalCenter)) { doExCon.setEnabled(false); } } diff --git a/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseHPCStation.xml b/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseHPCStation.xml index abdc1430db..9665c2e9b6 100644 --- a/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseHPCStation.xml +++ b/cave/com.raytheon.viz.hydro/localization/menus/hydro/baseHPCStation.xml @@ -24,7 +24,7 @@ menuText="MaxT/MinT" id="HPCmaxTminT" > - + diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointdatacontrol/PointDataControlDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointdatacontrol/PointDataControlDlg.java index 11e0b66700..2eba67ed59 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointdatacontrol/PointDataControlDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointdatacontrol/PointDataControlDlg.java @@ -102,6 +102,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * 09 OCT 2012 #15396 Fixed Instantaneous precip index so legend and map display * will change each time duration is incremented or decremented * for the "30 minutes Instantaneous" rainfall map . + * 04 Dec 2012 15602 wkwock Fix Hrs hour capped at 100. + * * * * @author lvenable @@ -1023,6 +1025,7 @@ public class PointDataControlDlg extends CaveSWTDialog { hoursSpnr.setPageIncrement(5); hoursSpnr.setSelection(24); hoursSpnr.setLayoutData(gd); + hoursSpnr.setMaximum(1000); // hoursSpnr.addSelectionListener(new SelectionAdapter() { // @Override // public void widgetSelected(SelectionEvent event) { diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java index b63d3dc5df..f84e2505e8 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java @@ -131,6 +131,8 @@ import com.raytheon.viz.hydrocommon.util.DbUtils; * 06 Nov 2012 15400 lbousaidi Changed logic in buildPointString routine, added discharge2stage * to display stage value, also added checking for rating curve for both * stage and discharge. + * 13 Nov 2012 15416 lbousaidi added a check when the colorname is null and a call to + * getGroupModeColor * @author lvenable * @version 1.0 * @@ -906,14 +908,15 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements } /* Top left point of bar */ - int x = pointArray[i].getPixelX() + GRAPHBORDER;// - 20; + int x = pointArray[i].getPixelX() + GRAPHBORDER_LEFT;// - 20; if ((x < GRAPHBORDER_LEFT) || (x > GRAPHBORDER_LEFT + graphAreaWidth)) { continue; } - int x2 = x2pixel(graphData, pointArray[i].getX() - .getTime() + 3600000) + int x2 = x; + x = x2pixel(graphData, pointArray[i].getX() + .getTime() - 3600000) + GRAPHBORDER_LEFT;// - 20; int y = pointArray[i].getPixelY() + GRAPHBORDER; ia[0] = x; @@ -2495,8 +2498,13 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements gc.setBackground(new Color(parentComp.getDisplay(), HydroUtils .getColor(traceIndex))); } else if (groupMode) { - gc.setBackground(new Color(parentComp.getDisplay(), HydroUtils - .getColor(td.getColorName()))); + if (td.getColorName() != null && HydroUtils.getColor(td.getColorName()) != null) { + gc.setBackground(new Color(parentComp.getDisplay(), HydroUtils + .getColor(td.getColorName()))); + } else { + gc.setBackground(new Color(parentComp.getDisplay(), + HydroUtils.getGroupModeColor(traceIndex))); + } } } } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java index d034dafafe..941bc4704a 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java @@ -21,10 +21,8 @@ package com.raytheon.viz.hydro.timeseries; import java.io.File; import java.util.ArrayList; -import java.util.Calendar; import java.util.Date; import java.util.List; -import java.util.TimeZone; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; @@ -89,7 +87,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * printable area of the page. * 04 Mar 2011 7644 lbousaid fixed Zoom in feature * 30 May 2012 14967 wkwock fix insert deleted data to rejecteddata table - * 23 Jul 2012 15195 mpduff Fix dates for displaying groups + * 23 Jul 2012 15195 mpduff Fix dates for displaying groups + * 06 Dec 2012 15066 wkwock Fix "ctrl+r" not work in group mode * * * @@ -973,7 +972,10 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog { setZoomAction(false); setSelectZoom(false); reset = true; - displayCanvas.redraw(); + for (TimeSeriesDisplayCanvas dc :canvasList){ + dc.setZoomed(false); + dc.redraw(); + } } else { displayCanvas.resetTS(); } diff --git a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/AddModifyLocationDlg.java b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/AddModifyLocationDlg.java index 300697e8f4..222d3cd4b1 100644 --- a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/AddModifyLocationDlg.java +++ b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/AddModifyLocationDlg.java @@ -77,6 +77,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * case in Location box. * 10 May 2011 9309 djingtao the elevation fields should be defaults as 0.0 when user * wipe out the field (e.g. blank) + * 26 Nov 2012 15440 lbousaidi display lat/lon in the GUI in decimal degrees * * * @@ -817,7 +818,7 @@ public class AddModifyLocationDlg extends CaveSWTDialog implements Group stationGroup = new Group(parentComp, SWT.NONE); stationGroup.setLayout(new GridLayout(3, false)); stationGroup.setLayoutData(gd); - stationGroup.setText(" Station Characteritics (View-Only) "); + stationGroup.setText(" Station Characteristics (View-Only) "); // ----------------------------------------------- // Create Station Type controls @@ -1322,13 +1323,12 @@ public class AddModifyLocationDlg extends CaveSWTDialog implements basinTF.setText(locData.getRiverBasin()); // Only Display Lat/Lon if not missing - latTF.setText((locData.getLatitude() != HydroConstants.MISSING_VALUE) ? GeoUtil - .getInstance().cvt_latlon_from_double(locData.getLatitude()) - : ""); - lonTF.setText((locData.getLongitude() != HydroConstants.MISSING_VALUE) ? GeoUtil - .getInstance().cvt_latlon_from_double(locData.getLongitude()) - : ""); - + + latTF.setText((locData.getLatitude() != HydroConstants.MISSING_VALUE) ? + String.valueOf(locData.getLatitude()): ""); + lonTF.setText((locData.getLongitude() != HydroConstants.MISSING_VALUE) ? + String.valueOf(locData.getLongitude()): ""); + // Only display elevation if it isn't missing, i.e. null in DB elevationTF .setText((locData.getElevation() != HydroConstants.MISSING_VALUE) ? String diff --git a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/CountyZoneUgcDlg.java b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/CountyZoneUgcDlg.java index 7f82f6b1a0..686eefbfa6 100644 --- a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/CountyZoneUgcDlg.java +++ b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/CountyZoneUgcDlg.java @@ -50,6 +50,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * ------------ ---------- ----------- -------------------------- * 02 Sep 2008 lvenable Initial creation. * 30 Dec 2008 1802 askripsk Connect to database. + * 04 Dec 2012 15522 wkwock Fix incorrect zones and not able to add * * * @@ -94,6 +95,10 @@ public class CountyZoneUgcDlg extends CaveSWTDialog { */ private Button clearBtn; + /** + * for keep track whether selected zones are initialized. false is not initialized. + */ + private boolean zonesFlag = false; /** * Constructor. * @@ -157,6 +162,9 @@ public class CountyZoneUgcDlg extends CaveSWTDialog { selectionCbo.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { + if (!zonesFlag) { + getZoneData(); + } updateDisplay(); } }); @@ -328,6 +336,7 @@ public class CountyZoneUgcDlg extends CaveSWTDialog { private void getZoneData() { try { CountyZoneUgcDataManager.getInstance().getZonesSelected(true); + zonesFlag=true; } catch (VizException e) { e.printStackTrace(); } diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/CountyZoneUgcDataManager.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/CountyZoneUgcDataManager.java index 894ddd04f8..6c6ce4f661 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/CountyZoneUgcDataManager.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/CountyZoneUgcDataManager.java @@ -37,6 +37,7 @@ import com.raytheon.viz.hydrocommon.data.ZoneInfoData; * ------------ ---------- ----------- -------------------------- * Jan 5, 2009 1802 askripsky Initial Creation * Sep 11,2012 15362 wkwock Fix selected zones + * Dec 4, 2012 15522 wkwock Fix added zones * * * @@ -159,7 +160,7 @@ public class CountyZoneUgcDataManager { * @throws VizException */ public ArrayList getZonesSelected() throws VizException { - return getZonesSelected(true); + return getZonesSelected(false); } /** diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java index 513924a450..adb13351c5 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/OtherPrecipOptions.java @@ -350,6 +350,14 @@ public class OtherPrecipOptions { up_arrow.setEnabled(true); } } + Calendar currentTime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); + Calendar tmpDate = (Calendar) currentTime.clone(); + tmpDate.setTime(DailyQcUtils.pdata[DailyQcUtils.pcpn_day].data_time); + tmpDate.add(Calendar.HOUR_OF_DAY, (DailyQcUtils.pcpn_time-3)*6); + + if (currentTime.before(tmpDate)){ + up_arrow.setEnabled(false); + } } else { /* 24 hour mode. */ if (pcp_flag + 4 >= num_qc_days * 4) { diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveLevel2Data.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveLevel2Data.java index eab564312b..44896a2401 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveLevel2Data.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveLevel2Data.java @@ -689,6 +689,13 @@ public class SaveLevel2Data { gm.get(Calendar.MONTH) + 1, gm.get(Calendar.DAY_OF_MONTH)); + //copy DailyQcUtils.pcp.value to datavals + for (int h = 0; h < hrap_grid.maxj; h++) { + for (int i = 0; i < hrap_grid.maxi; i++) { + datavals[i][h] = (DailyQcUtils.pcp.value[i][h] / 100.f); + } + } + /* output grid to file in ascii xmrg format */ WriteQPFGrids wqg = new WriteQPFGrids(); wqg.write_qpf_grids(dbuf); diff --git a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/AutoDailyQC.java b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/AutoDailyQC.java index 60d2a9c946..76a1656edf 100644 --- a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/AutoDailyQC.java +++ b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/AutoDailyQC.java @@ -186,7 +186,7 @@ public class AutoDailyQC { * 0 represents the time frame 12 - 18, 1 represents time frame 18-00, 2 * represents time frame 00-06Z, 3 represents time frame 06-12z */ - if (precip_flag == true) { + /*if (precip_flag == true) { if (DailyQcUtils.curHr18_00 == 1) { DailyQcUtils.pdata[0].used[1] = 0; DailyQcUtils.pdata[0].used[2] = 0; @@ -200,7 +200,7 @@ public class AutoDailyQC { DailyQcUtils.pdata[0].used[3] = 0; DailyQcUtils.pdata[0].used[4] = 0; } - } else if (freezingl_flag == true) { + } else*/ if (freezingl_flag == true) { if (DailyQcUtils.curHr18_00 == 1) { DailyQcUtils.zdata[0].used[1] = 0; DailyQcUtils.zdata[0].used[2] = 0; @@ -345,6 +345,13 @@ public class AutoDailyQC { WriteQPFGrids wq = new WriteQPFGrids(); wq.write_qpf_grids(dbuf); + //copy data from DailyQcUtils.pcp.value to datavals + for (int y = 0; y < hrap_grid.maxj; y++) { + for (int x = 0; x < hrap_grid.maxi; x++) { + datavals[x][y] = (DailyQcUtils.pcp.value[x][y] / 100.f); + } + } + /* output grid to file in grib format */ // create netCDF file from data, write it out then call diff --git a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/DailyQcUtils.java b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/DailyQcUtils.java index 3bf0cd5a19..f8a824234c 100644 --- a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/DailyQcUtils.java +++ b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/util/DailyQcUtils.java @@ -59,6 +59,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Feb 16, 2009 snaples Initial creation + * Dec 04, 2012 15544 wkwock fix missing 12z-18z after 12 * * * @@ -1021,6 +1022,12 @@ public class DailyQcUtils { btime.set(Calendar.SECOND, 0); hrgt12z = 0; } + /* In order to allow user access the 12~18Z point data for the most recent day, + advance one more day from current day if the later than 18Z */ + Calendar currentTime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); + if (currentTime.get(Calendar.HOUR_OF_DAY)>=18) { + btime.add(Calendar.DAY_OF_MONTH, 1); + } emonth = btime.get(Calendar.MONTH); Calendar otime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/GraphicDataUtil.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/GraphicDataUtil.java index 0ba93ac697..8a7564106d 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/GraphicDataUtil.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/GraphicDataUtil.java @@ -50,6 +50,8 @@ import com.vividsolutions.jts.geom.Envelope; * Jun 04 2012 14710 Xiaochuan The rank value should take * from STRENGTH_RANK instead * of 2D_STRENGTH_RANK. + * Nov 09 2012 15586 Xiaochuan In dataRowFormat, set MSI maximum + * size to 5. * * * @@ -135,7 +137,7 @@ public class GraphicDataUtil { RadarDataPoint currPoint = symbologyData.get(key); if (currPoint.isVisible() || !checkVisibility) { - String dataRowFormat = " %4.4s %7.7s@%3.3s %9.9s %7.7s r%-2.2s %4.4s %8.8s %8.8s %8.8s %8.8s"; + String dataRowFormat = " %4.4s %7.7s@%3.3s %9.9s %7.7s r%-2.2s %5.5s %8.8s %8.8s %8.8s %8.8s"; AreaComponent currFeature; HashMap> currPointData = currPoint diff --git a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBestResResourceData.java b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBestResResourceData.java index 5b0184201e..def4e8f333 100644 --- a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBestResResourceData.java +++ b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBestResResourceData.java @@ -68,6 +68,7 @@ import com.vividsolutions.jts.geom.Polygon; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 30, 2010 mschenke Initial creation + * Oct 31, 2012 DR 15287 D. Friedman Fix overlap calculation * Nov 06, 2012 DR 15157 D. Friedman Allow configured inclusion percentage * * @@ -341,7 +342,7 @@ public class SatBestResResourceData extends AbstractRequestableResourceData { for (Polygon last : prevs) { // Don't want to double include percentage areas - totalPercentage -= last.intersection(polygon) + totalPercentage -= last.intersection(polygon).intersection(extent) .getArea() / extent.getArea(); } } diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/NewAlarmDlg.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/NewAlarmDlg.java index 749ece219b..03ebc713e6 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/NewAlarmDlg.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/dialogs/NewAlarmDlg.java @@ -56,6 +56,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * Jun 08, 2010 5851 cjeanbap Properly stop alarm/alert observer listener; shellComp is null. * Oct 31, 2011 8510 rferrel made PRIMARY_MODEL and add check for nonblank productID. * Sep 20, 2012 1196 rferrel No longer Blocks + * 12/07/2012 15555 m.gamazaychikov Fixed the implementation for New Proximity Alarm. * * * @author mnash @@ -330,15 +331,34 @@ public class NewAlarmDlg extends CaveSWTDialog { AOR = new Button(aor, SWT.CHECK); aorData = new GridData(SWT.DEFAULT, SWT.CENTER, false, false); AOR.setLayoutData(aorData); - if (prod != null) { + /* + * DR15555 - Set the AOR selection to: + * 1. true - for new alarm + * 2. product's state - for existing alarm + */ + if (prod.getProductId() != "") { AOR.setSelection(prod.isAor()); } + else { + AOR.setSelection(true); + AOR.setBackground(Display.getCurrent().getSystemColor( + SWT.COLOR_YELLOW)); + } AOR.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { if (AOR.getSelection() == true) { + /* + * DR15555 - handle the AOR selection: + * - set the background yellow + * - set the AORDistance text to empty string + * - set the ugcList text to empty string + */ AOR.setBackground(Display.getCurrent().getSystemColor( SWT.COLOR_YELLOW)); + AORDistance.setText(""); + ugcList.setText(""); + } else { AOR.setBackground(Display.getCurrent().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND)); @@ -355,22 +375,34 @@ public class NewAlarmDlg extends CaveSWTDialog { AORDistance = new Text(aor, SWT.SINGLE | SWT.BORDER); aorData = new GridData(SWT.END, SWT.DEFAULT, false, false); aorData.horizontalAlignment = SWT.RIGHT; - aorData.widthHint = 20; + aorData.widthHint = 60; AORDistance.setLayoutData(aorData); - if (prod != null) { + /* + * DR15555 - Set the AORDistance selection to: + * 1. empty string - for new alarm + * 2. product's distance - for existing alarm + */ + if (prod.getProductId() != "") { AORDistance.setText(prod.getAorDistance()); } + else { + AORDistance.setText(""); + } AORDistance.addListener(SWT.KeyDown, new Listener() { @Override - public void handleEvent(Event e) { - if (!"".equals(AORDistance.getText()) - || (e.character != 0x8 && e.character != 0x7f)) { - AOR.setSelection(true); - AOR.setBackground(Display.getCurrent().getSystemColor( - SWT.COLOR_YELLOW)); - } - } + public void handleEvent(Event e) { + /* + * DR15555 - handle the AOR selection: + * - set the AOR background gray + * - un-select the AOR + * - set the ugcList text to empty string + */ + AOR.setSelection(false); + AOR.setBackground(Display.getCurrent().getSystemColor( + SWT.COLOR_WIDGET_BACKGROUND)); + ugcList.setText(""); + } }); distanceLabel = new Combo(aor, SWT.READ_ONLY); @@ -378,7 +410,12 @@ public class NewAlarmDlg extends CaveSWTDialog { distanceLabel.setItems(new String[] { "mi", "km" }); aorData.horizontalAlignment = SWT.RIGHT; distanceLabel.setLayoutData(aorData); - if (prod != null) { + /* + * DR15555 - Set the distanceLabel selection to: + * 1. 'mi' - for new alarm + * 2. product's label - for existing alarm + */ + if (prod.getProductId() != "") { distanceLabel.setText(prod.getAorLabel()); } else { distanceLabel.select(0); @@ -394,9 +431,32 @@ public class NewAlarmDlg extends CaveSWTDialog { ugcLabel.setText("UGC List:"); ugcList = new Text(ugc, SWT.SINGLE | SWT.BORDER); ugcList.setLayoutData(gd); - if (prod != null) { + /* + * DR15555 - Set the ugcList selection to: + * 1. empty string - for new alarm + * 2. product's ugcList - for existing alarm + */ + if (prod.getProductId() != "") { ugcList.setText(prod.getUgcList()); } + else { + ugcList.setText(""); + } + ugcList.addListener(SWT.KeyDown, new Listener() { + @Override + public void handleEvent(Event e) { + /* + * DR15555 - handle the ugcList selection: + * - set the AOR background gray + * - un-select the AOR + * - set the AORDistance text to empty string + */ + AOR.setBackground(Display.getCurrent().getSystemColor( + SWT.COLOR_WIDGET_BACKGROUND)); + AOR.setSelection(false); + AORDistance.setText(""); + } + }); // separator GridData fullLayoutData = new GridData(SWT.FILL, SWT.DEFAULT, true, diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java index 5092709723..0a1f547ff4 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java @@ -26,14 +26,25 @@ import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Scanner; +import java.util.StringTokenizer; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.xml.bind.JAXB; import org.eclipse.swt.widgets.Shell; import com.raytheon.uf.common.dataplugin.text.alarms.AlarmAlertProduct; +import com.raytheon.uf.common.dataplugin.text.alarms.AlarmAlertProduct.ProductType; import com.raytheon.uf.common.dataplugin.text.db.StdTextProduct; +import com.raytheon.uf.common.dataquery.requests.RequestConstraint; +import com.raytheon.uf.common.geospatial.SpatialException; +import com.raytheon.uf.common.geospatial.SpatialQueryFactory; +import com.raytheon.uf.common.geospatial.SpatialQueryResult; import com.raytheon.uf.common.localization.ILocalizationFileObserver; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; @@ -45,11 +56,15 @@ import com.raytheon.uf.common.localization.exception.LocalizationOpFailedExcepti 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.viz.texteditor.alarmalert.dialogs.AlarmAlertBell; import com.raytheon.viz.texteditor.command.CommandFactory; import com.raytheon.viz.texteditor.command.CommandFailedException; import com.raytheon.viz.texteditor.command.ICommand; import com.raytheon.viz.texteditor.util.TextEditorUtil; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.GeometryFactory; /** * This class is used for some of the calculation work used in the alarm/alert @@ -62,6 +77,8 @@ import com.raytheon.viz.texteditor.util.TextEditorUtil; * ------------ ---------- ----------- -------------------------- * Sep 18, 2009 mnash Initial creation * 03/19/2012 D. Friedman Fix determination of "Alarm" entries. + * 12/07/2012 15555 m.gamazaychikov Added methods and constants for + * the implementation of proximity alarm * * * @@ -69,6 +86,14 @@ import com.raytheon.viz.texteditor.util.TextEditorUtil; * @version 1.0 */ +/** + * @author michaelg + * + */ +/** + * @author michaelg + * + */ public class AlarmAlertFunctions { private static final AlarmAlertProduct.ProductType AA = AlarmAlertProduct.ProductType.Alarm_Alert; @@ -88,6 +113,23 @@ public class AlarmAlertFunctions { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(AlarmAlertFunctions.class); + + private static final Pattern UGC_NEW_PATTERN = Pattern + .compile("^(([A-Z]{3})(\\d{3}))$"); + + private static final Pattern UGC_FOLLOW_PATTERN = Pattern + .compile("^(\\d{3})$"); + + private static String DEFAULT_DISTANCE="3000"; + + private static final String HYPHEN = Pattern.quote("-"); + + public static final Pattern UGC = Pattern + .compile("(^(\\w{2}[CZ]\\d{3}\\S*-\\d{6}-)$|((\\d{3}-)*\\d{6}-)$|((\\d{3}-)+))"); + + private static final double ONE_DEGREE_MI = 69.09; + + private static final double ONE_DEGREE_KM = 111.20; protected void getGIS() { @@ -105,7 +147,22 @@ public class AlarmAlertFunctions { string.append("AOR"); } if (!"".equals(prod.getAorDistance())) { - string.append("+" + prod.getAorDistance() + prod.getAorLabel()); + /* + * DR15555 - check the text content, + * if it is not a valid number set the + * text to default 3000 mi + */ + Scanner scn = new Scanner(prod.getAorDistance()); + while (scn.hasNext()){ + if (!scn.hasNextInt()){ + prod.setAorDistance(DEFAULT_DISTANCE); + break; + } + else { + scn.next(); + } + } + string.append("AOR+" + prod.getAorDistance() + prod.getAorLabel()); } else if (!"".equals(prod.getUgcList())) { string.append("UGC-" + prod.getUgcList()); } @@ -219,10 +276,11 @@ public class AlarmAlertFunctions { if (productId != null) { productId = productId.trim().toUpperCase(); for (AlarmAlertProduct a : currentAlarms) { - // ************** - // TODO : For now disable Proximity Alerts - // ************** - if (AA.equals(a.getProductType())) { + ProductType pt = a.getProductType(); + /* + * Alarm_Alert + */ + if (AA.equals(pt)) { String s = a.getProductId(); if (s != null) { s = s.trim().toUpperCase(); @@ -234,12 +292,334 @@ public class AlarmAlertFunctions { } } } + /* + * DR1555 - Proximity_Alarm + */ + else if (PA.equals(pt)) {; + String s = a.getProductId(); + if (s != null) { + s = s.trim().toUpperCase(); + if (s.equals(productId)) { + List productList = getProduct(a + .getProductId()); + if (productList.size() > 0) { + StdTextProduct stp = productList.get(0); + if (stp != null) { + Geometry messagePolygon = getMessagePolygon(stp); + if (a.isAor()) { + /* + * Check if polygon in the message + * is within the AOR + */ + if (matchAOR(messagePolygon)) { + prods.add(a); + } + } else if (!"".equals(a.getAorDistance())) { + /* + * Check if polygon in the message + * is within the AOR+distance + */ + if (matchAORExtention(a.getAorDistance(), + a.getAorLabel(), messagePolygon)) { + prods.add(a); + } + } else if (!"".equals(a.getUgcList())) { + /* + * Check if UGCs in the message + * match the UGCs in the alarm + */ + String messageUGCs = getMessageUGCs(stp + .getProduct()); + String alarmUGCs = a.getUgcList(); + if (matchUGCList(alarmUGCs, messageUGCs)) { + prods.add(a); + } + } + } + } + } + } + } } } return prods; } - /** + /** + * Return a String containing UGCs specified in the message + * + * @param productText + * @return + */ + private static String getMessageUGCs(String productText) { + String ugcLine = ""; + for (String line : productText.replaceAll("\r", "").trim().split("\n")) { + Matcher m = UGC.matcher(line); + if (m.find()) { + ugcLine += line; + continue; + } else if (ugcLine.length() > 0) { + break; + } + } + return ugcLine; + } + + /** + * Returns true if the polygon intersects the CWA + * + * @param polygon + * @return + */ + private static boolean matchAOR(Geometry polygon) { + Geometry cwa = null; + String site = LocalizationManager.getInstance().getCurrentSite(); + try { + cwa = readCountyWarningArea(site); + } catch (SpatialException e) { + e.printStackTrace(); + } + if (cwa!=null) { + if (polygon.intersects(cwa)) { + return true; + } + } + return false; + } + + /** + * Returns true if a UGC specified in the alarmUGCs is present in the + * messageUGCs + * + * @param alarmUGCs + * @param messageUGCs + * @return + */ + private static boolean matchUGCList(String alarmUGCs, String messageUGCs) { + List alarmUGCList = getUGCs(alarmUGCs); + for ( String alarmUGC: alarmUGCList) { + if (messageUGCs.contains(alarmUGC) ) { + return true; + } + } + return false; + } + + /** + * Return a List of strings of UGCs + * + * @param ugcString + * @return + */ + private static List getUGCs(String ugcString) { + String[] ugcList = ugcString.split(HYPHEN); + // Process the list of UGC lines into a list of UGCs in full form + // matching edit area names + List finalUGCList = new ArrayList(ugcList.length); + String state = null; + for (String ugc : ugcList) { + Matcher newGroup = UGC_NEW_PATTERN.matcher(ugc); + if (newGroup.matches()) { + state = newGroup.group(2); + finalUGCList.add(newGroup.group(1)); + } else { + Matcher followGroup = UGC_FOLLOW_PATTERN.matcher(ugc); + if (followGroup.matches()) { + finalUGCList.add(state + followGroup.group(1)); + } + } + } + return finalUGCList; + } + + /** + * Return Geometry representing the site's CWA + * + * @param site + * @return + * @throws SpatialException + */ + private static Geometry readCountyWarningArea(String site) + throws SpatialException { + Map map = new HashMap(); + map.put("cwa", new RequestConstraint(site)); + SpatialQueryResult[] result = SpatialQueryFactory.create().query("cwa", + null, null, map, null); + if (result == null || result.length == 0) { + return null; + } + return result[0].geometry; + } + + /** + * Returns true if the polygon intersects the CWA+distance + * + * @param distanceStr + * @param distanceUnits + * @param polygon + * @return + */ + private static boolean matchAORExtention(String distanceStr, + String distanceUnits, Geometry polygon) { + Geometry cwa = null; + String site = LocalizationManager.getInstance().getCurrentSite(); + try { + cwa = readCountyWarningArea(site); + } catch (SpatialException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + Geometry CWAConvex = cwa.convexHull(); + + double d0 = 0.0d; + if ("mi".equalsIgnoreCase(distanceUnits)) { + d0 = ONE_DEGREE_MI; + } else { + d0 = ONE_DEGREE_KM; + } + Double distance = Double.parseDouble(distanceStr); + double centerLat = Math.toRadians(CWAConvex.getCentroid().getY()); + Double deltaX = distance / (Math.cos(centerLat) * d0); + Double deltaY = distance / d0; + Geometry expandedCWA = expandCWABy(CWAConvex, deltaX, deltaY); + + if (expandedCWA != null) { + if (polygon.intersects(expandedCWA)) { + return true; + } + } + return false; + } + + /** + * Return expanded by deltaX-deltaY geometry + * + * @param CWAConvex + * @param deltaX + * @param deltaY + * @return + */ + private static Geometry expandCWABy(Geometry CWAConvex, Double deltaX, + Double deltaY) { + Coordinate[] coords = CWAConvex.getCoordinates(); + Coordinate[] coordsExpanded = new Coordinate[coords.length]; + Double centerLat = CWAConvex.getCentroid().getY(); + Double centerLon = CWAConvex.getCentroid().getX(); + for (int i = 0; i < coords.length; i++) { + double latE = coords[i].y; + double lonE = coords[i].x; + if (coords[i].x < centerLon) { + lonE = coords[i].x - deltaX; + ; + } else if (coords[i].x > centerLon) { + lonE = coords[i].x + deltaX; + } else if (coords[i].x == centerLon) { + lonE = coords[i].x; + } + if (coords[i].y < centerLat) { + latE = coords[i].y - deltaY; + } else if (coords[i].y > centerLat) { + latE = coords[i].y + deltaY; + } else if (coords[i].y == centerLat) { + latE = coords[i].y; + } + coordsExpanded[i] = new Coordinate(lonE, latE); + } + GeometryFactory gf = new GeometryFactory(); + return gf.createLinearRing(coordsExpanded).convexHull(); + } + + /** + * Return the polygon contained in message + * + * @param stp + * @return + */ + private static Geometry getMessagePolygon(StdTextProduct stp) { + String body = stp.getProduct(); + if (body.contains("LAT...LON")) { + Coordinate[] coords = getLatLonCoords(body); + GeometryFactory gf = new GeometryFactory(); + return gf.createLinearRing(coords); + } + return null; + } + + /** + * Return an array of Coordinate[] contained in the message + * + * @param body + * @return + */ + private static Coordinate[] getLatLonCoords(String body) { + String latLon = ""; + boolean insideLatLon = false; + ArrayList coordinates = new ArrayList(); + Pattern latLonPtrn = Pattern + .compile("LAT...LON+(\\s\\d{3,4}\\s\\d{3,5}){1,}"); + Pattern subLatLonPtrn = Pattern.compile("\\s(\\d{3,4})\\s(\\d{3,5})"); + String[] separatedLines = body.split("\n"); + for (String line : separatedLines) { + Matcher m = latLonPtrn.matcher(line); + if (m.find()) { + latLon = line; + insideLatLon = true; + continue; + } + if (insideLatLon) { + m = subLatLonPtrn.matcher(line); + if (!line.startsWith("TIME...") && m.find()) { + latLon += " " + line.trim(); + continue; + } else { + insideLatLon = false; + } + } + } + coordinates = processLatlons(latLon); + Coordinate[] coords = new Coordinate[coordinates.size()]; + coords = coordinates.toArray(coords); + return coords; + } + + /** + * Process the extracted from the message latlon coordinates + * @param latLon + * @return + */ + private static ArrayList processLatlons(String latLon) { + ArrayList coordinates = new ArrayList(); + String currentToken = null; + String latlon = "LAT...LON"; + String latitude = null; + String longitude = null; + boolean pair = false; + Double dlat, dlong; + StringTokenizer latlonTokens = new StringTokenizer(latLon); + while (latlonTokens.hasMoreTokens()) { + currentToken = latlonTokens.nextToken(); + if (!currentToken.equals(latlon)) { + if (pair) { + longitude = currentToken; + + pair = false; + + dlat = (double) (Integer.parseInt(latitude) / 100.0); + dlong = (double) ((Integer.parseInt(longitude) / 100.0) * (-1.0)); + coordinates.add(new Coordinate(dlong, dlat)); + } else { + latitude = currentToken; + pair = true; + } + } + } + Double dlong0 = coordinates.get(0).x; + Double dlat0 = coordinates.get(0).y; + coordinates.add(new Coordinate(dlong0, dlat0)); + return coordinates; + } + + /** * initialize the localization for user with the save/load functions * * @return the initialized localization diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java index b93ccbcb25..ae60b38ee3 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java @@ -34,6 +34,8 @@ import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.TraverseEvent; +import org.eclipse.swt.events.TraverseListener; import org.eclipse.swt.events.VerifyEvent; import org.eclipse.swt.events.VerifyListener; import org.eclipse.swt.layout.GridData; @@ -94,6 +96,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 07/26/2012 15171 rferrel Disable editor's send and clear AFOS PIL fields when * invalid product Id and user want to edit it anyway. * 09/20/2012 1196 rferrel Changing dialogs being called to not block. + * 11/26/2012 14526 mgamazaychikov Added traverse listener for RETURN key * * * @author lvenable @@ -221,6 +224,10 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements // this was after shell.pack() before, any reason why? checkEnableEnter(); + /* + * 14526 - Add the traverse listener for RETURN key + */ + setTraverseListenerReturn(); } @Override @@ -608,49 +615,7 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements enterBtn.setEnabled(true); enterBtn.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { - boolean sendEnabled = true; - if (!isProductValid()) { - // Notify the user that the product may not be valid. - // - // TODO cannot use a model MessageBox here. If displayed - // when an Alarm Alert Bell appears Cave freezes and - // nothing can be done. Need to change this to extend - // CaveSWTDialog in a similar manner to - // WarnGenConfirmationDlg. Better solution if possible - // change AlermAlertBell so modal MessagBox can be used.. - MessageBox mb = new MessageBox(shell, SWT.ICON_QUESTION - | SWT.YES | SWT.NO); - mb.setMessage("Product Designator " - + wsfoIdTF.getText() - + prodCatTF.getText() - + prodDesignatorTF.getText() - + " is not in the list of valid products. Use it anyway?"); - if (mb.open() == SWT.NO) { - return; - } - parentEditor.enableSend(false); - sendEnabled = false; - } else { - parentEditor.enableSend(true); - } - - // call the set methods - parentEditor.setCurrentWmoId(wmoTtaaiiTF.getText()); - parentEditor.setCurrentSiteId(ccccTF.getText()); - if (sendEnabled) { - parentEditor.setCurrentWsfoId(wsfoIdTF.getText()); - parentEditor.setCurrentProdCategory(prodCatTF.getText()); - parentEditor.setCurrentProdDesignator(prodDesignatorTF - .getText()); - } else { - parentEditor.setCurrentWsfoId(""); - parentEditor.setCurrentProdCategory(""); - parentEditor.setCurrentProdDesignator(""); - } - parentEditor.setAddressee(addresseeTF.getText()); - setBbbId(); - setReturnValue(true); - shell.dispose(); + enterBtnPressed(); } }); @@ -668,7 +633,58 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements } - /** + protected void enterBtnPressed() { + /* + * 14526 - Added the check for when RETURN key is pressed + * but the "Enter" button is not enabled. + */ + if ( !enterBtn.getEnabled()) { + return; + } + boolean sendEnabled = true; + if (!isProductValid()) { + // Notify the user that the product may not be valid. + // + // TODO cannot use a model MessageBox here. If displayed + // when an Alarm Alert Bell appears Cave freezes and + // nothing can be done. Need to change this to extend + // CaveSWTDialog in a similar manner to + // WarnGenConfirmationDlg. Better solution if possible + // change AlermAlertBell so modal MessagBox can be used.. + MessageBox mb = new MessageBox(shell, SWT.ICON_QUESTION | SWT.YES + | SWT.NO); + mb.setMessage("Product Designator " + wsfoIdTF.getText() + + prodCatTF.getText() + prodDesignatorTF.getText() + + " is not in the list of valid products. Use it anyway?"); + if (mb.open() == SWT.NO) { + return; + } + parentEditor.enableSend(false); + sendEnabled = false; + } else { + parentEditor.enableSend(true); + } + + // call the set methods + parentEditor.setCurrentWmoId(wmoTtaaiiTF.getText()); + parentEditor.setCurrentSiteId(ccccTF.getText()); + if (sendEnabled) { + parentEditor.setCurrentWsfoId(wsfoIdTF.getText()); + parentEditor.setCurrentProdCategory(prodCatTF.getText()); + parentEditor.setCurrentProdDesignator(prodDesignatorTF.getText()); + } else { + parentEditor.setCurrentWsfoId(""); + parentEditor.setCurrentProdCategory(""); + parentEditor.setCurrentProdDesignator(""); + } + parentEditor.setAddressee(addresseeTF.getText()); + setBbbId(); + setReturnValue(true); + shell.dispose(); + } + + + /** * This is a convenience method that will center a label in a RowLayout. * When controls are placed in a RowLayout they are "aligned" at the top of * the cell. @@ -942,6 +958,17 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements } } }); + + /* + * 14526 - Add the traverse listener for RETURN key + */ + tf.addTraverseListener(new TraverseListener() { + @Override + public void keyTraversed(TraverseEvent te) { + te.doit = true; + } + }); + } private void textFieldVerifyListener(final StyledText tf) { @@ -1005,4 +1032,19 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements if (allBtn != null) allBtn.setSelection("ALL".equals(addressee)); } + + /* + * Adds the traverse listener for RETURN key + */ + private void setTraverseListenerReturn() { + shell.addTraverseListener(new TraverseListener() { + @Override + public void keyTraversed(TraverseEvent event) { + if (event.detail == SWT.TRAVERSE_RETURN) { + enterBtnPressed(); + } + } + + }); + } } diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java index 07e85110ff..f84ca7344b 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java @@ -60,7 +60,6 @@ import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.ExtendedModifyEvent; import org.eclipse.swt.custom.ExtendedModifyListener; -import org.eclipse.swt.custom.PopupList; import org.eclipse.swt.custom.ST; import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; @@ -99,9 +98,11 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.FileDialog; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Layout; +import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.MessageBox; @@ -303,6 +304,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox; * Do not use changed BBB from OUPResponse. * 17OCT2012 1229 rferrel Changes for non-blocking SWTMessageBox. * 05Nov2012 15560 S. Naples Added check to see if we are in edit mode before capturing keys. + * 28Nov2012 14842 M.Gamazaychikov Re-wrote processPopup method * * * @author lvenable @@ -1106,6 +1108,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, private static final String[] popupItems = { "Select All", "Cut", "Copy", "Paste" }; + + private static final boolean[] isPopItemDefault = { true, false, true, + false }; private boolean warnGenFlag = false; @@ -3635,7 +3640,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, } if (e.button == 3) { - processPopup(e.x, e.y); + processPopup(); } } @@ -3648,33 +3653,48 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, /** * Process the user choice from the popup list. + * DR14842 - re-written */ - private void processPopup(int x, int y) { - PopupList popupList = new PopupList(shell); - popupList.setMinimumWidth(50); - if (isEditMode()) { - popupList.setItems(popupItems); - } else { - popupList.setItems(new String[] { "Select All", "Copy" }); - } - popupList.select(popupItems[0]); - - Point p = Display.getCurrent().map(textEditor, null, x, y); - String choice = popupList.open(new Rectangle(p.x + 10, p.y + 10, 100, - 200)); - if (choice != null) { - if (popupItems[0].equals(choice)) { - textEditor.selectAll(); - } else if (popupItems[1].equals(choice)) { - cutText(); - } else if (popupItems[2].equals(choice)) { - copyText(); - } else if (popupItems[3].equals(choice)) { - pasteText(); - } - textEditor.update(); - } - } + private void processPopup() { + Menu menu = new Menu(shell, SWT.POP_UP); + List items = Arrays.asList(popupItems); + for (String pi : popupItems) { + MenuItem mi = new MenuItem(menu, SWT.PUSH); + mi.setText(pi); + if (isEditMode()) { + mi.setEnabled(true); + } else { + mi.setEnabled(isPopItemDefault[items.indexOf(pi)]); + } + mi.addListener(SWT.Selection, new Listener() { + public void handleEvent(Event event) { + handleSelection(event); + } + }); + } + menu.setVisible(true); + } + + /** + * Handle the selection from the popup menu + * @param event + */ + protected void handleSelection(Event event) { + MenuItem item = (MenuItem) event.widget; + String choice = item.getText(); + if (choice != null) { + if (popupItems[0].equals(choice)) { + textEditor.selectAll(); + } else if (popupItems[1].equals(choice)) { + cutText(); + } else if (popupItems[2].equals(choice)) { + copyText(); + } else if (popupItems[3].equals(choice)) { + pasteText(); + } + textEditor.update(); + } + } /** * creates the bar containing the script runner controls. diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml index e832ad8001..7e23bec49f 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml @@ -25,8 +25,8 @@ - - + + diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml index 7399ffd7c1..b57792b62d 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/fieldsMenus.xml @@ -1309,7 +1309,7 @@ key="PWmean" indentText="false" /> - @@ -1353,7 +1353,7 @@ key="PWsprd" indentText="false" /> - diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java index a49215bf1f..1d65601dd9 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java @@ -56,7 +56,8 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Dec 1, 2010 mschenke Initial creation - * + * 12/06/2012 DR 15559 Qinglu Lin Added round() methods. + * * * * @author mschenke @@ -953,4 +954,34 @@ public class PolygonUtil { coordinate.x = x / Math.pow(10, decimalPlaces); coordinate.y = y / Math.pow(10, decimalPlaces); } + + public static void round(Listcoordinates, int decimalPlaces) { + for (Coordinate coordinate : coordinates) { + round(coordinate, decimalPlaces); + } + } + + public static void round(Coordinate[] coordinates, int decimalPlaces) { + for (Coordinate coordinate : coordinates) { + round(coordinate, decimalPlaces); + } + } + + /** + * round() + * Rounding coordinates, instead of truncating them. + * + * History + * 12/06/2012 DR 15559 Qinglu Lin Created. + */ + public static void round(Coordinate coordinate, int decimalPlaces) { + double x = coordinate.x * Math.pow(10, decimalPlaces); + double y = coordinate.y * Math.pow(10, decimalPlaces); + + x = Math.round(x); + y = Math.round(y); + + coordinate.x = x / Math.pow(10, decimalPlaces); + coordinate.y = y / Math.pow(10, decimalPlaces); + } } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java index 2dd146da63..fbddbdb397 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java @@ -143,7 +143,17 @@ import com.vividsolutions.jts.io.WKTReader; * 11/02/2012 DR 15455 Qinglu Lin Added setWarningAction(), called redrawBoxFromTrack() while * 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 + * 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 + * Coordinate[] from futurePoints. + * 12/18/2012 DR 15571 Qinglu Lin Resolved coordinate issue in TML line caused by clicking Restart button. + * * * * @author mschenke @@ -228,7 +238,7 @@ public class WarngenLayer extends AbstractStormTrackResource { private GeospatialDataList geoData = null; - private WarningAction warningAction = null; + private WarningAction warningAction = WarningAction.NEW; static { for (int i = 0; i < 128; i++) { @@ -975,7 +985,7 @@ public class WarngenLayer extends AbstractStormTrackResource { Geometry area = buildArea(polygon); for (ActiveTableRecord activeTableRecord : records) { Map countyMap = FipsUtil - .parseCountyHeader(activeTableRecord.getCountyheader()); + .parseCountyHeader(activeTableRecord.getUgcZone()); // get area with precalculated area activeTableRecord.setGeometry(getArea(area, countyMap)); } @@ -1599,8 +1609,17 @@ public class WarngenLayer extends AbstractStormTrackResource { .hatchWarningArea(state.getWarningPolygon(), state.getWarningArea()); if (hatched != null) { - state.setWarningPolygon(hatched); - state.snappedToArea = true; + // DR 15559 + Coordinate[] coords = hatched.getCoordinates(); + PolygonUtil.round(coords, 2); + state.adjustPolygon(coords); + GeometryFactory gf = new GeometryFactory(); + LinearRing lr = gf.createLinearRing(coords); + state.setWarningPolygon(gf.createPolygon(lr, null)); + updateWarnedAreas(true, true); + issueRefresh(); + // End of DR 15559 + state.snappedToArea = true; } System.out.println("Time to createWarningPolygon: " + (System.currentTimeMillis() - t0) + "ms"); @@ -1819,9 +1838,16 @@ public class WarngenLayer extends AbstractStormTrackResource { Coordinate[] cc = null; switch (stormTrackState.displayType) { case POINT: - cc = new Coordinate[] { stormTrackState.futurePoints == null ? stormTrackState.dragMePoint - .getCoordinate() : stormTrackState.futurePoints[0].coord }; - break; + cc = new Coordinate[] { stormTrackState.futurePoints == null ? stormTrackState.dragMePoint + .getCoordinate() : stormTrackState.futurePoints[0].coord }; + if (warningAction == null || warningAction == WarningAction.NEW || warningAction == WarningAction.CON + || warningAction == WarningAction.CAN) { + Coordinate coord = new Coordinate(stormTrackState.dragMePoint.getCoordinate()); + DataTime currentDataTime = new DataTime(SimulatedTime.getSystemTime().getTime()); + if (stormTrackState.compuateCurrentStormCenter(coord,currentDataTime)) + cc = new Coordinate[] {coord}; + } + break; case POLY: Coordinate[] polyPoints = stormTrackState.dragMeLine .getCoordinates(); diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIState.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIState.java index bb3090c986..ce3dcd4f4f 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIState.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIState.java @@ -41,6 +41,8 @@ import com.vividsolutions.jts.geom.Polygon; * May 7, 2010 mschenke Initial creation * 03/14/2012 DR 14690 Qinglu Lin Add clear2(). * 10/26/2012 DR 15479 Qinglu Lin Added removeDuplicateCoordinate(). + * 12/06/2012 DR 15559 Qinglu Lin Added computeSlope(), computeCoordinate(), + * and adjustPolygon(). * * * @@ -145,6 +147,151 @@ public class WarngenUIState { warningPolygon = gf.createPolygon(gf.createLinearRing(vertices), null); } + /** + * computeSlope + * compute the slope of a line. + * + * History + * 12/06/2012 DR 15559 Qinglu Lin Created. + */ + private double computeSlope(Coordinate[] coords, int i) { + double min = 1.0E-08; + double dx = coords[i].x-coords[i+1].x; + double slope = 0.0; + if (Math.abs(dx)>min) { + slope = (coords[i].y-coords[i+1].y)/dx; + } + return slope; + } + + /** + * computeCoordinate + * Compute the x component of a coordinate after its y component + * is adjusted. + * + * History + * 12/06/2012 DR 15559 Qinglu Lin Created. + */ + private void computeCoordinate(Coordinate[] c, int i, int j) { + double slope; + slope = computeSlope(c,i); + int iPlus1 = i+1; + if (c[j].x>=c[i].x && c[j].x<=c[iPlus1].x || + c[j].x>=c[iPlus1].x && c[j].x<=c[i].x) { + + double x,y; + double min1 = 0.005d; + y = slope*(c[j].x-c[i].x) + c[i].y; + double d = Math.abs(y-c[j].y); + if (d>min1) + return; + + double min2 = 1.0E-8d; + double delta = 0.005d; // empirical value + double dyMin = 0.01d; + int jMinus1 = j-1; + if (jMinus1<0) + jMinus1 = c.length-2; + int jPlus1 = j+1; + if (Math.abs(y-c[j].y)=dy2 && (Math.abs(dy1)>dyMin || Math.abs(dy2)>dyMin)) { + // attempt to use l2 for computation + if (c[j].y==c[jMinus1].y && Math.abs(c[j].x-c[jMinus1].x)>min2) { + // l2 is a horizontal line, use l3 for computation + if (c[jPlus1].y min2) { + y = c[j].y+delta; + x = (y-c[jPlus1].y)/slope + c[jPlus1].x; + } else { + // l3 is a vertical line + y = c[j].y+delta; + x = c[j].x; + } + } else { + // use l2 for computation + if (c[jMinus1].y min2) { + y = c[j].y+delta; + x = (y-c[jMinus1].y)/slope + c[jMinus1].x; + } else { + // l2 is a vertical line + y = c[j].y+delta; + x = c[j].x; + } + } + } else { + if (Math.abs(dy1)>dyMin || Math.abs(dy2)>dyMin) { + // attempt to use l3 for computation + if (c[j].y==c[jPlus1].y && Math.abs(c[j].x-c[jPlus1].x)>min2) { + // l3 is a horizontal line, use l2 for computation + if (c[jMinus1].y min2) { + y = c[j].y+delta; + x = (y-c[jMinus1].y)/slope + c[jMinus1].x; + } else { + // l2 is a vertical line + y = c[j].y+delta; + x = c[j].x; + } + } else { + // use l3 for computation + if (c[jPlus1].y min2) { + y = c[j].y+delta; + x = (y-c[jPlus1].y)/slope + c[jPlus1].x; + } else { + // l3 is a vertical line + y = c[j].y+delta; + x = c[j].x; + } + } + } else { + x = c[j].x; + y = c[j].y; + } + } + c[j].x = x; + c[j].y = y; + if (j==0) + c[c.length-1] = c[j]; + } + } + } + + /** + * adjustPolygon + * When a point is very close to a line in the initial warning polygon, the resulting coordinates + * cause the failure of polygon drawing in follow-up. The method move that kind of points away from + * the line, and return a Polygon. + * + * History + * 12/06/2012 DR 15559 Qinglu Lin Created. + */ + public void adjustPolygon(Coordinate[] coords) { + int n = coords.length; + for (int i=0; i * * @author njensen @@ -368,8 +373,6 @@ public class TemplateRunner { // CAN and EXP products follow different rules as followups if (!(selectedAction == WarningAction.CAN || selectedAction == WarningAction.EXP)) { - Coordinate[] stormLocs = warngenLayer - .getStormLocations(stormTrackState); wx = new Wx(config, stormTrackState, warngenLayer.getStormLocations(stormTrackState), startTime.getTime(), DateUtil.roundDateTo15(endTime) @@ -391,7 +394,10 @@ public class TemplateRunner { context.put("duration", duration); context.put("event", eventTime); - context.put("TMLtime", eventTime); + if (selectedAction == WarningAction.COR) + context.put("TMLtime", eventTime); + else + context.put("TMLtime", simulatedTime); context.put("ugcline", FipsUtil.getUgcLine(areas, wx.getEndTime(), 15)); context.put("areaPoly", GisUtil.convertCoords(warngenLayer @@ -433,13 +439,25 @@ public class TemplateRunner { motionDirection -= 360; } context.put("movementDirection", motionDirection); + Coordinate[] stormLocs = warngenLayer + .getStormLocations(stormTrackState); // Convert to Point2D representation as Velocity requires // getX() and getY() methods which Coordinate does not have - Coordinate[] newStormLocs = GisUtil.d2dCoordinates(stormLocs); - Point2D.Double[] coords = new Point2D.Double[newStormLocs.length]; - for (int i = 0; i < newStormLocs.length; i++) { - coords[i] = new Point2D.Double(newStormLocs[i].x, - newStormLocs[i].y); + if (selectedAction == WarningAction.COR) { + AbstractWarningRecord oldWarn = CurrentWarnings.getInstance( + threeLetterSiteId).getNewestByTracking(etn, phenSig); + String loc = oldWarn.getLoc(); + if (loc != null) { + Geometry locGeom = wkt.read(loc); + stormLocs = locGeom.getCoordinates(); + } + } else { + stormLocs = GisUtil.d2dCoordinates(stormLocs); + } + Point2D.Double[] coords = new Point2D.Double[stormLocs.length]; + for (int i = 0; i < stormLocs.length; i++) { + coords[i] = new Point2D.Double(stormLocs[i].x, + stormLocs[i].y); } context.put("eventLocation", coords); t0 = System.currentTimeMillis(); @@ -453,6 +471,7 @@ public class TemplateRunner { threeLetterSiteId).getNewestByTracking(etn, phenSig); context.put("now", simulatedTime); context.put("event", eventTime); + context.put("TMLtime", eventTime); context.put("start", oldWarn.getStartTime().getTime()); context.put("expire", oldWarn.getEndTime().getTime()); Calendar canOrExpCal = Calendar.getInstance(); @@ -468,13 +487,21 @@ public class TemplateRunner { .getCoordinates())); // If there is no storm track if (oldWarn.getLoc() != null) { - Geometry locGeom = wkt.read(oldWarn.getLoc()); - Coordinate[] locs = locGeom.getCoordinates(); // Convert to Point2D representation as Velocity requires // getX() and getY() methods which Coordinate does not have - Point2D.Double[] coords = new Point2D.Double[locs.length]; + Point2D.Double[] coords; + Coordinate[] locs; + if (selectedAction == WarningAction.CAN) { + locs = warngenLayer.getStormLocations(stormTrackState); + locs = GisUtil.d2dCoordinates(locs); + coords = new Point2D.Double[locs.length]; + } else { + Geometry locGeom = wkt.read(oldWarn.getLoc()); + locs = locGeom.getCoordinates(); + coords = new Point2D.Double[locs.length]; + } for (int i = 0; i < locs.length; i++) { - coords[i] = new Point2D.Double(locs[i].x, locs[i].y); + coords[i] = new Point2D.Double(locs[i].x, locs[i].y); } context.put("eventLocation", coords); double motionDirection = oldWarn.getMotdir(); @@ -921,10 +948,7 @@ public class TemplateRunner { System.out.println("getWatches.createWatchGeometry time: " + (t1 - t0)); - t0 = System.currentTimeMillis(); rval = processATEntries(activeTable, warngenLayer); - System.out.println("getWatches.createPoritions time: " - + (t1 - t0)); } } @@ -1007,6 +1031,10 @@ public class TemplateRunner { if (!ar.getGeometry().isEmpty()) work.valid = true; + /* TODO: Currently adding all zones to the list even if they + * are not in the CWA. Validation is currently done in + * determineAffectedPortions to avoid redundant work. + */ work.ugcZone.add(ar.getUgcZone()); } @@ -1017,7 +1045,7 @@ public class TemplateRunner { */ if (!work.valid) continue; - if (determineAffectedPortions(work.ugcZone, asc, geoData, work.waw)); + if (determineAffectedPortions(work.ugcZone, asc, geoData, work.waw)) rval.addWaw(work.waw); } @@ -1026,7 +1054,8 @@ public class TemplateRunner { /** * Given the list of counties in a watch, fill out the "portions" part of - * the given WeatherAdvisoryWatch + * the given WeatherAdvisoryWatch. Also checks if the given counties are + * actually in the CWA. * * @param ugcs * @param asc @@ -1041,25 +1070,36 @@ public class TemplateRunner { HashMap> map = new HashMap>(); for (String ugc : ugcs) { - for (Entry e : FipsUtil.parseCountyHeader(ugc).entrySet()) { - String stateAbbrev = e.getKey(); - if (e.getValue().length != 1) // either zero or more than one - // would be wrong - statusHandler.handle(Priority.ERROR, - "Invalid ugczone in active table entry"); - Set feAreas = map.get(stateAbbrev); - if (feAreas == null) { - feAreas = new HashSet(); - map.put(stateAbbrev, feAreas); - } - try { - feAreas.add(getFeArea(stateAbbrev, e.getValue()[0], asc, - geoData)); - } catch (RuntimeException exc) { - statusHandler.handle(Priority.ERROR, "Error generating included watches.", exc); - return false; - } + Map parsed = FipsUtil.parseCountyHeader(ugc); + Entry e = null; + + // Either zero or more than one sates/counties would be wrong + if (parsed.size() != 1 + || (e = parsed.entrySet().iterator().next()).getValue().length != 1) { + statusHandler.handle(Priority.ERROR, + "Invalid ugczone in active table entry: " + ugc); + continue; } + + String stateAbbrev = e.getKey(); + String feArea = null; + try { + feArea = getFeArea(stateAbbrev, e.getValue()[0], asc, + geoData); + } catch (RuntimeException exc) { + statusHandler.handle(Priority.ERROR, "Error generating included watches.", exc); + return false; + } + if (feArea == NOT_IN_CWA) + continue; + + Set feAreas = map.get(stateAbbrev); + if (feAreas == null) { + feAreas = new HashSet(); + map.put(stateAbbrev, feAreas); + } + if (feArea != null) + feAreas.add(feArea); } ArrayList portions = new ArrayList(map.size()); @@ -1074,8 +1114,6 @@ public class TemplateRunner { } portion.partOfParentRegion = Area .converFeAreaToPartList(mungeFeAreas(e.getValue())); - System.out.format("Munged %s to %s (%s)\n", e.getValue(), - mungeFeAreas(e.getValue()), portion.partOfParentRegion); portions.add(portion); } waw.setPortions(portions); @@ -1196,7 +1234,17 @@ public class TemplateRunner { } return null; } + + private static String NOT_IN_CWA = new String("NOT_IN_CWA"); + /** Determines if the given UGC is in the CWA and if it is, returns + * the portion of the CWA. + * @param stateAbbrev + * @param ugc + * @param asc + * @param geoData + * @return + */ private static String getFeArea(String stateAbbrev, String ugc, AreaSourceConfiguration asc, GeospatialData[] geoData) { for (GeospatialData g : geoData) { @@ -1206,7 +1254,8 @@ public class TemplateRunner { return (String) g.attributes.get(asc.getFeAreaField()); } - return null; + // TODO: Is this the correct way to determine if the county is in the CWA? + return NOT_IN_CWA; } } diff --git a/cots/com.google.guava/com.google.guava.ecl b/cots/com.google.guava/com.google.guava.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/de.micromata.opengis.kml/de.micromata.opengis.kml.ecl b/cots/de.micromata.opengis.kml/de.micromata.opengis.kml.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/org.apache.tomcat.nativ/org.apache.tomcat.nativ.ecl b/cots/org.apache.tomcat.nativ/org.apache.tomcat.nativ.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cots/org.jivesoftware.openfire/org.jivesoftware.openfire.ecl b/cots/org.jivesoftware.openfire/org.jivesoftware.openfire.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ffmp/FFMPSourceConfig.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ffmp/FFMPSourceConfig.xml index 3780f841e7..08b5cba234 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/ffmp/FFMPSourceConfig.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ffmp/FFMPSourceConfig.xml @@ -9,8 +9,7 @@ RADAR QPE rate - 10 - inches + 10 DPR @@ -21,8 +20,7 @@ RADAR QPE rate - 15 - inches + 15 DHRMOSAIC @@ -32,8 +30,7 @@ XMRG QPE rate - 15 - inches + 15 0.0003937 yyyyMMddHHmm 4 @@ -46,8 +43,7 @@ XMRG QPE rate - 15 - inches + 15 0.0003937 yyyyMMddHHmm 4 @@ -63,8 +59,7 @@ PDO QPF accum - 15 - inches + 15 true @@ -75,8 +70,7 @@ XMRG QPF accum - 15 - inches + 15 0.0003937 true yyyyMMddHHmm @@ -90,8 +84,7 @@ XMRG QPF accum - 15 - inches + 15 0.0003937 true yyyyMMddHHmm @@ -108,8 +101,7 @@ accum 2080 true - true - inches + true 0.03937 true RFC @@ -125,8 +117,7 @@ accum 2080 true - true - inches + true 0.03937 true RFC @@ -142,8 +133,7 @@ accum 2080 true - true - inches + true 0.03937 true RFC @@ -156,8 +146,7 @@ XMRG GAGE rate - 30 - inches + 30 0.0003937 4 @@ -169,8 +158,7 @@ XMRG GAGE rate - 30 - inches + 30 0.0003937 4 @@ -182,8 +170,7 @@ RADAR GAGE rate - 15 - inches + 15 VGBDPR @@ -193,8 +180,7 @@ RADAR GAGE rate - 15 - inches + 15 DHRMOSAIC diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NcGridSoundingInventory.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NcGridSoundingInventory.xml index dde5030b14..d9eca31919 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NcGridSoundingInventory.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NcGridSoundingInventory.xml @@ -6,7 +6,7 @@ pluginName,modelName,eventName,dataTime - + diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/edex_static/base/distribution/bufrua.xml b/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/edex_static/base/distribution/bufrua.xml index c92a6d18ae..6911ea7a87 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/edex_static/base/distribution/bufrua.xml +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/utility/edex_static/base/distribution/bufrua.xml @@ -19,6 +19,6 @@ further_licensing_information. --> - ^IUSZ[4-9][123468].* + ^IUSZ[0-9][123468].* ^IUSY4[123468].* diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/component-deploy.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/component-deploy.xml deleted file mode 100644 index 85a4a24823..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/component-deploy.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml index ecc5fa2616..1520e2c58d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml @@ -349,6 +349,14 @@ value="com.raytheon.uf.common.dataplugin.gfe.request.CheckPermissionsRequest" /> + + + + + + diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java index 8cdb67e5c9..6eba94d5ba 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java @@ -1,19 +1,19 @@ /** * 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. **/ @@ -33,6 +33,7 @@ import com.raytheon.edex.plugin.gfe.cache.ifpparms.IFPParmIdCache; import com.raytheon.edex.plugin.gfe.db.dao.GFEDao; import com.raytheon.edex.plugin.gfe.db.dao.IscSendRecordDao; import com.raytheon.edex.plugin.gfe.exception.GfeConfigurationException; +import com.raytheon.edex.plugin.gfe.exception.GfeMissingConfigurationException; import com.raytheon.edex.plugin.gfe.isc.IRTManager; import com.raytheon.edex.plugin.gfe.reference.MapManager; import com.raytheon.edex.plugin.gfe.server.GridParmManager; @@ -64,9 +65,9 @@ import com.raytheon.uf.edex.site.ISiteActivationListener; /** * Activates the GFE server capabilities for a site - * + * *
- * 
+ *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
@@ -75,9 +76,11 @@ import com.raytheon.uf.edex.site.ISiteActivationListener;
  * Apr 06, 2012  #457     dgilling    Clear site's ISCSendRecords on
  *                                    site deactivation.
  * Jul 12, 2012  15162    ryu         added check for invalid db at activation
- * 
+ * Dec 11, 2012  14360    ryu         log a clean message in case of
+ *                                    missing configuration (no stack trace).
+ *
  * 
- * + * * @author njensen * @version 1.0 */ @@ -214,7 +217,7 @@ public class GFESiteActivation implements ISiteActivationListener { /** * Activates a site by reading its server config and generating maps, topo, * and text products for the site - * + * * @param siteID */ @Override @@ -237,6 +240,13 @@ public class GFESiteActivation implements ISiteActivationListener { "Error validating configuration for " + siteID); } internalActivateSite(siteID); + } catch (GfeMissingConfigurationException e) { + sendActivationFailedNotification(siteID); + // Stack trace is not printed per requirement for DR14360 + statusHandler.handle(Priority.PROBLEM, siteID + + " will not be activated: " + + e.getLocalizedMessage()); + throw e; } catch (Exception e) { sendActivationFailedNotification(siteID); statusHandler.handle(Priority.PROBLEM, siteID @@ -253,10 +263,10 @@ public class GFESiteActivation implements ISiteActivationListener { /** * Activate site routine for internal use. - * + * * Doesn't update the site list so it is preserved when loading sites at * start up - * + * * @param siteID * @throws PluginException * @throws GfeException @@ -478,7 +488,7 @@ public class GFESiteActivation implements ISiteActivationListener { /** * Deactivates a site's GFE services - * + * * @param siteID */ @Override @@ -552,7 +562,7 @@ public class GFESiteActivation implements ISiteActivationListener { /** * Returns the currently active GFE sites the server is running - * + * * @return the active sites */ @Override @@ -562,7 +572,7 @@ public class GFESiteActivation implements ISiteActivationListener { /* * (non-Javadoc) - * + * * @see com.raytheon.uf.edex.site.ISiteActivationListener#validateConfig() */ @Override diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/IFPServerConfigManager.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/IFPServerConfigManager.java index c9e35e5a6e..d598a82682 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/IFPServerConfigManager.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/IFPServerConfigManager.java @@ -1,19 +1,19 @@ /** * 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. **/ @@ -31,6 +31,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.raytheon.edex.plugin.gfe.exception.GfeConfigurationException; +import com.raytheon.edex.plugin.gfe.exception.GfeMissingConfigurationException; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteDefinition; import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey; import com.raytheon.uf.common.dataplugin.gfe.python.GfePyIncludeUtil; @@ -45,16 +46,17 @@ import com.raytheon.uf.common.util.FileUtil; /** * Manages the serverConfigs of active sites - * + * *
- * 
+ *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Jul 9, 2009            njensen     Initial creation
- * 
+ * Dec 11, 2012 14360     ryu         Throw specific exception for missing configuration.
+ *
  * 
- * + * * @author njensen * @version 1.0 */ @@ -72,7 +74,7 @@ public class IFPServerConfigManager { /** * Returns the sites that have active configurations - * + * * @return */ protected static Set getActiveSites() { @@ -81,7 +83,7 @@ public class IFPServerConfigManager { /** * Gets the server configuration for a particular site - * + * * @param siteID * the site * @return the site's configuration @@ -100,7 +102,7 @@ public class IFPServerConfigManager { /** * Initializes a site's serverConfig by reading in the site's localConfig - * + * * @param siteID * the site * @return the site's configuration @@ -152,11 +154,11 @@ public class IFPServerConfigManager { } } if (!siteConfigFound) { - throw new GfeConfigurationException( + throw new GfeMissingConfigurationException( "No siteConfig.py file found for " + siteID); } } else { - throw new GfeConfigurationException( + throw new GfeMissingConfigurationException( "No site config directory found for " + siteID); } siteDir = siteDirFile.getPath(); @@ -186,7 +188,7 @@ public class IFPServerConfigManager { /** * Removes a site's configuration from the set of active configurations - * + * * @param siteID */ protected static void removeSite(String siteID) { diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/exception/GfeMissingConfigurationException.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/exception/GfeMissingConfigurationException.java new file mode 100644 index 0000000000..3dc22dd867 --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/exception/GfeMissingConfigurationException.java @@ -0,0 +1,59 @@ +/** + * 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.edex.plugin.gfe.exception; + +/** + * Exception class for missing GFE server configuration + * + *
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * 12/11/12     #14360     ryu         Initial Creation
+ *
+ * 
+ * + * @author ryu + * @version 1.0 + */ +public class GfeMissingConfigurationException extends GfeConfigurationException { + + private static final long serialVersionUID = 1L; + + /** + * @param aCause + */ + public GfeMissingConfigurationException(String aCause) { + super(aCause); + } + + /** + * Parser exception set with a cause and an existing exception. Used for + * exception chaining to preserve state. + * + * @param aCause + * @param anException + */ + public GfeMissingConfigurationException(String aCause, Throwable anException) { + super(aCause, anException); + } + +} diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/NcCheckRequestHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/NcCheckRequestHandler.java new file mode 100644 index 0000000000..4e91db9024 --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/NcCheckRequestHandler.java @@ -0,0 +1,58 @@ +/** + * 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.edex.plugin.gfe.server.handler.svcbu; + +import com.raytheon.edex.plugin.gfe.svcbackup.SvcBackupUtil; +import com.raytheon.uf.common.dataplugin.gfe.request.NcCheckRequest; +import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; + +/** + * TODO Add Description + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Nov 14, 2012            jdynina     Initial creation
+ * 
+ * 
+ * + * @author jdynina + * @version 1.0 + */ + +public class NcCheckRequestHandler implements IRequestHandler{ + + public Object handleRequest(NcCheckRequest request) + throws Exception { + ServerResponse sr = new ServerResponse(); + if (!isNationalCenter()) { + sr.addMessage("Site is not a national center."); + } + return sr; + } + + public boolean isNationalCenter() { + return SvcBackupUtil.ncCheck(); + } +} diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java index 2bab561d3d..55819d0326 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java @@ -56,7 +56,8 @@ import com.raytheon.uf.edex.core.props.PropertiesFactory; * Oct 09, 2009 bphillip Initial creation * Sep 19, 2011 10955 rferrel make sure process destroy is called. * Jun 12, 2012 00609 djohnson Use EDEXUtil for EDEX_HOME. - * + * Nov 15,2012 15614 jdynina Added check for national center + * * * * @author bphillip @@ -263,4 +264,13 @@ IUser user, + roleId); } + + public static boolean ncCheck() { + String nationalCenter = SvcBackupUtil.getSvcBackupProperties() + .getProperty("NATIONAL_CENTER"); + if (nationalCenter.equals("1")) { + return true; + } + return false; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java index 9935b65395..93db4bbacb 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java @@ -341,6 +341,11 @@ public class GribSpatialCache { Coordinate upperRightPosition = new Coordinate(xCenterPoint + xDistance, yCenterPoint - yDistance); + lowerLeftPosition.x = Math.min(Math.max(0, lowerLeftPosition.x), referenceCoverage.getNx() - 1); + lowerLeftPosition.y = Math.min(Math.max(0, lowerLeftPosition.y), referenceCoverage.getNy() - 1); + upperRightPosition.x = Math.min(Math.max(0, upperRightPosition.x), referenceCoverage.getNx() - 1); + upperRightPosition.y = Math.min(Math.max(0, upperRightPosition.y), referenceCoverage.getNy() - 1); + lowerLeftPosition = MapUtil.gridCoordinateToLatLon( lowerLeftPosition, PixelOrientation.CENTER, referenceCoverage); diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid104.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid104.xml index 111beff391..a37e167b99 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid104.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid104.xml @@ -1,20 +1,20 @@ diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_NCEP-7.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_NCEP-7.xml index d9c1c7c0ad..69b9edbc1b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_NCEP-7.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_NCEP-7.xml @@ -2474,7 +2474,7 @@ - GFSGuide + GFSGuide-361091001
7
4 361091001 @@ -3119,7 +3119,7 @@
- TPCWindProb + TPCWindProb-721181001
7
10 721181001 diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/ecmwf.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/ecmwf.xml index 86e431ec4d..bf1cd78b0a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/ecmwf.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/ecmwf.xml @@ -2,26 +2,46 @@ 0 + 21600 43200 + 64800 86400 + 108000 129600 + 151200 172800 + 194400 216000 + 237600 259200 + 280800 302400 + 324000 345600 + 367200 388800 + 410400 432000 + 453600 475200 + 496800 518400 + 540000 561600 + 583200 604800 + 626400 648000 + 669600 691200 + 712800 734400 + 756000 777600 + 799200 820800 - 864000 + 842400 + 864000 staticXspacing @@ -90,7 +110,7 @@ - tp_ecmwf + tp6hr total precipitation mm millimeter diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpc_qpf218.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpc_qpf218.xml index e3f2de13d0..db70a0b28c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpc_qpf218.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/parameterInfo/hpc_qpf218.xml @@ -16,7 +16,7 @@ 259200 - tp_HPC + tpHPC 6 hr Total Precip mm millimeter diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java index 3e41aac8a2..bb4903bba3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java @@ -56,6 +56,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * correctly parse multiple SHEF formats * 12/03/2008 chammack Camel refactor * 12/xx/2010 jkorman Complete rewrite. + * 11/29/2012 lbousaidi fixed the decoding issue when the shef starts + * with : * * * @author bphillip @@ -615,9 +617,6 @@ public class ShefSeparator extends AbstractRecordSeparator { private static String removeInternalComments(String dataLine) { String s = null; if (dataLine != null) { - if (dataLine.startsWith(":")) { - s = new String(); - } else { StringBuilder buffer = new StringBuilder(dataLine.length()); boolean inComment = false; for (int i = 0; i < dataLine.length(); i++) { @@ -630,8 +629,7 @@ public class ShefSeparator extends AbstractRecordSeparator { inComment = !inComment; } } - s = buffer.toString(); - } + s = buffer.toString(); } else { s = new String(); } diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java index 2c15ec8d28..c355d74a3d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostTables.java @@ -78,6 +78,8 @@ import com.raytheon.uf.edex.database.dao.DaoConfig; * 02/02/2009 1943 J. Sanchez Add method postRiverStatus. * 05/29/2009 2410 J. Sanchez Posted data for unknstnvalue. * 02/24/2012 14535 W. Kwock Correct the duration value. + * 11/29/2012 15530 lbousaidi corrected posting and production time for + * latestobsvalue table. * * * @@ -1074,11 +1076,10 @@ public class PostTables { } cs.setString(11, productId); - cs.setTimestamp(12, new Timestamp(shefData.getObservationTimeObj() - .getTime())); - cs.setTimestamp(13, new Timestamp(shefData.getObservationTimeObj() - .getTime())); - + + cs.setTimestamp(12, new java.sql.Timestamp(productTime.getTime())); + cs.setTimestamp(13, new java.sql.Timestamp(postTime.getTime())); + int doOverwrite = PostTables.determineUpdateAction(duplicateOption, record.isRevisedRecord()); cs.setInt(14, doOverwrite); diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ohdlib/GagePP.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ohdlib/GagePP.java index e2bd6aaabf..ee1e26c27a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ohdlib/GagePP.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ohdlib/GagePP.java @@ -47,6 +47,9 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * ------------ ---------- ----------- -------------------------- * 9/22 #1553 mnash Initial implementation of GagePP * 6/1/09 #2432 jsanchez Updated value magnitude for hourlypp/pc. + * 26 Nov 2012 #15554 lbousaidi used obstime instead of system time in isNear12Z + * routine. + * 4 Dec 2012 #15569 lbousaidi fixed daily pp value when token is set to USE_REVCODE * * * @author mnash @@ -406,6 +409,13 @@ public class GagePP { default: break; } + + } else { + if (rec.getDataDuration() == 24) { + dailyPP.setValue(Double.valueOf(rec.getValue())); + dailyPP.setQc(String.valueOf(rec.getQualCode())); + rev_24hour_code = rec.revision; + } } /* * Increment the count of total values. This should always @@ -621,7 +631,7 @@ public class GagePP { timeTObs.setTime(yearsec_ansi); // Create a 12Z object - Calendar pStructTm = TimeTools.getSystemCalendar(); + Calendar pStructTm = TimeTools.newCalendar(yearsec_ansi.getTime()); pStructTm.set(Calendar.HOUR_OF_DAY, 12); pStructTm.set(Calendar.MINUTE, 0); pStructTm.set(Calendar.SECOND, 0); diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/component-deploy.xml b/edexOsgi/com.raytheon.edex.utilitysrv/component-deploy.xml deleted file mode 100644 index fe8ff5c6aa..0000000000 --- a/edexOsgi/com.raytheon.edex.utilitysrv/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java index 14c17a2ce5..61c13dad69 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java @@ -97,7 +97,7 @@ public class GFERecord extends PluginDataObject { }; /** The name of the parm parameter */ - @Column(length = 32) + @Column(length = 100) @XmlAttribute @DynamicSerializeElement private String parmName; diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/LocalizationFileRef.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/NcCheckRequest.java similarity index 59% rename from edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/LocalizationFileRef.java rename to edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/NcCheckRequest.java index 5850ed4d6a..d3a6bf38af 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/LocalizationFileRef.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/request/NcCheckRequest.java @@ -17,12 +17,12 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.localization; +package com.raytheon.uf.common.dataplugin.gfe.request; -import java.lang.ref.WeakReference; +import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; /** - * WeakReference object to Localization File + * TODO Add Description * *
  * 
@@ -30,32 +30,18 @@ import java.lang.ref.WeakReference;
  * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Jun 21, 2011            mschenke     Initial creation
+ * Nov 14, 2012            jdynina     Initial creation
  * 
  * 
* - * @author mschenke + * @author jdynina * @version 1.0 */ -public class LocalizationFileRef extends WeakReference { +@DynamicSerialize +public class NcCheckRequest extends AbstractGfeRequest { - private final LocalizationFileKey key; - - /** - * @param referent - */ - public LocalizationFileRef(LocalizationFile referent) { - super(referent); - key = new LocalizationFileKey(referent.getName(), referent.getContext()); + public NcCheckRequest() { } - @Override - public String toString() { - return key.toString(); - } - - public Object getKey() { - return key; - } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.crimss/com.raytheon.uf.common.dataplugin.npp.crimss.ecl b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.crimss/com.raytheon.uf.common.dataplugin.npp.crimss.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/data/ModelData.java b/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/data/ModelData.java index 006f955220..00ec7b2631 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/data/ModelData.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/data/ModelData.java @@ -159,15 +159,19 @@ public class ModelData implements ISerializableObject { public double getValue(String modelName, String prodType, Coordinate coor) { double value = -99999.0; try { + System.out.println("Freezing level---debug0 getValue "+modelName+" "+prodType+" "+coor+" "+gribMap.size()); Point point = getPoint(modelName, prodType, coor); GridRecord gribRec = getRecord(modelName, prodType); FloatDataRecord rec = (FloatDataRecord) getRecord(modelName, prodType).getMessageData(); - value = rec.getFloatData()[(gribRec.getSpatialObject().getNx() * point.x) - + point.y]; + System.out.println("Freezing level---debug1 getValue "+rec.getFloatData().length+" "+ + gribRec.getSpatialObject().getNx()+","+gribRec.getSpatialObject().getNy()+" "+point); + value = rec.getFloatData()[(gribRec.getSpatialObject().getNx() * + (gribRec.getSpatialObject().getNy()-point.y)) + point.x]; } catch (Exception e) { logger.error("No Grib value available....." + modelName + " " + prodType); + e.printStackTrace(); } return value; } diff --git a/edexOsgi/com.raytheon.uf.common.localization/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.localization/component-deploy.xml deleted file mode 100644 index ceed0060bc..0000000000 --- a/edexOsgi/com.raytheon.uf.common.localization/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/xml/SourceXML.java b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/xml/SourceXML.java index c4112d1a81..fc586bae7e 100644 --- a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/xml/SourceXML.java +++ b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/xml/SourceXML.java @@ -28,6 +28,7 @@ package com.raytheon.uf.common.monitor.xml; * ------------ ---------- ----------- -------------------------- * 29 Jan, 2010 3915 dhladky Initial creation * 18 Apr. 2012 DR 14619 dhladky Replace isOverride() + * 28 Nov. 2012 DR 14412 gzhang makes unit internal to this class * * @author dhladky * @version 1.0 @@ -86,8 +87,10 @@ public class SourceXML implements ISerializableObject { @XmlElement(name = "interpolatedGuidanceTransition") protected boolean interpolatedGuidanceTransition; - @XmlElement(name = "unit") + //@XmlElement(name = "unit") // DR 14412 protected String unit; + + public static final String UNIT_TXT = "inches"; // DR 14412 @XmlElement(name = "conversion") protected Double conversion = 1.0; @@ -285,6 +288,8 @@ public class SourceXML implements ISerializableObject { } public String getUnit() { + if( unit == null || unit.isEmpty()) // DR 14412 + unit = UNIT_TXT; return unit; } diff --git a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java index 797ff6d8c0..2c6c9a64ef 100644 --- a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java +++ b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java @@ -24,10 +24,22 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; +import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map.Entry; +import java.util.TreeSet; + +import org.geotools.coverage.grid.GridGeometry2D; +import org.geotools.geometry.DirectPosition2D; +import org.opengis.referencing.crs.CoordinateReferenceSystem; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import com.raytheon.uf.common.dataplugin.grid.GridRecord; +import com.raytheon.uf.common.datastorage.records.FloatDataRecord; +import com.raytheon.uf.common.geospatial.ISpatialObject; +import com.raytheon.uf.common.geospatial.MapUtil; +import com.raytheon.uf.common.geospatial.PointUtil; import com.raytheon.uf.common.monitor.xml.SCANModelParameterXML; import com.vividsolutions.jts.geom.Coordinate; @@ -72,9 +84,9 @@ public class FreezingLevel { // reference time Calendar refTime = null; - + private transient final Log logger = LogFactory.getLog(getClass()); + public FreezingLevel(String modelName) { - this.modelName = modelName; times = new HashMap(); zeroCount = 0; @@ -96,6 +108,79 @@ public class FreezingLevel { } } + /** + * find (x,y) coordinate for lat,lon(coor) + * @param coors + */ + public DirectPosition2D findXYloc(Coordinate coor, String type){ + ScanDataCache cache = ScanDataCache.getInstance(); + + ISpatialObject iso = cache.getModelData().getGridRecord(modelName, type).getSpatialObject(); + CoordinateReferenceSystem crs=iso.getCrs(); + GridGeometry2D mapGeometry = MapUtil.getGridGeometry(iso); + DirectPosition2D resultPoint; + try { + resultPoint = PointUtil.determineExactIndex( + coor, crs, mapGeometry); + System.out.println("Freezing level -- lat,lon:"+coor+" = "+resultPoint); + return resultPoint; + } catch (Exception e) { + System.out.println("Error: Freezing level -- unable to find x,y coordinate for lat,lon:"+coor); + e.printStackTrace(); + } + return null; + } + + /** + * get the bi-linear interpolation value amount the nearest 4 points + * + * @param modelName, prodType, coor + * @return bi-linear interpolation amount the nearest 4 points + * @throws VizException + */ + public double getValue(String modelName, String prodType, Coordinate coor) { + double value = -99999.0; + try { + //xyLoc is the location in x,y + DirectPosition2D xyLoc = findXYloc(coor, prodType); + + //data from hdf5 + ScanDataCache cache = ScanDataCache.getInstance(); + GridRecord gribRec = cache.getModelData().getGridRecord(modelName, prodType); + FloatDataRecord rec = (FloatDataRecord) gribRec.getMessageData(); + + //dimension of the record from hdf5, recNx =151 and recNy=113 during development + int recNx = gribRec.getSpatialObject().getNx(); + int recNy = gribRec.getSpatialObject().getNy(); + + //get four nearest points/values form the record around xyLoc + int x0=(int)(xyLoc.x); + int x1=x0+1; + int y0=(int)(xyLoc.y); + int y1=y0+1; + + double p1=xyLoc.x-x0; + double p2=1-p1; + double p3=xyLoc.y-y0; + double p4=1-p3; + + double value2 = rec.getFloatData()[(recNx * y0) + x0]; + double value3 = rec.getFloatData()[(recNx * y0) + x1]; + double value0 = rec.getFloatData()[(recNx * y1) + x0]; + double value1 = rec.getFloatData()[(recNx * y1) + x1]; + + //do a bi-linear interpolation amount the nearest 4 points + value = (p1*p4*value1)+(p2*p4*value0)+(p1*p3*value3)+(p2*p3*value2); + logger.info("bi-linear interpolation value: "+value+" "+value0+" "+value1+ + " "+value2+" "+value3+" for coor:"+coor+" "+recNx+","+recNy); + } catch (Exception e) { + logger.error("No Grib value available....." + modelName + " " + + prodType+" lat,lon:"+coor); + e.printStackTrace(); + } + return value; + } + /** * Give me the freezing level for an array of points * @@ -107,6 +192,7 @@ public class FreezingLevel { HashMap freezingMap = new HashMap(); ScanDataCache cache = ScanDataCache.getInstance(); + //get data from hdf5 files for (Coordinate coor : coors) { HashMap ghValues = new HashMap(); @@ -114,34 +200,46 @@ public class FreezingLevel { for (Entry entry : getGHLevelMap().entrySet()) { if (cache.getModelData().isType(modelName, entry.getKey())) { - - ghValues.put(entry.getValue(), cache.getModelData() - .getValue(modelName, entry.getKey(), coor)); + ghValues.put(entry.getValue(), getValue(modelName, entry.getKey(), coor)); + } else { + ghValues.put(entry.getValue(),null); } } for (Entry entry : getTLevelMap().entrySet()) { if (cache.getModelData().isType(modelName, entry.getKey())) { - tValues.put(entry.getValue(), cache.getModelData() - .getValue(modelName, entry.getKey(), coor)); + tValues.put(entry.getValue(), getValue(modelName, entry.getKey(), coor)); } } - - Double fLevel = -99999.0; + + //here's the calculation + Double fLevel = 0.0; Integer jtopLevel = null; Integer ktopLevel = null; + int foundValFlag=-1;//-1=all ghValue and tValue are null, + //0=all ghValue<=-9000 and tValue<=273.16, 1=found a fLevel System.out .println("********** Starting Freezing Level Calculations *****************"); - for (Integer level : ghValues.keySet()) { + + TreeSet ts= new TreeSet(ghValues.keySet());//want an asc sorted list + Iterator it = ts.iterator(); + + //for (Integer level : ghValues.keySet()) { + while (it.hasNext()) { + Integer level = (Integer) it.next(); Double tValue = tValues.get(level); Double ghValue = ghValues.get(level); System.out.println("GH Value: " + ghValue + " TValue: " + tValue); - if (ghValue != null && ghValue > -9000) { - if (tValue != null && tValue > 273.16) { + if (ghValue != null && tValue != null && foundValFlag ==-1){ + foundValFlag=0; + } + + if (ghValue != null && ghValue.doubleValue() > -9000) { + if (tValue != null && tValue.doubleValue() > 273.16) { fLevel = (ghValues.get(ktopLevel) - ((ghValues .get(ktopLevel) - ghValue) * ((273.16 - tValues @@ -155,6 +253,7 @@ public class FreezingLevel { + " - " + tValues.get(jtopLevel) + ")))) * .00328"); System.out.println("*** FreezingLevel = " + fLevel); + foundValFlag=1; freezingMap.put(coor, fLevel.floatValue()); break; } else { @@ -163,6 +262,12 @@ public class FreezingLevel { } } } + + if (foundValFlag==0) {//this means all tValue are <= 273.16 + freezingMap.put(coor, 0.0f); + System.out.println("*** FreezingLevel = 0.0"); + } + System.out .println("********** Finished Freezing Level Calculations *****************"); } @@ -252,6 +357,7 @@ public class FreezingLevel { paramXML.setModelName(model); paramXML.setParameterName(param); String sql = getSQL(interval, model, param, refTime); + System.out.println("Freezing level sql="+sql); GridRecord modelRec = DATUtils.getMostRecentGridRecord(interval, sql, paramXML); @@ -353,12 +459,16 @@ public class FreezingLevel { } // Gets the most recent record of it's type - String sql = "select grid.datauri from grid, grid_info, level where grid.info_id = grid_info.id and grid_info.level_id = level.id and grid_info.parameter_abbreviation = \'" + String sql = "select datauri from grib where modelinfo_id = (select id from grib_models where parameterabbreviation = \'" + paramName - + "\' and grid_info.datasetId = \'" + + "\' and modelname = \'" + model - + "\' and level.masterlevel_name = 'MB' and level.levelonevalue = '" - + level + "\' and reftime=\'" + refTimeStr + "\' order by grid.reftime desc, grid.forecasttime desc limit 1"; + + "\' and level_id = (select id from level where masterlevel_name = 'MB' and levelonevalue = '" + + level + + "\'" + + " limit 1)) and reftime='" + + refTimeStr + "' and forecasttime=0" + + " order by reftime desc, forecasttime desc limit 1"; return sql; } } diff --git a/edexOsgi/com.raytheon.uf.edex.database/res/spring/database-request.xml b/edexOsgi/com.raytheon.uf.edex.database/res/spring/database-request.xml new file mode 100644 index 0000000000..047504d527 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.database/res/spring/database-request.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.npp.feature/com.raytheon.uf.edex.npp.feature.ecl b/edexOsgi/com.raytheon.uf.edex.npp.feature/com.raytheon.uf.edex.npp.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/DPADecoder-spring.xml b/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/DPADecoder-spring.xml deleted file mode 100644 index f483d69124..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/DPADecoder-spring.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - dpa - - - - - - - - - - java.lang.Throwable - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeRUCFreezingLevel.java b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeRUCFreezingLevel.java index 446538c0c2..95a4bb72b9 100644 --- a/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeRUCFreezingLevel.java +++ b/edexOsgi/com.raytheon.uf.edex.ohd/src/com/raytheon/uf/edex/ohd/pproc/MpeRUCFreezingLevel.java @@ -83,7 +83,10 @@ public class MpeRUCFreezingLevel { .getToken("mpe_point_freezing_dir"); public static String dqcPreprocessorBasetime = AppsDefaults.getInstance() - .getToken("DQC_PREPROCESSOR_BASETIME"); + .getToken("dqc_preprocessor_basetime"); + + public static String mpeSiteId = AppsDefaults.getInstance() + .getToken("mpe_site_id"); public File stationFile = null; @@ -93,29 +96,11 @@ public class MpeRUCFreezingLevel { public static String[] models = new String[] { "RUC236" }; public MpeRUCFreezingLevel() { - try { - File directory = new File(stationFilePath); + this.stationFile = new File(stationFilePath+"/"+mpeSiteId+"_freezing_station_list"); - if (directory != null) { - for (File file : directory.listFiles()) { - if (file != null) { - if (file.isFile() - && file.getName().contains( - "freezing_station_list")) { - this.stationFile = file; - break; - } - } - } - } - } catch (Exception e) { - statusHandler - .handle(Priority.WARN, "No mpe_station_list_dir found"); - } - - // correct env vairiable dqcPreprocessorBasetime if needed + // correct env vairiable dqcPreprocessorBasetime if needed. Default to 12z if (dqcPreprocessorBasetime == null) { - dqcPreprocessorBasetime = "00z"; + dqcPreprocessorBasetime = "12z"; } dqcPreprocessorBasetime = dqcPreprocessorBasetime.toLowerCase(); @@ -123,7 +108,7 @@ public class MpeRUCFreezingLevel { && !dqcPreprocessorBasetime.equals("06z") && !dqcPreprocessorBasetime.equals("12z") && !dqcPreprocessorBasetime.equals("18z")) { - dqcPreprocessorBasetime = "00z"; + dqcPreprocessorBasetime = "12z"; } } @@ -227,10 +212,8 @@ public class MpeRUCFreezingLevel { // order try { - String site = PropertiesFactory.getInstance().getEnvProperties() - .getEnvValue("SITENAME"); ofstream = new FileOutputStream(getAbsoluteOutFileName( - dates[3].getTime(), site)); + dates[3].getTime(), mpeSiteId)); out = new DataOutputStream(ofstream); bw = new BufferedWriter(new OutputStreamWriter(out)); @@ -277,8 +260,7 @@ public class MpeRUCFreezingLevel { String fzlev = "M"; if (fle != null) { - fzlev = String.valueOf(fle.getFreezingLevel()) - .substring(0, 4) + "S"; + fzlev = String.format("%3.2f",fle. getFreezingLevel()) + "S"; } buf.append(" " + fzlev); @@ -333,10 +315,6 @@ public class MpeRUCFreezingLevel { * Process the MPE freezing Levels */ public void processMpeRuc() { - if (!AppsDefaults.getInstance().setAppContext(this)) { - return; - } - Integer forecastHour = null; HashMap> freezingTimeMap = new HashMap>(); LinkedHashMap freezingStations = new LinkedHashMap(); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.crimss/com.raytheon.uf.edex.plugin.npp.crimss.ecl b/edexOsgi/com.raytheon.uf.edex.plugin.npp.crimss/com.raytheon.uf.edex.plugin.npp.crimss.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp/com.raytheon.uf.edex.plugin.npp.ecl b/edexOsgi/com.raytheon.uf.edex.plugin.npp/com.raytheon.uf.edex.plugin.npp.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java index 64264f0506..fc6662cb58 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/CompositeReflectivityProduct.java @@ -65,12 +65,14 @@ import com.raytheon.uf.edex.core.EDEXUtil; *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 05/07/2009   2037      dhladky    Initial Creation.
- * 02/22/2012	DR14414	  mgamazay   Added initializing the ScanTableData table
- * 									 to an empty map if no features are present.
- * 09/06/2012	14727	  Xiaochuan	 setIsNew(false) for the storm id should based  	
- * 									 on FCSTRAN, FCSTDIR values.	 
+ * ------------ --------- ---------- --------------------------
+ * 05/07/2009   2037      dhladky     Initial Creation.
+ * 02/22/2012	DR14414	  mgamazay    Added initializing the ScanTableData table
+ * 									  to an empty map if no features are present.
+ * 09/06/2012	14727	  Xiaochuan	  setIsNew(false) for the storm id should based  	
+ * 									  on FCSTRAN, FCSTDIR values.
+ * 11/13/2012	14368	  Xiaochuan	  Required to set alarm time in a quiet time period 
+ * 									  from the last event to new event (new storm come in).
  * 
  * 
* @@ -216,7 +218,7 @@ public class CompositeReflectivityProduct extends RadarProduct { if (previousTime == null) { previousTime = rec.getDataTime().getRefTime(); } - + if (alarms != null && newIds.size() > 0 && previousTime != null) { if (((alarms.getCellAlarmTime() * 60 * 1000) <= (rec .getDataTime().getRefTime().getTime() - previousTime @@ -227,8 +229,8 @@ public class CompositeReflectivityProduct extends RadarProduct { alarmString.append("NEW cell for " + filter.icao + " over the last " + alarms.getCellAlarmTime() + " minutes."); - previousTime = rec.getDataTime().getRefTime(); } + previousTime = rec.getDataTime().getRefTime(); } // add new rows last for (String id : newIds) { diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/DigitalMesoCycloneTabularProduct.java b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/DigitalMesoCycloneTabularProduct.java index 93f92a3b72..9ff0131ee6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/DigitalMesoCycloneTabularProduct.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/DigitalMesoCycloneTabularProduct.java @@ -55,8 +55,11 @@ import com.raytheon.uf.edex.core.EDEXUtil; *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 05/07/2009   2037      dhladky    Initial Creation.
+ * ------------ -------- ----------  --------------------------
+ * 05/07/2009   2037      dhladky     Initial Creation.
+ * 11/13/2012	14368	  Xiaochuan	  Required to set alarm time in a quiet time period 
+ * 									  from the last event to new event (new storm come in).
+ * 
  * 
  * 
* @@ -144,13 +147,12 @@ public class DigitalMesoCycloneTabularProduct extends RadarProduct { } else { for (String fid : getDeletions(dmdKeys, table)) { table.removeRow(fid); - // System.out.println("Removed DMD fid: " + fid); } for (String fid : getUpdates(dmdKeys, table)) { table.updateRow(fid, write(table.getRow(fid), rec, fid)); - // System.out.println("Updating DMD fid: " + fid); + } } } @@ -173,8 +175,8 @@ public class DigitalMesoCycloneTabularProduct extends RadarProduct { alarmString.append("NEW DMDcirculation for " + filter.icao + " over the last " + alarms.getDmdAlarmTime() + " minutes."); - previousTime = rec.getDataTime().getRefTime(); } + previousTime = rec.getDataTime().getRefTime(); } for (String fid : newIds) { diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/MesoCycloneTabularProduct.java b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/MesoCycloneTabularProduct.java index b8e1fc7b7e..3c4ae305ce 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/MesoCycloneTabularProduct.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/MesoCycloneTabularProduct.java @@ -55,13 +55,14 @@ import com.vividsolutions.jts.geom.Coordinate; *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 05/07/2009   2037       dhladky      Initial Creation.
- * 02/23/2012	14536	   Xiaochuan	Add method getIdsFromGraphicBlock() to 
- * 										hold the ids that have the same order   
- * 										as the ids in source file.
- *
- *
+ * ------------ -------- ----------- --------------------------
+ * 05/07/2009   2037     dhladky     Initial Creation.
+ * 02/23/2012	14536	 Xiaochuan	 Add method getIdsFromGraphicBlock() to 
+ * 									 hold the ids that have the same order   
+ * 									 as the ids in source file.
+ * 11/13/2012	14368	 Xiaochuan	 Required to set alarm time in a quiet time period 
+ * 									 from the last event to new event (new storm come in).
+ * 
  * 
* * @author dhladky @@ -132,12 +133,12 @@ public class MesoCycloneTabularProduct extends RadarProduct { + " over the last " + alarms.getMesoAlarmTime() + " minutes."); - previousTime = rec.getDataTime().getRefTime(); - EDEXUtil.sendMessageAlertViz(Priority.SIGNIFICANT, RadarConstants.PLUGIN_ID, SCAN, "RADAR", alarmString.toString(), null, null); } + previousTime = rec.getDataTime().getRefTime(); + } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/TVSTabularProduct.java b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/TVSTabularProduct.java index 7b125659d4..1f324cabae 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/TVSTabularProduct.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/process/TVSTabularProduct.java @@ -49,8 +49,10 @@ import com.raytheon.uf.edex.core.EDEXUtil; *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 05/07/2009   2037      dhladky    Initial Creation.
+ * ------------ -------- ----------  --------------------------
+ * 05/07/2009   2037     dhladky      Initial Creation.
+ * 11/13/2012	14368	 Xiaochuan	  Required to set alarm time in a quiet time period 
+ * 									  from the last event to new event (new storm come in).
  * 
  * 
* @@ -138,9 +140,9 @@ public class TVSTabularProduct extends RadarProduct { EDEXUtil.sendMessageAlertViz(Priority.CRITICAL, RadarConstants.PLUGIN_ID, SCAN, "RADAR", alarmString.toString(), null, null); - - previousTime = rec.getDataTime().getRefTime(); + } + previousTime = rec.getDataTime().getRefTime(); } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.vaa/utility/common_static/base/purge/vaaPurgeRules.xml b/edexOsgi/com.raytheon.uf.edex.plugin.vaa/utility/common_static/base/purge/vaaPurgeRules.xml index 1182b36c71..4d78875fb9 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.vaa/utility/common_static/base/purge/vaaPurgeRules.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.vaa/utility/common_static/base/purge/vaaPurgeRules.xml @@ -2,7 +2,5 @@ 24 - =00-01:00:00 - 00-01:00:00 diff --git a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java index 70f2a9361b..20bceafac7 100644 --- a/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java +++ b/edexOsgi/com.raytheon.uf.edex.site/src/com/raytheon/uf/edex/site/SiteAwareRegistry.java @@ -1,19 +1,19 @@ /** * 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. **/ @@ -48,23 +48,24 @@ import com.raytheon.uf.edex.core.props.PropertiesFactory; import com.raytheon.uf.edex.site.SiteActivationMessage.Action; /** - * + * * Site Aware Registry - * + * *
- * 
+ *
  * SOFTWARE HISTORY
- * 
+ *
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Nov 30, 2010            rjpeter     Initial creation
- * Jul 31, 2012  #965      dgilling    Force ordering of sites in 
+ * Jul 31, 2012  #965      dgilling    Force ordering of sites in
  *                                     getActiveSites().
  * Nov 1, 2012   15417     ryu         Modified getActiveSites to include
  *                                     home site only if activated.
- * 
+ * Dec 11, 2012  14360     ryu         No printing stack trace on activation exception
+ *
  * 
- * + * * @author rjpeter * @version 1.0 */ @@ -100,7 +101,7 @@ public class SiteAwareRegistry { /** * registers/adds site activation listeners - * + * * @param sa * the listener to register / add to the list */ @@ -115,8 +116,8 @@ public class SiteAwareRegistry { try { sa.activateSite(siteID); } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), - e); + // Stack trace is not printed per requirement for DR14360 + statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage()); } } @@ -134,7 +135,7 @@ public class SiteAwareRegistry { /** * get the set of strings for the active sites - * + * * @return the requested array of Strings this is a string array to make it * work with dwr frontend, most of the other stuff is Set */ @@ -156,7 +157,7 @@ public class SiteAwareRegistry { /** * Checks to see if the given site is active - * + * * @param site * The site to check * @return True if the site is active, else false @@ -182,7 +183,7 @@ public class SiteAwareRegistry { /** * activate the site specified in each listener - * + * * @param siteID */ public void activateSite(String siteID) { @@ -203,7 +204,7 @@ public class SiteAwareRegistry { /** * deactivate the site specified in each listener - * + * * @param siteID */ public void deactivateSite(String siteID) { @@ -223,7 +224,7 @@ public class SiteAwareRegistry { /** * cycle the site specified in each listener - * + * * @param siteID */ public void cycleSite(String siteID) { diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite.servicebackup/svcBackup/ServiceBackup/scripts/export_grids b/edexOsgi/com.raytheon.uf.tools.gfesuite.servicebackup/svcBackup/ServiceBackup/scripts/export_grids index b8c878c9b3..d6efe8102a 100644 --- a/edexOsgi/com.raytheon.uf.tools.gfesuite.servicebackup/svcBackup/ServiceBackup/scripts/export_grids +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite.servicebackup/svcBackup/ServiceBackup/scripts/export_grids @@ -118,13 +118,18 @@ perform_export() { #check if the netcdf file is there;if not,exit if [ $? -ne 0 ] then - $LOGGER "ifpnetCDF failed. Export exits." - rm -f ${lockFile} - $LOGGER 100 NETCDF_SUCCESS=0 if [ $NATIONAL_CENTER != 1 ] && [ "$1" != "-c" ] then - exit 1 + netcdf_error=`grep "Some of the requested time ranges are not in the inventory" $logfile` + if [ "$netcdf_error" != "" ]; then + NETCDF_SUCCESS=1 + else + $LOGGER "ifpnetCDF failed. Export exits." + rm -f ${lockFile} + $LOGGER 100 + exit 1 + fi fi fi else @@ -136,13 +141,18 @@ perform_export() { #check if the netcdf file is there;if not,exit if [ $? -ne 0 ] then - $LOGGER "ifpnetCDF failed. Export exits." - rm -f ${lockFile} - $LOGGER 100 NETCDF_SUCCESS=0 if [ $NATIONAL_CENTER != 1 ] && [ "$1" != "-c" ] - then - exit 1 + then + netcdf_error=`grep "Some of the requested time ranges are not in the inventory" $logfile` + if [ "$netcdf_error" != "" ]; then + NETCDF_SUCCESS=1 + else + $LOGGER "ifpnetCDF failed. Export exits." + rm -f ${lockFile} + $LOGGER 100 + exit 1 + fi fi fi fi @@ -153,14 +163,19 @@ perform_export() { #check if the netcdf file is there;if not,exit before we call msg_send if [ $? -ne 0 ] then - $LOGGER ifpnetCDF failed. - rm -f ${lockFile} - $LOGGER 100 - NETCDF_SUCCESS=0 - if [ $NATIONAL_CENTER != 1 ] && [ "$1" != "-c" ] - then - exit 1 - fi + NETCDF_SUCCESS=0 + if [ $NATIONAL_CENTER != 1 ] && [ "$1" != "-c" ] + then + netcdf_error=`grep "Some of the requested time ranges are not in the inventory" $logfile` + if [ "$netcdf_error" != "" ]; then + NETCDF_SUCCESS=1 + else + $LOGGER "ifpnetCDF failed." + rm -f ${lockFile} + $LOGGER 100 + exit 1 + fi + fi fi fi diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/sendgfemessage/sendGfeMessage.py b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/sendgfemessage/sendGfeMessage.py index 5ad2abf5b0..149c6cbcde 100755 --- a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/sendgfemessage/sendGfeMessage.py +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/src/sendgfemessage/sendGfeMessage.py @@ -35,7 +35,8 @@ import os, sys # 09/14/10 dgilling Initial Creation. # 11/04/10 5849 cjeanbap Updated Notification package location # 06/09/11 9841 rferrel fixed help and argument order -# for sendNotificationMsg. +# for sendNotificationMsg. +# 11/29/12 DR14016 jzeng change priority definition from 0-3 to 1-4 # # class PrintHelpOnErrorParser(ArgumentParser): @@ -55,13 +56,13 @@ def main(): help="Port upon which the alertViz server is running.", metavar="port") group = parser.add_mutually_exclusive_group() - group.add_argument("-r", action="store_const", const=3, dest="priority", + group.add_argument("-r", action="store_const", const=4, dest="priority", help="Send as a routine message. (default)") - group.add_argument("-s", action="store_const", const=1, dest="priority", + group.add_argument("-s", action="store_const", const=2, dest="priority", help="Send as a significant message.") - group.add_argument("-u", action="store_const", const=0, dest="priority", + group.add_argument("-u", action="store_const", const=1, dest="priority", help="Send as an urgent message.") - group.add_argument("-a", action="store_const", const=2, dest="priority", + group.add_argument("-a", action="store_const", const=3, dest="priority", help="Send as an alert message.") parser.add_argument("-c", action="store", dest="msgClass", help="Message class.", metavar="class", default="GFE") diff --git a/javaUtilities/build.openfire.plugin/build.openfire.plugin.ecl b/javaUtilities/build.openfire.plugin/build.openfire.plugin.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/build.wes2bridge.utility/build.wes2bridge.utility.ecl b/javaUtilities/build.wes2bridge.utility/build.wes2bridge.utility.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.openfire.plugin.configuration.collaboration/com.raytheon.openfire.plugin.configuration.collaboration.ecl b/javaUtilities/com.raytheon.openfire.plugin.configuration.collaboration/com.raytheon.openfire.plugin.configuration.collaboration.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.openfire.plugin.detailedfeedlog/com.raytheon.openfire.plugin.detailedfeedlog.ecl b/javaUtilities/com.raytheon.openfire.plugin.detailedfeedlog/com.raytheon.openfire.plugin.detailedfeedlog.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.wes2bridge.common/com.raytheon.wes2bridge.common.ecl b/javaUtilities/com.raytheon.wes2bridge.common/com.raytheon.wes2bridge.common.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.wes2bridge.configuration/com.raytheon.wes2bridge.configuration.ecl b/javaUtilities/com.raytheon.wes2bridge.configuration/com.raytheon.wes2bridge.configuration.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.wes2bridge.datalink/com.raytheon.wes2bridge.datalink.ecl b/javaUtilities/com.raytheon.wes2bridge.datalink/com.raytheon.wes2bridge.datalink.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.wes2bridge.manager/com.raytheon.wes2bridge.manager.ecl b/javaUtilities/com.raytheon.wes2bridge.manager/com.raytheon.wes2bridge.manager.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.wes2bridge.utility.feature/com.raytheon.wes2bridge.utility.feature.ecl b/javaUtilities/com.raytheon.wes2bridge.utility.feature/com.raytheon.wes2bridge.utility.feature.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/javaUtilities/com.raytheon.wes2bridge.utility.product/com.raytheon.wes2bridge.utility.product.ecl b/javaUtilities/com.raytheon.wes2bridge.utility.product/com.raytheon.wes2bridge.utility.product.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribPathProvider.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribPathProvider.java index 8eb35afdc1..fe2a0bc58f 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribPathProvider.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribPathProvider.java @@ -77,7 +77,7 @@ public class NcgribPathProvider extends DefaultPathProvider { @Override public String getHDFFileName(String pluginName, IPersistable persistable) { - Integer partition = persistable.getHdfFileId(); +// Integer partition = persistable.getHdfFileId(); if (persistable == null) { throw new IllegalArgumentException( @@ -89,18 +89,22 @@ public class NcgribPathProvider extends DefaultPathProvider { "Argument persistable is of wrong type. Expected " + NcgribRecord.class + " but got " + persistable.getClass()); - } - - if (partition == null) { - throw new IllegalArgumentException( - "Expected argument hdfFileId not set on object " - + persistable.toString()); } else if (pluginName == null) { throw new IllegalArgumentException( "Expected argument pluginName not set on object " + persistable.toString()); } +// if (partition == null) { +// throw new IllegalArgumentException( +// "Expected argument hdfFileId not set on object " +// + persistable.toString()); +// } else if (pluginName == null) { +// throw new IllegalArgumentException( +// "Expected argument pluginName not set on object " +// + persistable.toString()); +// } + NcgribRecord pdo = (NcgribRecord) persistable; StringBuffer sb = new StringBuffer(); diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/plugin.xml b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/plugin.xml index 6b0e4bc4e7..de840f6837 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/plugin.xml @@ -402,7 +402,7 @@ class="gov.noaa.nws.ncep.viz.rsc.ncgrid.NcgribLoggerPreferences" id="gov.noaa.nws.ncep.viz.rsc.ncgrid.NcgribLoggerPreferences" name="Ncgrid Logger" - category="org.eclipse.jface.Prerences"> + category="gov.noaa.nws.ncep.viz.common.nceppreferences"> diff --git a/rpms/awips2.core/Installer.ldm/component.spec b/rpms/awips2.core/Installer.ldm/component.spec index 536a480d9a..bbedc5741b 100644 --- a/rpms/awips2.core/Installer.ldm/component.spec +++ b/rpms/awips2.core/Installer.ldm/component.spec @@ -5,7 +5,7 @@ Name: awips2-ldm Summary: AWIPS II LDM Distribution Version: 6.8.1 -Release: 24 +Release: 27 Group: AWIPSII BuildRoot: /tmp URL: N/A diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.gum b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.gum index 74ceead833..36cf110014 100644 --- a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.gum +++ b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.gum @@ -135,6 +135,7 @@ ALLOW NIMAGE ^.* .* TIT[EQ].* ALLOW HDS ^.* .* [IJ]UTX0[0-689].*|JUSX4[0-689].* ALLOW EXP ^.* .* ALLOW IDS|DDPLUS ^.* .* SXUS2[03-9].KWOH|SXUS[3-9].KWOH|SXUS8[0-3].KWOH|SRUS[2-8].KWOH +ALLOW NOTHER ^.* .* # # Give permission to the Unidata Program Center ALLOW ANY ^[a-z].*\.unidata\.ucar\.edu\.?$ .* diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.hfo b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.hfo index 74ceead833..36cf110014 100644 --- a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.hfo +++ b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.hfo @@ -135,6 +135,7 @@ ALLOW NIMAGE ^.* .* TIT[EQ].* ALLOW HDS ^.* .* [IJ]UTX0[0-689].*|JUSX4[0-689].* ALLOW EXP ^.* .* ALLOW IDS|DDPLUS ^.* .* SXUS2[03-9].KWOH|SXUS[3-9].KWOH|SXUS8[0-3].KWOH|SRUS[2-8].KWOH +ALLOW NOTHER ^.* .* # # Give permission to the Unidata Program Center ALLOW ANY ^[a-z].*\.unidata\.ucar\.edu\.?$ .* diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.pbp b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.pbp index 74ceead833..36cf110014 100644 --- a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.pbp +++ b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.pbp @@ -135,6 +135,7 @@ ALLOW NIMAGE ^.* .* TIT[EQ].* ALLOW HDS ^.* .* [IJ]UTX0[0-689].*|JUSX4[0-689].* ALLOW EXP ^.* .* ALLOW IDS|DDPLUS ^.* .* SXUS2[03-9].KWOH|SXUS[3-9].KWOH|SXUS8[0-3].KWOH|SRUS[2-8].KWOH +ALLOW NOTHER ^.* .* # # Give permission to the Unidata Program Center ALLOW ANY ^[a-z].*\.unidata\.ucar\.edu\.?$ .* diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.vrh b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.vrh index 42da2e133d..64b763ce6d 100644 --- a/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.vrh +++ b/rpms/awips2.core/Installer.ldm/patch/etc/ldmd.conf.vrh @@ -142,6 +142,8 @@ ALLOW EXP ^.* .* ALLOW IDS|DDPLUS ^.* .* SXUS2[03-9].KWOH|SXUS[3-9].KWOH|SXUS8[0-3].KWOH|SRUS[2-8].KWOH +ALLOW NOTHER ^.* .* + # # Give permission to the Unidata Program Center ALLOW ANY ^[a-z].*\.unidata\.ucar\.edu\.?$ .* diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template b/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template index fd895b2376..351f24b4bb 100644 --- a/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template +++ b/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template @@ -164,15 +164,17 @@ HDS ^(YVW[ABCDGJM][0-9][0-9]) KKCI (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/ FILE -overwrite -log -close -edex /data_store/\5/(\2:yyyy)(\2:mm)\2/\3/\6/GRID\7/\9Z_\(10)_\(11)-\1_KKCI_\2\3\4_(seq).\5.%Y%m%d%H # AWIPS1: GRID ^[LM].[ABDHMNRSTU].*KWB.* /Grid/SBN/rawGrib2 +# AWIPS1 OCONUS: GRID ^[LM].[ABCDGHMNORSTUVX].*KWB.* /Grid/SBN/rawGrib2 # LTHO70 KWBC 011800 !grib2/ncep/GFS/#213/201102011800F120/TMPK/700 hPa PRES -NGRID ^([LM].[ABDHMNRSTU].{1,3}) (KWB.) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) +NGRID ^([LM].[ABCDGHMNORSTUVX].{1,3}) (KWB.) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H # MosGuidance, perhaps others? # LVUC00 KWBQ 271200 !grib2/ncep/GFS/#197/FHRS//LVL # Maint : fixed pattern at F... -HDS ^([LM].[ABDHMNRSTU].{1,3}) (KWB.) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) +# OCONUS: Added CEFG +HDS ^([LM].[ABCDEFGHMNRSTU].{1,3}) (KWB.) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H # AWIPS1: GRID ^[LM].[MN].98.*KWNH /Grid/SBN/rawGrib2 @@ -183,9 +185,15 @@ NGRID ^([LM].[MN].98) (KWNH) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/] HDS ^([LM].[MN].98) (KWNH) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H +# AWIPS1 OCONUS: GRID ^L.R....*KWNH /Grid/SBN/rawGrib2 + +NGRID ^(L.R...) (KWNH) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) + FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H + # AWIPS1: GRID ^[LM].E.*KWBD* /Grid/SBN/rawGrib2 +# AWIPS1 OCONUS: GRID ^[LM].[EF].*KWBD* /Grid/SBN/rawGrib2 # MUEU98 KWBD 020600 !grib2/ncep/DGEX_115/#185/201102020600F090/UREL/10 m HGHT -NGRID ^([LM].E.{1,3}) (KWBD) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) +NGRID ^([LM].[EF].{1,3}) (KWBD) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H # AWIPS1: GRID ^L.U.*KWBN* /Grid/SBN/rawGrib2 @@ -244,22 +252,24 @@ NGRID ^(LAMA98) (KNES) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0 HDS ^([LM].Z.{1,3}) KWBX (..)(..)(..) PIPE -close /usr/local/ldm/decoders/decrypt_file - /data_store/grib2/(\2:yyyy)(\2:mm)\2/\3/ECMWF_HiRes/\1_KWBX_\2\3\4_(seq).grib2.%Y%m%d%H + /data_store/grib2/(\2:yyyy)(\2:mm)\2/\3/ECMWF_HiRes/ecmwf_decrypted_\1_KWBX_\2\3\4_(seq).grib2.%Y%m%d%H -EXP ^/data_store/grib2/ECMWF_HiRes/ecmwf_raw/(ecmwf_decrypted.*) - FILE -overwrite -log -close -edex /data_store/grib2/(\2:yyyy)(\2:mm)\2/\3/ECMWF_HiRes/\1_KWBX_\2\3\4_(seq).grib2.%Y%m%d%H +EXP (.*ecmwf_decrypted.*) + FILE -overwrite -log -close -edex \1 # AWIPS1: GRID ^E.[ABCGHI].*KWBJ /Grid/SBN/rawGrib2 +# AWIPS1 OCONUS: GRID ^E.[ABCDEFGHI].*KWBJ /Grid/SBN/rawGrib2 # EWAW88 KWBJ 021200 !grib2/ncep/GMGWM/#255/201102021200F180/WSTP/0 - NONE -NGRID ^(E.[ABCGHI].{1,3}) (KWBJ) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) +NGRID ^(E.[ABCDEFGHI].{1,3}) (KWBJ) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H # AWIPS1: GRID ^[LM].[AB].*KWBS* /Grid/SBN/rawGrib2 +# AWIPS1 OCONUS: GRID ^[LM].[ABCDE].*KWBS* /Grid/SBN/rawGrib2 # LMDA98 KWBS 160000 !grib2/ncep/WRF_EM/#130/201012160000F000/WXTZ/0 - NONE -ANY ^([LM].[AB].{1,3}) (KWBS) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) +ANY ^([LM].[ABCDE].{1,3}) (KWBS) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H # AWIPS1: GRID ^LGXT[0-2][0-9].*KNHC /Grid/SBN/rawGrib2 @@ -302,11 +312,12 @@ HDS ^(IUPT0[1-4]|IUPT40|IUAK01) (.{4}) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/profiler/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).bufr.%Y%m%d%H # AWIPS1: POINT ^IUSZ[4-9][0-9].* /ispan/bufr/raob +# AWIPS1 OCONUS: POINT ^IUSZ[0-9][0-9].* /ispan/bufr/raob # IUSZ53 KWBC 020205 # AWIPS1: POINT ^IUSY[4][0-9].* /ispan/bufr/raob # IUSY41 KWBC 020030 -HDS ^(IUS(Z[4-9]|Y4)[0-9]) ([A-Z]{4}) (..)(..)(..) +HDS ^(IUS(Z[0-9]|Y4)[0-9]) ([A-Z]{4}) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/bufrua/(\4:yyyy)(\4:mm)\4/\5/\1_\3_\4\5\6_(seq).bufr.%Y%m%d%H # AWIPS1: TEXT ^SFUS41.* /ispan/binLightning @@ -369,7 +380,7 @@ IDS|DDPLUS ^(FOUS[67].) (....) (..)(..)(..) # FILE -overwrite -log -close -edex /data_store/misc_adm_messages/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).%Y%m%d%H # # separate out svrwx lsr and GSM misc adm messages -IDS|DDPLUS ^(N[A-VYZ]....) (.{4}) (..)(..)(..) +IDS|DDPLUS|HDS ^(N[A-VYZ]....) (.{4}) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/misc_adm_messages/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).%Y%m%d%H IDS|DDPLUS ^(NWUS[01346-9].) (.{4}) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/misc_adm_messages/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).%Y%m%d%H @@ -545,8 +556,9 @@ IDS|DDPLUS ^(W[CSV]PN0[1-6]) (KKCI) (..)(..)(..) # JSML30 KWNO 021800 # AWIPS1: POINT ^JSMF1[1-6].KWNO.* /ispan/bufr/GFSLAMP +# AWIPS1 OCONUS: POINT ^JSMF1[0-7].KWNO.* /ispan/bufr/GFSLAMP # JSMF12 KWNO 022200 -HDS ^(JSM([TL]..|F1[1-6])) (....) (..)(..)(..) +HDS ^(JSM([TL]..|F1[0-7])) (....) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/bufrmos/(\4:yyyy)(\4:mm)\4/\5/\1_\3_\4\5\6_(seq).bufr.%Y%m%d%H # AWIPS1: POINT ^IUAX0[12].* /ispan/bufr/acars @@ -625,3 +637,7 @@ HDS ^(JSXX(0[1-9]|10)) (.{4}) (..)(..)(..) # AWIPS2 distribution file bufrmthdw.xml: ^JUTX(([2-4]1)|53).* HDS ^(JUTX(([2-4]1)|53)) (.{4}) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/bufrmthdw/(\5:yyyy)(\5:mm)\5/\6/\1_\4_\5\6\7_(seq).bufr.%Y%m%d%H + +# New NPP/VIIRS data +NOTHER ^(TIP...) (KNES) (..)(..)(..) + FILE -overwrite -log -close -edex /data_store/sat/%Y%m\(3)/\(4)/VIIRS/\1_\2_\3\4\5_(seq).%Y%m%d diff --git a/rpms/awips2.edex/Installer.edex-native/component.spec b/rpms/awips2.edex/Installer.edex-native/component.spec index eecd4e1fae..1c98251018 100644 --- a/rpms/awips2.edex/Installer.edex-native/component.spec +++ b/rpms/awips2.edex/Installer.edex-native/component.spec @@ -52,7 +52,7 @@ DIST_NATIVE="%{_baseline_workspace}/dist.native" PACKAGES="%{_awipscm_share}/packages" # extract the native libraries /bin/tar -xpf ${DIST_NATIVE}/i386-pc-linux-gnu.tar \ - -C %{_build_root}/awips2 edex/lib edex/bin + -C %{_build_root}/awips2 ./edex/lib ./edex/bin if [ $? -ne 0 ]; then exit 1 fi