Issue #3117 update satellite inventory for new sectors or elements.
Former-commit-id:bbbf957ba8
[formerly 35845fa63be35661893d31510f83e2d9ab6f60af] Former-commit-id:70df0ee87e
This commit is contained in:
parent
bdf6d0b6be
commit
945fe1db2f
2 changed files with 34 additions and 2 deletions
|
@ -28,7 +28,8 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.viz.datacube;bundle-version="1.14.0",
|
||||
com.raytheon.uf.common.dataplugin.level,
|
||||
com.raytheon.uf.common.comm,
|
||||
com.raytheon.uf.common.numeric
|
||||
com.raytheon.uf.common.numeric,
|
||||
com.raytheon.viz.alerts
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.viz.satellite,
|
||||
com.raytheon.viz.satellite.rsc
|
||||
|
|
|
@ -53,6 +53,9 @@ 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.alerts.AlertMessage;
|
||||
import com.raytheon.viz.alerts.IAlertObserver;
|
||||
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
|
||||
|
||||
/**
|
||||
* Inventory of available satellite data. sectorID is used for source and
|
||||
|
@ -65,13 +68,15 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Apr 09, 2014 2947 bsteffen Initial creation
|
||||
* May 06, 2014 3117 bsteffen Update for new data.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SatelliteInventory extends AbstractInventory {
|
||||
public class SatelliteInventory extends AbstractInventory implements
|
||||
IAlertObserver {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(SatelliteInventory.class);
|
||||
|
@ -88,6 +93,10 @@ public class SatelliteInventory extends AbstractInventory {
|
|||
|
||||
private Level level;
|
||||
|
||||
public SatelliteInventory() {
|
||||
ProductAlertObserver.addObserver(SATELLITE, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataTime> timeAgnosticQuery(Map<String, RequestConstraint> query) {
|
||||
/* Returning null means no data will be time agnostic. */
|
||||
|
@ -226,4 +235,26 @@ public class SatelliteInventory extends AbstractInventory {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void alertArrived(Collection<AlertMessage> alertMessages) {
|
||||
if (dataTree == null) {
|
||||
return;
|
||||
}
|
||||
for (AlertMessage message : alertMessages) {
|
||||
String sector = message.decodedAlert.get(SECTOR_ID).toString();
|
||||
String pe = message.decodedAlert.get(PHYSICALELEMENT).toString();
|
||||
if (dataTree.getParameterNode(sector, pe) == null) {
|
||||
/*
|
||||
* When a sector or element arrives that is not known reinit the
|
||||
* tree to ensure no nodes are missing.
|
||||
*/
|
||||
try {
|
||||
initTree(derParLibrary);
|
||||
} catch (DataCubeException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue