Merge "Omaha #3506 Split the VBSources.xml file into multiple files and allow incremental override" into omaha_14.4.1

Former-commit-id: 2b15b6587e [formerly 76ca1815ad] [formerly 2516c869d2] [formerly 2b15b6587e [formerly 76ca1815ad] [formerly 2516c869d2] [formerly 1a48a8190f [formerly 2516c869d2 [formerly 5a0ccfe4b1effb0946e6d542c492bff45d6a904b]]]]
Former-commit-id: 1a48a8190f
Former-commit-id: 0c29cd1459 [formerly 2c09a51125] [formerly 384de854114c5b7d5c6b0092155676b848520f53 [formerly 85ececab93]]
Former-commit-id: a5fb452d823fa52df2cf390630ecc21a79fecbe8 [formerly 3ece89083f]
Former-commit-id: 626417bde9
This commit is contained in:
Nate Jensen 2014-08-25 14:14:47 -05:00 committed by Gerrit Code Review
commit 90b1e0e9aa
10 changed files with 545 additions and 259 deletions

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<vbSourceList>
<vbSource key="GFE" category="SfcGrid" views="PLANVIEW TIMESERIES"/>
</vbSourceList>

View file

@ -52,6 +52,7 @@ import com.raytheon.uf.viz.d2d.ui.time.formatter.TimeFormatter;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 24, 2009 jelkins/bgonzale Initial creation
* Aug 20, 2014 3506 mapeters Corrected misspelling.
*
* </pre>
*
@ -124,7 +125,7 @@ public class ForecastAndResolutionDialog extends AbstractTimeMatchingDialog {
Label tResolutionLabel = new Label(composite, SWT.NONE);
tResolutionLabel.setText("Time Resolution:");
} else {
super.getShell().setText("Select Forcast Time");
super.getShell().setText("Select Forecast Time");
}
createForecastWidget(composite);

View file

