Merge "Omaha #4779 remove OBE data scale" into omaha_16.2.1

Former-commit-id: 5f7ff9f332b5e83a9a8add48e6c729bba228e015
This commit is contained in:
Nate Jensen 2015-09-03 13:37:51 -05:00 committed by Gerrit Code Review
commit 720586b344
8 changed files with 47 additions and 504 deletions

View file

@ -1,93 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.d2d.core;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.ui.IWorkbenchWindow;
import com.raytheon.viz.ui.VizWorkbenchManager;
/**
* Class for holding whether data scale is selected for each window
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 19, 2010 mschenke Initial creation
*
* </pre>
*
* @author mschenke
* @version 1.0
*/
public class DataScale {
private static Map<IWorkbenchWindow, Boolean> scaleMap = new HashMap<IWorkbenchWindow, Boolean>();
/**
* Set the data scale for the given workbench window
*
* @param window
* @param scale
*/
public static void setDataScale(IWorkbenchWindow window, Boolean scale) {
scaleMap.put(window, scale);
}
/**
* Set the data scale for the active workbench window, used if you don't
* know what window you are on
*
* @param scale
*/
public static void setDataScale(Boolean scale) {
setDataScale(VizWorkbenchManager.getInstance().getCurrentWindow(),
scale);
}
/**
* Check if the data scale option is selected for the given window
*
* @param window
* @return
*/
public static boolean isDataScale(IWorkbenchWindow window) {
Boolean scaled = scaleMap.get(window);
if (scaled == null) {
scaled = false;
scaleMap.put(window, scaled);
}
return scaled;
}
/**
* Check if the data scaled option is selected for the active window
*
* @return
*/
public static boolean isDataScale() {
return isDataScale(VizWorkbenchManager.getInstance().getCurrentWindow());
}
}

View file

@ -63,10 +63,11 @@ import com.raytheon.viz.core.imagery.ImageCombiner;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 9, 2009 njensen Initial creation
* Feb 09, 2009 njensen Initial creation
* Mar 21, 2013 1638 mschenke Made map scales not tied to d2d
* Mar 22, 2013 1638 mschenke Moved map scale code to MapScaleRenderableDisplay
* Apr 06, 2015 ASM #17215 D. Friedman Implement clear to avoid removing time match basis
* Sep 03, 2015 4779 njensen Removed DataScale references
*
* </pre>
*
@ -89,8 +90,6 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay
protected double density = ((Double) VizGlobalsManager.getCurrentInstance()
.getPropery(VizConstants.DENSITY_ID)).doubleValue();
protected DataScaleListener scaleListener = null;
protected ImageCombiner combinerListener = null;
protected boolean scaleOnNextPaint = false;
@ -272,10 +271,12 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay
this.scaleOnNextPaint = scale;
}
@Override
public long getBlinkInterval() {
return super.getBlinkInterval();
}
@Override
public void setBlinkInterval(long blinkInterval) {
super.setBlinkInterval(blinkInterval);
}
@ -297,22 +298,6 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay
// Add the image combiner
resourceList.addPostAddListener(getImageCombinerListener());
// Add scale listeners
resourceList.addPostAddListener(getScaleListener());
resourceList.addPostRemoveListener(getScaleListener());
}
/**
* Get the data scale listener, instantiates if null
*
* @return
*/
private DataScaleListener getScaleListener() {
if (scaleListener == null) {
scaleListener = new DataScaleListener(this);
}
return scaleListener;
}
/**
@ -327,9 +312,11 @@ public class D2DMapRenderableDisplay extends MapScaleRenderableDisplay
return combinerListener;
}
/** Like MapScaleRenderableDisplayer.clear, but avoids removing the time match
* basis until other resources are removed. This reduces time matching churn
* and reduces the chances of lockups.
/**
* Like MapScaleRenderableDisplayer.clear, but avoids removing the time
* match basis until other resources are removed. This reduces time matching
* churn and reduces the chances of lockups.
*
* @see com.raytheon.uf.viz.core.maps.scales.MapScaleRenderableDisplay#clear()
*/
@Override

View file

