Issue #3117 update satellite inventory for new sectors or elements.
Former-commit-id: 35845fa63be35661893d31510f83e2d9ab6f60af
This commit is contained in:
parent
c8ba70a146
commit
bbbf957ba8
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.viz.datacube;bundle-version="1.14.0",
|
||||||
com.raytheon.uf.common.dataplugin.level,
|
com.raytheon.uf.common.dataplugin.level,
|
||||||
com.raytheon.uf.common.comm,
|
com.raytheon.uf.common.comm,
|
||||||
com.raytheon.uf.common.numeric
|
com.raytheon.uf.common.numeric,
|
||||||
|
com.raytheon.viz.alerts
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Export-Package: com.raytheon.viz.satellite,
|
Export-Package: com.raytheon.viz.satellite,
|
||||||
com.raytheon.viz.satellite.rsc
|
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;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.common.time.DataTime;
|
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
|
* 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
|
* Date Ticket# Engineer Description
|
||||||
* ------------- -------- ----------- --------------------------
|
* ------------- -------- ----------- --------------------------
|
||||||
* Apr 09, 2014 2947 bsteffen Initial creation
|
* Apr 09, 2014 2947 bsteffen Initial creation
|
||||||
|
* May 06, 2014 3117 bsteffen Update for new data.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bsteffen
|
* @author bsteffen
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
public class SatelliteInventory extends AbstractInventory {
|
public class SatelliteInventory extends AbstractInventory implements
|
||||||
|
IAlertObserver {
|
||||||
|
|
||||||
private static final IUFStatusHandler statusHandler = UFStatus
|
private static final IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(SatelliteInventory.class);
|
.getHandler(SatelliteInventory.class);
|
||||||
|
@ -88,6 +93,10 @@ public class SatelliteInventory extends AbstractInventory {
|
||||||
|
|
||||||
private Level level;
|
private Level level;
|
||||||
|
|
||||||
|
public SatelliteInventory() {
|
||||||
|
ProductAlertObserver.addObserver(SATELLITE, this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DataTime> timeAgnosticQuery(Map<String, RequestConstraint> query) {
|
public List<DataTime> timeAgnosticQuery(Map<String, RequestConstraint> query) {
|
||||||
/* Returning null means no data will be time agnostic. */
|
/* 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