Omaha #5491: Add additional special case for QPFSCAN

Change-Id: I9c4e84314054a6913f7b067eab3808e5acadab94

Former-commit-id: 375ce5c253a37d6b5fce19ce4802e0186a07282c
This commit is contained in:
Tim Jensen 2016-03-29 12:52:23 -05:00
parent 701606e48b
commit d23b1f4f17

View file

@ -30,6 +30,7 @@ import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager;
import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager.SOURCE_TYPE;
import com.raytheon.uf.common.monitor.config.FFMPTemplateConfigurationManager;
import com.raytheon.uf.common.monitor.config.FFTIDataManager;
import com.raytheon.uf.common.monitor.processing.IMonitorProcessing;
@ -61,7 +62,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
* Aug 08, 2015 4722 dhladky Simplified source map additions, config.
* Sep.09, 2015 4756 dhladky Further simplified configuration.
* Mar 04, 2016 5429 dhladky Special case for RFCFFG multi-RFC mosaics.
*
* Mar 29, 2016 5491 tjensen Special case for QPFSCAN
* </pre>
*
* @author dhladky
@ -349,7 +350,7 @@ public class FFMPConfig {
if (source.getDataType().equals(
FFMPSourceConfigurationManager.DATA_TYPE.XMRG
.getDataType())) {
dataObject = getXMRGFile(dataUri);
dataObject = getXMRGFile(dataUri);
} else if (source.getDataType().equals(
FFMPSourceConfigurationManager.DATA_TYPE.PDO
.getDataType())) {
@ -364,7 +365,8 @@ public class FFMPConfig {
dataObject = getGrib(dataUri);
}
sourceHash = processSource(sourceHash, dataObject, source, sourceKey);
sourceHash = processSource(sourceHash, dataObject,
source, sourceKey);
}
}
@ -381,7 +383,6 @@ public class FFMPConfig {
}
}
/**
* Grab the XMRG file for use
*
@ -436,13 +437,16 @@ public class FFMPConfig {
/**
* Process the sources from the URIfilter and ready them for processing.
*
* @param sourceHash
* @param dataObject
* @param source
* @param sourceKey
* @return sourceHash
*/
private HashMap<String, Object> processSource(HashMap<String, Object> sourceHash, Object dataObject, SourceXML source, String sourceKey) {
private HashMap<String, Object> processSource(
HashMap<String, Object> sourceHash, Object dataObject,
SourceXML source, String sourceKey) {
if (dataObject != null) {
// Is this a primary source?
@ -472,22 +476,26 @@ public class FFMPConfig {
HashMap<String, Object> virtSourceHash = new HashMap<String, Object>();
virtSourceHash.put(sourceKey, dataObject);
sources.put(product.getVirtual(), virtSourceHash);
} else if (source.isRfc()){
// The special case of RFCFFG, must have separate URI's for each RFC mosaic piece
// Use existing sourceKey that designates that mosaic piece.
} else if (source.isRfc()) {
/*
* The special case of RFCFFG, must have separate URI's for each
* RFC mosaic piece. Use existing sourceKey that designates that
* mosaic piece.
*/
} else if (source.getSourceType().equals(SOURCE_TYPE.QPF.name())) {
/*
* The special case of QPFSCAN. Use existing sourceKey that
* designates that mosaic piece.
*/
} else {
// NON Primary sources, find the primary.
String primarySource = ffmpgen
.getSourceConfig()
// NON Primary sources, find the primary.
String primarySource = ffmpgen.getSourceConfig()
.getPrimarySource(source);
// Find the sourceKey to run against.
for (ProductRunXML productRun : ffmpgen
.getRunConfig().getRunner(getCWA())
.getProducts()) {
if (productRun.getProductName().equals(
primarySource)) {
sourceKey = productRun
.getProductKey();
for (ProductRunXML productRun : ffmpgen.getRunConfig()
.getRunner(getCWA()).getProducts()) {
if (productRun.getProductName().equals(primarySource)) {
sourceKey = productRun.getProductKey();
break;
}
}