@ -1,217 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 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. -->
<vbSourceList>
<vbSource key="GFS160" category="Volume" />
<vbSource key="ETA242" category="Volume" />
<vbSource key="mesoEta216" category="Volume" />
<vbSource key="SREF216" category="Volume" />
<vbSource key="Aviation" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="DGEX185" category="Volume" />
<vbSource key="DGEX186" category="Volume" />
<vbSource key="ECMWF-HiRes" category="Volume" />
<vbSource key="ECMF-NorthernHemisphere" category="Volume" />
<vbSource key="GFS212" category="Volume" />
<vbSource key="AVN225" category="Volume" />
<vbSource key="GFS213" category="Volume" />
<vbSource key="MRF204" category="Volume" />
<vbSource key="MRF205" category="Volume" />
<vbSource key="AVN203" category="Volume" />
<vbSource key="GFS201" category="Volume" />
<vbSource key="GEFS" category="Volume" />
<vbSource key="ENSEMBLE" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="AVN-NorthernHemisphere" category="Volume" />
<vbSource key="HiResW-ARW-AK" category="Volume" />
<vbSource key="HiResW-ARW-East" category="Volume" />
<vbSource key="HiResW-ARW-GU" category="Volume" />
<vbSource key="HiResW-ARW-HI" category="Volume" />
<vbSource key="HiResW-ARW-SJU" category="Volume" />
<vbSource key="HiResW-ARW-West" category="Volume" />
<vbSource key="HiResW-NMM-AK" category="Volume" />
<vbSource key="HiResW-NMM-East" category="Volume" />
<vbSource key="HiResW-NMM-GU" category="Volume" />
<vbSource key="HiResW-NMM-HI" category="Volume" />
<vbSource key="HiResW-NMM-SJU" category="Volume" />
<vbSource key="HiResW-NMM-West" category="Volume" />
<vbSource key="HRRR" category="Volume" />
<vbSource key="LAMPQPF" category="Volume" />
<vbSource key="LAPS" category="Volume" />
<vbSource key="ETA218" category="Volume" />
<vbSource key="mesoEta215" category="Volume" />
<vbSource key="mesoEta212" category="Volume" />
<vbSource key="ETA" category="Volume" />
<vbSource key="ETA207" category="Volume" />
<vbSource key="NOGAPS" category="Volume" />
<vbSource key="radar" name="Radar" category="Volume" />
<vbSource key="RUC130" category="Volume" />
<vbSource key="RAP200" category="Volume" />
<vbSource key="RUC236" category="Volume" />
<vbSource key="GFS254" category="Volume" />
<vbSource key="SREF243" category="Volume" />
<vbSource key="RSM" category="Volume" />
<vbSource key="GFS161" category="Volume" />
<vbSource key="SREF212" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="UKMET-NorthernHemisphere" category="Volume" />
<vbSource key="MOSGuide-AK" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKWAVE239" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="BHPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="CPCoutlook211" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="DHM" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="ENPWAVE253" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="EPwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="estofsUS" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="estofsPR" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFS199" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFSLAMPTstorm" name="GFSLAMP-Grid" category="SfcGrid"
views="PLANVIEW TIMESERIES" />
<vbSource key="GLERL" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GlobalWave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GLOBHwave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GRLKwave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MOSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind175" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="Guam-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GWW233" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind250" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HI-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HI-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCqpfNDFD" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MPE-Local" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MSAS" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NamDNG" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="ETA212" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave181" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave182" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave180" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PR-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PR-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="rfcMPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RFCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTGSST" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTGSSTHR" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfMexico" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfStream" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfMaine" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Atlantic" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Alaska" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Arctic" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Bering" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Guam" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfAlaska" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Honolulu" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-HudsonBaffin" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Samoa" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-TropPaciLowres" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-WestAtl" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-WestConus" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfMexico" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfStream" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfMaine" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Atlantic" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Alaska" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Arctic" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Bering" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Guam" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfAlaska" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Honolulu" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-HudsonBaffin" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Samoa" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-TropPaciLowres" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-WestAtl" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-WestConus" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="SeaIce" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="SPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind226" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="TPCSurgeProb" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PHISH" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="TPCWindProb" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="URMA25" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WCwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WCwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAWAVE238" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="bufrmosLAMP" name="GFSLAMP-Stn" category="Point"
views="TIMESERIES" />
<vbSource key="Ldad" category="Point" views="TIMESERIES" />
<vbSource key="obs" name="Metar" category="Point" views="TIMESERIES" />
<vbSource key="obsOA" name="MetarOA" category="Point"
views="PLANVIEW TIMESERIES" />
<vbSource key="radar149" name="DMD" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT TIMESERIES" />
<vbSource key="modelsoundingGFS" name="GFSBufr" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="goessounding" name="GoesBufr" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="acarssounding" name="MDCRS" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="modelsoundingETA" name="NAMBufr" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="poessounding" name="PoesBufr" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="profiler" name="Profiler" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="bufrua" name="Raob" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="bufruaOA" name="RaobOA" category="Point"
subCategory="Column" />
<vbSource key="radarVWP" name="VWP" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
</vbSourceList>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<vbSourceList>
<vbSource key="bufrmosLAMP" name="GFSLAMP-Stn" category="Point"
views="TIMESERIES" />
<vbSource key="Ldad" category="Point" views="TIMESERIES" />
<vbSource key="obs" name="Metar" category="Point" views="TIMESERIES" />
<vbSource key="obsOA" name="MetarOA" category="Point"
views="PLANVIEW TIMESERIES" />
<vbSource key="radar149" name="DMD" category="Point"
subCategory="Column" views="CROSSSECTION TIMEHEIGHT VARVSHGT TIMESERIES" />
<vbSource key="modelsoundingGFS" name="GFSBufr" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="goessounding" name="GoesBufr" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="acarssounding" name="MDCRS" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="modelsoundingETA" name="NAMBufr" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="poessounding" name="PoesBufr" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="profiler" name="Profiler" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="bufrua" name="Raob" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
<vbSource key="bufruaOA" name="RaobOA" category="Point"
subCategory="Column" />
<vbSource key="radarVWP" name="VWP" category="Point"
subCategory="Column"
views="CROSSSECTION TIMEHEIGHT VARVSHGT SOUNDING TIMESERIES" />
</vbSourceList>

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<vbSourceList>
<vbSource key="MOSGuide-AK" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AK-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKWAVE239" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="AKHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="BHPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="CPCoutlook211" category="SfcGrid"
views="PLANVIEW TIMESERIES" />
<vbSource key="DHM" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="ENPWAVE253" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="EPwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="estofsUS" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="estofsPR" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFS199" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GFSLAMPTstorm" name="GFSLAMP-Grid" category="SfcGrid"
views="PLANVIEW TIMESERIES" />
<vbSource key="GLERL" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GlobalWave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GLOBHwave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GRLKwave" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MOSGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind175" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="Guam-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="GWW233" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind250" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HI-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HI-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCqpfNDFD" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MPE-Local" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="MSAS" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NamDNG" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="ETA212" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NAHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NICICE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave15" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="NPHwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave181" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave182" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="OPCWave180" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PR-NamDNG5" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PR-RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="rfcMPE" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RFCqpf" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTGSST" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTGSSTHR" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTMA" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfMexico" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfStream" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfMaine" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Atlantic" category="SfcGrid/RTOFS/forecast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Alaska" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Arctic" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Bering" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Guam" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-GulfAlaska" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Honolulu" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-HudsonBaffin" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Samoa" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-TropPaciLowres" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-WestAtl" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-WestConus" category="SfcGrid/RTOFS/forecast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfMexico" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfStream" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfMaine" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Atlantic" category="SfcGrid/RTOFS/nowcast"
subCategory="Atlantic" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Alaska" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Arctic" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Bering" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Guam" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-GulfAlaska" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Honolulu" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-HudsonBaffin" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-Samoa" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-TropPaciLowres" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-WestAtl" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="RTOFS-Now-WestConus" category="SfcGrid/RTOFS/nowcast"
subCategory="Global" views="PLANVIEW TIMESERIES" />
<vbSource key="SeaIce" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="SPCGuide" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="HurWind226" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="TPCSurgeProb" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="PHISH" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="TPCWindProb" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="URMA25" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WCwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WCwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAWAVE238" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WNAwave4" category="SfcGrid" views="PLANVIEW TIMESERIES" />
<vbSource key="WPHwave10" category="SfcGrid" views="PLANVIEW TIMESERIES" />
</vbSourceList>

View file

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<vbSourceList>
<vbSource key="GFS160" category="Volume" />
<vbSource key="ETA242" category="Volume" />
<vbSource key="mesoEta216" category="Volume" />
<vbSource key="SREF216" category="Volume" />
<vbSource key="Aviation" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="DGEX185" category="Volume" />
<vbSource key="DGEX186" category="Volume" />
<vbSource key="ECMWF-HiRes" category="Volume" />
<vbSource key="ECMF-NorthernHemisphere" category="Volume" />
<vbSource key="GFS212" category="Volume" />
<vbSource key="AVN225" category="Volume" />
<vbSource key="GFS213" category="Volume" />
<vbSource key="MRF204" category="Volume" />
<vbSource key="MRF205" category="Volume" />
<vbSource key="AVN203" category="Volume" />
<vbSource key="GFS201" category="Volume" />
<vbSource key="GEFS" category="Volume" />
<vbSource key="ENSEMBLE" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="AVN-NorthernHemisphere" category="Volume" />
<vbSource key="HiResW-ARW-AK" category="Volume" />
<vbSource key="HiResW-ARW-East" category="Volume" />
<vbSource key="HiResW-ARW-GU" category="Volume" />
<vbSource key="HiResW-ARW-HI" category="Volume" />
<vbSource key="HiResW-ARW-SJU" category="Volume" />
<vbSource key="HiResW-ARW-West" category="Volume" />
<vbSource key="HiResW-NMM-AK" category="Volume" />
<vbSource key="HiResW-NMM-East" category="Volume" />
<vbSource key="HiResW-NMM-GU" category="Volume" />
<vbSource key="HiResW-NMM-HI" category="Volume" />
<vbSource key="HiResW-NMM-SJU" category="Volume" />
<vbSource key="HiResW-NMM-West" category="Volume" />
<vbSource key="HRRR" category="Volume" />
<vbSource key="LAMPQPF" category="Volume" />
<vbSource key="LAPS" category="Volume" />
<vbSource key="ETA218" category="Volume" />
<vbSource key="mesoEta215" category="Volume" />
<vbSource key="mesoEta212" category="Volume" />
<vbSource key="ETA" category="Volume" />
<vbSource key="ETA207" category="Volume" />
<vbSource key="NOGAPS" category="Volume" />
<vbSource key="radar" name="Radar" category="Volume" />
<vbSource key="RUC130" category="Volume" />
<vbSource key="RAP200" category="Volume" />
<vbSource key="RUC236" category="Volume" />
<vbSource key="GFS254" category="Volume" />
<vbSource key="SREF243" category="Volume" />
<vbSource key="RSM" category="Volume" />
<vbSource key="GFS161" category="Volume" />
<vbSource key="SREF212" category="Volume" views="PLANVIEW TIMESERIES" />
<vbSource key="UKMET-NorthernHemisphere" category="Volume" />
</vbSourceList>

