Merge "Issue #1659 Add PDOs to D2DGridResource in constructor to avoid duplicate data requests." into development
Former-commit-id:2e15dd3a75
[formerlyaf33dd1743
] [formerlyb98bdb3d81
] [formerly3b718bea52
[formerlyb98bdb3d81
[formerly bedfb6a21680961421b42bcbcec470e41bb9523d]]] Former-commit-id:3b718bea52
Former-commit-id: 7ce74c902674348f2cef516514b2f29b684f8bc2 [formerlyc21a1e9f61
] Former-commit-id:25909b2ee1
This commit is contained in:
commit
b5205f6b13
1 changed files with 20 additions and 9 deletions
|
@ -46,6 +46,7 @@ import com.raytheon.uf.common.gridcoverage.GridCoverage;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
@ -73,6 +74,9 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 9, 2011 bsteffen Initial creation
|
||||
* Feb 25, 2013 1659 bsteffen Add PDOs to D2DGridResource in
|
||||
* constructor to avoid duplicate data
|
||||
* requests.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -92,27 +96,34 @@ public class D2DGridResource extends GridResource<GridResourceData> implements
|
|||
if (resourceData.getNameGenerator() == null) {
|
||||
resourceData.setNameGenerator(new GridNameGenerator());
|
||||
}
|
||||
for (GridRecord record : resourceData.getRecords()) {
|
||||
addDataObject(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initInternal(IGraphicsTarget target) throws VizException {
|
||||
String paramAbbrev = "";
|
||||
for (GridRecord record : resourceData.getRecords()) {
|
||||
paramAbbrev = record.getParameter().getAbbreviation();
|
||||
addDataObject(record);
|
||||
for (DataTime time : getDataTimes()) {
|
||||
requestData(time);
|
||||
}
|
||||
GridRecord randomRec = getAnyGridRecord();
|
||||
if (randomRec != null) {
|
||||
String paramAbbrev = randomRec.getParameter().getAbbreviation();
|
||||
this.getCapability(DisplayTypeCapability.class)
|
||||
.setAlternativeDisplayTypes(
|
||||
FieldDisplayTypesFactory.getInstance()
|
||||
.getDisplayTypes(paramAbbrev));
|
||||
}
|
||||
this.getCapability(DisplayTypeCapability.class)
|
||||
.setAlternativeDisplayTypes(
|
||||
FieldDisplayTypesFactory.getInstance().getDisplayTypes(
|
||||
paramAbbrev));
|
||||
super.initInternal(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDataObject(PluginDataObject pdo) {
|
||||
super.addDataObject(pdo);
|
||||
requestData(pdo.getDataTime());
|
||||
if (descriptor != null) {
|
||||
requestData(pdo.getDataTime());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue