Issue #189 updates to GFE from code review

Former-commit-id: 8afcbace62 [formerly a64647ddbd4f062602f092b828c080af2550f31a]
Former-commit-id: 3ff63d4ad3
This commit is contained in:
Ben Steffensmeier 2012-10-02 17:05:21 -05:00
parent 326acb6c15
commit bf80df2927
2 changed files with 5 additions and 15 deletions

View file

@ -658,7 +658,6 @@ public class GFEDao extends DefaultPluginDao {
+ id.getDbId().getSiteId(), e);
}
}
// }
return null;
}
@ -851,8 +850,8 @@ public class GFEDao extends DefaultPluginDao {
List<DataTime> results = executeD2DParmQuery(id);
for (DataTime o : results) {
if (isMos(id)) {
timeList.add(new TimeRange(o.getValidPeriod().getEnd(),
o.getValidPeriod().getDuration()));
timeList.add(new TimeRange(o.getValidPeriod().getEnd(), o
.getValidPeriod().getDuration()));
} else {
timeList.add(o.getValidPeriod());
}

View file

@ -38,7 +38,6 @@ import com.raytheon.edex.plugin.gfe.config.IFPServerConfig;
import com.raytheon.edex.plugin.gfe.config.IFPServerConfigManager;
import com.raytheon.edex.plugin.gfe.db.dao.GFEDao;
import com.raytheon.edex.plugin.gfe.exception.GfeConfigurationException;
import com.raytheon.edex.plugin.grib.spatial.GribSpatialCache;
import com.raytheon.edex.plugin.grib.util.GribParamInfoLookup;
import com.raytheon.edex.plugin.grib.util.ParameterInfo;
import com.raytheon.edex.util.Util;
@ -94,7 +93,7 @@ public class D2DGridDatabase extends VGridDatabase {
.getHandler(D2DGridDatabase.class);
/** The remap object used for resampling grids */
private Map<String, RemapGrid> remap = new HashMap<String, RemapGrid>();
private Map<Integer, RemapGrid> remap = new HashMap<Integer, RemapGrid>();
/** The destination GridLocation (The local GFE grid coverage) */
private GridLocation outputLoc;
@ -114,24 +113,16 @@ public class D2DGridDatabase extends VGridDatabase {
valid = this.dbId.isValid();
if (valid) {
String gfeModelName = dbId.getModelName();
outputLoc = this.config.dbDomain();
String d2dModelName = this.config.d2dModelNameMapping(gfeModelName);
for (GridCoverage awipsGrid : GribSpatialCache.getInstance()
.getGridsForModel(d2dModelName)) {
getOrCreateRemap(awipsGrid);
}
}
}
private RemapGrid getOrCreateRemap(GridCoverage awipsGrid) {
RemapGrid remap = this.remap.get(awipsGrid.getName());
RemapGrid remap = this.remap.get(awipsGrid.getId());
if (remap == null) {
GridLocation inputLoc = GfeUtil.transformGridCoverage(awipsGrid);
remap = new RemapGrid(inputLoc, outputLoc);
this.remap.put(awipsGrid.getName(), remap);
this.remap.put(awipsGrid.getId(), remap);
}
return remap;
}