From f4319b592045acd5871aa153104207769989f80e Mon Sep 17 00:00:00 2001 From: Ben Steffensmeier Date: Wed, 11 Jun 2014 12:37:08 -0500 Subject: [PATCH] Omaha #2061 Remove IDecoderGettable from all AWIPS2 Raytheon PDOs. Former-commit-id: 257cfe8bd3a15709c431594536fdc7cd0a4b1dfe [formerly a96199cc47840798c2ffdd442195c8668fdb05c2] [formerly d838ecc734462e5ecb3415b2524609800bc31a7d] [formerly 257cfe8bd3a15709c431594536fdc7cd0a4b1dfe [formerly a96199cc47840798c2ffdd442195c8668fdb05c2] [formerly d838ecc734462e5ecb3415b2524609800bc31a7d] [formerly 30415ae8c54ba75b8ffd61445dc94f4101be06cf [formerly d838ecc734462e5ecb3415b2524609800bc31a7d [formerly b6c63e5791a2438253d6ff039b5164c61105a941]]]] Former-commit-id: 30415ae8c54ba75b8ffd61445dc94f4101be06cf Former-commit-id: 1210c094d7a9e529ba91b9373133ec450f4cdbb6 [formerly 08a1e07918bc49d8ba1d7134659497c86034ad3c] [formerly c6abdf4a8300c5eb3d9c3950d871d79698655d9a [formerly eb7cf7e8da7396d6ee6c6d25c5f2a4d26d4b2088]] Former-commit-id: e02af9791372650c46525cb594c1dd112707a9c1 [formerly 02c4332c6aab81f82592b5172603aaa924d0e41f] Former-commit-id: 3db0af5561662402c4c228a16276fc81f8be5b8d --- .../d2d/nsharp/rsc/D2DNSharpDataObject.java | 16 +- .../ldadmanual/dao/ManualLdadRecord.java | 108 +---- .../ldadprofiler/common/ProfilerLdadObs.java | 83 +--- .../edex/plugin/shef/data/ShefRecord.java | 36 +- .../common/dataplugin/acars/ACARSRecord.java | 148 +------ .../uf/common/dataplugin/bufrua/UAObs.java | 306 +------------- .../uf/common/dataplugin/ffmp/FFMPRecord.java | 53 +-- .../dataplugin/fssobs/FSSObsRecord.java | 162 ++------ .../npp/sounding/NPPSoundingRecord.java | 19 +- .../dataplugin/obs/metar/MetarRecord.java | 376 ++---------------- .../common/dataplugin/radar/RadarRecord.java | 61 +-- .../dataplugin/satellite/SatelliteRecord.java | 54 +-- .../common/dataplugin/sfcobs/ObsCommon.java | 172 +------- .../warning/AbstractWarningRecord.java | 29 +- .../filterimpl/PluginDataObjectFilter.java | 22 +- .../core/filterimpl/RadiusFilterElement.java | 26 +- 16 files changed, 257 insertions(+), 1414 deletions(-) diff --git a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java index dd7015b2f2..af1c76fbc9 100644 --- a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java +++ b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java @@ -24,7 +24,6 @@ import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo; import java.util.List; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; /** @@ -35,10 +34,11 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Jul 26, 2011 bsteffen Initial creation - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Jul 26, 2011 bsteffen Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable * * * @@ -58,12 +58,6 @@ public class D2DNSharpDataObject extends PluginDataObject { } - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } - public NsharpStationInfo getStationInfo() { return stationInfo; } diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java index 55473e338e..8649fbe015 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java @@ -20,17 +20,7 @@ package com.raytheon.edex.plugin.ldadmanual.dao; import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; -import javax.measure.quantity.Angle; -import javax.measure.quantity.Length; -import javax.measure.quantity.Pressure; -import javax.measure.quantity.Temperature; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -47,7 +37,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.geospatial.ISpatialEnabled; @@ -63,15 +52,17 @@ import com.vividsolutions.jts.geom.Geometry; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ----------- ---------- ----------- -------------------------- - * Sep 30, 2009 vkorolev Initial creation - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Sep 30, 2009 vkorolev Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable + * * * * @author vkorolev @@ -91,41 +82,10 @@ import com.vividsolutions.jts.geom.Geometry; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ManualLdadRecord extends PluginDataObject implements - ISpatialEnabled, IDecoderGettable { + ISpatialEnabled { private static final long serialVersionUID = 1L; - public static final String OBS_TEXT = "text"; - - public static final Unit LENGTH_UNIT = SI.METER; - - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit PRESSURE_UNIT = SI.PASCAL; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("DpT", SFC_DWPT); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("WGS", SFC_WNDGST); - PARM_MAP.put("ASET", "SFC.PRESS.ALTIMETER"); - PARM_MAP.put("PMSL", PRES_SLP); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("STA", "STA"); - PARM_MAP.put("stationid", "STA"); - PARM_MAP.put("message", OBS_TEXT); - PARM_MAP.put(OBS_TEXT, OBS_TEXT); - } - // Time of the observation. @DataURI(position = 2) @Column @@ -2179,11 +2139,6 @@ public class ManualLdadRecord extends PluginDataObject implements this.location = location; } - @Override - public Amount getValue(String paramName) { - // TODO Auto-generated method stub - return null; - } /** * @return the timeObs @@ -2215,45 +2170,6 @@ public class ManualLdadRecord extends PluginDataObject implements return location; } - /** - * This class implements IDecoderGettable so return this instance. - * - * @return The reference to this instance. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - - /** - * - */ - @Override - public String getString(String paramName) { - String retValue = null; - String pName = PARM_MAP.get(paramName); - if ("STA".matches(pName)) { - retValue = getStationId(); - } else if (OBS_TEXT.equals(pName)) { - retValue = getStationId(); - } - - return retValue; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - /** - * - */ - @Override - public Collection getValues(String paramName) { - return null; - } - /** * @param providerId * the providerId to set diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java index f9455f1d31..4437a262df 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java +++ b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java @@ -20,15 +20,8 @@ package com.raytheon.edex.plugin.ldadprofiler.common; import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; import java.util.List; -import javax.measure.quantity.Angle; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -46,13 +39,10 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.IPersistable; import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject; -import com.raytheon.uf.common.geospatial.ISpatialEnabled; -import com.raytheon.uf.common.geospatial.ISpatialObject; import com.raytheon.uf.common.pointdata.IPointData; import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; @@ -66,15 +56,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ----------- ---------- ----------- -------------------------- - * Oct 07, 2009 vkorolev Initial creation - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Oct 07, 2009 vkorolev Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable * * * @@ -95,26 +86,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ProfilerLdadObs extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + IPointData, IPersistable { public static final String PLUGIN_NAME = "ldadprofiler"; private static final long serialVersionUID = 1L; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - private static final HashMap PARM_MAP = new HashMap(); - - static { - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - } private static final String PRESS = "PRESS"; @@ -293,42 +270,6 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements // ---------------------------------------------------- - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } - - @Override - public ISpatialObject getSpatialObject() { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getString(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String[] getStrings(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Amount getValue(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Collection getValues(String paramName) { - // TODO Auto-generated method stub - return null; - } - /** * @param location * the location to set @@ -398,6 +339,6 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements @Override public String getPluginName() { - return "ldadprofiler"; + return PLUGIN_NAME; } } diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java index c0b0419c08..34d543b0ad 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java @@ -36,9 +36,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import com.raytheon.edex.plugin.shef.util.SHEFDate; import com.raytheon.edex.plugin.shef.util.ShefUtil; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; -import com.raytheon.uf.common.dataplugin.shef.util.ParameterCode; import com.raytheon.uf.common.dataplugin.shef.util.SHEFTimezone; import com.raytheon.uf.common.dataplugin.shef.util.ShefConstants; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -47,15 +45,17 @@ import com.raytheon.uf.common.time.DataTime; /** *
  * SOFTWARE HISTORY
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * June2006     314         Phillippe   Initial Creation.
- * Nov 29, 2007 472         jkorman     Added IDecoderGettable interface.
- * Mar 19, 2008 387         M. Duff     Modified to store SHEF data.
- * May 07, 2013 1869        bsteffen    Remove dataURI column from
- *                                      PluginDataObject.
- * Aug 30, 2013 2298        rjpeter     Make getPluginName abstract
- * 
+ * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Jun ??, 2006 314 Phillippe Initial Creation. + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Mar 19, 2008 387 M. Duff Modified to store SHEF data. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable + * + * * @author bphillip * @version 1 @@ -129,9 +129,6 @@ public class ShefRecord extends PluginDataObject { @Transient private SHEFDate createDate = null; - @Transient - private final int durationValue = ParameterCode.Duration.DEFAULT.getValue(); - /** * Empty constructor */ @@ -550,17 +547,6 @@ public class ShefRecord extends PluginDataObject { messageSource = msgSrc; } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. Null for this - * class. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java index 3934a16ec6..e27155e862 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java @@ -20,17 +20,7 @@ package com.raytheon.uf.common.dataplugin.acars; import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; -import javax.measure.quantity.Angle; -import javax.measure.quantity.Length; -import javax.measure.quantity.Pressure; -import javax.measure.quantity.Temperature; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -48,7 +38,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.geospatial.ISpatialEnabled; @@ -63,19 +52,20 @@ import com.vividsolutions.jts.geom.Geometry; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jan 21, 2009 1939       jkorman     Initial creation
- * Apr 09, 2009 952        jsanchez    Updated getValue method.  Added a
- *                                     getMessageData method.
- * Apr 21, 2009 2245       jsanchez    Returned temperature unit to kelvin.
- * May 21, 2009 2338       jsanchez    Updated the getMessageData.
- * Apr 04, 2013 1846       bkowal      Added an index on refTime and
- *                                     forecastTime
- * Apr 12, 2013 1857       bgonzale    Added SequenceGenerator annotation.
- * May 07, 2013 1869       bsteffen    Remove dataURI column from
- *                                     PluginDataObject.
- * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * Date         Ticket#  Engineer    Description
+ * ------------ -------- ----------- --------------------------
+ * Jan 21, 2009  1939    jkorman     Initial creation
+ * Apr 09, 2009  952     jsanchez    Updated getValue method.  Added a
+ *                                   getMessageData method.
+ * Apr 21, 2009  2245    jsanchez    Returned temperature unit to kelvin.
+ * May 21, 2009  2338    jsanchez    Updated the getMessageData.
+ * Apr 04, 2013  1846    bkowal      Added an index on refTime and
+ *                                   forecastTime
+ * Apr 12, 2013  1857    bgonzale    Added SequenceGenerator annotation.
+ * May 07, 2013  1869    bsteffen    Remove dataURI column from
+ *                                   PluginDataObject.
+ * Aug 30, 2013  2298     rjpeter    Make getPluginName abstract
+ * Jun 11, 2014  2061     bsteffen   Remove IDecoderGettable
  * 
  * 
* @@ -95,41 +85,10 @@ import com.vividsolutions.jts.geom.Geometry; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ACARSRecord extends PluginDataObject implements ISpatialEnabled, - IDecoderGettable, Comparable { + Comparable { private static final long serialVersionUID = 1L; - private static final String TEXT_FMT = "%1$s %2$td/%2$tH%2$tM"; - - public static final Unit FLIGHT_LEVEL_UNIT = SI.METER; - - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit PRESSURE_UNIT = SI.PASCAL; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("DpT", SFC_DWPT); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - - PARM_MAP.put("altitude", UA_FLTLVL); - PARM_MAP.put("turbc", "turbc"); - } - - public static final String TAIL_NUM = "tailNumber"; - - public static final String FLIGHT_NUM = "tailNumber"; - // Time of the observation. @Column @DynamicSerializeElement @@ -654,74 +613,6 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled, this.usedInSounding = usedInSounding; } - /** - * - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - - @Override - public String getString(String paramName) { - String retValue = null; - if (TAIL_NUM.equals(paramName)) { - retValue = getTailNumber(); - } else if (FLIGHT_NUM.equals(paramName)) { - retValue = getFlightNumber(); - } else if ("TEXT".equals(paramName)) { - retValue = String.format(TEXT_FMT, getTailNumber(), getTimeObs()); - } - return retValue; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = PARM_MAP.get(paramName); - - if (SFC_TEMP.equals(pName) && (temp != null)) { - a = new Amount(temp, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { - a = new Amount(windDirection, WIND_DIR_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(getLongitude(), LOCATION_UNIT); - } else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) { - a = new Amount(getFlightLevel().intValue(), FLIGHT_LEVEL_UNIT); - } else if (SFC_DWPT.equals(pName) && (getDwpt() != null)) { - a = new Amount(getDwpt(), TEMPERATURE_UNIT); - } - - return a; - } - - @Override - public Collection getValues(String paramName) { - return null; - } - - public static final Double calcHumidity(Double temp, Double dwpt) { - Double humidity = null; - if ((temp != null) && (dwpt != null)) { - } - return humidity; - } - - @Override - public String getMessageData() { - return String.format(TEXT_FMT, getTailNumber(), getTimeObs()); - } - /* * (non-Javadoc) * @@ -777,14 +668,9 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled, */ @Override public int compareTo(ACARSRecord other) { - - final int BEFORE = -1; - final int EQUAL = 0; - final int AFTER = 1; - - int result = EQUAL; + int result = 0; if (this == other) { - result = EQUAL; + result = 0; } else { if (getTailNumber().equals(getTailNumber())) { result = timeObs.compareTo(other.timeObs); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java index b91ba86f7e..8744ed7375 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java @@ -20,21 +20,10 @@ package com.raytheon.uf.common.dataplugin.bufrua; import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.Comparator; -import java.util.HashMap; import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.measure.quantity.Angle; -import javax.measure.quantity.Length; -import javax.measure.quantity.Temperature; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -52,7 +41,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.IPersistable; @@ -63,7 +51,6 @@ import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; -import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; import com.vividsolutions.jts.geom.Geometry; /** @@ -77,24 +64,25 @@ import com.vividsolutions.jts.geom.Geometry; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Nov 27, 2007 382 jkorman Initial Coding. - * Jan 04, 2008 712 jkorman Lat/Lon were set incorrectly. - * Jan 07, 2008 720 jkorman remove default assignments from - * attributes. - * Jan 08, 2008 382 jkorman Added IVerticalSoundingCreator impl. - * Jan 14, 2008 763 jkorman Added "below" ground level - * exclusion to getValue. - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Jun 20, 2013 2128 bsteffen Ensure setDataURI sets the dataURI. - * Jul 19, 2013 1992 bsteffen Remove redundant time columns from - * bufrua. - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Nov 27, 2007 382 jkorman Initial Coding. + * Jan 04, 2008 712 jkorman Lat/Lon were set incorrectly. + * Jan 07, 2008 720 jkorman remove default assignments from + * attributes. + * Jan 08, 2008 382 jkorman Added IVerticalSoundingCreator impl. + * Jan 14, 2008 763 jkorman Added "below" ground level + * exclusion to getValue. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Jun 20, 2013 2128 bsteffen Ensure setDataURI sets the dataURI. + * Jul 19, 2013 1992 bsteffen Remove redundant time columns from + * bufrua. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable * * * @@ -114,7 +102,7 @@ import com.vividsolutions.jts.geom.Geometry; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class UAObs extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + ISpatialEnabled, IPointData, IPersistable { private static final long serialVersionUID = 1L; @@ -139,41 +127,6 @@ public class UAObs extends PersistablePluginDataObject implements public static final String PLUGIN_NAME = "bufrua"; - public static final Unit DISTANCE_UNIT = SI.METER; - - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("GH", UA_GEOHGT); - PARM_MAP.put("Px", UA_PRESSURE); - - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("DpT", SFC_DWPT); - - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - } - - public static final String UA_PARAM_PTRN = ".*:PRESS=\\d{2,4}"; - - // Non persisted value. Hold the last requested parameter name. - @Transient - private String parameterName = null; - - // Non persisted value. Hold the last requested level value. - @Transient - private Integer levelId; - // The observation report type. @DataURI(position = 1) @Column @@ -532,28 +485,6 @@ public class UAObs extends PersistablePluginDataObject implements this.stationName = stationName; } - /** - * Set the data uri for this observation. - * - * @param A - * data uri. - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } - - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - /** * */ @@ -570,203 +501,6 @@ public class UAObs extends PersistablePluginDataObject implements this.pointDataView = pointDataView; } - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - if ("STA".matches(paramName)) { - return this.getStationId(); - } - return null; - } - - /** - * Get the value and units of a named parameter within this observation. The - * parameter name may include level information for these observation data. - * The format for parameter is: - * - *
-     *    "parameterName" may be one of 
-     *        "GH"  geopotential height
-     *        "Px"  pressure
-     *        "T"   temperature
-     *        "DpT" dewpoint
-     *        "WS"  wind speed
-     *        "WD"  wind direction
-     *    followed by a level specification ":PRESS=xxxx" where xxxx is a level
-     *    in hPa (millibars). To retrieve the temperature from the 850hPa level
-     *    use the following getValue("T:PRESS=850");
-     *    
-     *    Some data is specific to the observation, latitude/longitude for
-     *    example. These data may be retrieved using the parameter minus any level
-     *    information as follows
-     *    "NLAT"  station latitude
-     *    "NLON"  station longitude
-     * 
- * - * If the sounding data defines a surface level, and a request for a level - * below surface is requested, a null value is returned. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; - - if (parseParameter(paramName)) { - String pName = PARM_MAP.get(parameterName); - if ((pName != null) && (levels != null) && (levels.size() > 0)) { - - UAObsLevel obsLevel = getLevel(levelId); - if (obsLevel != null) { - Integer iValue = null; - Double dValue = null; - if (UA_GEOHGT.equals(pName)) { - iValue = obsLevel.getGeoHeight(); - if (iValue != null) { - a = new Amount(iValue, DISTANCE_UNIT); - } - } else if (SFC_TEMP.equals(pName)) { - dValue = obsLevel.getTemp(); - if (dValue != null) { - a = new Amount(dValue, TEMPERATURE_UNIT); - } - } else if (SFC_DWPT.equals(pName)) { - dValue = obsLevel.getDwpt(); - if (dValue != null) { - a = new Amount(dValue, TEMPERATURE_UNIT); - } - } else if (SFC_WNDSPD.equals(pName)) { - dValue = obsLevel.getWindSpeed(); - if (dValue != null) { - a = new Amount(dValue, WIND_SPEED_UNIT); - } - } else if (SFC_WNDDIR.equals(pName)) { - iValue = obsLevel.getWindDirection(); - if (iValue != null) { - a = new Amount(iValue, WIND_DIR_UNIT); - } - } - } - } - } else { - // Assume we are trying to get an observation attribute. - String pName = PARM_MAP.get(paramName); - if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } - } - return a; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } - - /** - * Determine if the parameter is a level request, and parse out the pressure - * level and parameter name if so. - * - * @param parameter - * The parameter string to parse. - * @return This is a level parameter. - */ - private boolean parseParameter(String parameter) { - boolean goodParse = false; - Pattern p = Pattern.compile(UA_PARAM_PTRN); - Matcher m = p.matcher(parameter); - if (m.find()) { - int start = parameter.indexOf(":PRESS="); - if (start > 0) { - parameterName = parameter.substring(0, start); - start += ":PRESS=".length(); - levelId = Integer.parseInt(parameter.substring(start)); - } - goodParse = true; - } - return goodParse; - } - - /** - * Get a specified pressure level data if it exists. If the specified level - * is below the declared surface pressure a null reference is returned. - * - * @param level - * A pressure level to get. - * @return The requested level, if found, null reference if not. - */ - private UAObsLevel getLevel(Integer level) { - UAObsLevel retValue = null; - if (level != null) { - level = level * 100; - for (UAObsLevel l : levels) { - if (IDecoderConstants.MANPRE_LEVEL.equals(l.getVertSig()) - || IDecoderConstants.SIGPRE_LEVEL - .equals(l.getVertSig())) { - - if (level.equals(l.getPressure())) { - retValue = l; - break; - } - } - } - } - if (retValue != null) { - UAObsLevel sfc = getSurfaceLevel(); - if (sfc != null) { - if (LayerTools.isLowerThan(sfc, retValue)) { - retValue = null; - } - } - } - return retValue; - } - - /** - * Get the defined surface level. If a surface level cannot be found, then - * return null. - * - * @return The surface level found, or null. - */ - private UAObsLevel getSurfaceLevel() { - UAObsLevel retValue = null; - if (levels != null) { - for (UAObsLevel level : levels) { - if (IDecoderConstants.SFC_LEVEL.equals(level.getVertSig())) { - retValue = level; - break; - } - } - } - return retValue; - } - - @Override - public String[] getStrings(String paramName) { - // TODO Auto-generated method stub - return null; - } - @Override public SurfaceObsLocation getSpatialObject() { return location; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java index 1afaa5a5f0..6d289cb207 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java @@ -40,7 +40,6 @@ import javax.persistence.UniqueConstraint; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.IHDFFilePathProvider; @@ -71,26 +70,27 @@ import com.raytheon.uf.common.time.util.ImmutableDate; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Jun 03, 2009 2521 D. Hladky Initial release - * Jan 27, 2013 1478 D. Hladky OUN memory help - * Feb 28, 2013 1729 dhladky Supressed un-necessary debug loggers - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Apr 08, 2013 1293 bkowal Removed references to hdffileid. - * April, 9 2013 1890 dhladky Moved dates to referenced map in record - * rather than multiple dates in - * FFMPBasin objs. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp - * Apr 18, 2013 1919 dhladky Added method for VGB loading - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract - * Oct 14, 2013 2361 njensen Removed XML annotations - * May 01, 2014 3026 mpduff Added metadata column. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Jun 03, 2009 2521 D. Hladky Initial release + * Jan 27, 2013 1478 D. Hladky OUN memory help + * Feb 28, 2013 1729 dhladky Supressed un-necessary debug loggers + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * Apr,09, 2013 1890 dhladky Moved dates to referenced map in record + * rather than multiple dates in FFMPBasin + * objs. + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp + * Apr 18, 2013 1919 dhladky Added method for VGB loading + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Oct 14, 2013 2361 njensen Removed XML annotations + * May 01, 2014 3026 mpduff Added metadata column. + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable * * * @@ -338,17 +338,6 @@ public class FFMPRecord extends PersistablePluginDataObject implements return sourceName; } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. Null for this - * class. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - /** * finds the correct basin bin by hucName to place into * diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java index 1726596ce6..2a32e82fb9 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java @@ -1,18 +1,26 @@ +/** + * 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.common.dataplugin.fssobs; import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; -import javax.measure.quantity.Angle; -import javax.measure.quantity.DataAmount; -import javax.measure.quantity.Length; -import javax.measure.quantity.Pressure; -import javax.measure.quantity.Temperature; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -29,7 +37,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.IPersistable; @@ -42,6 +49,20 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; +/** + * + * {@link PluginDataObject} implementation for FSSObs. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Jun 11, 2014  2061     bsteffen    Remove IDecoderGettable
+ * 
+ * 
+ */ @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "fssobsseq") @Table(name = FSSObsRecord.PLUGIN_NAME, uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -55,59 +76,17 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class FSSObsRecord extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPersistable, IPointData { + ISpatialEnabled, IPersistable, IPointData { private static final long serialVersionUID = 1L; public static final String PLUGIN_NAME = "fssobs"; - private static final int MISSING = -9999; - - // UNITS - - public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; - - public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; - - public static final Unit HEIGHT_UNIT = SI.METER; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit PRESSURE_UNIT = SI.HECTO(SI.PASCAL); - - public static final Unit PRECIP_UNIT = NonSI.INCH; - - public static final Unit WAVE_UNIT = SI.METER; - - public static final Unit VISIBILITY_UNIT = NonSI.MILE; - - public static final Unit CLOUD_COVER = NonSI.OCTET; - - /** Metar specific parameter keys */ - public static final class ParameterKey { - public static final String SFC_ALTIMETER = "SFC.PRESS.ALTIMETER"; - - public static final String PRESSURE_CHANGE = "PCHNG"; - - public static final String VISIBILITY = "VIS"; - - public static final String PRECIPITATION_1HR = "PR1HR"; - } - - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("rawMessage", "rawMessage"); - } - /** is feature new **/ @Transient @DynamicSerializeElement @XmlElement - public boolean isNew = true; + protected boolean isNew = true; // Current CWA (WFO) @Column @@ -180,13 +159,13 @@ public class FSSObsRecord extends PersistablePluginDataObject implements @Transient @DynamicSerializeElement @XmlElement - private float windSpeed = -9999;; + private float windSpeed = -9999; // Wind gust in knots @Transient @DynamicSerializeElement @XmlElement - private float windGust = -9999;; + private float windGust = -9999; // Observed maximum wind speed in knots @Transient @@ -397,58 +376,6 @@ public class FSSObsRecord extends PersistablePluginDataObject implements super(uri); } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = PARM_MAP.get(paramName); - - if (SFC_TEMP.equals(pName) && (temperature != -9999f)) { - a = new Amount(temperature, TEMPERATURE_UNIT); - } else if (SFC_DWPT.equals(pName) && (dewpoint != -9999f)) { - a = new Amount(dewpoint, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName) && (windSpeed != -9999f)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName) && (windDir != -9999f)) { - a = new Amount(windDir, WIND_DIR_UNIT); - } else if (SFC_WNDGST.equals(pName) && (windGust != -9999f)) { - a = new Amount(windGust, WIND_SPEED_UNIT); - } else if (PRES_SLP.equals(pName) && (seaLevelPress != -9999f)) { - a = new Amount(seaLevelPress, PRESSURE_UNIT); - // } else if (PRES_ALTSG.equals(pName) && (pressureAltimeter != - // -9999f)) { - // a = new Amount(pressureAltimeter, PRESSURE_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if ("WT".equals(pName) && (this.seaSurfaceTemp != -9999f)) { - a = new Amount(this.seaSurfaceTemp, TEMPERATURE_UNIT); - } else if ("WH".equals(pName)) { - a = new Amount(waveHeight, WAVE_UNIT); - } else if ("SWP".equals(pName)) { - a = new Amount(primarySwellWavePeriod, WAVE_UNIT); - } else if ("SWH".equals(pName)) { - a = new Amount(primarySwellWaveHeight, WAVE_UNIT); - // } else if ("PCHNG".equals(pName) && pressChange3Hour != MISSING) - // { - // a = new Amount(pressChange3Hour, PRESSURE_UNIT); - } else if ("PKWND".equals(paramName) && (maxWindSpeed != MISSING)) { - a = new Amount(maxWindSpeed, WIND_SPEED_UNIT); - } else if ("SWS".equals(paramName) || "SWGS".equals(paramName)) { - a = new Amount(1, WIND_SPEED_UNIT); - } else if ("SWD".equals(paramName) && (primarySwellWaveDir != MISSING)) { - a = new Amount(primarySwellWaveDir, WIND_DIR_UNIT); - } - - return a; - } - /** * @return the isNew */ @@ -1172,21 +1099,6 @@ public class FSSObsRecord extends PersistablePluginDataObject implements return totCloudAmount; } - @Override - public Collection getValues(String paramName) { - return null; - } - - @Override - public String getString(String paramName) { - return null; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - @Override public ISpatialObject getSpatialObject() { return location; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.sounding/src/com/raytheon/uf/common/dataplugin/npp/sounding/NPPSoundingRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.sounding/src/com/raytheon/uf/common/dataplugin/npp/sounding/NPPSoundingRecord.java index 1d10a44087..5e846688f9 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.sounding/src/com/raytheon/uf/common/dataplugin/npp/sounding/NPPSoundingRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.sounding/src/com/raytheon/uf/common/dataplugin/npp/sounding/NPPSoundingRecord.java @@ -29,7 +29,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject; @@ -45,12 +44,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Jan 3, 2013 mschenke Initial creation - * Apr 12, 2013 1857 bgonzale Changed to MappedSuperclass. - * Mar 02, 2013 1970 bgonzale Added SequenceGenerator and Inheritance Strategy - * annotations. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Jan 03, 2013 mschenke Initial creation + * Apr 12, 2013 1857 bgonzale Changed to MappedSuperclass. + * Mar 02, 2013 1970 bgonzale Added SequenceGenerator and Inheritance Strategy + * annotations. + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable * * * @@ -86,11 +86,6 @@ public abstract class NPPSoundingRecord extends PersistablePluginDataObject @DynamicSerializeElement private Double longitude; - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - /** * @return the latitude */ diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java index 15caba37ac..7c8e74f20b 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java @@ -22,22 +22,12 @@ package com.raytheon.uf.common.dataplugin.obs.metar; import java.util.ArrayList; import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; -import javax.measure.quantity.Angle; -import javax.measure.quantity.Length; -import javax.measure.quantity.Pressure; -import javax.measure.quantity.Temperature; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -54,7 +44,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover; @@ -75,29 +64,30 @@ import com.raytheon.uf.common.time.util.TimeUtil; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- --------------------------------------- - * Feb 14, 2007 139 bphillip Initial creation - * Nov 15, 2007 njensen Added static units info. - * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. - * Dec 04, 2007 472 jkorman getValue was using wrong select value. - * Dec 07, 2007 452 bphillip Added station lat/lon - * Dec 17, 2007 472 jkorman Changed to use ALTIMETER_UNIT. - * Dec 21, 2007 666 jkorman Modified to default all numerics to - * -9999. - * Apr 23, 2009 2338 jsanchez Implemented precip plots, cloud/vis. - * Added @DynamicSerializeElement to - * location. - * May 28, 2009 2225 jsanchez Implemented tempFromTenths and - * dewPointFromTenths. - * Jun 29, 2009 2538 jsanchez Made the sort public. - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract - * Feb 11, 2014 2784 rferrel Remove override of setIdentifier. + * Date Ticket# Engineer Description + * ------------- -------- ----------- --------------------------------------- + * Feb 14, 2007 139 bphillip Initial creation + * Nov 15, 2007 njensen Added static units info. + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Dec 04, 2007 472 jkorman getValue was using wrong select value. + * Dec 07, 2007 452 bphillip Added station lat/lon + * Dec 17, 2007 472 jkorman Changed to use ALTIMETER_UNIT. + * Dec 21, 2007 666 jkorman Modified to default all numerics to -9999 + * Apr 23, 2009 2338 jsanchez Implemented precip plots, cloud/vis. + * Added @DynamicSerializeElement to + * location. + * May 28, 2009 2225 jsanchez Implemented tempFromTenths and + * dewPointFromTenths. + * Jun 29, 2009 2538 jsanchez Made the sort public. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Feb 11, 2014 2784 rferrel Remove override of setIdentifier. + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable + * * * * @author bphillip @@ -116,147 +106,13 @@ import com.raytheon.uf.common.time.util.TimeUtil; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class MetarRecord extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData { + ISpatialEnabled, IPointData { public static final String PLUGIN_NAME = "obs"; - public static final String STATION_ID = "stationId"; - - public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; - - public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; - - public static final Unit HEIGHT_UNIT = SI.METER; - - public static final Unit VISIBILITY_UNIT = SI.KILO(NonSI.MILE); - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit PRESSURE_UNIT = SI.HECTO(SI.PASCAL); - - public static final Unit ALTIMETER_UNIT = SI.PASCAL; - - public static final Unit PRECIP_UNIT = NonSI.INCH; - - /** Metar specific parameter keys */ - public static final class ParameterKey { - public static final String SFC_ALTIMETER = "SFC.PRESS.ALTIMETER"; - - public static final String PRESSURE_CHANGE = "PCHNG"; - - public static final String VISIBILITY = "VIS"; - - public static final String PRECIPITATION_1HR = "PR1HR"; - - public static final String PRECIPITATION_3HR = "PR3HR"; - - public static final String PRECIPITATION_6HR = "PR6HR"; - - public static final String PRECIPITATION_24HR = "PR24HR"; - } - - /** Parameter keys used in the legacy system */ - public static final class LegacyParameterKey { - - public static final String TEMPERATURE = "T"; - - public static final String DEW_POINT = "DpT"; - - public static final String WIND_SPEED = "wSp"; - - public static final String WIND_DIRECTION = "WD"; - - public static final String WIND_GUST = "Gust"; - - public static final String ALTIMETER = "Alti"; - - public static final String SEA_LEVEL_PRESSURE = "msl-P"; - - public static final String PRESSURE_CHANGE_3HR = "PT3"; - - public static final String VISABILITY = "Vis"; - - public static final String PRECIPITATION_1HR = "TP"; - - public static final String PRECIPITATION_3HR = "TP3hr"; - - public static final String PRECIPITATION_6HR = "TP6hr"; - - public static final String PRECIPITATION_24HR = "TP24hr"; - - // public static final String SNOW_DEPTH = "snow"; - // - // public static final String SNOW_WATER = "weqs"; - // - // public static final String SNOWFALL6_HOUR = "TP24hr"; - // - // public static final String SUNSHINE = "msun"; - // - // public static final String TEMP_MAX_6HOUR = "t6xc"; - // - // public static final String TEMP_MIN_6HOUR = "t6nc"; - - private String value; - - /** - * - * @param value - * the value of this legacy parameter key - */ - public void setValue(String value) { - this.value = value; - } - - /** - * - * @return the value of this legacy parameter key - */ - public String getValue() { - return value; - } - - } - /** Serializable id * */ private static final long serialVersionUID = 1L; - /** - * Maps common AWIPS I keys to IDecoderGettable and newer parameter key - * constants - */ - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put(LegacyParameterKey.TEMPERATURE, SFC_TEMP); - PARM_MAP.put(LegacyParameterKey.DEW_POINT, SFC_DWPT); - PARM_MAP.put(LegacyParameterKey.WIND_SPEED, SFC_WNDSPD); - PARM_MAP.put(LegacyParameterKey.WIND_DIRECTION, SFC_WNDDIR); - PARM_MAP.put(LegacyParameterKey.WIND_GUST, SFC_WNDGST); - PARM_MAP.put(LegacyParameterKey.ALTIMETER, ParameterKey.SFC_ALTIMETER); - PARM_MAP.put(LegacyParameterKey.SEA_LEVEL_PRESSURE, PRES_SLP); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put(LegacyParameterKey.PRESSURE_CHANGE_3HR, - ParameterKey.PRESSURE_CHANGE); - // PARM_MAP.put("T24", "T24"); // not used - // PARM_MAP.put("DpT24", "DpT24"); // not used - // PARM_MAP.put("WS24", "WS24"); // not used - // PARM_MAP.put("WD24", "WD24"); // not used - // PARM_MAP.put("WGS24", "WGS24"); // not used - // PARM_MAP.put("ASET24", "ASET24"); // not used - // PARM_MAP.put("HIWC", "HIWC"); // not used - PARM_MAP.put(LegacyParameterKey.VISABILITY, ParameterKey.VISIBILITY); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_1HR, - ParameterKey.PRECIPITATION_1HR); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_3HR, - ParameterKey.PRECIPITATION_3HR); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_6HR, - ParameterKey.PRECIPITATION_6HR); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_24HR, - ParameterKey.PRECIPITATION_24HR); - } - @Transient private String sampleType = null; @@ -1152,140 +1008,6 @@ public class MetarRecord extends PersistablePluginDataObject implements this.nominalTime = nominalTime; } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - if ("STA".matches(paramName)) { - return getStationId(); - } - if ("WX".matches(paramName)) { - return this.weatherKey; - } - - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.IDecoderGettable#getValue(java.lang - * .String) - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = paramName; - if (PARM_MAP.containsKey(paramName)) { - // we have recieved an AWIPS I parameter name - pName = PARM_MAP.get(paramName); - } - - if (SFC_TEMP.equals(pName)) { - if (tempFromTenths != -9999) { - a = new Amount(tempFromTenths, TEMPERATURE_UNIT); - } else if (temperature != -9999) { - a = new Amount(temperature, TEMPERATURE_UNIT); - } - } else if (SFC_DWPT.equals(pName)) { - if (dewPointFromTenths != -9999) { - a = new Amount(dewPointFromTenths, TEMPERATURE_UNIT); - } else if (dewPoint != -9999) { - a = new Amount(dewPoint, TEMPERATURE_UNIT); - } - } else if (SFC_WNDSPD.equals(pName)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDGST.equals(pName)) { - a = new Amount(windGust, WIND_SPEED_UNIT); - } else if (ParameterKey.PRESSURE_CHANGE.equals(pName) - && (pressChange3Hour != -9999)) { - a = new Amount(pressChange3Hour, PRESSURE_UNIT); - } else if (SFC_WNDDIR.equals(pName)) { - String windDir = getWindDir(); - if ((windDir != null) && !windDir.equalsIgnoreCase("VRB")) { - Double result = Double.parseDouble(windDir); - a = new Amount(result, WIND_DIR_UNIT); - } - } else if (PRES_ALTSG.equals(pName)) { - a = new Amount(altimeterInPa, ALTIMETER_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(getLongitude(), LOCATION_UNIT); - } else if (PRES_SLP.equals(pName)) { - a = new Amount(this.seaLevelPress, PRESSURE_UNIT); - } else if (pName.startsWith("HGT")) { - int start = "HGT".length(); - int index = Integer.parseInt(pName.substring(start)); - if ((index < skyCoverage.size()) - && (getSkyCover(index).getHeight() != null)) { - a = new Amount(getSkyCover(index).getHeight(), HEIGHT_UNIT); - } - } else if (pName.startsWith("HMSL")) { - int start = "HMSL".length(); - int index = Integer.parseInt(pName.substring(start)); - if ((index < skyCoverage.size()) - && (getSkyCover(index).getHeight() != null) - && (getSpatialObject() != null) - && (getSpatialObject().getElevation() != null)) { - a = new Amount(getSkyCover(index).getHeight() - + getSpatialObject().getElevation(), HEIGHT_UNIT); - } - } else if (ParameterKey.PRECIPITATION_1HR.equals(pName) - || ParameterKey.PRECIPITATION_24HR.equals(pName)) { - sampleType = "PR"; - if (precip1Hour != -9999) { - a = new Amount(precip1Hour, PRECIP_UNIT); - } - } else if (ParameterKey.PRECIPITATION_3HR.equals(pName)) { - sampleType = "PR"; - if (precip3Hour != -9999) { - a = new Amount(precip3Hour, PRECIP_UNIT); - } - } else if (ParameterKey.PRECIPITATION_6HR.equals(pName)) { - sampleType = "PR"; - if (precip6Hour != -9999) { - a = new Amount(precip6Hour, PRECIP_UNIT); - } - } else if (ParameterKey.VISIBILITY.equals(pName)) { - a = new Amount(visibility, VISIBILITY_UNIT); - } - - return a; - } - - /** - * Get the value and units of a named parameter within this observation that - * has a multiplicity greater than 1. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } - /** * Get the geometry latitude. * @@ -1313,38 +1035,6 @@ public class MetarRecord extends PersistablePluginDataObject implements return location.getElevation(); } - @Override - public String[] getStrings(String paramName) { - if ("SCV".matches(paramName)) { - ArrayList skyCoverage = new ArrayList(); - for (SkyCover sky : this.skyCoverage) { - skyCoverage.add(sky.getType()); - } - if (skyCoverage.size() > 0) { - return skyCoverage.toArray(new String[skyCoverage.size()]); - } - } else if ("WX".matches(paramName)) { - if (this.weatherKey != null) { - String[] presentWeather = { this.weatherKey }; - return presentWeather; - } - } else if (paramName.startsWith("CLD")) { - int start = "CLD".length(); - int index = Integer.parseInt(paramName.substring(start)); - String[] retVal = { "BLNK" }; - if (index < skyCoverage.size()) { - if (getSkyCover(index).getType() != null) { - retVal[0] = getSkyCover(index).getType(); - } - } - return retVal; - } else if (paramName.matches("CCHAR") && (pressChangeChar != null)) { - String[] changeChar = { pressChangeChar }; - return changeChar; - } - return null; - } - @Override public int hashCode() { final int PRIME = 31; @@ -1648,16 +1338,6 @@ public class MetarRecord extends PersistablePluginDataObject implements return report; } - private SkyCover getSkyCover(int index) { - if (!isSkyCoverageSorted) { - isSkyCoverageSorted = true; - sort(skyCoverage); - } - SkyCover[] sc = skyCoverage.toArray(new SkyCover[skyCoverage.size()]); - return sc[index]; - - } - public void sort(Set skySet) { SortedSet skSet = new TreeSet(); for (SkyCover sc : skySet) { @@ -1689,10 +1369,6 @@ public class MetarRecord extends PersistablePluginDataObject implements this.pointDataView = pointDataView; } - public static Set getAvailableParameters() { - return PARM_MAP.keySet(); - } - @Override @Column @Access(AccessType.PROPERTY) @@ -1702,6 +1378,6 @@ public class MetarRecord extends PersistablePluginDataObject implements @Override public String getPluginName() { - return "obs"; + return PLUGIN_NAME; } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java index 567472ce37..a185683bdc 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java @@ -52,7 +52,6 @@ import org.geotools.referencing.GeodeticCalculator; import org.hibernate.annotations.Index; import org.opengis.referencing.crs.ProjectedCRS; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.IHDFFilePathProvider; @@ -116,25 +115,27 @@ import com.vividsolutions.jts.geom.Coordinate; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Feb 14, 2007 139 Phillippe Initial creation - * Sep 14, 2007 379 jkorman Added populateDataStore() and - * getPersistenceTime() from new - * IPersistable - * Oct 09, 2007 465 randerso Updated to better represent level 3 data - * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. - * Mar 04, 2013 DCS51 zwang Handle MIGFA product - * Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar - * HDF5. - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Apr 08, 2013 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract - * Dec 18, 2013 16002 kshrestha Added logic to match all dBZ values in the DHR with AWIPS1 + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Feb 14, 2007 139 Phillippe Initial creation + * Sep 14, 2007 379 jkorman Added populateDataStore() and + * getPersistenceTime() from new + * IPersistable + * Oct 09, 2007 465 randerso Updated to better represent level 3 data + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Mar 04, 2013 DCS51 zwang Handle MIGFA product + * Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar HDF5 + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Dec 18, 2013 16002 kshrestha Added logic to match all dBZ values in + * the DHR with AWIPS1 + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable + * * * * @@ -965,17 +966,6 @@ public class RadarRecord extends PersistablePluginDataObject implements this.elevation = elevation; } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. Null for this - * class. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - public RadarStation getLocation() { return location; } @@ -1192,19 +1182,12 @@ public class RadarRecord extends PersistablePluginDataObject implements private void addPacketData(double i, double j, int type, T currData, boolean needToConvert) { - addPacketData(i, j, "", type, RadarProductType.GENERAL, currData, + addPacketData(i, j, type, RadarProductType.GENERAL, currData, needToConvert); } private void addPacketData(double i, double j, int type, RadarProductType productType, T currData, boolean needToConvert) { - addPacketData(i, j, "", type, productType, currData, needToConvert); - } - - private void addPacketData(double i, double j, String stormID, - int type, RadarProductType productType, T currData, - boolean needToConvert) { - // Convert x/y to lon/lat if (needToConvert) { Coordinate coor; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java index 24596b8a10..6820f642cf 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java @@ -38,7 +38,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.geotools.coverage.grid.GridGeometry2D; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject; @@ -56,24 +55,26 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Feb 14, 2007 139 bphillip Initial Creation - * Sep 14, 2007 379 jkorman Added populateDataStore() and - * getPersistenceTime() from new - * IPersistable - * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. - * Nov 06, 2008 1515 jkorman Changed units length from 16 to 26 - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Jul 30, 2012 798 jkorman Support for common satellite data. - * Mar 25, 2013 1823 dgilling Replace underscores with spaces in URI - * constructor. - * Apr 08, 2013 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Feb 14, 2007 139 bphillip Initial Creation + * Sep 14, 2007 379 jkorman Added populateDataStore() and + * getPersistenceTime() from new + * IPersistable + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Nov 06, 2008 1515 jkorman Changed units length from 16 to 26 + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Jul 30, 2012 798 jkorman Support for common satellite data. + * Mar 25, 2013 1823 dgilling Replace underscores with spaces in URI + * constructor. + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Jun 11, 2014 2061 bsteffen Remove IDecoderGettable + * * * * @author bphillip @@ -94,7 +95,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; public class SatelliteRecord extends PersistablePluginDataObject implements IGridGeometryProvider { - public static final String PLUGIN_ID = "satellite"; + public static final String PLUGIN_NAME = "satellite"; private static final long serialVersionUID = 1L; @@ -253,17 +254,6 @@ public class SatelliteRecord extends PersistablePluginDataObject implements this.units = units; } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. Null for this - * class. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - public String getSource() { return source; } @@ -354,6 +344,6 @@ public class SatelliteRecord extends PersistablePluginDataObject implements @Override public String getPluginName() { - return "satellite"; + return PLUGIN_NAME; } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java index 74cb688e0d..62dadcf419 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java @@ -21,19 +21,8 @@ package com.raytheon.uf.common.dataplugin.sfcobs; import java.util.ArrayList; import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; import java.util.List; -import javax.measure.quantity.Angle; -import javax.measure.quantity.DataAmount; -import javax.measure.quantity.Length; -import javax.measure.quantity.Pressure; -import javax.measure.quantity.Temperature; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -51,7 +40,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject; @@ -69,15 +57,16 @@ import com.vividsolutions.jts.geom.Geometry; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Oct 01, 2009            jkorman     Initial creation
- * Apr 04, 2013 1846       bkowal      Added an index on refTime and
- *                                     forecastTime
- * Apr 12, 2013 1857       bgonzale    Added SequenceGenerator annotation.
- * May 07, 2013 1869       bsteffen    Remove dataURI column from
- *                                     PluginDataObject.
- * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Oct 01, 2009           jkorman     Initial creation
+ * Apr 04, 2013  1846     bkowal      Added an index on refTime and
+ *                                    forecastTime
+ * Apr 12, 2013  1857     bgonzale    Added SequenceGenerator annotation.
+ * May 07, 2013  1869     bsteffen    Remove dataURI column from
+ *                                    PluginDataObject.
+ * Aug 30, 2013  2298     rjpeter     Make getPluginName abstract
+ * Jun 11, 2014  2061     bsteffen    Remove IDecoderGettable
  * 
  * 
* @@ -97,55 +86,10 @@ import com.vividsolutions.jts.geom.Geometry; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ObsCommon extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData { + ISpatialEnabled, IPointData { private static final long serialVersionUID = 1L; - private static final int MISSING = -9999; - - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit PRESSURE_UNIT = SI.PASCAL; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit WAVE_UNIT = SI.METER; - - public static final Unit VISIBILITY_UNIT = NonSI.MILE; - - public static final Unit CLOUD_COVER = NonSI.OCTET; - - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("DpT", SFC_DWPT); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("WGS", SFC_WNDGST); - PARM_MAP.put("Px", PRES_STATION); - PARM_MAP.put("PMSL", PRES_SLP); - PARM_MAP.put("ASET", PRES_ALTSG); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("WT", "WT"); - PARM_MAP.put("TCC", "TCC"); - PARM_MAP.put("WP", "WP"); - PARM_MAP.put("WH", "WH"); - PARM_MAP.put("SWP", "SWP"); - PARM_MAP.put("SWH", "SWH"); - PARM_MAP.put("SWS", "SWS"); - PARM_MAP.put("SWD", "SWD"); - PARM_MAP.put("SWGS", "SWGS"); - PARM_MAP.put("PCHNG", "PCHNG"); - PARM_MAP.put("PKWND", "PKWND"); - PARM_MAP.put("VIS", "VIS"); - PARM_MAP.put("COVpct", "COVpct"); - } - // @DataURI(position = 1) @Column @@ -1496,22 +1440,6 @@ public class ObsCommon extends PersistablePluginDataObject implements interWinds.add(wind); } - /** - * Set the data uri for this observation. - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } - - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - @Override public SurfaceObsLocation getSpatialObject() { return location; @@ -1579,84 +1507,6 @@ public class ObsCommon extends PersistablePluginDataObject implements return location.getLocationDefined(); } - @Override - public String getString(String paramName) { - return null; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = PARM_MAP.get(paramName); - - if (SFC_TEMP.equals(pName) && (temp != null)) { - a = new Amount(temp, TEMPERATURE_UNIT); - } else if (SFC_DWPT.equals(pName) && (dwpt != null)) { - a = new Amount(dwpt, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { - a = new Amount(windDirection, WIND_DIR_UNIT); - } else if (SFC_WNDGST.equals(pName) && (windGust != null)) { - a = new Amount(windGust, WIND_SPEED_UNIT); - } else if (PRES_STATION.equals(pName) && (pressureStation != null)) { - a = new Amount(pressureStation, PRESSURE_UNIT); - } else if (PRES_SLP.equals(pName) && (pressureSealevel != null)) { - a = new Amount(pressureSealevel, PRESSURE_UNIT); - } else if (PRES_ALTSG.equals(pName) && (pressureAltimeter != null)) { - a = new Amount(pressureAltimeter, PRESSURE_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if ("WT".equals(pName) && (this.seaTemp != null)) { - a = new Amount(this.seaTemp, TEMPERATURE_UNIT); - } else if ("TCC".equals(pName) && (this.totalCloudCover != null)) { - a = new Amount(this.totalCloudCover, CLOUD_COVER); - } else if ("COVpct".equals(pName) && (this.totalCloudCover != null)) { - a = new Amount(this.totalCloudCover * 10, CLOUD_COVER); - } else if ("WP".equals(pName)) { - a = new Amount(wavePeriod, WAVE_UNIT); - } else if ("WH".equals(pName)) { - a = new Amount(waveHeight, WAVE_UNIT); - } else if ("SWP".equals(pName)) { - a = new Amount(primarySwellWavePeriod, WAVE_UNIT); - } else if ("SWH".equals(pName)) { - a = new Amount(primarySwellWaveHeight, WAVE_UNIT); - } else if ("PCHNG".equals(pName) && (pressChange3Hr != MISSING)) { - a = new Amount(pressChange3Hr, PRESSURE_UNIT); - } else if ("VIS".equals(pName) && (this.horzVisibility != null)) { - a = new Amount(this.horzVisibility / 1000, VISIBILITY_UNIT); - } else if ("PKWND".equals(paramName) && (peakWindSpeed != MISSING)) { - a = new Amount(peakWindSpeed, WIND_SPEED_UNIT); - } else if ("SWS".equals(paramName) || "SWGS".equals(paramName)) { - a = new Amount(1, WIND_SPEED_UNIT); - } else if ("SWD".equals(paramName) && (primarySwellWaveDir != MISSING)) { - a = new Amount(primarySwellWaveDir, WIND_DIR_UNIT); - } - - return a; - } - - @Override - public Collection getValues(String paramName) { - return null; - } - @Override public PointDataView getPointDataView() { return pointDataView; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java index 71837ff86a..f002cbed70 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java @@ -35,7 +35,6 @@ import javax.persistence.Transient; import org.hibernate.annotations.Type; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -47,17 +46,18 @@ import com.vividsolutions.jts.geom.Geometry; * *
  * SOFTWARE HISTORY
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * Mar 12, 2007 1003        bwoodle     initial creation
- * Apr 12, 2013 1857        bgonzale    Added SequenceGenerator annotation.
- * May 02, 2013 1949        rjpeter     Moved ugcZones to be a column inside
- *                                      table.
- * Jul 16, 2013 2181        bsteffen    Convert geometry types to use hibernate-
- *                                      spatial
- * Aug 08, 2013 2243        jsanchez    Removed super method in copy
- *                                      constructor.
- * Aug 30, 2013 2298        rjpeter     Make getPluginName abstract
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 12, 2007  1003     bwoodle     initial creation
+ * Apr 12, 2013  1857     bgonzale    Added SequenceGenerator annotation.
+ * May 02, 2013  1949     rjpeter     Moved ugcZones to be a column inside
+ *                                    table.
+ * Jul 16, 2013  2181     bsteffen    Convert geometry types to use hibernate-
+ *                                    spatial
+ * Aug 08, 2013  2243     jsanchez    Removed super method in copy constructor.
+ * Aug 30, 2013  2298     rjpeter     Make getPluginName abstract
+ * Jun 11, 2014  2061     bsteffen    Remove IDecoderGettable
+ * 
  * 
* * @author bwoodle @@ -279,11 +279,6 @@ public abstract class AbstractWarningRecord extends PluginDataObject { super(uri); } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - public String createWarningProduct() { return "Not yet implemented."; } diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java index 10ad340aad..86e29e7f46 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java @@ -35,7 +35,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.geospatial.ISpatialEnabled; import com.raytheon.uf.common.geospatial.ISpatialObject; @@ -48,15 +47,16 @@ import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; /** - * TODO Add Description + * Filter {@link PluginDataObject}s based off configurable parameters. * *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jul 16, 2009            jkorman     Initial creation
- * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Jul 16, 2009           jkorman     Initial creation
+ * Aug 30, 2013  2298     rjpeter     Make getPluginName abstract
+ * Jun 11, 2014  2061     bsteffen    Remove IDecoderGettable
  * 
  * 
* @@ -102,8 +102,9 @@ public class PluginDataObjectFilter extends AbstractObsFilter { stream.read(data); stream.close(); - AbstractObsFilter filter = (AbstractObsFilter) SerializationUtil - .unmarshalFromXml(new String(data)); + AbstractObsFilter filter = SerializationUtil + .unmarshalFromXml(AbstractObsFilter.class, + new String(data)); setFilterElements(filter.getFilterElements()); setFilterName(filter.getFilterName()); @@ -231,11 +232,6 @@ public class PluginDataObjectFilter extends AbstractObsFilter { SurfaceObsLocation location; - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - @Override public ISpatialObject getSpatialObject() { return location; diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/RadiusFilterElement.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/RadiusFilterElement.java index fa093a3054..646913624e 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/RadiusFilterElement.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/RadiusFilterElement.java @@ -23,36 +23,35 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.geospatial.ISpatialEnabled; import com.raytheon.uf.common.geospatial.ISpatialObject; -import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.edex.decodertools.core.DecoderTools; import com.vividsolutions.jts.geom.Geometry; /** - * TODO Add Description + * Filter {@link PluginDataObject}s based off their distance from a specific + * point. * *
- *
+ * 
  * SOFTWARE HISTORY
- *
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 23, 2009            jkorman     Initial creation
- *
+ * 
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 23, 2009           jkorman     Initial creation
+ * Jun 11, 2014  2061     bsteffen    Remove IDecoderGettable
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class RadiusFilterElement extends AbstractFilterElement implements ISerializableObject { +public class RadiusFilterElement extends AbstractFilterElement { private static final String FMT = "RadiusFilterElement:%s[%8.4f,%9.4f,%5.1f]"; @@ -170,6 +169,7 @@ public class RadiusFilterElement extends AbstractFilterElement implements ISeria return pointLon; } + @Override public String toString() { return String.format(FMT,getFilterElementName(),pointLat,pointLon,radius); }