Calendar obsTime = getTimeInfo(dataList);
if (obsTime != null) {
obsData = new UAObs();
- obsData.setValidTime(obsTime);
+ obsData.setDataTime(new DataTime(obsTime));
}
if (isValidTime(obsData)) {
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 89ecdfa76c..668fe416c0 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,7 +20,6 @@
package com.raytheon.uf.common.dataplugin.bufrua;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
@@ -93,6 +92,8 @@ 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.
+ * Jul 19, 2013 1992 bsteffen Remove redundant time columns from
+ * bufrua.
*
*
*
@@ -174,18 +175,6 @@ public class UAObs extends PersistablePluginDataObject implements
@Transient
private Integer levelId;
- // Time of the observation.
- @Column
- @XmlElement
- @DynamicSerializeElement
- private Calendar validTime;
-
- // Time of the observation to the nearest hour.
- @Column
- @XmlElement
- @DynamicSerializeElement
- private Calendar refHour;
-
// The observation report type.
@DataURI(position = 1)
@Column
@@ -450,40 +439,6 @@ public class UAObs extends PersistablePluginDataObject implements
this.reportType = reportType;
}
- /**
- * @return the validTime
- */
- public Calendar getValidTime() {
- return validTime;
- }
-
- /**
- * @param validTime
- * the validTime to set
- */
- public void setValidTime(Calendar validTime) {
- this.validTime = validTime;
- }
-
- /**
- * Get the reference hour
- *
- * @return the refHour
- */
- public Calendar getRefHour() {
- return refHour;
- }
-
- /**
- * Set the reference hour
- *
- * @param refHour
- * the refHour to set
- */
- public void setRefHour(Calendar refHour) {
- this.refHour = refHour;
- }
-
/**
* Get the station pressure at the observation site.
*
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObsAdapter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObsAdapter.java
index 7fe6987bbb..3608889078 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObsAdapter.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObsAdapter.java
@@ -36,12 +36,14 @@ import com.raytheon.uf.common.sounding.adapter.AbstractVerticalSoundingAdapter;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
/**
- * TODO Add Description
+ * Adapter for convertung UAObs data into Vertical Soundings.
*
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
+ * Jul 19, 2013 1992 bsteffen Remove redundant time columns from
+ * bufrua.
*
*
*
@@ -181,7 +183,7 @@ public class UAObsAdapter extends AbstractVerticalSoundingAdapter {
sounding.setDisplayFormat(icao);
sounding.setName(icao);
- sounding.setObsTime(obsData.getValidTime());
+ sounding.setObsTime(obsData.getDataTime().getRefTimeAsCalendar());
sounding.setDataTime(obsData.getDataTime());
List layers = interleave(obsData);
@@ -651,10 +653,10 @@ public class UAObsAdapter extends AbstractVerticalSoundingAdapter {
String key = getKey(obs);
if (obsMap.containsKey(key)) {
UAObs mapped = obsMap.get(key);
-
+
// if compare(mapped,obs) < 0 then mapped has newer data
int c = UAObs.getCorComparator().compare(mapped, obs);
- if(c < 0) {
+ if (c < 0) {
obsMap.put(key, obs);
}
} else {
@@ -668,18 +670,19 @@ public class UAObsAdapter extends AbstractVerticalSoundingAdapter {
}
/**
- * Create a key for a UAObs by concatenating the station identifier,
- * report type code and the valid time in milliseconds.
- * @param data A UAObs instance to key.
+ * Create a key for a UAObs by concatenating the station identifier, report
+ * type code and the valid time in milliseconds.
+ *
+ * @param data
+ * A UAObs instance to key.
* @return The generated key, returns null if the UAObs reference is null.
*/
private static String getKey(UAObs data) {
String key = null;
if (data != null) {
- key = String
- .format("%s:%4d:%d", data.getStationId(), data
- .getReportType(), data.getValidTime()
- .getTimeInMillis());
+ key = String.format("%s:%4d:%d", data.getStationId(),
+ data.getReportType(), data.getDataTime().getRefTime()
+ .getTime());
}
return key;
}
@@ -803,14 +806,12 @@ public class UAObsAdapter extends AbstractVerticalSoundingAdapter {
SurfaceObsLocation loc = new SurfaceObsLocation("72558");
UAObs[] obs = new UAObs[2];
obs[0] = new UAObs();
- obs[0].setValidTime(TimeTools.copy(c));
obs[0].setLocation(loc);
obs[0].setReportType(2020);
obs[0].setCorIndicator(null);
loc = new SurfaceObsLocation("72558");
obs[1] = new UAObs();
- obs[1].setValidTime(TimeTools.copy(c));
obs[1].setLocation(loc);
obs[1].setReportType(2020);
obs[1].setCorIndicator("CCA");
diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/dao/BufrUAPointDataTransform.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/dao/BufrUAPointDataTransform.java
index 9ced3fa49c..968264b596 100644
--- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/dao/BufrUAPointDataTransform.java
+++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/dao/BufrUAPointDataTransform.java
@@ -35,20 +35,22 @@ import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
/**
- * TODO Add Description
+ * Converts a PointDataContainer into a UAObs record.
*
*
- *
+ *
* SOFTWARE HISTORY
- *
+ *
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 19, 2009 jkorman Initial creation
- *
+ * Jul 19, 2013 1992 bsteffen Remove redundant time columns from
+ * bufrua.
+ *
*
- *
+ *
* @author jkorman
- * @version 1.0
+ * @version 1.0
*/
public class BufrUAPointDataTransform {
@@ -121,9 +123,7 @@ public class BufrUAPointDataTransform {
obs = new UAObs(uri);
long vt = pdv.getNumber("validTime").longValue();
- obs.setValidTime(TimeTools.newCalendar(vt));
- obs.setRefHour(TimeTools.newCalendar(vt));
obs.setDataTime(new DataTime(TimeTools.newCalendar(vt)));
SurfaceObsLocation location = new SurfaceObsLocation();
diff --git a/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/ObservedSoundingQuery.java b/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/ObservedSoundingQuery.java
index 06ae3e9471..8b17aad0a3 100644
--- a/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/ObservedSoundingQuery.java
+++ b/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/ObservedSoundingQuery.java
@@ -20,6 +20,7 @@ package gov.noaa.nws.ncep.edex.uengine.tasks.profile;
* Nov 2011 Chin Chen changed Ncuair table query algorithm for performance improvement
* 01/05/2012 S. Gurung Removed references to UAIR (performed cleanup)
* 02/28/2012 Chin Chen modify several sounding query algorithms for better performance
+ * 07/19/2013 1992 bsteffen Remove redundant time columns from bufrua.
*
*
* @author Chin Chen
@@ -151,8 +152,8 @@ public class ObservedSoundingQuery {
else {
return pf;
}
- fields.add("validTime");// the synoptic time field name defined in UAObs
- values.add(refTimeCal);
+ fields.add("dataTime.refTime");// the synoptic time field name defined in UAObs
+ values.add(refTimeCal.getTime());
dao = new CoreDao(DaoConfig.forClass(UAObs.class));
try {
lUairRecords = (List) dao.queryByCriteria(fields, values);