Issue #1183 Fixed GFE retrieval of D2D wind grids

Change-Id: I28890a090c47ac46785dbe5c3e34c29f234d5661

Former-commit-id: 673adf3a8c [formerly 898cbc342d] [formerly 8988ac120a] [formerly 407a393f2b [formerly 8988ac120a [formerly 1ed6dc27041ebb5898c53f7983d40021bec4de79]]]
Former-commit-id: 407a393f2b
Former-commit-id: bda2e4afe5a4b9412d34891b0bd62643a8cb4fc7 [formerly 34644df289]
Former-commit-id: 6e2b1520d9
This commit is contained in:
Ron Anderson 2012-10-03 14:43:19 -05:00
parent 960a509eb8
commit e6dc0a1615

View file

@ -811,14 +811,13 @@ public class GFEDao extends DefaultPluginDao {
3600 * 1000)); 3600 * 1000));
} }
if ((!uTimeList.isEmpty()) && (!vTimeList.isEmpty()) for (TimeRange tr : uTimeList) {
& (uTimeList.size() == vTimeList.size())) { if (vTimeList.contains(tr)) {
for (TimeRange tr : uTimeList) { timeList.add(new TimeRange(tr.getStart(), tr.getStart()));
if (vTimeList.contains(tr)) {
timeList.add(new TimeRange(tr.getStart(), tr.getStart()));
}
} }
}
if (!timeList.isEmpty()) {
return timeList; return timeList;
} }
@ -838,22 +837,21 @@ public class GFEDao extends DefaultPluginDao {
3600 * 1000)); 3600 * 1000));
} }
if ((!sTimeList.isEmpty()) && (!dTimeList.isEmpty()) for (TimeRange tr : sTimeList) {
& (sTimeList.size() == dTimeList.size())) { if (dTimeList.contains(tr)) {
for (TimeRange tr : sTimeList) { timeList.add(new TimeRange(tr.getStart(), tr.getStart()));
if (dTimeList.contains(tr)) {
timeList.add(new TimeRange(tr.getStart(), tr.getStart()));
}
} }
return timeList; if (!timeList.isEmpty()) {
return timeList;
}
} }
} else { } else {
List<DataTime> results = executeD2DParmQuery(id); List<DataTime> results = executeD2DParmQuery(id);
for (DataTime o : results) { for (DataTime o : results) {
if (isMos(id)) { if (isMos(id)) {
timeList.add(new TimeRange(o.getValidPeriod().getEnd(), timeList.add(new TimeRange(o.getValidPeriod().getEnd(), o
o.getValidPeriod().getDuration())); .getValidPeriod().getDuration()));
} else { } else {
timeList.add(o.getValidPeriod()); timeList.add(o.getValidPeriod());
} }