13.5.1-8 baseline

Former-commit-id: dfbf9a5afe [formerly 37504305d70e6aaf6a7bdfad8267054af0612515]
Former-commit-id: 3bece5e5d0
This commit is contained in:
Steve Harris 2013-07-26 09:02:34 -04:00
parent 630705aa3f
commit 392faf86e7
62 changed files with 263917 additions and 132112 deletions

View file

@ -56,6 +56,10 @@
</and> </and>
</condition> </condition>
<condition property="cots.dir" value="${basedir}/.." else="${basedir}/../../cots">
<available file="${basedir}/../org.springframework" />
</condition>
<!-- Set default EDEX install location for copy filter --> <!-- Set default EDEX install location for copy filter -->
<property name="def.edex.install.dir" value="/awips" /> <property name="def.edex.install.dir" value="/awips" />
<condition property="edex.home" value="$EdexBaseDir" else="${def.edex.install.dir}"> <condition property="edex.home" value="$EdexBaseDir" else="${def.edex.install.dir}">
@ -117,23 +121,23 @@
</chmod> </chmod>
<copy todir="${deploy.dir}/lib" flatten="true"> <copy todir="${deploy.dir}/lib" flatten="true">
<fileset dir="../org.apache.activemq" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.activemq" includes="**/*.jar" />
<fileset dir="../org.apache.qpid" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.qpid" includes="**/*.jar" />
<fileset dir="../org.slf4j" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.slf4j" includes="**/*.jar" />
<fileset dir="../org.apache.commons.beanutils" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.commons.beanutils" includes="**/*.jar" />
<fileset dir="../org.apache.commons.codec" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.commons.codec" includes="**/*.jar" />
<fileset dir="../org.apache.commons.collections" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.commons.collections" includes="**/*.jar" />
<fileset dir="../org.apache.commons.lang" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.commons.lang" includes="**/*.jar" />
<fileset dir="../org.apache.commons.logging" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.commons.logging" includes="**/*.jar" />
<fileset dir="../org.apache.mina" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.mina" includes="**/*.jar" />
<fileset dir="../org.apache.log4j" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.apache.log4j" includes="**/*.jar" />
<fileset dir="../javax.jms" includes="**/*.jar" /> <fileset dir="${cots.dir}/javax.jms" includes="**/*.jar" />
<fileset dir="../org.springframework"> <fileset dir="${cots.dir}/org.springframework">
<include name="**/spring-beans*.jar" /> <include name="**/*spring*beans*.jar" />
<include name="**/spring-context*.jar" /> <include name="**/*spring*context*.jar" />
<include name="**/quartz-all*.jar" />
</fileset> </fileset>
<fileset dir="../org.itadaki.bzip2" includes="**/*.jar" /> <fileset dir="${cots.dir}/org.itadaki.bzip2" includes="**/*.jar" />
<fileset dir="${cots.dir}/org.quartz" includes="**/*.jar" />
</copy> </copy>
<delete dir="bin" /> <delete dir="bin" />

File diff suppressed because it is too large Load diff

View file

@ -11,12 +11,13 @@
Modify: Modify:
06/14/2013 Xiaochuan DR 15733 Initial creation 06/14/2013 Xiaochuan DR 15733 Initial creation
07/18/2013 B. Hebbard per G. Hull DR 15733 Update highlightBG & FG
--> -->
<textColorsCfg> <textColorsCfg>
<TextColorElement paramName="textBG" color="255, 255, 255"/> <TextColorElement paramName="textBG" color="255, 255, 255"/>
<TextColorElement paramName="textFG" color="0, 0,0"/> <TextColorElement paramName="textFG" color="0, 0,0"/>
<TextColorElement paramName="highlightBG" color="RED"/> <TextColorElement paramName="highlightBG" color="85, 152, 215"/>
<TextColorElement paramName="highlightFG" color="BLACK"/> <TextColorElement paramName="highlightFG" color="255, 255, 255"/>
</textColorsCfg> </textColorsCfg>

View file

@ -25,8 +25,8 @@
<path <path
application="Archive" application="Archive"
localizationType="COMMON_STATIC" localizationType="COMMON_STATIC"
name="Archive" name="Configuration"
value="archive" value="archiver/purger"
recursive="false" recursive="false"
extensionFilter=".xml"> extensionFilter=".xml">
</path> </path>

View file

@ -279,7 +279,6 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
Job job = new Job("setup") { Job job = new Job("setup") {
@Override @Override
protected IStatus run(IProgressMonitor monitor) { protected IStatus run(IProgressMonitor monitor) {
ArchiveConfigManager.getInstance().reset();
if (!shell.isDisposed()) { if (!shell.isDisposed()) {
VizApp.runAsync(new Runnable() { VizApp.runAsync(new Runnable() {
@ -555,4 +554,16 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
protected void removeModifiedListener(IModifyListener iModifyListener) { protected void removeModifiedListener(IModifyListener iModifyListener) {
tableComp.removeModifiedListener(iModifyListener); tableComp.removeModifiedListener(iModifyListener);
} }
/*
* (non-Javadoc)
*
* @see
* com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org
* .eclipse.swt.widgets.Shell)
*/
@Override
protected void initializeComponents(Shell shell) {
ArchiveConfigManager.getInstance().reset();
}
} }

View file

@ -119,6 +119,7 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg implements
*/ */
@Override @Override
protected void initializeComponents(Shell shell) { protected void initializeComponents(Shell shell) {
super.initializeComponents(shell);
setText("Archive Retention"); setText("Archive Retention");
Composite mainComp = new Composite(shell, SWT.NONE); Composite mainComp = new Composite(shell, SWT.NONE);
GridLayout gl = new GridLayout(1, false); GridLayout gl = new GridLayout(1, false);
@ -126,8 +127,6 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg implements
gl.marginWidth = 0; gl.marginWidth = 0;
gl.horizontalSpacing = 0; gl.horizontalSpacing = 0;
mainComp.setLayout(gl); mainComp.setLayout(gl);
ArchiveConfigManager.getInstance().reset();
init(); init();
} }

View file

@ -48,7 +48,6 @@ import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Spinner; import org.eclipse.swt.widgets.Spinner;
import com.raytheon.uf.common.archive.config.ArchiveConfigManager;
import com.raytheon.uf.common.archive.config.DisplayData; import com.raytheon.uf.common.archive.config.DisplayData;
import com.raytheon.uf.common.time.util.TimeUtil; import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.SizeUtil; import com.raytheon.uf.common.util.SizeUtil;
@ -136,9 +135,6 @@ public class CaseCreationDlg extends AbstractArchiveDlg implements
private SimpleDateFormat dateFmt = new SimpleDateFormat( private SimpleDateFormat dateFmt = new SimpleDateFormat(
"E MMM dd yyyy HH:00 z"); "E MMM dd yyyy HH:00 z");
/** Archive configuration manager */
private ArchiveConfigManager manager = ArchiveConfigManager.getInstance();
/** Number of selected items. */ /** Number of selected items. */
private int selectedItemsSize = 0; private int selectedItemsSize = 0;
@ -179,6 +175,7 @@ public class CaseCreationDlg extends AbstractArchiveDlg implements
*/ */
@Override @Override
protected void initializeComponents(Shell shell) { protected void initializeComponents(Shell shell) {
super.initializeComponents(shell);
setText("Archive Case Creation"); setText("Archive Case Creation");
Composite mainComp = new Composite(shell, SWT.NONE); Composite mainComp = new Composite(shell, SWT.NONE);
GridLayout gl = new GridLayout(1, false); GridLayout gl = new GridLayout(1, false);
@ -186,9 +183,6 @@ public class CaseCreationDlg extends AbstractArchiveDlg implements
gl.marginWidth = 0; gl.marginWidth = 0;
gl.horizontalSpacing = 0; gl.horizontalSpacing = 0;
mainComp.setLayout(gl); mainComp.setLayout(gl);
manager.reset();
init(); init();
} }

View file

@ -27,6 +27,8 @@ import java.util.Map;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.viz.core.catalog.LayerProperty; import com.raytheon.uf.viz.core.catalog.LayerProperty;
import com.raytheon.uf.viz.core.catalog.ScriptCreator; import com.raytheon.uf.viz.core.catalog.ScriptCreator;
@ -50,6 +52,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceType;
* Aug 13, 2007 chammack Initial Creation. * Aug 13, 2007 chammack Initial Creation.
* Dec 03, 2007 461 bphillip Modified Time Matching to use VizTim * Dec 03, 2007 461 bphillip Modified Time Matching to use VizTim
* Aug 19, 2009 2586 rjpeter Updated error handling. * Aug 19, 2009 2586 rjpeter Updated error handling.
* Jul 05, 2013 1869 bsteffen Fix goes sounding updates.
* </pre> * </pre>
* *
* @author chammack * @author chammack
@ -155,8 +158,13 @@ public class Loader {
"Map must contain a datauri and plugin name"); "Map must contain a datauri and plugin name");
} }
vals.put(DATAURI_COLUMN, new RequestConstraint(obj.get(DATAURI_COLUMN) try {
.toString())); vals.putAll(RequestConstraint.toConstraintMapping(DataURIUtil
.createDataURIMap(obj.get(DATAURI_COLUMN).toString())));
} catch (PluginException e) {
throw new VizException(e);
}
vals.put(PLUGINNAME_COLUMN, new RequestConstraint(obj.get( vals.put(PLUGINNAME_COLUMN, new RequestConstraint(obj.get(
PLUGINNAME_COLUMN).toString())); PLUGINNAME_COLUMN).toString()));
lp.setDesiredProduct(ResourceType.PLAN_VIEW); lp.setDesiredProduct(ResourceType.PLAN_VIEW);

View file

@ -99,6 +99,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription. * May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
* Jun 04, 2013 223 mpduff Added grid specific items to this class. * Jun 04, 2013 223 mpduff Added grid specific items to this class.
* Jun 11, 2013 2064 mpduff Fix editing of subscriptions. * Jun 11, 2013 2064 mpduff Fix editing of subscriptions.
* Jul 18, 2013 2205 djohnson If null time is selected from the dialog, return null for the adhoc.
* *
* *
* </pre> * </pre>
@ -607,6 +608,9 @@ public class GriddedSubsetManagerDlg
if (sub instanceof AdhocSubscription) { if (sub instanceof AdhocSubscription) {
newTime = setupDataSpecificTime(newTime, sub); newTime = setupDataSpecificTime(newTime, sub);
if (newTime == null) {
return null;
}
sub.setTime(newTime); sub.setTime(newTime);
} else if (!create) { } else if (!create) {
Time time = sub.getTime(); Time time = sub.getTime();

View file

@ -98,6 +98,7 @@ import com.raytheon.uf.viz.monitor.listeners.IMonitorListener;
* Jun 06, 2013 2075 njensen No longer starts loading threads, resourceData does that * Jun 06, 2013 2075 njensen No longer starts loading threads, resourceData does that
* Jun 07, 2013 2075 njensen Extracted FFMPProcessUris to separate class * Jun 07, 2013 2075 njensen Extracted FFMPProcessUris to separate class
* Jul 09, 2013 2152 njensen Synchronize uri requests to avoid duplicating effort * Jul 09, 2013 2152 njensen Synchronize uri requests to avoid duplicating effort
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -294,11 +295,10 @@ public class FFMPMonitor extends ResourceMonitor {
* @param phuc * @param phuc
* @return * @return
*/ */
protected List<String> getLoadedUris(String siteKey, String source, protected List<String> getLoadedUris(String siteKey, String source) {
String phuc) {
FFMPSiteData siteData = siteDataMap.get(siteKey); FFMPSiteData siteData = siteDataMap.get(siteKey);
FFMPSourceData sourceData = siteData.getSourceData(source); FFMPSourceData sourceData = siteData.getSourceData(source);
return sourceData.getLoadedUris(phuc); return sourceData.getLoadedUris();
} }
/** /**
@ -311,7 +311,7 @@ public class FFMPMonitor extends ResourceMonitor {
* @throws VizException * @throws VizException
*/ */
public void populateFFMPRecord(String siteKey, String dataKey, public void populateFFMPRecord(String siteKey, String dataKey,
String source, Date ptime, String phuc, boolean retrieveNew) { String source, Date ptime, boolean retrieveNew) {
if (source != null) { if (source != null) {
boolean dupOverride = false; boolean dupOverride = false;
@ -328,11 +328,11 @@ public class FFMPMonitor extends ResourceMonitor {
for (String uri : uris) { for (String uri : uris) {
if (uri != null) { if (uri != null) {
if (dupOverride if (dupOverride
|| !getLoadedUris(siteKey, source, phuc) || !getLoadedUris(siteKey, source)
.contains(uri)) { .contains(uri)) {
try { try {
populateFFMPRecord(siteKey, new FFMPRecord( populateFFMPRecord(siteKey, new FFMPRecord(
uri), source, phuc); uri), source);
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, statusHandler.handle(Priority.PROBLEM,
"FFMP Can't retrieve FFMP URI, " "FFMP Can't retrieve FFMP URI, "
@ -356,10 +356,10 @@ public class FFMPMonitor extends ResourceMonitor {
* @throws VizException * @throws VizException
*/ */
public FFMPRecord populateFFMPRecord(String uri, String siteKey, public FFMPRecord populateFFMPRecord(String uri, String siteKey,
String source, String phuc) throws Exception { String source) throws Exception {
try { try {
populateFFMPRecord(siteKey, new FFMPRecord(uri), source, phuc); populateFFMPRecord(siteKey, new FFMPRecord(uri), source);
} catch (VizException e) { } catch (VizException e) {
statusHandler.handle(Priority.INFO, statusHandler.handle(Priority.INFO,
"FFMP Can't retrieve FFMP URI, " + uri, e); "FFMP Can't retrieve FFMP URI, " + uri, e);
@ -390,8 +390,6 @@ public class FFMPMonitor extends ResourceMonitor {
FFMPRecord curRecord = sourceData.getRecord(); FFMPRecord curRecord = sourceData.getRecord();
if (curRecord == null) { if (curRecord == null) {
// add each huc requested
for (String huc : data.getBasinsMap().keySet()) {
// add all of the uris // add all of the uris
for (Entry<Date, List<String>> duris : uris.entrySet()) { for (Entry<Date, List<String>> duris : uris.entrySet()) {
if (data.getTimes().contains(duris.getKey().getTime())) { if (data.getTimes().contains(duris.getKey().getTime())) {
@ -400,21 +398,18 @@ public class FFMPMonitor extends ResourceMonitor {
curRecord = new FFMPRecord(uri); curRecord = new FFMPRecord(uri);
sourceData.setRecord(curRecord); sourceData.setRecord(curRecord);
} }
sourceData.addLoadedUri(huc, uri); sourceData.addLoadedUri(uri);
}
} }
} }
} }
} }
if (curRecord != null) { if (curRecord != null) {
for (Entry<String, FFMPBasinData> entry : data.getBasinsMap()
.entrySet()) {
FFMPBasinData basinData = entry.getValue(); FFMPBasinData basinData = data.getBasins();
basinData.populate(data.getTimes()); basinData.populate(data.getTimes());
curRecord.populate(basinData, entry.getKey()); curRecord.populate(basinData);
}
} }
} }
@ -425,13 +420,13 @@ public class FFMPMonitor extends ResourceMonitor {
* @param siteKey * @param siteKey
* @param ffmpRec * @param ffmpRec
* @param source * @param source
* @param phuc *
* @throws Exception * @throws Exception
*/ */
public void populateFFMPRecord(String siteKey, FFMPRecord ffmpRec, public void populateFFMPRecord(String siteKey, FFMPRecord ffmpRec,
String source, String phuc) throws Exception { String source) throws Exception {
FFMPLoadRecord flr = new FFMPLoadRecord(siteKey, ffmpRec, source, phuc); FFMPLoadRecord flr = new FFMPLoadRecord(siteKey, ffmpRec, source);
flr.run(); flr.run();
} }
@ -449,12 +444,12 @@ public class FFMPMonitor extends ResourceMonitor {
String source, String phuc, FFMPBasin basin) throws VizException { String source, String phuc, FFMPBasin basin) throws VizException {
if (dataUri != null) { if (dataUri != null) {
List<String> uris = getLoadedUris(siteKey, source, phuc); List<String> uris = getLoadedUris(siteKey, source);
if (!uris.contains(dataUri)) { if (!uris.contains(dataUri)) {
try { try {
SourceXML sourceXML = fscm.getSource(source); SourceXML sourceXML = fscm.getSource(source);
FFMPRecord ffmpRec = populateFFMPRecord(dataUri, siteKey, FFMPRecord ffmpRec = populateFFMPRecord(dataUri, siteKey,
source, phuc); source);
File loc = HDF5Util.findHDF5Location(ffmpRec); File loc = HDF5Util.findHDF5Location(ffmpRec);
IDataStore dataStore = DataStoreFactory.getDataStore(loc); IDataStore dataStore = DataStoreFactory.getDataStore(loc);
@ -712,14 +707,12 @@ public class FFMPMonitor extends ResourceMonitor {
* *
*/ */
public FFMPRecord getFFMPData(ProductXML product, String siteKey, public FFMPRecord getFFMPData(ProductXML product, String siteKey,
String dataKey, String sourceName, Date ptime, String phuc, String dataKey, String sourceName, Date ptime, boolean retrieveNew) {
boolean retrieveNew) {
FFMPRecord record = siteDataMap.get(siteKey).getSourceData(sourceName) FFMPRecord record = siteDataMap.get(siteKey).getSourceData(sourceName)
.getRecord(); .getRecord();
if ((record != null) if ((record != null) && (record.getBasinData().getBasins().size() > 0)) {
&& (record.getBasinData(phuc).getBasins().size() > 0)) {
SourceXML sourceXML = getSourceConfig().getSource(sourceName); SourceXML sourceXML = getSourceConfig().getSource(sourceName);
@ -745,8 +738,7 @@ public class FFMPMonitor extends ResourceMonitor {
continue; continue;
} else { } else {
populateFFMPRecord(siteKey, dataKey, populateFFMPRecord(siteKey, dataKey,
source.getSourceName(), ptime, phuc, source.getSourceName(), ptime, retrieveNew);
retrieveNew);
} }
} }
} else { } else {
@ -754,7 +746,7 @@ public class FFMPMonitor extends ResourceMonitor {
if (!siteDataMap.get(siteKey).getSourceData(sourceName) if (!siteDataMap.get(siteKey).getSourceData(sourceName)
.hasLoadedAnyUris()) { .hasLoadedAnyUris()) {
populateFFMPRecord(siteKey, dataKey, sourceName, ptime, populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
phuc, retrieveNew); retrieveNew);
} }
} }
@ -762,7 +754,7 @@ public class FFMPMonitor extends ResourceMonitor {
.getRecord(); .getRecord();
} else { } else {
populateFFMPRecord(siteKey, dataKey, sourceName, ptime, phuc, populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
retrieveNew); retrieveNew);
} }
@ -789,17 +781,17 @@ public class FFMPMonitor extends ResourceMonitor {
.getGuidanceSources(product, guidSrc)) { .getGuidanceSources(product, guidSrc)) {
populateFFMPRecord(siteKey, dataKey, populateFFMPRecord(siteKey, dataKey,
ffgSource.getSourceName(), ptime, phuc, ffgSource.getSourceName(), ptime,
retrieveNew); retrieveNew);
} }
} else { } else {
populateFFMPRecord(siteKey, dataKey, sourceName, populateFFMPRecord(siteKey, dataKey, sourceName,
ptime, phuc, retrieveNew); ptime, retrieveNew);
} }
} }
} else { } else {
populateFFMPRecord(siteKey, dataKey, sourceName, ptime, populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
phuc, retrieveNew); retrieveNew);
} }
} else { } else {
// special case where FFG is the primary source // special case where FFG is the primary source
@ -813,7 +805,7 @@ public class FFMPMonitor extends ResourceMonitor {
sourceName = sourcexml.getDisplayName(); sourceName = sourcexml.getDisplayName();
} else { } else {
populateFFMPRecord(siteKey, dataKey, sourceName, ptime, populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
phuc, retrieveNew); retrieveNew);
} }
} }
@ -1068,20 +1060,18 @@ public class FFMPMonitor extends ResourceMonitor {
* Get the pertinent QPE source Record. * Get the pertinent QPE source Record.
* *
* @param date * @param date
* @param phuc
* @param retrieveNew * @param retrieveNew
* @return * @return
*/ */
public FFMPRecord getQPERecord(ProductXML product, String siteKey, public FFMPRecord getQPERecord(ProductXML product, String siteKey,
String dataKey, String sourceName, Date date, String phuc, String dataKey, String sourceName, Date date, boolean retrieveNew) {
boolean retrieveNew) {
// comparisons done with table display // comparisons done with table display
if (product != null) { if (product != null) {
sourceName = product.getQpe(); sourceName = product.getQpe();
} }
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc, return getFFMPData(product, siteKey, dataKey, sourceName, date,
retrieveNew); retrieveNew);
} }
@ -1109,12 +1099,11 @@ public class FFMPMonitor extends ResourceMonitor {
* Get the rate record. * Get the rate record.
* *
* @param date * @param date
* @param phuc
* @param retrieveNew * @param retrieveNew
* @return * @return
*/ */
public FFMPRecord getRateRecord(ProductXML product, String siteKey, public FFMPRecord getRateRecord(ProductXML product, String siteKey,
String dataKey, String sourceName, Date date, String phuc, String dataKey, String sourceName, Date date,
boolean retrieveNew) { boolean retrieveNew) {
// comparisons done with table display // comparisons done with table display
@ -1122,7 +1111,7 @@ public class FFMPMonitor extends ResourceMonitor {
sourceName = product.getRate(); sourceName = product.getRate();
} }
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc, return getFFMPData(product, siteKey, dataKey, sourceName, date,
retrieveNew); retrieveNew);
} }
@ -1156,8 +1145,7 @@ public class FFMPMonitor extends ResourceMonitor {
* @return * @return
*/ */
public FFMPRecord getQPFRecord(ProductXML product, String siteKey, public FFMPRecord getQPFRecord(ProductXML product, String siteKey,
String dataKey, String sourceName, Date date, String phuc, String dataKey, String sourceName, Date date, boolean retrieveNew) {
boolean retrieveNew) {
FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance() FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance()
.getTableConfigData(siteKey); .getTableConfigData(siteKey);
@ -1171,7 +1159,7 @@ public class FFMPMonitor extends ResourceMonitor {
.getSourceName(); .getSourceName();
} }
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc, return getFFMPData(product, siteKey, dataKey, sourceName, date,
retrieveNew); retrieveNew);
} }
@ -1224,8 +1212,7 @@ public class FFMPMonitor extends ResourceMonitor {
sourceName = source.getDisplayName(); sourceName = source.getDisplayName();
} }
return getFFMPData(product, siteKey, null, sourceName, date, phuc, return getFFMPData(product, siteKey, null, sourceName, date, false);
false);
} }
/** /**
@ -1240,7 +1227,7 @@ public class FFMPMonitor extends ResourceMonitor {
* @return * @return
*/ */
public Map<String, FFMPRecord> getGuidanceRecords(ProductXML product, public Map<String, FFMPRecord> getGuidanceRecords(ProductXML product,
String siteKey, Date date, String phuc, boolean retrieveNew) { String siteKey, Date date, boolean retrieveNew) {
Map<String, FFMPRecord> guidRecs = new HashMap<String, FFMPRecord>(); Map<String, FFMPRecord> guidRecs = new HashMap<String, FFMPRecord>();
ProductRunXML productRun = FFMPRunConfigurationManager.getInstance() ProductRunXML productRun = FFMPRunConfigurationManager.getInstance()
@ -1250,7 +1237,7 @@ public class FFMPMonitor extends ResourceMonitor {
for (String type : guidTypes) { for (String type : guidTypes) {
FFMPRecord guidRec = getFFMPData(product, siteKey, null, type, FFMPRecord guidRec = getFFMPData(product, siteKey, null, type,
date, phuc, retrieveNew); date, retrieveNew);
guidRecs.put(type, guidRec); guidRecs.put(type, guidRec);
} }
@ -1289,7 +1276,7 @@ public class FFMPMonitor extends ResourceMonitor {
* @return * @return
*/ */
public FFMPRecord getVirtualRecord(ProductXML product, String siteKey, public FFMPRecord getVirtualRecord(ProductXML product, String siteKey,
String dataKey, String sourceName, Date date, String phuc, String dataKey, String sourceName, Date date,
boolean retrieveNew) { boolean retrieveNew) {
// comparisons done with table display // comparisons done with table display
// field doesn't matter here // field doesn't matter here
@ -1298,7 +1285,7 @@ public class FFMPMonitor extends ResourceMonitor {
sourceName = product.getVirtual(); sourceName = product.getVirtual();
} }
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc, return getFFMPData(product, siteKey, dataKey, sourceName, date,
retrieveNew); retrieveNew);
} }
@ -1319,7 +1306,7 @@ public class FFMPMonitor extends ResourceMonitor {
FFMPRecord record = siteDataMap.get(siteKey).getSourceData(sourceName) FFMPRecord record = siteDataMap.get(siteKey).getSourceData(sourceName)
.getRecord(); .getRecord();
if (record != null) { if (record != null) {
FFMPBasinData basinData = record.getBasinData(phuc); FFMPBasinData basinData = record.getBasinData();
if (basinData != null) { if (basinData != null) {
basin = basinData.get(pfaf); basin = basinData.get(pfaf);
} }
@ -1364,7 +1351,7 @@ public class FFMPMonitor extends ResourceMonitor {
.get(siteKey) .get(siteKey)
.getSourceData( .getSourceData(
source.getSourceName()) source.getSourceName())
.getLoadedUris(phuc).contains(uri)) { .getLoadedUris().contains(uri)) {
// populate point only // populate point only
populateFFMPBasin(uri, siteKey, populateFFMPBasin(uri, siteKey,
source.getSourceName(), phuc, source.getSourceName(), phuc,
@ -1390,7 +1377,7 @@ public class FFMPMonitor extends ResourceMonitor {
for (String uri : uris) { for (String uri : uris) {
if (!siteDataMap.get(siteKey) if (!siteDataMap.get(siteKey)
.getSourceData(sourceName) .getSourceData(sourceName)
.getLoadedUris(phuc).contains(uri)) { .getLoadedUris().contains(uri)) {
// populate point only // populate point only
populateFFMPBasin(uri, siteKey, sourceName, populateFFMPBasin(uri, siteKey, sourceName,
phuc, fgb); phuc, fgb);
@ -1411,7 +1398,7 @@ public class FFMPMonitor extends ResourceMonitor {
POINT_RETRIVAL: for (List<String> uris : availableUris.values()) { POINT_RETRIVAL: for (List<String> uris : availableUris.values()) {
for (String uri : uris) { for (String uri : uris) {
if (!siteDataMap.get(siteKey).getSourceData(sourceName) if (!siteDataMap.get(siteKey).getSourceData(sourceName)
.getLoadedUris(phuc).contains(uri)) { .getLoadedUris().contains(uri)) {
// populate point only // populate point only
populateFFMPBasin(uri, siteKey, sourceName, phuc, populateFFMPBasin(uri, siteKey, sourceName, phuc,
basin); basin);
@ -1607,21 +1594,15 @@ public class FFMPMonitor extends ResourceMonitor {
.hasLoadedAnyUris()) { .hasLoadedAnyUris()) {
FFMPSourceData sourceData = siteData FFMPSourceData sourceData = siteData
.getSourceData(sourceName); .getSourceData(sourceName);
Set<String> hucs = sourceData
.getLoadedHucs(); sourceData.removeLoadedUri(uri);
for (String huc : hucs) {
sourceData.getLoadedUris(huc).remove(
uri);
}
} }
} }
} else { } else {
FFMPSourceData sourceData = siteData FFMPSourceData sourceData = siteData
.getSourceData(fsource); .getSourceData(fsource);
Set<String> hucs = sourceData.getLoadedHucs();
for (String huc : hucs) { sourceData.removeLoadedUri(uri);
sourceData.getLoadedUris(huc).remove(uri);
}
} }
} }
} }
@ -1639,16 +1620,14 @@ public class FFMPMonitor extends ResourceMonitor {
* @param siteKey * @param siteKey
* @param sourceName * @param sourceName
* @param barrierTime * @param barrierTime
* @param phuc
*/ */
public void processUri(String uri, String siteKey, String sourceName, public void processUri(String uri, String siteKey, String sourceName,
Date barrierTime, String phuc) { Date barrierTime) {
if (uri != null) { if (uri != null) {
try { try {
FFMPRecord record = populateFFMPRecord(uri, siteKey, FFMPRecord record = populateFFMPRecord(uri, siteKey, sourceName);
sourceName, phuc);
if (record != null) { if (record != null) {
record.getBasinData(phuc).loadNow(); record.getBasinData().loadNow();
SourceXML source = getSourceConfig().getSource(sourceName); SourceXML source = getSourceConfig().getSource(sourceName);
if (source != null) { if (source != null) {
record.setExpiration(source record.setExpiration(source
@ -1670,10 +1649,10 @@ public class FFMPMonitor extends ResourceMonitor {
* @param sourceName * @param sourceName
*/ */
public void processUris(NavigableMap<Date, List<String>> uriMap, public void processUris(NavigableMap<Date, List<String>> uriMap,
String siteKey, String sourceName, Date barrierTime, String phuc, String siteKey, String sourceName, Date barrierTime,
SubMonitor smonitor) { SubMonitor smonitor) {
FFMPProcessUris processor = new FFMPProcessUris(this, uriMap, siteKey, FFMPProcessUris processor = new FFMPProcessUris(this, uriMap, siteKey,
sourceName, barrierTime, phuc); sourceName, barrierTime);
processor.run(smonitor); processor.run(smonitor);
} }
@ -2140,16 +2119,13 @@ public class FFMPMonitor extends ResourceMonitor {
final String fsource; final String fsource;
final String fhuc;
final String fsiteKey; final String fsiteKey;
public FFMPLoadRecord(String siteKey, FFMPRecord ffmpRec, public FFMPLoadRecord(String siteKey, FFMPRecord ffmpRec, String source)
String source, String huc) throws Exception { throws Exception {
this.fffmpRec = ffmpRec; this.fffmpRec = ffmpRec;
this.fsource = source; this.fsource = source;
this.fsiteKey = siteKey; this.fsiteKey = siteKey;
this.fhuc = huc;
} }
public void run() { public void run() {
@ -2157,7 +2133,7 @@ public class FFMPMonitor extends ResourceMonitor {
load(); load();
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, "FFMP load FFMPData, " statusHandler.handle(Priority.PROBLEM, "FFMP load FFMPData, "
+ fsource + " " + fhuc, e); + fsource, e);
} }
} }
@ -2165,7 +2141,7 @@ public class FFMPMonitor extends ResourceMonitor {
if (fffmpRec != null) { if (fffmpRec != null) {
List<String> uris = getLoadedUris(fsiteKey, fsource, fhuc); List<String> uris = getLoadedUris(fsiteKey, fsource);
String dataUri = fffmpRec.getDataURI(); String dataUri = fffmpRec.getDataURI();
if (!uris.contains(dataUri)) { if (!uris.contains(dataUri)) {
Date refTime = fffmpRec.getDataTime().getRefTime(); Date refTime = fffmpRec.getDataTime().getRefTime();
@ -2202,20 +2178,20 @@ public class FFMPMonitor extends ResourceMonitor {
try { try {
if (isGageSource && fhuc.equals(FFMPRecord.ALL)) { if (isGageSource) {
curRecord.retrieveVirtualMapFromDataStore(loc, curRecord.retrieveVirtualMapFromDataStore(loc,
dataUri, getTemplates(fsiteKey), refTime, dataUri, getTemplates(fsiteKey), refTime,
fffmpRec.getSourceName()); fffmpRec.getSourceName());
} else { } else {
curRecord.retrieveMapFromDataStore(loc, dataUri, curRecord.retrieveMapFromDataStore(loc, dataUri,
getTemplates(fffmpRec.getSiteKey()), fhuc, getTemplates(fffmpRec.getSiteKey()),
refTime, fffmpRec.getSourceName()); refTime, fffmpRec.getSourceName());
} }
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, statusHandler.handle(Priority.PROBLEM,
"FFMP Can't retrieve FFMP URI, " + dataUri, e); "FFMP Can't retrieve FFMP URI, " + dataUri, e);
} }
sourceData.addLoadedUri(fhuc, dataUri); sourceData.addLoadedUri(dataUri);
} }
} }
} }

View file

@ -44,6 +44,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jun 7, 2013 njensen Initial creation * Jun 7, 2013 njensen Initial creation
* Jul 15, 2013 2184 dhladky Removed all HUC's but ALL
* *
* </pre> * </pre>
* *
@ -64,18 +65,15 @@ public class FFMPProcessUris {
private final Date fbarrierTime; private final Date fbarrierTime;
private final String fhuc;
private final FFMPMonitor ffmpMonitor; private final FFMPMonitor ffmpMonitor;
public FFMPProcessUris(FFMPMonitor ffmpMonitor, public FFMPProcessUris(FFMPMonitor ffmpMonitor,
NavigableMap<Date, List<String>> uriMap, String siteKey, NavigableMap<Date, List<String>> uriMap, String siteKey,
String sourceName, Date barrierTime, String phuc) { String sourceName, Date barrierTime) {
this.furiMap = uriMap; this.furiMap = uriMap;
this.fsiteKey = siteKey; this.fsiteKey = siteKey;
this.fbarrierTime = barrierTime; this.fbarrierTime = barrierTime;
this.fsourceName = sourceName; this.fsourceName = sourceName;
this.fhuc = phuc;
this.ffmpMonitor = ffmpMonitor; this.ffmpMonitor = ffmpMonitor;
} }
@ -90,7 +88,7 @@ public class FFMPProcessUris {
isGuidance = true; isGuidance = true;
} }
List<String> loadedUris = ffmpMonitor.getLoadedUris(fsiteKey, List<String> loadedUris = ffmpMonitor.getLoadedUris(fsiteKey,
fsourceName, fhuc); fsourceName);
Set<FFMPRecord> populatedRecords = new HashSet<FFMPRecord>(); Set<FFMPRecord> populatedRecords = new HashSet<FFMPRecord>();
for (List<String> uris : furiMap.descendingMap().values()) { for (List<String> uris : furiMap.descendingMap().values()) {
for (String uri : uris) { for (String uri : uris) {
@ -102,7 +100,7 @@ public class FFMPProcessUris {
|| isGuidance) { || isGuidance) {
try { try {
record = ffmpMonitor.populateFFMPRecord(uri, record = ffmpMonitor.populateFFMPRecord(uri,
fsiteKey, fsourceName, fhuc); fsiteKey, fsourceName);
if (record != null) { if (record != null) {
populatedRecords.add(record); populatedRecords.add(record);
if (source != null) { if (source != null) {
@ -121,7 +119,7 @@ public class FFMPProcessUris {
monitor.beginTask(null, populatedRecords.size()); monitor.beginTask(null, populatedRecords.size());
for (FFMPRecord record : populatedRecords) { for (FFMPRecord record : populatedRecords) {
record.getBasinData(fhuc).loadNow(); record.getBasinData().loadNow();
monitor.worked(1); monitor.worked(1);
} }
} }

View file

@ -20,11 +20,9 @@
package com.raytheon.uf.viz.monitor.ffmp; package com.raytheon.uf.viz.monitor.ffmp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.ConcurrentSkipListMap;
@ -42,6 +40,7 @@ import com.raytheon.uf.common.dataplugin.ffmp.FFMPRecord;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Feb 18, 2013 njensen Initial creation * Feb 18, 2013 njensen Initial creation
* Feb 28, 2013 1729 dhladky Sped up, synch blocks were hanging it. * Feb 28, 2013 1729 dhladky Sped up, synch blocks were hanging it.
* Jul 15, 2013 2184 dhladky Removed all HUC's but ALL
* *
* </pre> * </pre>
* *
@ -59,7 +58,7 @@ public class FFMPSourceData {
private ConcurrentNavigableMap<Date, List<String>> availableUris = new ConcurrentSkipListMap<Date, List<String>>(); private ConcurrentNavigableMap<Date, List<String>> availableUris = new ConcurrentSkipListMap<Date, List<String>>();
/** map of huc to list of loaded URIs **/ /** map of huc to list of loaded URIs **/
private ConcurrentMap<String, List<String>> loadedUris = new ConcurrentHashMap<String, List<String>>(); private List<String> loadedUris = new ArrayList<String>();
/** /**
* Clears the data * Clears the data
@ -68,8 +67,10 @@ public class FFMPSourceData {
ffmpData = null; ffmpData = null;
previousUriQueryDate = null; previousUriQueryDate = null;
availableUris.clear(); availableUris.clear();
synchronized (loadedUris) {
loadedUris.clear(); loadedUris.clear();
} }
}
/** /**
* Gets the FFMPRecord. Possibly null. * Gets the FFMPRecord. Possibly null.
@ -110,47 +111,25 @@ public class FFMPSourceData {
} }
/** /**
* Gets the URIs associated with a HUC that have been loaded. * Gets the URIs that have been loaded.
* *
* @param huc
* @return * @return
*/ */
public List<String> getLoadedUris(String huc) { public List<String> getLoadedUris() {
return Collections.unmodifiableList(loadedUris);
List<String> loaded = loadedUris.get(huc);
if (loaded == null) {
loaded = new ArrayList<String>();
List<String> previous = loadedUris.putIfAbsent(huc, loaded);
if (previous != null) {
return previous;
}
}
return loaded;
} }
/** /**
* Tracks a URI associated with a HUC as loaded. * Tracks a URI as loaded.
* *
* @param huc
* @param uri * @param uri
*/ */
public void addLoadedUri(String huc, String uri) { public void addLoadedUri(String uri) {
synchronized (loadedUris) {
List<String> uriList = loadedUris.get(huc); loadedUris.add(uri);
if (uriList == null) {
uriList = new ArrayList<String>();
List<String> previous = loadedUris.putIfAbsent(huc, uriList);
if (previous != null) {
uriList = previous;
} }
} }
uriList.add(uri);
}
/** /**
* Checks if this site and source has loaded any URIs yet. * Checks if this site and source has loaded any URIs yet.
* *
@ -160,15 +139,6 @@ public class FFMPSourceData {
return !loadedUris.isEmpty(); return !loadedUris.isEmpty();
} }
/**
* Gets the set of HUCs that have loaded some URIs.
*
* @return
*/
public Set<String> getLoadedHucs() {
return loadedUris.keySet();
}
/** /**
* Gets the Available URIs based on time. * Gets the Available URIs based on time.
* *
@ -178,4 +148,15 @@ public class FFMPSourceData {
return availableUris; return availableUris;
} }
/**
* Removes a URI
*
* @param uri
*/
public void removeLoadedUri(String uri) {
synchronized (loadedUris) {
loadedUris.remove(uri);
}
}
} }

View file

@ -78,6 +78,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData;
* Jun 11, 2013 2085 njensen Extracted row creation to FFMPRowGenerator and * Jun 11, 2013 2085 njensen Extracted row creation to FFMPRowGenerator and
* multi-threaded row creation. * multi-threaded row creation.
* July 1, 2013 2155 dhladky Fixed bug that created more rows than were actually needed. * July 1, 2013 2155 dhladky Fixed bug that created more rows than were actually needed.
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -169,27 +170,24 @@ public class FFMPDataGenerator {
FFFGDataMgr.getUpdatedInstance(); FFFGDataMgr.getUpdatedInstance();
try { try {
FIELDS field = getBaseField(); FIELDS field = getBaseField();
if (field == null || baseRec == null) { if (field == null || baseRec == null) {
return tData; return tData;
} }
FFMPBasinData fbd = null;
if (centeredAggregationKey != null) {
fbd = baseRec.getBasinData(FFMPRecord.ALL);
} else {
fbd = baseRec.getBasinData(huc);
}
tData = new FFMPTableData(fbd.getBasins().size());
List<DomainXML> domains = resource.getDomains(); List<DomainXML> domains = resource.getDomains();
if (!fbd.getBasins().isEmpty()) {
if ((centeredAggregationKey == null) if ((centeredAggregationKey == null) || huc.equals(FFMPRecord.ALL)) {
|| huc.equals(FFMPRecord.ALL)) {
// System.out.println(fbd.getBasins().keySet().size() // System.out.println(fbd.getBasins().keySet().size()
// + " rows in the table"); // + " rows in the table");
for (Long key : fbd.getBasins().keySet()) {
if (huc.equals(FFMPRecord.ALL)) { if (huc.equals(FFMPRecord.ALL)) {
FFMPBasinData fbd = baseRec.getBasinData();
tData = new FFMPTableData(fbd.getBasins().size());
for (Long key : fbd.getBasins().keySet()) {
FFMPBasinMetaData fmdb = ft.getBasin(siteKey, key); FFMPBasinMetaData fmdb = ft.getBasin(siteKey, key);
if (fmdb == null) { if (fmdb == null) {
continue; continue;
@ -203,8 +201,7 @@ public class FFMPDataGenerator {
|| (domain.isPrimary() && fmdb || (domain.isPrimary() && fmdb
.isPrimaryCwa())) { .isPrimaryCwa())) {
try { try {
setFFMPRow(fbd.get(key), tData, false, setFFMPRow(fbd.get(key), tData, false, cwa);
cwa);
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, statusHandler.handle(Priority.PROBLEM,
"Couldn't create table row", e); "Couldn't create table row", e);
@ -214,10 +211,9 @@ public class FFMPDataGenerator {
.getVirtualGageBasinLookupIds( .getVirtualGageBasinLookupIds(
siteKey, key, huc, siteKey, key, huc,
resource.basinTableDlg resource.basinTableDlg
.getRowName(), domain)) { .getRowName())) {
try { try {
setFFMPRow( setFFMPRow(virtualBasin.get(id),
virtualBasin.get(id),
tData, true, cwa); tData, true, cwa);
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle( statusHandler.handle(
@ -229,15 +225,18 @@ public class FFMPDataGenerator {
} }
} }
} }
}
} else { } else {
/*
* make sure at least one basin in the agg is in the
* CWA
*/
List<Long> pfafs = ft.getAggregatePfafs(key, // Find all of the basins for this HUC level
siteKey, huc); List<Long> keyList = ft
.getHucKeyList(siteKey, huc, domains);
tData = new FFMPTableData(keyList.size());
for (Long key : keyList) {
List<Long> pfafs = ft.getAggregatePfafs(key, siteKey,
huc);
boolean isVGB = false; boolean isVGB = false;
if (ft.checkVGBsInAggregate(key, siteKey, huc)) { if (ft.checkVGBsInAggregate(key, siteKey, huc)) {
@ -251,21 +250,26 @@ public class FFMPDataGenerator {
if (fmdb != null) { if (fmdb != null) {
try { try {
setFFMPRow(fbd.get(key), tData, isVGB, FFMPBasin basin = new FFMPBasin(key, true);
null); setFFMPRow(basin, tData, isVGB, null);
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, statusHandler.handle(Priority.PROBLEM,
"Couldn't create table row", e); "Couldn't create table row", e);
} }
} }
} }
} }
} }
} }
// show pfafs in aggregation // show pfafs in aggregation
else { else {
FFMPBasinData fbd = baseRec.getBasinData();
List<Long> centerAggPfafs = resource.getCenteredAggregatePfafs(); List<Long> centerAggPfafs = resource
.getCenteredAggregatePfafs();
tData = new FFMPTableData(centerAggPfafs.size());
for (Long key : centerAggPfafs) { for (Long key : centerAggPfafs) {
@ -281,17 +285,19 @@ public class FFMPDataGenerator {
if (virtualBasin != null) { if (virtualBasin != null) {
// We *DO NOT* want all of the aggregate VGB's, // We *DO NOT* want all of the aggregate
// VGB's,
// just the one's for this individual basin. // just the one's for this individual basin.
List<Long> virtuals = ft.getVirtualGageBasinLookupIds( List<Long> virtuals = ft
siteKey, key, FFMPRecord.ALL, .getVirtualGageBasinLookupIds(
siteKey, key,
FFMPRecord.ALL,
resource.basinTableDlg resource.basinTableDlg
.getRowName(), domain); .getRowName());
for (Long id : virtuals) { for (Long id : virtuals) {
try { try {
setFFMPRow( setFFMPRow(virtualBasin.get(id),
virtualBasin.get(id),
tData, true, null); tData, true, null);
} catch (Exception e) { } catch (Exception e) {
statusHandler statusHandler
@ -306,7 +312,6 @@ public class FFMPDataGenerator {
} }
} }
} }
}
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.PROBLEM, statusHandler.handle(Priority.PROBLEM,
"Failed to load FFMP table data!", e); "Failed to load FFMP table data!", e);
@ -340,7 +345,6 @@ public class FFMPDataGenerator {
Date tableTime = resource.getTableTime(); Date tableTime = resource.getTableTime();
FIELDS field = null; FIELDS field = null;
String localHuc = null;
FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance() FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance()
.getTableConfigData(siteKey); .getTableConfigData(siteKey);
@ -365,37 +369,27 @@ public class FFMPDataGenerator {
monitor.setQpeWindow(new FFMPTimeWindow(tableTime, qpeTime)); monitor.setQpeWindow(new FFMPTimeWindow(tableTime, qpeTime));
if (isWorstCase || (centeredAggregationKey != null)) {
// make sure that "ALL" is loaded
localHuc = FFMPRecord.ALL;
} else {
localHuc = huc;
}
FFMPRecord rateRecord = monitor.getRateRecord(product, siteKey, FFMPRecord rateRecord = monitor.getRateRecord(product, siteKey,
dataKey, product.getRate(), paintRefTime, localHuc, true); dataKey, product.getRate(), paintRefTime, true);
FFMPRecord qpeRecord = monitor.getQPERecord(product, siteKey, dataKey, FFMPRecord qpeRecord = monitor.getQPERecord(product, siteKey, dataKey,
product.getQpe(), tableTime, localHuc, true); product.getQpe(), tableTime, true);
FFMPRecord qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey, FFMPRecord qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey,
null, paintRefTime, localHuc, true); null, paintRefTime, true);
guidRecords = monitor.getGuidanceRecords(product, siteKey, tableTime, guidRecords = monitor.getGuidanceRecords(product, siteKey, tableTime,
localHuc, true); true);
FFMPRecord virtualRecord = null; FFMPRecord virtualRecord = monitor.getVirtualRecord(product, siteKey,
if (localHuc.equals(FFMPRecord.ALL)) { dataKey, product.getVirtual(), tableTime, true);
virtualRecord = monitor.getVirtualRecord(product, siteKey, dataKey,
product.getVirtual(), tableTime, localHuc, true);
}
try { try {
if (rateRecord != null) { if (rateRecord != null) {
rateBasin = rateRecord.getBasinData(localHuc); rateBasin = rateRecord.getBasinData();
if (!rateBasin.getBasins().isEmpty()) { if (!rateBasin.getBasins().isEmpty()) {
field = FIELDS.RATE; field = FIELDS.RATE;
baseRec = rateRecord; baseRec = rateRecord;
} }
} }
if (qpeRecord != null) { if (qpeRecord != null) {
qpeBasin = qpeRecord.getBasinData(localHuc); qpeBasin = qpeRecord.getBasinData();
if (!qpeBasin.getBasins().isEmpty()) { if (!qpeBasin.getBasins().isEmpty()) {
field = FIELDS.QPE; field = FIELDS.QPE;
if (baseRec == null) { if (baseRec == null) {
@ -404,21 +398,21 @@ public class FFMPDataGenerator {
} }
} }
if (qpfRecord != null) { if (qpfRecord != null) {
qpfBasin = qpfRecord.getBasinData(localHuc); qpfBasin = qpfRecord.getBasinData();
} }
if (guidRecords != null) { if (guidRecords != null) {
guidBasins = new HashMap<String, FFMPBasinData>(); guidBasins = new HashMap<String, FFMPBasinData>();
for (String type : guidRecords.keySet()) { for (String type : guidRecords.keySet()) {
if (guidRecords.get(type) != null) { if (guidRecords.get(type) != null) {
guidBasins.put(type, guidRecords.get(type) guidBasins.put(type, guidRecords.get(type)
.getBasinData(localHuc)); .getBasinData());
} else { } else {
guidBasins.put(type, null); guidBasins.put(type, null);
} }
} }
} }
if (virtualRecord != null) { if (virtualRecord != null) {
virtualBasin = virtualRecord.getBasinData(localHuc); virtualBasin = virtualRecord.getBasinData();
} }
// Get interpolators // Get interpolators

View file

@ -170,6 +170,8 @@ import com.vividsolutions.jts.geom.Point;
* Jun 06, 2013 2075 njensen No longer schedules load threads, * Jun 06, 2013 2075 njensen No longer schedules load threads,
* refactored updates * refactored updates
* Jun 27, 2013 2152 njensen More thorough disposeInternal() * Jun 27, 2013 2152 njensen More thorough disposeInternal()
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
*
* *
* </pre> * </pre>
* *
@ -597,15 +599,12 @@ public class FFMPResource extends
private FFMPBasin getBasin(Long key, FFMPRecord.FIELDS bfield, private FFMPBasin getBasin(Long key, FFMPRecord.FIELDS bfield,
Date recentTime, boolean aggregate) throws VizException { Date recentTime, boolean aggregate) throws VizException {
FFMPBasin basin = null; FFMPBasin basin = null;
String huc = null;
if (aggregate) { if (aggregate) {
huc = getHuc(); basin = new FFMPBasin(key, aggregate);
} else { } else {
huc = FFMPRecord.ALL; basin = getRecord(bfield, recentTime).getBasinData().getBasins()
}
basin = getRecord(bfield, recentTime).getBasinData(huc).getBasins()
.get(key); .get(key);
}
return basin; return basin;
} }
@ -679,14 +678,14 @@ public class FFMPResource extends
break; break;
} }
case RATE: { case RATE: {
value = getRateRecord(recentTime).getBasinData( value = getRateRecord(recentTime).getBasinData()
FFMPRecord.ALL).getMaxValue(pfafs, recentTime); .getMaxValue(pfafs, recentTime);
break; break;
} }
case QPF: { case QPF: {
value = getQpfRecord(recentTime).getBasinData( value = getQpfRecord(recentTime).getBasinData()
FFMPRecord.ALL).getAverageMaxValue(pfafs, .getAverageMaxValue(pfafs, recentTime,
recentTime, getQpfSourceExpiration()); getQpfSourceExpiration());
break; break;
} }
case GUIDANCE: { case GUIDANCE: {
@ -694,21 +693,17 @@ public class FFMPResource extends
.getCountyFipsByPfaf(pfafs.get(0)); .getCountyFipsByPfaf(pfafs.get(0));
value = getGuidanceRecord() value = getGuidanceRecord()
.getBasinData(FFMPRecord.ALL) .getBasinData()
.getMaxGuidanceValue(pfafs, .getMaxGuidanceValue(pfafs,
getGuidanceInterpolation(getFFGName()), getGuidanceInterpolation(getFFGName()),
getGuidSourceExpiration(getFFGName()), fips); getGuidSourceExpiration(getFFGName()), fips);
break; break;
} }
case QPE: { case QPE: {
value = getQpeRecord().getBasinData(FFMPRecord.ALL) value = getQpeRecord().getBasinData().getAccumMaxValue(
.getAccumMaxValue( pfafs, recentTime, getTableTime(),
pfafs,
recentTime,
getTableTime(),
getQpeSourceExpiration(), getQpeSourceExpiration(),
getResourceData().getPrimarySourceXML() getResourceData().getPrimarySourceXML().isRate());
.isRate());
break; break;
} }
} }
@ -736,32 +731,64 @@ public class FFMPResource extends
break; break;
} }
case RATE: case RATE:
if (aggregate) {
value = getRateRecord(recentTime).getBasinData()
.getAverageValue(pfafs, recentTime);
} else {
value = getBasin(key, field, recentTime, aggregate) value = getBasin(key, field, recentTime, aggregate)
.getValue(recentTime); .getValue(recentTime);
}
break; break;
case QPF: { case QPF: {
if (aggregate) {
value = getQpfRecord(recentTime).getBasinData()
.getAverageValue(pfafs, recentTime,
getQpfSourceExpiration());
} else {
value = getBasin(key, field, recentTime, aggregate) value = getBasin(key, field, recentTime, aggregate)
.getAverageValue(recentTime, .getAverageValue(recentTime,
getQpfSourceExpiration()); getQpfSourceExpiration());
}
break; break;
} }
case GUIDANCE: { case GUIDANCE: {
if (aggregate) {
getGuidanceRecord()
.getBasinData()
.getAverageGuidanceValue(
pfafs,
getGuidanceInterpolation(getFFGName()),
getGuidSourceExpiration(getFFGName()));
} else {
value = getGuidanceValue( value = getGuidanceValue(
(FFMPGuidanceBasin) getBasin(key, field, (FFMPGuidanceBasin) getBasin(key, field,
recentTime, aggregate), recentTime, recentTime, aggregate), recentTime,
getFFGName()); getFFGName());
}
break; break;
} }
case QPE: { case QPE: {
if (aggregate) {
value = getQpeRecord().getBasinData()
.getAccumAverageValue(
pfafs,
getTableTime(),
recentTime,
getQpeSourceExpiration(),
getResourceData()
.getPrimarySourceXML()
.isRate());
} else {
value = getBasin(key, field, recentTime, aggregate) value = getBasin(key, field, recentTime, aggregate)
.getAccumValue( .getAccumValue(
getTableTime(), getTableTime(),
recentTime, recentTime,
getQpeSourceExpiration(), getQpeSourceExpiration(),
getResourceData().getPrimarySourceXML() getResourceData()
.getPrimarySourceXML()
.isRate()); .isRate());
}
break; break;
} }
} }
@ -809,15 +836,13 @@ public class FFMPResource extends
boolean forced = forceResult.isForced(); boolean forced = forceResult.isForced();
if ((forcedPfafs.size() > 0) && forced) { if ((forcedPfafs.size() > 0) && forced) {
// Recalculate the guidance using the forced value(s) // Recalculate the guidance using the forced value(s)
value = guidRecord.getBasinData(FFMPRecord.ALL) value = guidRecord.getBasinData().getAverageGuidanceValue(
.getAverageGuidanceValue(pfafList, pfafList, this.getGuidanceInterpolation(ffgType),
this.getGuidanceInterpolation(ffgType),
new Float(value), forcedPfafs, new Float(value), forcedPfafs,
getGuidSourceExpiration(ffgType)); getGuidSourceExpiration(ffgType));
} else if (forcedPfafs.size() > 0) { } else if (forcedPfafs.size() > 0) {
value = guidRecord.getBasinData(FFMPRecord.ALL) value = guidRecord.getBasinData().getAverageGuidanceValue(
.getAverageGuidanceValue(pfafList, pfafList, this.getGuidanceInterpolation(ffgType),
this.getGuidanceInterpolation(ffgType),
Float.NaN, forcedPfafs, Float.NaN, forcedPfafs,
getGuidSourceExpiration(ffgType)); getGuidSourceExpiration(ffgType));
} }
@ -905,10 +930,8 @@ public class FFMPResource extends
if ((rateRecord == null) && isNewRate) { if ((rateRecord == null) && isNewRate) {
try { try {
String huc = getHucIfWorstCase();
rateRecord = monitor.getRateRecord(getProduct(), getSiteKey(), rateRecord = monitor.getRateRecord(getProduct(), getSiteKey(),
getDataKey(), getPrimarySource(), recentTime, huc, getDataKey(), getPrimarySource(), recentTime, false);
false);
isNewRate = false; isNewRate = false;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -925,10 +948,9 @@ public class FFMPResource extends
public FFMPRecord getQpeRecord() { public FFMPRecord getQpeRecord() {
try { try {
if ((qpeRecord == null) && (getTableTime() != null) && isNewQpe) { if ((qpeRecord == null) && (getTableTime() != null) && isNewQpe) {
String huc = getHucIfWorstCase(); qpeRecord = monitor
qpeRecord = monitor.getQPERecord(getProduct(), getSiteKey(), .getQPERecord(getProduct(), getSiteKey(), getDataKey(),
getDataKey(), getPrimarySource(), getTableTime(), huc, getPrimarySource(), getTableTime(), false);
false);
isNewQpe = false; isNewQpe = false;
} }
} catch (Exception e) { } catch (Exception e) {
@ -991,9 +1013,8 @@ public class FFMPResource extends
} }
} }
String huc = getHucIfWorstCase();
qpfRecord = monitor.getQPFRecord(getProduct(), getSiteKey(), qpfRecord = monitor.getQPFRecord(getProduct(), getSiteKey(),
getDataKey(), getPrimarySource(), date, huc, false); getDataKey(), getPrimarySource(), date, false);
isNewQpf = false; isNewQpf = false;
} }
} catch (Exception e) { } catch (Exception e) {
@ -1013,7 +1034,7 @@ public class FFMPResource extends
if ((virtualRecord == null) && isNewVirtual) { if ((virtualRecord == null) && isNewVirtual) {
virtualRecord = monitor.getVirtualRecord(getProduct(), virtualRecord = monitor.getVirtualRecord(getProduct(),
getSiteKey(), getDataKey(), getPrimarySource(), getSiteKey(), getDataKey(), getPrimarySource(),
getTableTime(), FFMPRecord.ALL, false); getTableTime(), false);
isNewVirtual = false; isNewVirtual = false;
} }
@ -1818,13 +1839,13 @@ public class FFMPResource extends
List<Float> guids = null; List<Float> guids = null;
if ((getQpeRecord() != null) if ((getQpeRecord() != null)
&& (getGuidanceRecord() != null)) { && (getGuidanceRecord() != null)) {
qpes = getQpeRecord().getBasinData(FFMPRecord.ALL) qpes = getQpeRecord().getBasinData()
.getAccumValues(pfafs, getTableTime(), .getAccumValues(pfafs, getTableTime(),
recentTime, getQpeSourceExpiration(), recentTime, getQpeSourceExpiration(),
isRate()); isRate());
guids = getGuidanceRecord() guids = getGuidanceRecord()
.getBasinData(FFMPRecord.ALL) .getBasinData()
.getGuidanceValues(pfafs, .getGuidanceValues(pfafs,
getGuidanceInterpolation(ffgType), getGuidanceInterpolation(ffgType),
getGuidSourceExpiration(ffgType)); getGuidSourceExpiration(ffgType));
@ -1835,20 +1856,19 @@ public class FFMPResource extends
} else { } else {
if ((getQpeRecord() != null) if ((getQpeRecord() != null)
&& (getGuidanceRecord() != null)) { && (getGuidanceRecord() != null)) {
qpe = getQpeRecord() qpe = getQpeRecord().getBasinData()
.getBasinData(getHuc()) .getAccumAverageValue(
.get(key) pfafs,
.getAccumValue(
getTableTime(), getTableTime(),
recentTime, recentTime,
getQpeSourceExpiration(), getQpeSourceExpiration(),
getResourceData().getPrimarySourceXML() getResourceData().getPrimarySourceXML()
.isRate()); .isRate());
guid = getGuidanceValue( guid = getGuidanceRecord().getBasinData()
(FFMPGuidanceBasin) getGuidanceRecord() .getAverageGuidanceValue(pfafs,
.getBasinData(getHuc()).get(key), getGuidanceInterpolation(ffgType),
recentTime, ffgType); getGuidSourceExpiration(ffgType));
diff = FFMPUtils.getDiffValue(qpe, guid); diff = FFMPUtils.getDiffValue(qpe, guid);
} }
@ -1856,14 +1876,14 @@ public class FFMPResource extends
} else { } else {
if ((getQpeRecord() != null) && (getGuidanceRecord() != null)) { if ((getQpeRecord() != null) && (getGuidanceRecord() != null)) {
qpe = getQpeRecord() qpe = getQpeRecord()
.getBasinData(FFMPRecord.ALL) .getBasinData()
.get(key) .get(key)
.getAccumValue(getTableTime(), recentTime, .getAccumValue(getTableTime(), recentTime,
getQpeSourceExpiration(), isRate()); getQpeSourceExpiration(), isRate());
guid = getGuidanceValue( guid = getGuidanceValue(
(FFMPGuidanceBasin) getGuidanceRecord() (FFMPGuidanceBasin) getGuidanceRecord()
.getBasinData(FFMPRecord.ALL).get(key), .getBasinData().get(key),
recentTime, ffgType); recentTime, ffgType);
guid = forceValue(pfafs, guid = forceValue(pfafs,
getBasin(key, getField(), recentTime, aggregate), getBasin(key, getField(), recentTime, aggregate),
@ -1898,14 +1918,14 @@ public class FFMPResource extends
List<Float> qpes = null; List<Float> qpes = null;
List<Float> guids = null; List<Float> guids = null;
if (getQpeRecord() != null) { if (getQpeRecord() != null) {
qpes = getQpeRecord().getBasinData(FFMPRecord.ALL) qpes = getQpeRecord().getBasinData()
.getAccumValues(pfafs, getTableTime(), .getAccumValues(pfafs, getTableTime(),
recentTime, getQpeSourceExpiration(), recentTime, getQpeSourceExpiration(),
isRate()); isRate());
} }
if (getGuidanceRecord() != null) { if (getGuidanceRecord() != null) {
guids = getGuidanceRecord() guids = getGuidanceRecord()
.getBasinData(FFMPRecord.ALL) .getBasinData()
.getGuidanceValues(pfafs, .getGuidanceValues(pfafs,
getGuidanceInterpolation(ffgType), getGuidanceInterpolation(ffgType),
getGuidSourceExpiration(ffgType)); getGuidSourceExpiration(ffgType));
@ -1916,32 +1936,31 @@ public class FFMPResource extends
} else { } else {
if ((getQpeRecord() != null) if ((getQpeRecord() != null)
&& (getGuidanceRecord() != null)) { && (getGuidanceRecord() != null)) {
qpe = getQpeRecord() qpe = getQpeRecord().getBasinData()
.getBasinData(getHuc()) .getAccumAverageValue(
.get(key) pfafs,
.getAccumValue(
getTableTime(), getTableTime(),
recentTime, recentTime,
getQpeSourceExpiration(), getQpeSourceExpiration(),
getResourceData().getPrimarySourceXML() getResourceData().getPrimarySourceXML()
.isRate()); .isRate());
guid = getGuidanceValue(
(FFMPGuidanceBasin) getGuidanceRecord() guid = getGuidanceRecord().getBasinData()
.getBasinData(getHuc()).get(key), .getAverageGuidanceValue(pfafs,
recentTime, ffgType); getGuidanceInterpolation(ffgType),
ratio = FFMPUtils.getRatioValue(qpe, guid); getGuidSourceExpiration(ffgType));
} }
} }
} else { } else {
if ((getQpeRecord() != null) && (getGuidanceRecord() != null)) { if ((getQpeRecord() != null) && (getGuidanceRecord() != null)) {
qpe = getQpeRecord() qpe = getQpeRecord()
.getBasinData(FFMPRecord.ALL) .getBasinData()
.get(key) .get(key)
.getAccumValue(getTableTime(), recentTime, .getAccumValue(getTableTime(), recentTime,
getQpeSourceExpiration(), isRate()); getQpeSourceExpiration(), isRate());
guid = getGuidanceValue( guid = getGuidanceValue(
(FFMPGuidanceBasin) getGuidanceRecord() (FFMPGuidanceBasin) getGuidanceRecord()
.getBasinData(FFMPRecord.ALL).get(key), .getBasinData().get(key),
recentTime, ffgType); recentTime, ffgType);
ratio = FFMPUtils.getRatioValue(qpe, guid); ratio = FFMPUtils.getRatioValue(qpe, guid);
} }

View file

@ -32,7 +32,6 @@ import javax.xml.bind.annotation.XmlType;
import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
@ -81,6 +80,7 @@ import com.raytheon.uf.viz.monitor.ffmp.xml.FFMPConfigBasinXML;
* Mar 06, 2013 1769 dhladky Changed threading to use count down latch. * Mar 06, 2013 1769 dhladky Changed threading to use count down latch.
* Apr 26, 2013 1954 bsteffen Minor code cleanup throughout FFMP. * Apr 26, 2013 1954 bsteffen Minor code cleanup throughout FFMP.
* Jun 06, 2013 2075 njensen Use new load jobs * Jun 06, 2013 2075 njensen Use new load jobs
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -208,7 +208,6 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
} }
} }
} }
this.domains = defaults; this.domains = defaults;
final Date mostRecentTime = availableTimes[availableTimes.length - 1] final Date mostRecentTime = availableTimes[availableTimes.length - 1]
@ -216,56 +215,23 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
final double configTimeFrame = cfgBasinXML.getTimeFrame(); final double configTimeFrame = cfgBasinXML.getTimeFrame();
final Date timeBack = new Date( final Date timeBack = new Date(
(long) (mostRecentTime.getTime() - (configTimeFrame * TimeUtil.MILLIS_PER_HOUR))); (long) (mostRecentTime.getTime() - (configTimeFrame * TimeUtil.MILLIS_PER_HOUR)));
final List<String> initialHucs = new ArrayList<String>(); final List<String> onlyAllHuc = new ArrayList<String>();
initialHucs.add(FFMPRecord.ALL); onlyAllHuc.add(FFMPRecord.ALL);
final String defaultLayer = monitor.getConfig()
.getFFMPConfigData().getLayer();
if (!defaultLayer.equals(FFMPRecord.ALL)) {
initialHucs.add(defaultLayer);
}
InitialLoadJob initialJob = new InitialLoadJob(this, timeBack, InitialLoadJob initialJob = new InitialLoadJob(this, timeBack,
mostRecentTime, initialHucs); mostRecentTime, onlyAllHuc);
// schedule the secondary load to start as soon as the initial // schedule the background load to start as soon as the initial
// completes // completes, it will load the other hours back to 24
// secondary load will be the same time period as initial with
// the hucs that the initial job did not do
initialJob.addJobChangeListener(new JobChangeAdapter() { initialJob.addJobChangeListener(new JobChangeAdapter() {
@Override @Override
public void done(IJobChangeEvent event) { public void done(IJobChangeEvent event) {
Date secondStartTime = timeBack; Date backgroundStartTime = new Date(mostRecentTime
List<String> secondaryHucs = FFMPTemplateConfigurationManager .getTime() - (24 * TimeUtil.MILLIS_PER_HOUR));
.getInstance().getHucLevels(); BackgroundLoadJob backgroundJob = new BackgroundLoadJob(
secondaryHucs.removeAll(initialHucs); "Background FFMP Load", FFMPResourceData.this,
backgroundStartTime, timeBack, onlyAllHuc);
BackgroundLoadJob secondaryJob = new BackgroundLoadJob( backgroundJob.setPreloadAvailableUris(true);
"Secondary FFMP Load", FFMPResourceData.this, backgroundJob.schedule();
secondStartTime, mostRecentTime, secondaryHucs);
secondaryJob.setPriority(Job.SHORT);
// schedule the tertiary load as soon as the
// secondary completes
// tertiary load will do 24 hours back of the
// same hucs as the initial load
secondaryJob
.addJobChangeListener(new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
List<String> tertiaryHucs = new ArrayList<String>();
tertiaryHucs.add(FFMPRecord.ALL);
Date tertiaryStartTime = new Date(
mostRecentTime.getTime()
- (24 * TimeUtil.MILLIS_PER_HOUR));
BackgroundLoadJob tertiaryJob = new BackgroundLoadJob(
"Tertiary FFMP Load",
FFMPResourceData.this,
tertiaryStartTime, timeBack,
tertiaryHucs);
tertiaryJob
.setPreloadAvailableUris(true);
tertiaryJob.schedule();
}
});
secondaryJob.schedule();
} }
}); });
initialJob.schedule(); initialJob.schedule();
@ -274,7 +240,7 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
// background so the first paints of the resource // background so the first paints of the resource
// will be faster // will be faster
List<String> earlyLoadHucs = new ArrayList<String>(); List<String> earlyLoadHucs = new ArrayList<String>();
earlyLoadHucs.addAll(initialHucs); earlyLoadHucs.addAll(onlyAllHuc);
for (String otherHuc : FFMPTemplateConfigurationManager for (String otherHuc : FFMPTemplateConfigurationManager
.getInstance().getHucLevels()) { .getInstance().getHucLevels()) {
if (!earlyLoadHucs.contains(otherHuc)) { if (!earlyLoadHucs.contains(otherHuc)) {
@ -324,8 +290,7 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
.getAvailableUris(siteKey, dataKey, sourceName, .getAvailableUris(siteKey, dataKey, sourceName,
standAloneTime); standAloneTime);
monitor.processUris(sourceURIs, siteKey, sourceName, monitor.processUris(sourceURIs, siteKey, sourceName,
standAloneTime, FFMPRecord.ALL, standAloneTime, SubMonitor.convert(null));
SubMonitor.convert(null));
} }
} }
} }
@ -427,10 +392,10 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
public void populateRecord(FFMPRecord precord) throws VizException { public void populateRecord(FFMPRecord precord) throws VizException {
try { try {
getMonitor().populateFFMPRecord(siteKey, precord, getMonitor().populateFFMPRecord(siteKey, precord,
precord.getSourceName(), huc); precord.getSourceName());
} catch (Exception e) { } catch (Exception e) {
throw new VizException("Failed to populate ffmp record " throw new VizException("Failed to populate ffmp record "
+ precord.getDataURI() + " for huc " + huc); + precord.getDataURI());
} }
} }

View file

@ -59,6 +59,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jun 11, 2013 2085 njensen Initial creation * Jun 11, 2013 2085 njensen Initial creation
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -208,7 +209,7 @@ public class FFMPRowGenerator implements Runnable {
new FFMPTableCellData(rowField, sb.toString(), new FFMPTableCellData(rowField, sb.toString(),
mouseOverText)); mouseOverText));
if (!isWorstCase || huc.equals(FFMPRecord.ALL) if (huc.equals(FFMPRecord.ALL)
|| (centeredAggregationKey != null)) { || (centeredAggregationKey != null)) {
if (!cBasin.getValues().isEmpty()) { if (!cBasin.getValues().isEmpty()) {
@ -272,8 +273,73 @@ public class FFMPRowGenerator implements Runnable {
FIELDS.DIFF, diffValue)); FIELDS.DIFF, diffValue));
i += 3; i += 3;
} }
} else { } else if (isWorstCase) {
trd = getMaxValue(trd, cBasin); trd = getMaxValue(trd, cBasin);
} else {
// general Aggregate HUC processing
ArrayList<Long> pfafs = ft.getAggregatePfafs(
cBasin.getPfaf(), siteKey, domain);
if (!cBasin.getValues().isEmpty()) {
rate = vgBasin.getAverageValue(paintRefTime,
expirationTime);
if (sliderTime > 0.00) {
FFMPTimeWindow window = monitor.getQpeWindow();
qpeBasin.getAccumAverageValue(pfafs,
window.getAfterTime(),
window.getBeforeTime(), expirationTime,
isRate);
} else {
qpe = 0.0f;
}
}
trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE,
rate));
trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE,
qpe));
if (qpfBasin != null) {
FFMPTimeWindow window = monitor.getQpfWindow();
qpf = qpfBasin.getAverageValue(pfafs,
window.getAfterTime(), window.getBeforeTime());
}
trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF,
qpf));
// run over each guidance type
int i = 0;
for (String guidType : guidBasins.keySet()) {
guidance = Float.NaN;
FFMPTableCellData guidCellData = getGuidanceCellData(
cBasin, domain, guidType, parentBasinPfaf);
if (guidCellData == null) {
// check for forcing even if no data are available
guidance = getForcedAvg(domain, cBasin, guidType);
boolean forced = !guidance.isNaN();
guidCellData = new FFMPTableCellData(
FIELDS.GUIDANCE, guidance, forced);
} else {
guidance = guidCellData.getValueAsFloat();
}
trd.setTableCellData(i + 4, guidCellData);
float ratioValue = Float.NaN;
float diffValue = Float.NaN;
// If guidance is NaN then it cannot be > 0
if (!qpe.isNaN() && (guidance > 0.0f)) {
ratioValue = FFMPUtils.getRatioValue(qpe, guidance);
diffValue = FFMPUtils.getDiffValue(qpe, guidance);
}
trd.setTableCellData(i + 5, new FFMPTableCellData(
FIELDS.RATIO, ratioValue));
trd.setTableCellData(i + 6, new FFMPTableCellData(
FIELDS.DIFF, diffValue));
i += 3;
}
} }
trd.setSortCallback(tData); trd.setSortCallback(tData);
@ -292,22 +358,46 @@ public class FFMPRowGenerator implements Runnable {
if (!isWorstCase || huc.equals(FFMPRecord.ALL) if (!isWorstCase || huc.equals(FFMPRecord.ALL)
|| (centeredAggregationKey != null)) { || (centeredAggregationKey != null)) {
ArrayList<Long> pfafs = null;
if (cBasin.getAggregated()) {
pfafs = ft.getAggregatePfafs(cBasin.getPfaf(), siteKey,
huc);
}
if (rateBasin != null) { if (rateBasin != null) {
if (cBasin.getAggregated()) {
rate = rateBasin.getAverageValue(pfafs,
paintRefTime);
} else {
FFMPBasin basin = rateBasin.get(cBasinPfaf); FFMPBasin basin = rateBasin.get(cBasinPfaf);
if (basin != null) { if (basin != null) {
rate = basin.getValue(paintRefTime); rate = basin.getValue(paintRefTime);
} }
} }
}
trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE,
rate)); rate));
if (qpeBasin != null) { if (qpeBasin != null) {
FFMPBasin basin = qpeBasin.get(cBasinPfaf);
if (basin != null) {
FFMPTimeWindow window = monitor.getQpeWindow(); FFMPTimeWindow window = monitor.getQpeWindow();
qpe = basin.getAccumValue(window.getAfterTime(),
if (cBasin.getAggregated()) {
qpe = qpeBasin.getAccumAverageValue(pfafs,
window.getAfterTime(),
window.getBeforeTime(), expirationTime, window.getBeforeTime(), expirationTime,
isRate); isRate);
} else {
FFMPBasin basin = qpeBasin.get(cBasinPfaf);
if (basin != null) {
qpe = basin.getAccumValue(
window.getAfterTime(),
window.getBeforeTime(), expirationTime,
isRate);
}
} }
} }
@ -315,13 +405,21 @@ public class FFMPRowGenerator implements Runnable {
qpe)); qpe));
if (qpfBasin != null) { if (qpfBasin != null) {
FFMPTimeWindow window = monitor.getQpfWindow();
if (cBasin.getAggregated()) {
qpf = qpfBasin.getAverageValue(pfafs,
window.getAfterTime(),
window.getBeforeTime());
} else {
FFMPBasin basin = qpfBasin.get(cBasinPfaf); FFMPBasin basin = qpfBasin.get(cBasinPfaf);
if (basin != null) { if (basin != null) {
FFMPTimeWindow window = monitor.getQpfWindow();
qpf = basin.getAverageValue(window.getAfterTime(), qpf = basin.getAverageValue(
window.getAfterTime(),
window.getBeforeTime()); window.getBeforeTime());
} }
} }
}
trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF,
qpf)); qpf));
@ -436,13 +534,13 @@ public class FFMPRowGenerator implements Runnable {
if (cBasin instanceof FFMPVirtualGageBasin) { if (cBasin instanceof FFMPVirtualGageBasin) {
if (!pfafs.isEmpty()) { if (!pfafs.isEmpty()) {
if (virtualBasin != null) { if (virtualBasin != null) {
rate = virtualBasin.get(cBasin.getPfaf()).getValue(
paintRefTime); rate = virtualBasin.getMaxValue(pfafs, paintRefTime);
if (sliderTime > 0.00) { if (sliderTime > 0.00) {
qpe = virtualBasin.get(cBasin.getPfaf()).getAccumValue( qpe = virtualBasin.getAccumMaxValue(pfafs, monitor
monitor.getQpeWindow().getAfterTime(), .getQpeWindow().getAfterTime(), monitor
monitor.getQpeWindow().getBeforeTime(), .getQpeWindow().getBeforeTime(),
expirationTime, isRate); expirationTime, isRate);
} else { } else {
qpe = 0.0f; qpe = 0.0f;
@ -454,10 +552,9 @@ public class FFMPRowGenerator implements Runnable {
trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, qpe)); trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, qpe));
if (qpfBasin != null) { if (qpfBasin != null) {
qpf = new Float(qpfBasin.get(cBasin.getPfaf()).getMaxValue( qpf = qpfBasin.getMaxValue(pfafs, monitor.getQpfWindow()
monitor.getQpfWindow().getAfterTime(), .getAfterTime(), monitor.getQpfWindow()
monitor.getQpfWindow().getBeforeTime())) .getBeforeTime());
.floatValue();
} }
trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, qpf)); trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, qpf));
@ -534,7 +631,7 @@ public class FFMPRowGenerator implements Runnable {
if (isWorstCase) { if (isWorstCase) {
guidance = guidRecords guidance = guidRecords
.get(guidType) .get(guidType)
.getBasinData(FFMPRecord.ALL) .getBasinData()
.getMaxGuidanceValue( .getMaxGuidanceValue(
pfafs, pfafs,
resource.getGuidanceInterpolators() resource.getGuidanceInterpolators()
@ -542,11 +639,16 @@ public class FFMPRowGenerator implements Runnable {
resource.getGuidSourceExpiration(guidType), resource.getGuidSourceExpiration(guidType),
cBasin.getPfaf()); cBasin.getPfaf());
} else { } else {
FFMPGuidanceBasin basin = (FFMPGuidanceBasin) guidRecords
.get(guidType).getBasinData(huc) guidance = guidRecords
.get(cBasin.getPfaf()); .get(guidType)
guidance = resource.getGuidanceValue(basin, monitor .getBasinData()
.getQpeWindow().getBeforeTime(), guidType); .getAverageGuidanceValue(
pfafs,
resource.getGuidanceInterpolators()
.get(guidType),
resource.getGuidSourceExpiration(guidType));
} }
trd.setTableCellData(i + 4, new FFMPTableCellData( trd.setTableCellData(i + 4, new FFMPTableCellData(
@ -766,17 +868,6 @@ public class FFMPRowGenerator implements Runnable {
private FFMPTableCellData getGuidanceCellData(FFMPBasin cBasin, private FFMPTableCellData getGuidanceCellData(FFMPBasin cBasin,
String domain, String guidType, Long parentBasinPfaf) { String domain, String guidType, Long parentBasinPfaf) {
long cBasinPfaf = cBasin.getPfaf(); long cBasinPfaf = cBasin.getPfaf();
FFMPBasinData guidBasin = guidBasins.get(guidType);
FFMPGuidanceBasin ffmpGuidBasin = null;
if (guidBasin != null) {
ffmpGuidBasin = (FFMPGuidanceBasin) guidBasin.get(cBasinPfaf);
}
if (ffmpGuidBasin == null) {
return null;
}
List<Long> pfafList = Collections.emptyList(); List<Long> pfafList = Collections.emptyList();
List<Long> forcedPfafs = Collections.emptyList(); List<Long> forcedPfafs = Collections.emptyList();
boolean forced = false; boolean forced = false;
@ -806,8 +897,7 @@ public class FFMPRowGenerator implements Runnable {
if (FFFGDataMgr.getInstance().isForcingConfigured()) { if (FFFGDataMgr.getInstance().isForcingConfigured()) {
FFMPBasin parentBasin = cBasin; FFMPBasin parentBasin = cBasin;
if (cBasinPfaf != parentBasinPfaf.longValue()) { if (cBasinPfaf != parentBasinPfaf.longValue()) {
parentBasin = baseRec.getBasinData(FFMPRecord.ALL).get( parentBasin = baseRec.getBasinData().get(parentBasinPfaf);
parentBasinPfaf);
} }
ForceUtilResult forceResult = forceUtil.calculateForcings(domain, ForceUtilResult forceResult = forceUtil.calculateForcings(domain,
ft, parentBasin); ft, parentBasin);
@ -819,20 +909,22 @@ public class FFMPRowGenerator implements Runnable {
// Recalculate guidance using the forced value(s) // Recalculate guidance using the forced value(s)
guidance = guidRecords guidance = guidRecords
.get(guidType) .get(guidType)
.getBasinData(FFMPRecord.ALL) .getBasinData()
.getAverageGuidanceValue(pfafList, .getAverageGuidanceValue(pfafList,
resource.getGuidanceInterpolators().get(guidType), resource.getGuidanceInterpolators().get(guidType),
guidance, forcedPfafs, guidance, forcedPfafs,
resource.getGuidSourceExpiration(guidType)); resource.getGuidSourceExpiration(guidType));
} else { } else {
if (ffmpGuidBasin != null) {
guidance = resource.getGuidanceValue(ffmpGuidBasin, FFMPGuidanceBasin ffmpGuidBasin = (FFMPGuidanceBasin) guidRecords
paintRefTime, guidType); .get(guidType).getBasinData().get(cBasinPfaf);
guidance = resource.getGuidanceValue(ffmpGuidBasin, paintRefTime,
guidType);
if (guidance < 0.0f) { if (guidance < 0.0f) {
guidance = Float.NaN; guidance = Float.NaN;
} }
}
} }
return new FFMPTableCellData(FIELDS.GUIDANCE, guidance, forced); return new FFMPTableCellData(FIELDS.GUIDANCE, guidance, forced);

View file

@ -22,7 +22,6 @@ package com.raytheon.uf.viz.monitor.ffmp.ui.thread;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.NavigableMap; import java.util.NavigableMap;
@ -31,7 +30,6 @@ import java.util.Set;
import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.Job;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPRecord;
import com.raytheon.uf.common.monitor.config.FFMPRunConfigurationManager; import com.raytheon.uf.common.monitor.config.FFMPRunConfigurationManager;
import com.raytheon.uf.common.monitor.xml.FFMPRunXML; import com.raytheon.uf.common.monitor.xml.FFMPRunXML;
import com.raytheon.uf.common.monitor.xml.ProductRunXML; import com.raytheon.uf.common.monitor.xml.ProductRunXML;
@ -55,6 +53,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPResourceData;
* Jun 04, 2013 2075 njensen Initial creation * Jun 04, 2013 2075 njensen Initial creation
* Jun 07, 2013 2075 njensen Added progress monitoring * Jun 07, 2013 2075 njensen Added progress monitoring
* Jul 03, 2013 2152 njensen Override shouldRun() * Jul 03, 2013 2152 njensen Override shouldRun()
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -82,8 +81,6 @@ public abstract class AbstractLoadJob extends Job {
protected FFMPMonitor ffmpMonitor; protected FFMPMonitor ffmpMonitor;
protected List<String> hucsToLoad = null;
/** /**
* Constructor * Constructor
* *
@ -106,28 +103,13 @@ public abstract class AbstractLoadJob extends Job {
this.resourceData = resourceData; this.resourceData = resourceData;
this.startTime = timeBack; this.startTime = timeBack;
this.endTime = mostRecentTime; this.endTime = mostRecentTime;
this.hucsToLoad = hucsToLoad;
// configure FFMP // configure FFMP
this.hucsToLoad.remove(FFMPRecord.VIRTUAL);
FFMPRunXML runXML = FFMPRunConfigurationManager.getInstance() FFMPRunXML runXML = FFMPRunConfigurationManager.getInstance()
.getRunner(resourceData.wfo); .getRunner(resourceData.wfo);
this.productRun = runXML.getProduct(resourceData.siteKey); this.productRun = runXML.getProduct(resourceData.siteKey);
this.product = resourceData.getProduct(); this.product = resourceData.getProduct();
this.ffmpMonitor = FFMPMonitor.getInstance(); this.ffmpMonitor = FFMPMonitor.getInstance();
// just for debugging/logging
StringBuilder sb = new StringBuilder();
sb.append(name);
sb.append(" hucs to load: ");
Iterator<String> itr = this.hucsToLoad.iterator();
while (itr.hasNext()) {
sb.append(itr.next());
if (itr.hasNext()) {
sb.append(", ");
}
}
System.out.println(sb.toString());
} }
/** /**
@ -166,10 +148,8 @@ public abstract class AbstractLoadJob extends Job {
} }
} }
if (rateURI != null) { if (rateURI != null) {
for (String phuc : hucsToLoad) {
ffmpMonitor.processUri(rateURI, resourceData.siteKey, ffmpMonitor.processUri(rateURI, resourceData.siteKey,
product.getRate(), startTime, phuc); product.getRate(), startTime);
}
} }
} }
@ -191,14 +171,12 @@ public abstract class AbstractLoadJob extends Job {
protected void doQpe(NavigableMap<Date, List<String>> qpeURIs, protected void doQpe(NavigableMap<Date, List<String>> qpeURIs,
SubMonitor smonitor) { SubMonitor smonitor) {
if (!qpeURIs.isEmpty()) { if (!qpeURIs.isEmpty()) {
smonitor.beginTask(null, hucsToLoad.size() * PROGRESS_FACTOR); smonitor.beginTask(null, PROGRESS_FACTOR);
for (String phuc : hucsToLoad) {
ffmpMonitor.processUris(qpeURIs, resourceData.siteKey, ffmpMonitor.processUris(qpeURIs, resourceData.siteKey,
product.getQpe(), startTime, phuc, product.getQpe(), startTime,
smonitor.newChild(PROGRESS_FACTOR)); smonitor.newChild(PROGRESS_FACTOR));
} }
} }
}
/** /**
* Gets the available QPF URIs for a particular source * Gets the available QPF URIs for a particular source
@ -247,12 +225,11 @@ public abstract class AbstractLoadJob extends Job {
// Use this method of QPF data retrieval if you don't have cache // Use this method of QPF data retrieval if you don't have cache
// files // files
if (!qpfURIs.isEmpty()) { if (!qpfURIs.isEmpty()) {
smonitor.beginTask(null, hucsToLoad.size() * PROGRESS_FACTOR); smonitor.beginTask(null, PROGRESS_FACTOR);
for (String phuc : hucsToLoad) {
ffmpMonitor.processUris(qpfURIs, resourceData.siteKey, ffmpMonitor.processUris(qpfURIs, resourceData.siteKey, productQpf,
productQpf, startTime, phuc, startTime, smonitor.newChild(PROGRESS_FACTOR));
smonitor.newChild(PROGRESS_FACTOR));
}
} }
} }
@ -265,7 +242,7 @@ public abstract class AbstractLoadJob extends Job {
product.getVirtual(), startTime); product.getVirtual(), startTime);
if (!virtualURIs.isEmpty()) { if (!virtualURIs.isEmpty()) {
ffmpMonitor.processUris(virtualURIs, resourceData.siteKey, ffmpMonitor.processUris(virtualURIs, resourceData.siteKey,
product.getVirtual(), startTime, FFMPRecord.ALL, smonitor); product.getVirtual(), startTime, smonitor);
} }
} }
@ -304,7 +281,7 @@ public abstract class AbstractLoadJob extends Job {
if (iguidURIs != null && !iguidURIs.isEmpty()) { if (iguidURIs != null && !iguidURIs.isEmpty()) {
ffmpMonitor.processUris(iguidURIs, resourceData.siteKey, ffmpMonitor.processUris(iguidURIs, resourceData.siteKey,
guidSource.getSourceName(), startTime, guidSource.getSourceName(), startTime,
FFMPRecord.ALL,
smonitor.newChild(PROGRESS_FACTOR / subWork)); smonitor.newChild(PROGRESS_FACTOR / subWork));
} }
} }

View file

@ -25,6 +25,7 @@ import com.raytheon.uf.common.dataplugin.gfe.request.CheckServiceBackupPrimarySi
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse; import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.auth.UserController; import com.raytheon.uf.viz.core.auth.UserController;
import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient; import com.raytheon.uf.viz.core.requests.ThriftClient;
@ -42,6 +43,9 @@ import com.raytheon.uf.viz.core.requests.ThriftClient;
* Nov 14, 2012 jdynina Added check for national center * Nov 14, 2012 jdynina Added check for national center
* May 02, 2013 #1762 dgilling Replace national center check with * May 02, 2013 #1762 dgilling Replace national center check with
* a svcbu PRIMARY_SITES check. * a svcbu PRIMARY_SITES check.
* Jul 22, 2013 #1762 dgilling Ensure all fields of
* CheckServiceBackupPrimarySiteRequest are
* filled.
* *
* </pre> * </pre>
* *
@ -85,8 +89,10 @@ public class CheckPermissions {
return authorized; return authorized;
} }
public static boolean runningAsPrimary() { public static boolean runningAsPrimary(String siteId) {
CheckServiceBackupPrimarySiteRequest request = new CheckServiceBackupPrimarySiteRequest(); CheckServiceBackupPrimarySiteRequest request = new CheckServiceBackupPrimarySiteRequest();
request.setSiteID(siteId);
request.setWorkstationID(VizApp.getWsId());
try { try {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
ServerResponse<Boolean> sr = (ServerResponse<Boolean>) ThriftClient ServerResponse<Boolean> sr = (ServerResponse<Boolean>) ThriftClient

View file

@ -93,6 +93,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* Mar 20, 2013 1447 dgilling Port troubleshooting mode changes * Mar 20, 2013 1447 dgilling Port troubleshooting mode changes
* from A1 DR 21404, some code cleanup. * from A1 DR 21404, some code cleanup.
* May 01, 2013 1762 dgilling Remove national center check. * May 01, 2013 1762 dgilling Remove national center check.
* Jul 22, 2013 1762 dgilling Fix running as primary check.
* *
* </pre> * </pre>
* *
@ -168,7 +169,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
super(parentShell); super(parentShell);
authorized = CheckPermissions.getAuthorization(); authorized = CheckPermissions.getAuthorization();
this.site = LocalizationManager.getInstance().getCurrentSite(); this.site = LocalizationManager.getInstance().getCurrentSite();
this.runningAsPrimary = CheckPermissions.runningAsPrimary(); this.runningAsPrimary = CheckPermissions.runningAsPrimary(this.site);
if (!ServiceBackupJobManager.getInstance().isRunning()) { if (!ServiceBackupJobManager.getInstance().isRunning()) {
ServiceBackupJobManager.getInstance().start(); ServiceBackupJobManager.getInstance().start();
} }

View file

@ -41,6 +41,9 @@ import com.raytheon.viz.texteditor.util.VtecUtil;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* May 14, 2013 #1842 dgilling Initial creation * May 14, 2013 #1842 dgilling Initial creation
* Jul 19, 2013 #1842 dgilling Use VtecUtil.replaceFirstVtecString()
* to ensure start times of in progress
* events aren't set to the wrong time.
* *
* </pre> * </pre>
* *
@ -94,7 +97,11 @@ public class GFEVtecUtil {
vtec.getPhensig(), true); vtec.getPhensig(), true);
vtec.setSequence(newEtn); vtec.setSequence(newEtn);
} }
vtecMatcher.appendReplacement(finalOutput, vtec.getVtecString()); vtecMatcher
.appendReplacement(
finalOutput,
VtecUtil.replaceFirstVtecString(
vtec.getVtecString(), vtec));
} }
vtecMatcher.appendTail(finalOutput); vtecMatcher.appendTail(finalOutput);
return finalOutput.toString(); return finalOutput.toString();

View file

@ -107,9 +107,10 @@ import com.vividsolutions.jts.geom.Coordinate;
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Mar 9, 2011 bsteffen Initial creation * Mar 09, 2011 bsteffen Initial creation
* May 08, 2013 1980 bsteffen Set paint status in GridResources for * May 08, 2013 1980 bsteffen Set paint status in GridResources for
* KML. * KML.
* Jul 15, 2013 2107 bsteffen Fix sampling of grid vector arrows.
* *
* </pre> * </pre>
* *
@ -803,7 +804,7 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
} }
if (map.containsKey(INTERROGATE_DIRECTION)) { if (map.containsKey(INTERROGATE_DIRECTION)) {
double dir = (Double) map.get(INTERROGATE_DIRECTION); double dir = (Double) map.get(INTERROGATE_DIRECTION);
result += String.format("%.0f\u00B0 ", dir); result = String.format("%.0f\u00B0 ", dir) + result;
} }
return result; return result;
} }
@ -853,7 +854,7 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
result.put(INTERROGATE_UNIT, ""); result.put(INTERROGATE_UNIT, "");
} }
if (data.isVector()) { if (data.isVector()) {
sampler.setSource(new FloatBufferWrapper(data.getScalarData(), data sampler.setSource(new FloatBufferWrapper(data.getDirection(), data
.getGridGeometry())); .getGridGeometry()));
Double dir = sampler.sample(pixel.x, pixel.y); Double dir = sampler.sample(pixel.x, pixel.y);
result.put(INTERROGATE_DIRECTION, dir); result.put(INTERROGATE_DIRECTION, dir);

View file

@ -20,6 +20,7 @@
package com.raytheon.viz.grid.rsc.general; package com.raytheon.viz.grid.rsc.general;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.measure.unit.Unit; import javax.measure.unit.Unit;
@ -73,10 +74,11 @@ import com.vividsolutions.jts.geom.Coordinate;
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Mar 9, 2011 bsteffen Initial creation * Mar 09, 2011 bsteffen Initial creation
* Feb 25, 2013 1659 bsteffen Add PDOs to D2DGridResource in * Feb 25, 2013 1659 bsteffen Add PDOs to D2DGridResource in
* constructor to avoid duplicate data * constructor to avoid duplicate data
* requests. * requests.
* Jul 15, 2013 2107 bsteffen Fix sampling of grid vector arrows.
* *
* </pre> * </pre>
* *
@ -273,18 +275,25 @@ public class D2DGridResource extends GridResource<GridResourceData> implements
@Override @Override
public String inspect(ReferencedCoordinate coord) throws VizException { public String inspect(ReferencedCoordinate coord) throws VizException {
if (getDisplayType() == DisplayType.IMAGE) { if (resourceData.isSampling()) {
return super.inspect(coord); if (getDisplayType() == DisplayType.ARROW) {
} else if (resourceData.isSampling()) { Map<String, Object> map = interrogate(coord);
GridRecord record = getCurrentGridRecord(); if (map == null) {
if (record == null) { return "NO DATA";
return super.inspect(coord);
} }
double value = (Double) map.get(INTERROGATE_VALUE);
return sampleFormat.format(value) + map.get(INTERROGATE_UNIT);
} else if (getDisplayType() == DisplayType.CONTOUR) {
GridRecord record = getCurrentGridRecord();
if (record != null) {
return record.getParameter().getAbbreviation() + "=" return record.getParameter().getAbbreviation() + "="
+ super.inspect(coord); + super.inspect(coord);
} else { }
}
} else if (getDisplayType() != DisplayType.IMAGE) {
return null; return null;
} }
return super.inspect(coord);
} }
@Override @Override

View file

@ -37,33 +37,34 @@ import org.eclipse.core.runtime.ListenerList;
import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.graphics.RGB;
import com.raytheon.edex.meteoLib.WindComp; import com.raytheon.edex.meteoLib.WindComp;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
import com.raytheon.uf.common.sounding.SoundingLayer; import com.raytheon.uf.common.sounding.SoundingLayer;
import com.raytheon.uf.common.sounding.SoundingLayer.DATA_TYPE;
import com.raytheon.uf.common.sounding.VerticalSounding; import com.raytheon.uf.common.sounding.VerticalSounding;
import com.raytheon.uf.common.sounding.WxMath; import com.raytheon.uf.common.sounding.WxMath;
import com.raytheon.uf.common.sounding.SoundingLayer.DATA_TYPE;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.PixelExtent;
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment; import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
import com.raytheon.uf.viz.core.IGraphicsTarget.LineStyle; import com.raytheon.uf.viz.core.IGraphicsTarget.LineStyle;
import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle; import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle;
import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment; import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment;
import com.raytheon.uf.viz.core.PixelExtent;
import com.raytheon.uf.viz.core.drawables.IFont; import com.raytheon.uf.viz.core.drawables.IFont;
import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.PaintProperties;
import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.map.MapDescriptor; import com.raytheon.uf.viz.core.map.MapDescriptor;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged; import com.raytheon.uf.viz.core.rsc.IResourceDataChanged;
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType;
import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability; import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.DensityCapability; import com.raytheon.uf.viz.core.rsc.capabilities.DensityCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability; import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.OutlineCapability; import com.raytheon.uf.viz.core.rsc.capabilities.OutlineCapability;
import com.raytheon.uf.viz.core.status.StatusConstants;
import com.raytheon.uf.viz.sounding.SoundingParams; import com.raytheon.uf.viz.sounding.SoundingParams;
import com.raytheon.uf.viz.xy.map.rsc.IInsetMapResource; import com.raytheon.uf.viz.xy.map.rsc.IInsetMapResource;
import com.raytheon.uf.viz.xy.map.rsc.PointRenderable; import com.raytheon.uf.viz.xy.map.rsc.PointRenderable;
@ -71,7 +72,6 @@ import com.raytheon.viz.core.ColorUtil;
import com.raytheon.viz.core.graphing.LineStroke; import com.raytheon.viz.core.graphing.LineStroke;
import com.raytheon.viz.core.graphing.WGraphics; import com.raytheon.viz.core.graphing.WGraphics;
import com.raytheon.viz.core.graphing.WindBarbFactory; import com.raytheon.viz.core.graphing.WindBarbFactory;
import com.raytheon.viz.skewt.Activator;
import com.raytheon.viz.skewt.SkewTDescriptor; import com.raytheon.viz.skewt.SkewTDescriptor;
import com.raytheon.viz.skewt.SkewtDisplay; import com.raytheon.viz.skewt.SkewtDisplay;
import com.raytheon.viz.skewt.rscdata.SkewTResourceData; import com.raytheon.viz.skewt.rscdata.SkewTResourceData;
@ -88,6 +88,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Sep 10, 2009 randerso Initial creation * Sep 10, 2009 randerso Initial creation
* Jul 05, 2013 1869 bsteffen Fix goes sounding updates.
* *
* </pre> * </pre>
* *
@ -1538,4 +1539,24 @@ public class SkewTResource extends
} }
point.paint(target, paintProps); point.paint(target, paintProps);
} }
@Override
protected void resourceDataChanged(ChangeType type, Object updateObject) {
super.resourceDataChanged(type, updateObject);
if (type == ChangeType.DATA_UPDATE
&& updateObject instanceof PluginDataObject[]) {
PluginDataObject[] objects = (PluginDataObject[]) updateObject;
try {
VerticalSounding[] soundings = resourceData
.convertToSounding(objects);
for (VerticalSounding vs : soundings) {
addSounding(vs.getDataTime(), vs);
}
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
}
}
}
} }

View file

@ -51,6 +51,7 @@ import com.raytheon.viz.skewt.rsc.SkewTResource;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Sep 23, 2009 randerso Initial creation * Sep 23, 2009 randerso Initial creation
* Jul 05, 2013 1869 bsteffen Fix goes sounding updates.
* *
* </pre> * </pre>
* *
@ -92,16 +93,20 @@ public class SkewTResourceData extends AbstractRequestableResourceData {
protected SkewTResource constructResource(LoadProperties loadProperties, protected SkewTResource constructResource(LoadProperties loadProperties,
PluginDataObject[] objects) throws VizException { PluginDataObject[] objects) throws VizException {
soundings = convertToSounding(objects);
return new SkewTResource(this, loadProperties);
}
public VerticalSounding[] convertToSounding(PluginDataObject[] objects)
throws VizException {
if (objects != null && objects.length > 0) { if (objects != null && objects.length > 0) {
AbstractVerticalSoundingAdapter adapter = getAdapter(objects[0]); AbstractVerticalSoundingAdapter adapter = getAdapter(objects[0]);
adapter.setObjects(objects); adapter.setObjects(objects);
soundings = adapter.createSoundings(); return adapter.createSoundings();
} else { } else {
soundings = new VerticalSounding[0]; return new VerticalSounding[0];
} }
SkewTResource rsc = new SkewTResource(this, loadProperties);
return rsc;
} }
protected AbstractVerticalSoundingAdapter getAdapter(PluginDataObject object) protected AbstractVerticalSoundingAdapter getAdapter(PluginDataObject object)

View file

@ -60,6 +60,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class. * Sep 27, 2012 1149 jsanchez Refactored methods from AbstractWarningsResource into this class.
* Apr 18, 2013 1877 jsanchez Ordered the records the same for update and initial load. * Apr 18, 2013 1877 jsanchez Ordered the records the same for update and initial load.
* Removed no longer needed frameAltered. Do not set wire frame for a CAN. * Removed no longer needed frameAltered. Do not set wire frame for a CAN.
* Jul 24, 2013 DR16350 mgamazaychikov Fix the problem with plotting EXP warning
* </pre> * </pre>
* *
* @author jsanchez * @author jsanchez
@ -233,7 +234,7 @@ public class WarningsResource extends AbstractWWAResource {
for (AbstractWarningRecord warnrec : recordsToLoad) { for (AbstractWarningRecord warnrec : recordsToLoad) {
WarningAction act = WarningAction.valueOf(warnrec.getAct()); WarningAction act = WarningAction.valueOf(warnrec.getAct());
if (act == WarningAction.CON || act == WarningAction.CAN if (act == WarningAction.CON || act == WarningAction.CAN
|| act == WarningAction.EXP || act == WarningAction.EXT) { || act == WarningAction.EXT) {
AbstractWarningRecord createShape = null; AbstractWarningRecord createShape = null;
for (String key : entryMap.keySet()) { for (String key : entryMap.keySet()) {
WarningEntry entry = entryMap.get(key); WarningEntry entry = entryMap.get(key);

View file

@ -191,6 +191,19 @@ public class ArchiveConfig implements Comparable<ArchiveConfig> {
this.categoryList = categoryList; this.categoryList = categoryList;
} }
/**
* Check for required entries.
*/
public boolean isValid() {
return (name != null) && (rootDir != null) && (categoryList != null)
&& (categoryList.size() > 0);
}
/*
* (non-Javadoc)
*
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
@Override @Override
public int compareTo(ArchiveConfig o) { public int compareTo(ArchiveConfig o) {
return getName().compareToIgnoreCase(o.getName()); return getName().compareToIgnoreCase(o.getName());

View file

@ -37,6 +37,7 @@ import java.util.TreeSet;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.xml.bind.DataBindingException;
import javax.xml.bind.JAXB; import javax.xml.bind.JAXB;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
@ -75,6 +76,8 @@ import com.raytheon.uf.common.util.FileUtil;
* Updated purgeExpiredFromArchive to check time of files in * Updated purgeExpiredFromArchive to check time of files in
* directory before purging them. * directory before purging them.
* Added null check for topLevelDirs in purgeExpiredFromArchive. * Added null check for topLevelDirs in purgeExpiredFromArchive.
* Changed to use File.delete() instead of Apache FileUtil.deleteQuietly().
* Added warn logging for failure to delete.
* *
* </pre> * </pre>
* *
@ -89,7 +92,7 @@ public class ArchiveConfigManager {
private final static ArchiveConfigManager instance = new ArchiveConfigManager(); private final static ArchiveConfigManager instance = new ArchiveConfigManager();
/** Localize directory for the archive configuration files. */ /** Localize directory for the archive configuration files. */
public final String ARCHIVE_DIR = "archive"; public final String ARCHIVE_DIR = "archiver/purger";
/** Localization manager. */ /** Localization manager. */
private IPathManager pathMgr; private IPathManager pathMgr;
@ -167,19 +170,6 @@ public class ArchiveConfigManager {
return names; return names;
} }
/**
* Load the archiveConfig information from the localized file.
*
* @param lFile
* @return archiveConfig
* @throws IOException
* @throws LocalizationException
*/
public ArchiveConfig loadArchiveData(LocalizationFile lFile)
throws IOException, LocalizationException {
return unmarshalArhiveConfigFromXmlFile(lFile);
}
/** /**
* @return the Collection of Archives. * @return the Collection of Archives.
*/ */
@ -280,9 +270,9 @@ public class ArchiveConfigManager {
Calendar purgeTime = calculateExpiration(archive, category); Calendar purgeTime = calculateExpiration(archive, category);
CategoryFileDateHelper helper = new CategoryFileDateHelper( CategoryFileDateHelper helper = new CategoryFileDateHelper(
category, archive.getRootDir()); category, archive.getRootDir());
IOFileFilter fileDateFilter = FileFilterUtils.and( IOFileFilter fileDateFilter = FileFilterUtils.and(FileFilterUtils
FileFilterUtils.fileFileFilter(), .fileFileFilter(), new FileDateFilter(null, purgeTime,
new FileDateFilter(null, purgeTime, helper)); helper));
// Remove the directory associated with this category from the not // Remove the directory associated with this category from the not
// purged list since it is being purged. // purged list since it is being purged.
@ -320,13 +310,17 @@ public class ArchiveConfigManager {
return filesPurged; return filesPurged;
} }
private Collection<File> purgeFile(File fileToPurge, private Collection<File> purgeFile(File fileToPurge, IOFileFilter filter,
IOFileFilter filter, final String archiveRootDir) { final String archiveRootDir) {
Collection<File> filesPurged = new ArrayList<File>(); Collection<File> filesPurged = new ArrayList<File>();
if (fileToPurge.isFile() && filter.accept(fileToPurge)) { if (fileToPurge.isFile() && filter.accept(fileToPurge)) {
if (fileToPurge.delete()) {
filesPurged.add(fileToPurge); filesPurged.add(fileToPurge);
FileUtils.deleteQuietly(fileToPurge); } else {
statusHandler.warn("Failed to purge file: "
+ fileToPurge.getAbsolutePath());
}
} else if (fileToPurge.isDirectory()) { } else if (fileToPurge.isDirectory()) {
Collection<File> expiredFilesInDir = FileUtils.listFiles( Collection<File> expiredFilesInDir = FileUtils.listFiles(
fileToPurge, filter, FileFilterUtils.trueFileFilter()); fileToPurge, filter, FileFilterUtils.trueFileFilter());
@ -339,7 +333,10 @@ public class ArchiveConfigManager {
// delete it // delete it
if (fileToPurge.list().length == 0 if (fileToPurge.list().length == 0
&& !fileToPurge.getAbsolutePath().equals(archiveRootDir)) { && !fileToPurge.getAbsolutePath().equals(archiveRootDir)) {
FileUtils.deleteQuietly(fileToPurge); if (!fileToPurge.delete()) {
statusHandler.warn("Failed to purge directory: "
+ fileToPurge.getAbsolutePath());
}
} }
} }
return filesPurged; return filesPurged;
@ -394,9 +391,19 @@ public class ArchiveConfigManager {
for (LocalizationFile lFile : files) { for (LocalizationFile lFile : files) {
try { try {
ArchiveConfig archiveConfig = unmarshalArhiveConfigFromXmlFile(lFile); ArchiveConfig archiveConfig = unmarshalArhiveConfigFromXmlFile(lFile);
archiveNameToLocalizationFileMap.put(archiveConfig.getName(), if (archiveConfig != null && archiveConfig.isValid()) {
lFile); archiveNameToLocalizationFileMap.put(
archiveConfig.getName(), lFile);
archiveMap.put(archiveConfig.getName(), archiveConfig); archiveMap.put(archiveConfig.getName(), archiveConfig);
} else {
statusHandler.handle(Priority.ERROR,
"Bad Archive configuration file: "
+ lFile.getFile().getName());
}
} catch (DataBindingException ex) {
statusHandler.handle(Priority.ERROR,
"Bad Archive configuration file \""
+ lFile.getFile().getName() + "\": ", ex);
} catch (IOException e) { } catch (IOException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e); e);
@ -762,7 +769,8 @@ public class ArchiveConfigManager {
* @throws LocalizationException * @throws LocalizationException
*/ */
private ArchiveConfig unmarshalArhiveConfigFromXmlFile( private ArchiveConfig unmarshalArhiveConfigFromXmlFile(
LocalizationFile lFile) throws IOException, LocalizationException { LocalizationFile lFile) throws IOException, LocalizationException,
DataBindingException {
ArchiveConfig archiveConfig = null; ArchiveConfig archiveConfig = null;
LocalizationFileInputStream stream = null; LocalizationFileInputStream stream = null;
try { try {

View file

@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.ffmp;
**/ **/
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.ISerializableObject;
@ -37,6 +36,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 01/27/13 1478 D. Hladky Created to reduce memory and disk read/writes for FFMP * 01/27/13 1478 D. Hladky Created to reduce memory and disk read/writes for FFMP
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -53,8 +53,6 @@ public class FFMPAggregateRecord implements ISerializableObject {
@DynamicSerializeElement @DynamicSerializeElement
private String sourceSiteDataKey; private String sourceSiteDataKey;
private static final long serialVersionUID = 767745643535471L;
/** /**
* Aggregate Record implementation for FFMP * Aggregate Record implementation for FFMP
*/ */
@ -63,7 +61,15 @@ public class FFMPAggregateRecord implements ISerializableObject {
} }
@DynamicSerializeElement @DynamicSerializeElement
private HashMap<String, FFMPBasinData> basinsMap = new HashMap<String, FFMPBasinData>(); private FFMPBasinData basins;
public FFMPBasinData getBasins() {
return basins;
}
public void setBasins(FFMPBasinData basins) {
this.basins = basins;
}
@DynamicSerializeElement @DynamicSerializeElement
private List<Long> times = new ArrayList<Long>(); private List<Long> times = new ArrayList<Long>();
@ -84,34 +90,6 @@ public class FFMPAggregateRecord implements ISerializableObject {
return times; return times;
} }
public void setBasinsMap(HashMap<String, FFMPBasinData> basinsMap) {
this.basinsMap = basinsMap;
}
public HashMap<String, FFMPBasinData> getBasinsMap() {
return basinsMap;
}
/**
* Add a basin Data aggregate object
* @param cacheData
*/
public void addBasinData(FFMPBasinData basinData) {
basinsMap.put(basinData.getHucLevel(), basinData);
}
/**
* Gets the BasinData object
* @param huc
* @return
*/
public FFMPBasinData getBasinData(String huc) {
if (basinsMap.containsKey(huc)) {
return basinsMap.get(huc);
}
return null;
}
/** /**
* WFO designator * WFO designator
* @return * @return

View file

@ -31,7 +31,6 @@ import javax.persistence.Transient;
import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.time.util.ImmutableDate;
/** /**
* FFMP basin/aggregated value holder * FFMP basin/aggregated value holder
@ -48,6 +47,7 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
* from aggregate records and delayed * from aggregate records and delayed
* TreeMap creation to the tertiary loader. * TreeMap creation to the tertiary loader.
* Apr 26, 2013 1954 bsteffen Minor code cleanup throughout FFMP. * Apr 26, 2013 1954 bsteffen Minor code cleanup throughout FFMP.
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *

View file

@ -53,6 +53,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 04/16/13 1912 bsteffen Initial bulk hdf5 access for ffmp * 04/16/13 1912 bsteffen Initial bulk hdf5 access for ffmp
* 05/09/13 1919 mpduff Use parent pfaf instead of lookupId. * 05/09/13 1919 mpduff Use parent pfaf instead of lookupId.
* 07/09/13 2152 njensen Ensure purgeData() does not load data * 07/09/13 2152 njensen Ensure purgeData() does not load data
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -61,7 +62,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
public class FFMPBasinData implements ISerializableObject { public class FFMPBasinData implements ISerializableObject {
private static final long serialVersionUID = 8162247989509750715L;
public static final double GUIDANCE_MISSING = -999999.0; public static final double GUIDANCE_MISSING = -999999.0;
@ -82,15 +82,6 @@ public class FFMPBasinData implements ISerializableObject {
*/ */
private final Map<String, FFMPBasin[]> orderedBasinsCache = new HashMap<String, FFMPBasin[]>(); private final Map<String, FFMPBasin[]> orderedBasinsCache = new HashMap<String, FFMPBasin[]>();
/**
* Public one arg constructor
*
* @param huc_level
*/
public FFMPBasinData(String hucLevel) {
setHucLevel(hucLevel);
}
/** /**
* No arg hibernate constructor * No arg hibernate constructor
*/ */
@ -174,6 +165,8 @@ public class FFMPBasinData implements ISerializableObject {
* Extracts the average value for an aggregation of basins * Extracts the average value for an aggregation of basins
* *
* @param pfaf_ids * @param pfaf_ids
* @param startDate
* @param finishDate
* @return * @return
*/ */
public float getAverageValue(ArrayList<Long> pfaf_ids, Date beforeDate, public float getAverageValue(ArrayList<Long> pfaf_ids, Date beforeDate,
@ -193,6 +186,55 @@ public class FFMPBasinData implements ISerializableObject {
return tvalue; return tvalue;
} }
/**
* Extracts the average value for an aggregation of basins
*
* @param pfaf_ids
* @param exact
* date
* @return
*/
public float getAverageValue(ArrayList<Long> pfaf_ids, Date date) {
float tvalue = 0.0f;
int i = 0;
for (Long pfaf : pfaf_ids) {
FFMPBasin basin = getBasins().get(pfaf);
if (basin != null) {
tvalue += basin.getValue(date);
i++;
}
}
tvalue = tvalue / i;
return tvalue;
}
/**
* Extracts the average value for an aggregation of basins
*
* @param pfaf_ids
* @param date
* @param expirationTime
* @return
*/
public float getAverageValue(ArrayList<Long> pfaf_ids, Date date,
long epirationTime) {
float tvalue = 0.0f;
int i = 0;
for (Long pfaf : pfaf_ids) {
FFMPBasin basin = getBasins().get(pfaf);
if (basin != null) {
tvalue += basin.getAverageValue(date, epirationTime);
i++;
}
}
tvalue = tvalue / i;
return tvalue;
}
/** /**
* Extracts the average value for an aggregation of basins with areal * Extracts the average value for an aggregation of basins with areal
* weighting * weighting
@ -231,8 +273,8 @@ public class FFMPBasinData implements ISerializableObject {
* @param pfaf_ids * @param pfaf_ids
* @return * @return
*/ */
public float getAccumAverageValue(ArrayList<Long> pfaf_ids, public float getAccumAverageValue(List<Long> pfaf_ids, Date beforeDate,
Date beforeDate, Date afterDate, long expirationTime, boolean rate) { Date afterDate, long expirationTime, boolean rate) {
float tvalue = 0.0f; float tvalue = 0.0f;
int i = 0; int i = 0;
@ -536,6 +578,34 @@ public class FFMPBasinData implements ISerializableObject {
return values; return values;
} }
/**
* Gets the average guidance value for an aggregate basin
*
* @param pfaf_ids
* @param interpolation
* @param expiration
* @return
*/
public Float getAverageGuidanceValue(List<Long> pfaf_ids,
FFMPGuidanceInterpolation interpolation, long expiration) {
float tvalue = 0.0f;
int i = 0;
List<Float> vals = getGuidanceValues(pfaf_ids, interpolation,
expiration);
if (vals != null) {
for (Float val : vals) {
tvalue += val;
i++;
}
} else {
return null;
}
return tvalue / i;
}
/** /**
* used for max ratio and diff calcs * used for max ratio and diff calcs
* *

View file

@ -24,8 +24,6 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager.SOURCE_TYPE; import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager.SOURCE_TYPE;
import com.raytheon.uf.common.monitor.xml.SourceXML; import com.raytheon.uf.common.monitor.xml.SourceXML;
@ -48,6 +46,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* 01/27/13 1478 D. Hladky Re-worked to help with memory size and NAS read write stress * 01/27/13 1478 D. Hladky Re-worked to help with memory size and NAS read write stress
* Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp * Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp
* 07/03/13 2131 D. Hladky Fixed null pointers thrown by new container creation. * 07/03/13 2131 D. Hladky Fixed null pointers thrown by new container creation.
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -60,7 +59,7 @@ public class FFMPDataContainer {
private static final transient IUFStatusHandler statusHandler = UFStatus private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(FFMPDataContainer.class); .getHandler(FFMPDataContainer.class);
private final Map<String, FFMPBasinData> basinDataMap = new ConcurrentHashMap<String, FFMPBasinData>();// DR private FFMPBasinData basins;
private String sourceName = null; private String sourceName = null;
@ -72,43 +71,42 @@ public class FFMPDataContainer {
/** /**
* Usual constructor * Usual constructor
*
* @param sourceName * @param sourceName
*/ */
public FFMPDataContainer(String sourceName) { public FFMPDataContainer(String sourceName) {
this.sourceName = sourceName; this.sourceName = sourceName;
basinDataMap.put(FFMPRecord.ALL, new FFMPBasinData(FFMPRecord.ALL)); basins = new FFMPBasinData();
// System.out.println("Creating source: " + sourceName);
} }
/** /**
* special constuctor * special constuctor
*
* @param sourceName * @param sourceName
* @param hucs * @param hucs
*/ */
public FFMPDataContainer(String sourceName, ArrayList<String> hucs) { public FFMPDataContainer(String sourceName, ArrayList<String> hucs) {
// System.out.println("Creating source with hucs: " + sourceName); // System.out.println("Creating source with hucs: " + sourceName);
this.sourceName = sourceName; this.sourceName = sourceName;
for (String huc : hucs) { basins = new FFMPBasinData();
basinDataMap.put(huc, new FFMPBasinData(huc));
}
} }
/** /**
* new container first time read in from cache * new container first time read in from cache
*
* @param sourceName * @param sourceName
* @param hucs * @param hucs
* @param record * @param record
*/ */
public FFMPDataContainer(String sourceName, ArrayList<String> hucs, public FFMPDataContainer(String sourceName, FFMPAggregateRecord record) {
FFMPAggregateRecord record) {
// System.out.println("Creating source with hucs: " + sourceName); // System.out.println("Creating source with hucs: " + sourceName);
this.sourceName = sourceName; this.sourceName = sourceName;
for (String huc : hucs) { FFMPBasinData basinData = record.getBasins();
FFMPBasinData basinData = record.getBasinData(huc);
if (basinData != null) { if (basinData != null) {
basinData.populate(record.getTimes()); basinData.populate(record.getTimes());
basinDataMap.put(huc, basinData); basins = basinData;
}
} }
} }
@ -119,7 +117,7 @@ public class FFMPDataContainer {
* @param newBasinData * @param newBasinData
*/ */
public void addFFMPEntry(Date date, SourceXML source, public void addFFMPEntry(Date date, SourceXML source,
FFMPBasinData newBasinData, String huc, String siteKey) { FFMPBasinData newBasinData, String siteKey) {
boolean guid = false; boolean guid = false;
@ -127,10 +125,10 @@ public class FFMPDataContainer {
guid = true; guid = true;
} }
FFMPBasinData currBasinData = getBasinData(huc); FFMPBasinData currBasinData = getBasinData();
if (currBasinData == null) { if (currBasinData == null) {
setBasinData(huc, newBasinData); setBasinData(newBasinData);
} else { } else {
synchronized (currBasinData) { synchronized (currBasinData) {
@ -287,10 +285,9 @@ public class FFMPDataContainer {
public boolean containsKey(Date date) { public boolean containsKey(Date date) {
boolean contains = false; boolean contains = false;
if (getBasinData(FFMPRecord.ALL) != null) { if (getBasinData() != null) {
Map<Long, FFMPBasin> basins = getBasinData(FFMPRecord.ALL) Map<Long, FFMPBasin> basins = getBasinData().getBasins();
.getBasins();
synchronized (basins) { synchronized (basins) {
for (Entry<Long, FFMPBasin> entry : basins.entrySet()) { for (Entry<Long, FFMPBasin> entry : basins.entrySet()) {
@ -313,7 +310,7 @@ public class FFMPDataContainer {
*/ */
public boolean containsKey(String sourceName) { public boolean containsKey(String sourceName) {
boolean contains = false; boolean contains = false;
Map<Long, FFMPBasin> basins = getBasinData(FFMPRecord.ALL).getBasins(); Map<Long, FFMPBasin> basins = getBasinData().getBasins();
synchronized (basins) { synchronized (basins) {
for (Entry<Long, FFMPBasin> entry : basins.entrySet()) { for (Entry<Long, FFMPBasin> entry : basins.entrySet()) {
@ -338,18 +335,14 @@ public class FFMPDataContainer {
* *
* @return * @return
*/ */
public FFMPBasinData getBasinData(String huc) { public FFMPBasinData getBasinData() {
if (basinDataMap.containsKey(huc)) { if (basins != null) {
return basinDataMap.get(huc); return basins;
} else { } else {
return null; return null;
} }
} }
public Set<String> getKeys() {
return basinDataMap.keySet();
}
/** /**
* Get the maximum value in the monitored area. * Get the maximum value in the monitored area.
* *
@ -363,9 +356,8 @@ public class FFMPDataContainer {
public double getMaxValue(ArrayList<Long> pfafs, Date backDate, public double getMaxValue(ArrayList<Long> pfafs, Date backDate,
Date currDate, long expirationTime, boolean rate) { Date currDate, long expirationTime, boolean rate) {
double val = getBasinData(FFMPRecord.ALL).getAccumMaxValue(pfafs, double val = getBasinData().getAccumMaxValue(pfafs, currDate, backDate,
currDate, expirationTime, rate);
backDate, expirationTime, rate);
return val; return val;
} }
@ -378,8 +370,7 @@ public class FFMPDataContainer {
public Date getNewest() { public Date getNewest() {
try { try {
Map<Long, FFMPBasin> basins = getBasinData(FFMPRecord.ALL) Map<Long, FFMPBasin> basins = getBasinData().getBasins();
.getBasins();
synchronized (basins) { synchronized (basins) {
for (Entry<Long, FFMPBasin> entry : basins.entrySet()) { for (Entry<Long, FFMPBasin> entry : basins.entrySet()) {
@ -406,8 +397,7 @@ public class FFMPDataContainer {
*/ */
public Date getOldest() { public Date getOldest() {
try { try {
Map<Long, FFMPBasin> basins = getBasinData(FFMPRecord.ALL) Map<Long, FFMPBasin> basins = getBasinData().getBasins();
.getBasins();
synchronized (basins) { synchronized (basins) {
for (Entry<Long, FFMPBasin> entry : basins.entrySet()) { for (Entry<Long, FFMPBasin> entry : basins.entrySet()) {
@ -435,8 +425,7 @@ public class FFMPDataContainer {
public List<Date> getOrderedTimes(Date barrierTime) { public List<Date> getOrderedTimes(Date barrierTime) {
ArrayList<Date> orderedTimes = new ArrayList<Date>(); ArrayList<Date> orderedTimes = new ArrayList<Date>();
try { try {
Map<Long, FFMPBasin> basins = getBasinData(FFMPRecord.ALL) Map<Long, FFMPBasin> basins = getBasinData().getBasins();
.getBasins();
synchronized (basins) { synchronized (basins) {
for (Entry<Long, FFMPBasin> entry : basins.entrySet()) { for (Entry<Long, FFMPBasin> entry : basins.entrySet()) {
@ -460,13 +449,13 @@ public class FFMPDataContainer {
/** /**
* Gets the list of times for serialization * Gets the list of times for serialization
*
* @return * @return
*/ */
public List<Long> getOrderedTimes() { public List<Long> getOrderedTimes() {
ArrayList<Long> orderedTimes = new ArrayList<Long>(); ArrayList<Long> orderedTimes = new ArrayList<Long>();
try { try {
Map<Long, FFMPBasin> basins = getBasinData(FFMPRecord.ALL) Map<Long, FFMPBasin> basins = getBasinData().getBasins();
.getBasins();
synchronized (basins) { synchronized (basins) {
for (Entry<Long, FFMPBasin> entry : basins.entrySet()) { for (Entry<Long, FFMPBasin> entry : basins.entrySet()) {
@ -488,6 +477,7 @@ public class FFMPDataContainer {
/** /**
* Gets the source name for this Data Container * Gets the source name for this Data Container
*
* @return * @return
*/ */
public String getSourceName() { public String getSourceName() {
@ -496,13 +486,13 @@ public class FFMPDataContainer {
/** /**
* Clean up old junk * Clean up old junk
*
* @param backDate * @param backDate
*/ */
public void purge(Date backDate) { public void purge(Date backDate) {
statusHandler.handle(Priority.INFO, "Purging "+getSourceName()+" Container back to: "+backDate); statusHandler.handle(Priority.INFO, "Purging " + getSourceName()
for (String huc : basinDataMap.keySet()) { + " Container back to: " + backDate);
getBasinData(huc).purgeData(backDate); getBasinData().purgeData(backDate);
}
setPurged(true); setPurged(true);
} }
@ -516,10 +506,9 @@ public class FFMPDataContainer {
// create a record from the cache record // create a record from the cache record
FFMPRecord record = new FFMPRecord(cacheRecord); FFMPRecord record = new FFMPRecord(cacheRecord);
for (Entry<String, FFMPBasinData> dentry : record.getBasinsMap() FFMPBasinData dentry = record.getBasinData();
.entrySet()) {
for (Entry<Long, FFMPBasin> entry : dentry.getValue().getBasins() for (Entry<Long, FFMPBasin> entry : dentry.getBasins().entrySet()) {
.entrySet()) {
FFMPBasin basin = entry.getValue(); FFMPBasin basin = entry.getValue();
if (basin != null) { if (basin != null) {
if (basin instanceof FFMPGuidanceBasin) { if (basin instanceof FFMPGuidanceBasin) {
@ -531,11 +520,10 @@ public class FFMPDataContainer {
basin.getValues().putAll(entry.getValue().getValues()); basin.getValues().putAll(entry.getValue().getValues());
} }
} else { } else {
syncPut(getBasinData(dentry.getKey()), entry.getKey(), syncPut(getBasinData(), entry.getKey(), entry.getValue());
entry.getValue());
}
} }
} }
} }
/** /**
@ -543,8 +531,8 @@ public class FFMPDataContainer {
* *
* @param basins * @param basins
*/ */
public void setBasinData(String huc, FFMPBasinData fftiData) { public void setBasinData(FFMPBasinData basins) {
basinDataMap.put(huc, fftiData); this.basins = basins;
} }
public void setSourceName(String sourceName) { public void setSourceName(String sourceName) {
@ -559,7 +547,7 @@ public class FFMPDataContainer {
*/ */
public int size() { public int size() {
Map<Long, FFMPBasin> basins = getBasinData(FFMPRecord.ALL).getBasins(); Map<Long, FFMPBasin> basins = getBasinData().getBasins();
synchronized (basins) { synchronized (basins) {
for (Entry<Long, FFMPBasin> entry : basins.entrySet()) { for (Entry<Long, FFMPBasin> entry : basins.entrySet()) {
@ -591,16 +579,9 @@ public class FFMPDataContainer {
} }
} }
/**
* Gets the basin data map
* @return
*/
public Map<String, FFMPBasinData> getBasinMap() {
return basinDataMap;
}
/** /**
* Sets whether this container has been purged or not * Sets whether this container has been purged or not
*
* @param isPurged * @param isPurged
*/ */
public void setPurged(boolean isPurged) { public void setPurged(boolean isPurged) {
@ -609,6 +590,7 @@ public class FFMPDataContainer {
/** /**
* Has this container been purged? * Has this container been purged?
*
* @return * @return
*/ */
public boolean isPurged() { public boolean isPurged() {

View file

@ -24,7 +24,6 @@ import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@ -89,6 +88,7 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
* Apr 18, 2013 1919 dhladky Added method for VGB loading * Apr 18, 2013 1919 dhladky Added method for VGB loading
* May 07, 2013 1869 bsteffen Remove dataURI column from * May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject. * PluginDataObject.
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -142,7 +142,7 @@ public class FFMPRecord extends PersistablePluginDataObject
private String siteKey; private String siteKey;
@Transient @Transient
private HashMap<String, FFMPBasinData> basinsMap = new HashMap<String, FFMPBasinData>(); private FFMPBasinData basins = new FFMPBasinData();;
@Transient @Transient
private int expiration = 0; private int expiration = 0;
@ -157,8 +157,10 @@ public class FFMPRecord extends PersistablePluginDataObject
/** ALL HUC LEVEL **/ /** ALL HUC LEVEL **/
public static final String ALL = "ALL"; public static final String ALL = "ALL";
/** COUNTY HUC LEVEL **/ /** COUNTY HUC LEVEL **/
public static final String COUNTY = "COUNTY"; public static final String COUNTY = "COUNTY";
/** VIRTUAL HUC LEVEL **/ /** VIRTUAL HUC LEVEL **/
public static final String VIRTUAL = "VIRTUAL"; public static final String VIRTUAL = "VIRTUAL";
@ -359,8 +361,8 @@ public class FFMPRecord extends PersistablePluginDataObject
* @param hucName * @param hucName
*/ */
public void setBasinData(FFMPBasinData basins, String hucName) { public void setBasinData(FFMPBasinData basins) {
basinsMap.put(hucName, basins); this.basins = basins;
} }
/** /**
@ -369,24 +371,10 @@ public class FFMPRecord extends PersistablePluginDataObject
* @param basins * @param basins
* @param hucName * @param hucName
*/ */
public FFMPBasinData getBasinData(String hucName) { public FFMPBasinData getBasinData() {
FFMPBasinData basins = basinsMap.get(hucName);
if (basins == null) {
basins = new FFMPBasinData(hucName);
basinsMap.put(hucName, basins);
}
return basins; return basins;
} }
/**
* Gets the map if you need it
*
* @return
*/
public HashMap<String, FFMPBasinData> getBasinsMap() {
return basinsMap;
}
/** /**
* Gets the Hash out of the datastore by HUC * Gets the Hash out of the datastore by HUC
* *
@ -394,41 +382,36 @@ public class FFMPRecord extends PersistablePluginDataObject
* @param huc * @param huc
*/ */
public void retrieveMapFromDataStore(File datastoreFile, String uri, public void retrieveMapFromDataStore(File datastoreFile, String uri,
FFMPTemplates template, String huc, Date date, String sourceName) FFMPTemplates template, Date date, String sourceName)
throws Exception { throws Exception {
FFMPBasinData fbd = getBasinData(huc); FFMPBasinData fbd = getBasinData();
ImmutableDate idate = getCacheDate(date); ImmutableDate idate = getCacheDate(date);
boolean aggregate = false;
boolean aggregate = true;
if (huc.equals(ALL)) {
aggregate = false;
}
for (DomainXML domain : template.getDomains()) { for (DomainXML domain : template.getDomains()) {
LinkedHashMap<Long, ?> map = template.getMap(getSiteKey(), LinkedHashMap<Long, ?> map = template.getMap(getSiteKey(),
domain.getCwa(), huc); domain.getCwa(), FFMPRecord.ALL);
if (map != null && !map.isEmpty()) { if (map != null && !map.isEmpty()) {
fbd.addBasins(datastoreFile, uri, getSiteKey(), fbd.addBasins(datastoreFile, uri, getSiteKey(),
domain.getCwa(), huc, sourceName, idate, map.keySet(), domain.getCwa(), FFMPRecord.ALL, sourceName, idate,
aggregate); map.keySet(), aggregate);
} }
} }
} }
public void retrieveMapFromDataStore(FFMPTemplates template, String huc) public void retrieveMapFromDataStore(FFMPTemplates template)
throws Exception { throws Exception {
retrieveMapFromDataStore(getDataStoreFile(), getDataURI(), template, retrieveMapFromDataStore(getDataStoreFile(), getDataURI(), template,
huc, getDataTime().getRefTime(), getSourceName()); getDataTime().getRefTime(), getSourceName());
} }
public void retrieveVirtualMapFromDataStore(FFMPTemplates template, public void retrieveVirtualMapFromDataStore(FFMPTemplates template)
String huc) throws Exception { throws Exception {
retrieveVirtualMapFromDataStore(getDataStoreFile(), getDataURI(), template, retrieveVirtualMapFromDataStore(getDataStoreFile(), getDataURI(),
getDataTime().getRefTime(), getSourceName()); template, getDataTime().getRefTime(), getSourceName());
} }
private File getDataStoreFile() { private File getDataStoreFile() {
@ -523,7 +506,7 @@ public class FFMPRecord extends PersistablePluginDataObject
public void retrieveVirtualMapFromDataStore(File datastoreFile, String uri, public void retrieveVirtualMapFromDataStore(File datastoreFile, String uri,
FFMPTemplates template, Date date, String sourceName) FFMPTemplates template, Date date, String sourceName)
throws StorageException, FileNotFoundException { throws StorageException, FileNotFoundException {
FFMPBasinData fbd = getBasinData(ALL); FFMPBasinData fbd = getBasinData();
String key = getDataKey(); String key = getDataKey();
ImmutableDate idate = getCacheDate(date); ImmutableDate idate = getCacheDate(date);
@ -537,8 +520,7 @@ public class FFMPRecord extends PersistablePluginDataObject
if (size > 0) { if (size > 0) {
fbd.addVirtualBasins(datastoreFile, uri, key, fbd.addVirtualBasins(datastoreFile, uri, key,
domain.getCwa(), idate, domain.getCwa(), idate, lids.values());
lids.values());
} }
} }
} }
@ -569,10 +551,9 @@ public class FFMPRecord extends PersistablePluginDataObject
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
sb.append("\n dataURI: " + getDataURI() + "\n"); sb.append("\n dataURI: " + getDataURI() + "\n");
if (basinsMap != null) { if (basins != null) {
for (String key : basinsMap.keySet()) { for (Long key : basins.getBasins().keySet()) {
sb.append(key + " : " + basinsMap.get(key).getBasins().size() sb.append(key + " : " + basins.get(key).getValue() + "\n");
+ "\n");
} }
} }
@ -635,10 +616,7 @@ public class FFMPRecord extends PersistablePluginDataObject
* @param date * @param date
*/ */
public void purgeData(Date date) { public void purgeData(Date date) {
basins.purgeData(date);
for (FFMPBasinData basinData : getBasinsMap().values()) {
basinData.purgeData(date);
}
} }
public void setSiteKey(String siteKey) { public void setSiteKey(String siteKey) {
@ -651,14 +629,13 @@ public class FFMPRecord extends PersistablePluginDataObject
/** /**
* Get the fully populated aggregate record * Get the fully populated aggregate record
*
* @return * @return
*/ */
public FFMPAggregateRecord getAggregateRecord() { public FFMPAggregateRecord getAggregateRecord() {
FFMPAggregateRecord fdcr = new FFMPAggregateRecord(); FFMPAggregateRecord fdcr = new FFMPAggregateRecord();
for (FFMPBasinData basinData: basinsMap.values()) { fdcr.setBasins(basins);
fdcr.addBasinData(basinData);
}
return fdcr; return fdcr;
} }
@ -671,12 +648,9 @@ public class FFMPRecord extends PersistablePluginDataObject
public FFMPRecord(FFMPAggregateRecord fdcr) { public FFMPRecord(FFMPAggregateRecord fdcr) {
List<Long> times = fdcr.getTimes(); List<Long> times = fdcr.getTimes();
FFMPBasinData fdcrBasins = fdcr.getBasins();
for (FFMPBasinData basinData: fdcr.getBasinsMap().values()) { fdcrBasins.populate(times);
// Keep in mind times can be null, Guidance basins are like that setBasinData(fdcrBasins);
basinData.populate(times);
setBasinData(basinData, basinData.getHucLevel());
}
} }
/** /**
@ -706,17 +680,14 @@ public class FFMPRecord extends PersistablePluginDataObject
return myDate; return myDate;
} }
/** /**
* Populate data from the cache files * Populate data from the cache files
*
* @param basins * @param basins
* @param hucName * @param hucName
*/ */
public void populate(FFMPBasinData basins, String hucName) { public void populate(FFMPBasinData basins) {
setBasinData(basins);
setBasinData(basins, hucName);
//System.out.println("Adding Whole Object Cache Data: "+hucName+" "+getSourceName());
} }
@Override @Override

View file

@ -89,6 +89,7 @@ import com.vividsolutions.jts.io.WKBReader;
* 04/15/13 1902 M. Duff Generic List * 04/15/13 1902 M. Duff Generic List
* 06/10/13 2085 njensen Use countyMap for efficiency * 06/10/13 2085 njensen Use countyMap for efficiency
* 07/01/13 2155 dhladky Fixed duplicate pfafs that were in domainList arrays from overlapping domains. * 07/01/13 2155 dhladky Fixed duplicate pfafs that were in domainList arrays from overlapping domains.
* 07/15/13 2184 dhladky Remove all HUC's for storage except ALL
* </pre> * </pre>
* *
* @author dhladky * @author dhladky
@ -1333,6 +1334,27 @@ public class FFMPTemplates {
return map; return map;
} }
/**
* Find the list of pfafs for this HUC level
*
* @param siteKey
* @param huc
* @param domains
* @return
*/
public synchronized List<Long> getHucKeyList(String siteKey, String huc,
List<DomainXML> domains) {
Set<Long> keys = new HashSet<Long>();
for (DomainXML domain : domains) {
LinkedHashMap<Long, ?> map = getMap(siteKey, domain.getCwa(), huc);
keys.addAll(map.keySet());
}
return new ArrayList<Long>(keys);
}
/** /**
* Gets the template config manager * Gets the template config manager
* *
@ -1679,31 +1701,32 @@ public class FFMPTemplates {
* @return * @return
*/ */
public synchronized ArrayList<Long> getVirtualGageBasinLookupIds( public synchronized ArrayList<Long> getVirtualGageBasinLookupIds(
String dataKey, Long pfaf, String huc, String rowName, String dataKey, Long pfaf, String huc, String rowName) {
DomainXML domain) {
if (isCountyRow(huc, rowName)) { if (isCountyRow(huc, rowName)) {
return getVgbLookupIdsByCounty(dataKey, pfaf, huc, rowName, domain); return getVgbLookupIdsByCounty(dataKey, pfaf, huc, rowName);
} }
HashMap<String, HashMap<Long, ArrayList<FFMPVirtualGageBasinMetaData>>> virtualMap = virtualGageBasinsInParentPfaf HashMap<String, HashMap<Long, ArrayList<FFMPVirtualGageBasinMetaData>>> virtualMap = virtualGageBasinsInParentPfaf
.get(dataKey); .get(dataKey);
ArrayList<Long> result = new ArrayList<Long>();
for (DomainXML domain : domains) {
HashMap<Long, ArrayList<FFMPVirtualGageBasinMetaData>> map = virtualMap HashMap<Long, ArrayList<FFMPVirtualGageBasinMetaData>> map = virtualMap
.get(domain.getCwa()); .get(domain.getCwa());
if (map != null) { if (map != null) {
ArrayList<FFMPVirtualGageBasinMetaData> list = map.get(pfaf); ArrayList<FFMPVirtualGageBasinMetaData> list = map.get(pfaf);
if (list != null && !list.isEmpty()) { if (list != null && !list.isEmpty()) {
ArrayList<Long> result = new ArrayList<Long>();
for (FFMPVirtualGageBasinMetaData md : list) { for (FFMPVirtualGageBasinMetaData md : list) {
if (!result.contains(md.getLookupId())) {
result.add(md.getLookupId()); result.add(md.getLookupId());
} }
}
}
}
}
return result; return result;
} }
}
return new ArrayList<Long>();
}
/** /**
* Writes out all basins from DB by CWA * Writes out all basins from DB by CWA
@ -2438,13 +2461,16 @@ public class FFMPTemplates {
* DR 13228 * DR 13228
*/ */
public synchronized ArrayList<Long> getVgbLookupIdsByCounty(String dataKey, public synchronized ArrayList<Long> getVgbLookupIdsByCounty(String dataKey,
Long pfaf, String huc, String rowName, DomainXML domain) { Long pfaf, String huc, String rowName) {
String stateCommaCnty = rowName;// .split(",")[1]; String stateCommaCnty = rowName;
HashMap<String, HashMap<String, ArrayList<FFMPVirtualGageBasinMetaData>>> virtualMap = vgbsInCounty HashMap<String, HashMap<String, ArrayList<FFMPVirtualGageBasinMetaData>>> virtualMap = vgbsInCounty
.get(dataKey); .get(dataKey);
ArrayList<Long> result = new ArrayList<Long>();
for (DomainXML domain : domains) {
HashMap<String, ArrayList<FFMPVirtualGageBasinMetaData>> map = virtualMap HashMap<String, ArrayList<FFMPVirtualGageBasinMetaData>> map = virtualMap
.get(domain.getCwa()); .get(domain.getCwa());
if (map != null) { if (map != null) {
@ -2452,16 +2478,17 @@ public class FFMPTemplates {
.get(stateCommaCnty.trim().toUpperCase()); .get(stateCommaCnty.trim().toUpperCase());
if (list != null && !list.isEmpty()) { if (list != null && !list.isEmpty()) {
ArrayList<Long> result = new ArrayList<Long>();
for (FFMPVirtualGageBasinMetaData md : list) {
result.add(md.getLookupId());
for (FFMPVirtualGageBasinMetaData md : list) {
if (!result.contains(md.getLookupId())) {
result.add(md.getLookupId());
} }
}
}
}
}
return result; return result;
} }
}
return new ArrayList<Long>();
}
} }

View file

@ -53,6 +53,7 @@ import com.raytheon.uf.edex.database.plugin.PluginDao;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 07/01/09 2521 dhladky Initial Creation * 07/01/09 2521 dhladky Initial Creation
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -103,34 +104,20 @@ public class FFMPDao extends PluginDao {
// ignore data outside of domain // ignore data outside of domain
if (vmap.size() > 0) { if (vmap.size() > 0) {
for (String key : record.getBasinsMap().keySet()) {
FFMPBasinData fbd = record.getBasinData(key);
LinkedHashMap<Long, ?> map = template.getMap(
record.getSiteKey(), domain.getCwa(), key);
FFMPBasinData fbd = record.getBasinData();
int size = 0; int size = 0;
if (key.equals(FFMPRecord.ALL)) {
for (Entry<String, FFMPVirtualGageBasinMetaData> entry : vmap for (Entry<String, FFMPVirtualGageBasinMetaData> entry : vmap
.entrySet()) { .entrySet()) {
if (entry.getValue() != null) { if (entry.getValue() != null) {
size++; size++;
} }
} }
} else {
for (Long pfaf : map.keySet()) {
ArrayList<Long> vgbpfafs = template
.getVGBsInAggregate(pfaf,
record.getSiteKey(), key);
if (vgbpfafs != null) {
size++;
}
}
}
float[] dataRec = new float[size]; float[] dataRec = new float[size];
int i = 0; int i = 0;
if (key.equals(FFMPRecord.ALL)) {
for (Entry<String, FFMPVirtualGageBasinMetaData> entry : vmap for (Entry<String, FFMPVirtualGageBasinMetaData> entry : vmap
.entrySet()) { .entrySet()) {
if (entry.getValue() != null) { if (entry.getValue() != null) {
@ -140,26 +127,13 @@ public class FFMPDao extends PluginDao {
i++; i++;
} }
} }
} else {
for (Long pfaf : map.keySet()) {
ArrayList<Long> vgbpfafs = template
.getVGBsInAggregate(pfaf,
record.getSiteKey(), key);
if (vgbpfafs != null) {
FFMPVirtualGageBasin bd = (FFMPVirtualGageBasin) fbd
.get(pfaf);
dataRec[i] = bd.getValue();
i++;
}
}
}
// NAME | GROUP | array |Dimension | dimensions // NAME | GROUP | array |Dimension | dimensions
IDataRecord rec = new FloatDataRecord(key, IDataRecord rec = new FloatDataRecord(FFMPRecord.ALL,
record.getDataURI() + "/" + domain.getCwa(), record.getDataURI() + "/" + domain.getCwa(),
dataRec, 1, new long[] { size }); dataRec, 1, new long[] { size });
dataStore.addDataRecord(rec); dataStore.addDataRecord(rec);
}
} else { } else {
statusHandler.handle(Priority.DEBUG, "No VGB's in domain: " statusHandler.handle(Priority.DEBUG, "No VGB's in domain: "
+ domain.getCwa()); + domain.getCwa());
@ -170,15 +144,14 @@ public class FFMPDao extends PluginDao {
else { else {
for (String huc : record.getBasinsMap().keySet()) { if (record.getBasinData() != null) {
if (record.getBasinData(huc) != null) {
for (DomainXML domain : template.getDomains()) { for (DomainXML domain : template.getDomains()) {
LinkedHashMap<Long, ?> map = template.getMap( LinkedHashMap<Long, ?> map = template.getMap(
record.getSiteKey(), domain.getCwa(), huc); record.getSiteKey(), domain.getCwa(),
FFMPBasinData fbd = record.getBasinData(huc); FFMPRecord.ALL);
FFMPBasinData fbd = record.getBasinData();
// ignore data outside domain // ignore data outside domain
if (map.size() > 0 && fbd.getBasins().size() > 0) { if (map.size() > 0 && fbd.getBasins().size() > 0) {
int size = map.size(); int size = map.size();
@ -196,18 +169,15 @@ public class FFMPDao extends PluginDao {
} }
// NAME | GROUP | array |Dimension | dimensions // NAME | GROUP | array |Dimension | dimensions
if (i > 0) { if (i > 0) {
IDataRecord rec = new FloatDataRecord(huc, IDataRecord rec = new FloatDataRecord(
record.getDataURI() + "/" FFMPRecord.ALL, record.getDataURI() + "/"
+ domain.getCwa(), dataRec, 1, + domain.getCwa(), dataRec, 1,
new long[] { size }); new long[] { size });
dataStore.addDataRecord(rec); dataStore.addDataRecord(rec);
} }
} else { } else {
statusHandler.handle( statusHandler.handle(Priority.DEBUG,
Priority.DEBUG, "Data outside of domain: " + domain.getCwa());
"Data outside of domain: "
+ domain.getCwa());
}
} }
} }
} }

View file

@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.Geometry;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jan 24, 2013 1552 mpduff Initial creation * Jan 24, 2013 1552 mpduff Initial creation
* Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp * Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* *
* </pre> * </pre>
* *
@ -126,8 +127,7 @@ public class FFMPGeometryFactory extends AbstractDataPluginFactory {
for (Map.Entry<String, Object> es : map.entrySet()) { for (Map.Entry<String, Object> es : map.entrySet()) {
FFMPRecord rec = (FFMPRecord) es.getValue(); FFMPRecord rec = (FFMPRecord) es.getValue();
try { try {
rec.retrieveMapFromDataStore(templates, (String) request rec.retrieveMapFromDataStore(templates);
.getIdentifiers().get(HUC));
} catch (Exception e) { } catch (Exception e) {
throw new DataRetrievalException( throw new DataRetrievalException(
"Failed to retrieve the IDataRecord for PluginDataObject: " "Failed to retrieve the IDataRecord for PluginDataObject: "
@ -204,7 +204,7 @@ public class FFMPGeometryFactory extends AbstractDataPluginFactory {
String siteKey = (String) request.getIdentifiers().get(SITE_KEY); String siteKey = (String) request.getIdentifiers().get(SITE_KEY);
String cwa = (String) request.getIdentifiers().get(WFO); String cwa = (String) request.getIdentifiers().get(WFO);
FFMPBasinData basinData = rec.getBasinData(huc); FFMPBasinData basinData = rec.getBasinData();
Map<Long, FFMPBasin> basinDataMap = basinData.getBasins(); Map<Long, FFMPBasin> basinDataMap = basinData.getBasins();

View file

@ -19,6 +19,8 @@
**/ **/
package com.raytheon.uf.common.dataplugin.gfe.request; package com.raytheon.uf.common.dataplugin.gfe.request;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
/** /**
* Request to determine whether specified site id is one of the server's * Request to determine whether specified site id is one of the server's
* configured primary sites for service backup. * configured primary sites for service backup.
@ -30,6 +32,7 @@ package com.raytheon.uf.common.dataplugin.gfe.request;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* May 02, 2013 dgilling Initial creation * May 02, 2013 dgilling Initial creation
* Jul 22, 2013 dgilling Add missing DynamicSerialize annotation.
* *
* </pre> * </pre>
* *
@ -37,6 +40,7 @@ package com.raytheon.uf.common.dataplugin.gfe.request;
* @version 1.0 * @version 1.0
*/ */
@DynamicSerialize
public class CheckServiceBackupPrimarySiteRequest extends AbstractGfeRequest { public class CheckServiceBackupPrimarySiteRequest extends AbstractGfeRequest {
} }

View file

@ -12,4 +12,5 @@ Export-Package: com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.dataquery.responses com.raytheon.uf.common.dataquery.responses
Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1173", Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1173",
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1173" com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1173"
Import-Package: com.raytheon.uf.common.time Import-Package: com.raytheon.uf.common.time,
com.raytheon.uf.common.time.util

View file

@ -25,6 +25,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection; import java.util.Collection;
import java.util.Date; import java.util.Date;
import java.util.EnumSet; import java.util.EnumSet;
@ -42,6 +43,7 @@ import javax.xml.bind.annotation.XmlType;
import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.time.util.TimeUtil;
/** /**
* RequestConstraint - Constraints on a uEngine request * RequestConstraint - Constraints on a uEngine request
@ -56,8 +58,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Aug 21, 2007 chammack Initial Creation. * Aug 21, 2007 chammack Initial Creation.
* May 27, 2009 2408 jsanchez Cast value to String. * May 27, 2009 2408 jsanchez Cast value to String.
* Sep 28, 2009 3099 bsteffen Fixed constraintCompare to convert all non-numeric objects to String * Sep 28, 2009 3099 bsteffen Fixed constraintCompare to convert
* all non-numeric objects to String
* Nov 05, 2009 3553 rjpeter Added isNull capability. * Nov 05, 2009 3553 rjpeter Added isNull capability.
* Jul 09, 2013 1869 bsteffen Format Calendar when making
* Constraint Mapping.
* *
* </pre> * </pre>
* *
@ -524,6 +529,8 @@ public class RequestConstraint implements ISerializableObject, Cloneable {
String constraintValue = null; String constraintValue = null;
if (value == null) { if (value == null) {
constraintType = ConstraintType.ISNULL; constraintType = ConstraintType.ISNULL;
} else if (value instanceof Calendar) {
constraintValue = TimeUtil.formatCalendar((Calendar) value);
} else { } else {
constraintValue = value.toString(); constraintValue = value.toString();
if (value.getClass().isArray() || value instanceof Collection) { if (value.getClass().isArray() || value instanceof Collection) {

View file

@ -56,6 +56,8 @@ import com.vividsolutions.jts.geom.Point;
* Oct 26, 2007 391 jkorman Initial Coding. * Oct 26, 2007 391 jkorman Initial Coding.
* May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot
* types. * types.
* Jul 09, 2013 1869 bsteffen Switch location hibernate type to use
* hibernate spatial.
* *
* </pre> * </pre>
* *
@ -100,7 +102,7 @@ public class SurfaceObsLocation implements ISpatialObject, Cloneable {
private Boolean locationDefined = Boolean.FALSE; private Boolean locationDefined = Boolean.FALSE;
@Column(name = "location", columnDefinition = "geometry") @Column(name = "location", columnDefinition = "geometry")
@Type(type = "com.raytheon.edex.db.objects.hibernate.GeometryType") @Type(type = "org.hibernatespatial.GeometryUserType")
@XmlJavaTypeAdapter(value = GeometryAdapter.class) @XmlJavaTypeAdapter(value = GeometryAdapter.class)
@DynamicSerializeElement @DynamicSerializeElement
private Point location; private Point location;

View file

@ -19,10 +19,14 @@
**/ **/
package com.raytheon.uf.edex.archive.purge; package com.raytheon.uf.edex.archive.purge;
import java.io.File;
import java.util.Collection; import java.util.Collection;
import com.raytheon.uf.common.archive.config.ArchiveConfig; import com.raytheon.uf.common.archive.config.ArchiveConfig;
import com.raytheon.uf.common.archive.config.ArchiveConfigManager; import com.raytheon.uf.common.archive.config.ArchiveConfigManager;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
/** /**
* Purge task to purge archived data based on configured expiration. * Purge task to purge archived data based on configured expiration.
@ -34,6 +38,7 @@ import com.raytheon.uf.common.archive.config.ArchiveConfigManager;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* May 6, 2013 1965 bgonzale Initial creation * May 6, 2013 1965 bgonzale Initial creation
* Added info logging for purge counts.
* *
* </pre> * </pre>
* *
@ -42,6 +47,8 @@ import com.raytheon.uf.common.archive.config.ArchiveConfigManager;
*/ */
public class ArchivePurger { public class ArchivePurger {
private final static IUFStatusHandler statusHandler = UFStatus
.getHandler(ArchiveConfigManager.class);
/** /**
* Purge expired elements from the archives. * Purge expired elements from the archives.
@ -50,7 +57,19 @@ public class ArchivePurger {
ArchiveConfigManager manager = ArchiveConfigManager.getInstance(); ArchiveConfigManager manager = ArchiveConfigManager.getInstance();
Collection<ArchiveConfig> archives = manager.getArchives(); Collection<ArchiveConfig> archives = manager.getArchives();
for (ArchiveConfig archive : archives) { for (ArchiveConfig archive : archives) {
manager.purgeExpiredFromArchive(archive); Collection<File> deletedFiles = manager
.purgeExpiredFromArchive(archive);
if (statusHandler.isPriorityEnabled(Priority.INFO)) {
StringBuilder sb = new StringBuilder(archive.getName());
sb.append("::Archive Purged ");
sb.append(deletedFiles.size());
sb.append(" file");
if (deletedFiles.size() != 1) {
sb.append("s");
}
sb.append(".");
statusHandler.info(sb.toString());
}
} }
} }
} }

View file

@ -116,6 +116,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* May 20, 2013 1650 djohnson Add in capability to find required dataset size. * May 20, 2013 1650 djohnson Add in capability to find required dataset size.
* Jun 03, 2013 2038 djohnson Add base functionality to handle point data type subscriptions. * Jun 03, 2013 2038 djohnson Add base functionality to handle point data type subscriptions.
* Jun 20, 2013 1802 djohnson Check several times for the metadata for now. * Jun 20, 2013 1802 djohnson Check several times for the metadata for now.
* Jul 09, 2013 2038 djohnson Correct unregisterFromBandwidthEventBus() to actually do it.
* </pre> * </pre>
* *
* @author dhladky * @author dhladky
@ -1692,7 +1693,7 @@ public abstract class BandwidthManager extends
* Unregister from the {@link BandwidthEventBus}. * Unregister from the {@link BandwidthEventBus}.
*/ */
private void unregisterFromBandwidthEventBus() { private void unregisterFromBandwidthEventBus() {
BandwidthEventBus.register(this); BandwidthEventBus.unregister(this);
} }
/** /**

View file

@ -124,6 +124,7 @@ import com.raytheon.uf.edex.plugin.ffmp.common.FFTIRatioDiff;
* 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. * 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.
* 03/22/13 1803 D. Hladky Fixed broken performance logging for ffmp. * 03/22/13 1803 D. Hladky Fixed broken performance logging for ffmp.
* 07/03/13 2131 D. Hladky InitialLoad array was forcing total FDC re-query with every update. * 07/03/13 2131 D. Hladky InitialLoad array was forcing total FDC re-query with every update.
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* </pre> * </pre>
* *
* @author dhladky * @author dhladky
@ -135,6 +136,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
private static final transient IUFStatusHandler statusHandler = UFStatus private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(FFMPGenerator.class); .getHandler(FFMPGenerator.class);
/** /**
* Public constructor for FFMPGenerator * Public constructor for FFMPGenerator
* *
@ -153,13 +155,14 @@ public class FFMPGenerator extends CompositeProductGenerator implements
private static final String productType = "ffmp"; private static final String productType = "ffmp";
/** /**
* The thought was this will eventually be dynamic when front end can support it. * The thought was this will eventually be dynamic when front end can
* support it.
*/ */
public static final int SOURCE_CACHE_TIME = 6; public static final int SOURCE_CACHE_TIME = 6;
/** /**
* The thought was this will eventually be dynamic, static in AWIPS I. * The thought was this will eventually be dynamic, static in AWIPS I. This
* This is the time back limit for Flash Flood Guidance sources * is the time back limit for Flash Flood Guidance sources
*/ */
public static final int FFG_SOURCE_CACHE_TIME = 24; public static final int FFG_SOURCE_CACHE_TIME = 24;
@ -386,7 +389,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
statusHandler.handle(Priority.PROBLEM, statusHandler.handle(Priority.PROBLEM,
"Couldn't create FFMP Filter.." + " primary Domain: " "Couldn't create FFMP Filter.." + " primary Domain: "
+ domain.getCwa() + domain.getCwa()
+ " this RUNNER is not a viable FFMP config.", e); + " this RUNNER is not a viable FFMP config.",
e);
} }
} }
@ -475,7 +479,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
} }
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
statusHandler.handle(Priority.ERROR, "Process thread had been interupted!", e); statusHandler.handle(Priority.ERROR,
"Process thread had been interupted!", e);
} }
} }
@ -552,6 +557,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
private class ProcessProduct implements Runnable { private class ProcessProduct implements Runnable {
SourceXML ffmpProduct; SourceXML ffmpProduct;
FFMPGenerator generator; FFMPGenerator generator;
@Override @Override
@ -739,10 +745,11 @@ public class FFMPGenerator extends CompositeProductGenerator implements
if (!source.getSourceType().equals( if (!source.getSourceType().equals(
SOURCE_TYPE.GUIDANCE.getSourceType())) { SOURCE_TYPE.GUIDANCE.getSourceType())) {
String sourceSiteDataKey = getSourceSiteDataKey(source, String sourceSiteDataKey = getSourceSiteDataKey(
dataKey, ffmpRec); source, dataKey, ffmpRec);
ffmpData.remove(sourceSiteDataKey); ffmpData.remove(sourceSiteDataKey);
statusHandler.info("Removing from memory: "+sourceSiteDataKey); statusHandler.info("Removing from memory: "
+ sourceSiteDataKey);
} }
} }
} }
@ -968,8 +975,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
getAbsoluteSourceFileName(sourceId)); getAbsoluteSourceFileName(sourceId));
try { try {
sbl = SerializationUtil sbl = SerializationUtil.transformFromThrift(SourceBinList.class,
.transformFromThrift(SourceBinList.class, FileUtil.file2bytes(f.getFile(), true)); FileUtil.file2bytes(f.getFile(), true));
} catch (FileNotFoundException fnfe) { } catch (FileNotFoundException fnfe) {
statusHandler.handle(Priority.ERROR, statusHandler.handle(Priority.ERROR,
"Unable to locate file " + f.getName()); "Unable to locate file " + f.getName());
@ -977,8 +984,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
statusHandler.handle(Priority.ERROR, statusHandler.handle(Priority.ERROR,
"Unable to read file " + f.getName()); "Unable to read file " + f.getName());
} catch (IOException ioe) { } catch (IOException ioe) {
statusHandler.handle(Priority.ERROR, "General IO problem with file " statusHandler.handle(Priority.ERROR,
+ f.getName(), ioe); "General IO problem with file " + f.getName(), ioe);
} }
return sbl; return sbl;
@ -990,8 +997,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
* @return * @return
*/ */
public String getAbsoluteSourceFileName(String sourceId) { public String getAbsoluteSourceFileName(String sourceId) {
return productType + File.separator + "sources" + File.separator + sourceId return productType + File.separator + "sources" + File.separator
+ ".bin"; + sourceId + ".bin";
} }
/** /**
@ -1096,7 +1103,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
*/ */
public FFMPDataContainer getFFMPDataContainer(String siteSourceKey, public FFMPDataContainer getFFMPDataContainer(String siteSourceKey,
ArrayList<String> hucs, Date backDate) { Date backDate) {
FFMPDataContainer container = ffmpData.get(siteSourceKey); FFMPDataContainer container = ffmpData.get(siteSourceKey);
@ -1110,7 +1117,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
siteKey = parts[0]; siteKey = parts[0];
} }
container = loadFFMPDataContainer(siteSourceKey, hucs, siteKey, container = loadFFMPDataContainer(siteSourceKey, siteKey,
config.getCWA(), backDate); config.getCWA(), backDate);
if (container != null) { if (container != null) {
@ -1227,41 +1234,19 @@ public class FFMPGenerator extends CompositeProductGenerator implements
- (TimeUtil.MILLIS_PER_HOUR * SOURCE_CACHE_TIME)); - (TimeUtil.MILLIS_PER_HOUR * SOURCE_CACHE_TIME));
} }
// deal with setting of needed HUCS
ArrayList<String> hucs = template.getTemplateMgr().getHucLevels();
if (source.getSourceType().equals(SOURCE_TYPE.GAGE.getSourceType())
|| source.getSourceType().equals(
SOURCE_TYPE.GUIDANCE.getSourceType())) {
hucs.clear();
hucs.add(FFMPRecord.ALL);
} else {
hucs.remove(FFMPRecord.VIRTUAL);
}
// pull from disk if there // pull from disk if there
fdc = getFFMPDataContainer(sourceSiteDataKey, hucs, backDate); fdc = getFFMPDataContainer(sourceSiteDataKey, backDate);
// brand new or initial load up // brand new or initial load up
if (fdc == null) { if (fdc == null) {
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
fdc = new FFMPDataContainer(sourceSiteDataKey, hucs); fdc = new FFMPDataContainer(sourceSiteDataKey);
fdc = FFTIProcessor.populateDataContainer(fdc, template, hucs, fdc = FFTIProcessor.populateDataContainer(fdc, template,
backDate, ffmpRec.getDataTime().getRefTime(), backDate, ffmpRec.getDataTime().getRefTime(),
ffmpRec.getWfo(), source, ffmpRec.getSiteKey()); ffmpRec.getWfo(), source, ffmpRec.getSiteKey());
if (source.getSourceType().equals(
SOURCE_TYPE.GAGE.getSourceType())
|| source.getSourceType().equals(
SOURCE_TYPE.GUIDANCE.getSourceType())) {
hucs.clear();
hucs.add(FFMPRecord.ALL);
} else {
hucs.remove(FFMPRecord.VIRTUAL);
}
long time2 = System.currentTimeMillis(); long time2 = System.currentTimeMillis();
statusHandler.handle(Priority.DEBUG, statusHandler.handle(Priority.DEBUG,
"Populated new source: in " + (time2 - time) "Populated new source: in " + (time2 - time)
@ -1290,10 +1275,9 @@ public class FFMPGenerator extends CompositeProductGenerator implements
// if // if
// they exist. // they exist.
fdc = FFTIProcessor.populateDataContainer(fdc, fdc = FFTIProcessor.populateDataContainer(fdc,
template, null, newDate, ffmpRec template, newDate, ffmpRec.getDataTime()
.getDataTime().getRefTime(), .getRefTime(), ffmpRec.getWfo(),
ffmpRec.getWfo(), source, ffmpRec source, ffmpRec.getSiteKey());
.getSiteKey());
} else if (oldDate } else if (oldDate
.after(new Date( .after(new Date(
@ -1307,7 +1291,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
// ingest was turned off for some period of // ingest was turned off for some period of
// time. // time.
fdc = FFTIProcessor.populateDataContainer(fdc, fdc = FFTIProcessor.populateDataContainer(fdc,
template, null, backDate, oldDate, template, backDate, oldDate,
ffmpRec.getWfo(), source, ffmpRec.getWfo(), source,
ffmpRec.getSiteKey()); ffmpRec.getSiteKey());
} }
@ -1321,10 +1305,9 @@ public class FFMPGenerator extends CompositeProductGenerator implements
} }
// add current record data // add current record data
for (String huc : hucs) {
fdc.addFFMPEntry(ffmpRec.getDataTime().getRefTime(), source, fdc.addFFMPEntry(ffmpRec.getDataTime().getRefTime(), source,
ffmpRec.getBasinData(huc), huc, ffmpRec.getSiteKey()); ffmpRec.getBasinData(), ffmpRec.getSiteKey());
}
// cache it temporarily for FFTI use // cache it temporarily for FFTI use
if (source.getSourceType().equals( if (source.getSourceType().equals(
@ -1379,7 +1362,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
* @return * @return
*/ */
public FFMPDataContainer loadFFMPDataContainer(String sourceSiteDataKey, public FFMPDataContainer loadFFMPDataContainer(String sourceSiteDataKey,
ArrayList<String> hucs, String siteKey, String wfo, Date backDate) { String siteKey, String wfo, Date backDate) {
FFMPDataContainer fdc = null; FFMPDataContainer fdc = null;
FFMPAggregateRecord record = null; FFMPAggregateRecord record = null;
@ -1396,7 +1379,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
// condition for first time read in // condition for first time read in
if (fdc == null && record != null) { if (fdc == null && record != null) {
// creates a place holder for this source // creates a place holder for this source
fdc = new FFMPDataContainer(sourceSiteDataKey, hucs, record); fdc = new FFMPDataContainer(sourceSiteDataKey, record);
populated = true; populated = true;
} }
@ -1405,8 +1388,10 @@ public class FFMPGenerator extends CompositeProductGenerator implements
fdc.setAggregateData(record); fdc.setAggregateData(record);
} }
// sometimes a record will sit around for a long time and it will have data going back to the last precip event // sometimes a record will sit around for a long time and it will have
// this can be an enormous amount of time. Want to get the data dumped from memory ASAP. // data going back to the last precip event
// this can be an enormous amount of time. Want to get the data dumped
// from memory ASAP.
if (fdc != null) { if (fdc != null) {
fdc.purge(backDate); fdc.purge(backDate);
} }
@ -1443,9 +1428,11 @@ public class FFMPGenerator extends CompositeProductGenerator implements
* *
* @param fdc * @param fdc
*/ */
public void writeAggregateRecord(FFMPDataContainer fdc, String sourceSiteDataKey) { public void writeAggregateRecord(FFMPDataContainer fdc,
String sourceSiteDataKey) {
WriteAggregateRecord writer = new WriteAggregateRecord(fdc, sourceSiteDataKey); WriteAggregateRecord writer = new WriteAggregateRecord(fdc,
sourceSiteDataKey);
writer.run(); writer.run();
} }
@ -1470,10 +1457,12 @@ public class FFMPGenerator extends CompositeProductGenerator implements
} }
} }
public WriteAggregateRecord(FFMPDataContainer fdc, String sourceSiteDataKey) { public WriteAggregateRecord(FFMPDataContainer fdc,
String sourceSiteDataKey) {
this.fdc = fdc; this.fdc = fdc;
this.sourceSiteDataKey = sourceSiteDataKey; this.sourceSiteDataKey = sourceSiteDataKey;
statusHandler.handle(Priority.DEBUG, "Created Aggregate Record Writer"); statusHandler.handle(Priority.DEBUG,
"Created Aggregate Record Writer");
} }
/** /**
@ -1492,34 +1481,37 @@ public class FFMPGenerator extends CompositeProductGenerator implements
aggRecord.setWfo(config.getCWA()); aggRecord.setWfo(config.getCWA());
// times for Guidance basins will be null // times for Guidance basins will be null
aggRecord.setTimes(fdc.getOrderedTimes()); aggRecord.setTimes(fdc.getOrderedTimes());
fdc.getBasinData().serialize();
for (FFMPBasinData fbd : fdc.getBasinMap().values()) { aggRecord.setBasins(fdc.getBasinData());
fbd.serialize();
aggRecord.addBasinData(fbd);
}
} }
if (aggRecord.getBasinsMap().size() > 0) { if (aggRecord.getBasins() != null) {
try { try {
StorageProperties sp = null; StorageProperties sp = null;
String compression = PluginRegistry.getInstance() String compression = PluginRegistry.getInstance()
.getRegisteredObject(productType).getCompression(); .getRegisteredObject(productType)
.getCompression();
if (compression != null) { if (compression != null) {
sp = new StorageProperties(); sp = new StorageProperties();
sp.setCompression(Compression.valueOf(compression)); sp.setCompression(Compression.valueOf(compression));
} }
byte[] bytes = SerializationUtil.transformToThrift(aggRecord); byte[] bytes = SerializationUtil
.transformToThrift(aggRecord);
// NAME | GROUP | array |Dimension | size // NAME | GROUP | array |Dimension | size
IDataRecord rec = new ByteDataRecord(sourceSiteDataKey, config.getCWA(), IDataRecord rec = new ByteDataRecord(sourceSiteDataKey,
bytes, 1, new long[] { bytes.length }); config.getCWA(), bytes, 1,
new long[] { bytes.length });
File hdf5File = FFMPUtils.getHdf5File(config.getCWA(), sourceSiteDataKey); File hdf5File = FFMPUtils.getHdf5File(config.getCWA(),
IDataStore dataStore = DataStoreFactory.getDataStore(hdf5File); sourceSiteDataKey);
// write it, allowing, and in fact encouraging replacing the last one IDataStore dataStore = DataStoreFactory
.getDataStore(hdf5File);
// write it, allowing, and in fact encouraging replacing
// the last one
dataStore.addDataRecord(rec, sp); dataStore.addDataRecord(rec, sp);
dataStore.store(StoreOp.OVERWRITE); dataStore.store(StoreOp.OVERWRITE);
@ -1538,7 +1530,6 @@ public class FFMPGenerator extends CompositeProductGenerator implements
} }
} }
@Override @Override
public synchronized void configChanged(MonitorConfigEvent fce) { public synchronized void configChanged(MonitorConfigEvent fce) {
@ -1701,8 +1692,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
* @return * @return
*/ */
public String getAbsoluteFFTIFileName(String fftiName) { public String getAbsoluteFFTIFileName(String fftiName) {
return productType + File.separator + "ffti" + File.separator + fftiName return productType + File.separator + "ffti" + File.separator
+ ".bin"; + fftiName + ".bin";
} }
/** /**
@ -1746,8 +1737,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
public FFTIAccum getAccumulationForSite(String fftiSourceKey, public FFTIAccum getAccumulationForSite(String fftiSourceKey,
String fftiSiteKey, String fftiDataKey, double duration, String unit) { String fftiSiteKey, String fftiDataKey, double duration, String unit) {
SourceXML ffmpSource = getSourceConfig() SourceXML ffmpSource = getSourceConfig().getSourceByDisplayName(
.getSourceByDisplayName(fftiSourceKey); fftiSourceKey);
FFTIAccum accumulator = null; FFTIAccum accumulator = null;
String siteDataKey = ffmpSource.getDisplayName() + "-" + fftiSiteKey String siteDataKey = ffmpSource.getDisplayName() + "-" + fftiSiteKey
+ "-" + fftiDataKey; + "-" + fftiDataKey;
@ -1773,24 +1764,23 @@ public class FFMPGenerator extends CompositeProductGenerator implements
long cur = config.getDate().getTime(); long cur = config.getDate().getTime();
long timeBack = (long) (duration * TimeUtil.MILLIS_PER_HOUR); long timeBack = (long) (duration * TimeUtil.MILLIS_PER_HOUR);
Date backDate = new Date(cur - timeBack); Date backDate = new Date(cur - timeBack);
long expirationTime = ffmpSource.getExpirationMinutes(fftiSiteKey) * TimeUtil.MILLIS_PER_MINUTE; long expirationTime = ffmpSource.getExpirationMinutes(fftiSiteKey)
* TimeUtil.MILLIS_PER_MINUTE;
FFMPDataContainer fdc = null; FFMPDataContainer fdc = null;
ArrayList<String> hucs = new ArrayList<String>(); fdc = getFFMPDataContainer(siteDataKey, backDate);
hucs.add(FFMPRecord.ALL);
fdc = getFFMPDataContainer(siteDataKey, hucs, backDate);
if (fdc != null) { if (fdc != null) {
FFMPBasinData fbd = fdc.getBasinData(FFMPRecord.ALL); FFMPBasinData fbd = fdc.getBasinData();
// go over the list of CWAs gathering the pfaf list // go over the list of CWAs gathering the pfaf list
ArrayList<Long> pfafs = new ArrayList<Long>(); ArrayList<Long> pfafs = new ArrayList<Long>();
ArrayList<String> cwaList = config.fdm.getCwaList(); ArrayList<String> cwaList = config.fdm.getCwaList();
Double gap = FFTI.getGap(fdc, ffmpSource, config.getDate(), duration, fftiSiteKey); Double gap = FFTI.getGap(fdc, ffmpSource, config.getDate(),
duration, fftiSiteKey);
if (!Double.isNaN(gap)) { if (!Double.isNaN(gap)) {
for (Long key : fbd.getBasins().keySet()) { for (Long key : fbd.getBasins().keySet()) {
@ -1878,24 +1868,24 @@ public class FFMPGenerator extends CompositeProductGenerator implements
long cur = config.getDate().getTime(); long cur = config.getDate().getTime();
long timeBack = (long) (duration * TimeUtil.MILLIS_PER_HOUR); long timeBack = (long) (duration * TimeUtil.MILLIS_PER_HOUR);
Date backDate = new Date(cur - timeBack); Date backDate = new Date(cur - timeBack);
long expirationTime = ffmpQSource.getExpirationMinutes(qSiteKey) * TimeUtil.MILLIS_PER_MINUTE; long expirationTime = ffmpQSource.getExpirationMinutes(qSiteKey)
* TimeUtil.MILLIS_PER_MINUTE;
// make sure we have data // make sure we have data
Date ffgBackDate = new Date(config.getDate().getTime() Date ffgBackDate = new Date(
config.getDate().getTime()
- (TimeUtil.MILLIS_PER_HOUR * FFMPGenerator.FFG_SOURCE_CACHE_TIME)); - (TimeUtil.MILLIS_PER_HOUR * FFMPGenerator.FFG_SOURCE_CACHE_TIME));
String primarySource = fscm.getPrimarySource(ffmpQSource); String primarySource = fscm.getPrimarySource(ffmpQSource);
ProductXML product = fscm.getProduct(primarySource); ProductXML product = fscm.getProduct(primarySource);
ArrayList<String> hucs = new ArrayList<String>();
hucs.add(FFMPRecord.ALL);
FFMPDataContainer guidContainer = getFFMPDataContainer( FFMPDataContainer guidContainer = getFFMPDataContainer(ffgType,
ffgType, hucs, ffgBackDate); ffgBackDate);
long guidSourceExpiration = 0l; long guidSourceExpiration = 0l;
if (guidContainer == null) { if (guidContainer == null) {
guidContainer = new FFMPDataContainer(ffgType, hucs); guidContainer = new FFMPDataContainer(ffgType);
} }
for (SourceXML iguidSource : product for (SourceXML iguidSource : product
@ -1903,7 +1893,8 @@ public class FFMPGenerator extends CompositeProductGenerator implements
if (guidSourceExpiration == 0l) { if (guidSourceExpiration == 0l) {
guidSourceExpiration = iguidSource guidSourceExpiration = iguidSource
.getExpirationMinutes(qSiteKey) * TimeUtil.MILLIS_PER_MINUTE; .getExpirationMinutes(qSiteKey)
* TimeUtil.MILLIS_PER_MINUTE;
break; break;
} }
} }
@ -1917,14 +1908,16 @@ public class FFMPGenerator extends CompositeProductGenerator implements
return values; return values;
} }
String qpeSiteSourceDataKey = ffmpQSource.getSourceName() + "-" + qSiteKey + "-"+ qSiteKey; String qpeSiteSourceDataKey = ffmpQSource.getSourceName() + "-"
FFMPDataContainer qpeContainer = getFFMPDataContainer(qpeSiteSourceDataKey, hucs, backDate); + qSiteKey + "-" + qSiteKey;
FFMPDataContainer qpeContainer = getFFMPDataContainer(
qpeSiteSourceDataKey, backDate);
if (qpeContainer != null) { if (qpeContainer != null) {
// go over the list of CWAs gathering the pfaf list // go over the list of CWAs gathering the pfaf list
ArrayList<Long> pfafs = new ArrayList<Long>(); ArrayList<Long> pfafs = new ArrayList<Long>();
ArrayList<String> cwaList = config.fdm.getCwaList(); ArrayList<String> cwaList = config.fdm.getCwaList();
FFMPBasinData fbd = qpeContainer.getBasinData(FFMPRecord.ALL); FFMPBasinData fbd = qpeContainer.getBasinData();
for (Long key : fbd.getBasins().keySet()) { for (Long key : fbd.getBasins().keySet()) {
for (String cwa : cwaList) { for (String cwa : cwaList) {
@ -1951,22 +1944,22 @@ public class FFMPGenerator extends CompositeProductGenerator implements
} }
} }
Double gap = FFTI.getGap(qpeContainer, ffmpQSource, config.getDate(), duration, Double gap = FFTI.getGap(qpeContainer, ffmpQSource,
qSiteKey); config.getDate(), duration, qSiteKey);
if (!Double.isNaN(gap)) { if (!Double.isNaN(gap)) {
List<Float> qpes = qpeContainer.getBasinData(FFMPRecord.ALL) List<Float> qpes = qpeContainer.getBasinData()
.getAccumValues(pfafs, backDate, config.getDate(), .getAccumValues(pfafs, backDate, config.getDate(),
expirationTime, false); expirationTime, false);
FFMPGuidanceInterpolation interpolator = new FFMPGuidanceInterpolation( FFMPGuidanceInterpolation interpolator = new FFMPGuidanceInterpolation(
fscm, product, frcm.getRunner( fscm, product, frcm.getRunner(config.getCWA())
config.getCWA()).getProduct(qSiteKey), .getProduct(qSiteKey), primarySource,
primarySource, ffgType, qSiteKey); ffgType, qSiteKey);
interpolator.setInterpolationSources(duration); interpolator.setInterpolationSources(duration);
List<Float> guids = guidContainer.getBasinData(FFMPRecord.ALL) List<Float> guids = guidContainer.getBasinData()
.getGuidanceValues(pfafs, interpolator, .getGuidanceValues(pfafs, interpolator,
guidSourceExpiration); guidSourceExpiration);
@ -1988,14 +1981,11 @@ public class FFMPGenerator extends CompositeProductGenerator implements
return values; return values;
} }
/** /**
* Persist the record that has finished processing. * Persist the record that has finished processing. This is different than
* This is different than other DAT tools. * other DAT tools. Other tools wait until all are finished processing
* Other tools wait until all are finished processing * before persisting. FFMP persists as it goes in order to lessen the data
* before persisting. FFMP persists as it goes in order * surge being sent to pypies.
* to lessen the data surge being sent to pypies.
* *
* @param record * @param record
* @return * @return
@ -2005,19 +1995,19 @@ public class FFMPGenerator extends CompositeProductGenerator implements
// persist out this record // persist out this record
try { try {
setPluginDataObjects(new FFMPRecord[] { record }); setPluginDataObjects(new FFMPRecord[] { record });
setPluginDao(new FFMPDao(getCompositeProductType(), setPluginDao(new FFMPDao(getCompositeProductType(), template, fscm,
template, fscm, config.getCWA())); config.getCWA()));
persistRecords(); persistRecords();
fireTopicUpdate(); fireTopicUpdate();
// clear out pdos that are written // clear out pdos that are written
pdos = null; pdos = null;
} catch (PluginException e) { } catch (PluginException e) {
statusHandler.handle(Priority.PROBLEM, "Couldn't persist the record.", e); statusHandler.handle(Priority.PROBLEM,
"Couldn't persist the record.", e);
} }
} }
/** /**
* Find siteSourceDataKey * Find siteSourceDataKey
* *
@ -2026,20 +2016,20 @@ public class FFMPGenerator extends CompositeProductGenerator implements
* @param ffmpRec * @param ffmpRec
* @return * @return
*/ */
private String getSourceSiteDataKey(SourceXML source, String dataKey, FFMPRecord ffmpRec) { private String getSourceSiteDataKey(SourceXML source, String dataKey,
FFMPRecord ffmpRec) {
String sourceName = source.getSourceName(); String sourceName = source.getSourceName();
String sourceSiteDataKey = null; String sourceSiteDataKey = null;
if (source.getSourceType().equals( if (source.getSourceType().equals(SOURCE_TYPE.GUIDANCE.getSourceType())) {
SOURCE_TYPE.GUIDANCE.getSourceType())) {
sourceName = source.getDisplayName(); sourceName = source.getDisplayName();
sourceSiteDataKey = sourceName; sourceSiteDataKey = sourceName;
} else { } else {
sourceName = ffmpRec.getSourceName(); sourceName = ffmpRec.getSourceName();
sourceSiteDataKey = sourceName + "-" + ffmpRec.getSiteKey() sourceSiteDataKey = sourceName + "-" + ffmpRec.getSiteKey() + "-"
+ "-" + dataKey; + dataKey;
} }
return sourceSiteDataKey; return sourceSiteDataKey;

View file

@ -20,7 +20,6 @@ package com.raytheon.uf.edex.plugin.ffmp.common;
* further licensing information. * further licensing information.
**/ **/
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map.Entry; import java.util.Map.Entry;
@ -45,6 +44,7 @@ import com.raytheon.uf.edex.plugin.ffmp.FFMPGenerator;
* 29 July, 2012 578 dhladky memory work * 29 July, 2012 578 dhladky memory work
* 27 Jan, 2013 1478 dhladky Changed arraylist to list for times, more constants * 27 Jan, 2013 1478 dhladky Changed arraylist to list for times, more constants
* 02/01/13 1569 D. Hladky Added constants * 02/01/13 1569 D. Hladky Added constants
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* </pre> * </pre>
* *
* @author dhladky * @author dhladky
@ -93,11 +93,10 @@ public class FFMPInterpolatedGuidanceDelay {
public boolean calculateDelayedGuidance() { public boolean calculateDelayedGuidance() {
boolean delayGuidance = false; boolean delayGuidance = false;
ArrayList<String> hucs = new ArrayList<String>();
hucs.add(FFMPRecord.ALL);
FFMPDataContainer qpeContainer = generator.getFFMPDataContainer(qpeSource.getSourceName() FFMPDataContainer qpeContainer = generator.getFFMPDataContainer(
+ "-" + siteKey + "-" + siteKey, hucs, backDate); qpeSource.getSourceName() + "-" + siteKey + "-" + siteKey,
backDate);
// Don't do anything, we have no QPE // Don't do anything, we have no QPE
if (qpeContainer != null) { if (qpeContainer != null) {
@ -115,8 +114,8 @@ public class FFMPInterpolatedGuidanceDelay {
.getOrderedTimes(currentRecord.getDataTime().getRefTime()); .getOrderedTimes(currentRecord.getDataTime().getRefTime());
// EQUATION: Guid = GuidOld + R i/d (GuidNew - GuidOld) // EQUATION: Guid = GuidOld + R i/d (GuidNew - GuidOld)
for (Entry<Long, FFMPBasin> entry : currentRecord.getBasinsMap() for (Entry<Long, FFMPBasin> entry : currentRecord.getBasinData()
.get(FFMPRecord.ALL).getBasins().entrySet()) { .getBasins().entrySet()) {
FFMPBasin currBasin = entry.getValue(); FFMPBasin currBasin = entry.getValue();
FFMPGuidanceBasin oldBasin = (FFMPGuidanceBasin) previousGuidanceData FFMPGuidanceBasin oldBasin = (FFMPGuidanceBasin) previousGuidanceData
.get(entry.getKey()); .get(entry.getKey());
@ -136,8 +135,8 @@ public class FFMPInterpolatedGuidanceDelay {
// this is essentially a ratio of the first accumulation // this is essentially a ratio of the first accumulation
// step increment // step increment
// to the total amount over this time window. // to the total amount over this time window.
FFMPBasin qpeBasin = qpeContainer.getBasinData( FFMPBasin qpeBasin = qpeContainer.getBasinData().get(
FFMPRecord.ALL).get(entry.getKey()); entry.getKey());
if (qpeBasin != null) { if (qpeBasin != null) {
float intervalAccum = qpeBasin.getAccumValue( float intervalAccum = qpeBasin.getAccumValue(

View file

@ -98,6 +98,7 @@ import com.vividsolutions.jts.geom.Polygon;
* 02/01/13 1569 D. Hladky Added constants * 02/01/13 1569 D. Hladky Added constants
* 02/25/13 1660 D. Hladky FFTI design change to help mosaic processing. * 02/25/13 1660 D. Hladky FFTI design change to help mosaic processing.
* 05/01/2013 15684 zhao Unlock when Exception caught * 05/01/2013 15684 zhao Unlock when Exception caught
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* </pre> * </pre>
* *
* @author dhladky * @author dhladky
@ -214,29 +215,6 @@ public class FFMPProcessor {
processSource(); processSource();
} }
// don't do gages for anything other than "ALL"
if ((sourceId != null)
&& !source.getSourceType().equals(
FFMPSourceConfigurationManager.SOURCE_TYPE.GAGE
.getSourceType())) {
//ArrayList<String> hucs = template.getTemplateMgr().getHucLevels();// DR 15514
String[] hucs = template.getTemplateMgr().getHucLevelsInArray();// DR 15514
synchronized (hucs) {
if (hucs != null) {
//for (String huc : hucs) {
for(int i=0; i<hucs.length; i++){
String huc = hucs[i];
if (huc != null) {
if (!huc.equals("ALL") || !huc.equals("VIRTUAL")) {
setValues(huc);
}
}
}
}
}
}
statusHandler.handle(Priority.INFO, statusHandler.handle(Priority.INFO,
"Processed Source: " + ffmpRec.getSourceName() + " sitekey: " "Processed Source: " + ffmpRec.getSourceName() + " sitekey: "
+ siteKey + " dataKey: " + dataKey + " time: " + siteKey + " dataKey: " + dataKey + " time: "
@ -471,7 +449,7 @@ public class FFMPProcessor {
if (sourceId != null) { if (sourceId != null) {
for (Long key : map.keySet()) { for (Long key : map.keySet()) {
FFMPBasin basin = getBasin(key, FFMPRecord.ALL); FFMPBasin basin = getBasin(key);
Date date = null; Date date = null;
Float val = null; Float val = null;
@ -595,7 +573,7 @@ public class FFMPProcessor {
for (Long key : map.keySet()) { for (Long key : map.keySet()) {
FFMPBasin basin = getBasin(key, "ALL"); FFMPBasin basin = getBasin(key);
float val = 0.0f; float val = 0.0f;
val = processGrib(key, domain.getCwa()); val = processGrib(key, domain.getCwa());
setBasin(basin, val); setBasin(basin, val);
@ -644,10 +622,8 @@ public class FFMPProcessor {
Date backDate = new Date(ffmpRec.getDataTime().getRefTime() Date backDate = new Date(ffmpRec.getDataTime().getRefTime()
.getTime()-(FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR)); .getTime()-(FFMPGenerator.SOURCE_CACHE_TIME * TimeUtil.MILLIS_PER_HOUR));
ArrayList<String> hucs = new ArrayList<String>();
hucs.add("ALL");
FFMPDataContainer ffgContainer = generator FFMPDataContainer ffgContainer = generator
.getFFMPDataContainer(sourceNameString, hucs, .getFFMPDataContainer(sourceNameString,
backDate); backDate);
if (ffgContainer != null if (ffgContainer != null
@ -688,7 +664,7 @@ public class FFMPProcessor {
siteKey, guidFrequency, source, siteKey, guidFrequency, source,
qpeSource, previousDate, recdate, qpeSource, previousDate, recdate,
generator, generator,
ffgContainer.getBasinData(FFMPRecord.ALL), ffgContainer.getBasinData(),
ffmpRec); ffmpRec);
boolean delayGuidance = figd boolean delayGuidance = figd
@ -811,9 +787,9 @@ public class FFMPProcessor {
* *
* @param ffmp * @param ffmp
*/ */
private FFMPBasinData getBasinData(String huc) { private FFMPBasinData getBasinData() {
return ffmpRec.getBasinData(huc); return ffmpRec.getBasinData();
} }
/** /**
@ -823,15 +799,11 @@ public class FFMPProcessor {
* @param huc * @param huc
* @return * @return
*/ */
private FFMPBasin getBasin(Long pfaf, String huc) { private FFMPBasin getBasin(Long pfaf) {
FFMPBasin basin = getBasinData(huc).get(pfaf); FFMPBasin basin = getBasinData().get(pfaf);
if (basin == null) { if (basin == null) {
if (huc.equals(FFMPRecord.ALL)) {
basin = new FFMPBasin(pfaf, false); basin = new FFMPBasin(pfaf, false);
} else { getBasinData().put(pfaf, basin);
basin = new FFMPBasin(pfaf, true);
}
getBasinData(huc).put(pfaf, basin);
} }
return basin; return basin;
} }
@ -845,64 +817,15 @@ public class FFMPProcessor {
*/ */
private FFMPVirtualGageBasin getVirtualBasin(String lid, Long pfaf, private FFMPVirtualGageBasin getVirtualBasin(String lid, Long pfaf,
String huc) { String huc) {
FFMPVirtualGageBasin basin = (FFMPVirtualGageBasin) getBasinData(huc) FFMPVirtualGageBasin basin = (FFMPVirtualGageBasin) getBasinData()
.get(pfaf); .get(pfaf);
if (basin == null) { if (basin == null) {
if (huc.equals(FFMPRecord.ALL)) {
basin = new FFMPVirtualGageBasin(lid, pfaf, false); basin = new FFMPVirtualGageBasin(lid, pfaf, false);
} else { getBasinData().put(pfaf, basin);
basin = new FFMPVirtualGageBasin(lid, pfaf, true);
}
getBasinData(huc).put(pfaf, basin);
} }
return basin; return basin;
} }
/**
* Sets the values for the aggregated basins
*
* @param type
* @return
*/
private void setValues(String huc) {
try {
// Get basins for level, we process VGB's differently because it is
// a
// special case
if (!huc.equals(FFMPRecord.VIRTUAL) && !huc.equals(FFMPRecord.ALL)) {
for (DomainXML domain : template.getDomains()) {
LinkedHashMap<Long, ?> map = template.getMap(siteKey,
domain.getCwa(), huc);
for (Long pfaf : map.keySet()) {
FFMPBasin basin = getBasin(pfaf, huc);
Float val = 0.0f;
// average values
try {
ArrayList<Long> aggPfafs = template
.getAggregatePfafs(pfaf, siteKey, huc);
ArrayList<Double> areas = template
.getAreas(aggPfafs);
val = ffmpRec.getBasinData(FFMPRecord.ALL).getAverageValue(
aggPfafs, areas);
} catch (Exception e) {
// Value is NAN, ignore it.
}
basin.setValue(config.getDate(), val);
}
}
}
} catch (Exception e) {
config.getGenerator().logger.error("Unable to process " + huc
+ " level data");
}
}
/** /**
* Process the PDO for a geometry * Process the PDO for a geometry
* *

View file

@ -57,6 +57,7 @@ import com.raytheon.uf.edex.plugin.ffmp.FFMPGenerator;
* Apr 18, 2013 1919 dhladky Fixed VGB breakage * Apr 18, 2013 1919 dhladky Fixed VGB breakage
* Jun 21, 2013 2131 bsteffen Revert the slow part of 1919. * Jun 21, 2013 2131 bsteffen Revert the slow part of 1919.
* July 3, 2013 2131 dhladky Fixed problems caused by revert. * July 3, 2013 2131 dhladky Fixed problems caused by revert.
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* </pre> * </pre>
* *
* @author dhladky * @author dhladky
@ -183,8 +184,8 @@ public class FFTIProcessor {
*/ */
public static FFMPDataContainer populateDataContainer( public static FFMPDataContainer populateDataContainer(
FFMPDataContainer sourceContainer, FFMPTemplates template, FFMPDataContainer sourceContainer, FFMPTemplates template,
ArrayList<String> hucs, Date startDate, Date endDate, String wfo, Date startDate, Date endDate, String wfo, SourceXML source,
SourceXML source, String siteKey) { String siteKey) {
ArrayList<String> uris = getUris(startDate, endDate, wfo, source, ArrayList<String> uris = getUris(startDate, endDate, wfo, source,
siteKey); siteKey);
@ -208,20 +209,11 @@ public class FFTIProcessor {
if (!contains) { if (!contains) {
try { try {
if (hucs == null) { rec = populateRecord(rec, template);
hucs = new ArrayList<String>(); FFMPBasinData newData = rec.getBasinData();
hucs.add(FFMPRecord.ALL); sourceContainer.addFFMPEntry(
} rec.getDataTime().getRefTime(), source, newData,
siteKey);
for (String huc : hucs) {
FFMPRecord populatedRec = populateRecord(rec, huc,
template);
FFMPBasinData newData = populatedRec.getBasinData(huc);
sourceContainer.addFFMPEntry(populatedRec.getDataTime()
.getRefTime(), source, newData, huc, siteKey);
}
} catch (Exception e) { } catch (Exception e) {
statusHandler.handle(Priority.ERROR, statusHandler.handle(Priority.ERROR,
"Source: " + source.getDisplayName() + " domain: " "Source: " + source.getDisplayName() + " domain: "
@ -306,7 +298,7 @@ public class FFTIProcessor {
* @return * @return
* @throws PluginException * @throws PluginException
*/ */
public static FFMPRecord populateRecord(FFMPRecord rec, String huc, public static FFMPRecord populateRecord(FFMPRecord rec,
FFMPTemplates template) throws PluginException { FFMPTemplates template) throws PluginException {
try { try {
@ -316,9 +308,9 @@ public class FFTIProcessor {
// check for gage(VGB) types, if so process as a VGB // check for gage(VGB) types, if so process as a VGB
if (source.getSourceType().equals(SOURCE_TYPE.GAGE.getSourceType())) { if (source.getSourceType().equals(SOURCE_TYPE.GAGE.getSourceType())) {
rec.retrieveVirtualMapFromDataStore(template, huc); rec.retrieveVirtualMapFromDataStore(template);
} else { } else {
rec.retrieveMapFromDataStore(template, huc); rec.retrieveMapFromDataStore(template);
} }
} catch (Exception e) { } catch (Exception e) {

View file

@ -91,7 +91,7 @@
<permission id="com.raytheon.localization.site/common_static/datadelivery"/> <permission id="com.raytheon.localization.site/common_static/datadelivery"/>
<permission id="com.raytheon.localization.site/common_static/archive"/> <permission id="com.raytheon.localization.site/common_static/archiver/purger"/>
<user userId="ALL"> <user userId="ALL">
<userPermission>com.raytheon.localization.site/common_static/purge</userPermission> <userPermission>com.raytheon.localization.site/common_static/purge</userPermission>
@ -124,7 +124,7 @@
<userPermission>com.raytheon.localization.site/common_static/shef</userPermission> <userPermission>com.raytheon.localization.site/common_static/shef</userPermission>
<userPermission>com.raytheon.localization.site/common_static/roles</userPermission> <userPermission>com.raytheon.localization.site/common_static/roles</userPermission>
<userPermission>com.raytheon.localization.site/common_static/datadelivery</userPermission> <userPermission>com.raytheon.localization.site/common_static/datadelivery</userPermission>
<userPermission>com.raytheon.localization.site/common_static/archive</userPermission> <userPermission>com.raytheon.localization.site/common_static/archiver/purger</userPermission>
</user> </user>
</nwsRoleData> </nwsRoleData>

View file

@ -11,11 +11,11 @@
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/> <attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.configuration.ConfigurationUtility"/> <attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.configuration.ConfigurationUtility"/>
<attribute name="Class-Path" value="."/> <attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.1.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/> <attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.2.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
</manifest> </manifest>
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/> <zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/> <zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.1.jar"/> <zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.2.jar"/>
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/> <zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/> <zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/> <zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/>

View file

@ -11,11 +11,11 @@
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/> <attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.manager.Wes2BridgeManager"/> <attribute name="Rsrc-Main-Class" value="com.raytheon.wes2bridge.manager.Wes2BridgeManager"/>
<attribute name="Class-Path" value="."/> <attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.1.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/> <attribute name="Rsrc-Class-Path" value="./ commons-collections-3.2.jar commons-logging-1.1.2.jar geronimo-jms_1.1_spec-1.1.1.jar org.eclipse.ui_3.8.2.v20121018-234953.jar org.eclipse.swt_3.8.1.v3836b.jar org.eclipse.swt.gtk.linux.x86_3.8.1.v3836b.jar org.eclipse.jface_3.8.0.v20120912-135020.jar org.eclipse.core.commands_3.6.1.v20120912-135020.jar org.eclipse.ui.workbench_3.8.2.v20121128-133708.jar org.eclipse.core.runtime_3.8.0.v20120521-2346.jar org.eclipse.osgi_3.8.2.v20130124-134944.jar org.eclipse.equinox.common_3.6.100.v20120522-1841.jar org.eclipse.core.jobs_3.5.200.v20120521-2346.jar runtime_registry_compatibility.jar org.eclipse.equinox.registry_3.5.200.v20120522-1841.jar org.eclipse.equinox.preferences_3.5.1.v20121031-182809.jar org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar org.eclipse.equinox.app_1.3.100.v20120522-1841.jar log4j-1.2.16.jar log4j.extras-1.0.jar commons-beanutils-1.8.3.jar commons-digester-1.8.1.jar commons-lang-2.3.jar commons-configuration-1.6.jar"/>
</manifest> </manifest>
<zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/> <zipfileset src="${basedir}/../build.wes2bridge.utility/lib/jar-in-jar-loader.zip"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/> <zipfileset dir="${baseline.directory}/org.apache.commons.collections" includes="commons-collections-3.2.jar"/>
<zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.1.jar"/> <zipfileset dir="${baseline.directory}/org.apache.commons.logging" includes="commons-logging-1.1.2.jar"/>
<zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/> <zipfileset dir="${baseline.directory}/javax.jms" includes="geronimo-jms_1.1_spec-1.1.1.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/> <zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.ui_3.8.2.v20121018-234953.jar"/>
<zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/> <zipfileset dir="${eclipse.directory}/plugins" includes="org.eclipse.swt_3.8.1.v3836b.jar"/>

View file

@ -1,7 +1,7 @@
package gov.noaa.nws.ncep.common.dataplugin.geomag; package gov.noaa.nws.ncep.common.dataplugin.geomag;
import java.util.Calendar; import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.SequenceGenerator; import javax.persistence.SequenceGenerator;
@ -18,14 +18,12 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject; import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
import com.raytheon.uf.common.datastorage.IDataStore; import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord; import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord; import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
import com.raytheon.uf.common.datastorage.records.LongDataRecord; import com.raytheon.uf.common.datastorage.records.LongDataRecord;
import com.raytheon.uf.common.datastorage.records.StringDataRecord;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/** /**
* Record implementation for geomag plugin. * Record implementation for geomag plugin.
* *
@ -35,6 +33,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ---------------- -------------------------- * ------------ ---------- ---------------- --------------------------
* 03/27/2013 975 sgurung Initial creation. * 03/27/2013 975 sgurung Initial creation.
* 05/26/2013 bhebbard Added SequenceGenerator annotation. * 05/26/2013 bhebbard Added SequenceGenerator annotation.
* 07/22/2013 1977 rjpeter Added getDataURI and annotations.
* </pre> * </pre>
* *
* @author sgurung * @author sgurung
@ -91,10 +90,13 @@ public class GeoMagRecord extends PersistablePluginDataObject {
/** /**
* flag to indicate bad data point * flag to indicate bad data point
*/ */
/*@Column /*
@DynamicSerializeElement * @Column
@XmlAttribute *
private String badDataPoint;*/ * @DynamicSerializeElement
*
* @XmlAttribute private String badDataPoint;
*/
/** /**
* Observation Date and Time for the minute values * Observation Date and Time for the minute values
@ -272,21 +274,21 @@ public class GeoMagRecord extends PersistablePluginDataObject {
try { try {
IDataRecord[] dataRec = dataStore.retrieve(getDataURI()); IDataRecord[] dataRec = dataStore.retrieve(getDataURI());
for (int i = 0; i < dataRec.length; i++) { for (IDataRecord element : dataRec) {
if (dataRec[i].getName().equals(GeoMagRecord.component1)) { if (element.getName().equals(GeoMagRecord.component1)) {
obs_times = (((LongDataRecord) dataRec[i]).getLongData()); obs_times = (((LongDataRecord) element).getLongData());
} }
if (dataRec[i].getName().equals(GeoMagRecord.component1)) { if (element.getName().equals(GeoMagRecord.component1)) {
comp1_data = (((FloatDataRecord) dataRec[i]).getFloatData()); comp1_data = (((FloatDataRecord) element).getFloatData());
} }
if (dataRec[i].getName().equals(GeoMagRecord.component2)) { if (element.getName().equals(GeoMagRecord.component2)) {
comp2_data = (((FloatDataRecord) dataRec[i]).getFloatData()); comp2_data = (((FloatDataRecord) element).getFloatData());
} }
if (dataRec[i].getName().equals(GeoMagRecord.component3)) { if (element.getName().equals(GeoMagRecord.component3)) {
comp3_data = (((FloatDataRecord) dataRec[i]).getFloatData()); comp3_data = (((FloatDataRecord) element).getFloatData());
} }
if (dataRec[i].getName().equals(GeoMagRecord.component4)) { if (element.getName().equals(GeoMagRecord.component4)) {
comp4_data = (((FloatDataRecord) dataRec[i]).getFloatData()); comp4_data = (((FloatDataRecord) element).getFloatData());
} }
} }
@ -295,4 +297,10 @@ public class GeoMagRecord extends PersistablePluginDataObject {
} }
} }
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
} }

View file

@ -27,11 +27,12 @@
package gov.noaa.nws.ncep.common.dataplugin.idft; package gov.noaa.nws.ncep.common.dataplugin.idft;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.util.Calendar; import java.util.Calendar;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.SequenceGenerator; import javax.persistence.SequenceGenerator;
@ -50,6 +51,22 @@ import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
*
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 07/22/2013 1977 rjpeter Added getDataURI and annotations.
*
* </pre>
*
* @author rjpeter
* @version 1.0
*/
@Entity @Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "idftseq") @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "idftseq")
@Table(name = "idft", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @Table(name = "idft", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
@ -57,16 +74,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since * Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used. * forecastTime is unlikely to be used.
*/ */
@org.hibernate.annotations.Table( @org.hibernate.annotations.Table(appliesTo = "idft", indexes = { @Index(name = "idft_refTimeIndex", columnNames = {
appliesTo = "idft", "refTime", "forecastTime" }) })
indexes = {
@Index(name = "idft_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@XmlRootElement @XmlRootElement
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize @DynamicSerialize
public class IdftRecord extends PluginDataObject { public class IdftRecord extends PluginDataObject {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -111,7 +123,6 @@ public class IdftRecord extends PluginDataObject{
@DynamicSerializeElement @DynamicSerializeElement
private Float distanceNm; private Float distanceNm;
/** /**
* Default Constructor * Default Constructor
*/ */
@ -144,6 +155,7 @@ public class IdftRecord extends PluginDataObject{
public String getReportType() { public String getReportType() {
return reportType; return reportType;
} }
public void setReportType(String reportType) { public void setReportType(String reportType) {
this.reportType = reportType; this.reportType = reportType;
} }
@ -151,6 +163,7 @@ public class IdftRecord extends PluginDataObject{
public Calendar getIssueTime() { public Calendar getIssueTime() {
return issueTime; return issueTime;
} }
public void setIssueTime(Calendar issueTime) { public void setIssueTime(Calendar issueTime) {
this.issueTime = issueTime; this.issueTime = issueTime;
} }
@ -158,6 +171,7 @@ public class IdftRecord extends PluginDataObject{
public Calendar getValidTime() { public Calendar getValidTime() {
return validTime; return validTime;
} }
public void setValidTime(Calendar validTime) { public void setValidTime(Calendar validTime) {
this.validTime = validTime; this.validTime = validTime;
} }
@ -165,6 +179,7 @@ public class IdftRecord extends PluginDataObject{
public Integer getPointNum() { public Integer getPointNum() {
return pointNum; return pointNum;
} }
public void setPointNum(Integer pointNum) { public void setPointNum(Integer pointNum) {
this.pointNum = pointNum; this.pointNum = pointNum;
} }
@ -172,6 +187,7 @@ public class IdftRecord extends PluginDataObject{
public float getLat() { public float getLat() {
return lat; return lat;
} }
public void setLat(float latitude) { public void setLat(float latitude) {
this.lat = latitude; this.lat = latitude;
} }
@ -179,6 +195,7 @@ public class IdftRecord extends PluginDataObject{
public float getLon() { public float getLon() {
return lon; return lon;
} }
public void setLon(float longitude) { public void setLon(float longitude) {
this.lon = longitude; this.lon = longitude;
} }
@ -186,6 +203,7 @@ public class IdftRecord extends PluginDataObject{
public float getDirection() { public float getDirection() {
return direction; return direction;
} }
public void setDirection(float direction) { public void setDirection(float direction) {
this.direction = direction; this.direction = direction;
} }
@ -193,8 +211,15 @@ public class IdftRecord extends PluginDataObject{
public float getDistanceNm() { public float getDistanceNm() {
return distanceNm; return distanceNm;
} }
public void setDistanceNm(float distanceNm) { public void setDistanceNm(float distanceNm) {
this.distanceNm = distanceNm; this.distanceNm = distanceNm;
} }
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
} }

View file

@ -1,5 +1,7 @@
package gov.noaa.nws.ncep.common.dataplugin.pgen; package gov.noaa.nws.ncep.common.dataplugin.pgen;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.SequenceGenerator; import javax.persistence.SequenceGenerator;
@ -30,7 +32,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Apr 22, 2013 sgilbert Initial creation * Apr 22, 2013 sgilbert Initial creation
* Jun 26, 2013 bhebbard Added SequenceGenerator annotation * Jun 26, 2013 bhebbard Added SequenceGenerator annotation
* * Jul 22, 2013 1977 rjpeter Added getDataURI and annotations.
* </pre> * </pre>
* *
* @author sgilbert * @author sgilbert
@ -262,4 +264,10 @@ public class PgenRecord extends PersistablePluginDataObject {
return null; return null;
} }
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
} }

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<requestPatterns xmlns:ns2="group"> <requestPatterns xmlns:ns2="group">
<regex></regex>
</requestPatterns> </requestPatterns>

View file

@ -38,9 +38,10 @@ HURR_LOCAL stations.tbl W $TEXT_DATA2/tropical/HLS HLS
DAY_1 day1.bull B $TEXT_DATA/spc/day1 day1 DAY_1 day1.bull B $TEXT_DATA/spc/day1 day1
DAY_2 day2.bull B $TEXT_DATA/spc/day2 day2 DAY_2 day2.bull B $TEXT_DATA/spc/day2 day2
DAY_3 day3.bull B $TEXT_DATA/spc/day3 day3 DAY_3 day3.bull B $TEXT_DATA/spc/day3 day3
DAY_1_PT day1pts.bull B $TEXT_DATA/spc/otlkpts ptsdy1 DAY_3_8_OLK stations.tbl B $TEXT_DATA/../all_prods/forecast/land fwddy38
DAY_2_PT day2pts.bull B $TEXT_DATA/spc/otlkpts ptsdy2 DAY_1_PT day1pts.bull B $TEXT_DATA/watch_warn/tstrm_warn ptsdy1
DAY_3_PT day3pts.bull B $TEXT_DATA/spc/otlkpts ptsdy3 DAY_2_PT day2pts.bull B $TEXT_DATA/watch_warn/tstrm_warn ptsdy2
DAY_3_PT day3pts.bull B $TEXT_DATA/watch_warn/tstrm_warn ptsdy3
WATCH_BOX watndsc.bull B $TEXT_DATA/spc/watch2 wtch2 WATCH_BOX watndsc.bull B $TEXT_DATA/spc/watch2 wtch2
ALL_WBOX watbox.bull B $TEXT_DATA/spc/watch watch ALL_WBOX watbox.bull B $TEXT_DATA/spc/watch watch
WATCH_NDSC watndsc.bull B $TEXT_DATA/spc/watch2 wtch2 WATCH_NDSC watndsc.bull B $TEXT_DATA/spc/watch2 wtch2

View file

@ -176,3 +176,4 @@ INSERT INTO awips.nctext_inputfile_type VALUES (176,'sps','W');
INSERT INTO awips.nctext_inputfile_type VALUES (177,'warwatch','W'); INSERT INTO awips.nctext_inputfile_type VALUES (177,'warwatch','W');
INSERT INTO awips.nctext_inputfile_type VALUES (178,'warnsumm','W'); INSERT INTO awips.nctext_inputfile_type VALUES (178,'warnsumm','W');
INSERT INTO awips.nctext_inputfile_type VALUES (179,'coutlook','W'); INSERT INTO awips.nctext_inputfile_type VALUES (179,'coutlook','W');
INSERT INTO awips.nctext_inputfile_type VALUES (180,'fwddy38','W');

View file

@ -165,11 +165,13 @@ public final class NctextRegexMatcher {
thisMap.put(Pattern.compile("^FXHW60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "area"); thisMap.put(Pattern.compile("^FXHW60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "area");
thisMap.put(Pattern.compile("^FXPN60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "area"); thisMap.put(Pattern.compile("^FXPN60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "area");
thisMap.put(Pattern.compile("^FXPS60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "area"); thisMap.put(Pattern.compile("^FXPS60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "area");
thisMap.put(Pattern.compile("^...... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)FA[0-9].*"), "area"); //aviation forecasts thisMap.put(Pattern.compile("^...... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)FA[0-9].*"), "area"); //aviation forecasts
thisMap.put(Pattern.compile("^WWUS30 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"wtch2"); thisMap.put(Pattern.compile("^WWUS30 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"wtch2");
thisMap.put(Pattern.compile("^FNUS21 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"fwddy1"); thisMap.put(Pattern.compile("^FNUS21 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"fwddy1");
thisMap.put(Pattern.compile("^FNUS22 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"fwddy2"); thisMap.put(Pattern.compile("^FNUS22 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"fwddy2");
thisMap.put(Pattern.compile("^FNUS28 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"fwddy38");
thisMap.put(Pattern.compile("^FNUS21 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)FWDDY1.*"),"fire1"); //spc uses this regex for fwddy1 also
thisMap.put(Pattern.compile("^FNUS22 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)FWDDY2.*"),"fire2"); //spc uses this regex for fwddy2 also
thisMap.put(Pattern.compile("^WOUS64 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "wou"); thisMap.put(Pattern.compile("^WOUS64 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "wou");
thisMap.put(Pattern.compile("^ABNT20 KNHC (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "outlk"); //clashes with TWO thisMap.put(Pattern.compile("^ABNT20 KNHC (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "outlk"); //clashes with TWO
thisMap.put(Pattern.compile("^ACPN50 PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "outlk"); thisMap.put(Pattern.compile("^ACPN50 PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "outlk");
@ -267,14 +269,13 @@ public final class NctextRegexMatcher {
thisMap.put(Pattern.compile("^WAUS1 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "airm"); //no data to test thisMap.put(Pattern.compile("^WAUS1 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "airm"); //no data to test
thisMap.put(Pattern.compile("^WAAK01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "airm"); //no data to test thisMap.put(Pattern.compile("^WAAK01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "airm"); //no data to test
thisMap.put(Pattern.compile("^WOUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "stat"); thisMap.put(Pattern.compile("^WOUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "stat");
thisMap.put(Pattern.compile("^FVXX2[0-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "volc"); thisMap.put(Pattern.compile("^FVXX2[0-7] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "volc");
thisMap.put(Pattern.compile("^FVCN0[0-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "volc"); thisMap.put(Pattern.compile("^FVCN0[0-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "volc");
thisMap.put(Pattern.compile("^FVAU0[2-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "volc"); thisMap.put(Pattern.compile("^FVAU0[2-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "volc");
thisMap.put(Pattern.compile("^ACUS4[1-5] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "storm"); thisMap.put(Pattern.compile("^ACUS4[1-5] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "storm");
thisMap.put(Pattern.compile("^FSUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "srp"); thisMap.put(Pattern.compile("^FSUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "srp");
thisMap.put(Pattern.compile("^ASUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sus"); thisMap.put(Pattern.compile("^ASUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sus");
thisMap.put(Pattern.compile("^FXPA00 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "expac"); //no folder for raw data in server thisMap.put(Pattern.compile("^FXPA00 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "expac"); //no folder for raw data in server
thisMap.put(Pattern.compile("^FVXX2[0-7] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "vlcf"); //clashes with volc FVXX2[0-4]
thisMap.put(Pattern.compile("^ACUS48 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day48"); thisMap.put(Pattern.compile("^ACUS48 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day48");
thisMap.put(Pattern.compile("^FNUS31 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)PFWFD1.*"), "pfwfd1"); thisMap.put(Pattern.compile("^FNUS31 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)PFWFD1.*"), "pfwfd1");
thisMap.put(Pattern.compile("^FNUS32 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)PFWFD2.*"), "pfwfd2"); thisMap.put(Pattern.compile("^FNUS32 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)PFWFD2.*"), "pfwfd2");
@ -288,9 +289,6 @@ public final class NctextRegexMatcher {
thisMap.put(Pattern.compile("^ACUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day1"); thisMap.put(Pattern.compile("^ACUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day1");
thisMap.put(Pattern.compile("^ACUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day2"); thisMap.put(Pattern.compile("^ACUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day2");
thisMap.put(Pattern.compile("^ACUS03 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day3"); thisMap.put(Pattern.compile("^ACUS03 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "day3");
thisMap.put(Pattern.compile("^WWUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"ptsdy1"); //no data to test
thisMap.put(Pattern.compile("^WWUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"ptsdy2");//no data to test
thisMap.put(Pattern.compile("^WWUS03 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"ptsdy3");//no data to test
thisMap.put(Pattern.compile("^WWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"watch"); thisMap.put(Pattern.compile("^WWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"watch");
thisMap.put(Pattern.compile("^WWUS50 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)SEV[0-9].*"),"sev"); thisMap.put(Pattern.compile("^WWUS50 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)SEV[0-9].*"),"sev");
thisMap.put(Pattern.compile("^WWUS60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)SEVSPC.*"),"sevmkc"); thisMap.put(Pattern.compile("^WWUS60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)SEVSPC.*"),"sevmkc");
@ -299,8 +297,6 @@ public final class NctextRegexMatcher {
thisMap.put(Pattern.compile("^ACUS11 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"meso"); thisMap.put(Pattern.compile("^ACUS11 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"meso");
thisMap.put(Pattern.compile("^NWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)STADTS"),"dts"); thisMap.put(Pattern.compile("^NWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)STADTS"),"dts");
thisMap.put(Pattern.compile("^NWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"svr"); thisMap.put(Pattern.compile("^NWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"),"svr");
thisMap.put(Pattern.compile("^FNUS21 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)FWDDY1.*"),"fire1"); //spc uses this regex for fwddy1 also
thisMap.put(Pattern.compile("^FNUS22 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)FWDDY2.*"),"fire2"); //spc uses this regex for fwddy2 also
thisMap.put(Pattern.compile("^WHXX9[09] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "mdl"); // not sure if this regex is correct - no test data to verify thisMap.put(Pattern.compile("^WHXX9[09] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "mdl"); // not sure if this regex is correct - no test data to verify
thisMap.put(Pattern.compile("^WHXX0[1-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "mdl"); thisMap.put(Pattern.compile("^WHXX0[1-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "mdl");
thisMap.put(Pattern.compile("^URNT10 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "antreco"); thisMap.put(Pattern.compile("^URNT10 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "antreco");
@ -341,13 +337,14 @@ public final class NctextRegexMatcher {
thisMap.put(Pattern.compile("^W[CSV]AK[01][0-9] KKCI (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "intl"); //regexes clash for intl and sgmt thisMap.put(Pattern.compile("^W[CSV]AK[01][0-9] KKCI (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "intl"); //regexes clash for intl and sgmt
thisMap.put(Pattern.compile("^W[CSV]AK[01][0-9] PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "intl"); //regexes clash for intl and sgmt thisMap.put(Pattern.compile("^W[CSV]AK[01][0-9] PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "intl"); //regexes clash for intl and sgmt
thisMap.put(Pattern.compile("^W[CSV]AK[01][0-9] PAWU (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "intl"); //regexes clash for intl and sgmt thisMap.put(Pattern.compile("^W[CSV]AK[01][0-9] PAWU (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "intl"); //regexes clash for intl and sgmt
thisMap.put(Pattern.compile("^WUUS01 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "ptsdy1"); //regexes clash for convective outlook point product day1
thisMap.put(Pattern.compile("^WUUS02 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "ptsdy2"); //regexes clash for convective outlook point product day2
thisMap.put(Pattern.compile("^WUUS03 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "ptsdy3"); //regexes clash for convective outlook point product day3
thisMap.put(Pattern.compile("^WSUS4[012] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "conv"); thisMap.put(Pattern.compile("^WSUS4[012] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "conv");
thisMap.put(Pattern.compile("^W[CSV]US0[1-6] KKCI (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sgmt"); thisMap.put(Pattern.compile("^W[CSV]US0[1-6] KKCI (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sgmt");
thisMap.put(Pattern.compile("^WSUK.. .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sgmt"); thisMap.put(Pattern.compile("^WSUK.. .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sgmt");
thisMap.put(Pattern.compile("^WS[^U]... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sgmt"); //regexes clash for intl and sgmt thisMap.put(Pattern.compile("^WS[^U]... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+"), "sgmt"); //regexes clash for intl and sgmt
thisMap.put(Pattern.compile("^FT.... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)*TAF[A-Z]{3}(.|\r|\n)*"), "taf"); //observed TAFS thisMap.put(Pattern.compile("^FT.... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)*TAF[A-Z]{3}(.|\r|\n)*"), "taf"); //aviation TAFS
thisMap.put(Pattern.compile("^FT.... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+TAF( |\r|\n){1}(.|\r|\n)*"), "fts"); //aviation TAFS thisMap.put(Pattern.compile("^FT.... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9])(.|\r|\n)+TAF( |\r|\n){1}(.|\r|\n)*"), "fts"); //aviation TAFS
thisMap.put(Pattern.compile("^...... KWBC (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)(HSF).*"), "HSF"); //conflicts with FLN thisMap.put(Pattern.compile("^...... KWBC (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)(HSF).*"), "HSF"); //conflicts with FLN
thisMap.put(Pattern.compile("^...... PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)(HSF).*"), "HSF"); thisMap.put(Pattern.compile("^...... PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*(\n|\r)(HSF).*"), "HSF");

View file

@ -128,14 +128,13 @@
<regex>^WAUS1 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^WAUS1 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WAAK01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^WAAK01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WOUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^WOUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FVXX2[0-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FVCN0[0-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FVCN0[0-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FVAU0[2-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FVAU0[2-4] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FVXX2[0-7] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^ACUS4[1-5] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^ACUS4[1-5] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FSUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FSUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^ASUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^ASUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FXPA00 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FXPA00 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FVXX2[0-7] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^ACUS48 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^ACUS48 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FNUS31 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*PFWFD1.*</regex> <regex>^FNUS31 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*PFWFD1.*</regex>
<regex>^FNUS32 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*PFWFD2.*</regex> <regex>^FNUS32 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*PFWFD2.*</regex>
@ -149,9 +148,14 @@
<regex>^ACUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^ACUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^ACUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^ACUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^ACUS03 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^ACUS03 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WWUS01 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FNUS2[1|2] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WWUS02 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FNUS28 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WWUS03 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FNUS5[1-6] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FNUS6[1-6] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FNUS8[1-6] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FNCA5[1-6] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^FNHW5[1-6] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WWUS8[2-6] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^WWUS20 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WWUS50 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*SEV[0-9].*</regex> <regex>^WWUS50 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*SEV[0-9].*</regex>
<regex>^WWUS60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*SEVSPC.*</regex> <regex>^WWUS60 .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*SEVSPC.*</regex>
@ -191,6 +195,9 @@
<regex>^WSUS4[012] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^WSUS4[012] .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^WSUK.. .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*</regex> <regex>^WSUK.. .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*</regex>
<regex>^WS[^U]... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*</regex> <regex>^WS[^U]... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*</regex>
<regex>^WUUS01 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*</regex>
<regex>^WUUS02 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*</regex>
<regex>^WUUS03 KWNS (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*</regex>
<regex>^FT.... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex> <regex>^FT.... .... (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).+</regex>
<regex>^...... KWBC (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*HSF.*</regex> <regex>^...... KWBC (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*HSF.*</regex>
<regex>^...... PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*HSF.*</regex> <regex>^...... PHFO (0[1-9]|[12][0-9]|3[01])([01][0-9]|2[0-3])([0-5][0-9]).*HSF.*</regex>

View file

@ -70,7 +70,10 @@ mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/products/ISC
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/products/ATBL
if [ $? -ne 0 ]; then
exit 1
fi
# Copy the profile.d scripts. # Copy the profile.d scripts.
PROFILE_D_DIR="rpms/common/environment/awips2-gfesuite/profile.d" PROFILE_D_DIR="rpms/common/environment/awips2-gfesuite/profile.d"

View file

@ -70,7 +70,10 @@ mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/products/ISC
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/products/ATBL
if [ $? -ne 0 ]; then
exit 1
fi
# Copy the profile.d scripts. # Copy the profile.d scripts.
PROFILE_D_DIR="rpms/common/environment/awips2-gfesuite/profile.d" PROFILE_D_DIR="rpms/common/environment/awips2-gfesuite/profile.d"

View file

@ -362,10 +362,10 @@ fi
if [ "${1}" = "-edex" ]; then if [ "${1}" = "-edex" ]; then
#buildRPM "awips2" #buildRPM "awips2"
buildRPM "awips2-common-base" #buildRPM "awips2-common-base"
buildRPM "awips2-adapt-native" #buildRPM "awips2-adapt-native"
buildRPM "awips2-python-qpid" #buildRPM "awips2-python-qpid"
buildRPM "awips2-cli" #buildRPM "awips2-cli"
buildRPM "awips2-gfesuite-client" buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server" buildRPM "awips2-gfesuite-server"
buildEDEX buildEDEX