Issue #176 pull changes to insert and persist time from the WES2Bridge branch.
Change-Id: If82378f4d8ccf867a5078682893ce65591ea04b4 Former-commit-id:5957b76dd1
[formerly4179defc4f
] [formerlyf016be988e
] [formerly5957b76dd1
[formerly4179defc4f
] [formerlyf016be988e
] [formerly73f6e9e322
[formerlyf016be988e
[formerly 500f3f03f5260cff3417021776204ccf6c035415]]]] Former-commit-id:73f6e9e322
Former-commit-id:b0442fc51e
[formerlycb2addec0c
] [formerly f32d9732e6d10fada260c6773e029c2f625b2454 [formerly7bcbf3e3bc
]] Former-commit-id: 8347c5c5399559bd7aaac0f550964352dbc5568d [formerly3e5612ffac
] Former-commit-id:a8fa98ff99
This commit is contained in:
parent
f0e595338e
commit
0eaf261186
25 changed files with 176 additions and 520 deletions
|
@ -19,10 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.edex.plugin.bufrmos.common;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -230,26 +227,6 @@ public abstract class BufrMosData extends PersistablePluginDataObject implements
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the time to be used for the persistence time for this object.
|
||||
*
|
||||
* @param persistTime
|
||||
* The persistence time to be used.
|
||||
*/
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
c.setTime(persistTime);
|
||||
setInsertTime(c);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return this.dataTime.getRefTime();
|
||||
}
|
||||
|
||||
public BufrMosDataLocation getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.edex.plugin.ldadprofiler.common;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -254,6 +253,7 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements
|
|||
/**
|
||||
* @return the pdv
|
||||
*/
|
||||
@Override
|
||||
public PointDataView getPointDataView() {
|
||||
return pdv;
|
||||
}
|
||||
|
@ -265,6 +265,7 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements
|
|||
* @param pdv
|
||||
* the pdv to set
|
||||
*/
|
||||
@Override
|
||||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
@ -315,21 +316,6 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements
|
|||
this.location = location;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the location
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.edex.plugin.modelsounding.common;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -894,15 +893,4 @@ public class SoundingSite extends PersistablePluginDataObject implements
|
|||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return this.dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.bufrascat;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -372,14 +371,4 @@ public class AScatObs extends PersistablePluginDataObject implements
|
|||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.bufrhdw;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -631,18 +630,10 @@ public class BufrHDWObs extends PersistablePluginDataObject implements
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hashCode for this object. This implementation
|
||||
* returns the hashCode of the generated dataURI.
|
||||
* Returns the hashCode for this object. This implementation returns the
|
||||
* hashCode of the generated dataURI.
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
|
@ -655,26 +646,31 @@ public class BufrHDWObs extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if this record is equal to another by checking the
|
||||
* generated dataURI.
|
||||
* Checks if this record is equal to another by checking the generated
|
||||
* dataURI.
|
||||
*
|
||||
* @param obj
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
BufrHDWObs other = (BufrHDWObs) 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.bufrmthdw;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -631,15 +630,6 @@ public class BufrMTHDWObs extends PersistablePluginDataObject implements
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hashCode for this object. This implementation returns the
|
||||
* hashCode of the generated dataURI.
|
||||
|
@ -664,19 +654,23 @@ public class BufrMTHDWObs extends PersistablePluginDataObject implements
|
|||
*/
|
||||
@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;
|
||||
}
|
||||
BufrMTHDWObs other = (BufrMTHDWObs) 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.ncwf;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
|
@ -273,14 +272,4 @@ public class BUFRncwf extends PersistablePluginDataObject implements
|
|||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.bufrquikscat;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -372,14 +371,4 @@ public class QUIKScatObs extends PersistablePluginDataObject implements
|
|||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.bufrsigwx;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -293,15 +292,6 @@ public class SigWxData extends PersistablePluginDataObject implements
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.bufrssmi;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -326,15 +325,6 @@ public class SSMIScanData extends PersistablePluginDataObject implements
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
@ -353,8 +343,9 @@ public class SSMIScanData extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the hashCode for this object. This implementation
|
||||
* returns the hashCode of the generated dataURI.
|
||||
* Returns the hashCode for this object. This implementation returns the
|
||||
* hashCode of the generated dataURI.
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
|
@ -367,26 +358,31 @@ public class SSMIScanData extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if this record is equal to another by checking the
|
||||
* generated dataURI.
|
||||
* Checks if this record is equal to another by checking the generated
|
||||
* dataURI.
|
||||
*
|
||||
* @param obj
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
SSMIScanData other = (SSMIScanData) 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.cwa;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
|
@ -170,22 +169,6 @@ public class CWARecord extends PersistablePluginDataObject implements
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The time to use for persistence.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @persistTime
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
|
@ -22,7 +22,6 @@ package com.raytheon.uf.common.dataplugin.goessounding;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -507,15 +506,4 @@ public class GOESSounding extends PersistablePluginDataObject implements
|
|||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return this.dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ package com.raytheon.uf.common.dataplugin.grib;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
|
@ -242,22 +240,6 @@ public class GribRecord extends PersistablePluginDataObject implements
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
Calendar c = getInsertTime();
|
||||
if (c == null)
|
||||
return null;
|
||||
|
||||
return c.getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
c.setTime(persistTime);
|
||||
setInsertTime(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISpatialObject getSpatialObject() {
|
||||
return modelInfo.getLocation();
|
||||
|
@ -493,6 +475,7 @@ public class GribRecord extends PersistablePluginDataObject implements
|
|||
this.resCompFlags = resCompFlags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
@ -523,12 +506,15 @@ public class GribRecord extends PersistablePluginDataObject implements
|
|||
|
||||
@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;
|
||||
}
|
||||
GribRecord other = (GribRecord) obj;
|
||||
if (!this.dataTime.getRefTimeAsCalendar().equals(
|
||||
other.getDataTime().getRefTimeAsCalendar())) {
|
||||
|
@ -541,42 +527,59 @@ public class GribRecord extends PersistablePluginDataObject implements
|
|||
return false;
|
||||
}
|
||||
|
||||
if (gridVersion != other.gridVersion)
|
||||
if (gridVersion != other.gridVersion) {
|
||||
return false;
|
||||
if (!Arrays.equals(hybridCoordList, other.hybridCoordList))
|
||||
}
|
||||
if (!Arrays.equals(hybridCoordList, other.hybridCoordList)) {
|
||||
return false;
|
||||
if (hybridGrid != other.hybridGrid)
|
||||
}
|
||||
if (hybridGrid != other.hybridGrid) {
|
||||
return false;
|
||||
if (isVector != other.isVector)
|
||||
}
|
||||
if (isVector != other.isVector) {
|
||||
return false;
|
||||
if (!Arrays.equals(localSection, other.localSection))
|
||||
}
|
||||
if (!Arrays.equals(localSection, other.localSection)) {
|
||||
return false;
|
||||
if (localSectionUsed != other.localSectionUsed)
|
||||
}
|
||||
if (localSectionUsed != other.localSectionUsed) {
|
||||
return false;
|
||||
if (localTableVersion != other.localTableVersion)
|
||||
}
|
||||
if (localTableVersion != other.localTableVersion) {
|
||||
return false;
|
||||
if (masterTableVersion != other.masterTableVersion)
|
||||
}
|
||||
if (masterTableVersion != other.masterTableVersion) {
|
||||
return false;
|
||||
}
|
||||
if (modelInfo == null) {
|
||||
if (other.modelInfo != null)
|
||||
if (other.modelInfo != null) {
|
||||
return false;
|
||||
} else if (!modelInfo.equals(other.modelInfo))
|
||||
}
|
||||
} else if (!modelInfo.equals(other.modelInfo)) {
|
||||
return false;
|
||||
if (processedDataType != other.processedDataType)
|
||||
}
|
||||
if (processedDataType != other.processedDataType) {
|
||||
return false;
|
||||
if (productionStatus != other.productionStatus)
|
||||
}
|
||||
if (productionStatus != other.productionStatus) {
|
||||
return false;
|
||||
if (refTimeSignificance != other.refTimeSignificance)
|
||||
}
|
||||
if (refTimeSignificance != other.refTimeSignificance) {
|
||||
return false;
|
||||
}
|
||||
if (resCompFlags == null) {
|
||||
if (other.resCompFlags != null)
|
||||
if (other.resCompFlags != null) {
|
||||
return false;
|
||||
} else if (!resCompFlags.equals(other.resCompFlags))
|
||||
}
|
||||
} else if (!resCompFlags.equals(other.resCompFlags)) {
|
||||
return false;
|
||||
if (thinnedGrid != other.thinnedGrid)
|
||||
}
|
||||
if (thinnedGrid != other.thinnedGrid) {
|
||||
return false;
|
||||
if (!Arrays.equals(thinnedPts, other.thinnedPts))
|
||||
}
|
||||
if (!Arrays.equals(thinnedPts, other.thinnedPts)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ package com.raytheon.uf.common.dataplugin.ldadhydro;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.measure.quantity.Angle;
|
||||
|
@ -45,9 +44,9 @@ 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.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
|
@ -77,7 +76,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class HydroLdadRecord extends PluginDataObject implements
|
||||
public class HydroLdadRecord extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -1118,6 +1117,7 @@ public class HydroLdadRecord extends PluginDataObject implements
|
|||
return reportTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
|
||||
|
@ -1126,30 +1126,8 @@ public class HydroLdadRecord extends PluginDataObject implements
|
|||
/**
|
||||
* @return the pdv
|
||||
*/
|
||||
@Override
|
||||
public PointDataView getPointDataView() {
|
||||
return this.pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getHdfFileId() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return this.dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHdfFileId(Integer hdfFileId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.ldadmesonet;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.TimeZone;
|
||||
|
||||
|
@ -46,9 +45,9 @@ 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.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
|
@ -78,7 +77,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class MesonetLdadRecord extends PluginDataObject implements
|
||||
public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -1707,6 +1706,7 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
|
||||
|
@ -1715,37 +1715,14 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
/**
|
||||
* @return the pdv
|
||||
*/
|
||||
@Override
|
||||
public PointDataView getPointDataView() {
|
||||
return this.pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getHdfFileId() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return this.dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHdfFileId(Integer hdfFileId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String toMessage() {
|
||||
StringBuilder sb = null;
|
||||
if((getStationId() != null)&&(observationTime != null)) {
|
||||
if ((getStationId() != null) && (observationTime != null)) {
|
||||
sb = new StringBuilder();
|
||||
|
||||
sb.append(getStationId());
|
||||
|
@ -1759,7 +1736,7 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
sb.append((relHumidity != null) ? relHumidity : "");
|
||||
sb.append(",");
|
||||
sb.append((wetBulbTemperature != null) ? wetBulbTemperature : "");
|
||||
//---------------------------------------------------------------
|
||||
// ---------------------------------------------------------------
|
||||
sb.append(",");
|
||||
sb.append((windDir != null) ? windDir : "");
|
||||
|
||||
|
@ -1768,7 +1745,7 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
|
||||
sb.append(",");
|
||||
sb.append((windGust != null) ? windGust : "");
|
||||
//---------------------------------------------------------------
|
||||
// ---------------------------------------------------------------
|
||||
sb.append(",");
|
||||
sb.append((pressure != null) ? pressure : "");
|
||||
|
||||
|
@ -1786,7 +1763,7 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
|
||||
sb.append(",");
|
||||
sb.append((pressChange3Hour != null) ? pressChange3Hour : "");
|
||||
//---------------------------------------------------------------
|
||||
// ---------------------------------------------------------------
|
||||
sb.append(",");
|
||||
sb.append((precipAccum != null) ? precipAccum : "");
|
||||
|
||||
|
@ -1795,7 +1772,7 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
|
||||
sb.append(",");
|
||||
sb.append((precipType != null) ? precipType : "");
|
||||
//---------------------------------------------------------------
|
||||
// ---------------------------------------------------------------
|
||||
sb.append(",");
|
||||
sb.append((totalCloudCover != null) ? totalCloudCover : "");
|
||||
|
||||
|
@ -1805,7 +1782,6 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
sb.append(",");
|
||||
sb.append((skyLayerBase != null) ? skyLayerBase : "");
|
||||
|
||||
|
||||
sb.append(",");
|
||||
sb.append((cloudBaseHeight != null) ? cloudBaseHeight : "");
|
||||
|
||||
|
@ -1821,7 +1797,7 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
return (sb == null) ? null : sb.toString();
|
||||
}
|
||||
|
||||
public static final void main(String [] args) {
|
||||
public static final void main(String[] args) {
|
||||
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTimeZone(TimeZone.getTimeZone("Z"));
|
||||
|
@ -1838,17 +1814,8 @@ public class MesonetLdadRecord extends PluginDataObject implements
|
|||
rec.setAltimeter(29.85f);
|
||||
rec.setSeaLevelPressure(100215f);
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println(rec.toMessage());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.lsr;
|
|||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.measure.quantity.Angle;
|
||||
import javax.measure.quantity.DataAmount;
|
||||
|
@ -513,22 +512,6 @@ public class LocalStormReport extends PersistablePluginDataObject implements
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The time to use for persistence.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @persistTime
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
|
@ -23,7 +23,6 @@ package com.raytheon.uf.common.dataplugin.obs.metar;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
@ -52,11 +51,10 @@ 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.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover;
|
||||
import com.raytheon.uf.common.dataplugin.obs.metar.util.WeatherCondition;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
import com.raytheon.uf.common.pointdata.PointDataView;
|
||||
|
@ -95,8 +93,8 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
||||
IDecoderGettable, IPointData, IPersistable {
|
||||
public class MetarRecord extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable, IPointData {
|
||||
|
||||
public static final String PLUGIN_NAME = "obs";
|
||||
|
||||
|
@ -166,17 +164,17 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
|
||||
public static final String PRECIPITATION_24HR = "TP24hr";
|
||||
|
||||
// public static final String SNOW_DEPTH = "snow";
|
||||
//
|
||||
// public static final String SNOW_WATER = "weqs";
|
||||
//
|
||||
// public static final String SNOWFALL6_HOUR = "TP24hr";
|
||||
//
|
||||
// public static final String SUNSHINE = "msun";
|
||||
//
|
||||
// public static final String TEMP_MAX_6HOUR = "t6xc";
|
||||
//
|
||||
// public static final String TEMP_MIN_6HOUR = "t6nc";
|
||||
// public static final String SNOW_DEPTH = "snow";
|
||||
//
|
||||
// public static final String SNOW_WATER = "weqs";
|
||||
//
|
||||
// public static final String SNOWFALL6_HOUR = "TP24hr";
|
||||
//
|
||||
// public static final String SUNSHINE = "msun";
|
||||
//
|
||||
// public static final String TEMP_MAX_6HOUR = "t6xc";
|
||||
//
|
||||
// public static final String TEMP_MIN_6HOUR = "t6nc";
|
||||
|
||||
private String value;
|
||||
|
||||
|
@ -481,7 +479,6 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
@Transient
|
||||
private int sunshine = -9999;
|
||||
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Column
|
||||
|
@ -937,8 +934,9 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
* @return the timeObs
|
||||
*/
|
||||
public Calendar getTimeObs() {
|
||||
if (this.dataTime == null)
|
||||
if (this.dataTime == null) {
|
||||
return null;
|
||||
}
|
||||
return this.dataTime.getRefTimeAsCalendar();
|
||||
}
|
||||
|
||||
|
@ -1044,7 +1042,8 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
}
|
||||
|
||||
/**
|
||||
* @param snowDepth the snowDepth to set
|
||||
* @param snowDepth
|
||||
* the snowDepth to set
|
||||
*/
|
||||
public void setSnowDepth(int snowDepth) {
|
||||
this.snowDepth = snowDepth;
|
||||
|
@ -1058,7 +1057,8 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
}
|
||||
|
||||
/**
|
||||
* @param snowFall_6Hours the snowFall_6Hours to set
|
||||
* @param snowFall_6Hours
|
||||
* the snowFall_6Hours to set
|
||||
*/
|
||||
public void setSnowFall_6Hours(float snowFall_6Hours) {
|
||||
this.snowFall_6Hours = snowFall_6Hours;
|
||||
|
@ -1072,7 +1072,8 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
}
|
||||
|
||||
/**
|
||||
* @param sunshine the sunshine to set
|
||||
* @param sunshine
|
||||
* the sunshine to set
|
||||
*/
|
||||
public void setSunshine(int sunshine) {
|
||||
this.sunshine = sunshine;
|
||||
|
@ -1086,7 +1087,8 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
}
|
||||
|
||||
/**
|
||||
* @param snowWater the snowWater to set
|
||||
* @param snowWater
|
||||
* the snowWater to set
|
||||
*/
|
||||
public void setSnowWater(float snowWater) {
|
||||
this.snowWater = snowWater;
|
||||
|
@ -1679,28 +1681,7 @@ public class MetarRecord extends PluginDataObject implements ISpatialEnabled,
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getHdfFileId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return this.dataTime.getRefTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHdfFileId(Integer hdfFileId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
|
||||
}
|
||||
|
||||
public static Set<String> getAvailableParameters() {
|
||||
return PARM_MAP.keySet();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.poessounding;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
@ -329,28 +328,4 @@ public class POESSounding extends PersistablePluginDataObject implements
|
|||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.common.dataplugin.persist.IPersistable#getPersistenceTime
|
||||
* ()
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return this.dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.common.dataplugin.persist.IPersistable#setPersistenceTime
|
||||
* (java.util.Calendar)
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ package com.raytheon.uf.common.dataplugin.profiler;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -527,23 +526,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements
|
|||
pdv = view;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
|
||||
}
|
||||
|
||||
private Double getWindSpeed() {
|
||||
if (windSpeed == null) {
|
||||
double u = profLevel.getUcWind().doubleValue();
|
||||
|
|
|
@ -23,14 +23,12 @@ package com.raytheon.uf.common.dataplugin.radar;
|
|||
import java.awt.geom.Point2D;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.measure.unit.Unit;
|
||||
|
@ -53,7 +51,6 @@ import org.opengis.referencing.crs.ProjectedCRS;
|
|||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IHDFFilePathProvider;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarDataPoint.RadarProductType;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.AlertAdaptationParameters;
|
||||
|
@ -128,7 +125,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class RadarRecord extends PersistablePluginDataObject implements
|
||||
IPersistable, ISpatialEnabled, IRadarRecord {
|
||||
ISpatialEnabled, IRadarRecord {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -405,33 +402,6 @@ public class RadarRecord extends PersistablePluginDataObject implements
|
|||
return location;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time to use for persisting this data.
|
||||
*
|
||||
* @return The persistence time for this data.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
Calendar c = getInsertTime();
|
||||
if (c == null)
|
||||
return null;
|
||||
|
||||
return c.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the time to be used for the persistence time for this object.
|
||||
*
|
||||
* @param persistTime
|
||||
* The persistence time to be used.
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
c.setTime(persistTime);
|
||||
setInsertTime(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the icao
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,6 @@ package com.raytheon.uf.common.dataplugin.sfcobs;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -51,7 +50,6 @@ import org.hibernate.annotations.Index;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
|
@ -82,7 +80,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class ObsCommon extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
|
||||
ISpatialEnabled, IDecoderGettable, IPointData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -1650,21 +1648,4 @@ public class ObsCommon extends PersistablePluginDataObject implements
|
|||
public void setPointDataView(PointDataView pdv) {
|
||||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The time to use for persistence.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @persistTime
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.svrwx;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -35,7 +34,6 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
|
@ -66,7 +64,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class SvrWxRecord extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IPointData, IPersistable {
|
||||
ISpatialEnabled, IPointData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -269,22 +267,6 @@ public class SvrWxRecord extends PersistablePluginDataObject implements
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The time to use for persistence.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @persistTime
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.tcg;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -35,7 +34,6 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
|
@ -66,7 +64,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class TropicalCycloneGuidance extends PersistablePluginDataObject
|
||||
implements ISpatialEnabled, IPointData, IPersistable {
|
||||
implements ISpatialEnabled, IPointData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -262,22 +260,6 @@ public class TropicalCycloneGuidance extends PersistablePluginDataObject
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The time to use for persistence.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @persistTime
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
public String getProductType() {
|
||||
return productType;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.uf.common.dataplugin.tcs;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
|
@ -36,7 +35,6 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.pointdata.IPointData;
|
||||
|
@ -67,7 +65,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class TropicalCycloneSummary extends PersistablePluginDataObject
|
||||
implements ISpatialEnabled, IPointData, IPersistable {
|
||||
implements ISpatialEnabled, IPointData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -209,22 +207,6 @@ public class TropicalCycloneSummary extends PersistablePluginDataObject
|
|||
this.pdv = pdv;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The time to use for persistence.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
return dataTime.getRefTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @persistTime
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
}
|
||||
|
||||
public String getProductType() {
|
||||
return productType;
|
||||
}
|
||||
|
|
|
@ -19,17 +19,18 @@
|
|||
**/
|
||||
package com.raytheon.uf.common.dataplugin.persist;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Inheritance;
|
||||
import javax.persistence.InheritanceType;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* Provides an abstract implementation of plugindataobject with clustered file
|
||||
|
@ -56,11 +57,6 @@ public abstract class PersistablePluginDataObject extends PluginDataObject
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer hdfFileId;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -80,15 +76,44 @@ public abstract class PersistablePluginDataObject extends PluginDataObject
|
|||
*
|
||||
* @see com.raytheon.edex.plugin.IPersistable#getHdfFileId()
|
||||
*/
|
||||
@Override
|
||||
public Integer getHdfFileId() {
|
||||
return hdfFileId;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param hdfFileId
|
||||
* the hdfFileId to set
|
||||
*/
|
||||
@Override
|
||||
public void setHdfFileId(Integer hdfFileId) {
|
||||
this.hdfFileId = hdfFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the time to be used for the persistence time for this object.
|
||||
*
|
||||
* @param persistTime
|
||||
* The persistence time to be used.
|
||||
*/
|
||||
@Override
|
||||
public void setPersistenceTime(Date persistTime) {
|
||||
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
c.setTime(persistTime);
|
||||
setInsertTime(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time to use for persisting this data.
|
||||
*
|
||||
* @return The persistence time for this data.
|
||||
*/
|
||||
@Override
|
||||
public Date getPersistenceTime() {
|
||||
Calendar c = getInsertTime();
|
||||
if (c == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return c.getTime();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue