diff --git a/build/deploy.edex.awips2/esb/bin/setup.env b/build/deploy.edex.awips2/esb/bin/setup.env index 3d76c08938..a3f3e4c5f1 100644 --- a/build/deploy.edex.awips2/esb/bin/setup.env +++ b/build/deploy.edex.awips2/esb/bin/setup.env @@ -23,6 +23,8 @@ export DB_PORT=5432 # setup connection to qpid export BROKER_ADDR=localhost +export BROKER_PORT=5672 +export BROKER_HTTP=8180 # setup hdf5 connection if pypies is enabled export PYPIES_SERVER=http://localhost:9582 @@ -32,9 +34,9 @@ export PYPIES_SERVER=http://localhost:9582 export HTTP_PORT=9581 export HTTP_SERVER_PATH=/services export HTTP_SERVER=http://localhost:${HTTP_PORT}${HTTP_SERVER_PATH} -export JMS_SERVER=tcp://${BROKER_ADDR}:5672 +export JMS_SERVER=tcp://${BROKER_ADDR}:${BROKER_PORT} export JMS_VIRTUALHOST=edex -export JMS_CONNECTIONS_URL=http://${BROKER_ADDR}:8180/api/v2/connection/${JMS_VIRTUALHOST} +export JMS_CONNECTIONS_URL=http://${BROKER_ADDR}:${BROKER_HTTP}/api/v2/connection/${JMS_VIRTUALHOST} export RADAR_SERVER=tcp://localhost:8813 # set the AWIPS II shared directory diff --git a/build/deploy.edex.awips2/esb/conf/spring/edex.xml b/build/deploy.edex.awips2/esb/conf/spring/edex.xml index 1ab4339a3d..28e52c27c7 100644 --- a/build/deploy.edex.awips2/esb/conf/spring/edex.xml +++ b/build/deploy.edex.awips2/esb/conf/spring/edex.xml @@ -14,7 +14,7 @@ - + diff --git a/cave/build/static/win32.amd64/alertviz/alertviz.bat b/cave/build/static/win32.amd64/alertviz/alertviz.bat index 6798716f96..b6b641bab0 100644 --- a/cave/build/static/win32.amd64/alertviz/alertviz.bat +++ b/cave/build/static/win32.amd64/alertviz/alertviz.bat @@ -1,28 +1,14 @@ @echo OFF -REM Always use the System32 (64-bit) reg.exe. -SET REG_EXE=C:\Windows\System32\reg.exe - REM Determine where we are located. SET CONTAINING_DIRECTORY=%~dp0 REM Prepare the environment. -REM Registry Query Variables. -SET A2_JAVA_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Java" -SET A2_PYTHON_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Python" -REM Determine where AWIPS II Java (the jre) is located. -%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory > NUL 2>&1 -IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Java. && PAUSE && EXIT) -FOR /F "tokens=2* delims= " %%A IN ( -'%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory') DO ( -SET JavaJreDirectory=%%B) -REM Determine where AWIPS II Python is located. -%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory > NUL 2>&1 -IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Python. && PAUSE && EXIT) -FOR /F "tokens=2* delims= " %%A IN ( -'%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory') DO ( -SET PythonInstallDirectory=%%B) +REM Location of AWIPS II Java (the jre). +SET JavaJreDirectory=C:\Program Files\Raytheon\AWIPS II\Java\jre7 +REM Location of AWIPS II Python. +SET PythonInstallDirectory=C:\Program Files\Raytheon\AWIPS II\Python REM Add Java and Python to the path. SET Path=%PythonInstallDirectory%;%PythonInstallDirectory%\DLLs;%Path% @@ -36,9 +22,6 @@ SET PythonPath=%PythonInstallDirectory%;%PythonPath% REM Eliminate variables that will no longer be used. SET PythonInstallDirectory= SET JavaJreDirectory= -SET REG_EXE= -SET A2_JAVA_REG= -SET A2_PYTHON_REG= REM Determine where we will be logging to. SET HOME_DIRECTORY=%USERPROFILE% diff --git a/cave/build/static/win32.amd64/cave/cave.bat b/cave/build/static/win32.amd64/cave/cave.bat index 6a42f2ec40..a343b81be7 100644 --- a/cave/build/static/win32.amd64/cave/cave.bat +++ b/cave/build/static/win32.amd64/cave/cave.bat @@ -1,28 +1,14 @@ @echo OFF -REM Always use the System32 (64-bit) reg.exe. -SET REG_EXE=C:\Windows\System32\reg.exe - REM Determine where we are located. SET CONTAINING_DIRECTORY=%~dp0 REM Prepare the environment. -REM Registry Query Variables. -SET A2_JAVA_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Java" -SET A2_PYTHON_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Python" -REM Determine where AWIPS II Java (the jre) is located. -%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory > NUL 2>&1 -IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Java. && PAUSE && EXIT) -FOR /F "tokens=2* delims= " %%A IN ( -'%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory') DO ( -SET JavaJreDirectory=%%B) -REM Determine where AWIPS II Python is located. -%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory > NUL 2>&1 -IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Python. && PAUSE && EXIT) -FOR /F "tokens=2* delims= " %%A IN ( -'%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory') DO ( -SET PythonInstallDirectory=%%B) +REM Location of AWIPS II Java (the jre). +SET JavaJreDirectory=C:\Program Files\Raytheon\AWIPS II\Java\jre7 +REM Location of AWIPS II Python. +SET PythonInstallDirectory=C:\Program Files\Raytheon\AWIPS II\Python REM Add Java and Python to the path. SET Path=%PythonInstallDirectory%;%PythonInstallDirectory%\DLLs;%Path% @@ -39,9 +25,6 @@ SET PythonPath=%PythonInstallDirectory%;%PythonPath% REM Eliminate variables that will no longer be used. SET PythonInstallDirectory= SET JavaJreDirectory= -SET REG_EXE= -SET A2_JAVA_REG= -SET A2_PYTHON_REG= REM Determine where we will be logging to. SET HOME_DIRECTORY=%USERPROFILE% diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerify.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerify.py index a353bdd237..e215fbd3fd 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerify.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/procedures/BOIVerify.py @@ -56,7 +56,8 @@ # ------------ ---------- ----------- -------------------------- # 12/02/2014 RM #625 ryu Changed checkGroup() as suggested to display models # in multi-columns when a single column is insufficient. -# +# 04/16/2015 17390 ryu Replacing string.atoi with int for string/integer to integer conversion +# (ListBox.curselection() now returns ints instead of strings.) # ---------------------------------------------------------------------------- # MenuItems = ["Verify"] @@ -6629,7 +6630,7 @@ class Verif(BVDialog): outlist=[] itemnums=self.ForecasterListbox.curselection() try: - itemnums=map(string.atoi,itemnums) + itemnums=map(int,itemnums) except ValueError: pass for itemnum in itemnums: outlist.append(self.forecasterNumbers[itemnum]) @@ -6805,7 +6806,7 @@ class Verif(BVDialog): def getFromdayListbox(self): itemnums=self.FromdayListbox.curselection() try: - itemnums=map(string.atoi,itemnums) + itemnums=map(int,itemnums) except ValueError: pass itemnum=itemnums[0] outdate=self.gridDays[itemnum] @@ -6818,7 +6819,7 @@ class Verif(BVDialog): outlist=[] itemnums=self.DaylistListbox.curselection() try: - itemnums=map(string.atoi,itemnums) + itemnums=map(int,itemnums) except ValueError: pass for itemnum in itemnums: outlist.append(self.gridDays[itemnum]) @@ -7792,7 +7793,7 @@ class Verif(BVDialog): outlist=[] itemnums=listbox.curselection() try: - itemnums=map(string.atoi,itemnums) + itemnums=map(int,itemnums) except ValueError: pass for itemnum in itemnums: outlist.append(listbox.get(itemnum)) diff --git a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/headline/FormatterRunner.py b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/headline/FormatterRunner.py index 9a878a2c22..7f3248a7d7 100644 --- a/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/headline/FormatterRunner.py +++ b/cave/com.raytheon.viz.gfe/localization/gfe/userPython/textUtilities/headline/FormatterRunner.py @@ -38,6 +38,8 @@ from java.io import File # ------------ ---------- ----------- -------------------------- # 05/29/08 njensen Initial Creation. # 12/10/14 #14946 ryu Add getTimeZones() function. +# 04/16/15 #14946 ryu Fix getTimeZones to return the office TZ if timezone +# is not set for any zone in a segment. # 04/20/2015 #4027 randerso Fixes for formatter autotests # # @@ -441,19 +443,18 @@ def getTimeZones(zones, officeTZ): timezones = [] if zones is not None: for zone in JUtil.javaStringListToPylist(zones): - area_dict = AreaDictionary.AreaDictionary.get(zone) - if area_dict is None: - continue - tzs = area_dict.get("ugcTimeZone") - if tzs is not None: - if type(tzs) is str: - tzs = [tzs] - for tz in tzs: - if tz not in timezones: - timezones.append(tz) + zdict = AreaDictionary.AreaDictionary.get(zone, {}) + tzs = zdict.get("ugcTimeZone", []) + if type(tzs) is str: + tzs = [tzs] + for tz in tzs: + if tz not in timezones: + timezones.append(tz) if officeTZ in timezones and officeTZ != timezones[0]: timezones.remove(officeTZ) timezones.insert(0, officeTZ) + if len(timezones) == 0: + timezones.append(officeTZ) return JUtil.pylistToJavaStringList(timezones) def reloadModule(moduleName): diff --git a/deltaScripts/14.3.3/DR17194/convertSerpConfigToUtility.py b/deltaScripts/14.3.3/DR17194/convertSerpConfigToUtility.py new file mode 100755 index 0000000000..65436f6c7d --- /dev/null +++ b/deltaScripts/14.3.3/DR17194/convertSerpConfigToUtility.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python + + +import sys, os, glob, shutil, pwd + + +def main(): + + REMOVE = """#============================================================================== +# +# The following empty code is here to fool the ifpServer into +# thinking it's a tool. This is so that the configuration will +# appear right next to the primary tool. +# +# DO NOT CHANGE THE LINES BELOW +# +ToolType = "numeric" +WeatherElementEdited = "None" +from numpy import * +HideTool = 1 + +import SmartScript + +class Tool (SmartScript.SmartScript): + def __init__(self, dbss): + SmartScript.SmartScript.__init__(self, dbss) + def execute(self): + return +""" + + dryrun = 0 + if len(sys.argv) > 1 and sys.argv[1] == "-dry": + dryrun = 1 + + print "running %s with dryrun = %d\n\n" % (sys.argv[0], dryrun) + + pws = pwd.getpwnam("awips") + + + cavestatic = '/awips2/edex/data/utility/cave_static' + tool_subpaths = 'gfe/userPython/smartTools' + util_subpaths = 'gfe/userPython/utilities' + tool_list = glob.glob(cavestatic + "/*/*/" + tool_subpaths + "/SerpConfig*.py") + util_list = glob.glob(cavestatic + "/*/*/" + util_subpaths + "/SerpConfig*.py") + print "current tool files:" + print tool_list + print "\ncurrent utilities:" + print util_list + + for f in tool_list: + print "\nworking from %s" % f + dirn, filen = os.path.split(f) + utildir = dirn.replace("smartTools", "utilities") + newfile = os.path.join(utildir, "SerpConfig.py") + if os.path.exists(newfile): + print "%s already exists. No need to create." % newfile + else: + content = open(f).read() + replaced = content.replace(REMOVE, "") + if not dryrun: + if not os.path.exists(utildir): + os.makedirs(utildir) + open(newfile, 'w+').write(replaced) + print "create new file %s" % newfile + + if not dryrun: + if not os.path.exists(newfile): + print "Error: file %s is not created." % newfile + else: + os.chown(newfile, pws.pw_uid, pws.pw_gid) + os.chmod(newfile, 644) + + if filen == "SerpConfig.py": + print "removing override %s" % f + if not dryrun: + os.remove(f) + + print "" + for f in util_list: + dirn, filen = os.path.split(f) + utildir = dirn + newfile = os.path.join(utildir, "SerpConfig.py") + if not os.path.exists(newfile): + if not dryrun: + shutil.copy(f, newfile) + print "create new file %s from %s" % (newfile, filen) + if not dryrun: + if not os.path.exists(newfile): + print "Error: file %s is not created." % newfile + else: + os.chown(newfile, pws.pw_uid, pws.pw_gid) + pass + + +if __name__ == "__main__": + main() diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java index e1ce7c2b28..a6be72c2d6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java @@ -107,6 +107,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; * 06/12/14 #3244 randerso Improved error handling * 09/21/2014 #3648 randerso Changed to do version purging when new databases are added * 10/16/2014 3454 bphillip Upgrading to Hibernate 4 + * 04/28/2015 17435 randerso Fix getLatestDbIdByModelName(). * * * @@ -1372,7 +1373,8 @@ public class GFEDao extends DefaultPluginDao { public List doInTransaction( TransactionStatus status) { - Query query = getCurrentSession().createQuery("FROM DatabaseID WHERE siteId = :siteId AND modelName = :modelName ORDER BY modelTime DESC LIMIT 1"); + Query query = getCurrentSession().createQuery("FROM DatabaseID WHERE siteId = :siteId AND modelName = :modelName ORDER BY modelTime DESC"); + query.setMaxResults(1); query.setParameter("siteId", siteId); query.setParameter("modelName",modelName); return query.list(); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py index a0a3962be4..500cbcbe19 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py @@ -61,6 +61,10 @@ # 04/08/2015 #4383 dgilling Define FireWX ISC configuration parameters. # # for Fcst/Official. +# 04/15/2015 #17383 yteng Change localTC to fix error that time constraints +# being off +# being off +# 04/20/2015 #4414 dgilling Add missing NWPSTrkngCG0 weather elements. # ######################################################################## @@ -218,6 +222,7 @@ Wave_6 = ("Wave_6", VECTOR, "ft", "Wave_6", 50.0, 0.0, 2, NO) Wave_7 = ("Wave_7", VECTOR, "ft", "Wave_7", 50.0, 0.0, 2, NO) Wave_8 = ("Wave_8", VECTOR, "ft", "Wave_8", 50.0, 0.0, 2, NO) Wave_9 = ("Wave_9", VECTOR, "ft", "Wave_9", 50.0, 0.0, 2, NO) +Wave_10 = ("Wave_10", VECTOR, "ft", "Wave_10", 50.0, 0.0, 2, NO) #Fcst Grids - for partitioned wave groups Wave1 = ("Wave1", VECTOR, "ft", "WAVE1", 50.0, 0.0, 1, NO) @@ -229,6 +234,7 @@ Wave6 = ("Wave6", VECTOR, "ft", "WAVE6", 50.0, 0.0, 1, NO) Wave7 = ("Wave7", VECTOR, "ft", "Wave7", 50.0, 0.0, 0, NO) Wave8 = ("Wave8", VECTOR, "ft", "Wave8", 35.0, 0.0, 0, NO) Wave9 = ("Wave9", VECTOR, "ft", "Wave9", 35.0, 0.0, 0, NO) +Wave10 = ("Wave10", VECTOR, "ft", "Wave10", 35.0, 0.0, 0, NO) #Smart Init Grids - for partitioned wave groups Period_1 = ("Period_1", SCALAR, "sec", "Period_1", 30.0, 1.0, 0, NO) @@ -240,6 +246,7 @@ Period_6 = ("Period_6", SCALAR, "sec", "Period_6", 30.0, 0.0, 0, NO) Period_7 = ("Period_7", SCALAR, "sec", "Period_7", 30.0, 0.0, 0, NO) Period_8 = ("Period_8", SCALAR, "sec", "Period_8", 30.0, 0.0, 0, NO) Period_9 = ("Period_9", SCALAR, "sec", "Period_9", 30.0, 0.0, 0, NO) +Period_10 = ("Period_10", SCALAR, "sec", "Period_10", 30.0, 0.0, 0, NO) #Fcst Grids - for partitioned wave groups Period1 = ("Period1", SCALAR, "sec", "Period1", 25.0, 0.0, 1, NO) @@ -251,6 +258,7 @@ Period6 = ("Period6", SCALAR, "sec", "Period6", 25.0, 0.0, 1, NO) Period7 = ("Period7", SCALAR, "sec", "Period7", 25.0, 0.0, 0, NO) Period8 = ("Period8", SCALAR, "sec", "Period8", 25.0, 0.0, 0, NO) Period9 = ("Period9", SCALAR, "sec", "Period9", 25.0, 0.0, 0, NO) +Period10 = ("Period10", SCALAR, "sec", "Period10", 25.0, 0.0, 0, NO) # Fire Weather Weather Elements LAL = ("LAL", SCALAR, "cat", "Lightning Activity Level", 6.0, 1.0, 0, NO) @@ -1973,7 +1981,7 @@ OFFICIALDBS = [([Temp, Td, Wind, NWPSwind, Weather, Sky, FzLevel, SnowLevel], TC ([MinT], MinTTC), ([MaxT], MaxTTC), ([MinRH], MinRHTC), ([MaxRH], MaxRHTC), ([WaveHeight, SurfHeight, Swell, Swell2, Period], TC3NG), - ([WindWaveHeight, SwanSwell, Wave1, Wave2, Wave3, Wave4, Wave5, Wave6, Wave7, Wave8, Wave9, Period1, Period2, Period3, Period4, Period5, Period6, Period7, Period8, Period9], TC3NG), + ([WindWaveHeight, SwanSwell, Wave1, Wave2, Wave3, Wave4, Wave5, Wave6, Wave7, Wave8, Wave9, Wave10, Period1, Period2, Period3, Period4, Period5, Period6, Period7, Period8, Period9, Period10], TC3NG), ([VentRate, LAL, Haines, MixHgt, FreeWind, TransWind], TC1), ([DSI, Stability, MarineLayer], TC1), ([HrsOfSun, InvBurnOffTemp], LT24), @@ -1998,7 +2006,7 @@ OFFICIALDBS = [([Temp, Td, Wind, NWPSwind, Weather, Sky, FzLevel, SnowLevel], TC # NWPS nwpsCG1_MODEL = [([SwanSwell, Period, WaveHeight, WindWaveHeight, Wind], TC3NG)] -nwpsTrkngCG0_MODEL = [([Wave1, Wave2, Wave3, Wave4, Wave5, Wave6, Wave7, Wave8, Wave9, Period1, Period2, Period3, Period4, Period5, Period6,Period7, Period8, Period9 ], TC3NG)] +nwpsTrkngCG0_MODEL = [([Wave1, Wave2, Wave3, Wave4, Wave5, Wave6, Wave7, Wave8, Wave9, Wave10, Period1, Period2, Period3, Period4, Period5, Period6,Period7, Period8, Period9, Period10 ], TC3NG)] # Global Wave Watch III, WNAWAVE, AKWAVE Model database parameter groupings WAVEPARMS = [([WindWaveHeight, WaveHeight, SurfHeight, Wind], TC6), diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/gfeLevelMappingFile.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/gfeLevelMappingFile.xml index cb9bf4d2e9..da3d38cf1e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/gfeLevelMappingFile.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/gfeLevelMappingFile.xml @@ -420,6 +420,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/nwpsTrkngCG0.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/nwpsTrkngCG0.xml index 7d80f672c9..6f3c5c72ee 100755 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/nwpsTrkngCG0.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/grid/parameterInfo/nwpsTrkngCG0.xml @@ -26,10 +26,15 @@ 237600 248400 259200 + 270000 280800 + 291600 302400 + 313200 324000 + 334800 345600 + 356400 367200 388800 410400 @@ -46,7 +51,7 @@ 648000 - SWDIR + swdir Swell peak direction degree_angle degree_angle @@ -70,7 +75,7 @@ - SWPER + swper Swell wave peak period s seconds @@ -94,7 +99,7 @@ - SWELL + swell Significant swell wave height m meters diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/nwpsTrkngCG0.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/nwpsTrkngCG0.py index 28c18783aa..7ebd623e8b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/nwpsTrkngCG0.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/smartinit/nwpsTrkngCG0.py @@ -4,78 +4,56 @@ import os class nwpsTrkngCG0Forecaster(Forecaster): def __init__(self): Forecaster.__init__(self, "nwpsTrkngCG0", "nwpsTrkngCG0") - - def calcPeriod1(self, SWPER_OSEQD1): - period = SWPER_OSEQD1 - return period - def calcPeriod2(self, SWPER_OSEQD2): - period = SWPER_OSEQD2 - return period - def calcPeriod3(self, SWPER_OSEQD3): - period = SWPER_OSEQD3 - return period - def calcPeriod4(self, SWPER_OSEQD4): - period = SWPER_OSEQD4 - return period - def calcPeriod5(self, SWPER_OSEQD5): - period = SWPER_OSEQD5 - return period - def calcPeriod6(self, SWPER_OSEQD6): - period = SWPER_OSEQD6 - return period - def calcPeriod7(self, SWPER_OSEQD7): - period = SWPER_OSEQD7 - return period - def calcPeriod8(self, SWPER_OSEQD8): - period = SWPER_OSEQD8 - return period - def calcPeriod9(self, SWPER_OSEQD9): - period = SWPER_OSEQD9 - return period - def calcPeriod10(self, SWPER_OSEQD10): - period = SWPER_OSEQD10 - return period - - def calcWave1(self, SWELL_OSEQD1, SWDIR_OSEQD1): - mag = SWELL_OSEQD1 * 3.28 - dir = clip(SWDIR_OSEQD1, 0, 359.5) + + def _calcPeriodN(self, swper): + return swper + + def _calcWaveN(self, swell, swdir): + mag = swell / 0.3048 + dir = clip(swdir, 0, 359.5) return (mag, dir) - def calcWave2(self, SWELL_OSEQD2, SWDIR_OSEQD2): - mag = SWELL_OSEQD2 * 3.28 - dir = clip(SWDIR_OSEQD2, 0, 359.5) - return (mag, dir) - def calcWave3(self, SWELL_OSEQD3, SWDIR_OSEQD3): - mag = SWELL_OSEQD3 * 3.28 - dir = clip(SWDIR_OSEQD3, 0, 359.5) - return (mag, dir) - def calcWave4(self, SWELL_OSEQD4, SWDIR_OSEQD4): - mag = SWELL_OSEQD4 * 3.28 - dir = clip(SWDIR_OSEQD4, 0, 359.5) - return (mag, dir) - def calcWave5(self, SWELL_OSEQD5, SWDIR_OSEQD5): - mag = SWELL_OSEQD5 * 3.28 - dir = clip(SWDIR_OSEQD5, 0, 359.5) - return (mag, dir) - def calcWave6(self, SWELL_OSEQD6, SWDIR_OSEQD6): - mag = SWELL_OSEQD6 * 3.28 - dir = clip(SWDIR_OSEQD6, 0, 359.5) - return (mag, dir) - def calcWave7(self, SWELL_OSEQD7, SWDIR_OSEQD7): - mag = SWELL_OSEQD7 * 3.28 - dir = clip(SWDIR_OSEQD7, 0, 359.5) - return (mag, dir) - def calcWave8(self, SWELL_OSEQD8, SWDIR_OSEQD8): - mag = SWELL_OSEQD8 * 3.28 - dir = clip(SWDIR_OSEQD8, 0, 359.5) - return (mag, dir) - def calcWave9(self, SWELL_OSEQD9, SWDIR_OSEQD9): - mag = SWELL_OSEQD9 * 3.28 - dir = clip(SWDIR_OSEQD9, 0, 359.5) - return (mag, dir) - def calcWave10(self, SWELL_OSEQD10, SWDIR_OSEQD10): - mag = SWELL_OSEQD10 * 3.28 - dir = clip(SWDIR_OSEQD10, 0, 359.5) - return (mag, dir) + + def calcPeriod1(self, swper_OSEQD1): + return self._calcPeriodN(swper_OSEQD1) + def calcPeriod2(self, swper_OSEQD2): + return self._calcPeriodN(swper_OSEQD2) + def calcPeriod3(self, swper_OSEQD3): + return self._calcPeriodN(swper_OSEQD3) + def calcPeriod4(self, swper_OSEQD4): + return self._calcPeriodN(swper_OSEQD4) + def calcPeriod5(self, swper_OSEQD5): + return self._calcPeriodN(swper_OSEQD5) + def calcPeriod6(self, swper_OSEQD6): + return self._calcPeriodN(swper_OSEQD6) + def calcPeriod7(self, swper_OSEQD7): + return self._calcPeriodN(swper_OSEQD7) + def calcPeriod8(self, swper_OSEQD8): + return self._calcPeriodN(swper_OSEQD8) + def calcPeriod9(self, swper_OSEQD9): + return self._calcPeriodN(swper_OSEQD9) + def calcPeriod10(self, swper_OSEQD10): + return self._calcPeriodN(swper_OSEQD10) + + def calcWave1(self, swell_OSEQD1, swdir_OSEQD1): + return self._calcWaveN(swell_OSEQD1, swdir_OSEQD1) + def calcWave2(self, swell_OSEQD2, swdir_OSEQD2): + return self._calcWaveN(swell_OSEQD2, swdir_OSEQD2) + def calcWave3(self, swell_OSEQD3, swdir_OSEQD3): + return self._calcWaveN(swell_OSEQD3, swdir_OSEQD3) + def calcWave4(self, swell_OSEQD4, swdir_OSEQD4): + return self._calcWaveN(swell_OSEQD4, swdir_OSEQD4) + def calcWave5(self, swell_OSEQD5, swdir_OSEQD5): + return self._calcWaveN(swell_OSEQD5, swdir_OSEQD5) + def calcWave6(self, swell_OSEQD6, swdir_OSEQD6): + return self._calcWaveN(swell_OSEQD6, swdir_OSEQD6) + def calcWave7(self, swell_OSEQD7, swdir_OSEQD7): + return self._calcWaveN(swell_OSEQD7, swdir_OSEQD7) + def calcWave8(self, swell_OSEQD8, swdir_OSEQD8): + return self._calcWaveN(swell_OSEQD8, swdir_OSEQD8) + def calcWave9(self, swell_OSEQD9, swdir_OSEQD9): + return self._calcWaveN(swell_OSEQD9, swdir_OSEQD9) + def calcWave10(self, swell_OSEQD10, swdir_OSEQD10): + return self._calcWaveN(swell_OSEQD10, swdir_OSEQD10) def main(): nwpsTrkngCG0Forecaster().run() diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF index 3679edde51..ac1ad974fd 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF @@ -14,4 +14,6 @@ Require-Bundle: com.raytheon.uf.common.dataplugin, com.raytheon.uf.common.geospatial, com.raytheon.uf.common.serialization, com.raytheon.uf.common.dataaccess, + com.raytheon.uf.common.message, javax.measure +Eclipse-RegisterBuddy: com.raytheon.uf.common.message diff --git a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java index b4703b2e96..ffea0c9a02 100644 --- a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java +++ b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java @@ -43,6 +43,7 @@ import com.raytheon.uf.common.geospatial.ISpatialObject; import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.geospatial.PointUtil; import com.raytheon.uf.common.monitor.xml.SCANModelParameterXML; +import com.raytheon.uf.common.time.util.TimeUtil; import com.raytheon.uf.edex.database.plugin.PluginDao; import com.raytheon.uf.edex.database.plugin.PluginFactory; import com.raytheon.uf.edex.database.query.DatabaseQuery; @@ -106,6 +107,7 @@ public class FreezingLevel { // only for get data for hour 00z,06z,12z, or 18z int adjustedHour = (refTime.get(Calendar.HOUR_OF_DAY) / 6) * 6; refTime.set(Calendar.HOUR_OF_DAY, adjustedHour); + TimeUtil.minCalendarFields(refTime, Calendar.MINUTE, Calendar.SECOND, Calendar.MILLISECOND); // populates what ever is missing, sets prevalent forecast hour for (Entry entry : getGHLevelMap().entrySet()) { diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/src/gov/nasa/msfc/sport/edex/plugin/lma/LmaDecoder.java b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/src/gov/nasa/msfc/sport/edex/plugin/lma/LmaDecoder.java index ddc3134c0a..170b9b4a13 100755 --- a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/src/gov/nasa/msfc/sport/edex/plugin/lma/LmaDecoder.java +++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/src/gov/nasa/msfc/sport/edex/plugin/lma/LmaDecoder.java @@ -64,7 +64,7 @@ public class LmaDecoder { */ public PluginDataObject[] decode(File fileInput) throws Exception { //Create an empty records to hold the data once decoded. - GridRecord[] records = null; + List recordsList = new ArrayList(); /** The variable dictionary used to check which variables are supported by the ingest **/ LMAVarsDict lmaVarsDict = LMAVarsDict.getInstance(); @@ -105,7 +105,6 @@ public class LmaDecoder { float dy= yresAtt.getNumericValue().floatValue(); int nx = file.findDimension("x").getLength(); int ny = file.findDimension("y").getLength(); - int nz = file.findDimension("levels_17").getLength(); //Construct the grid coverage with attributes GridCoverage cov =createMapCoverage(centerLon, centerLat, nx, ny, dx, dy); //Lookup Coverage to make sure it does not already exist in the db. @@ -129,17 +128,15 @@ public class LmaDecoder { String[] listOfVariablesToProcess = new String[sizeOfVariablesToProcess]; varsToProcessList.toArray(listOfVariablesToProcess); - // - //Create initial Grid Record array - int count =0; - records = new GridRecord[sizeOfVariablesToProcess*nz]; + //Iterate over variables and create GridRecords for each variable and level for (int i = 0; i0) { + GridRecord[] records = new GridRecord[recordsList.size()]; + recordsList.toArray(records); + return records; + } else { + return null; + } } diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_1.cmap b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_1.cmap new file mode 100644 index 0000000000..c543aad171 --- /dev/null +++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_1.cmap @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_2.cmap b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_2.cmap new file mode 100644 index 0000000000..6e67d83842 --- /dev/null +++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_2.cmap @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/lma/nalma.cmap b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_default.cmap similarity index 99% rename from edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/lma/nalma.cmap rename to edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_default.cmap index af7db68192..dd45f170a6 100644 --- a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/lma/nalma.cmap +++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/colormaps/LMA/LMA_default.cmap @@ -3,9 +3,9 @@ This is a colormap file that is read via JaXB to marshel the ColorMap class. ======================--> - - - + + + diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml index 528f5ea94e..6b2e35ee45 100644 --- a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml +++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/menus/lma/lma.xml @@ -9,7 +9,7 @@ - + /grid/NALMA/%/%/lmamsd @@ -17,7 +17,7 @@ - + /grid/NALMA/%/%/lmafed @@ -25,7 +25,7 @@ - + /grid/NALMA/%/%/lmafid @@ -33,7 +33,7 @@ - + /grid/NALMA/%/%/lmamfd @@ -41,7 +41,7 @@ - + /grid/NALMA/%/%/lmaroc @@ -49,7 +49,7 @@ - + @@ -59,7 +59,7 @@ - + /grid/DCLMA/%/%/lmafed @@ -67,7 +67,7 @@ - + /grid/DCLMA/%/%/lmafid @@ -75,7 +75,7 @@ - + /grid/DCLMA/%/%/lmamfd @@ -83,7 +83,7 @@ - + @@ -94,7 +94,7 @@ - + /grid/KLDAR/%/%/lmafed @@ -102,7 +102,7 @@ - + /grid/KLDAR/%/%/lmafid @@ -110,7 +110,7 @@ - + /grid/KLDAR/%/%/lmamfd @@ -118,7 +118,7 @@ - + @@ -129,7 +129,7 @@ - + /grid/OKLMA/%/%/lmafed @@ -137,7 +137,7 @@ - + /grid/OKLMA/%/%/lmafid @@ -145,7 +145,7 @@ - + /grid/OKLMA/%/%/lmamfd @@ -153,7 +153,7 @@ - + @@ -164,7 +164,7 @@ - + /grid/COLMA/%/%/lmafed @@ -172,7 +172,7 @@ - + /grid/COLMA/%/%/lmafid @@ -180,7 +180,7 @@ - + /grid/COLMA/%/%/lmamfd @@ -188,7 +188,7 @@ - + @@ -199,7 +199,7 @@ - + /grid/HGLMA/%/%/lmafed @@ -207,7 +207,7 @@ - + /grid/HGLMA/%/%/lmafid @@ -215,7 +215,7 @@ - + /grid/HGLMA/%/%/lmamfd @@ -223,7 +223,7 @@ - + @@ -234,7 +234,7 @@ - + /grid/WTLMA/%/%/lmafed @@ -242,7 +242,7 @@ - + /grid/WTLMA/%/%/lmafid @@ -250,7 +250,7 @@ - + /grid/WTLMA/%/%/lmamfd @@ -258,7 +258,7 @@ - + @@ -269,7 +269,7 @@ - + /grid/CFLMA/%/%/lmafed @@ -277,7 +277,7 @@ - + /grid/CFLMA/%/%/lmafid @@ -285,7 +285,7 @@ - + /grid/CFLMA/%/%/lmamfd @@ -293,7 +293,7 @@ - + @@ -304,7 +304,7 @@ - + /grid/LLLMA/%/%/lmafed @@ -312,7 +312,7 @@ - + /grid/LLLMA/%/%/lmafid @@ -320,7 +320,7 @@ - + /grid/LLLMA/%/%/lmamfd @@ -328,7 +328,7 @@ - + @@ -340,7 +340,7 @@ - + /grid/KSCLMA/%/%/lmafed @@ -348,7 +348,7 @@ - + /grid/KSCLMA/%/%/lmafid @@ -356,7 +356,7 @@ - + /grid/KSCLMA/%/%/lmamfd @@ -364,7 +364,7 @@ - + @@ -375,7 +375,7 @@ - + /grid/NGLMA/%/%/lmafed @@ -383,7 +383,7 @@ - + /grid/NGLMA/%/%/lmafid @@ -391,7 +391,7 @@ - + /grid/NGLMA/%/%/lmamfd @@ -399,7 +399,7 @@ - + @@ -410,7 +410,7 @@ - + /grid/ONLMA/%/%/lmafed @@ -418,7 +418,7 @@ - + /grid/ONLMA/%/%/lmafid @@ -426,7 +426,7 @@ - + /grid/ONLMA/%/%/lmamfd @@ -434,7 +434,7 @@ - + @@ -445,7 +445,7 @@ - + /grid/WILMA/%/%/lmafed @@ -453,7 +453,7 @@ - + /grid/WILMA/%/%/lmafid @@ -461,7 +461,7 @@ - + /grid/WILMA/%/%/lmamfd @@ -469,7 +469,7 @@ - + @@ -480,7 +480,7 @@ - + /grid/WSLMA/%/%/lmafed @@ -488,7 +488,7 @@ - + /grid/WSLMA/%/%/lmafid @@ -496,7 +496,7 @@ - + /grid/WSLMA/%/%/lmamfd @@ -504,7 +504,7 @@ - + @@ -517,7 +517,7 @@ - + /grid/PGNA/%/%/lmafid @@ -525,7 +525,7 @@ - + /grid/PGNA/%/%/lmamfd @@ -533,7 +533,7 @@ - + /grid/PGNA/%/%/lmasum @@ -541,7 +541,7 @@ - + @@ -552,7 +552,7 @@ - + /grid/PGDC/%/%/lmafid @@ -560,7 +560,7 @@ - + /grid/PGDC/%/%/lmamfd @@ -568,7 +568,7 @@ - + /grid/PGDC/%/%/lmasum @@ -576,7 +576,7 @@ - + @@ -587,7 +587,7 @@ - + /grid/PGSC/%/%/lmafid @@ -595,7 +595,7 @@ - + /grid/PGSC/%/%/lmamfd @@ -603,7 +603,7 @@ - + /grid/PGSC/%/%/lmasum @@ -611,7 +611,7 @@ - + @@ -622,7 +622,7 @@ - + /grid/PGOK/%/%/lmafid @@ -630,7 +630,7 @@ - + /grid/PGOK/%/%/lmamfd @@ -638,7 +638,7 @@ - + /grid/PGOK/%/%/lmasum @@ -646,7 +646,7 @@ - + @@ -657,7 +657,7 @@ - + /grid/PGCO/%/%/lmafid @@ -665,7 +665,7 @@ - + /grid/PGCO/%/%/lmamfd @@ -673,7 +673,7 @@ - + /grid/PGCO/%/%/lmasum @@ -681,7 +681,7 @@ - + @@ -692,7 +692,7 @@ - + /grid/PGHG/%/%/lmafid @@ -700,7 +700,7 @@ - + /grid/PGHG/%/%/lmamfd @@ -708,7 +708,7 @@ - + /grid/PGHG/%/%/lmasum @@ -716,7 +716,7 @@ - + @@ -727,7 +727,7 @@ - + /grid/PGWT/%/%/lmafid @@ -735,7 +735,7 @@ - + /grid/PGWT/%/%/lmamfd @@ -743,7 +743,7 @@ - + /grid/PGWT/%/%/lmasum @@ -751,7 +751,7 @@ - + @@ -762,7 +762,7 @@ - + /grid/PGCF/%/%/lmafid @@ -770,7 +770,7 @@ - + /grid/PGCF/%/%/lmamfd @@ -778,7 +778,7 @@ - + /grid/PGCF/%/%/lmasum @@ -786,7 +786,7 @@ - + @@ -797,7 +797,7 @@ - + /grid/PGLL/%/%/lmafid @@ -805,7 +805,7 @@ - + /grid/PGLL/%/%/lmamfd @@ -813,7 +813,7 @@ - + /grid/PGLL/%/%/lmasum @@ -821,7 +821,7 @@ - + diff --git a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/styleRules/lma/lmaImageryStyleRules.xml b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/styleRules/lma/lmaImageryStyleRules.xml index a205e89da4..f4b6c76f0d 100644 --- a/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/styleRules/lma/lmaImageryStyleRules.xml +++ b/edexOsgi/gov.nasa.msfc.sport.edex.plugin.lma/utility/common_static/base/styleRules/lma/lmaImageryStyleRules.xml @@ -8,7 +8,7 @@ 50.0 100.0 150.0 200.0 - lma/nalma + LMA/LMA_default 0.0 500.0 @@ -16,34 +16,18 @@ - - - lmamsd - - - - 50.0 100.0 150.0 - - lma/nalma - - 0.0 - 200.0 - - - lmafed lmafid lmamfd - lmasum 10.0 20.0 30.0 - lma/nalma + LMA/LMA_default 0.0 110.0 @@ -60,14 +44,28 @@ -1.0 0.0 1.0 - lma/nalma + LMA/LMA_default -3.0 3.0 - + + + lmasum + + + + 50.0 100.0 150.0 200.0 + + LMA/LMA_default + + 0.0 + 400.0 + + + diff --git a/javaUtilities/com.raytheon.wes2bridge.common/src/com/raytheon/wes2bridge/common/configuration/Wes2BridgeCase.java b/javaUtilities/com.raytheon.wes2bridge.common/src/com/raytheon/wes2bridge/common/configuration/Wes2BridgeCase.java index 460ad7a0ad..e0c13e475f 100644 --- a/javaUtilities/com.raytheon.wes2bridge.common/src/com/raytheon/wes2bridge/common/configuration/Wes2BridgeCase.java +++ b/javaUtilities/com.raytheon.wes2bridge.common/src/com/raytheon/wes2bridge/common/configuration/Wes2BridgeCase.java @@ -35,6 +35,7 @@ import javax.xml.bind.annotation.XmlRootElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 12, 2014 3521 bkowal Initial creation + * Apr 20, 2015 4392 dlovely Removed un-used JMX port configuration * * * @@ -60,9 +61,6 @@ public class Wes2BridgeCase { @XmlElement private int qpidHttpPort; - @XmlElement - private int qpidJmxPort; - @XmlElement private int jmsPort; @@ -153,21 +151,6 @@ public class Wes2BridgeCase { this.qpidHttpPort = qpidHttpPort; } - /** - * @return the qpidJmxPort - */ - public int getQpidJmxPort() { - return qpidJmxPort; - } - - /** - * @param qpidJmxPort - * the qpidJmxPort to set - */ - public void setQpidJmxPort(int qpidJmxPort) { - this.qpidJmxPort = qpidJmxPort; - } - /** * @return the jmsPort */ diff --git a/javaUtilities/com.raytheon.wes2bridge.manager/META-INF/MANIFEST.MF b/javaUtilities/com.raytheon.wes2bridge.manager/META-INF/MANIFEST.MF index b2a3ee4147..41c95f3a62 100644 --- a/javaUtilities/com.raytheon.wes2bridge.manager/META-INF/MANIFEST.MF +++ b/javaUtilities/com.raytheon.wes2bridge.manager/META-INF/MANIFEST.MF @@ -4,6 +4,7 @@ Bundle-Name: Wes2Bridge Manager Bundle-SymbolicName: com.raytheon.wes2bridge.manager Bundle-Version: 1.0.0.qualifier Bundle-Vendor: RAYTHEON -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Require-Bundle: com.raytheon.wes2bridge.common;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0" + org.apache.commons.lang;bundle-version="2.3.0", + org.codehaus.jackson;bundle-version="1.7.3" diff --git a/javaUtilities/com.raytheon.wes2bridge.manager/build.xml b/javaUtilities/com.raytheon.wes2bridge.manager/build.xml index e0ee4a8ab9..0a0d2eca93 100644 --- a/javaUtilities/com.raytheon.wes2bridge.manager/build.xml +++ b/javaUtilities/com.raytheon.wes2bridge.manager/build.xml @@ -11,7 +11,7 @@ - + @@ -36,6 +36,9 @@ + + + diff --git a/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/IQpidConfigurationXML.java b/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/IQpidConfigurationXML.java deleted file mode 100644 index bc036eeb47..0000000000 --- a/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/IQpidConfigurationXML.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.wes2bridge.manager; - -/** - * Identifies XML tag names of interest as constants within the qpid config.xml - * configuration. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 17, 2013            bkowal     Initial creation
- * 
- * 
- * - * @author bkowal - * @version 1.0 - */ - -public interface IQpidConfigurationXML { - public static final String XML_BROKER = "broker"; - public static final String XML_CONNECTOR = "connector"; - public static final String XML_MANAGEMENT = "management"; - public static final String XML_JMXPORT = "jmxport"; - public static final String XML_HTTP = "http"; - public static final String XML_REGISTRY_SERVER = "registryServer"; - public static final String XML_PORT = "port"; -} diff --git a/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java b/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java index d837d1551f..a4088fc87f 100644 --- a/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java +++ b/javaUtilities/com.raytheon.wes2bridge.manager/src/com/raytheon/wes2bridge/manager/Wes2BridgeManager.java @@ -26,27 +26,21 @@ import java.io.BufferedReader; import java.io.FileWriter; import java.io.BufferedWriter; import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; import java.util.regex.Pattern; import java.util.regex.Matcher; import javax.xml.bind.JAXBException; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.TransformerFactoryConfigurationError; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; import org.apache.commons.lang.StringUtils; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.type.TypeReference; -import com.raytheon.wes2bridge.manager.IQpidConfigurationXML; import com.raytheon.wes2bridge.common.configuration.Wes2BridgeCase; import com.raytheon.wes2bridge.configuration.jaxb.Wes2BridgeJaxbManager; @@ -73,6 +67,8 @@ import com.raytheon.wes2bridge.configuration.jaxb.Wes2BridgeJaxbManager; * Aug 14, 2014 3521 bkowal Updated to use Wes2BridgeCase. Eliminated * configuration that is no longer used and * updated EDEX re-configuration. + * Apr 15, 2015 4392 dlovely Updates the new qpid json configuration now + * Apr 20, 2015 4392 dlovely Removed un-used JMX port configuration * * * @@ -101,6 +97,16 @@ public class Wes2BridgeManager { private String wes2BridgeScripts = null; + private static final TypeReference> MAP_TYPE_REFERENCE = new TypeReference>() + { + }; + + public static final String QPID_NAME = "name"; + public static final String QPID_AMQP = "AMQP"; + public static final String QPID_HTTP = "HTTP"; + public static final String QPID_PORT = "port"; + public static final String QPID_PORTS = "ports"; + /** * */ @@ -191,9 +197,9 @@ public class Wes2BridgeManager { final String line1 = "export DATA_ARCHIVE_ROOT="; final String line2 = "export DB_PORT="; - final String line3 = "export BROKER_ADDR="; + final String line3 = "export BROKER_PORT="; final String line4 = "export HTTP_PORT="; - final String line5 = "export JMS_SERVER="; + final String line5 = "export BROKER_HTTP="; final String line6 = "export SHARE_DIR="; final String pypiesServerPattern = "(export PYPIES_SERVER=http://.+:)[1-9][0-9]+"; final Pattern pattern7 = Pattern.compile(pypiesServerPattern); @@ -207,13 +213,11 @@ public class Wes2BridgeManager { } else if (line.startsWith(line2)) { line = line2 + this.wes2BridgeCase.getDatabasePort(); } else if (line.startsWith(line3)) { - line = line3 + "localhost:" - + this.wes2BridgeCase.getJmsPort(); + line = line3 + this.wes2BridgeCase.getJmsPort(); } else if (line.startsWith(line4)) { line = line4 + this.wes2BridgeCase.getEdexHttpPort(); } else if (line.startsWith(line5)) { - line = line5 + "tcp://localhost:" - + this.wes2BridgeCase.getJmsPort(); + line = line5 + this.wes2BridgeCase.getQpidHttpPort(); } else if (line.startsWith(line6)) { line = line6 + edexDirectory + "/data/share"; } else if (matcher.matches()) { @@ -409,87 +413,51 @@ public class Wes2BridgeManager { } } - public void reconfigureQPID() throws FileNotFoundException, IOException, - ParserConfigurationException, SAXException, - TransformerFactoryConfigurationError, TransformerException { + public void reconfigureQPID() throws FileNotFoundException, IOException { final String srcQpidDirectory = AWIPSII + "/" + "qpid"; final String qpidDirectory = WES2BRIDGE_DIRECTORY + "/" + this.wes2BridgeCase.getName() + "/" + "qpid"; - this.updateQpidConfigXML(srcQpidDirectory, qpidDirectory); + this.updateQpidConfigJSON(srcQpidDirectory, qpidDirectory); this.updateQPIDD(qpidDirectory); } - /* Updates qpid config.xml */ - private void updateQpidConfigXML(String srcQpidDirectory, - String qpidDirectory) throws FileNotFoundException, IOException, - ParserConfigurationException, SAXException, - TransformerFactoryConfigurationError, TransformerException { - String srcconfig_xml = srcQpidDirectory + "/etc/config.xml"; - String config_xml = qpidDirectory + "/etc/config.xml"; + /* Updates qpid config.json */ + private void updateQpidConfigJSON(String srcQpidDirectory, + String qpidDirectory) throws FileNotFoundException, IOException { + String srcconfig_json = srcQpidDirectory + "/config.json"; + String config_json = qpidDirectory + "/config.json"; - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance() - .newDocumentBuilder(); - Document document = documentBuilder.parse(srcconfig_xml); + try (BufferedWriter bw = this.getBufferedWriter(config_json);){ - // Get the root broker node. - Node brokerNode = document.getElementsByTagName( - IQpidConfigurationXML.XML_BROKER).item(0); - // Get the connector node. - Node connectorNode = this.getChildNodeByName(brokerNode, - IQpidConfigurationXML.XML_CONNECTOR); - // Get the management node. - Node managementNode = this.getChildNodeByName(brokerNode, - IQpidConfigurationXML.XML_MANAGEMENT); - // Get the jmxport node. - Node jmxPortNode = this.getChildNodeByName(managementNode, - IQpidConfigurationXML.XML_JMXPORT); - // Get the http port node. - Node httpPortNode = this.getChildNodeByName(managementNode, - IQpidConfigurationXML.XML_HTTP); - - Node portNode = null; - - // Get the connector port node. - portNode = this.getChildNodeByName(connectorNode, - IQpidConfigurationXML.XML_PORT); - portNode.setTextContent(Integer.toString(this.wes2BridgeCase - .getJmsPort())); - // Get the jmxport registryServer node - portNode = this.getChildNodeByName(jmxPortNode, - IQpidConfigurationXML.XML_REGISTRY_SERVER); - portNode.setTextContent(Integer.toString(this.wes2BridgeCase - .getQpidJmxPort())); - // Get the http port node. - portNode = this.getChildNodeByName(httpPortNode, - IQpidConfigurationXML.XML_PORT); - portNode.setTextContent(Integer.toString(this.wes2BridgeCase - .getQpidHttpPort())); - - /* - * Write the updated configuration file to its destination. - */ - Transformer transformer = TransformerFactory.newInstance() - .newTransformer(); - DOMSource domSource = new DOMSource(document); - StreamResult streamResult = new StreamResult(new File(config_xml)); - transformer.transform(domSource, streamResult); - } - - private Node getChildNodeByName(Node parentNode, String childName) { - if (parentNode.hasChildNodes() == false) { - return null; - } - - NodeList nodeList = parentNode.getChildNodes(); - for (int i = 0; i < nodeList.getLength(); i++) { - Node node = nodeList.item(i); - if (node.getNodeName().equals(childName)) { - return node; + List lines = Files.readAllLines(Paths.get(srcconfig_json), Charset.defaultCharset()); + StringBuilder stringBuilder = new StringBuilder(); + for (String line : lines) { + stringBuilder.append( line ); } - } - return null; + ObjectMapper mapper = new ObjectMapper(); + Map attributesMap = mapper.readValue(stringBuilder.toString(), MAP_TYPE_REFERENCE); + + @SuppressWarnings("unchecked") + ArrayList ports = (ArrayList) attributesMap.get(QPID_PORTS); + + for(int x = 0; x < ports.size(); x++) { + @SuppressWarnings("unchecked") + Map port = (Map) ports.get(x); + String name = (String) port.get(QPID_NAME); + if (QPID_AMQP.equals(name)) { + port.put(QPID_PORT, this.wes2BridgeCase.getJmsPort()); + } else if (QPID_HTTP.equals(name)) { + port.put(QPID_PORT, this.wes2BridgeCase.getQpidHttpPort()); + } + } + + /* + * Write the updated configuration file to its destination. + */ + mapper.defaultPrettyPrintingWriter().writeValue(bw, attributesMap); + } } private void updateQPIDD(String qpidDirectory) diff --git a/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template b/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template index c28ea15b09..cc3584eb11 100644 --- a/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template +++ b/rpms/awips2.core/Installer.ldm/patch/etc/pqact.conf.template @@ -283,8 +283,11 @@ NGRID ^([LM].[EF].{1,3}) (KWBD) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([ # 2.5km CONUS GriddedLAMP # Pattern added by Josh Watson # The noaaportIngester does not yet read a grib2 SBN file with more than one message. -NGRID ^(L...[0-9][0-9]) (KMDL) (..)(..)(..) +# RM 17414 Split out EKDMOS from KMDL pattern +NGRID ^(L[ABCDKLMN]U[ABZ][0-9][0-9]) (KMDL) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/LAMP/GRID184/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H +NGRID ^([LM][EFGH][A-L]Z9[0-9]) (KMDL) (..)(..)(..) + FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/EKDMOS/GRID184/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H NGRID ^(L[CDEF]U.[0-9][0-9]) (KWNO) (..)(..)(..) FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/LAMP/GRID184/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H @@ -358,26 +361,6 @@ NGRID ^(L.QA98) (KWBR) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0 ANY ^([LM].[EF].{1,3}) (KWBS) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*) FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H -# AWIPS1: GRID ^LGXT[0-2][0-9].*KNHC /Grid/SBN/rawGrib2 -# *** This is only be available during an active storm. Verified 20120828 - Hurricane Isaac. - -ANY ^(LGXT[0-2][0-9]) KNHC (..)(..)(..) - FILE -overwrite -log -close -edex /data_store/grib2/(\2:yyyy)(\2:mm)\2/\3/TPC/\3\4Z_SURGE-\1_KNHC_\2\3\4_(seq).grib2.%Y%m%d%H - -# AWIPS1: GRID ^LGXP[0-9][0-9].*KNHC /Grid/SBN/rawGrib2 -# *** This is only be available during an active storm. Verified 20120828 - Hurricane Isaac. - -ANY ^(LGXP[0-9][0-9]) KNHC (..)(..)(..) - FILE -overwrite -log -close -edex /data_store/grib2/(\2:yyyy)(\2:mm)\2/\3/TPC/\3\4Z_SURGE-\1_KNHC_\2\3\4_(seq).grib2.%Y%m%d%H - -# TPCSurge PHISH heights -#ANY ^(L[l-X]X[QP][1-5]0) KNHC (..)(..)(..) -# FILE -overwrite -log -close -edex /data_store/grib2/(\2:yyyy)(\2:mm)\2/\3/TPC/\3\4Z_SURGE-\1_KNHC_\2\3\4_(seq).grib2.%Y%m%d%H - -# TPCSurge PHISH probabilities -#ANY ^(L[H-G]X[A-M][0-2][0-9]) KNHC (..)(..)(..) -# FILE -overwrite -log -close -edex /data_store/grib2/(\2:yyyy)(\2:mm)\2/\3/TPC/\3\4Z_SURGE-\1_KNHC_\2\3\4_(seq).grib2.%Y%m%d%H - # AWIPS1: GRID ^LDIZ11.*KWNS /Grid/SBN/rawGrib2 # LDIZ11 KWNS 180039 !grib2/ncep/0/#202/FHRS//LVL diff --git a/rpms/legal/Master_Rights_File.pdf b/rpms/legal/Master_Rights_File.pdf index 2a9dbe570e..7741a9968e 100644 Binary files a/rpms/legal/Master_Rights_File.pdf and b/rpms/legal/Master_Rights_File.pdf differ