Issue #1869 Remove DataURI column from qc.

Former-commit-id: e54b02e75b3534f829f0cc4be2639ae5ed26663e
This commit is contained in:
Ben Steffensmeier 2013-05-16 17:30:05 -05:00
parent 7e849f0af3
commit c0d8dad8ae
6 changed files with 15 additions and 33 deletions

View file

@ -56,7 +56,6 @@ import com.raytheon.viz.pointdata.rsc.retrieve.PointDataPlotInfoRetriever;
* Feb 17, 2009 njensen Initial creation * Feb 17, 2009 njensen Initial creation
* Jun 29, 2009 2538 jsanchez Implemented Metars. * Jun 29, 2009 2538 jsanchez Implemented Metars.
* May 14, 2013 1869 bsteffen Get plots working without dataURI * May 14, 2013 1869 bsteffen Get plots working without dataURI
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
* *
* </pre> * </pre>
* *
@ -168,7 +167,6 @@ public class PlotResourceData extends AbstractRequestableResourceData {
pluginProps.put("tcg", new PluginPlotProperties(true, false)); pluginProps.put("tcg", new PluginPlotProperties(true, false));
pluginProps.put("svrwx", new PluginPlotProperties(true, false)); pluginProps.put("svrwx", new PluginPlotProperties(true, false));
pluginProps.put("ldadhydro", new PluginPlotProperties(true, false)); pluginProps.put("ldadhydro", new PluginPlotProperties(true, false));
pluginProps.put("qc", new PluginPlotProperties(true, false));
pluginProps.put("textPoints", new PluginPlotProperties(true, false)); pluginProps.put("textPoints", new PluginPlotProperties(true, false));
/* /*
* The good ones, these don't even need to be here because this is the * The good ones, these don't even need to be here because this is the
@ -191,6 +189,8 @@ public class PlotResourceData extends AbstractRequestableResourceData {
pluginProps.put("bufrmosMRF", new PluginPlotProperties()); pluginProps.put("bufrmosMRF", new PluginPlotProperties());
pluginProps.put("bufrmosNGM", new PluginPlotProperties()); pluginProps.put("bufrmosNGM", new PluginPlotProperties());
pluginProps.put("ldadmesonet", new PluginPlotProperties()); pluginProps.put("ldadmesonet", new PluginPlotProperties());
pluginProps.put("qc", new PluginPlotProperties());
ParsedURL.registerHandler(new LocalizationParsedURLHandler()); ParsedURL.registerHandler(new LocalizationParsedURLHandler());
} }

View file

@ -109,7 +109,7 @@ public class PointDataPlotInfoRetriever extends AbstractDbPlotInfoRetriever {
statusHandler.handle(Priority.CRITICAL, message, new Exception( statusHandler.handle(Priority.CRITICAL, message, new Exception(
message)); message));
} }
if (data.length == 5) { if (data.length > 4) {
stationInfo.dataURI = (String) data[4]; stationInfo.dataURI = (String) data[4];
} }
return stationInfo; return stationInfo;

View file

@ -42,5 +42,6 @@ dropDatauriAndAddConstraint bufrmoshpc bufrmoshpc_location_id_reftime_forecastti
dropDatauriAndAddConstraint goessounding goessounding_stationid_reftime_latitude_longitude_key "(stationid, reftime, latitude, longitude)" dropDatauriAndAddConstraint goessounding goessounding_stationid_reftime_latitude_longitude_key "(stationid, reftime, latitude, longitude)"
dropDatauriAndAddConstraint poessounding poessounding_stationid_reftime_latitude_longitude_key "(stationid, reftime, latitude, longitude)" dropDatauriAndAddConstraint poessounding poessounding_stationid_reftime_latitude_longitude_key "(stationid, reftime, latitude, longitude)"
dropDatauriAndAddConstraint ldadmesonet ldadmesonet_stationid_reftime_reportType_dataProvider_latitude_longitude_key "(stationid, reftime, reportType, dataProvider, latitude, longitude)" dropDatauriAndAddConstraint ldadmesonet ldadmesonet_stationid_reftime_reportType_dataProvider_latitude_longitude_key "(stationid, reftime, reportType, dataProvider, latitude, longitude)"
dropDatauriAndAddConstraint qc qc_stationid_reftime_qctype_latitude_longitude_key "(stationid, reftime, qcType, latitude, longitude)"
echo "INFO: dataURI columns dropped successfully" echo "INFO: dataURI columns dropped successfully"

View file

@ -22,8 +22,6 @@ package com.raytheon.uf.common.dataplugin.qc;
import java.util.Date; import java.util.Date;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
import javax.persistence.Embedded; import javax.persistence.Embedded;
@ -32,14 +30,9 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient; import javax.persistence.Transient;
import javax.persistence.UniqueConstraint; import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index; 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.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.geospatial.ISpatialEnabled; import com.raytheon.uf.common.geospatial.ISpatialEnabled;
@ -56,11 +49,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 12/07/2009 3408 bphillip Initial creation * Dec 07, 2009 3408 bphillip Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime * Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from * May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject. * PluginDataObject.
* May 16, 2013 1869 bsteffen Remove DataURI column from qc.
* *
* </pre> * </pre>
* *
@ -69,7 +64,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@Entity @Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "qcseq") @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "qcseq")
@Table(name = "qc", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @Table(name = "qc", uniqueConstraints = { @UniqueConstraint(columnNames = {
"stationid", "reftime", "qcType", "latitude", "longitude" }) })
/* /*
* Both refTime and forecastTime are included in the refTimeIndex since * Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used. * forecastTime is unlikely to be used.
@ -80,8 +76,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Index(name = "qc_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) @Index(name = "qc_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
} }
) )
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize @DynamicSerialize
public class QCRecord extends PluginDataObject implements ISpatialEnabled { public class QCRecord extends PluginDataObject implements ISpatialEnabled {
@ -131,13 +125,11 @@ public class QCRecord extends PluginDataObject implements ISpatialEnabled {
@Embedded @Embedded
@DataURI(position = 2, embedded = true) @DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement @DynamicSerializeElement
private SurfaceObsLocation location; // latitude, longitude, elevation, private SurfaceObsLocation location; // latitude, longitude, elevation,
@Column(nullable = false, length = 20) @Column(nullable = false, length = 20)
@DataURI(position = 1) @DataURI(position = 1)
@XmlElement
@DynamicSerializeElement @DynamicSerializeElement
private String qcType; private String qcType;
@ -704,11 +696,6 @@ public class QCRecord extends PluginDataObject implements ISpatialEnabled {
super(uri); super(uri);
} }
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
public Date getInvTime() { public Date getInvTime() {
return invTime; return invTime;
} }
@ -1971,10 +1958,4 @@ public class QCRecord extends PluginDataObject implements ISpatialEnabled {
public void setPointDataView(FakePointDataView pointDataView) { public void setPointDataView(FakePointDataView pointDataView) {
this.pointDataView = pointDataView; this.pointDataView = pointDataView;
} }
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
} }

View file

@ -23,6 +23,6 @@
<parameter name="longitude" queryName="location.longitude" type="FLOAT" unit="°" /> <parameter name="longitude" queryName="location.longitude" type="FLOAT" unit="°" />
<parameter name="elevation" queryName="location.elevation" type="FLOAT" unit="m" /> <parameter name="elevation" queryName="location.elevation" type="FLOAT" unit="m" />
<parameter name="stationName" queryName="location.stationId" type="STRING" /> <parameter name="stationName" queryName="location.stationId" type="STRING" />
<parameter name="stationId" queryName="location.stationId" type="STRING" />
<parameter name="qcType" queryName="qcType" type="STRING" /> <parameter name="qcType" queryName="qcType" type="STRING" />
<parameter name="dataURI" queryName="dataURI" type="STRING" />
</pointDataDbDescription> </pointDataDbDescription>

View file

@ -54,9 +54,10 @@ import com.raytheon.uf.edex.plugin.qc.dao.QCDao;
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 2010-12-03 #4775 D. Friedman Initial version * Dec 03, 2010 4775 D. Friedman Initial version
* ... * Mar 07, 2013 15842 D. Friedman Use Java NetCDF library instead of
* 2013-03-07 DR 15842 D. Friedman Use Java NetCDF library instead of pupynere * pupynere
* May 16, 2013 1869 bsteffen Remove DataURI column from qc.
* *
* </pre> * </pre>
* *
@ -212,7 +213,6 @@ public class QCScanner {
r.setNcSet(fn); r.setNcSet(fn);
r.setNcIndex(index); r.setNcIndex(index);
r.setQcType(qcType); r.setQcType(qcType);
r.constructDataURI();
records[oi++] = r; records[oi++] = r;
} }
++index; ++index;