13.1.2-6 baseline

Former-commit-id: efd3392abe [formerly 8e5f9e0e6c] [formerly efd3392abe [formerly 8e5f9e0e6c] [formerly 59969775ad [formerly 184f16c9f91fb06efa7aeaf5499ace33f4f17bf7]]]
Former-commit-id: 59969775ad
Former-commit-id: 82a1ed77a4 [formerly dbcae57f57]
Former-commit-id: 05bdc0ecd2
This commit is contained in:
Steve Harris 2013-01-06 14:55:11 -06:00
parent f52ec0b0a0
commit b7f180d9d3
148 changed files with 1880 additions and 675 deletions

View file

@ -6,6 +6,7 @@
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
11/30/2012 jzeng DR14016 update GFE configuration
-->
<alertConfiguration name="DEFAULT">
<globalConfiguration height="37" width="-1" yPosition="-1" xPosition="-1" logLength="10" audioDuration="30" blinkDuration="5" expandedPopup="false" categoryShown="false" sourceKeyShown="false" priorityShown="false" mode="H2"/>
@ -126,11 +127,11 @@
</source>
<source locked="true" name="GFE" longName="GFE">
<configurationItem>
<metadata foreground="#000000" background="#ffff00" pythonEnabled="false" log="true" priority="SIGNIFICANT" popup="true" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#666666" background="#00ff00" pythonEnabled="false" log="true" priority="EVENTA" popup="false" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#ffffff" background="#ee0000" pythonEnabled="false" log="true" priority="CRITICAL" popup="true" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#ffffff" background="#000000" pythonEnabled="false" log="true" priority="EVENTB" popup="false" blink="false" text="false" audioEnabled="false"/>
<metadata foreground="#000000" background="#ffa500" pythonEnabled="false" log="true" priority="PROBLEM" popup="true" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#ffffff" background="#ee20e0" pythonEnabled="false" log="true" priority="CRITICAL" popup="true" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#ffffff" background="#ee0000" pythonEnabled="false" log="true" priority="SIGNIFICANT" popup="true" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#000000" background="#ffff00" pythonEnabled="false" log="true" priority="PROBLEM" popup="true" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#000000" background="#ffa500" pythonEnabled="false" log="true" priority="EVENTA" popup="false" blink="false" text="true" audioEnabled="false"/>
<metadata foreground="#666666" background="#00ff00" pythonEnabled="false" log="true" priority="EVENTB" popup="false" blink="false" text="false" audioEnabled="false"/>
<metadata foreground="#ffffff" background="#000000" pythonEnabled="false" log="true" priority="VERBOSE" popup="false" blink="false" text="false" audioEnabled="false"/>
</configurationItem>
<configurationMonitor>

View file

@ -30,8 +30,7 @@
# Heading
#-----------------------------------------------------------------------------
#import siteConfig
#GFESUITE_HOME = siteConfig.GFESUITE_HOME
GFESUITE_HOME = "/awips2/GFESuite"
GFESUITE_PRDDIR = "/tmp/products"
yes = True
no = False

View file

@ -42,7 +42,7 @@
<contribute xsi:type="bundleItem" file="bundles/NOHRSC-SNOW.xml"
menuText="Snow Cover Elev" id="snowCoverElev">
<substitute key="param" value="sce"/>
<substitute key="customLegend" value="Snow Cover elevation (kft)"/>
<substitute key="customLegend" value="Snow Cover by elevation (kft)"/>
<substitute key="sampleFormat" value="0.00"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/NOHRSC-SNOW.xml"

View file

@ -20,7 +20,7 @@
-->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Adark/Davis AFB, AK (70454)" id="raobDavisAFB_AK"
menuText="Adak/Davis AFB, AK (70454)" id="raobDavisAFB_AK"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="70454"/>
</contribute>

View file

@ -65,7 +65,7 @@
<substitute key="stationId" value="71815"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Inoucdjouac, QC (CYPH)" id="raobInoucdjouac_QC"
menuText="Inoucdjouac, QB (CYPH)" id="raobInoucdjouac_QC"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="71907"/>
</contribute>

View file

