Merge "Issue #1869 Remove DataURI column from qc." into development

Former-commit-id: 3d861eca69 [formerly 279038141fd88cdb1ccdd9a570d89eb6c651cd45]
Former-commit-id: 30a61c3e17
This commit is contained in:
Richard Peter 2013-05-20 14:48:47 -05:00 committed by Gerrit Code Review
commit 8079561032
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
* Jun 29, 2009 2538 jsanchez Implemented Metars.
* May 14, 2013 1869 bsteffen Get plots working without dataURI
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
*
* </pre>
*
@ -168,7 +167,6 @@ public class PlotResourceData extends AbstractRequestableResourceData {
pluginProps.put("tcg", new PluginPlotProperties(true, false));
pluginProps.put("svrwx", 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));
/*
* 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("bufrmosNGM", new PluginPlotProperties());
pluginProps.put("ldadmesonet", new PluginPlotProperties());
pluginProps.put("qc", new PluginPlotProperties());
ParsedURL.registerHandler(new LocalizationParsedURLHandler());
}

View file

@ -109,7 +109,7 @@ public class PointDataPlotInfoRetriever extends AbstractDbPlotInfoRetriever {
statusHandler.handle(Priority.CRITICAL, message, new Exception(
message));
}
if (data.length == 5) {
if (data.length > 4) {
stationInfo.dataURI = (String) data[4];
}
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 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 qc qc_stationid_reftime_qctype_latitude_longitude_key "(stationid, reftime, qcType, latitude, longitude)"
echo "INFO: dataURI columns dropped successfully"

View file

@ -22,8 +22,6 @@ package com.raytheon.uf.common.dataplugin.qc;
import java.util.Date;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
@ -32,14 +30,9 @@ import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
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 com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
@ -56,11 +49,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12/07/2009 3408 bphillip Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Dec 07, 2009 3408 bphillip Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* May 16, 2013 1869 bsteffen Remove DataURI column from qc.
*
* </pre>
*
@ -69,7 +64,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity
@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
* 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" } )
}
)
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class QCRecord extends PluginDataObject implements ISpatialEnabled {
@ -131,13 +125,11 @@ public class QCRecord extends PluginDataObject implements ISpatialEnabled {
@Embedded
@DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location; // latitude, longitude, elevation,
@Column(nullable = false, length = 20)
@DataURI(position = 1)
@XmlElement
@DynamicSerializeElement
private String qcType;
@ -704,11 +696,6 @@ public class QCRecord extends PluginDataObject implements ISpatialEnabled {
super(uri);
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
public Date getInvTime() {
return invTime;
}
@ -1971,10 +1958,4 @@ public class QCRecord extends PluginDataObject implements ISpatialEnabled {
public void setPointDataView(FakePointDataView 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="elevation" queryName="location.elevation" type="FLOAT" unit="m" />
<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="dataURI" queryName="dataURI" type="STRING" />
</pointDataDbDescription>

View file

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