Issue #1183 Fixed GFE retrieval of D2D wind grids

Change-Id: I28890a090c47ac46785dbe5c3e34c29f234d5661

Former-commit-id: 407a393f2b [formerly 8988ac120a [formerly 1ed6dc27041ebb5898c53f7983d40021bec4de79]]
Former-commit-id: 8988ac120a
Former-commit-id: 898cbc342d
This commit is contained in:
Ron Anderson 2012-10-03 14:43:19 -05:00
parent 291233e4f6
commit 673adf3a8c

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());
} }