@ -20,7 +20,7 @@
-->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Eueka, NW (CWEU)" id="raobEueka_NW"
menuText="Eureka, NW (CWEU)" id="raobEueka_NW"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="71917"/>
</contribute>

View file

@ -41,7 +41,7 @@
<substitute key="productURI" value="/profiler/%/3000/74550/%"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirProfiler.xml"
menuText="De Queen AR (DQUA4)" id="profDeQueen_AR"
menuText="DeQueen AR (DQUA4)" id="profDeQueen_AR"
editorType="com.raytheon.uf.viz.profiler.ui.ProfilerEditor">
<dataURI>/profiler/%/3000/74752/%</dataURI>
<substitute key="wmoid" value="74752"/>
@ -55,7 +55,7 @@
<substitute key="productURI" value="/profiler/%/3000/74440/%"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirProfiler.xml"
menuText="Haskell OK (LMN02)" id="profHaskell_OK"
menuText="Haskell OK (HKL02)" id="profHaskell_OK"
editorType="com.raytheon.uf.viz.profiler.ui.ProfilerEditor">
<dataURI>/profiler/%/3000/74648/%</dataURI>
<substitute key="wmoid" value="74648"/>
@ -118,7 +118,7 @@
<substitute key="productURI" value="/profiler/%/3000/74379/%"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirProfiler.xml"
menuText="Winchester IL (WNFL1)" id="profWinchester_IL"
menuText="Winchester IL (WNCI2)" id="profWinchester_IL"
editorType="com.raytheon.uf.viz.profiler.ui.ProfilerEditor">
<dataURI>/profiler/%/3000/74556/%</dataURI>
<substitute key="wmoid" value="74556"/>

View file

@ -30,9 +30,9 @@
<substitute key="stationId" value="47646"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Shionomisaki (47776)" id="raobShionomisaki"
menuText="Shionomisaki (47778)" id="raobShionomisaki"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="47776"/>
<substitute key="stationId" value="47778"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Fukuoka (47807)" id="raobFukuoka"
@ -61,17 +61,17 @@
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Tungchiang (RCMJ)" id="raobTungchiang"
menuText="Tungchiang (595530) (RCMJ)" id="raobTungchiang"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="595530"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Taipei (RCSS)" id="raobTaipei"
menuText="Taipei (589680) (RCSS)" id="raobTaipei"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="589680"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Chichi Jima (RJAO)" id="raobChichijima"
menuText="Chichijima (RJAO)" id="raobChichijima"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="47971"/>
</contribute>
@ -158,12 +158,12 @@
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Ishigaki Jima (ROIG)" id="raobIshigakijima "
menuText="Ishigakijima (ROIG)" id="raobIshigakijima "
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="47918"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Minamidaito Jima (ROMD)" id="raobMinamidaltojima"
menuText="Minamidaitojima (ROMD)" id="raobMinamidaltojima"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="47945"/>
</contribute>

View file

@ -82,7 +82,7 @@
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Guadalajara, MX (MMGL)" id="raobGuadalajara_MX"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="72226"/>
<substitute key="stationId" value="76612"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Guaymas (MMGM)" id="raobGuaymas"

View file

@ -81,7 +81,7 @@
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Midway Island (Nayv) (PMDY)" id="raobPortland_ME"
menuText="Midway Island (Navy) (PMDY)" id="raobPortland_ME"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="91066"/>
</contribute>

View file

@ -27,7 +27,7 @@
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Honiara (AGGH)" id="raobHonlara"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="91520"/>
<substitute key="stationId" value="91517"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"

View file

@ -40,7 +40,7 @@
<substitute key="stationId" value="31168"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Nikolayevsk-n Amur (31369)" id="raobNikolayevsk-nAmur"
menuText="Nikolayevsk-na Amur (31369)" id="raobNikolayevsk-nAmur"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="31369"/>
</contribute>
@ -75,7 +75,7 @@
<substitute key="stationId" value="31873"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Ternej (31909)" id="raobTernej"
menuText="Terney (31909)" id="raobTernej"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="31909"/>
</contribute>
@ -90,7 +90,7 @@
<substitute key="stationId" value="32098"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Juzhno-Kurilsk (32165)" id="raobJuzhno-Kurilsk"
menuText="Yuzhno-Kuril'SK (32165)" id="raobJuzhno-Kurilsk"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="32165"/>
</contribute>
@ -100,7 +100,7 @@
<substitute key="stationId" value="32186"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Yuzhno-Kuril'SK (32217)" id="raobYuzhno-KurilSK"
menuText="Severo-Kuril'SK (32217)" id="raobYuzhno-KurilSK"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="32217"/>
</contribute>
@ -115,9 +115,9 @@
<substitute key="stationId" value="32477"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Nikol'skoye (32616)" id="raobNikol'skoye"
menuText="Nikol'skoye (32618)" id="raobNikol'skoye"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="32616"/>
<substitute key="stationId" value="32618"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Khabarovsk (RUHB)" id="raobKhabarovsk"