@ -1,162 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.d2d.core.map;
import org.geotools.coverage.grid.GridGeometry2D;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.geospatial.MapUtil;
import com.raytheon.uf.viz.core.drawables.ResourcePair;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.map.MapDescriptor;
import com.raytheon.uf.viz.core.rsc.IResourceGroup;
import com.raytheon.uf.viz.core.rsc.ResourceList;
import com.raytheon.uf.viz.core.rsc.ResourceList.AddListener;
import com.raytheon.uf.viz.core.rsc.ResourceList.RemoveListener;
import com.raytheon.uf.viz.core.rsc.capabilities.BlendableCapability;
import com.raytheon.uf.viz.d2d.core.DataScale;
import com.raytheon.viz.core.rsc.BestResResource;
import com.vividsolutions.jts.geom.Coordinate;
/**
* Resource add/remove listener for doing data scale changing with the data
* scale set in the options menu
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 20, 2010 mschenke Initial creation
*
* </pre>
*
* @author mschenke
* @version 1.0
*/
public class DataScaleListener implements AddListener, RemoveListener {
private ResourcePair scaleResource;
private D2DMapRenderableDisplay renderableDisplay;
public DataScaleListener(D2DMapRenderableDisplay display) {
this.renderableDisplay = display;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.rsc.ResourceList.AddListener#notifyAdd(com.raytheon
* .uf.viz.core.drawables.ResourcePair)
*/
@Override
public void notifyAdd(ResourcePair rp) throws VizException {
if (isDataScale() && scaleResource == null) {
checkDataScaleResource(null, rp);
}
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.rsc.ResourceList.RemoveListener#notifyRemove
* (com.raytheon.uf.viz.core.drawables.ResourcePair)
*/
@Override
public void notifyRemove(ResourcePair rp) throws VizException {
if (scaleResource != null && rp == scaleResource) {
scaleResource = null;
if (isDataScale()) {
checkDataScaleResourceList(null, renderableDisplay
.getDescriptor().getResourceList());
}
}
}
/**
* Checks the DataScale class for data scaled selected on the active window.
* Must be run on UI Thread
*
* @return
*/
private boolean isDataScale() {
return DataScale.isDataScale();
}
/**
* Checks for IDataScaleInterface on the resource
*
* @param parent
* @param rp
* @return
* @throws VizException
*/
private boolean checkDataScaleResource(ResourcePair parent, ResourcePair rp)
throws VizException {
if (rp.getResource() != null) {
parent = parent == null ? rp : parent;
if (rp.getResource() instanceof IDataScaleResource) {
scaleResource = parent;
IDataScaleResource dsr = (IDataScaleResource) rp.getResource();
Coordinate centerPoint = dsr.getCenterLocation();
if (centerPoint != null) {
CoordinateReferenceSystem crs = MapUtil
.constructStereographic(MapUtil.AWIPS_EARTH_RADIUS,
MapUtil.AWIPS_EARTH_RADIUS, centerPoint.y,
centerPoint.x);
GridGeometry2D gridGeom = MapDescriptor.createGridGeometry(
crs, centerPoint, 500000, 500000);
renderableDisplay.getDescriptor().setGridGeometry(gridGeom);
renderableDisplay.setScaleOnNextPaint(true);
return true;
}
} else if (rp.getResource()
.hasCapability(BlendableCapability.class)) {
return checkDataScaleResourceList(parent, rp.getResource()
.getCapability(BlendableCapability.class)
.getResourceList());
} else if (rp.getResource() instanceof IResourceGroup) {
return checkDataScaleResourceList(parent, ((IResourceGroup) rp
.getResource()).getResourceList());
} else if (rp.getResource() instanceof BestResResource) {
return checkDataScaleResourceList(parent, ((BestResResource) rp
.getResource()).getResourceList());
}
}
return false;
}
private boolean checkDataScaleResourceList(ResourcePair parent,
ResourceList list) throws VizException {
boolean rval = false;
for (ResourcePair pair : list) {
if (checkDataScaleResource(parent, pair)) {
rval = true;
break;
}
}
return rval;
}
}

View file

@ -1,49 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.d2d.core.map;
import com.vividsolutions.jts.geom.Coordinate;
/**
* Interface for providing data scale information
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 20, 2010 mschenke Initial creation
*
* </pre>
*
* @author mschenke
* @version 1.0
*/
public interface IDataScaleResource {
/**
* Get the center point for the resource, used for rescaling the map
*
* @return
*/
public Coordinate getCenterLocation();
}

View file

@ -225,11 +225,6 @@
label="Time Options"
style="toggle">
</command>
<command
commandId="com.raytheon.uf.viz.d2d.ui.actions.dataScaleAction"
label="Data Scale"
style="toggle">
</command>
<command
commandId="com.raytheon.uf.viz.d2d.ui.actions.imageCombination"
label="Image Combination"
@ -1181,11 +1176,7 @@
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.raytheon.uf.viz.d2d.ui.actions.DataScaleAction"
commandId="com.raytheon.uf.viz.d2d.ui.actions.dataScaleAction">
</handler>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.raytheon.uf.viz.d2d.ui.actions.ChangeLegendModeHandler"
commandId="com.raytheon.uf.viz.d2d.ui.actions.changeLegendMode">
@ -1679,13 +1670,7 @@
<parameter id="direction" value="1"></parameter>
<parameter id="startIndex" value="2"></parameter>
<parameter id="hideIndex" value="0"></parameter>
</key>
<key
contextId="com.raytheon.uf.viz.d2d.ui"
commandId="com.raytheon.uf.viz.d2d.ui.actions.dataScaleAction"
schemeId="com.raytheon.viz.ui.cave.scheme"
sequence="M1+S">
</key>
</key>
<key
contextId="com.raytheon.uf.viz.d2d.ui"
commandId="com.raytheon.uf.viz.d2d.ui.actions.imageCombination"
@ -1741,12 +1726,6 @@
optional="false">
</commandParameter>
</command>
<command
id="com.raytheon.uf.viz.d2d.ui.actions.dataScaleAction"
categoryId="com.raytheon.uf.viz.d2d.ui"
description="Toggle the data scale enabled option"
name="Toggle Data Scale">
</command>
<command
id="com.raytheon.uf.viz.d2d.ui.actions.changeLegendMode"
categoryId="com.raytheon.uf.viz.d2d.ui"
@ -1790,10 +1769,6 @@
description="Open time options dialog"
name="Time Options">
</command>
<command
id="com.raytheon.viz.ui.actions.notImplemented"
name="Data Scale">
</command>
<command
id="com.raytheon.uf.viz.d2d.ui.actions.locateCursorAction"
categoryId="com.raytheon.uf.viz.d2d.ui"

View file

@ -1,74 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.d2d.ui.actions;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.commands.ICommandService;
import com.raytheon.uf.viz.d2d.core.DataScale;
import com.raytheon.viz.ui.VizWorkbenchManager;
import com.raytheon.viz.ui.tools.AbstractTool;
/**
* Action class for updating the data scale selection for the window
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 19, 2010 mschenke Initial creation
*
* </pre>
*
* @author mschenke
* @version 1.0
*/
public class DataScaleAction extends AbstractTool {
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
super.execute(event);
boolean selected = !DataScale.isDataScale();
DataScale.setDataScale(selected);
setEnabled(selected);
return null;
}
public void setEnabled(boolean isEnabled) {
this.isEnabled = isEnabled;
ICommandService service = (ICommandService) VizWorkbenchManager
.getInstance().getCurrentWindow()
.getService(ICommandService.class);
if (service != null) {
service.refreshElements(commandId, null);
}
}
}

