diff --git a/cave/com.raytheon.uf.viz.profiler/.classpath b/cave/com.raytheon.uf.viz.profiler/.classpath index 1fa3e6803d..eca7bdba8f 100644 --- a/cave/com.raytheon.uf.viz.profiler/.classpath +++ b/cave/com.raytheon.uf.viz.profiler/.classpath @@ -1,6 +1,6 @@ - + diff --git a/cave/com.raytheon.uf.viz.profiler/.settings/org.eclipse.jdt.core.prefs b/cave/com.raytheon.uf.viz.profiler/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..0c68a61dca --- /dev/null +++ b/cave/com.raytheon.uf.viz.profiler/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/cave/com.raytheon.uf.viz.profiler/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.profiler/META-INF/MANIFEST.MF index 27b373cd54..981e525649 100644 --- a/cave/com.raytheon.uf.viz.profiler/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.profiler/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: Profiler Plug-in Bundle-SymbolicName: com.raytheon.uf.viz.profiler;singleton:=true Bundle-Version: 1.15.1.qualifier Bundle-Vendor: RAYTHEON -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.15.0", com.raytheon.uf.common.pointdata;bundle-version="1.15.0", @@ -20,7 +20,9 @@ Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.15.0", com.raytheon.uf.viz.d2d.ui;bundle-version="1.14.0", com.raytheon.uf.viz.d2d.core;bundle-version="1.14.0", com.raytheon.uf.viz.xy;bundle-version="1.15.0", - com.raytheon.uf.common.sounding;bundle-version="1.14.0" + com.raytheon.uf.common.sounding;bundle-version="1.14.0", + com.raytheon.viz.ui Export-Package: com.raytheon.uf.viz.profiler, com.raytheon.uf.viz.profiler.ui Bundle-ClassPath: com.raytheon.uf.viz.profiler.jar +Import-Package: com.raytheon.viz.pointdata diff --git a/cave/com.raytheon.uf.viz.profiler/icons/profiler.png b/cave/com.raytheon.uf.viz.profiler/icons/profiler.png index 8dfb184550..6f1facf663 100644 Binary files a/cave/com.raytheon.uf.viz.profiler/icons/profiler.png and b/cave/com.raytheon.uf.viz.profiler/icons/profiler.png differ diff --git a/cave/com.raytheon.uf.viz.profiler/localization/bundles/UpperAirProfiler.xml b/cave/com.raytheon.uf.viz.profiler/localization/bundles/UpperAirProfiler.xml index 121571a1b7..3e8a264de2 100644 --- a/cave/com.raytheon.uf.viz.profiler/localization/bundles/UpperAirProfiler.xml +++ b/cave/com.raytheon.uf.viz.profiler/localization/bundles/UpperAirProfiler.xml @@ -38,7 +38,7 @@ - + diff --git a/cave/com.raytheon.uf.viz.profiler/localization/bundles/profilerAvailability.xml b/cave/com.raytheon.uf.viz.profiler/localization/bundles/profilerAvailability.xml new file mode 100644 index 0000000000..f4171711ef --- /dev/null +++ b/cave/com.raytheon.uf.viz.profiler/localization/bundles/profilerAvailability.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + PLAN_VIEW + + + + + + + + + + + + + + basemaps/profiler.spi + Profiler Stations + + + + + + + diff --git a/cave/com.raytheon.uf.viz.profiler/localization/menus/profiler/index.xml b/cave/com.raytheon.uf.viz.profiler/localization/menus/profiler/index.xml index aac1c4d75b..9bc31326d5 100644 --- a/cave/com.raytheon.uf.viz.profiler/localization/menus/profiler/index.xml +++ b/cave/com.raytheon.uf.viz.profiler/localization/menus/profiler/index.xml @@ -1,24 +1,8 @@ - + + + + + + \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.profiler/plugin.xml b/cave/com.raytheon.uf.viz.profiler/plugin.xml index 19cbcc80ef..fafd34ba00 100644 --- a/cave/com.raytheon.uf.viz.profiler/plugin.xml +++ b/cave/com.raytheon.uf.viz.profiler/plugin.xml @@ -27,7 +27,7 @@ default="true" icon="icons/profiler.png" id="com.raytheon.uf.viz.profiler.ui.ProfilerEditor" - name="Profiler Plot"> + name="Profiler"> constraints = new HashMap( - getMetadataMap()); + Map constraints = new HashMap(getMetadataMap()); constraints.put(PluginDataObject.DATATIME_ID, new RequestConstraint( dataTimes)); PointDataContainer pdc; diff --git a/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapMouseHandler.java b/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapMouseHandler.java new file mode 100644 index 0000000000..b87525f4c2 --- /dev/null +++ b/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapMouseHandler.java @@ -0,0 +1,227 @@ +package com.raytheon.uf.viz.profiler.ui.map; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Cursor; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IWorkbenchWindow; +import org.geotools.referencing.GeodeticCalculator; + +import com.raytheon.uf.common.dataplugin.profiler.ProfilerSite; +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.viz.core.map.IMapDescriptor; +import com.raytheon.viz.ui.VizWorkbenchManager; +import com.raytheon.viz.ui.actions.LoadBundleHandler; +import com.raytheon.viz.ui.editor.AbstractEditor; +import com.raytheon.viz.ui.input.InputAdapter; +import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager; +import com.raytheon.viz.ui.perspectives.VizPerspectiveListener; +import com.vividsolutions.jts.geom.Coordinate; + + +public class ProfilerMapMouseHandler extends InputAdapter { + + private static final IUFStatusHandler statusHandler = UFStatus + .getHandler(ProfilerMapMouseHandler.class); + + public ProfilerMapMouseHandler() { + instance = this; + } + + private static final double MinDistance = 45000; + + private static ProfilerMapMouseHandler instance; + + private double lat, lon; + + public double getLat() { + return lat; + } + + public double getLon() { + return lon; + } + + public static ProfilerMapMouseHandler getAccess() { + return instance; + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDown(int, int, + * int) + */ + @Override + public boolean handleMouseDown(int x, int y, int button) { + return false; + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDownMove(int, + * int, int) handle left button, so user be able to shift map while it is + * down + */ + @Override + public boolean handleMouseDownMove(int x, int y, int button) { + return false; + + } + + @Override + public boolean handleMouseMove(Event e) { + int x = e.x; + int y = e.y; + AbstractEditor mapEditor = ProfilerMapResource.getMapEditor(); + + if (mapEditor != null) { + + Coordinate loc = mapEditor.translateClick(x, y); + if (loc == null) + return false; + + List pts = ProfilerMapResource + .getOrCreateProfilerMapResource().getPoints(); + + ProfilerSite pt = getPtWithinMinDist(pts, loc); + + Shell shell = ((Control) e.widget).getShell(); + Cursor cursor = null; + + if (pt != null) { + cursor = new Cursor(Display.getCurrent(), SWT.CURSOR_HAND); + } else { + cursor = new Cursor(Display.getCurrent(), SWT.CURSOR_ARROW); + } + + shell.setCursor(cursor); + + } + + return false; + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.viz.ui.input.IInputHandler#handleMouseUp(int, int, int) + * handle right button, so user be able to pick stn and print text report + */ + @Override + public boolean handleMouseUp(int x, int y, int button) { + + boolean returnStatus = false; + + if (!ProfilerMapResource.getMapRsc().isEditable()) + return false; + + // left mouse button + if (button == 1) { + AbstractEditor mapEditor = ProfilerMapResource.getMapEditor(); + if (mapEditor != null) { + + Coordinate loc = mapEditor.translateClick(x, y); + if (loc == null) + return false; + + List pts = ProfilerMapResource + .getOrCreateProfilerMapResource().getPoints(); + ProfilerSite pt = getPtWithinMinDist(pts, loc); + + if (pt != null) { + + try { + + IWorkbenchWindow window = VizWorkbenchManager.getInstance() + .getCurrentWindow(); + AbstractVizPerspectiveManager mgr = VizPerspectiveListener.getInstance( + window).getActivePerspectiveManager(); + + if (mgr != null) { + + Map variableSubstitutions = new HashMap<>(); + variableSubstitutions.put("wmoid", pt.getProfilerId()); + new LoadBundleHandler("bundles/UpperAirProfiler.xml", + variableSubstitutions, + null, + true).execute(null); + + returnStatus = true; + + } + + } catch (ExecutionException e) { + e.printStackTrace(); + return false; + } + + } + } + } + + return returnStatus; + } + + + /** + * Gets the nearest point of an selected element to the input point + * + * @param el + * element + * @param pt + * input point + * @return + */ + private ProfilerSite getPtWithinMinDist( + List points, Coordinate pt) { + + ProfilerSite thePoint = null; + double minDistance = MinDistance; + + GeodeticCalculator gc; + // can't assume this is a map Editor/MapDescriptor + AbstractEditor mapEditor = ProfilerMapResource.getMapEditor(); + if (mapEditor != null && ! Double.isNaN(pt.x) && ! Double.isNaN(pt.y) ) { + IMapDescriptor desc = (IMapDescriptor) mapEditor + .getActiveDisplayPane().getRenderableDisplay() + .getDescriptor(); + + for (ProfilerSite selectPoint : points) { + + double dist; + try { + gc = new GeodeticCalculator(desc.getCRS()); + gc.setStartingGeographicPoint(pt.x, pt.y); + gc.setDestinationGeographicPoint(selectPoint.getLongitude(), + selectPoint.getLatitude()); + dist = gc.getOrthodromicDistance(); + if (dist < minDistance) { + minDistance = dist; + thePoint = selectPoint; + } + } catch (Exception e) { + statusHandler.handle( + Priority.WARN,"getOrthodromicDistance exception.",e); + } + } + + ProfilerMapResource.getOrCreateProfilerMapResource() + .setPickedPoint(thePoint); + } + return thePoint; + + } + + +} diff --git a/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapResource.java b/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapResource.java new file mode 100644 index 0000000000..eb59064585 --- /dev/null +++ b/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapResource.java @@ -0,0 +1,346 @@ +package com.raytheon.uf.viz.profiler.ui.map; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map.Entry; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Cursor; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PlatformUI; +import org.opengis.referencing.crs.CoordinateReferenceSystem; + +import com.raytheon.uf.common.dataplugin.profiler.ProfilerSite; +import com.raytheon.uf.viz.core.DrawableCircle; +import com.raytheon.uf.viz.core.IGraphicsTarget; +import com.raytheon.uf.viz.core.PixelExtent; +import com.raytheon.uf.viz.core.drawables.PaintProperties; +import com.raytheon.uf.viz.core.drawables.ResourcePair; +import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.uf.viz.core.map.IMapDescriptor; +import com.raytheon.uf.viz.core.map.MapDescriptor; +import com.raytheon.uf.viz.core.rsc.AbstractVizResource; +import com.raytheon.uf.viz.core.rsc.IInputHandler; +import com.raytheon.uf.viz.core.rsc.LoadProperties; +import com.raytheon.uf.viz.core.rsc.ResourceList.RemoveListener; +import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability; +import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability; +import com.raytheon.viz.pointdata.StaticPlotInfoPV; +import com.raytheon.viz.pointdata.StaticPlotInfoPV.SPIEntry; +import com.raytheon.viz.ui.EditorUtil; +import com.raytheon.viz.ui.editor.AbstractEditor; +import com.raytheon.viz.ui.input.EditableManager; + +public class ProfilerMapResource extends + AbstractVizResource implements + RemoveListener { + private static ProfilerMapResource mapRsc = null; + + private static ProfilerMapResourceData mapRscData = null; + + private static AbstractEditor mapEditor = null; + + private static ProfilerMapMouseHandler mouseHandler; + + private static Cursor waitCursor = null; + + private static Control cursorControl; + + private static boolean mouseHandlerRegistered = false; + + public static void bringMapEditorToTop() { + try { + if (mapEditor != null + && PlatformUI.getWorkbench() != null + && PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null + && PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .getActivePage() != null) { + PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .getActivePage().bringToTop((IWorkbenchPart) mapEditor); + mapEditor.refresh(); + } + } catch (Exception e) { + } + } + + public static AbstractEditor getMapEditor() { + return mapEditor; + } + + public static ProfilerMapResource getMapRsc() { + return mapRsc; + } + + private ProfilerMapResourceData profilerMapResourceData; + + /** The set of symbols */ + List circles = null; + + private static List points = new ArrayList(); + + private ProfilerSite pickedPoint = new ProfilerSite(); + + public void setPickedPoint(ProfilerSite point) { + this.pickedPoint = null; + this.pickedPoint = point; + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + if (points == null) { + this.pickedPoint = null; + this.points.clear(); + } else { + this.points = points; + } + } + + public void addPoint(ProfilerSite point) { + points.add(point); + } + + protected ProfilerMapResource(ProfilerMapResourceData profilerMapResourceData, + LoadProperties loadProperties) { + super(profilerMapResourceData, loadProperties); + + getCapability(EditableCapability.class).setEditable(true); + + this.profilerMapResourceData = profilerMapResourceData; + } + + public static void startWaitCursor() { + waitCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_WAIT); + cursorControl = Display.getCurrent().getCursorControl(); + if (cursorControl != null && waitCursor != null) + cursorControl.setCursor(waitCursor); + } + + public static void stopWaitCursor() { + if (cursorControl != null && waitCursor != null) { + cursorControl.setCursor(null); + } + if (waitCursor != null) { + waitCursor.dispose(); + waitCursor = null; + } + } + + private static void createMapEditor() { + deleteProfilerMapResource(); + try { + mapEditor = (AbstractEditor) EditorUtil.getActiveEditor(); + } catch (Exception ve) { + System.out + .println("ProfilerMapResource Could not load initial editor: " + + ve.getMessage()); + ve.printStackTrace(); + } + } + + public static void registerMouseHandler() { + if (mouseHandlerRegistered) + return; + + mouseHandler = getMouseHandler(); + if (mapEditor != null && mouseHandler != null) { + mapEditor.registerMouseHandler((IInputHandler) mouseHandler); + mouseHandlerRegistered = true; + } + } + + public static void unregisterMouseHandler() { + if (!mouseHandlerRegistered) + return; + mouseHandler = getMouseHandler(); + if (mapEditor != null && mouseHandler != null) { + mapEditor.unregisterMouseHandler((IInputHandler) mouseHandler); + mouseHandlerRegistered = false; + } + } + + /** + * Create a new MapResource and add it to the current editor. + * + * @return the MapResource + */ + public static ProfilerMapResource getOrCreateProfilerMapResource() { + + if (mapRsc == null) { + if (mapEditor == null) { + createMapEditor(); + } + if (mapEditor != null) { + IMapDescriptor desc = (IMapDescriptor) mapEditor + .getActiveDisplayPane().getRenderableDisplay() + .getDescriptor(); + try { + if (mapRscData == null) + mapRscData = new ProfilerMapResourceData(); + mapRsc = mapRscData.construct(new LoadProperties(), desc); + + createProfilerMapMarkers(); + + desc.getResourceList().add(mapRsc); + mapRsc.init(mapEditor.getActiveDisplayPane().getTarget()); + mouseHandler = getMouseHandler(); + mapEditor + .registerMouseHandler((IInputHandler) mouseHandler); + + } catch (Exception e) { + e.printStackTrace(); + } + } + } + return mapRsc; + } + + private static void createProfilerMapMarkers() { + StaticPlotInfoPV spipv = StaticPlotInfoPV + .readStaticPlotInfoPV("basemaps/profiler.spi"); + + List locs = new ArrayList(); + for (Entry entry : spipv.getSpiList().entrySet()) { + ProfilerSite loc = new ProfilerSite(); + loc.setStationId(entry.getKey()); + Integer blockNumber = entry.getValue().blockNumber; + loc.setProfilerId(blockNumber.toString()); + loc.setLatitude((double) entry.getValue().latlon.y); + loc.setLongitude((double) entry.getValue().latlon.x); + locs.add(loc); + } + + mapRsc.setPoints(locs); + } + + public static void deleteProfilerMapResource() { + System.out.println("ProfilerMapResource:deleteProfilerMapResource "); + if (mapRsc != null) { + mapRsc.dispose(); + mapRsc = null; + } + } + + /** + * Called when resource is disposed + * + * @see com.raytheon.viz.core.rsc.IVizResource#dispose() + */ + @Override + public void disposeInternal() { + if (mapEditor != null) { + mapEditor.unregisterMouseHandler(mouseHandler); + mouseHandler = null; + mapEditor = null; + } + pickedPoint = null; + mapRsc = null; + mapRscData = null; + if (waitCursor != null) + waitCursor.dispose(); + waitCursor = null; + mouseHandlerRegistered = false; + } + + public CoordinateReferenceSystem getCoordinateReferenceSystem() { + if (descriptor == null) + return null; + return descriptor.getCRS(); + } + + @Override + public String getName() { + return "Profiler Display"; + } + + @Override + public void initInternal(IGraphicsTarget target) throws VizException { + // make the map resource editable + EditableManager.makeEditable(this, + getCapability(EditableCapability.class).isEditable()); + } + + public boolean isApplicable(PixelExtent extent) { + return true; + } + + private void generateSymbolForDrawing() { + + circles = new ArrayList(mapRsc.getPoints().size()); + + if (points.isEmpty() == true) { + circles = null; + } else { + RGB color = new RGB (200,200,200); + for (ProfilerSite p : points) { + double lon, lat; + lon = p.getLongitude(); + lat = p.getLatitude(); + double[] pixel = descriptor.worldToPixel(new double[] { lon, lat }); + DrawableCircle circle = new DrawableCircle(); + circle.setCoordinates(pixel[0], pixel[1]); + circle.lineWidth = 1; + circle.screenRadius = getRadius()*1.4; + circle.numberOfPoints = (int) (circle.screenRadius * 4); + circle.basics.color = color; + circle.filled = false; + circles.add(circle); + } + + } + + } + + protected double getRadius() { + return 5 * getCapability(MagnificationCapability.class) + .getMagnification(); + } + + @Override + public void paintInternal(IGraphicsTarget target, PaintProperties paintProps) + throws VizException { + + getOrCreateProfilerMapResource(); + + generateSymbolForDrawing(); + target.drawCircle(circles.toArray(new DrawableCircle[0])); + + } + + public boolean isProjectable(CoordinateReferenceSystem mapData) { + return true; + } + + @Override + public void project(CoordinateReferenceSystem mapData) throws VizException { + // System.out.println("ProfilerMapResource: project "); + } + + private static ProfilerMapMouseHandler getMouseHandler() { + if (mouseHandler == null) { + mouseHandler = new ProfilerMapMouseHandler(); + } + return mouseHandler; + } + + @Override + public void notifyRemove(ResourcePair rp) throws VizException { + // TODO Auto-generated method stub + } + + public boolean isEditable() { + return getCapability(EditableCapability.class).isEditable(); + } + + public void setEditable(boolean enable) { + getCapability(EditableCapability.class).setEditable(enable); + EditableManager.makeEditable(this, + getCapability(EditableCapability.class).isEditable()); + } + +} diff --git a/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapResourceData.java b/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapResourceData.java new file mode 100644 index 0000000000..5666171b2a --- /dev/null +++ b/cave/com.raytheon.uf.viz.profiler/src/com/raytheon/uf/viz/profiler/ui/map/ProfilerMapResourceData.java @@ -0,0 +1,74 @@ +package com.raytheon.uf.viz.profiler.ui.map; + +import com.raytheon.uf.viz.core.drawables.IDescriptor; +import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.uf.viz.core.rsc.AbstractResourceData; +import com.raytheon.uf.viz.core.rsc.LoadProperties; + +public class ProfilerMapResourceData extends AbstractResourceData { + + private Float markerSize = 1.5f; + + private Integer markerWidth = 2; + + private String mapName = "Profiler"; + + public ProfilerMapResourceData() { + super(); + } + + @Override + public ProfilerMapResource construct(LoadProperties loadProperties, + IDescriptor descriptor) throws VizException { + // TODO Auto-generated method stub + return new ProfilerMapResource(this, loadProperties); + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.viz.core.rsc.AbstractResourceData#update(java.lang.Object + * ) + */ + @Override + public void update(Object updateData) { + // TODO Auto-generated method stub + } + + @Override + public boolean equals(Object obj) { + if (obj == null || !(obj instanceof ProfilerMapResourceData)) + return false; + ProfilerMapResourceData rdata = (ProfilerMapResourceData) obj; + if (this.markerSize.equals(rdata.getMarkerSize()) + && this.markerWidth.equals(rdata.getMarkerWidth())) + return true; + + return false; + } + + public Float getMarkerSize() { + return markerSize; + } + + public void setMarkerSize(Float markerSize) { + this.markerSize = markerSize; + } + + public Integer getMarkerWidth() { + return markerWidth; + } + + public void setMarkerWidth(Integer markerWidth) { + this.markerWidth = markerWidth; + } + + public String getMapName() { + return mapName; + } + + public void setMapName(String mapName) { + this.mapName = mapName; + } +} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java index 40cd4d6edb..92225510bb 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java @@ -74,6 +74,7 @@ import com.vividsolutions.jts.geom.Geometry; * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Dec 03, 2013 2537 bsteffen Remove IDecoderGettable * Jul 27, 2015 4360 rferrel Named unique constraint. Made reportType non-nullable. + * Feb 09, 2018 mjames@ucar Added stationId as request constraint. * * * @@ -82,7 +83,9 @@ import com.vividsolutions.jts.geom.Geometry; */ @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "profilerseq") -@Table(name = ProfilerObs.PLUGIN_NAME, uniqueConstraints = { @UniqueConstraint(name = "uk_profiler_datauri_fields", columnNames = { "dataURI" }) }) +@Table(name = ProfilerObs.PLUGIN_NAME, uniqueConstraints = { @UniqueConstraint(name = "uk_profiler_datauri_fields", columnNames = { + "dataURI", "stationId" + }) }) /* * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used.