View file

@ -65,7 +65,7 @@
<substitute key="stationId" value="72632"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Key West, FL (KEYW)" id="raobKeyWest_FL"
menuText="Key West, FL (KKEY)" id="raobKeyWest_FL"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="72201"/>
</contribute>
@ -110,7 +110,7 @@
<substitute key="stationId" value="72233"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Wash-Dulles, VA (KIAD)" id="raobWash-Dulles"
menuText="Wash-Dulles, VA (KLWX)" id="raobWash-Dulles"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="72403"/>
</contribute>

View file

@ -40,7 +40,7 @@
<substitute key="stationId" value="74005"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Yuma PG Site 2, AZ (K1Y9)" id="raobYuma_AZ"
menuText="Yuma PG Site 3, AZ (K1Y9)" id="raobYuma_AZ"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="74006"/>
</contribute>

View file

@ -21,7 +21,7 @@
<menuContributionFile>
<include installTo="menu:upperAir?before=PROFILER" fileName="menus/upperair/baseUpperAir.xml" />
<include subMenu="Alaska NPN time-heigh" installTo="menu:upperAir?after=PROFILER" fileName="menus/upperair/baseAlaskaNPN.xml" />
<include subMenu="Alaska NPN time-height" installTo="menu:upperAir?after=PROFILER" fileName="menus/upperair/baseAlaskaNPN.xml" />
<include subMenu="West NPN time-height" installTo="menu:upperAir?before=ProfilerMenuEnd"
fileName="menus/upperair/baseWestNPN.xml" />
<include subMenu="East NPN time-height" installTo="menu:upperAir?before=ProfilerMenuEnd"

View file

@ -7,7 +7,7 @@
<resourceParameters>
primaryModel=gefs
availableModels=gefs:01,02;gfs;nam12
pluginName=grid
pluginName=ncgrib
</resourceParameters>
<filterLabels>Forecast,Global,Ensemble</filterLabels>
<rscImplementation>EnsembleFcstGridContours</rscImplementation>

View file

@ -7,7 +7,7 @@
<resourceParameters>
primaryModel=gfs
availableModels=gfs
pluginName=grid
pluginName=ncgrib
</resourceParameters>
<filterLabels>Forecast,Global,Ensemble</filterLabels>
<rscImplementation>EnsembleFcstGridContours</rscImplementation>

View file

@ -7,7 +7,7 @@
<resourceParameters>
primaryModel=nam
availableModels=nam;gefs:01,02,03,04,05,07,09;gfs;ruc80
pluginName=grid
pluginName=ncgrib
</resourceParameters>
<filterLabels>Forecast,Ensemble</filterLabels>
<rscImplementation>EnsembleFcstGridContours</rscImplementation>

View file

@ -6,8 +6,8 @@
<resourceCategory>GRID</resourceCategory>
<resourceParameters>
GDFILE=cmc
pluginName=grid
info.secondaryId=%
pluginName=ncgrib
eventName=%
</resourceParameters>
<filterLabels>Forecast,Global</filterLabels>
<rscImplementation>ModelFcstGridContours</rscImplementation>

View file

@ -6,8 +6,8 @@
<resourceCategory>GRID</resourceCategory>
<resourceParameters>
GDFILE=ecmwfg
pluginName=grid
info.secondaryId=%
pluginName=ncgrib
eventName=%
</resourceParameters>
<filterLabels>Forecast,Global</filterLabels>
<rscImplementation>ModelFcstGridContours</rscImplementation>

View file

@ -6,8 +6,8 @@
<resourceCategory>GRID</resourceCategory>
<resourceParameters>
GDFILE=ecmwft
pluginName=grid
info.secondaryId=%
pluginName=ncgrib
eventName=%
</resourceParameters>
<filterLabels>Forecast,Global</filterLabels>
<rscImplementation>ModelFcstGridContours</rscImplementation>

View file

@ -6,8 +6,8 @@
<resourceCategory>GRID</resourceCategory>
<resourceParameters>
GDFILE=fnmocwave
pluginName=grid
info.secondaryId=%
pluginName=ncgrib
eventName=%
</resourceParameters>
<filterLabels>Forecast,Global</filterLabels>
<rscImplementation>ModelFcstGridContours</rscImplementation>

View file

@ -6,8 +6,8 @@
<resourceCategory>GRID</resourceCategory>
<resourceParameters>
GDFILE=nogaps
pluginName=grid
info.secondaryId=%
pluginName=ncgrib
eventName=%
</resourceParameters>
<filterLabels>Forecast,Global</filterLabels>
<rscImplementation>ModelFcstGridContours</rscImplementation>

View file

@ -6,8 +6,8 @@
<resourceCategory>GRID</resourceCategory>
<resourceParameters>
GDFILE=nww3
pluginName=grid
info.secondaryId=%
pluginName=ncgrib
eventName=%
</resourceParameters>
<filterLabels>Forecast,Global</filterLabels>
<rscImplementation>ModelFcstGridContours</rscImplementation>

View file

@ -5,8 +5,8 @@
<resourceCategory>GRID</resourceCategory>
<resourceParameters>
GDFILE=rap
pluginName=grid
info.secondaryId=%
pluginName=ncgrib
eventName=%
</resourceParameters>
<filterLabels>Forecast,Regional</filterLabels>
<rscImplementation>ModelFcstGridContours</rscImplementation>

View file

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

View file

@ -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
*
* </pre>
*
@ -602,10 +604,11 @@ 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());

View file

@ -18,7 +18,7 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter unit="K" name="Dew point depression" abbreviation="DpD" xmlns:ns2="group">
<DerivedParameter unit="K" name="Dewpoint depression" abbreviation="DpD" xmlns:ns2="group">
<Method name="Difference">
<Field abbreviation="T"/>
<Field abbreviation="DpT"/>

View file

@ -18,7 +18,7 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter unit="K" name="Dew point temperature" abbreviation="DpT" xmlns:ns2="group">
<DerivedParameter unit="K" name="Dewpoint temperature" abbreviation="DpT" xmlns:ns2="group">
<Method name="Dewpoint">
<Field abbreviation="T"/>
<Field abbreviation="RH"/>

View file

@ -18,7 +18,7 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter abbreviation="DpTmean" name="Dew Point Temp mean" unit="K">
<DerivedParameter abbreviation="DpTmean" name="Dewpoint Temp mean" unit="K">
<Method name="Alias" levels="Surface">
<Field abbreviation="DpTmean" level="2FHAG"/>
</Method>

View file

@ -18,7 +18,7 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter abbreviation="DpTsprd" name="Dew Point Temp sprd" unit="K">
<DerivedParameter abbreviation="DpTsprd" name="Dewpoint Temp sprd" unit="K">
<Method name="Alias" levels="Surface">
<Field abbreviation="DpTsprd" level="2FHAG"/>
</Method>

View file

@ -22,9 +22,12 @@
<Method models="SREF212" name="Alias">
<Field abbreviation="TP6mean"/>
</Method>
<Method name="Alias" models="RFCqpf">
<Method name="Alias" models="RFCqpf HPCqpf">
<Field abbreviation="tpHPC"/>
</Method>
<Method name="Alias" models="HPCqpfNDFD">
<Field abbreviation="tpHPCndfd"/>
</Method>
<Method name="Alias">
<Field abbreviation="QPE06"/>
</Method>

View file

@ -18,7 +18,7 @@
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<DerivedParameter abbreviation="WD" name="Wind directionn" unit="deg">
<DerivedParameter abbreviation="WD" name="Wind direction" unit="deg">
<Method name="RaobParam" models="bufrua">
<Field abbreviation="Raob"/>
<ConstantField value="5"/>