View file

@ -26,7 +26,6 @@ import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay;
@ -56,7 +55,9 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList;
* Jan 04, 2010 mschenke Initial creation
* Oct 03, 2012 1248 rferrel Change to use adapter.
* Dec 11, 2013 2602 bsteffen Remove dead catch block.
*
* Aug 19, 2014 3506 mapeters Modified getModelTitleToNameMap function
* to still get correct VB sources after
* splitting them into multiple files.
* </pre>
*
* @author mschenke
@ -73,19 +74,11 @@ public class GridAlterBundleContributor extends AlterBundleContributorAdapter {
if (modelTitleToNameMap == null) {
modelTitleToNameMap = new HashMap<String, String>();
for (VbSource source : VbSourceList.getInstance().getEntries()) {
if (source.getName() != null) {
modelTitleToNameMap.put(source.getName(), source.getKey());
} else {
DatasetInfo info = DatasetInfoLookup.getInstance().getInfo(
source.getKey());
if (info == null) {
modelTitleToNameMap.put(source.getKey(),
for (VbSource source : VbSourceList.getInstance()
.getAllSources()) {
if (!source.getRemove()) {
modelTitleToNameMap.put(source.getName(),
source.getKey());
} else {
modelTitleToNameMap.put(info.getTitle(),
source.getKey());
}
}
}
}

View file

@ -54,6 +54,9 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList;
* May 02, 2013 1949 bsteffen Force ModelSounding in Vb to play nicely
* with others.
* Jul 23, 2014 3410 bclement location changed to floats
* Aug 19, 2014 3506 mapeters Modified getTypeMap function to still get
* correct VB sources after splitting them
* into multiple files.
*
* </pre>
*
@ -194,8 +197,10 @@ public class ModelSoundingCatalog extends PointDataCatalog {
request.addConstraint("pluginName", new RequestConstraint(
pluginName));
request.addRequestField(typeKey);
for (VbSource source : VbSourceList.getInstance().getEntries()) {
if (source.getKey().startsWith(pluginName)) {
for (VbSource source : VbSourceList.getInstance()
.getAllSources()) {
if (!source.getRemove()
&& source.getKey().startsWith(pluginName)) {
String type = source.getKey().replace(pluginName, "");
request.addConstraint(typeKey, new RequestConstraint(
type));

View file

@ -20,6 +20,8 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
* ------------- -------- ----------- -----------------------------------------
* Jan 06, 2011 bsteffen Initial creation
* Dec 11, 2013 2602 bsteffen Remove ISerializableObject.
* Aug 14, 2014 3506 mapeters Added remove field and equals
* and hashCode functions.
*
* </pre>
*
@ -45,6 +47,9 @@ public class VbSource {
@XmlAttribute(required = false)
private String subCategory;
@XmlAttribute(required = false)
private boolean remove;
/**
* @return the key
*/
@ -120,4 +125,29 @@ public class VbSource {
this.subCategory = subCategory;
}
/**
* @return whether or not this source is to be removed
*/
public boolean getRemove() {
return remove;
}
/**
* @param remove
* the remove status to set
*/
public void setRemove(boolean remove) {
this.remove = remove;
}
@Override
public boolean equals(Object that) {
return that instanceof VbSource ? this.key.equals(((VbSource) that)
.getKey()) : false;
}
@Override
public int hashCode() {
return key.hashCode();
}
}

View file

@ -1,12 +1,16 @@
package com.raytheon.viz.volumebrowser.xml;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.xml.bind.JAXB;
import javax.xml.bind.annotation.XmlAccessType;
@ -18,6 +22,9 @@ import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
import com.raytheon.uf.common.localization.FileUpdatedMessage;
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.menus.xml.CommonAbstractMenuContribution;
@ -41,6 +48,9 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
* Dec 11, 2013 2602 bsteffen Remove ISerializableObject.
* Mar 18, 2014 2874 bsteffen Allow subMenus and move contribution
* creation from DataListsProdTableComp
* Aug 19, 2014 3506 mapeters Populate toolbar contributions from directory of
* source files instead of one file, merge sources from
* different localization levels instead of overriding.
*
* </pre>
*
@ -51,6 +61,98 @@ import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu;
@XmlRootElement
public class VbSourceList {
private final static IPathManager pm = PathManagerFactory.getPathManager();
private static Comparator<VbSource> comparator = new Comparator<VbSource>() {
/*
* For sorting sources, compare subcategories first. If they are the
* same or either source doesn't have one, compare display names.
*/
@Override
public int compare(VbSource source1, VbSource source2) {
String subCat1 = source1.getSubCategory();
String subCat2 = source2.getSubCategory();
if (subCat1 != null && subCat2 != null && !subCat1.equals(subCat2)) {
return comparatorString.compare(subCat1, subCat2);
}
return comparatorString.compare(source1.getName(),
source2.getName());
}
};
private static Comparator<String> comparatorString = new Comparator<String>() {
/*
* Compares two strings, ignoring capitalization and comparing numeric
* values.
*/
@Override
public int compare(String s1, String s2) {
int n1 = s1.length();
int n2 = s2.length();
int min = Math.min(n1, n2);
String number1 = "";
String number2 = "";
for (int i = 0; i < min; i++) {
char c1 = s1.charAt(i);
char c2 = s2.charAt(i);
if (c1 != c2) {
if (Character.isDigit(c1) && Character.isDigit(c2)) {
// Store aligned numeric values as strings
number1 += c1;
number2 += c2;
} else if (!number1.equals(number2)) {
if (Character.isDigit(c1)) {
/*
* Return first string as larger if it has
* longer/larger numeric value.
*/
return 1;
} else if (Character.isDigit(c2)) {
/*
* Return second string as larger if it has
* longer/larger numeric value.
*/
return -1;
} else {
/*
* Compare stored numeric values.
*/
return number1.charAt(0) - number2.charAt(0);
}
} else {
c1 = Character.toUpperCase(c1);
c2 = Character.toUpperCase(c2);
if (c1 != c2) {
c1 = Character.toLowerCase(c1);
c2 = Character.toLowerCase(c2);
if (c1 != c2) {
// No overflow because of numeric promotion
return c1 - c2;
}
}
}
}
}
/*
* If two strings end with numeric values after for loop, check for
* additional digits beyond minimum length to determine order.
*/
if (!number1.equals(number2)) {
if (n1 > n2 && Character.isDigit(s1.charAt(n2))) {
return 1;
} else if (n2 > n1 && Character.isDigit(s2.charAt(n1))) {
return -1;
} else
return number1.charAt(0) - number2.charAt(0);
}
return n1 - n2;
}
};
/**
* @deprecated This file path string exists only to support legacy overrides
* and should eventually be removed.
*/
private final static String VB_SOURCE_FILE = "volumebrowser/VbSources.xml";
private final static char SUB_MENU_SPLIT = '/';
@ -77,6 +179,9 @@ public class VbSourceList {
private static VbSourceList instance;
/**
* List of all the sources from one file at one localization level.
*/
@XmlElement(name = "vbSource")
private List<VbSource> entries;
@ -95,23 +200,94 @@ public class VbSourceList {
this.entries = entries;
}
/**
* List of all sources from all files at all localization levels.
*/
private List<VbSource> allSources;
/**
* @return the list of all sources
*/
public synchronized List<VbSource> getAllSources() {
return allSources;
}
public static VbSourceList getInstance() {
synchronized (VB_SOURCE_FILE) {
if (instance == null) {
LocalizationFile file = PathManagerFactory.getPathManager()
.getStaticLocalizationFile(VB_SOURCE_FILE);
instance = new VbSourceList();
instance.populateAllSources();
if (observer == null) {
observer = new VbSourceListener();
file.addFileUpdatedObserver(observer);
LocalizationFile vbDirectory = pm
.getStaticLocalizationFile("volumebrowser");
vbDirectory.addFileUpdatedObserver(observer);
}
instance = JAXB.unmarshal(file.getFile(), VbSourceList.class);
}
return instance;
}
}
public synchronized void populateAllSources() {
allSources = new ArrayList<VbSource>();
List<String> fileNames = new ArrayList<String>();
LocalizationFile vbSourceFile = pm
.getStaticLocalizationFile(VB_SOURCE_FILE);
if (vbSourceFile == null) {
LocalizationFile[] files = pm.listStaticFiles(
"volumebrowser/VbSources", null, false, true);
for (LocalizationFile file : files) {
fileNames.add(file.getName());
}
} else {
fileNames.add(VB_SOURCE_FILE);
}
for (String fileName : fileNames) {
Map<LocalizationLevel, LocalizationFile> localizationFilesMap = pm
.getTieredLocalizationFile(LocalizationType.CAVE_STATIC,
fileName);
LocalizationLevel[] levels = pm.getAvailableLevels();
/*
* Add sources from localization files to entries, in order of
* greatest precedence to lowest
*/
for (int i = levels.length - 1; i >= 0; i--) {
LocalizationFile locFile = localizationFilesMap.get(levels[i]);
if (locFile != null) {
List<VbSource> sources = JAXB.unmarshal(locFile.getFile(),
VbSourceList.class).getEntries();
if (sources != null) {
allSources.addAll(sources);
}
}
}
}
DatasetInfoLookup lookup = DatasetInfoLookup.getInstance();
DatasetInfo info;
// Set containing sources to not be added to lists
Set<VbSource> removes = new HashSet<VbSource>();
for (int i = 0; i < allSources.size(); i++) {
VbSource source = allSources.get(i);
// Set display names for sources
if (source.getName() == null) {
info = lookup.getInfo(source.getKey());
source.setName(info != null ? info.getTitle() : source.getKey());
}
if (source.getRemove()) {
// Add sources with remove tags to removal set and remove them.
removes.add(source);
allSources.remove(i--);
} else if (removes.contains(source)
|| allSources.subList(0, i).contains(source)) {
// Remove sources in removal set and repeats
allSources.remove(i--);
}
}
Collections.sort(allSources, comparator);
allSources = Collections.unmodifiableList(allSources);
}
/**
* Use the VbSources information to build {@link CommonToolBarContribution}
* s.
@ -129,16 +305,21 @@ public class VbSourceList {
Map<String, CommonAbstractMenuContribution> contributions = new HashMap<String, CommonAbstractMenuContribution>();
/*
* For every category, subcategory or subMenu keep a list of all menu
* contributions that fall within that cataegory/menu.
* contributions that fall within that category/menu.
*/
Map<CommonAbstractMenuContribution, List<CommonAbstractMenuContribution>> subContributions = new LinkedHashMap<CommonAbstractMenuContribution, List<CommonAbstractMenuContribution>>();
for (VbSource source : VbSourceList.getInstance().getEntries()) {
/* Skip sources that are not active for this view */
for (VbSource source : VbSourceList.getInstance().getAllSources()) {
String key = source.getKey();
/*
* Skip sources that are not active for this view or are marked for
* removal
*/
if (source.getViews() != null
&& !source.getViews().contains(selectedView)) {
continue;
}
String cat = source.getCategory();
String subCat = source.getSubCategory();
@ -147,19 +328,8 @@ public class VbSourceList {
* goes.
*/
CommonMenuContribution mContrib = new CommonMenuContribution();
mContrib.key = source.getKey();
if (source.getName() != null) {
mContrib.menuText = source.getName();
} else {
// Attempt a lookup in the grib model table
DatasetInfo info = DatasetInfoLookup.getInstance().getInfo(
source.getKey());
if (info != null) {
mContrib.menuText = info.getTitle();
} else {
mContrib.menuText = source.getKey();
}
}
mContrib.key = key;
mContrib.menuText = source.getName();
CommonAbstractMenuContribution contrib = mContrib;
@ -187,7 +357,6 @@ public class VbSourceList {
contributions.put(subCatkey, tContrib);
contrib = tContrib;
}
}
/*
* contrib will be null if the subCategory was already created by a
@ -243,10 +412,11 @@ public class VbSourceList {
}
}
}
/*
* Now that all sources are processed, set the contributions within the
* toolbar and submenu contributions. Also add all subcategories to the
* end of the menu that ocntains them.
* end of the menu that contains them.
*/
contributions = null;
List<CommonToolBarContribution> rootContributions = new ArrayList<CommonToolBarContribution>();
@ -257,7 +427,7 @@ public class VbSourceList {
* Pull out all sub categories(CommonTitleImgContribution), move
* them to the end of the list and then add all items within the
* subcategory to the contributions. This is because sub categories
* are just a visual seperator not an actual element with children.
* are just a visual separator not an actual element with children.
*/
List<CommonAbstractMenuContribution> list = entry.getValue();
List<CommonAbstractMenuContribution> titleItems = new ArrayList<CommonAbstractMenuContribution>();