View file

@ -30,7 +30,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
@ -38,6 +37,7 @@ import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.drawables.IDescriptor;
import com.raytheon.uf.viz.core.drawables.ResourcePair;
@ -50,7 +50,6 @@ import com.raytheon.uf.viz.core.rsc.IResourceGroup;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.core.rsc.ResourceList;
import com.raytheon.uf.viz.core.rsc.capabilities.DisplayTypeCapability;
import com.raytheon.uf.viz.d2d.core.map.IDataScaleResource;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.viz.core.rsc.ICombinedResourceData;
import com.raytheon.viz.grid.inv.GribDataCubeAlertMessageParser;
@ -58,6 +57,7 @@ import com.raytheon.viz.grid.inv.GridInventory;
import com.raytheon.viz.grid.rsc.general.D2DGridResource;
import com.raytheon.viz.grid.rsc.general.DifferenceGridResourceData;
import com.raytheon.viz.grid.util.TiltRequest;
import com.raytheon.viz.radar.rsc.AbstractRadarResource;
import com.vividsolutions.jts.geom.Coordinate;
/**
@ -71,6 +71,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Feb 12, 2009 njensen Initial creation
* Jun 17, 2013 2107 bsteffen Enable sampling by default for several
* display types.
* Sep 03, 2015 4779 njensen Removed DataScale references
*
* </pre>
*
@ -386,8 +387,8 @@ public class GridResourceData extends AbstractRequestableResourceData implements
for (ResourcePair rp : resourceList) {
AbstractResourceData resourceData = rp.getResourceData();
AbstractVizResource<?, ?> resource = rp.getResource();
if (resource instanceof IDataScaleResource) {
return ((IDataScaleResource) resource).getCenterLocation();
if (resource instanceof AbstractRadarResource) {
return ((AbstractRadarResource<?>) resource).getRadarLocation();
}
if (resourceData instanceof IResourceGroup) {
Coordinate tiltLoc = findTiltLocation(((IResourceGroup) resourceData)

View file

@ -55,7 +55,6 @@ import com.raytheon.uf.viz.core.rsc.capabilities.BlendableCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.BlendedCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability;
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
import com.raytheon.uf.viz.d2d.core.map.IDataScaleResource;
import com.raytheon.uf.viz.d2d.core.sampling.ID2DSamplingResource;
import com.raytheon.uf.viz.d2d.core.time.D2DTimeMatcher;
import com.raytheon.uf.viz.d2d.core.time.ID2DTimeMatchingExtension;
@ -84,6 +83,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* May 5, 2014 17201 D. Friedman Enable same-radar time matching.
* Jun 11, 2014 2061 bsteffen Move rangeable methods to radial resource
* May 13, 2015 4461 bsteffen Add sails frame coordinator.
* Sep 03, 2015 4779 njensen Removed IDataScale
*
* </pre>
*
@ -93,15 +93,21 @@ import com.vividsolutions.jts.geom.Coordinate;
public class AbstractRadarResource<D extends IDescriptor> extends
AbstractVizResource<RadarResourceData, D> implements
IResourceDataChanged, IDataScaleResource,
IRadarTextGeneratingResource, ICacheObjectCallback<RadarRecord>,
ID2DTimeMatchingExtension {
IResourceDataChanged, IRadarTextGeneratingResource,
ICacheObjectCallback<RadarRecord>, ID2DTimeMatchingExtension {
/*
* TODO This is dumb that a class with a name starting with Abstract is not
* actually abstract. Either rename this class or actually apply the
* abstract modifier.
*/
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(AbstractRadarResource.class);
public enum InspectLabels {
Mnemonic, Value, Angle, Shear, MSL, AGL, Azimuth, Range, ICAO
};
}
private static final List<InspectLabels> defaultInspectLabels = Arrays
.asList(InspectLabels.Value, InspectLabels.Shear,
@ -136,7 +142,7 @@ public class AbstractRadarResource<D extends IDescriptor> extends
protected Map<DataTime, String[]> upperTextMap = new HashMap<DataTime, String[]>();
protected Coordinate centerLocation = null;
protected Coordinate radarLocation = null;
protected static final RadarInfoDict infoDict;
@ -172,24 +178,12 @@ public class AbstractRadarResource<D extends IDescriptor> extends
icao = "";
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.rsc.AbstractVizResource#initInternal(com.raytheon
* .uf.viz.core.IGraphicsTarget)
*/
@Override
protected void initInternal(IGraphicsTarget target) throws VizException {
SailsFrameCoordinator.addToDescriptor(descriptor);
RadarTextResourceData.addRadarTextResource(descriptor);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.core.rsc.AbstractVizResource#disposeInternal()
*/
@Override
protected void disposeInternal() {
radarRecords.clear();
@ -212,8 +206,8 @@ public class AbstractRadarResource<D extends IDescriptor> extends
radarRecord.setAddSpatial(!resourceData.latest);
icao = radarRecord.getIcao();
if (radarRecord.getLatitude() != null
&& radarRecord.getLongitude() != null) {
centerLocation = new Coordinate(radarRecord.getLongitude(),
&& radarRecord.getLongitude() != null && radarLocation == null) {
radarLocation = new Coordinate(radarRecord.getLongitude(),
radarRecord.getLatitude());
}
DataTime d = radarRecord.getDataTime();
@ -267,27 +261,15 @@ public class AbstractRadarResource<D extends IDescriptor> extends
return new DefaultVizRadarRecord(radarRecord);
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.rsc.AbstractVizResource#paintInternal(com.raytheon
* .uf.viz.core.IGraphicsTarget,
* com.raytheon.uf.viz.core.drawables.PaintProperties)
*/
@Override
protected void paintInternal(IGraphicsTarget target,
PaintProperties paintProps) throws VizException {
/*
* TODO if this class actually goes abstract, this method should be
* deleted and force subclasses to implement it
*/
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.rsc.IResourceDataChanged#resourceChanged(com
* .raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType,
* java.lang.Object)
*/
@Override
public void resourceChanged(ChangeType type, Object object) {
if (type == ChangeType.DATA_UPDATE) {
@ -299,13 +281,6 @@ public class AbstractRadarResource<D extends IDescriptor> extends
issueRefresh();
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.viz.core.rsc.capabilities.IInspectableResource#inspect(com
* .vividsolutions.jts.geom.Coordinate)
*/
@Override
public String inspect(ReferencedCoordinate latLon) throws VizException {
Map<String, String> dataMap;
@ -422,27 +397,20 @@ public class AbstractRadarResource<D extends IDescriptor> extends
displayedData.append("@" + dataMap.get("Azimuth"));
}
if (!"DMD".equalsIgnoreCase(dataMap.get("Mnemonic")))
{
if (!"DMD".equalsIgnoreCase(dataMap.get("Mnemonic"))) {
if (labels.contains(InspectLabels.ICAO)) {
displayedData.append(' ').append(dataMap.get("ICAO"));
}
}
if (displayedData.toString().contains("null") || displayedData.toString().isEmpty()) {
if (displayedData.toString().contains("null")
|| displayedData.toString().isEmpty()) {
displayedData.replace(0, displayedData.length(), "NO DATA");
}
return displayedData.toString();
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.rsc.AbstractVizResource#interrogate(com.raytheon
* .uf.viz.core.geospatial.ReferencedCoordinate)
*/
@Override
public Map<String, Object> interrogate(ReferencedCoordinate coord)
throws VizException {
@ -523,15 +491,8 @@ public class AbstractRadarResource<D extends IDescriptor> extends
return radarRecords;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.d2d.core.map.IDataScaleResource#getCenterLocation()
*/
@Override
public Coordinate getCenterLocation() {
return centerLocation;
public Coordinate getRadarLocation() {
return radarLocation;
}
@Override
@ -543,13 +504,6 @@ public class AbstractRadarResource<D extends IDescriptor> extends
upperTextMap.remove(dataTime);
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.core.cache.GeneralCacheObject.ICacheObjectCallback
* #objectArrived(java.lang.Object)
*/
@Override
public void objectArrived(RadarRecord object) {
issueRefresh();
@ -558,16 +512,20 @@ public class AbstractRadarResource<D extends IDescriptor> extends
@Override
public void modifyTimeMatching(D2DTimeMatcher d2dTimeMatcher,
AbstractVizResource<?, ?> rsc, TimeMatcher timeMatcher) {
/* Intended to be equivalent to A1 radar-specific part of
/*
* Intended to be equivalent to A1 radar-specific part of
* TimeMatchingFunctions.C:setRadarOnRadar.
*/
AbstractVizResource<?, ?> tmb = d2dTimeMatcher.getTimeMatchBasis();
if (tmb instanceof AbstractRadarResource) {
AbstractRadarResource<?> tmbRadarRsc = (AbstractRadarResource<?>) tmb;
AbstractResourceData tmbResData = tmbRadarRsc.getResourceData();
RequestConstraint icaoRC = getResourceData().getMetadataMap().get("icao");
if (icaoRC != null && tmbResData instanceof RadarResourceData &&
icaoRC.equals(((RadarResourceData) tmbResData).getMetadataMap().get("icao"))) {
RequestConstraint icaoRC = getResourceData().getMetadataMap().get(
"icao");
if (icaoRC != null
&& tmbResData instanceof RadarResourceData
&& icaoRC.equals(((RadarResourceData) tmbResData)
.getMetadataMap().get("icao"))) {
timeMatcher.setRadarOnRadar(true);
}
}