View file

@ -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
*
* </pre>
*
@ -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<String, CellType> fogAlgCellType = fdg.getAlgCellTypes(fog
.getAlgorithmData(nominalTime));
Map<String, CellType> fogAlgCellType = fdg.getAlgCellTypes(fog.getAlgorithmData(nominalTime));
obData.setFogAlgCellType(fogAlgCellType);
this.updateTableDlg(obData.getObHourReports(nominalTime));
}

View file

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

View file

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

View file

@ -218,13 +218,14 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension<IGLTarget>
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;

View file

@ -23,7 +23,7 @@ Table of Contents<br>
<p><br>
<tt>cave.sh [-server hostname:port/services] [-mode TEST|PRACTICE|OPERATIONAL] [-site xxx]
[-u user] [-component componentName] [-perspective perspecitiveName] [-noredirect]
[-consoleLog] [-nc TRUE]<br>
[-consoleLog]<br>
<br>
<table nosave="" border="1" width="100%">
<tbody>
@ -77,15 +77,6 @@ Table of Contents<br>
<td>Causes the CAVE log to be output to the console for monitoring/debugging.
</td>
</tr>
<tr>
<td>-nc</td>
<td>YES</td>
<td>This 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.
</td>
</tr>
</tbody>
</table>
</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

View file

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

View file

