getValues(String paramName) {
+ // TODO Auto-generated method stub
+ return null;
+ }
- /**
- * @param location
- * the location to set
- */
- public void setLocation(SurfaceObsLocation location) {
- this.location = location;
- }
+ /**
+ * @param location
+ * the location to set
+ */
+ public void setLocation(SurfaceObsLocation location) {
+ this.location = location;
+ }
- /**
- * @return the location
- */
- public SurfaceObsLocation getLocation() {
- return location;
- }
+ /**
+ * @return the location
+ */
+ public SurfaceObsLocation getLocation() {
+ return location;
+ }
- /**
- * @param stationName
- * the stationName to set
- */
- public void setStationName(String stationName) {
- this.stationName = stationName;
- }
+ /**
+ * @param stationName
+ * the stationName to set
+ */
+ public void setStationName(String stationName) {
+ this.stationName = stationName;
+ }
- /**
- * @return the stationName
- */
- public String getStationName() {
- return stationName;
- }
+ /**
+ * @return the stationName
+ */
+ public String getStationName() {
+ return stationName;
+ }
- /**
- * @param parameterName
- * the parameterName to set
- */
- public void setParameterName(String parameterName) {
- this.parameterName = parameterName;
- }
+ /**
+ * @param parameterName
+ * the parameterName to set
+ */
+ public void setParameterName(String parameterName) {
+ this.parameterName = parameterName;
+ }
- /**
- * @return the parameterName
- */
- public String getParameterName() {
- return parameterName;
- }
+ /**
+ * @return the parameterName
+ */
+ public String getParameterName() {
+ return parameterName;
+ }
- /**
- * @param reportType
- * the reportType to set
- */
- public void setReportType(Integer reportType) {
- this.reportType = reportType;
- }
+ /**
+ * @param reportType
+ * the reportType to set
+ */
+ public void setReportType(Integer reportType) {
+ this.reportType = reportType;
+ }
- /**
- * @return the reportType
- */
- public Integer getReportType() {
- return reportType;
- }
+ /**
+ * @return the reportType
+ */
+ public Integer getReportType() {
+ return reportType;
+ }
@Override
@Column
@@ -397,4 +395,9 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
+
+ @Override
+ public String getPluginName() {
+ return "ldadprofiler";
+ }
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java
index 25a3ec5f55..e5298d6f6f 100644
--- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java
@@ -59,21 +59,24 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20080303 1026 jkorman Initial implementation.
- * 20080408 1039 jkorman Added traceId for tracing data.
- * 11/25/08 #1684 chammack Camel Refactor
- * 04/29/13 #1861 bkowal Create a separate Point Data Container for
- * every record so each forecast hour will
- * receive a unique hdf5 file.
- * 07/03/13 #2161 bkowal Store and retrieve the Point Data Containers
- * by forecast hour and reftime when completing
- * a decode operation. Overrode default
- * Point Data Container size.
- * 07/16/13 #2161 bkowal Store the records in a container that will
- * be persisted every X (configurable) seconds
- * by a timer. The timer is started during spring
- * initialization and destroyed during spring
- * container destruction.
+ * Mar 03, 2008 1026 jkorman Initial implementation.
+ * Apr 08, 2008 1039 jkorman Added traceId for tracing data.
+ * Nov 25, 2008 1684 chammack Camel Refactor
+ * Apr 29, 2013 1861 bkowal Create a separate Point Data Container
+ * for every record so each forecast hour
+ * will receive a unique hdf5 file.
+ * Jul 03, 2013 2161 bkowal Store and retrieve the Point Data
+ * Containers by forecast hour and reftime
+ * when completing a decode operation.
+ * Overrode default Point Data Container
+ * size.
+ * Jul 16, 2013 2161 bkowal Store the records in a container that
+ * will be persisted every X (configurable)
+ * seconds by a timer. The timer is started
+ * during spring initialization and
+ * destroyed during spring container
+ * destruction.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
@@ -219,7 +222,6 @@ public class ModelSoundingDecoder extends AbstractDecoder implements
soundingTemporalData);
if (soundingData != null) {
soundingData.setTraceId(traceId);
- soundingData.setPluginName(PLUGIN_NAME);
try {
soundingData.constructDataURI();
} catch (PluginException e) {
diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java
index b0e832e9ad..201c62ea29 100644
--- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java
+++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java
@@ -62,11 +62,13 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20080303 1026 jkorman Initial implementation.
- * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
- * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
+ * Mar 03, 2008 1026 jkorman Initial implementation.
+ * 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
*
*
*
@@ -911,10 +913,16 @@ public class SoundingSite extends PersistablePluginDataObject implements
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
+
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
+
+ @Override
+ public String getPluginName() {
+ return "modelsounding";
+ }
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF
index 7c388cd7e5..17b41129bd 100644
--- a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF
+++ b/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF
@@ -7,7 +7,6 @@ Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serializ
Bundle-Vendor: RAYTHEON
Export-Package: com.raytheon.edex.plugin.obs,
com.raytheon.edex.plugin.obs.mesowest,
- com.raytheon.edex.plugin.obs.mesowest.util,
com.raytheon.edex.plugin.obs.metar,
com.raytheon.edex.plugin.obs.metar.util,
com.raytheon.edex.uengine.tasks.obs
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject
deleted file mode 100644
index 9ec19727e4..0000000000
--- a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject
+++ /dev/null
@@ -1 +0,0 @@
-com.raytheon.edex.plugin.obs.mesowest.MesowestRecord
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml
index cd52a3a7e1..5bec4f52ae 100644
--- a/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml
+++ b/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml
@@ -3,9 +3,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-
-
+
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java
index d6b488f34c..f53857e922 100644
--- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java
@@ -20,30 +20,6 @@
package com.raytheon.edex.plugin.obs;
-/**
- * Decoder implementation for observation data types. This class provides a
- * wrapper in order to select the correct decoder based on the data type
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ----------- ---------- ----------- --------------------------
- * 4/27/07 199 bphillip Initial creation
- * 07/31/2007 411 jkorman Added addition logging
- * 08/10/2007 379 jkorman Added disposal behavior.
- * 20071217 453 jkorman Added code to check for duplicate obs.
- * 20080314 995 jkorman Changed setDecoderStrategy to check for
- * empty data.
- * 20080408 1039 jkorman Added traceId for tracing data.
- * Mar 19, 2013 1785 bgonzale Added performance status handler and added
- * status to decode.
- *
- *
- * @author bphillip
- * @version 1
- */
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -58,24 +34,40 @@ import com.raytheon.uf.common.time.util.ITimer;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.edex.wmo.message.WMOHeader;
+/**
+ * Decoder implementation for observation data types. This class provides a
+ * wrapper in order to select the correct decoder based on the data type
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ----------- ---------- ----------- --------------------------
+ * Apr 27, 2007 199 bphillip Initial creation
+ * Jul 31, 2007 411 jkorman Added addition logging
+ * Aug 10, 2007 379 jkorman Added disposal behavior.
+ * Dec 17, 2007 453 jkorman Added code to check for duplicate obs.
+ * Mar 14, 2008 995 jkorman Changed setDecoderStrategy to check for
+ * empty data.
+ * Apr 08, 2008 1039 jkorman Added traceId for tracing data.
+ * Mar 19, 2013 1785 bgonzale Added performance status handler and added
+ * status to decode.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
+ *
+ *
+ * @author bphillip
+ * @version 1
+ */
public class ObsDecoder extends AbstractDecoder {
/** The logger */
- private Log logger = LogFactory.getLog(getClass());
-
- private final String PLUGIN_NAME;
+ private final Log logger = LogFactory.getLog(getClass());
private final IPerformanceStatusHandler perfLog = PerformanceStatus
.getHandler("Obs:");
private String traceId = null;
- /**
- * Required empty constructor.
- */
- public ObsDecoder(String pluginName) {
- PLUGIN_NAME = pluginName;
- }
-
/**
*
* @return A decoded data record.
@@ -139,13 +131,13 @@ public class ObsDecoder extends AbstractDecoder {
if ('S' == header.getT1()) {
switch (header.getT2()) {
case 'A': {
- decoder = new MetarDecoder(PLUGIN_NAME);
- ((MetarDecoder) decoder).setTraceId(traceId);
+ decoder = new MetarDecoder();
+ decoder.setTraceId(traceId);
break;
}
case 'P': {
- decoder = new MetarDecoder(PLUGIN_NAME);
- ((MetarDecoder) decoder).setTraceId(traceId);
+ decoder = new MetarDecoder();
+ decoder.setTraceId(traceId);
break;
}
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestDecoder.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestDecoder.java
deleted file mode 100644
index 3bf446464c..0000000000
--- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestDecoder.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-
-package com.raytheon.edex.plugin.obs.mesowest;
-
-import java.text.DecimalFormat;
-
-import com.raytheon.edex.esb.Headers;
-import com.raytheon.edex.exception.DecoderException;
-import com.raytheon.edex.plugin.AbstractDecoder;
-import com.raytheon.edex.util.Util;
-import com.raytheon.uf.common.dataplugin.PluginDataObject;
-import com.raytheon.uf.common.time.DataTime;
-import com.raytheon.uf.edex.decodertools.core.DecoderTools;
-import com.raytheon.uf.edex.decodertools.time.TimeTools;
-
-/**
- * Decoder implementation for mesowest plugin
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * 02/14/06 139 bphillip Initial creation
- * 11/11/08 1684 chammack Refactored to camel interfaces
- *
- *
- *
- * @author bphillip
- * @version 1
- */
-
-public class MesowestDecoder extends AbstractDecoder {
-
- private static final DecimalFormat DECIMALTENTHS = new DecimalFormat("#.#");
-
- private static final DecimalFormat WHOLENUMBER = new DecimalFormat("#");
-
- /**
- * Constructor
- *
- * @throws DecoderException
- */
- public MesowestDecoder() throws DecoderException {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.raytheon.edex.plugin.IBinaryDecoder#decode(byte[])
- */
- public PluginDataObject[] decode(byte[] data, Headers headers)
- throws DecoderException {
-
- byte[] messageData = null;
-
- String theMessage = new String(messageData);
-
- MesowestRecord record = new MesowestRecord();
- record.setMessageData(theMessage);
- record.setPluginName("obs");
- record.setReportType("MESOWEST");
- record.setMessageData(theMessage);
-
- String[] mwObs = theMessage.split(",");
- try {
- if (mwObs.length >= 7) {
- record.setStationID(mwObs[1]);
- String timeGroup = mwObs[6].substring(6, 8)
- + mwObs[6].substring(9, 13) + "Z";
- String fileName = null;
- if (headers != null) {
- fileName = (String) headers
- .get(DecoderTools.INGEST_FILE_NAME);
- }
- record.setTimeObs(TimeTools
- .findCurrentTime(timeGroup, fileName));
- record.setDataTime(new DataTime(Util
- .findReferenceTime(timeGroup)));
- record.setRefHour(Util.findReferenceHour(timeGroup));
- }
- // Only want the observations in columns 7 through 15
- int mwArrayLength = mwObs.length < 17 ? mwObs.length : 17;
- for (int i = 7; i < mwArrayLength; i++) {
- if (i == 7 && mwObs[7].length() > 0) {
- double temp = calculateCelsius(mwObs[7]);
- record.setTemperature(Integer.parseInt(WHOLENUMBER
- .format(temp)));
- record.setTempFromTenths(Float.parseFloat(DECIMALTENTHS
- .format(temp)));
- } else if (i == 9 && mwObs[9].length() > 0) {
- double wSpeed = Double.valueOf(mwObs[9].trim())
- .doubleValue();
- record.setWindSpeed(Integer.parseInt(WHOLENUMBER
- .format(wSpeed)));
- } else if (i == 10 && mwObs[10].length() > 0) {
- double wGust = Double.valueOf(mwObs[10].trim())
- .doubleValue();
- record.setWindGust(Integer.parseInt(WHOLENUMBER
- .format(wGust)));
- } else if (i == 11 && mwObs[11].length() > 0) {
- record.setWindDir(mwObs[11]);
- } else if (i == 13 && mwObs[13].length() > 0) {
- double dewp = calculateCelsius(mwObs[13]);
- record.setDewPoint(Integer.parseInt(WHOLENUMBER
- .format(dewp)));
- record.setDewPointFromTenths(Float.parseFloat(DECIMALTENTHS
- .format(dewp)));
- } else if (i == 15 && mwObs[15].length() > 0) {
- record.setSeaLevelPress(Float.parseFloat(mwObs[15]));
- } else if (i == 16 && mwObs[16].length() > 0) {
- record.setAltimeter(Float.parseFloat(mwObs[16]));
- }
- }
-
- } catch (Exception e) {
- throw new DecoderException("Unable to decode Mesowest data", e);
- }
-
- if (record == null)
- return new PluginDataObject[0];
- return new PluginDataObject[] { record };
- }
-
- private double calculateCelsius(String tempString) {
- double temp = Double.valueOf(tempString.trim()).doubleValue();
- double tempC = (temp - 32.0) * (5.0 / 9.0);
- return tempC;
- }
-
-}
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestRecord.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestRecord.java
deleted file mode 100644
index 556dd016b9..0000000000
--- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestRecord.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/**
- * This software was developed and / or modified by Raytheon Company,
- * pursuant to Contract DG133W-05-CQ-1067 with the US Government.
- *
- * U.S. EXPORT CONTROLLED TECHNICAL DATA
- * This software product contains export-restricted data whose
- * export/transfer/disclosure is restricted by U.S. law. Dissemination
- * to non-U.S. persons whether in the United States or abroad requires
- * an export license or other authorization.
- *
- * Contractor Name: Raytheon Company
- * Contractor Address: 6825 Pine Street, Suite 340
- * Mail Stop B8
- * Omaha, NE 68106
- * 402.291.0100
- *
- * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- * further licensing information.
- **/
-
-package com.raytheon.edex.plugin.obs.mesowest;
-
-import java.util.Calendar;
-
-import javax.persistence.Access;
-import javax.persistence.AccessType;
-import javax.persistence.Column;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import com.raytheon.uf.common.dataplugin.IDecoderGettable;
-import com.raytheon.uf.common.dataplugin.PluginDataObject;
-import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
-import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
-
-/**
- * Record implementation for mesowest plugin
- *
- *
- *
- * SOFTWARE HISTORY
- *
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * 2/14/2007 139 Phillippe Initial creation
- * 20071129 472 jkorman Added IDecoderGettable interface.
- * May 07, 2013 1869 bsteffen Remove dataURI column from
- * PluginDataObject.
- *
- *
- *
- *
- * @author bphillip
- * @version 1
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.NONE)
-@DynamicSerialize
-public class MesowestRecord extends PluginDataObject {
-
- private static final long serialVersionUID = 1L;
-
- /** A string denoting the report type */
- @XmlAttribute
- @DynamicSerializeElement
- private String reportType;
-
- /** A string denoting the reporting station */
- @XmlAttribute
- @DynamicSerializeElement
- private String stationID;
-
- /** A string denoting the time of observation */
- @XmlElement
- @DynamicSerializeElement
- private Calendar timeObs;
-
- /** A string denoting the temperature in degrees Celsius */
- @XmlAttribute
- @DynamicSerializeElement
- private Integer temperature;
-
- /** A string denoting the current temperature in tenths of degrees Celsius */
- @XmlAttribute
- @DynamicSerializeElement
- private Float tempFromTenths;
-
- /** A string denoting the wind direction in degrees from north */
- @XmlAttribute
- @DynamicSerializeElement
- private String windDir;
-
- /** A string denoting the wind speed in knots */
- @XmlAttribute
- @DynamicSerializeElement
- private Integer windSpeed;
-
- /** A string denoting the wind gusts in knots */
- @XmlAttribute
- @DynamicSerializeElement
- private Integer windGust;
-
- /** A string denoting the current dew point in degrees Celsius */
- @XmlAttribute
- @DynamicSerializeElement
- private Integer dewPoint;
-
- /** A string denoting the current dew point in tenths of degrees Celsius */
- @XmlAttribute
- @DynamicSerializeElement
- private Float dewPointFromTenths;
-
- /** A string denoting the altimeter reading in in/Hg */
- @XmlAttribute
- @DynamicSerializeElement
- private Float altimeter;
-
- /** A string denoting the sea level pressure in millibars */
- @XmlAttribute
- @DynamicSerializeElement
- private Float seaLevelPress;
-
- /** The reference hour * */
- @XmlElement
- @DynamicSerializeElement
- private Calendar refHour;
-
- /**
- * No argument constructor
- *
- */
- public MesowestRecord() {
- }
-
- /**
- * Constructs a mesowest record from a dataURI
- *
- * @param uri
- * The dataURI
- * @param tableDef
- * The table definition associated with this class
- */
- public MesowestRecord(String uri) {
- super(uri);
- }
-
- /**
- * @return the reportType
- */
- public String getReportType() {
- return reportType;
- }
-
- /**
- * @param reportType
- * the reportType to set
- */
- public void setReportType(String reportType) {
- this.reportType = reportType;
- }
-
- /**
- * @return the altimeter
- */
- public Float getAltimeter() {
- return altimeter;
- }
-
- /**
- * @param altimeter
- * the altimeter to set
- */
- public void setAltimeter(Float altimeter) {
- this.altimeter = altimeter;
- }
-
- /**
- * @return the dewPoint
- */
- public Integer getDewPoint() {
- return dewPoint;
- }
-
- /**
- * @param dewPoint
- * the dewPoint to set
- */
- public void setDewPoint(Integer dewPoint) {
- this.dewPoint = dewPoint;
- }
-
- /**
- * @return the dewPointFromTenths
- */
- public Float getDewPointFromTenths() {
- return dewPointFromTenths;
- }
-
- /**
- * @param dewPointFromTenths
- * the dewPointFromTenths to set
- */
- public void setDewPointFromTenths(Float dewPointFromTenths) {
- this.dewPointFromTenths = dewPointFromTenths;
- }
-
- /**
- * @return the refHour
- */
- public Calendar getRefHour() {
- return refHour;
- }
-
- /**
- * @param refHour
- * the refHour to set
- */
- public void setRefHour(Calendar refHour) {
- this.refHour = refHour;
- }
-
- /**
- * @return the seaLevelPress
- */
- public Float getSeaLevelPress() {
- return seaLevelPress;
- }
-
- /**
- * @param seaLevelPress
- * the seaLevelPress to set
- */
- public void setSeaLevelPress(Float seaLevelPress) {
- this.seaLevelPress = seaLevelPress;
- }
-
- /**
- * @return the stationID
- */
- public String getStationID() {
- return stationID;
- }
-
- /**
- * @param stationID
- * the stationID to set
- */
- public void setStationID(String stationID) {
- this.stationID = stationID;
- }
-
- /**
- * @return the temperature
- */
- public Integer getTemperature() {
- return temperature;
- }
-
- /**
- * @param temperature
- * the temperature to set
- */
- public void setTemperature(Integer temperature) {
- this.temperature = temperature;
- }
-
- /**
- * @return the tempFromTenths
- */
- public Float getTempFromTenths() {
- return tempFromTenths;
- }
-
- /**
- * @param tempFromTenths
- * the tempFromTenths to set
- */
- public void setTempFromTenths(Float tempFromTenths) {
- this.tempFromTenths = tempFromTenths;
- }
-
- /**
- * @return the timeObs
- */
- public Calendar getTimeObs() {
- return timeObs;
- }
-
- /**
- * @param timeObs
- * the timeObs to set
- */
- public void setTimeObs(Calendar timeObs) {
- this.timeObs = timeObs;
- }
-
- /**
- * @return the windDir
- */
- public String getWindDir() {
- return windDir;
- }
-
- /**
- * @param windDir
- * the windDir to set
- */
- public void setWindDir(String windDir) {
- this.windDir = windDir;
- }
-
- /**
- * @return the windGust
- */
- public Integer getWindGust() {
- return windGust;
- }
-
- /**
- * @param windGust
- * the windGust to set
- */
- public void setWindGust(Integer windGust) {
- this.windGust = windGust;
- }
-
- /**
- * @return the windSpeed
- */
- public Integer getWindSpeed() {
- return windSpeed;
- }
-
- /**
- * @param windSpeed
- * the windSpeed to set
- */
- public void setWindSpeed(Integer windSpeed) {
- this.windSpeed = windSpeed;
- }
-
- /**
- * Get the IDecoderGettable reference for this record.
- *
- * @return The IDecoderGettable reference for this record. Null for this
- * class.
- */
- public IDecoderGettable getDecoderGettable() {
- return null;
- }
-
- @Override
- @Column
- @Access(AccessType.PROPERTY)
- public String getDataURI() {
- return super.getDataURI();
- }
-}
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java
index 357d7bd238..fd0f96eed5 100644
--- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java
@@ -54,29 +54,30 @@ import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
*
* SOFTWARE HISTORY
*
- * ate Ticket# Engineer Description
- * ----------- ---------- ----------- --------------------------
- * 2/14/07 139 bphillip Initial creation
- * 20071029 505 jkorman Changed setting of DataTime from refhour
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Feb 14, 2007 139 bphillip Initial creation
+ * Oct 29, 2007 505 jkorman Changed setting of DataTime from refhour
* to observation time.
- * 20071128 575 jkorman Added future obs time threshold check in
+ * Nov 28, 2007 575 jkorman Added future obs time threshold check in
* decode.
- * 12/07/07 452 bphillip Retrieve lat/lon info from station table
- * 12/17/07 628 bphillip Discarding data with no station info
- * 20071217 453 jkorman Major restructure of the decode method
+ * Dec 07, 2007 452 bphillip Retrieve lat/lon info from station table
+ * Dec 17, 2007 628 bphillip Discarding data with no station info
+ * Dec 17, 2007 453 jkorman Major restructure of the decode method
* to ensure that all sections are decoded
* properly. Added cleanMessage method.
- * 20071218 453 jkorman Added metric winds and visibility.
- * 20071221 665 jkorman Modified metric vis to ensure it is not
+ * Dec 18, 2007 453 jkorman Added metric winds and visibility.
+ * Dec 21, 2007 665 jkorman Modified metric vis to ensure it is not
* decoding alstg data. Added checks for
* NSC, NCD, and CAVOK. Added checks for
* metric sector vis.
- * 20080102 667 jkorman Added code to properly decode/store clear
- * sky conditions.
- * 20080116 798 jkorman Changed logging levels.
- * 20080414 996 jkorman Rewrote sky cover decode section to handle
- * CB/TCU and /// data.
- * 11/11/08 1684 chammack Camel refactor.
+ * Jan 02, 2008 667 jkorman Added code to properly decode/store
+ * clear sky conditions.
+ * Jan 16, 2008 798 jkorman Changed logging levels.
+ * Apr 14, 2008 996 jkorman Rewrote sky cover decode section to
+ * handle CB/TCU and /// data.
+ * Nov 11, 2008 1684 chammack Camel refactor.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* @author bphillip
@@ -185,8 +186,6 @@ public class MetarDecoder extends AbstractDecoder {
public static final Pattern SUNSHINE = Pattern
.compile("(\\b)98(\\d{3}|///)");
- private final String PLUGIN_NAME;
-
private boolean useMockInfo = false;
private ObStation mockInfo = null;
@@ -195,8 +194,7 @@ public class MetarDecoder extends AbstractDecoder {
private String traceId = null;
- public MetarDecoder(String pluginName) throws DecoderException {
- PLUGIN_NAME = pluginName;
+ public MetarDecoder() {
VIS_PARSER = new VisibilityParser();
}
@@ -924,7 +922,6 @@ public class MetarDecoder extends AbstractDecoder {
record.setSunshine(value);
}
- record.setPluginName(PLUGIN_NAME);
record.constructDataURI();
record.setWmoHeader(sep.getWMOHeader().getWmoHeader());
@@ -1008,7 +1005,7 @@ public class MetarDecoder extends AbstractDecoder {
StringBuilder sb = null;
if (data != null) {
sb = new StringBuilder(data);
- for (int i = 0; i < sb.length() - 1; i++) {
+ for (int i = 0; i < (sb.length() - 1); i++) {
if (sb.charAt(i) == '0') {
sb.setCharAt(i, ' ');
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java
index 927378c2ff..8ca48f7421 100644
--- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java
+++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java
@@ -59,6 +59,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* dimensioned size.
* May 09, 2013 1869 bsteffen Modified D2D time series of point data to
* work without dataURI.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
@@ -68,7 +69,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
public class MetarPointDataTransform {
- public static final String ALTIMETER = "altimeter";
+ public static final String ALTIMETER = "altimeter";
public static final String SEA_LEVEL_PRESS = "seaLevelPress";
@@ -232,8 +233,9 @@ public class MetarPointDataTransform {
Map pointMap = new HashMap();
for (PluginDataObject p : pdo) {
- if (!(p instanceof MetarRecord))
+ if (!(p instanceof MetarRecord)) {
continue;
+ }
File f = this.dao.getFullFilePath(p);
PointDataContainer pdc = pointMap.get(f);
@@ -254,7 +256,7 @@ public class MetarPointDataTransform {
MetarRecord record) {
PointDataView pdv = container.append();
- if (record.getCorrection() != null
+ if ((record.getCorrection() != null)
&& record.getCorrection().equals("COR")) {
pdv.setInt(CORRECTION, 1);
} else {
@@ -272,12 +274,12 @@ public class MetarPointDataTransform {
if (record.getSkyCoverage() != null) {
int maxSize = container.getDescription(SKY_COVER)
- .getDimensionAsInt();
+ .getDimensionAsInt();
record.sort(record.getSkyCoverage());
Iterator scIterator = record.getSkyCoverage().iterator();
int i = 0;
while (scIterator.hasNext()) {
- if(i >= maxSize) {
+ if (i >= maxSize) {
break;
}
// TODO: storing duplicate info like this, needs to be resolved
@@ -285,8 +287,9 @@ public class MetarPointDataTransform {
if (sc.getType() != null) {
StringBuffer scBuffer = new StringBuffer();
scBuffer.append(sc.getType());
- if (sc.getGenus() != null)
+ if (sc.getGenus() != null) {
scBuffer.append(sc.getGenus());
+ }
pdv.setString(SKY_COVER, scBuffer.toString(), i);
if (sc.getType() != null) {
@@ -346,7 +349,7 @@ public class MetarPointDataTransform {
pdv.setFloat(SNOWFALL6_HOUR, record.getSnowFall_6Hours());
pdv.setInt(SUNSHINE, record.getSunshine());
- if (record.getWindDir() != null
+ if ((record.getWindDir() != null)
&& !record.getWindDir().equalsIgnoreCase("VRB")) {
pdv.setFloat("windDir", Float.parseFloat(record.getWindDir()));
}
@@ -415,7 +418,6 @@ public class MetarPointDataTransform {
mr.setPressChange3Hour(pdv.getNumber(PRESS_CHANGE3_HOUR).floatValue());
mr.setPressChangeChar(pdv.getString(PRESS_CHANGE_CHAR));
- mr.setPluginName("obs");
mr.setPrecip1Hour(pdv.getNumber(PRECIP1_HOUR).floatValue());
mr.setPrecip3Hour(pdv.getNumber(PRECIP3_HOUR).floatValue());
mr.setPrecip6Hour(pdv.getNumber(PRECIP6_HOUR).floatValue());
@@ -427,7 +429,7 @@ public class MetarPointDataTransform {
int i = 0;
Set scList = new HashSet();
for (String s : scType) {
- if (s != null && !s.equals("")) {
+ if ((s != null) && !s.equals("")) {
SkyCover skyCover = new SkyCover();
skyCover.setType(s);
diff --git a/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java b/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java
index dd4922a752..8d8c3f6f66 100644
--- a/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java
@@ -59,10 +59,11 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20080103 384 jkorman Initial Coding.
- * 20080128 861 jkorman Add pirep layer data.
- * 20080408 1039 jkorman Added traceId for tracing data.
- * 11/13/08 1684 chammack Camel Refactor
+ * Jan 03, 2008 384 jkorman Initial Coding.
+ * Jan 28, 2008 861 jkorman Add pirep layer data.
+ * Apr 08, 2008 1039 jkorman Added traceId for tracing data.
+ * Nov 13, 2008 1684 chammack Camel Refactor
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* @author jkorman
@@ -108,7 +109,6 @@ public class PirepDecoder extends AbstractDecoder {
if (report != null) {
report.setTraceId(traceId);
- report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
} catch (PluginException e) {
@@ -181,8 +181,7 @@ public class PirepDecoder extends AbstractDecoder {
record.setHorzVisibility(parser.getHorxVisibility());
// Collect the decoded icing flight conditions data
- List icing = parser
- .getIcingLayers();
+ List icing = parser.getIcingLayers();
if (icing != null) {
PirepLayerData iceLayer = null;
for (AircraftFlightCondition layer : icing) {
@@ -250,7 +249,7 @@ public class PirepDecoder extends AbstractDecoder {
}
if (traceIdx >= 0) {
newTrace = new StackTraceElement[traceIdx + 1];
- for (int j = 0; j < traceIdx + 1; j++) {
+ for (int j = 0; j < (traceIdx + 1); j++) {
newTrace[j] = trace[j];
}
e.setStackTrace(newTrace);
diff --git a/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java b/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java
index 52f7e87a87..9bf246cfb8 100644
--- a/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java
@@ -57,6 +57,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* Mar 03, 2008 1026 jkorman Initial implementation.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
@@ -70,7 +71,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "poessounding";
/** The logger */
- private Log logger = LogFactory.getLog(getClass());
+ private final Log logger = LogFactory.getLog(getClass());
private PointDataDescription pdd;
@@ -118,7 +119,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements
PluginDataObject[] decodedData = null;
- if (data != null && data.length > 0) {
+ if ((data != null) && (data.length > 0)) {
WMOHeader wmoHeader = new WMOHeader(data, headers);
@@ -144,7 +145,6 @@ public class POESSoundingDecoder extends AbstractDecoder implements
container);
if (soundingData != null) {
soundingData.setTraceId(traceId);
- soundingData.setPluginName(PLUGIN_NAME);
pdoList.add(soundingData);
}
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java
index 475f038dc4..b82e388f07 100644
--- a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java
@@ -56,8 +56,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20080303 969 jkorman Initial implementation.
- * 20080408 1039 jkorman Added traceId for tracing data.
+ * Mar 03, 2008 969 jkorman Initial implementation.
+ * Apr 08, 2008 1039 jkorman Added traceId for tracing data.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
@@ -71,7 +72,7 @@ public class ProfilerDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "profiler";
/** The logger */
- private Log logger = LogFactory.getLog(getClass());
+ private final Log logger = LogFactory.getLog(getClass());
private PointDataDescription pdd;
@@ -131,7 +132,7 @@ public class ProfilerDecoder extends AbstractDecoder implements
PluginDataObject[] decodedData = null;
- if (data != null && data.length > 0) {
+ if ((data != null) && (data.length > 0)) {
WMOHeader wmoHeader = new WMOHeader(data, headers);
if ((wmoHeader != null) && (wmoHeader.isValid())) {
@@ -160,7 +161,6 @@ public class ProfilerDecoder extends AbstractDecoder implements
container, traceId);
if (soundingData != null) {
soundingData.setTraceId(traceId);
- soundingData.setPluginName(PLUGIN_NAME);
try {
soundingData.constructDataURI();
PointDataView view = soundingData
diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java
index fddb62a83a..dfa8f257f0 100644
--- a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java
@@ -87,12 +87,15 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 2/14/2007 139 Phillippe Initial check-in. Refactor of initial implementation.
+ * Feb 14, 2007 139 Phillippe Initial check-in. Refactor of initial
+ * implementation.
* Dec 17, 2007 600 bphillip Added dao pool usage
- * Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz() signature changed.
+ * Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz()
+ * signature changed.
* Mar 19, 2013 1804 bsteffen Optimize decoder performance.
- * Mar 19, 2013 1785 bgonzale Added performance status handler and added status
- * to decode.
+ * Mar 19, 2013 1785 bgonzale Added performance status handler and
+ * added status to decode.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* @author bphillip
@@ -130,7 +133,7 @@ public class RadarDecoder extends AbstractDecoder {
private String traceId = "";
- private RadarInfoDict infoDict;
+ private final RadarInfoDict infoDict;
private RadarStationDao radarStationDao = new RadarStationDao();
@@ -541,7 +544,6 @@ public class RadarDecoder extends AbstractDecoder {
private void finalizeRecord(RadarRecord record) throws PluginException {
record.setTraceId(traceId);
- record.setPluginName("radar");
record.constructDataURI();
record.setInsertTime(TimeTools.getSystemCalendar());
// for GSM, we want all the messages as they have the possibility of
@@ -562,7 +564,7 @@ public class RadarDecoder extends AbstractDecoder {
if (symbologyBlock == null) {
return;
}
-
+
int packetsKept = 0;
List packetsInLyrs = new ArrayList();
@@ -587,9 +589,9 @@ public class RadarDecoder extends AbstractDecoder {
GenericDataPacket genericPacket = (GenericDataPacket) packet;
List components = genericPacket
.getComponents();
- if (components != null
- && components.size() == 1
- && components.get(0).getComponentType() == ComponentType.RADIAL) {
+ if ((components != null)
+ && (components.size() == 1)
+ && (components.get(0).getComponentType() == ComponentType.RADIAL)) {
processRadialComponent(record,
(RadialComponent) components.get(0));
} else {
@@ -698,7 +700,7 @@ public class RadarDecoder extends AbstractDecoder {
ClusterTask task = ClusterLockUtils.lookupLock(lockname,
record.getIcao());
String formatStatus = RadarUtil.formatBits(messagePart, constants);
- if (task == null || task.getExtraInfo() == null) {
+ if ((task == null) || (task.getExtraInfo() == null)) {
ClusterLockUtils.lock(lockname, record.getIcao(), formatStatus, 30,
true);
EDEXUtil.sendMessageAlertViz(Priority.INFO,
@@ -711,7 +713,7 @@ public class RadarDecoder extends AbstractDecoder {
}
if (task.getExtraInfo() != null) {
- if (formatStatus != null
+ if ((formatStatus != null)
&& !formatStatus.equals(task.getExtraInfo().trim())) {
String details = "";
String temp = "";
diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java
index c20aa289b0..cf7c22c7d5 100644
--- a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java
+++ b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java
@@ -27,8 +27,9 @@ package com.raytheon.edex.plugin.radar.dao;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 02/06/09 1990 bphillip Initial creation
+ * Feb 06, 2009 1990 bphillip Initial creation
* Mar 18, 2013 1804 bsteffen Reduce useless data stored in radar hdf5
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
@@ -120,7 +121,8 @@ public class RadarDao extends PluginDao {
dataStore.addDataRecord(rec, sp);
}
- if (radarRec.getThresholds() != null && radarRec.getProductCode() != 2) {
+ if ((radarRec.getThresholds() != null)
+ && (radarRec.getProductCode() != 2)) {
IDataRecord rec = new ShortDataRecord(
RadarStoredData.THRESHOLDS_ID, radarRec.getDataURI(),
radarRec.getThresholds(), 1, new long[] { 16 });
@@ -139,7 +141,7 @@ public class RadarDao extends PluginDao {
}
Map symData = radarRec.getSymbologyData();
- if (symData != null && !symData.isEmpty()) {
+ if ((symData != null) && !symData.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(symData);
ByteDataRecord bdr = new ByteDataRecord(
@@ -161,7 +163,7 @@ public class RadarDao extends PluginDao {
Map>> mapProdVals = radarRec
.getMapProductVals();
- if (mapProdVals != null && !mapProdVals.isEmpty()) {
+ if ((mapProdVals != null) && !mapProdVals.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(mapProdVals);
ByteDataRecord bdr = new ByteDataRecord(
@@ -192,7 +194,7 @@ public class RadarDao extends PluginDao {
Map> mapRecVals = radarRec
.getMapRecordVals();
- if (mapRecVals != null && !mapRecVals.isEmpty()) {
+ if ((mapRecVals != null) && !mapRecVals.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(mapRecVals);
ByteDataRecord bdr = new ByteDataRecord(
@@ -202,7 +204,7 @@ public class RadarDao extends PluginDao {
}
Map stormIds = radarRec.getStormIDs();
- if (stormIds != null && !stormIds.isEmpty()) {
+ if ((stormIds != null) && !stormIds.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(stormIds);
ByteDataRecord bdr = new ByteDataRecord(
@@ -274,7 +276,6 @@ public class RadarDao extends PluginDao {
PluginDataObject[] queryResults = getMetadata(query);
for (PluginDataObject obj : queryResults) {
RadarRecord record = (RadarRecord) obj;
- record.setPluginName(pluginName);
IDataRecord[] hdf5Data = getHDF5Data(record, tile);
record.setMessageData(hdf5Data[0].getDataObject());
record.setAngleData((float[]) hdf5Data[1].getDataObject());
diff --git a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java
index a4d2ec96e7..bed1dbd22a 100644
--- a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java
@@ -54,8 +54,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20080103 384 jkorman Initial Coding.
- * 11/25/08 #1684 chammack Camel Refactor
+ * Jan 03, 2008 384 jkorman Initial Coding.
+ * Nov 25, 2008 1684 chammack Camel Refactor
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* @author jkorman
@@ -115,7 +116,6 @@ public class RECCODecoder extends AbstractDecoder {
input.getWmoHeader());
if (report != null) {
report.setTraceId(traceId);
- report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
} catch (PluginException e) {
diff --git a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java
index d1645ed8f5..1a9bbe9204 100644
--- a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java
+++ b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java
@@ -73,6 +73,7 @@ import com.vividsolutions.jts.geom.Geometry;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Jun 20, 2013 2128 bsteffen Ensure setDataURI sets the dataURI.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
@@ -86,12 +87,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
-@org.hibernate.annotations.Table(
- appliesTo = "recco",
- indexes = {
- @Index(name = "recco_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
- }
-)
+@org.hibernate.annotations.Table(appliesTo = "recco", indexes = { @Index(name = "recco_refTimeIndex", columnNames = {
+ "refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@@ -140,7 +137,7 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled,
@XmlAttribute
private Calendar refHour;
- //
+ //
@Column
@DataURI(position = 1)
@DynamicSerializeElement
@@ -687,6 +684,7 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled,
return a;
}
+ @Override
public String[] getStrings(String paramName) {
return null;
}
@@ -723,4 +721,9 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled,
public String getDataURI() {
return super.getDataURI();
}
+
+ @Override
+ public String getPluginName() {
+ return "recco";
+ }
}
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java
index 063938623c..f5651117af 100644
--- a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java
@@ -47,14 +47,15 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20080512 1131 jkorman Initial implementation.
- * 20080529 1131 jkorman Added new Separator constructor.
- * 11/11/08 1684 chammack Refactored to camel
- * 20090327 2019 jkorman Added code to check for non-redbook data.
- * 20120524 #647 dgilling Update persistence time in
+ * May 12, 2008 1131 jkorman Initial implementation.
+ * May 29, 2008 1131 jkorman Added new Separator constructor.
+ * Nov 11, 2008 1684 chammack Refactored to camel
+ * Mar 27, 2009 2019 jkorman Added code to check for non-redbook data.
+ * May 24, 2012 647 dgilling Update persistence time in
* createdBackDatedVersionIfNeeded.
- * Mar 19, 2013 1785 bgonzale Added performance status handler and added
- * status to decode.
+ * Mar 19, 2013 1785 bgonzale Added performance status handler and
+ * added status to decode.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* @author jkorman
@@ -95,6 +96,7 @@ public class RedbookDecoder extends AbstractDecoder {
private final IPerformanceStatusHandler perfLog = PerformanceStatus
.getHandler("Redbook:");
+
private String traceId = null;
/**
@@ -142,12 +144,11 @@ public class RedbookDecoder extends AbstractDecoder {
+ "- File is not Redbook data. Type is "
+ foreign.dataType);
} else {
- report = new RedbookParser(traceId, data,
- wmoHeader).getDecodedRecord();
+ report = new RedbookParser(traceId, data, wmoHeader)
+ .getDecodedRecord();
}
if (report != null) {
report.setPersistenceTime(new Date());
- report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
@@ -219,7 +220,6 @@ public class RedbookDecoder extends AbstractDecoder {
// and the Wes2Bridge archiver properly finds these backdated
// records
backDatedRecord.setPersistenceTime(new Date());
- backDatedRecord.setPluginName(PLUGIN_NAME);
backDatedRecord.constructDataURI();
} catch (PluginException e) {
logger.error(traceId + "Could not create back-dated copy of "
diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java
index d6ff1ba00d..199634a1d7 100644
--- a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java
+++ b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java
@@ -61,14 +61,17 @@ import com.raytheon.uf.common.time.DataTime;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20080512 1131 jkorman Initial implementation.
- * 20080529 1131 jkorman getPersistenceTime now returns system time.
- * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
- * 20130408 1293 bkowal Removed references to hdffileid.
- * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
- * Apr 29, 2013 1958 bgonzale Added equals and hashcode.
+ * May 12, 2008 1131 jkorman Initial implementation.
+ * May 29, 2008 1131 jkorman getPersistenceTime now returns system
+ * time.
+ * 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.
+ * Apr 29, 2013 1958 bgonzale Added equals and hashcode.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
@@ -82,17 +85,13 @@ import com.raytheon.uf.common.time.DataTime;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
-@org.hibernate.annotations.Table(
- appliesTo = "redbook",
- indexes = {
- @Index(name = "redbook_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
- }
-)
+@org.hibernate.annotations.Table(appliesTo = "redbook", indexes = { @Index(name = "redbook_refTimeIndex", columnNames = {
+ "refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
-public class RedbookRecord extends PersistablePluginDataObject
- implements IPersistable, Cloneable {
+public class RedbookRecord extends PersistablePluginDataObject implements
+ IPersistable, Cloneable {
private static final long serialVersionUID = 1L;
@@ -361,7 +360,8 @@ public class RedbookRecord extends PersistablePluginDataObject
other.id = 0;
other.dataURI = null;
- Date newRefTime = new Date(dataTime.getRefTime().getTime() - 60 * 1000);
+ Date newRefTime = new Date(dataTime.getRefTime().getTime()
+ - (60 * 1000));
if (dataTime.getUtilityFlags().contains(DataTime.FLAG.FCST_USED)) {
other.dataTime = new DataTime(newRefTime, dataTime.getFcstTime());
} else {
@@ -380,22 +380,23 @@ public class RedbookRecord extends PersistablePluginDataObject
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
- result = prime * result
+ result = (prime * result)
+ ((corIndicator == null) ? 0 : corIndicator.hashCode());
- result = prime * result
+ result = (prime * result)
+ ((fcstHours == null) ? 0 : fcstHours.hashCode());
- result = prime * result + ((fileId == null) ? 0 : fileId.hashCode());
- result = prime * result
+ result = (prime * result) + ((fileId == null) ? 0 : fileId.hashCode());
+ result = (prime * result)
+ ((originatorId == null) ? 0 : originatorId.hashCode());
- result = prime * result
+ result = (prime * result)
+ ((productId == null) ? 0 : productId.hashCode());
- result = prime * result + Arrays.hashCode(redBookData);
- result = prime * result
+ result = (prime * result) + Arrays.hashCode(redBookData);
+ result = (prime * result)
+ ((retentionHours == null) ? 0 : retentionHours.hashCode());
- result = prime * result + ((timeObs == null) ? 0 : timeObs.hashCode());
- result = prime * result
+ result = (prime * result)
+ + ((timeObs == null) ? 0 : timeObs.hashCode());
+ result = (prime * result)
+ ((wmoCCCCdt == null) ? 0 : wmoCCCCdt.hashCode());
- result = prime * result
+ result = (prime * result)
+ ((wmoTTAAii == null) ? 0 : wmoTTAAii.hashCode());
return result;
}
@@ -407,60 +408,82 @@ public class RedbookRecord extends PersistablePluginDataObject
*/
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (!super.equals(obj))
+ }
+ if (!super.equals(obj)) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
RedbookRecord other = (RedbookRecord) obj;
if (corIndicator == null) {
- if (other.corIndicator != null)
+ if (other.corIndicator != null) {
return false;
- } else if (!corIndicator.equals(other.corIndicator))
+ }
+ } else if (!corIndicator.equals(other.corIndicator)) {
return false;
+ }
if (fcstHours == null) {
- if (other.fcstHours != null)
+ if (other.fcstHours != null) {
return false;
- } else if (!fcstHours.equals(other.fcstHours))
+ }
+ } else if (!fcstHours.equals(other.fcstHours)) {
return false;
+ }
if (fileId == null) {
- if (other.fileId != null)
+ if (other.fileId != null) {
return false;
- } else if (!fileId.equals(other.fileId))
+ }
+ } else if (!fileId.equals(other.fileId)) {
return false;
+ }
if (originatorId == null) {
- if (other.originatorId != null)
+ if (other.originatorId != null) {
return false;
- } else if (!originatorId.equals(other.originatorId))
+ }
+ } else if (!originatorId.equals(other.originatorId)) {
return false;
+ }
if (productId == null) {
- if (other.productId != null)
+ if (other.productId != null) {
return false;
- } else if (!productId.equals(other.productId))
+ }
+ } else if (!productId.equals(other.productId)) {
return false;
- if (!Arrays.equals(redBookData, other.redBookData))
+ }
+ if (!Arrays.equals(redBookData, other.redBookData)) {
return false;
+ }
if (retentionHours == null) {
- if (other.retentionHours != null)
+ if (other.retentionHours != null) {
return false;
- } else if (!retentionHours.equals(other.retentionHours))
+ }
+ } else if (!retentionHours.equals(other.retentionHours)) {
return false;
+ }
if (timeObs == null) {
- if (other.timeObs != null)
+ if (other.timeObs != null) {
return false;
- } else if (!timeObs.equals(other.timeObs))
+ }
+ } else if (!timeObs.equals(other.timeObs)) {
return false;
+ }
if (wmoCCCCdt == null) {
- if (other.wmoCCCCdt != null)
+ if (other.wmoCCCCdt != null) {
return false;
- } else if (!wmoCCCCdt.equals(other.wmoCCCCdt))
+ }
+ } else if (!wmoCCCCdt.equals(other.wmoCCCCdt)) {
return false;
+ }
if (wmoTTAAii == null) {
- if (other.wmoTTAAii != null)
+ if (other.wmoTTAAii != null) {
return false;
- } else if (!wmoTTAAii.equals(other.wmoTTAAii))
+ }
+ } else if (!wmoTTAAii.equals(other.wmoTTAAii)) {
return false;
+ }
return true;
}
@@ -471,4 +494,8 @@ public class RedbookRecord extends PersistablePluginDataObject
return super.getDataURI();
}
+ @Override
+ public String getPluginName() {
+ return "redbook";
+ }
}
\ No newline at end of file
diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/SatelliteDecoder.java b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/SatelliteDecoder.java
index 55827a56ef..1a6457edac 100644
--- a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/SatelliteDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/plugin/satellite/SatelliteDecoder.java
@@ -46,9 +46,9 @@ import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.status.IPerformanceStatusHandler;
import com.raytheon.uf.common.status.PerformanceStatus;
import com.raytheon.uf.common.time.DataTime;
-import com.raytheon.uf.common.util.ArraysUtil;
import com.raytheon.uf.common.time.util.ITimer;
import com.raytheon.uf.common.time.util.TimeUtil;
+import com.raytheon.uf.common.util.ArraysUtil;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
import com.raytheon.uf.edex.wmo.message.WMOHeader;
@@ -79,7 +79,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* 01/03/2013 15294 D. Friedman Start with File instead of byte[] to
* reduce memory usage.
* Feb 15, 2013 1638 mschenke Moved array based utilities from Util into ArraysUtil
- *
+ *
* Mar 19, 2013 1785 bgonzale Added performance status handler and added status
* to decode.
*
@@ -90,7 +90,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*/
public class SatelliteDecoder extends AbstractDecoder {
- private String traceId = "";
+ private final String traceId = "";
private static final int MAX_IMAGE_SIZE = 30000000;
@@ -111,8 +111,9 @@ public class SatelliteDecoder extends AbstractDecoder {
SatelliteRecord record = null;
- if (file == null || (file.length() < 1))
+ if ((file == null) || (file.length() < 1)) {
return new PluginDataObject[0];
+ }
RandomAccessFile f = new RandomAccessFile(file, "r");
try {
ITimer timer = TimeUtil.getTimer();
@@ -129,7 +130,8 @@ public class SatelliteDecoder extends AbstractDecoder {
byteBuffer = null;
}
if (byteBuffer != null) {
- int offsetOfDataInFile = byteBuffer.position() + GINI_HEADER_SIZE;
+ int offsetOfDataInFile = byteBuffer.position()
+ + GINI_HEADER_SIZE;
Calendar calendar = Calendar.getInstance(TimeZone
.getTimeZone("GMT"));
int intValue = 0;
@@ -140,20 +142,23 @@ public class SatelliteDecoder extends AbstractDecoder {
record = new SatelliteRecord();
if (isCompressed(byteBuffer)) {
- /* If the data is compressed, we assume it came from the SBN
+ /*
+ * If the data is compressed, we assume it came from the SBN
* and will have a reasonable size such that we can have two
- * copies of the data in memory at the same time. Ideally,
+ * copies of the data in memory at the same time. Ideally,
* SBN decompression should be performed upstream from EDEX
* and this code would be removed.
*/
- byte[] data = new byte[(int) file.length() - byteBuffer.position()];
+ byte[] data = new byte[(int) file.length()
+ - byteBuffer.position()];
f.seek(byteBuffer.position());
f.readFully(data);
byte[][] retVal = decompressSatellite(data);
byteBuffer = ByteBuffer.wrap(retVal[0]);
tempBytes = retVal[1];
} else {
- /* The code bellow performs absolute gets on the buffer, so
+ /*
+ * The code bellow performs absolute gets on the buffer, so
* it needs to be compacted.
*/
byteBuffer.compact();
@@ -255,7 +260,7 @@ public class SatelliteDecoder extends AbstractDecoder {
// Get the Satellite Height
int satHeight = byteBuffer.getShort(53);
- if (latSub != 0 || lonSub != 0 || satHeight != 0) {
+ if ((latSub != 0) || (lonSub != 0) || (satHeight != 0)) {
// Correct the longitude so negative is west
lonSub *= -1;
// Correct the height to be height above ground
@@ -287,8 +292,9 @@ public class SatelliteDecoder extends AbstractDecoder {
// get number of points along y-axis
int ny = byteBuffer.getShort(18);
- /* If input was SBN-compressed, we already have the data
- * loaded. If not, load it now.
+ /*
+ * If input was SBN-compressed, we already have the data loaded.
+ * If not, load it now.
*/
if (tempBytes == null) {
tempBytes = new byte[nx * ny];
@@ -433,7 +439,6 @@ public class SatelliteDecoder extends AbstractDecoder {
record.setCoverage(mapCoverage);
record.setPersistenceTime(TimeTools.getSystemCalendar()
.getTime());
- record.setPluginName("satellite");
record.constructDataURI();
// Create the data record.
IDataRecord dataRec = messageData.getStorageRecord(record,
@@ -466,10 +471,11 @@ public class SatelliteDecoder extends AbstractDecoder {
* @throws DecoderException
* If WMO header is not found, or is incorrect.
* @param messageData
- * Contains the start of the satellite data file. On return,
- * the position is set the beginning of the GINI header.
+ * Contains the start of the satellite data file. On return, the
+ * position is set the beginning of the GINI header.
*/
- private void removeWmoHeader(ByteBuffer messageData) throws DecoderException {
+ private void removeWmoHeader(ByteBuffer messageData)
+ throws DecoderException {
// Copy to a char [], carefully, as creating a string from
// a byte [] with binary data can create erroneous data
@@ -500,7 +506,7 @@ public class SatelliteDecoder extends AbstractDecoder {
* Checks to see if the current satellite product is compressed.
*
* Assumes messageData is a byte[]-backed ByteBuffer.
- *
+ *
* @return A boolean indicating if the file is compressed or not
*/
private boolean isCompressed(ByteBuffer messageData) {
@@ -508,8 +514,8 @@ public class SatelliteDecoder extends AbstractDecoder {
byte[] placeholder = new byte[10];
Inflater decompressor = new Inflater();
try {
- decompressor.setInput(messageData.array(),
- messageData.position(), messageData.remaining());
+ decompressor.setInput(messageData.array(), messageData.position(),
+ messageData.remaining());
decompressor.inflate(placeholder);
} catch (DataFormatException e) {
compressed = false;
@@ -539,14 +545,13 @@ public class SatelliteDecoder extends AbstractDecoder {
// Allocate 30MB for a possible max size
ByteArrayOutputStream bos = new ByteArrayOutputStream(MAX_IMAGE_SIZE);
int totalBytesDecomp = 0;
- int decompByteCounter = 0;
byte[] inputArray = new byte[1024 * 10];
Inflater decompressor = new Inflater();
int index = -1;
try {
while (totalBytesDecomp < zSatellite.length) {
- int compChunkSize = zSatellite.length - totalBytesDecomp > 10240 ? 10240
+ int compChunkSize = (zSatellite.length - totalBytesDecomp) > 10240 ? 10240
: zSatellite.length - totalBytesDecomp;
// copy compChunkSize compressed data from zSatellite, offset by
@@ -570,9 +575,6 @@ public class SatelliteDecoder extends AbstractDecoder {
throw new DecoderException(
"Unable to decompress satellite data - input data appears to be truncated");
}
- // add the total bytes decompressed from inflate call
- decompByteCounter += inflatedBytes;
-
// retrieve the total compressed bytes input so far
totalBytesDecomp += decompressor.getTotalIn();
@@ -641,9 +643,9 @@ public class SatelliteDecoder extends AbstractDecoder {
}
- if (index != -1 && (index + 3 <= inflateArray.length - 1)) {
- if (!(inflateArray[index] == -1 && inflateArray[index + 1] == 0
- && inflateArray[index + 2] == -1 && inflateArray[index + 3] == 0)) {
+ if ((index != -1) && ((index + 3) <= (inflateArray.length - 1))) {
+ if (!((inflateArray[index] == -1) && (inflateArray[index + 1] == 0)
+ && (inflateArray[index + 2] == -1) && (inflateArray[index + 3] == 0))) {
index = getIndex(inflateArray, index + 1);
}
} else {
@@ -686,7 +688,7 @@ public class SatelliteDecoder extends AbstractDecoder {
if (byteArray[0] < 0) {
// remove the negative value
byteArray[0] &= 127;
- latitude = byteArrayToFloat(byteArray) / 10000 * -1;
+ latitude = (byteArrayToFloat(byteArray) / 10000) * -1;
} else {
latitude = byteArrayToFloat(byteArray) / 10000;
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java
index 7d67020f90..9d20ce9b65 100644
--- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java
@@ -62,16 +62,17 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 20070925 391 jkorman Initial Coding.
- * 20071107 391 jkorman Modified findDuplicate to use a different
+ * Sep 25, 2007 391 jkorman Initial Coding.
+ * Nov 07, 2007 391 jkorman Modified findDuplicate to use a different
* dataURI query.
* Dec 17, 2007 600 bphillip Added dao pool usage
- * 20080123 758 jkorman Added code to remove observation with a
+ * Jan 23, 2008 758 jkorman Added code to remove observation with a
* time in the future.
- * 20080215 887 jkorman Added null checks in decode.
- * 20080218 887 jkorman Reverse null checks in findDuplicate.
- * Mar 19, 2013 1785 bgonzale Added performance status handler and added status
- * to decode.
+ * Feb 15, 2008 887 jkorman Added null checks in decode.
+ * Feb 18, 2008 887 jkorman Reverse null checks in findDuplicate.
+ * Mar 19, 2013 1785 bgonzale Added performance status handler and
+ * added status to decode.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* @author jkorman
@@ -87,7 +88,7 @@ public class SfcObsDecoder extends AbstractDecoder {
.getHandler("SfcObs:");
/** The logger */
- private Log logger = LogFactory.getLog(getClass());
+ private final Log logger = LogFactory.getLog(getClass());
private boolean removeNILs = true;
@@ -169,7 +170,6 @@ public class SfcObsDecoder extends AbstractDecoder {
}
if (report != null) {
report.setTraceId(traceId);
- report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
} catch (PluginException e) {
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 8cc186047e..c0b0419c08 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
@@ -47,14 +47,14 @@ import com.raytheon.uf.common.time.DataTime;
/**
*
* SOFTWARE HISTORY
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * June2006 3,14 Phillippe Initial Creation.
- * 20071129 472 jkorman Added IDecoderGettable interface.
- * 19Mar2008 387 M. Duff Modified to store SHEF data.
- * May 07, 2013 1869 bsteffen Remove dataURI column from
+ * 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
*
*
* @author bphillip
@@ -63,21 +63,19 @@ import com.raytheon.uf.common.time.DataTime;
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class ShefRecord extends PluginDataObject {
-
+
public static enum ShefType {
A, B, E;
}
-
- private static final long serialVersionUID = 2726928942130489733L;
- private static final int MILLIS_PER_MINUTE = 1000 * 60;
+ private static final long serialVersionUID = 2726928942130489733L;
/**
* Collection of SHEF data values for this record
*/
@Transient
private List dataValues = null;
-
+
@Transient
protected String rawMessage = null;
@@ -127,12 +125,12 @@ public class ShefRecord extends PluginDataObject {
@Transient
private SHEFDate obsDate = null;
-
+
@Transient
private SHEFDate createDate = null;
@Transient
- private int durationValue = ParameterCode.Duration.DEFAULT.getValue();
+ private final int durationValue = ParameterCode.Duration.DEFAULT.getValue();
/**
* Empty constructor
@@ -161,12 +159,12 @@ public class ShefRecord extends PluginDataObject {
}
public void addDataValue(ShefData value) {
- if(dataValues == null) {
+ if (dataValues == null) {
dataValues = new ArrayList();
}
dataValues.add(value);
}
-
+
/**
* Get the record type.
*
@@ -246,19 +244,19 @@ public class ShefRecord extends PluginDataObject {
this.recordDate = recordDate;
if (recordDate.length() == 4) {
int year = ShefUtil.getFullYear(recordDate);
- synchronized(ShefConstants.YYYYMMDD_FORMAT){
+ synchronized (ShefConstants.YYYYMMDD_FORMAT) {
recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(year
+ recordDate);
}
} else if (recordDate.length() == 6) {
int year = ShefUtil.getFullYear(recordDate);
year = year / 100;
- synchronized(ShefConstants.YYYYMMDD_FORMAT){
+ synchronized (ShefConstants.YYYYMMDD_FORMAT) {
recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(year
+ recordDate);
}
} else { // recordDate length must be 8
- synchronized(ShefConstants.YYYYMMDD_FORMAT){
+ synchronized (ShefConstants.YYYYMMDD_FORMAT) {
recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(recordDate);
}
}
@@ -287,7 +285,7 @@ public class ShefRecord extends PluginDataObject {
public void setObsDate(SHEFDate date) {
obsDate = date;
}
-
+
/**
*
* @return
@@ -295,7 +293,7 @@ public class ShefRecord extends PluginDataObject {
public SHEFDate getObsDate() {
return obsDate;
}
-
+
/**
* Get the time zone code
*
@@ -375,7 +373,7 @@ public class ShefRecord extends PluginDataObject {
* @param date
*/
public void setCreationDate(SHEFDate date) {
- if(date != null) {
+ if (date != null) {
createDate = date;
creationDate = date.toLocal();
creationDateObj = date.toCalendar().getTime();
@@ -385,7 +383,6 @@ public class ShefRecord extends PluginDataObject {
creationDateObj = null;
}
}
-
/**
* Get the creation date Date object
@@ -563,54 +560,15 @@ public class ShefRecord extends PluginDataObject {
public IDecoderGettable getDecoderGettable() {
return null;
}
-
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Record type = ");
sb.append(shefType);
-
-// if(obsDate != null) {
-// sb.append(obsDate.toOutString());
-// } else {
-// sb.append(" 0 0 0 0 0 0");
-// }
-// sb.append(" ");
-// if(createDate != null) {
-// sb.append(createDate.toOutString());
-// } else {
-// sb.append(" 0 0 0 0 0 0");
-// }
-// sb.append(" ");
-// // PE
-// sb.append("HG");
-// sb.append(" ");
-// sb.append(String.format("%4d",durationValue));
-// sb.append(" ");
-// // Type Code
-// sb.append("R");
-// sb.append(" ");
-// // Source Code
-// sb.append("G");
-// sb.append(" ");
-// // Extremnum
-// sb.append("Z");
-// sb.append(" ");
-// // Probability Code
-// sb.append(" ");
-// sb.append(" ");
-// // Data Value
-// sb.append("00000.000");
-// sb.append(" ");
-// // Data Qualifier
-// sb.append(" ");
-// sb.append(" ");
-// // Revision code
-// sb.append((revisedRecord) ? "0" : "1");
-// sb.append(ShefConstants.EOL);
-// sb.append("----------------------------------------");
- if(dataValues != null) {
- for(ShefData d : dataValues) {
+
+ if (dataValues != null) {
+ for (ShefData d : dataValues) {
sb.append(ShefConstants.EOL);
d.toString(sb);
}
@@ -618,11 +576,16 @@ public class ShefRecord extends PluginDataObject {
sb.append(ShefConstants.EOL);
return sb.toString();
}
-
+
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
+
+ @Override
+ public String getPluginName() {
+ return "shef";
+ }
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java
index b31d016b9e..e4dd5ccf43 100644
--- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java
+++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java
@@ -107,6 +107,9 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* 03/07/2013 15545 w. kwock Added Observe time to log
* 03/21/2013 15967 w. kwock Fix the error in buildTsFcstRiv riverstatus table issue
* 04/05/2013 16036 w. kwock Fixed no ts=RZ in ingestfilter table but posted to height table
+ * 10/28/2013 16711 lbousaidi if the id is not in location table,but defined in geoarea table
+ * data can be posted to appropriate pe-based tables only if the data
+ * type is not READING like in A1 code.
*
*
*
@@ -418,6 +421,18 @@ public class PostShef {
if (log.isDebugEnabled()) {
log.debug("DataType = " + dataType);
}
+
+ /*
+ * if the station_id exists in location table and
+ * the data type is READING then the data doesn't get posted
+ * to the appropriate pe-based tables to match A1 logic.
+ * DR16711
+ */
+
+ if ((DataType.READING.equals(dataType))
+ &&(Location.LOC_GEOAREA.equals(postLocData))) {
+ postLocData=Location.LOC_UNDEFINED;
+ }
SHEFDate d = data.getObsTime();
if (d == null) {
diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/unit-test/test/edex/transform/shef/TestMetarToShefTransformer.java b/edexOsgi/com.raytheon.edex.plugin.shef/unit-test/test/edex/transform/shef/TestMetarToShefTransformer.java
index 8a4b988f28..2c473e8bce 100644
--- a/edexOsgi/com.raytheon.edex.plugin.shef/unit-test/test/edex/transform/shef/TestMetarToShefTransformer.java
+++ b/edexOsgi/com.raytheon.edex.plugin.shef/unit-test/test/edex/transform/shef/TestMetarToShefTransformer.java
@@ -19,10 +19,15 @@
**/
package test.edex.transform.shef;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import java.util.Iterator;
import org.junit.Test;
-import static org.junit.Assert.*;
import com.raytheon.edex.transform.shef.MetarToShefTransformer;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
@@ -32,26 +37,25 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
* Tests extracted from MetarToShef.
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* ======================================
* AWIPS2 DR Work
* 20120918 1185 jkorman Extracted from mains
- *
+ *
*
- *
+ *
* @author jkorman
- * @version 1.0
+ * @version 1.0
*/
public class TestMetarToShefTransformer {
/**
- * Test that the transformer creates an empty iterator when
- * given no input.
+ * Test that the transformer creates an empty iterator when given no input.
*/
@Test
public void testMetarToShefInteratorA() {
@@ -60,18 +64,17 @@ public class TestMetarToShefTransformer {
assertNotNull(it);
assertFalse(it.hasNext());
assertNull(it.next());
-
- pdos = new PluginDataObject [0];
+
+ pdos = new PluginDataObject[0];
it = MetarToShefTransformer.iterate(pdos);
assertNotNull(it);
assertFalse(it.hasNext());
assertNull(it.next());
-
+
}
-
+
/**
- * Test that the transformer creates an non-empty iterator for
- * given input.
+ * Test that the transformer creates an non-empty iterator for given input.
*/
@Test
public void testMetarToShefInteratorB() {
@@ -81,8 +84,20 @@ public class TestMetarToShefTransformer {
public IDecoderGettable getDecoderGettable() {
return null;
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.raytheon.uf.common.dataplugin.PluginDataObject#getPluginName
+ * ()
+ */
+ @Override
+ public String getPluginName() {
+ return "testMetarToShef";
+ }
};
-
+
PluginDataObject[] pdos = { p, };
Iterator> it = MetarToShefTransformer.iterate(pdos);
assertNotNull(it);
@@ -105,9 +120,6 @@ public class TestMetarToShefTransformer {
+ "\r\r\n: 60000 T00330011 10078 20033 53021 931012 933025 98245 4/005=",
newobs.toString());
- }
-
-
-
-
+ }
+
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java
index 2f65deae88..8b6e1fddf5 100644
--- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java
@@ -30,18 +30,18 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
/**
*
- * Decoder implementation for taf plugin
+ * Decoder implementation for taf plugin.
*
*
*
* SOFTWARE HISTORY
*
- * Date Ticket# Engineer Description
- * ------------ ---------- ----------- --------------------------
- * 2/14/07 139 bphillip Initial creation
- * 6/21/07 180 bphillip Updated to use new plugin pattern
- * 20080425 1001 jkorman Extracted decoder code into TAFParser.
- *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Feb 14, 2007 139 bphillip Initial creation
+ * Jun 21, 2007 180 bphillip Updated to use new plugin pattern
+ * Apr 25, 2008 1001 jkorman Extracted decoder code into TAFParser.
+ * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* @author bphillip
@@ -52,7 +52,7 @@ public class TafDecoder extends AbstractDecoder {
// Name of the plugin controlling this decoder.
public static final String PLUGIN_NAME = "TAF";
- private String traceId = "";
+ private final String traceId = "";
/**
* Constructor.
@@ -88,12 +88,12 @@ public class TafDecoder extends AbstractDecoder {
record = parser.getDecodedRecord();
if (record != null) {
record.setTraceId(traceId);
- record.setPluginName("taf");
record.constructDataURI();
} else {
TAFParts parts = input.tafParts;
- if(parts.getTafHeader() != null) {
- logger.error("Could not parse TAF for input " + parts.getTafHeader() + " in file " + traceId);
+ if (parts.getTafHeader() != null) {
+ logger.error("Could not parse TAF for input "
+ + parts.getTafHeader() + " in file " + traceId);
} else {
logger.error("Could not parse file " + traceId);
}
@@ -107,8 +107,9 @@ public class TafDecoder extends AbstractDecoder {
record = null;
}
- if (record == null)
+ if (record == null) {
return new PluginDataObject[0];
+ }
return new PluginDataObject[] { record };
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java
index d48e049b54..4690840804 100644
--- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java
+++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java
@@ -22,7 +22,6 @@ package com.raytheon.edex.plugin.taf.common;
import java.util.Date;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
import javax.persistence.Access;
@@ -61,13 +60,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
- * 2/14/07 139 bphillip Initial Creation
- * 6/21/07 180 bphillip Updated to use new plugin pattern
- * 20071129 472 jkorman Added IDecoderGettable interface.
- * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
+ * Feb 14, 2007 139 bphillip Initial Creation
+ * Jun 21, 2007 180 bphillip Updated to use new plugin pattern
+ * Nov 29, 2007 472 jkorman Added IDecoderGettable interface.
+ * 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
*
*
*
@@ -81,12 +82,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
-@org.hibernate.annotations.Table(
- appliesTo = "taf",
- indexes = {
- @Index(name = "taf_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
- }
-)
+@org.hibernate.annotations.Table(appliesTo = "taf", indexes = { @Index(name = "taf_refTimeIndex", columnNames = {
+ "refTime", "forecastTime" }) })
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
@@ -347,10 +344,8 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
this.identifier = dataURI;
- if (this.changeGroups != null && this.changeGroups.size() > 0) {
- for (Iterator iter = this.changeGroups.iterator(); iter
- .hasNext();) {
- ChangeGroup group = iter.next();
+ if ((this.changeGroups != null) && (this.changeGroups.size() > 0)) {
+ for (ChangeGroup group : this.changeGroups) {
group.setParentID(this);
}
}
@@ -391,7 +386,7 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result
+ result = (prime * result)
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
return result;
}
@@ -405,19 +400,23 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
*/
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
TafRecord other = (TafRecord) obj;
if (getDataURI() == null) {
if (other.getDataURI() != null) {
return false;
}
- } else if (!getDataURI().equals(other.getDataURI()))
+ } else if (!getDataURI().equals(other.getDataURI())) {
return false;
+ }
return true;
}
@@ -427,4 +426,9 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
public String getDataURI() {
return super.getDataURI();
}
+
+ @Override
+ public String getPluginName() {
+ return "taf";
+ }
}
diff --git a/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml
index 982bc1af13..945f5599a4 100644
--- a/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml
+++ b/edexOsgi/com.raytheon.edex.plugin.text/res/spring/text-ingest.xml
@@ -14,6 +14,11 @@