From f2b3fddfe2e0317f0ca765cf825c4eba9157fba5 Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Tue, 19 Mar 2013 14:22:56 -0500 Subject: [PATCH] 13.3.1-9 baseline Former-commit-id: 17276903ed005e17165649f236e6a99afa47b7fb --- .../cave/etc/aviation/python/CCFPMonitor.py | 11 ++- .../cave/etc/menus/upperair/baseAviation.xml | 4 +- .../warngen/text/AbstractLockingBehavior.java | 10 ++- .../warngen/text/FollowUpLockingBehavior.java | 22 ++---- .../viz/warngen/text/ICommonPatterns.java | 3 +- .../raytheon/viz/warngen/util/FipsUtil.java | 2 +- .../viz/warngen/util/FollowUpUtil.java | 59 ++++++++++++-- .../base/warngen/VM_global_library.vm | 3 +- .../warngen/extremeWindWarningFollowup.vm | 6 +- .../warngen/significantWeatherAdvisory.vm | 3 +- .../grid/staticdata/StaticDataGenerator.java | 6 +- .../res/spring/ffmp-ingest.xml | 4 +- .../uf/edex/plugin/ffmp/FFMPGenerator.java | 76 +++++++++++++++++-- .../uf/edex/plugin/grid/dao/GridDao.java | 6 +- 14 files changed, 165 insertions(+), 50 deletions(-) diff --git a/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py b/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py index dcdc42b0cb..84231494ed 100644 --- a/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py +++ b/cave/build/static/common/cave/etc/aviation/python/CCFPMonitor.py @@ -60,6 +60,9 @@ # Status: TEST # Title: AvnFPS: tpo indicator not monitoring properly # +# Date Ticket# Engineer Description +# ------------- ---------- ----------- -------------------------- +# Feb. 21, 2013 15834 zhao Modified for CCFP 8hr data # import logging, time import Avn, AvnLib, Globals, MonitorP @@ -68,10 +71,10 @@ import CCFPData _Logger = logging.getLogger(__name__) _Code = { \ - 'tops': {1: '370+ ', 2: '310-370', 3: '250-310'}, \ - 'gwth': {1: '++', 2: '+ ', 3: 'NC', 4: '- '}, \ + 'tops': {1: '400+ ', 2: '350-390', 3: '300-340', 4: '250-290'}, \ + 'gwth': {1: '+ ', 2: 'NC', 3: '- '}, \ 'conf': {1: 'HIGH', 3: 'LOW'}, \ - 'cvrg': {1: '75-100%', 2: ' 50-74%', 3: ' 25-49%'}, \ + 'cvrg': {1: '75-100%', 2: ' 40-74%', 3: ' 25-39%'}, \ } ############################################################################## @@ -82,7 +85,7 @@ class Monitor(MonitorP.Monitor): def __makeData(self, data): # 6 hour forecast tstart = (time.time()//3600.0 + 1) * 3600.0 - tend = tstart + 7*3600.0 - 10.0 + tend = tstart + 9*3600.0 - 10.0 seq = [{'time': t} for t in Avn.frange(tstart, tend, 3600.0)] fcst, text = {}, [] try: diff --git a/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml b/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml index b99b8e6866..a6ac6b05ab 100644 --- a/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml +++ b/cave/build/static/common/cave/etc/menus/upperair/baseAviation.xml @@ -25,7 +25,9 @@ menuText="Convective SIGMET" id="ConvSigmet"> /convsigmet/% - + + /bufrncwf/% + diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java index 8379232b92..b9149a023e 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java @@ -53,6 +53,7 @@ import com.raytheon.viz.warngen.gis.AffectedAreas; * moved the following methods from InitialLockingBehavior to this class: * bulletIndices(), header(), firstBullet(), secondBullet(), getImmediateCausesPtrn(); * updated body(), header(), and secondBullet(); + * Mar 13, 2013 DR 15892 D. Friedman Fix bullet parsing. * * * @@ -141,10 +142,13 @@ abstract public class AbstractLockingBehavior implements ICommonPatterns { private Integer[] bulletIndices() { List bulletIndices = new ArrayList(); - int index = text.indexOf("* "); + /* Assumes first line cannot be a bullet and that the '*' is + * at the start of a line. + */ + int index = text.indexOf("\n* "); while (index >= 0) { - bulletIndices.add(index); - index = text.indexOf("* ", index + 2); + bulletIndices.add(index + 1); + index = text.indexOf("\n* ", index + 3); } return bulletIndices.toArray(new Integer[bulletIndices.size()]); diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/FollowUpLockingBehavior.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/FollowUpLockingBehavior.java index a2783bc14c..029573a5b0 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/FollowUpLockingBehavior.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/FollowUpLockingBehavior.java @@ -39,6 +39,8 @@ import com.raytheon.viz.warngen.gis.AffectedAreas; * ------------ ---------- ----------- -------------------------- * Sep 24, 2012 15322 jsanchez Initial creation * Jan 8, 2013 15664 Qinglu Lin Updated body(). + * Mar 13, 2013 15892 D. Friedman Fix headline locking. Do not + * lock "AND" or "FOR". * * * @@ -51,10 +53,8 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior { */ @Override public void body() { - if (action != WarningAction.COR) - headlines(); - else - super.body(); + headlines(); + super.body(); } /** @@ -66,7 +66,7 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior { // should be blank. Pattern headlinePtrn = Pattern .compile( - "^\\.\\.\\.(A|THE) (.*) (WARNING|ADVISORY) .*(REMAINS|EXPIRE|CANCELLED).*(\\.\\.\\.)$", + "^\\.\\.\\.(AN?|THE) (.*) (WARNING|ADVISORY) .*(REMAINS|EXPIRE|CANCELLED).*(\\.\\.\\.)$", Pattern.MULTILINE); Matcher m = headlinePtrn.matcher(text); @@ -187,16 +187,8 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior { + LOCK_START + "..." + LOCK_END; } // Locks warning type (i.e. SEVERE THUNDERSTORM) - headline = headline.replaceAll("(A|THE) (" + warningType + ")", - LOCK_START + "$0" + LOCK_END); - - // Locks the 'FOR' in the headline - headline = headline.replaceFirst(" FOR ", " " + LOCK_START + "FOR" - + LOCK_END + " "); - - // Locks the 'AND' in the headline - headline = headline.replaceFirst(" AND ", " " + LOCK_START + "AND" - + LOCK_END + " "); + headline = headline.replaceAll("(AN?|THE)( [\\w\\s]*?)(" + warningType + ")", + LOCK_START + "$1" + LOCK_END + "$2" + LOCK_START + "$3" + LOCK_END); return headline; } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/ICommonPatterns.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/ICommonPatterns.java index 233810cd35..d56d3b0f2b 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/ICommonPatterns.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/ICommonPatterns.java @@ -32,6 +32,7 @@ import java.util.regex.Pattern; * ------------ ---------- ----------- -------------------------- * Sep 24, 2012 15332 jsanchez Initial creation * Oct 18, 2012 15332 jsanchez Replaced listOfAreaNamesPtrn with String pattern. + * Mar 13, 2013 DR 15892 D. Friedman Allow some punctuation in area names. * * * @@ -55,7 +56,7 @@ public interface ICommonPatterns { // LOCK_END can be added at the start of the line if a previous line has // been locked. public static final String listOfAreaName = "^((" + LOCK_END - + "){0,1}(((\\w+\\s{1})+\\w{2}-)*((\\w+\\s{1})+\\w{2}-)))"; + + "){0,1}((([\\?\\(\\)\\w\\.,/'-]+\\s{1})+\\w{2}-)*(([\\?\\(\\)\\w\\.,/'-]+\\s{1})+\\w{2}-)))"; // LOCK_END should not be found at the beginning of a first bullet since the // previous line should be blank. diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FipsUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FipsUtil.java index 9f608b8cfa..520034ecf9 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FipsUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FipsUtil.java @@ -340,7 +340,7 @@ public class FipsUtil { * @param fips * @return */ - private static ArrayList getListCounties(String fips) { + public static ArrayList getListCounties(String fips) { ArrayList rval = new ArrayList(); String matchStr = ""; diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java index 600c60c2de..e1e9949106 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/FollowUpUtil.java @@ -28,6 +28,7 @@ import com.raytheon.viz.warngen.text.ICommonPatterns; * ------------ ---------- ----------- -------------------------- * Jul 22, 2008 #1284 bwoodle Initial creation * Oct 18, 2012 15332 jsanchez Fixed refactor bugs. + * Mar 13, 2013 DR 15892 D. Friedman Handle SMW format in canceledAreasFromText * * * @@ -43,6 +44,8 @@ public class FollowUpUtil { public static final Pattern vtecPtrn = Pattern .compile("/[OTEX]\\.([A-Z]{3})\\.[A-Za-z0-9]{4}\\.[A-Z]{2}\\.[WAYSFON]\\.\\d{4}\\.\\d{6}T\\d{4}Z-\\d{6}T\\d{4}Z/"); + private static final String SMW_CANCELED_AREAS_HEADER = "THE AFFECTED AREAS WERE..."; + /** * This method checks whether a particular followup should be available * given a Warning Record, a vtec Action, and a template configuration @@ -173,7 +176,8 @@ public class FollowUpUtil { String headline = ""; Pattern listOfAreaNamePtrn = Pattern .compile(ICommonPatterns.listOfAreaName); - for (String line : originalText.trim().split("\n")) { + String[] splitLines = originalText.trim().split("\n"); + for (String line : splitLines) { if (line.contains("TEST") || line.trim().length() == 0) { continue; } @@ -198,8 +202,15 @@ public class FollowUpUtil { headline += line; } } - String[] ugcs = ugcLine.split("-"); - String[] names = namesLine.split("-"); + String[] ugcs = FipsUtil.getListCounties(ugcLine).toArray(new String[0]); + String[] names; + boolean smwAreas = false; + if (namesLine.length() > 0) + names = namesLine.split("-"); + else { + names = parseSMWCanceledAreas(splitLines); + smwAreas = true; + } String[] areas = headline.split("\\.\\.\\."); ArrayList al = new ArrayList(); @@ -222,13 +233,21 @@ public class FollowUpUtil { areasNotation = "COUNTIES"; } } + + if (ugc.length() < 3) + continue; // TODO: log? fips = ugc.substring(ugc.length() - 3); if (i < names.length) { - name = names[i].substring(0, names[i].length() - 3); - stateAbbreviation = names[i].substring(names[i].length() - 2); - } + if (!smwAreas && names[i].length() >= 3) { + name = names[i].substring(0, names[i].length() - 3); + stateAbbreviation = names[i].substring(names[i].length() - 2); + } else { + name = names[i]; + } + } else + break; if (name != null) { for (String area : areas) { @@ -334,4 +353,32 @@ public class FollowUpUtil { return rval; } + + /** Parses the canceled areas of an SMW, which have a different format + * from other products. + */ + private static String[] parseSMWCanceledAreas(String[] splitLines) { + StringBuilder text = new StringBuilder(64); + boolean inAreas = false; + for (String line : splitLines) { + String trimmedLine = line.trim(); + if (SMW_CANCELED_AREAS_HEADER.equals(trimmedLine)) + inAreas = true; + else if (inAreas) { + if (trimmedLine.length() > 0) { + text.append(trimmedLine); + text.append('\n'); + } else + break; + } + } + int len = text.length(); + if (len >= 4 && "...\n".equals(text.substring(len - 4))) + text.delete(len - 4, len); + String[] areas = text.toString().split("\\.\\.\\.\\n"); + // Unwrap lines. + for (int i = 0; i < areas.length; ++i) + areas[i] = areas[i].replace("\n", " "); + return areas; + } } diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/VM_global_library.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/VM_global_library.vm index 1ada94dece..1a2cc5eb84 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/VM_global_library.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/VM_global_library.vm @@ -5,6 +5,7 @@ ##### Qinglu Lin 08-13-2012 DR 14493. Use corToNewMarker and corEventtime. ##### D. Friedman 11-09-2012 DR 15430. Rework included watches. ##### QINGLU LIN 12-27-2012 DR 15594. Added $lock to headlineLocList. +##### D. Friedman 03-13-2013 DR 15892. Do not lock portion of state in firstBullet. #################################################################################################### Mile Marker Test Code macro "mmarkers" use (called out of VM_global_library.vm): @@ -750,7 +751,7 @@ THE ${area.name}## #if(${intFIPS.parseInt($FIPS)} < 500 || ${area.stateabbr} == "TX") ${area.name} ${area.areaNotation} IN #areaFormat(${area.partOfParentRegion} true false) ${area.parentRegion}... #else -${area.name} IN #areaFormat(${area.partOfParentRegion} true false) ${area.parentRegion}... +${area.name} IN #areaFormat(${area.partOfParentRegion} true false) ${area.parentRegion}... #end #end ## COMMENTED OUT 5 LINES BELOW THIS IS GENERALLY NOT UTILIZED - you can unREMARK if desired diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm index f50dd40412..58862f7b0d 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm @@ -4,6 +4,7 @@ ## Evan Bookbinder 4-25-2012 for OB 12.3.1 (corText) ## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad ## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list. +## D. Friedman 03-13-2013 DR 15892. Use printcoords. ################################################ ## ### CREATE PHRASING DEPENDING ON WHETHER WE ISSUE EXP PRIOR TO EXPIRATION TIME OR NOT @@ -482,10 +483,7 @@ THIS IS A TEST MESSAGE.## THIS IS A TEST MESSAGE. DO NOT TAKE ACTION BASED ON THIS MESSAGE. #end -LAT...LON ## -#foreach(${coord} in ${areaPoly}) -#llFormat(${coord.y}) #llFormat(${coord.x}) ## -#end +#printcoords(${areaPoly}, ${list}) TIME...MOT...LOC ## ${dateUtil.format(${event}, ${timeFormat.time})}Z ## diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm index bfab17d4a0..afb5392f3f 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm @@ -8,6 +8,7 @@ ## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND) ## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad ## ## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list. +## D. Friemdan 13-03-2013 DR 15892. Do not lock locations in headline. ###################################################### ## ##SET SOME INITIAL VARIABLES @@ -120,7 +121,7 @@ THIS IS A TEST MESSAGE. ## #end #if(${windSpeed} >= 40 || ${hailSize} >= 0.70) ...SIGNIFICANT WEATHER ADVISORY FOR ## -#headlineLocList(${areas} true false true false true) #secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone}) +#headlineLocList(${areas} true false true false false) #secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone}) ...## #elseif(${windSpeed} == 0 && ${hailSize} == 0) !** YOU DID NOT SELECT ANY WIND OR HAIL THREATS. PLEASE RE-GENERATE THIS ADVISORY **! diff --git a/edexOsgi/com.raytheon.uf.edex.grid.staticdata/src/com/raytheon/uf/edex/grid/staticdata/StaticDataGenerator.java b/edexOsgi/com.raytheon.uf.edex.grid.staticdata/src/com/raytheon/uf/edex/grid/staticdata/StaticDataGenerator.java index 34a84c3e95..6a683aeedc 100644 --- a/edexOsgi/com.raytheon.uf.edex.grid.staticdata/src/com/raytheon/uf/edex/grid/staticdata/StaticDataGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.grid.staticdata/src/com/raytheon/uf/edex/grid/staticdata/StaticDataGenerator.java @@ -70,6 +70,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * ------------ ---------- ----------- -------------------------- * Dec 3, 2010 rjpeter Initial creation * Mar 07, 2013 1587 bsteffen rewrite static data generation. + * Mar 14, 2013 1587 bsteffen Fix persisting to datastore. * * * @@ -267,7 +268,7 @@ public class StaticDataGenerator { for (GridRecord staticRecord : datastoreRecords) { populateMessageData(staticRecord); } - dao.persistToHDF5(databaseRecords.toArray(new PluginDataObject[0])); + dao.persistToHDF5(datastoreRecords.toArray(new PluginDataObject[0])); } if (!databaseRecords.isEmpty()) { dao.persistToDatabase(databaseRecords @@ -423,7 +424,8 @@ public class StaticDataGenerator { datasets = Collections.emptyList(); } } - if (datasets.contains(missing)) { + if (!datasets.contains(staticRecord.getParameter() + .getAbbreviation())) { missing.add(staticRecord); } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml index e768457d1a..8092b1e020 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/res/spring/ffmp-ingest.xml @@ -8,8 +8,8 @@ - - + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java index 1f7c5eafae..d0b998e13e 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java @@ -118,6 +118,7 @@ import com.raytheon.uf.edex.plugin.ffmp.common.FFTIRatioDiff; * 07/31/2011 578 dhladky FFTI modifications * 01/27/13 1478 D. Hladky Added creation of full cache records to help read write stress on NAS * 02/25/13 1660 D. Hladky Redesigned data flow for FFTI in order to have only one mosaic piece in memory at a time. + * 03/13/13 1478 D. Hladky non-FFTI mosaic containers weren't getting ejected. Made it so that they are ejected after processing as well. * * * @author dhladky @@ -701,18 +702,47 @@ public class FFMPGenerator extends CompositeProductGenerator implements fftiSources.add(ffmp.getFFTISource()); ffti.processFFTI(); } - - // Do the accumulation now, more memory efficient. + + // Do the accumulation now, more memory efficient. // Only one piece in memory at a time - for (String attribute: ffmp.getAttributes()) { - if (attribute.equals(ATTRIBUTE.ACCUM.getAttribute())) { - FFTIAccum accum = getAccumulationForSite(ffmpProduct.getDisplayName(), siteKey, dataKey, fftiSource.getDurationHour(), ffmpProduct.getUnit(siteKey)); - if (statusHandler.isPriorityEnabled(Priority.DEBUG)) { - statusHandler.debug("Accumulating FFTI for source: "+ffmpProduct.getDisplayName()+" site: "+siteKey+" data: "+dataKey+" duration: "+fftiSource.getDurationHour()+ " accumulation: "+accum.getAccumulation()); + for (String attribute : ffmp.getAttributes()) { + if (attribute.equals(ATTRIBUTE.ACCUM + .getAttribute())) { + FFTIAccum accum = getAccumulationForSite( + ffmpProduct.getDisplayName(), + siteKey, dataKey, + fftiSource.getDurationHour(), + ffmpProduct.getUnit(siteKey)); + if (statusHandler + .isPriorityEnabled(Priority.DEBUG)) { + statusHandler + .debug("Accumulating FFTI for source: " + + ffmpProduct + .getDisplayName() + + " site: " + + siteKey + + " data: " + + dataKey + + " duration: " + + fftiSource + .getDurationHour() + + " accumulation: " + + accum.getAccumulation()); } - } + } } } + + SourceXML source = getSourceConfig().getSource( + ffmpRec.getSourceName()); + + if (!source.getSourceType().equals( + SOURCE_TYPE.GUIDANCE.getSourceType())) { + String sourceSiteDataKey = getSourceSiteDataKey(source, + dataKey, ffmpRec); + ffmpData.remove(sourceSiteDataKey); + statusHandler.info("Removing from memory: "+sourceSiteDataKey); + } } } } @@ -1919,6 +1949,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements } ffmpData.remove(siteDataKey); + statusHandler.info("Removing from memory: "+siteDataKey); accumulator.setReset(false); writeFFTIData(siteDataKey, accumulator); } @@ -2069,6 +2100,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements // replace or insert it ffmpData.remove(qpeSiteSourceDataKey); + statusHandler.info("Removing from memory: "+qpeSiteSourceDataKey); values.setReset(false); writeFFTIData(siteDataKey, values); } @@ -2102,5 +2134,33 @@ public class FFMPGenerator extends CompositeProductGenerator implements } } + + + /** + * Find siteSourceDataKey + * + * @param source + * @param dataKey + * @param ffmpRec + * @return + */ + private String getSourceSiteDataKey(SourceXML source, String dataKey, FFMPRecord ffmpRec) { + + String sourceName = source.getSourceName(); + String sourceSiteDataKey = null; + + if (source.getSourceType().equals( + SOURCE_TYPE.GUIDANCE.getSourceType())) { + sourceName = source.getDisplayName(); + sourceSiteDataKey = sourceName; + + } else { + sourceName = ffmpRec.getSourceName(); + sourceSiteDataKey = sourceName + "-" + ffmpRec.getSiteKey() + + "-" + dataKey; + } + + return sourceSiteDataKey; + } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java b/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java index 3beb5c4ad9..2b58fb81de 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.grid/src/com/raytheon/uf/edex/plugin/grid/dao/GridDao.java @@ -66,6 +66,7 @@ import com.raytheon.uf.edex.database.plugin.PluginDao; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 4/7/09 1994 bphillip Initial Creation + * Mar 14, 2013 1587 bsteffen Fix static data persisting to datastore. * * * @@ -99,10 +100,13 @@ public class GridDao extends PluginDao { long[] sizes = new long[] { location.getNx(), location.getNy() }; String abbrev = gridRec.getParameter().getAbbreviation(); String group = gridRec.getDataURI(); + String datasetName = "Data"; if (GridPathProvider.STATIC_PARAMETERS.contains(abbrev)) { group = "/" + location.getId(); + datasetName = abbrev; } - AbstractStorageRecord storageRecord = new FloatDataRecord("Data", + AbstractStorageRecord storageRecord = new FloatDataRecord( + datasetName, group, (float[]) messageData, 2, sizes); storageRecord.setCorrelationObject(gridRec);