@ -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;
@ -65,6 +66,8 @@ 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.
*
* </pre>
@ -85,6 +88,8 @@ public class ProductScriptsDialog extends CaveJFACEDialog {
private Map<String, String> 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()
@ -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

View file

@ -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
* </pre>
*
* @author ebabin
@ -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();
@ -223,11 +225,11 @@ public class WeatherElementGroupDialog extends CaveJFACEDialog {
+ FileUtil.VALID_FILENAME_CHARS);
mb.open();
ok = false;
} else if (protectedNames.contains(groupName)) {
} else if (!protectedNames.contains(groupName)){
statusHandler.handle(Priority.SIGNIFICANT, "Weather Element Group "
+ getSelectedItem() + " is protected or an invalid name.");
ok = false;
} else if (!saveType) {
} else if (!saveType){
MessageBox mb = new MessageBox(super.getShell(), SWT.ICON_QUESTION
| SWT.OK | SWT.CANCEL);
mb.setText("Item Delete");

View file

@ -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.
*
* </pre>
*
@ -141,6 +144,10 @@ public class StyledTextComp extends Composite {
private boolean highlight = Activator.getDefault().getPreferenceStore()
.getBoolean("HighlightFramingCodes");
private boolean newProduct = false;
private Set<String> 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<String, TextIndexPoints> 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<String>();
}
List<SegmentData> 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,17 +453,22 @@ public class StyledTextComp extends Composite {
++endLineOffset;
}
for (int i = startLine; i < endLine + endLineOffset; i++) {
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;
}
sr = new StyleRange(textEditorST.getOffsetAtLine(startLine),
StyleRange sr = new StyleRange(textEditorST.getOffsetAtLine(startLine),
strLen, lockColor, null);
textEditorST.setStyleRange(sr);
}
}
}
/**
* Find the framing codes in the text.

View file

@ -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
*
* </pre>
*
@ -73,6 +75,25 @@ public class CheckPermissions {
return authorized;
}
@SuppressWarnings("unchecked")
public static boolean isNationalCenter() {
boolean isNationalCenter = false;
NcCheckRequest request = new NcCheckRequest();
try {
ServerResponse<String> obj = (ServerResponse<String>) 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;

View file

@ -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
*
* </pre>
*
@ -156,6 +157,8 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
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);
}
}

View file

@ -24,7 +24,7 @@
menuText="MaxT/MinT" id="HPCmaxTminT" >
<substitute key="model" value="HPC"/>
<substitute key="plotModel" value="bufrmos/maxmin.svg"/>
<substitute key="title" value="HPC MaxT/MinT"/>
<substitute key="title" value="HPC MaxT/MinT ( F )"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/BufrMosPlot.xml"
menuText="POP 24hr" id="HPCpop24hr" >

View file

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

View file

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

View file

@ -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;
@ -90,6 +88,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* 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
* 06 Dec 2012 15066 wkwock Fix "ctrl+r" not work in group mode
*
* </pre>
*
@ -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();
}

View file

@ -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
*
*
* </pre>
@ -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,12 +1323,11 @@ 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

View file

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

View file

@ -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
*
* </pre>
*
@ -159,7 +160,7 @@ public class CountyZoneUgcDataManager {
* @throws VizException
*/
public ArrayList<ZoneInfoData> getZonesSelected() throws VizException {
return getZonesSelected(true);
return getZonesSelected(false);
}
/**

View file

@ -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) {

View file

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

View file

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

View file

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

View file

@ -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.
*
* </pre>
*
@ -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<Integer, HashMap<Integer, GenericDataComponent>> currPointData = currPoint

View file

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

View file

@ -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.
* </pre>
*
* @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,21 +375,33 @@ 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);
/*
* 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_YELLOW));
}
SWT.COLOR_WIDGET_BACKGROUND));
ugcList.setText("");
}
});
@ -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,

View file

@ -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
*
* </pre>
*
@ -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;
@ -89,6 +114,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,11 +292,333 @@ 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<StdTextProduct> 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<String> 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<String> 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<String> finalUGCList = new ArrayList<String>(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<String, RequestConstraint> map = new HashMap<String, RequestConstraint>();
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<Coordinate> coordinates = new ArrayList<Coordinate>();
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<Coordinate> processLatlons(String latLon) {
ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
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
*

View file

@ -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
* </pre>
*
* @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,6 +633,57 @@ 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
@ -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();
}
}
});
}
}

View file

@ -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
* </pre>
*
* @author lvenable
@ -1107,6 +1109,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;
private boolean textWorkstationFlag = false;
@ -3635,7 +3640,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
}
if (e.button == 3) {
processPopup(e.x, e.y);
processPopup();
}
}
@ -3648,20 +3653,35 @@ 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);
private void processPopup() {
Menu menu = new Menu(shell, SWT.POP_UP);
List<String> items = Arrays.asList(popupItems);
for (String pi : popupItems) {
MenuItem mi = new MenuItem(menu, SWT.PUSH);
mi.setText(pi);
if (isEditMode()) {
popupList.setItems(popupItems);
mi.setEnabled(true);
} else {
popupList.setItems(new String[] { "Select All", "Copy" });
mi.setEnabled(isPopItemDefault[items.indexOf(pi)]);
}
mi.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
handleSelection(event);
}
});
}
menu.setVisible(true);
}
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));
/**
* 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();

View file

@ -25,8 +25,8 @@
<substitute key="NAM40model" value="mesoEta212" />
<substitute key="ARWmodel1" value="HiResW-ARW-East" />
<substitute key="ARWmodel2" value="HiResW-ARW-West" />
<substitute key="MMMmodel1" value="HiResW-MMM-East" />
<substitute key="MMMmodel2" value="HiResW-MMM-West" />
<substitute key="MMMmodel1" value="HiResW-NMM-East" />
<substitute key="MMMmodel2" value="HiResW-NMM-West" />
<include installTo="menu:volume?after=VolumeBundles"
fileName="menus/volume/baseFamilies.xml">
</include>

View file

@ -1309,7 +1309,7 @@
key="PWmean" indentText="false" />
<contribute xsi:type="menuItem" menuText="Mean Sea Level Pressure"
key="PMSLmean" indentText="false" />
<contribute xsi:type="menuItem" menuText="Dew Point Temp"
<contribute xsi:type="menuItem" menuText="Dewpoint Temp"
key="DpTmean" indentText="false" />
<contribute xsi:type="menuItem" menuText="12-hr Large scale Snowfall"
key="SNOL12mean" indentText="false" />
@ -1353,7 +1353,7 @@
key="PWsprd" indentText="false" />
<contribute xsi:type="menuItem" menuText="Mean Sea Level Pressure"
key="PMSLsprd" indentText="false" />
<contribute xsi:type="menuItem" menuText="Dew Point Temp"
<contribute xsi:type="menuItem" menuText="Dewpoint Temp"
key="DpTsprd" indentText="false" />
<contribute xsi:type="menuItem" menuText="12-hr Large scale Snowfall"
key="SNOL12sprd" indentText="false" />

View file

@ -56,6 +56,7 @@ 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.
*
* </pre>
*
@ -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(List<Coordinate >coordinates, 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);
}
}

View file

@ -143,6 +143,16 @@ 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.
*
* </pre>
*
@ -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<String, String[]> countyMap = FipsUtil
.parseCountyHeader(activeTableRecord.getCountyheader());
.parseCountyHeader(activeTableRecord.getUgcZone());
// get area with precalculated area
activeTableRecord.setGeometry(getArea(area, countyMap));
}
@ -1599,7 +1609,16 @@ public class WarngenLayer extends AbstractStormTrackResource {
.hatchWarningArea(state.getWarningPolygon(),
state.getWarningArea());
if (hatched != null) {
state.setWarningPolygon(hatched);
// 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: "
@ -1821,6 +1840,13 @@ public class WarngenLayer extends AbstractStormTrackResource {
case POINT:
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

View file

@ -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().
*
* </pre>
*
@ -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)<min1) {
double dy1, dy2;
dy1 = Math.abs(c[jMinus1].y-y);
dy2 = Math.abs(c[jPlus1].y-y);
if (dy1>=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<c[j].y) delta = -delta;
slope = computeSlope(c,j);
if (Math.abs(slope) > 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<c[j].y) delta = -delta;
slope = computeSlope(c,jMinus1);
if (Math.abs(slope) > 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<c[j].y) delta = -delta;
slope = computeSlope(c,jMinus1);
if (Math.abs(slope) > 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<c[j].y) delta = -delta;
slope = computeSlope(c,j);
if (Math.abs(slope) > 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<n-1; ++i) {
int j;
for (j=i+2; j<=n-2; j++) {
computeCoordinate(coords,i,j);
}
if (i<=n-3)
for (j=0; j<i; j++) {
computeCoordinate(coords,i,j);
}
else
for (j=1; j<i; j++) {
computeCoordinate(coords,i,j);
}
}
}
/**
* Set the old warning area in lat/lon projection. Will be converted to
* local

View file

@ -127,6 +127,11 @@ import com.vividsolutions.jts.io.WKTReader;
* Sep 10, 2012 15295 snaples Added property setting for runtime log to createScript.
* Sep 18, 2012 15332 jsanchez Used a new warning text handler.
* Nov 9, 1202 DR 15430 D. Friedman Improve watch inclusion.
* Nov 26, 2012 15550 Qinglu Lin For CAN to EXP, added TMLtime to context.
* Nov 30, 2012 15571 Qinglu Lin For NEW, assigned simulatedTime to TMLtime; For COR, used stormLocs
* in oldWarn.
* Dec 17, 2012 15571 Qinglu Lin For hydro products, resolved issue caused by calling wkt.read(loc)
* while loc is null.
* </pre>
*
* @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);
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,11 +487,19 @@ 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);
}
@ -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<String, Set<String>> map = new HashMap<String, Set<String>>();
for (String ugc : ugcs) {
for (Entry<String, String[]> e : FipsUtil.parseCountyHeader(ugc).entrySet()) {
String stateAbbrev = e.getKey();
if (e.getValue().length != 1) // either zero or more than one
// would be wrong
Map<String, String[]> parsed = FipsUtil.parseCountyHeader(ugc);
Entry<String, String[]> 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");
"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<String> feAreas = map.get(stateAbbrev);
if (feAreas == null) {
feAreas = new HashSet<String>();
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;
}
}
if (feArea != null)
feAreas.add(feArea);
}
ArrayList<Portion> portions = new ArrayList<Portion>(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);
@ -1197,6 +1235,16 @@ 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;
}
}

View file

@ -10,7 +10,6 @@
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>10</expirationMinutes>
<unit>inches</unit>
</source>
<source>
<SourceName>DPR</SourceName>
@ -22,7 +21,6 @@
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
</source>
<source>
<SourceName>DHRMOSAIC</SourceName>
@ -33,7 +31,6 @@
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
<conversion>0.0003937</conversion>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
@ -47,7 +44,6 @@
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
<conversion>0.0003937</conversion>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
@ -64,7 +60,6 @@
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
<mosaic>true</mosaic>
</source>
<source>
@ -76,7 +71,6 @@
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
<conversion>0.0003937</conversion>
<mosaic>true</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
@ -91,7 +85,6 @@
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
<conversion>0.0003937</conversion>
<mosaic>true</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
@ -109,7 +102,6 @@
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<unit>inches</unit>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
@ -126,7 +118,6 @@
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<unit>inches</unit>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
@ -143,7 +134,6 @@
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<unit>inches</unit>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
@ -157,7 +147,6 @@
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>30</expirationMinutes>
<unit>inches</unit>
<conversion>0.0003937</conversion>
<hrapGridFactor>4</hrapGridFactor>
</source>
@ -170,7 +159,6 @@
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>30</expirationMinutes>
<unit>inches</unit>
<conversion>0.0003937</conversion>
<hrapGridFactor>4</hrapGridFactor>
</source>
@ -183,7 +171,6 @@
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
</source>
<source>
<SourceName>VGBDPR</SourceName>
@ -194,7 +181,6 @@
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<unit>inches</unit>
</source>
<product primarySource="DHRMOSAIC">
<rate>DHRMOSAIC</rate>

View file

@ -6,7 +6,7 @@
<inventoryParameters>pluginName,modelName,eventName,dataTime</inventoryParameters>
<baseConstraints>
<mapping key="pluginName">
<constraint constraintValue="ncgribxxx" constraintType="EQUALS"/>
<constraint constraintValue="ncgrib" constraintType="EQUALS"/>
</mapping>
<!-- any other needed constraints. ie parameters, levels.... -->
</baseConstraints>

View file

@ -19,6 +19,6 @@
further_licensing_information.
-->
<requestPatterns xmlns:ns2="group">
<regex>^IUSZ[4-9][123468].*</regex>
<regex>^IUSZ[0-9][123468].*</regex>
<regex>^IUSY4[123468].*</regex>
</requestPatterns>

View file

@ -1,6 +0,0 @@
<project basedir="." default="deploy" name="com.raytheon.edex.plugin.gfe">
<available file="../build.edex" property="build.dir.location" value="../build.edex" />
<available file="../../../../../build.edex" property="build.dir.location" value="../../../../../build.edex" />
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
</project>

View file

@ -350,6 +350,14 @@
<constructor-arg ref="CheckPermissionsRequestHandler" />
</bean>
<bean id="NcCheckRequestHandler"
class="com.raytheon.edex.plugin.gfe.server.handler.svcbu.NcCheckRequestHandler" />
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg
value="com.raytheon.uf.common.dataplugin.gfe.request.NcCheckRequest" />
<constructor-arg ref="NcCheckRequestHandler" />
</bean>
<bean id="ExportConfRequestHandler"
class="com.raytheon.edex.plugin.gfe.server.handler.svcbu.ExportConfRequestHandler" />
<bean factory-bean="handlerRegistry" factory-method="register">

View file

@ -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;
@ -75,6 +76,8 @@ 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).
*
* </pre>
*
@ -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

View file

@ -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;
@ -52,6 +53,7 @@ import com.raytheon.uf.common.util.FileUtil;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 9, 2009 njensen Initial creation
* Dec 11, 2012 14360 ryu Throw specific exception for missing configuration.
*
* </pre>
*
@ -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();

View file

@ -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
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12/11/12 #14360 ryu Initial Creation
*
* </pre>
*
* @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);
}
}

View file

@ -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
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 14, 2012 jdynina Initial creation
*
* </pre>
*
* @author jdynina
* @version 1.0
*/
public class NcCheckRequestHandler implements IRequestHandler<NcCheckRequest>{
public Object handleRequest(NcCheckRequest request)
throws Exception {
ServerResponse<String> sr = new ServerResponse<String>();
if (!isNationalCenter()) {
sr.addMessage("Site is not a national center.");
}
return sr;
}
public boolean isNationalCenter() {
return SvcBackupUtil.ncCheck();
}
}

View file

@ -56,6 +56,7 @@ 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
*
* </pre>
*
@ -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;
}
}

View file

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

Some files were not shown because too many files have changed in this diff Show more