Merge "Issue #2361 once again try to remove more common ISerializableObject" into development
Former-commit-id:dd641d8c1a
[formerlyd3a21bc431
] [formerly4c7bee41a7
] [formerlydd641d8c1a
[formerlyd3a21bc431
] [formerly4c7bee41a7
] [formerly65962ae15a
[formerly4c7bee41a7
[formerly 5ec014c2fccf9b5e417738310b50beccd70ee62d]]]] Former-commit-id:65962ae15a
Former-commit-id:20f05bb5f6
[formerly56be5c199e
] [formerly f1ec56fa0b5f76ec6ff24f29eb75e8200ccfbdb2 [formerly6bd779e459
]] Former-commit-id: 87ed38682648bae094488cd6d1d80c4b7cf62049 [formerly1b0be1ed64
] Former-commit-id:987fb48cf3
This commit is contained in:
commit
6fb0b1cdac
38 changed files with 237 additions and 777 deletions
|
@ -58,6 +58,7 @@ import com.raytheon.uf.common.localization.PathManagerFactory;
|
|||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -81,7 +82,8 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
|
|||
import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Saves off geospatial data from the maps database using the warngen
|
||||
* configurations to improve performance of various operations in warngen.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -93,6 +95,7 @@ import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
|
|||
* Mar 29, 2012 #14691 Qinglu Lin Added returned value of getFeArea() of
|
||||
* AreaConfiguration to areaFields List.
|
||||
* May 7, 2013 15690 Qinglu Lin Added convertToMultiPolygon() and updated queryGeospatialData().
|
||||
* Oct 22, 2013 2361 njensen Use JAXBManager for XML
|
||||
* </pre>
|
||||
*
|
||||
* @author rjpeter
|
||||
|
@ -100,9 +103,13 @@ import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
|
|||
*/
|
||||
|
||||
public class GeospatialDataGenerator {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(GeospatialDataGenerator.class);
|
||||
|
||||
private static final SingleTypeJAXBManager<GeospatialTimeSet> jaxb = SingleTypeJAXBManager
|
||||
.createWithoutException(GeospatialTimeSet.class);
|
||||
|
||||
public static void generateUniqueGeospatialMetadataGeometries() {
|
||||
String mySite = SiteUtil.getSite();
|
||||
DialogConfiguration dialogConfig = null;
|
||||
|
@ -394,23 +401,27 @@ public class GeospatialDataGenerator {
|
|||
// clip against County Warning Area
|
||||
if (!areaSource.equalsIgnoreCase(WarningConstants.MARINE)) {
|
||||
String cwaSource = "cwa";
|
||||
List<String> cwaAreaFields = new ArrayList<String>(Arrays.asList("wfo", "gid"));
|
||||
List<String> cwaAreaFields = new ArrayList<String>(Arrays.asList(
|
||||
"wfo", "gid"));
|
||||
HashMap<String, RequestConstraint> cwaMap = new HashMap<String, RequestConstraint>(
|
||||
2);
|
||||
cwaMap.put("wfo", new RequestConstraint(site, ConstraintType.LIKE));
|
||||
SpatialQueryResult[] cwaFeatures = SpatialQueryFactory.create().query(
|
||||
cwaSource, cwaAreaFields.toArray(new String[cwaAreaFields.size()]),
|
||||
null, cwaMap, SearchMode.WITHIN);
|
||||
SpatialQueryResult[] cwaFeatures = SpatialQueryFactory.create()
|
||||
.query(cwaSource,
|
||||
cwaAreaFields.toArray(new String[cwaAreaFields
|
||||
.size()]), null, cwaMap, SearchMode.WITHIN);
|
||||
Geometry multiPolygon = null;
|
||||
Geometry clippedGeom = null;
|
||||
for (int i = 0; i < features.length; i++) {
|
||||
multiPolygon = null;
|
||||
for (int j = 0; j < cwaFeatures.length; j++) {
|
||||
clippedGeom = features[i].geometry.intersection(cwaFeatures[j].geometry);
|
||||
clippedGeom = features[i].geometry
|
||||
.intersection(cwaFeatures[j].geometry);
|
||||
if (clippedGeom instanceof GeometryCollection) {
|
||||
GeometryCollection gc = (GeometryCollection)clippedGeom;
|
||||
GeometryCollection gc = (GeometryCollection) clippedGeom;
|
||||
if (multiPolygon != null)
|
||||
multiPolygon = multiPolygon.union(convertToMultiPolygon(gc));
|
||||
multiPolygon = multiPolygon
|
||||
.union(convertToMultiPolygon(gc));
|
||||
else
|
||||
multiPolygon = convertToMultiPolygon(gc);
|
||||
}
|
||||
|
@ -440,6 +451,7 @@ public class GeospatialDataGenerator {
|
|||
|
||||
/**
|
||||
* Convert a GeometryCollection to a MultiPolygon.
|
||||
*
|
||||
* @param gc
|
||||
*/
|
||||
private static MultiPolygon convertToMultiPolygon(GeometryCollection gc) {
|
||||
|
@ -451,11 +463,11 @@ public class GeospatialDataGenerator {
|
|||
Object o = iter.next();
|
||||
if (o instanceof MultiPolygon) {
|
||||
if (mp == null)
|
||||
mp = (MultiPolygon)o;
|
||||
mp = (MultiPolygon) o;
|
||||
else
|
||||
mp = (MultiPolygon)mp.union((MultiPolygon)o);
|
||||
mp = (MultiPolygon) mp.union((MultiPolygon) o);
|
||||
} else if (o instanceof Polygon) {
|
||||
polygons.add((Polygon)o);
|
||||
polygons.add((Polygon) o);
|
||||
} else if (o instanceof LineString || o instanceof Point) {
|
||||
LinearRing lr = null;
|
||||
Coordinate[] coords = null;
|
||||
|
@ -463,12 +475,12 @@ public class GeospatialDataGenerator {
|
|||
Coordinate[] cs = ((LineString) o).getCoordinates();
|
||||
if (cs.length < 4) {
|
||||
coords = new Coordinate[4];
|
||||
for (int j = 0; j< cs.length; j++)
|
||||
for (int j = 0; j < cs.length; j++)
|
||||
coords[j] = new Coordinate(cs[j]);
|
||||
for (int j = cs.length; j < 4; j++)
|
||||
coords[j] = new Coordinate(cs[3-j]);
|
||||
coords[j] = new Coordinate(cs[3 - j]);
|
||||
} else {
|
||||
coords = new Coordinate[cs.length+1];
|
||||
coords = new Coordinate[cs.length + 1];
|
||||
for (int j = 0; j < cs.length; j++)
|
||||
coords[j] = new Coordinate(cs[j]);
|
||||
coords[cs.length] = new Coordinate(cs[0]);
|
||||
|
@ -476,14 +488,15 @@ public class GeospatialDataGenerator {
|
|||
} else {
|
||||
coords = new Coordinate[4];
|
||||
for (int i = 0; i < 4; i++)
|
||||
coords[i] = ((Point)o).getCoordinate();
|
||||
coords[i] = ((Point) o).getCoordinate();
|
||||
}
|
||||
lr = (((Geometry)o).getFactory()).createLinearRing(coords);
|
||||
lr = (((Geometry) o).getFactory()).createLinearRing(coords);
|
||||
Polygon poly = (new GeometryFactory()).createPolygon(lr, null);
|
||||
polygons.add((Polygon)poly);
|
||||
polygons.add((Polygon) poly);
|
||||
} else {
|
||||
statusHandler.handle(Priority.WARN,
|
||||
"Unprocessed Geometry object: " + o.getClass().getName());
|
||||
"Unprocessed Geometry object: "
|
||||
+ o.getClass().getName());
|
||||
}
|
||||
}
|
||||
if (mp == null && polygons.size() == 0)
|
||||
|
@ -491,7 +504,8 @@ public class GeospatialDataGenerator {
|
|||
if (polygons.size() > 0) {
|
||||
Polygon[] p = polygons.toArray(new Polygon[0]);
|
||||
if (mp != null)
|
||||
mp = (MultiPolygon)mp.union(new MultiPolygon(p, gc.getFactory()));
|
||||
mp = (MultiPolygon) mp.union(new MultiPolygon(p, gc
|
||||
.getFactory()));
|
||||
else
|
||||
mp = new MultiPolygon(p, gc.getFactory());
|
||||
}
|
||||
|
@ -651,7 +665,7 @@ public class GeospatialDataGenerator {
|
|||
|
||||
GeospatialTimeSet set = new GeospatialTimeSet();
|
||||
set.setData(new ArrayList<GeospatialTime>(times.values()));
|
||||
String xml = SerializationUtil.marshalToXml(set);
|
||||
String xml = jaxb.marshalToXml(set);
|
||||
|
||||
lf = pathMgr.getLocalizationFile(context,
|
||||
GeospatialFactory.METADATA_FILE);
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingRecord
|
||||
com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingLayer
|
||||
com.raytheon.uf.common.dataplugin.acarssounding.tools.Airports
|
|
@ -30,22 +30,17 @@ import javax.persistence.Id;
|
|||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
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 com.raytheon.uf.common.geospatial.ISpatialEnabled;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialObject;
|
||||
import com.raytheon.uf.common.pointdata.spatial.AircraftObsLocation;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.Point;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Layer for an ACARS Sounding
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -53,6 +48,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 30, 2009 jkorman Initial creation
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -62,10 +58,8 @@ import com.vividsolutions.jts.geom.Point;
|
|||
|
||||
@Entity
|
||||
@Table(name = "acarssoundinglayer")
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class ACARSSoundingLayer implements Serializable, ISerializableObject,
|
||||
ISpatialEnabled {
|
||||
public class ACARSSoundingLayer implements Serializable, ISpatialEnabled {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -81,103 +75,86 @@ public class ACARSSoundingLayer implements Serializable, ISerializableObject,
|
|||
// Time of the observation.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Calendar timeObs;
|
||||
|
||||
@Column(length = 32)
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String tailNumber;
|
||||
|
||||
@Embedded
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private AircraftObsLocation location;
|
||||
|
||||
// Flight phase
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer flightPhase;
|
||||
|
||||
// Observation air temperature in degrees Kelvin.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double temp;
|
||||
|
||||
// Observation dewpoint temperature in degrees Kelvin.
|
||||
// Decimal(5,2)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double dwpt;
|
||||
|
||||
// Relative Humidity in percent. Decimal(5,2)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double humidity;
|
||||
|
||||
// Mixing ratio in Kg/Kg
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double mixingRatio;
|
||||
|
||||
// Observation wind direction in angular degrees. Integer
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer windDirection;
|
||||
|
||||
// Observation wind speed in meters per second.
|
||||
// Decimal(5,2)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double windSpeed;
|
||||
|
||||
// Base height of reported icing.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer iceBaseHgt;
|
||||
|
||||
// Top height of reported icing.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer iceTopHgt;
|
||||
|
||||
// Intensity of reported icing.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer icing;
|
||||
|
||||
// Base height of reported turbulence.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer turbBaseHgt;
|
||||
|
||||
// Top height of reported turbulence.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer turbTopHgt;
|
||||
|
||||
// Intensity of reported turbulence.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Integer turbulence;
|
||||
|
||||
// Indicated or calculated pressure.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double pressure;
|
||||
|
||||
/**
|
||||
|
@ -609,7 +586,7 @@ public class ACARSSoundingLayer implements Serializable, ISerializableObject,
|
|||
return true;
|
||||
}
|
||||
|
||||
public static final void main(String [] args) {
|
||||
public static final void main(String[] args) {
|
||||
|
||||
ACARSSoundingLayer layerA = new ACARSSoundingLayer();
|
||||
AircraftObsLocation locA = new AircraftObsLocation();
|
||||
|
@ -631,6 +608,4 @@ public class ACARSSoundingLayer implements Serializable, ISerializableObject,
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
package com.raytheon.uf.common.dataplugin.acarssounding;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -39,15 +37,9 @@ import javax.persistence.OneToMany;
|
|||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
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 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;
|
||||
|
@ -71,6 +63,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations and IDecoderGettable
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -86,61 +79,46 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
*/
|
||||
@org.hibernate.annotations.Table(appliesTo = "acarssounding", indexes = { @Index(name = "acarssounding_refTimeIndex", columnNames = {
|
||||
"refTime", "forecastTime" }) })
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class ACARSSoundingRecord extends PluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable {
|
||||
ISpatialEnabled {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
|
||||
|
||||
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
|
||||
static {
|
||||
PARM_MAP.put("NLAT", STA_LAT);
|
||||
PARM_MAP.put("NLON", STA_LON);
|
||||
}
|
||||
|
||||
// Time of the observation.
|
||||
@Column
|
||||
@DataURI(position = 1, embedded = true)
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Calendar timeObs;
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 2, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
@Column(length = 32)
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String tailNumber;
|
||||
|
||||
// Flight phase (A[scending] D[escending])
|
||||
@Column(length = 1)
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String phase = null;
|
||||
|
||||
// oldest observation time in this sounding
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Long oldestTime = Long.MAX_VALUE;
|
||||
|
||||
// newest observation time in this sounding
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Long newestTime = Long.MIN_VALUE;
|
||||
|
||||
// The level data for this observation.
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parent", fetch = FetchType.EAGER)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private Set<ACARSSoundingLayer> levels;
|
||||
|
||||
|
@ -345,42 +323,6 @@ public class ACARSSoundingRecord extends PluginDataObject implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class does not implement IDecoderGettable so return null.
|
||||
*
|
||||
* @return Always null for this class.
|
||||
*/
|
||||
@Override
|
||||
public IDecoderGettable getDecoderGettable() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Amount getValue(String pName) {
|
||||
Amount a = null;
|
||||
if ("NLAT".equals(pName)) {
|
||||
a = new Amount(getLatitude(), LOCATION_UNIT);
|
||||
} else if ("NLON".equals(pName)) {
|
||||
a = new Amount(getLongitude(), LOCATION_UNIT);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Amount> getValues(String paramName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(String paramName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getStrings(String paramName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Column
|
||||
@Access(AccessType.PROPERTY)
|
||||
|
|
|
@ -32,13 +32,11 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
|
||||
import com.raytheon.uf.edex.decodertools.core.LatLonPoint;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Container for a list of airports read from an XML file
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -46,6 +44,7 @@ import com.raytheon.uf.edex.decodertools.core.LatLonPoint;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 16, 2009 jkorman Initial creation
|
||||
* Oct 22, 2013 2361 njensen Use JAXBManager for XML
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -55,7 +54,7 @@ import com.raytheon.uf.edex.decodertools.core.LatLonPoint;
|
|||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class Airports implements ISerializableObject {
|
||||
public class Airports {
|
||||
|
||||
private Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
@ -175,13 +174,14 @@ public class Airports implements ISerializableObject {
|
|||
Airports airports = null;
|
||||
|
||||
try {
|
||||
airports = (Airports) SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(filePath + File.separator
|
||||
SingleTypeJAXBManager<Airports> jaxb = new SingleTypeJAXBManager<Airports>(
|
||||
Airports.class);
|
||||
airports = jaxb.unmarshalFromXmlFile(filePath + File.separator
|
||||
+ fileName);
|
||||
logger.info(String.format("%4d airports read from config.",
|
||||
airports.getAirport().size()));
|
||||
|
||||
} catch (SerializationException e) {
|
||||
} catch (Exception e) {
|
||||
logger.error("Error unmarshaling airports ", e);
|
||||
}
|
||||
airports.createMapping();
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord
|
|
@ -29,14 +29,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.XmlAttribute;
|
||||
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.dataplugin.binlightning.impl.LightningStrikePoint;
|
||||
|
@ -83,6 +78,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Oct 22, 2013 2361 njensen Removed XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -98,9 +94,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
*/
|
||||
@org.hibernate.annotations.Table(appliesTo = BinLightningRecord.PLUGIN_NAME, indexes = { @Index(name = "binlightning_refTimeIndex", columnNames = {
|
||||
"refTime", "forecastTime" }) })
|
||||
@XmlRootElement
|
||||
@DynamicSerialize
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class BinLightningRecord extends PersistablePluginDataObject implements
|
||||
IPersistable {
|
||||
|
||||
|
@ -151,20 +145,17 @@ public class BinLightningRecord extends PersistablePluginDataObject implements
|
|||
@DataURI(position = 1)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Calendar startTime;
|
||||
|
||||
// Persisted value - Latest strike time in the collection.
|
||||
@DataURI(position = 2)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private Calendar stopTime;
|
||||
|
||||
// JJG - source of lightning data
|
||||
@Column(length = 5)
|
||||
@DataURI(position = 3)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String lightSource;
|
||||
|
||||
|
@ -448,17 +439,6 @@ public class BinLightningRecord extends PersistablePluginDataObject implements
|
|||
this.lightSource = lightSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the IDecoderGettable reference for this record.
|
||||
*
|
||||
* @return The IDecoderGettable reference for this record. Null for this
|
||||
* class.
|
||||
*/
|
||||
@Override
|
||||
public IDecoderGettable getDecoderGettable() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the data arrays from the store.
|
||||
*
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.bufrhdw.BufrHDWObs
|
|
@ -1,2 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.bufrua.UAObs
|
||||
com.raytheon.uf.common.dataplugin.bufrua.UAObsLevel
|
|
@ -20,21 +20,10 @@
|
|||
package com.raytheon.uf.common.dataplugin.bufrua;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.measure.quantity.Angle;
|
||||
import javax.measure.quantity.Length;
|
||||
import javax.measure.quantity.Temperature;
|
||||
import javax.measure.quantity.Velocity;
|
||||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
import javax.persistence.Access;
|
||||
import javax.persistence.AccessType;
|
||||
import javax.persistence.Column;
|
||||
|
@ -44,15 +33,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.XmlAttribute;
|
||||
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.dataplugin.persist.IPersistable;
|
||||
|
@ -63,7 +46,6 @@ import com.raytheon.uf.common.pointdata.PointDataView;
|
|||
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
/**
|
||||
|
@ -95,6 +77,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Jul 19, 2013 1992 bsteffen Remove redundant time columns from
|
||||
* bufrua.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations and IDecoderGettable
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -110,11 +93,9 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
*/
|
||||
@org.hibernate.annotations.Table(appliesTo = UAObs.PLUGIN_NAME, indexes = { @Index(name = "bufrua_refTimeIndex", columnNames = {
|
||||
"refTime", "forecastTime" }) })
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class UAObs extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
|
||||
ISpatialEnabled, IPointData, IPersistable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -139,33 +120,6 @@ public class UAObs extends PersistablePluginDataObject implements
|
|||
|
||||
public static final String PLUGIN_NAME = "bufrua";
|
||||
|
||||
public static final Unit<Length> DISTANCE_UNIT = SI.METER;
|
||||
|
||||
public static final Unit<Temperature> TEMPERATURE_UNIT = SI.KELVIN;
|
||||
|
||||
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
|
||||
|
||||
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
|
||||
|
||||
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
|
||||
|
||||
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
|
||||
static {
|
||||
PARM_MAP.put("GH", UA_GEOHGT);
|
||||
PARM_MAP.put("Px", UA_PRESSURE);
|
||||
|
||||
PARM_MAP.put("T", SFC_TEMP);
|
||||
PARM_MAP.put("DpT", SFC_DWPT);
|
||||
|
||||
PARM_MAP.put("WS", SFC_WNDSPD);
|
||||
PARM_MAP.put("WD", SFC_WNDDIR);
|
||||
|
||||
PARM_MAP.put("NLAT", STA_LAT);
|
||||
PARM_MAP.put("NLON", STA_LON);
|
||||
}
|
||||
|
||||
public static final String UA_PARAM_PTRN = ".*:PRESS=\\d{2,4}";
|
||||
|
||||
// Non persisted value. Hold the last requested parameter name.
|
||||
@Transient
|
||||
private String parameterName = null;
|
||||
|
@ -177,20 +131,17 @@ public class UAObs extends PersistablePluginDataObject implements
|
|||
// The observation report type.
|
||||
@DataURI(position = 1)
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer reportType;
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 4, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
// Correction indicator from wmo header
|
||||
@DataURI(position = 2)
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String corIndicator;
|
||||
|
||||
|
@ -201,48 +152,40 @@ public class UAObs extends PersistablePluginDataObject implements
|
|||
// Text of the WMO header
|
||||
@DataURI(position = 3)
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String wmoHeader;
|
||||
|
||||
// Station pressure in Pascals.
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer pressure_station;
|
||||
|
||||
// The total cloud cover in 1/8s coverage.
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer totalCloudCover;
|
||||
|
||||
// The platform directio in angular degrees.
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer platformDirection;
|
||||
|
||||
// The platform movement in meters per second.
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double platformMovement;
|
||||
|
||||
// ICAO of station if known.
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String stationName;
|
||||
|
||||
// The level data for this observation.
|
||||
@Transient
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private List<UAObsLevel> levels;
|
||||
|
||||
@Column(insertable = false, updatable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer idx;
|
||||
|
||||
|
@ -543,16 +486,6 @@ public class UAObs extends PersistablePluginDataObject implements
|
|||
identifier = dataURI;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the IDecoderGettable reference for this record.
|
||||
*
|
||||
* @return The IDecoderGettable reference for this record.
|
||||
*/
|
||||
@Override
|
||||
public IDecoderGettable getDecoderGettable() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -569,203 +502,6 @@ public class UAObs extends PersistablePluginDataObject implements
|
|||
this.pointDataView = pointDataView;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of a parameter that is represented as a String.
|
||||
*
|
||||
* @param paramName
|
||||
* The name of the parameter value to retrieve.
|
||||
* @return The String value of the parameter. If the parameter is unknown, a
|
||||
* null reference is returned.
|
||||
*/
|
||||
@Override
|
||||
public String getString(String paramName) {
|
||||
if ("STA".matches(paramName)) {
|
||||
return this.getStationId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value and units of a named parameter within this observation. The
|
||||
* parameter name may include level information for these observation data.
|
||||
* The format for parameter is:
|
||||
*
|
||||
* <pre>
|
||||
* "parameterName" may be one of
|
||||
* "GH" geopotential height
|
||||
* "Px" pressure
|
||||
* "T" temperature
|
||||
* "DpT" dewpoint
|
||||
* "WS" wind speed
|
||||
* "WD" wind direction
|
||||
* followed by a level specification ":PRESS=xxxx" where xxxx is a level
|
||||
* in hPa (millibars). To retrieve the temperature from the 850hPa level
|
||||
* use the following getValue("T:PRESS=850");
|
||||
*
|
||||
* Some data is specific to the observation, latitude/longitude for
|
||||
* example. These data may be retrieved using the parameter minus any level
|
||||
* information as follows
|
||||
* "NLAT" station latitude
|
||||
* "NLON" station longitude
|
||||
* </pre>
|
||||
*
|
||||
* If the sounding data defines a surface level, and a request for a level
|
||||
* below surface is requested, a null value is returned.
|
||||
*
|
||||
* @param paramName
|
||||
* The name of the parameter value to retrieve.
|
||||
* @return An Amount with value and units. If the parameter is unknown, a
|
||||
* null reference is returned.
|
||||
*/
|
||||
@Override
|
||||
public Amount getValue(String paramName) {
|
||||
Amount a = null;
|
||||
|
||||
if (parseParameter(paramName)) {
|
||||
String pName = PARM_MAP.get(parameterName);
|
||||
if ((pName != null) && (levels != null) && (levels.size() > 0)) {
|
||||
|
||||
UAObsLevel obsLevel = getLevel(levelId);
|
||||
if (obsLevel != null) {
|
||||
Integer iValue = null;
|
||||
Double dValue = null;
|
||||
if (UA_GEOHGT.equals(pName)) {
|
||||
iValue = obsLevel.getGeoHeight();
|
||||
if (iValue != null) {
|
||||
a = new Amount(iValue, DISTANCE_UNIT);
|
||||
}
|
||||
} else if (SFC_TEMP.equals(pName)) {
|
||||
dValue = obsLevel.getTemp();
|
||||
if (dValue != null) {
|
||||
a = new Amount(dValue, TEMPERATURE_UNIT);
|
||||
}
|
||||
} else if (SFC_DWPT.equals(pName)) {
|
||||
dValue = obsLevel.getDwpt();
|
||||
if (dValue != null) {
|
||||
a = new Amount(dValue, TEMPERATURE_UNIT);
|
||||
}
|
||||
} else if (SFC_WNDSPD.equals(pName)) {
|
||||
dValue = obsLevel.getWindSpeed();
|
||||
if (dValue != null) {
|
||||
a = new Amount(dValue, WIND_SPEED_UNIT);
|
||||
}
|
||||
} else if (SFC_WNDDIR.equals(pName)) {
|
||||
iValue = obsLevel.getWindDirection();
|
||||
if (iValue != null) {
|
||||
a = new Amount(iValue, WIND_DIR_UNIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Assume we are trying to get an observation attribute.
|
||||
String pName = PARM_MAP.get(paramName);
|
||||
if (STA_LAT.equals(pName)) {
|
||||
a = new Amount(this.getLatitude(), LOCATION_UNIT);
|
||||
} else if (STA_LON.equals(pName)) {
|
||||
a = new Amount(this.getLongitude(), LOCATION_UNIT);
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of a parameter that is represented as a String.
|
||||
*
|
||||
* @param paramName
|
||||
* The name of the parameter value to retrieve.
|
||||
* @return The String value of the parameter. If the parameter is unknown, a
|
||||
* null reference is returned.
|
||||
*/
|
||||
@Override
|
||||
public Collection<Amount> getValues(String paramName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the parameter is a level request, and parse out the pressure
|
||||
* level and parameter name if so.
|
||||
*
|
||||
* @param parameter
|
||||
* The parameter string to parse.
|
||||
* @return This is a level parameter.
|
||||
*/
|
||||
private boolean parseParameter(String parameter) {
|
||||
boolean goodParse = false;
|
||||
Pattern p = Pattern.compile(UA_PARAM_PTRN);
|
||||
Matcher m = p.matcher(parameter);
|
||||
if (m.find()) {
|
||||
int start = parameter.indexOf(":PRESS=");
|
||||
if (start > 0) {
|
||||
parameterName = parameter.substring(0, start);
|
||||
start += ":PRESS=".length();
|
||||
levelId = Integer.parseInt(parameter.substring(start));
|
||||
}
|
||||
goodParse = true;
|
||||
}
|
||||
return goodParse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specified pressure level data if it exists. If the specified level
|
||||
* is below the declared surface pressure a null reference is returned.
|
||||
*
|
||||
* @param level
|
||||
* A pressure level to get.
|
||||
* @return The requested level, if found, null reference if not.
|
||||
*/
|
||||
private UAObsLevel getLevel(Integer level) {
|
||||
UAObsLevel retValue = null;
|
||||
if (level != null) {
|
||||
level = level * 100;
|
||||
for (UAObsLevel l : levels) {
|
||||
if (IDecoderConstants.MANPRE_LEVEL.equals(l.getVertSig())
|
||||
|| IDecoderConstants.SIGPRE_LEVEL
|
||||
.equals(l.getVertSig())) {
|
||||
|
||||
if (level.equals(l.getPressure())) {
|
||||
retValue = l;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (retValue != null) {
|
||||
UAObsLevel sfc = getSurfaceLevel();
|
||||
if (sfc != null) {
|
||||
if (LayerTools.isLowerThan(sfc, retValue)) {
|
||||
retValue = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the defined surface level. If a surface level cannot be found, then
|
||||
* return null.
|
||||
*
|
||||
* @return The surface level found, or null.
|
||||
*/
|
||||
private UAObsLevel getSurfaceLevel() {
|
||||
UAObsLevel retValue = null;
|
||||
if (levels != null) {
|
||||
for (UAObsLevel level : levels) {
|
||||
if (IDecoderConstants.SFC_LEVEL.equals(level.getVertSig())) {
|
||||
retValue = level;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return retValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getStrings(String paramName) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurfaceObsLocation getSpatialObject() {
|
||||
return location;
|
||||
|
@ -850,7 +586,6 @@ public class UAObs extends PersistablePluginDataObject implements
|
|||
return wmoHeader;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Column
|
||||
@Access(AccessType.PROPERTY)
|
||||
|
|
|
@ -21,11 +21,6 @@ package com.raytheon.uf.common.dataplugin.bufrua;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
|
@ -42,14 +37,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 20071127 382 jkorman Initial Coding.
|
||||
* 20080630 1215 jkorman Implemented Serializable.
|
||||
* 20131022 2361 njensen Remove XML annotations
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class UAObsLevel implements Serializable, ISerializableObject {
|
||||
public class UAObsLevel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -63,50 +58,41 @@ public class UAObsLevel implements Serializable, ISerializableObject {
|
|||
// 5 Significant level, temperature and/or relative humidity
|
||||
// 6 Significant level, wind
|
||||
// All 7 Missing value
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer vertSig = null;
|
||||
|
||||
// Observation pressure in Pascals
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer pressure = null;
|
||||
|
||||
// Observation geopotential height in meters.
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer geoHeight = null;
|
||||
|
||||
// Observation dry air temperature in degrees Kelvin.
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double temp = null;
|
||||
|
||||
// Observation dewpoint temperature in degrees Kelvin.
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double dwpt = null;
|
||||
|
||||
// Observation wind direction in angular degrees. Integer
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer windDirection = null;
|
||||
|
||||
// Observation wind speed in meters per second.
|
||||
// Decimal(5,2)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double windSpeed = null;
|
||||
|
||||
// Observation 1 KM below level wind shear in meters per second.
|
||||
// Decimal(5,2)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double loShear = null;
|
||||
|
||||
// Observation 1 KM above level wind shear in meters per second.
|
||||
// Decimal(5,2)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double hiShear = null;
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.gfe.config.ProjectionData
|
||||
com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID
|
||||
com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord
|
||||
com.raytheon.uf.common.dataplugin.gfe.db.objects.GridLocation
|
||||
com.raytheon.uf.common.dataplugin.gfe.db.objects.GridParmInfo
|
||||
com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID
|
||||
com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmStorageInfo
|
||||
com.raytheon.uf.common.dataplugin.gfe.server.lock.Lock
|
||||
com.raytheon.uf.common.dataplugin.gfe.GridDataHistory
|
|
@ -27,11 +27,6 @@ import javax.persistence.Embeddable;
|
|||
import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.Transient;
|
||||
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.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.geotools.coverage.grid.GeneralGridEnvelope;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
|
@ -44,9 +39,6 @@ import org.opengis.referencing.datum.PixelInCell;
|
|||
import org.opengis.referencing.operation.MathTransform;
|
||||
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.adapters.CoordAdapter;
|
||||
import com.raytheon.uf.common.serialization.adapters.PointAdapter;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -65,6 +57,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* 04/24/13 #1935 randerso Fixed date line spanning issue
|
||||
* 08/06/13 #1571 randerso Added hibernate annotations
|
||||
* Removed constructor with int for ProjectionType
|
||||
* 10/22/13 #2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -72,9 +65,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* @version 1.0
|
||||
*/
|
||||
@Embeddable
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class ProjectionData implements ISerializableObject {
|
||||
public class ProjectionData {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ProjectionData.class);
|
||||
|
||||
|
@ -101,68 +93,51 @@ public class ProjectionData implements ISerializableObject {
|
|||
};
|
||||
|
||||
@Column(length = 32, nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String projectionID;
|
||||
|
||||
@Column(length = 20, nullable = false)
|
||||
@Enumerated(EnumType.STRING)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private ProjectionType projectionType;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = CoordAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Coordinate latLonLL;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = CoordAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Coordinate latLonUR;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = CoordAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Coordinate latLonOrigin;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private double stdParallelOne;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private double stdParallelTwo;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = PointAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Point gridPointLL;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = PointAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Point gridPointUR;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private double latIntersect;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private double lonCenter;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private double lonOrigin;
|
||||
|
||||
|
|
|
@ -36,11 +36,6 @@ 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.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import jep.INumpyable;
|
||||
|
||||
|
@ -73,9 +68,6 @@ import com.raytheon.uf.common.geospatial.CRSCache;
|
|||
import com.raytheon.uf.common.geospatial.IGridGeometryProvider;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialObject;
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.adapters.CoordAdapter;
|
||||
import com.raytheon.uf.common.serialization.adapters.GeometryAdapter;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -106,6 +98,7 @@ import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
|
|||
* 08/06/13 #1571 randerso Added hibernate annotations, javadoc cleanup,
|
||||
* made init method public for use in GFEDao
|
||||
* 09/30/13 #2333 mschenke Added method to construct from {@link IGridGeometryProvider}
|
||||
* 10/22/13 #2361 njensen Remove XML annotations
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -115,10 +108,9 @@ import com.vividsolutions.jts.simplify.TopologyPreservingSimplifier;
|
|||
*/
|
||||
@Entity
|
||||
@Table(name = "gfe_gridlocation", uniqueConstraints = { @UniqueConstraint(columnNames = { "dbId_id" }) })
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class GridLocation extends PersistableDataObject<String> implements
|
||||
ISpatialObject, ISerializableObject {
|
||||
ISpatialObject {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(GridLocation.class);
|
||||
|
||||
|
@ -177,24 +169,20 @@ public class GridLocation extends PersistableDataObject<String> implements
|
|||
private DatabaseID dbId;
|
||||
|
||||
@Column(length = 8, nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String siteId;
|
||||
|
||||
/** Number of points along the x-axis */
|
||||
@Column(nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
protected Integer nx;
|
||||
|
||||
/** Number of points along the y-axis */
|
||||
@Column(nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
protected Integer ny;
|
||||
|
||||
@Column(length = 32, nullable = false)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String timeZone;
|
||||
|
||||
|
@ -202,30 +190,22 @@ public class GridLocation extends PersistableDataObject<String> implements
|
|||
private Coordinate gridCellSize;
|
||||
|
||||
@Embedded
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private ProjectionData projection;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = CoordAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Coordinate origin;
|
||||
|
||||
@Column(nullable = false)
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = CoordAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Coordinate extent;
|
||||
|
||||
@Transient
|
||||
@XmlElement
|
||||
@XmlJavaTypeAdapter(value = GeometryAdapter.class)
|
||||
@DynamicSerializeElement
|
||||
private Polygon geometry;
|
||||
|
||||
@Transient
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String crsWKT;
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ import org.hibernate.annotations.OnDeleteAction;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -67,6 +66,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
* added isValid method to match A1
|
||||
* 04/02/2013 #1774 randerso Improved error message in validCheck
|
||||
* 08/06/13 #1571 randerso Added hibernate annotations, javadoc cleanup
|
||||
* 10/22/2013 #2361 njensen Remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -76,9 +76,11 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
|
||||
@Embeddable
|
||||
@DynamicSerialize
|
||||
public class GridParmInfo implements Cloneable, ISerializableObject {
|
||||
public class GridParmInfo implements Cloneable {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(GridParmInfo.class);
|
||||
|
||||
static {
|
||||
// TODO: is this the right place for these?
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ import javax.persistence.SequenceGenerator;
|
|||
import javax.persistence.Table;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
/**
|
||||
* Derived class that consolidates storage info for a Parm.
|
||||
*
|
||||
|
@ -44,6 +42,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
* 08/05/2013 #1571 randerso Moved to com.raytheon.uf.common.dataplugin
|
||||
* Added GridParmInfo as a field.
|
||||
* Added hibernate annotations
|
||||
* 10/22/2013 #2361 njensen Remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -53,7 +52,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
|
||||
@Entity
|
||||
@Table(name = "gfe_parminfo", uniqueConstraints = { @UniqueConstraint(columnNames = { "parmId_id" }) })
|
||||
public class ParmStorageInfo implements ISerializableObject {
|
||||
public class ParmStorageInfo {
|
||||
|
||||
/**
|
||||
* Auto-generated surrogate key
|
||||
|
|
|
@ -27,7 +27,6 @@ import javax.persistence.Column;
|
|||
import javax.persistence.Embeddable;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.serialize.TimeConstraintsAdapter;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdapter;
|
||||
|
@ -47,6 +46,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
* 03/20/2013 #1774 randerso Added isValid method, use TimeUtil constants,
|
||||
* added serialization adapter, removed setters.
|
||||
* 08/06/13 #1571 randerso Added hibernate annotations, javadoc cleanup
|
||||
* 10/22/2013 #2361 njensen Remove ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -57,7 +57,8 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
@Embeddable
|
||||
@DynamicSerialize
|
||||
@DynamicSerializeTypeAdapter(factory = TimeConstraintsAdapter.class)
|
||||
public class TimeConstraints implements ISerializableObject {
|
||||
public class TimeConstraints {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TimeConstraints.class);
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.goessounding.GOESSounding
|
||||
com.raytheon.uf.common.dataplugin.goessounding.GOESSoundingLevel
|
|
@ -22,11 +22,7 @@ package com.raytheon.uf.common.dataplugin.goessounding;
|
|||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
|
@ -37,7 +33,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 20080414 1077 jkorman Initial implementation.
|
||||
* 20080414 1077 jkorman Initial implementation.'
|
||||
* 20132022 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -45,28 +42,23 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class GOESSoundingLevel implements Serializable, ISerializableObject {
|
||||
public class GOESSoundingLevel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer pressure;
|
||||
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double temperature;
|
||||
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double dewpoint;
|
||||
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer height;
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.poessounding.POESSounding
|
||||
com.raytheon.uf.common.dataplugin.poessounding.POESSoundingLevel
|
|
@ -21,11 +21,6 @@ package com.raytheon.uf.common.dataplugin.poessounding;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
|
@ -37,6 +32,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 20080303 1026 jkorman Initial implementation.
|
||||
* 20131022 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,20 +40,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class POESSoundingLevel implements Serializable, ISerializableObject {
|
||||
public class POESSoundingLevel implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Integer pressure;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double temperature;
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Double mixingRatio;
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.tcs.TropicalCycloneSummary
|
|
@ -31,14 +31,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.dataplugin.persist.PersistablePluginDataObject;
|
||||
|
@ -65,6 +60,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -80,8 +76,6 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
*/
|
||||
@org.hibernate.annotations.Table(appliesTo = "tcs", indexes = { @Index(name = "tcs_refTimeIndex", columnNames = {
|
||||
"refTime", "forecastTime" }) })
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class TropicalCycloneSummary extends PersistablePluginDataObject
|
||||
implements ISpatialEnabled, IPointData {
|
||||
|
@ -94,11 +88,9 @@ public class TropicalCycloneSummary extends PersistablePluginDataObject
|
|||
|
||||
// Text of the WMO header
|
||||
@Transient
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String wmoHeader = "";
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Column
|
||||
@DataURI(position = 1)
|
||||
|
@ -106,36 +98,29 @@ public class TropicalCycloneSummary extends PersistablePluginDataObject
|
|||
|
||||
@Embedded
|
||||
@DataURI(position = 2, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
protected String name;
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private boolean tropical;
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private String displayTime;
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int pressure;
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
protected int windSpeed;
|
||||
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
protected ArrayList<Radius> radiusList;
|
||||
|
@ -199,11 +184,6 @@ public class TropicalCycloneSummary extends PersistablePluginDataObject
|
|||
identifier = dataURI;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDecoderGettable getDecoderGettable() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurfaceObsLocation getSpatialObject() {
|
||||
return location;
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.vaa.VAARecord
|
||||
com.raytheon.uf.common.dataplugin.vaa.VAASubPart
|
||||
com.raytheon.uf.common.dataplugin.vaa.VAALocation
|
|
@ -28,16 +28,12 @@ import javax.persistence.Id;
|
|||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Location for a VAARecord
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -46,6 +42,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 17, 2009 jkorman Initial creation
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -53,10 +50,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* @version 1.0
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="vaa_location")
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@Table(name = "vaa_location")
|
||||
@DynamicSerialize
|
||||
public class VAALocation implements Serializable, ISerializableObject {
|
||||
public class VAALocation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -66,26 +62,22 @@ public class VAALocation implements Serializable, ISerializableObject {
|
|||
|
||||
//
|
||||
@ManyToOne
|
||||
@JoinColumn(name="parentId", nullable=false)
|
||||
@JoinColumn(name = "parentId", nullable = false)
|
||||
private VAASubPart parentId;
|
||||
|
||||
|
||||
// Point latitude
|
||||
@Column
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private double latitude;
|
||||
|
||||
// Point longitude
|
||||
@Column
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private double longitude;
|
||||
|
||||
// Position index. These points are kept in a set. Order
|
||||
// is not preserved.
|
||||
@Column
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private Integer index;
|
||||
|
||||
|
@ -102,7 +94,7 @@ public class VAALocation implements Serializable, ISerializableObject {
|
|||
* @param lon
|
||||
* @param index
|
||||
*/
|
||||
public VAALocation(double lat, double lon,int index, VAASubPart parent) {
|
||||
public VAALocation(double lat, double lon, int index, VAASubPart parent) {
|
||||
latitude = lat;
|
||||
longitude = lon;
|
||||
this.index = index;
|
||||
|
@ -120,6 +112,7 @@ public class VAALocation implements Serializable, ISerializableObject {
|
|||
|
||||
/**
|
||||
* Set the record id.
|
||||
*
|
||||
* @param record
|
||||
*/
|
||||
public void setRecordId(Integer recordId) {
|
||||
|
@ -134,7 +127,8 @@ public class VAALocation implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param parentID the parentID to set
|
||||
* @param parentID
|
||||
* the parentID to set
|
||||
*/
|
||||
public void setParentId(VAASubPart parent) {
|
||||
this.parentId = parent;
|
||||
|
@ -148,7 +142,8 @@ public class VAALocation implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param latitude the latitude to set
|
||||
* @param latitude
|
||||
* the latitude to set
|
||||
*/
|
||||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
|
@ -162,7 +157,8 @@ public class VAALocation implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param longitude the longitude to set
|
||||
* @param longitude
|
||||
* the longitude to set
|
||||
*/
|
||||
public void setLongitude(double longitude) {
|
||||
this.longitude = longitude;
|
||||
|
@ -176,7 +172,8 @@ public class VAALocation implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param index the index to set
|
||||
* @param index
|
||||
* the index to set
|
||||
*/
|
||||
public void setIndex(Integer index) {
|
||||
this.index = index;
|
||||
|
|
|
@ -33,14 +33,9 @@ import javax.persistence.OneToMany;
|
|||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
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;
|
||||
|
@ -50,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
/**
|
||||
*
|
||||
* Record for Volcanic Ash Advisory
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -64,8 +59,8 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
*
|
||||
* PluginDataObject.
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -82,8 +77,6 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
*/
|
||||
@org.hibernate.annotations.Table(appliesTo = "vaa", indexes = { @Index(name = "vaa_refTimeIndex", columnNames = {
|
||||
"refTime", "forecastTime" }) })
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
||||
|
||||
|
@ -91,7 +84,6 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
|
||||
@Embedded
|
||||
@DataURI(position = 1, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
|
@ -100,7 +92,6 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
*/
|
||||
@Column(length = 8)
|
||||
@DataURI(position = 2)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String recordType;
|
||||
|
||||
|
@ -109,19 +100,16 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
*/
|
||||
@Column(length = 16)
|
||||
@DataURI(position = 3)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String advisoryNumber;
|
||||
|
||||
// Correction indicator from wmo header
|
||||
@DataURI(position = 4)
|
||||
@Column(length = 8)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String corIndicator;
|
||||
|
||||
@Column(length = 32)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String centerId;
|
||||
|
||||
|
@ -129,7 +117,6 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
*
|
||||
*/
|
||||
@Column(length = 2048)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String message;
|
||||
|
||||
|
@ -137,7 +124,6 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
*
|
||||
*/
|
||||
@Column(length = 512)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String anal00Hr;
|
||||
|
||||
|
@ -145,7 +131,6 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
*
|
||||
*/
|
||||
@Column(length = 512)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String fcst06Hr;
|
||||
|
||||
|
@ -153,7 +138,6 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
*
|
||||
*/
|
||||
@Column(length = 512)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String fcst12Hr;
|
||||
|
||||
|
@ -161,18 +145,15 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
*
|
||||
*/
|
||||
@Column(length = 512)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String fcst18Hr;
|
||||
|
||||
// Text of the WMO header
|
||||
@Column(length = 64)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String wmoHeader = "";
|
||||
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentId", fetch = FetchType.EAGER)
|
||||
private Set<VAASubPart> subParts = new HashSet<VAASubPart>();
|
||||
|
||||
|
@ -236,11 +217,6 @@ public class VAARecord extends PluginDataObject implements ISpatialEnabled {
|
|||
this.wmoHeader = wmoHeader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDecoderGettable getDecoderGettable() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurfaceObsLocation getSpatialObject() {
|
||||
return location;
|
||||
|
|
|
@ -33,16 +33,12 @@ import javax.persistence.JoinColumn;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* SubPart of a VAARecord
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -51,6 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 17, 2009 jkorman Initial creation
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,10 +55,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* @version 1.0
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="vaa_subpart")
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@Table(name = "vaa_subpart")
|
||||
@DynamicSerialize
|
||||
public class VAASubPart implements Serializable, ISerializableObject {
|
||||
public class VAASubPart implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -71,22 +67,18 @@ public class VAASubPart implements Serializable, ISerializableObject {
|
|||
|
||||
// The record this object belongs to
|
||||
@ManyToOne
|
||||
@JoinColumn(name="parentId", nullable=false)
|
||||
@JoinColumn(name = "parentId", nullable = false)
|
||||
private VAARecord parentId;
|
||||
|
||||
@Column(length = 32)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String subText;
|
||||
|
||||
/**
|
||||
* Shape of ash area
|
||||
* "LINE" :
|
||||
* "AREA"
|
||||
* Shape of ash area "LINE" : "AREA"
|
||||
*
|
||||
*/
|
||||
@Column(length = 8)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String shapeType;
|
||||
|
||||
|
@ -94,11 +86,9 @@ public class VAASubPart implements Serializable, ISerializableObject {
|
|||
* Vertex locations
|
||||
*/
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parentId", fetch = FetchType.EAGER)
|
||||
private Set<VAALocation> locations = new HashSet<VAALocation>();
|
||||
|
||||
|
||||
/**
|
||||
* @return the parentID
|
||||
*/
|
||||
|
@ -107,7 +97,8 @@ public class VAASubPart implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param parentID the parentID to set
|
||||
* @param parentID
|
||||
* the parentID to set
|
||||
*/
|
||||
public void setParentId(VAARecord parentID) {
|
||||
this.parentId = parentID;
|
||||
|
@ -124,6 +115,7 @@ public class VAASubPart implements Serializable, ISerializableObject {
|
|||
|
||||
/**
|
||||
* Set the record id.
|
||||
*
|
||||
* @param record
|
||||
*/
|
||||
public void setRecordId(Integer recordId) {
|
||||
|
@ -138,7 +130,8 @@ public class VAASubPart implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param subText the subText to set
|
||||
* @param subText
|
||||
* the subText to set
|
||||
*/
|
||||
public void setSubText(String subText) {
|
||||
this.subText = subText;
|
||||
|
@ -152,17 +145,18 @@ public class VAASubPart implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param shapeType the shapeType to set
|
||||
* @param shapeType
|
||||
* the shapeType to set
|
||||
*/
|
||||
public void setShapeType(String shapeType) {
|
||||
this.shapeType = shapeType;
|
||||
}
|
||||
|
||||
public void addVertex(double lat, double lon, int index) {
|
||||
if(locations == null) {
|
||||
if (locations == null) {
|
||||
locations = new HashSet<VAALocation>();
|
||||
}
|
||||
locations.add(new VAALocation(lat,lon,index,this));
|
||||
locations.add(new VAALocation(lat, lon, index, this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -173,10 +167,11 @@ public class VAASubPart implements Serializable, ISerializableObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param locations the locations to set
|
||||
* @param locations
|
||||
* the locations to set
|
||||
*/
|
||||
public void setLocations(Set<VAALocation> locations) {
|
||||
for(VAALocation loc : locations) {
|
||||
for (VAALocation loc : locations) {
|
||||
loc.setParentId(this);
|
||||
}
|
||||
this.locations = locations;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord
|
||||
com.raytheon.uf.common.dataplugin.warning.WarningRecord
|
||||
com.raytheon.uf.common.dataplugin.warning.PracticeWarningRecord
|
||||
com.raytheon.uf.common.dataplugin.warning.config.WarngenConfiguration
|
||||
com.raytheon.uf.common.dataplugin.warning.config.DialogConfiguration
|
||||
com.raytheon.uf.common.dataplugin.warning.gis.GeospatialMetadata
|
||||
com.raytheon.uf.common.dataplugin.warning.gis.GeospatialTime
|
||||
com.raytheon.uf.common.dataplugin.warning.gis.GeospatialTimeSet
|
|
@ -10,12 +10,33 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.FileUtil;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* Configuration for warngen dialog
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* --/--/---- Initial creation
|
||||
* 10/22/2013 2361 njensen Use JAXBManager for XML
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlRootElement(name = "configuration")
|
||||
public class DialogConfiguration implements ISerializableObject {
|
||||
public class DialogConfiguration {
|
||||
|
||||
private static final SingleTypeJAXBManager<DialogConfiguration> jaxb = SingleTypeJAXBManager
|
||||
.createWithoutException(DialogConfiguration.class);
|
||||
|
||||
@XmlElement
|
||||
private String warngenOfficeShort;
|
||||
|
||||
|
@ -46,7 +67,7 @@ public class DialogConfiguration implements ISerializableObject {
|
|||
public static DialogConfiguration loadDialogConfig(String localSite)
|
||||
throws FileNotFoundException, IOException, JAXBException {
|
||||
String xml = FileUtil.open("config.xml", localSite);
|
||||
return (DialogConfiguration) SerializationUtil.unmarshalFromXml(xml);
|
||||
return (DialogConfiguration) jaxb.unmarshalFromXml(xml);
|
||||
}
|
||||
|
||||
public String getWarngenOfficeShort() {
|
||||
|
|
|
@ -41,8 +41,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction;
|
||||
import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration.AreaType;
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.FileUtil;
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -60,6 +59,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
* Aug 26, 2008 #1502 bclement Added JAXB annotations
|
||||
* May 26, 2010 #4649 Qinglu Lin Made including TO.A and SV.A mandatory
|
||||
* Apr 24, 2013 1943 jsanchez Marked areaConfig as Deprecated.
|
||||
* Oct 22, 2013 2361 njensen Removed ISerializableObject
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,11 +68,15 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlRootElement(name = "warngenConfig")
|
||||
public class WarngenConfiguration implements ISerializableObject {
|
||||
public class WarngenConfiguration {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(WarngenConfiguration.class);
|
||||
|
||||
private static Pattern p = Pattern
|
||||
private static final SingleTypeJAXBManager<WarngenConfiguration> jaxb = SingleTypeJAXBManager
|
||||
.createWithoutException(WarngenConfiguration.class);
|
||||
|
||||
private static final Pattern p = Pattern
|
||||
.compile("<\\s{0,}include\\s{1,}file\\s{0,}=\\s{0,}\"(.*)\"\\s{0,}/>");
|
||||
|
||||
@XmlElement
|
||||
|
@ -178,7 +182,7 @@ public class WarngenConfiguration implements ISerializableObject {
|
|||
+ " in template " + templateName, e);
|
||||
}
|
||||
|
||||
config = (WarngenConfiguration) SerializationUtil.unmarshalFromXml(xml);
|
||||
config = (WarngenConfiguration) jaxb.unmarshalFromXml(xml);
|
||||
|
||||
// Sets the lists of bullets and dam bullets
|
||||
if (config.getBulletActionGroups() != null) {
|
||||
|
@ -204,7 +208,8 @@ public class WarngenConfiguration implements ISerializableObject {
|
|||
}
|
||||
|
||||
// AreaConfiguration is deprecated. This is only meant for backwards
|
||||
// compatibility while areaConfig is phased out with updated templates from the template team.
|
||||
// compatibility while areaConfig is phased out with updated templates
|
||||
// from the template team.
|
||||
if (config.getAreaConfig() != null) {
|
||||
ArrayList<AreaSourceConfiguration> areaSources = null;
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import com.raytheon.uf.common.localization.PathManagerFactory;
|
|||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
|
||||
import com.raytheon.uf.common.serialization.comm.RequestRouter;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -45,7 +46,8 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Retrieves geospatial data from disk if present, otherwise forwards request to
|
||||
* maps database
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -60,6 +62,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
|
|||
* So, do not add the returned value of getFeAreaField()
|
||||
* to areaFields.
|
||||
* Jan 9, 2013 15600 Qinglu Lin Execute "timezones = myTimeZones;" even if timezones != null.
|
||||
* Oct 22, 2013 2361 njensen Use JAXBManager for XML
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,6 +71,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
|
|||
*/
|
||||
|
||||
public class GeospatialFactory {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(GeospatialFactory.class);
|
||||
|
||||
|
@ -77,6 +81,9 @@ public class GeospatialFactory {
|
|||
|
||||
private static GeospatialData[] timezones;
|
||||
|
||||
private static SingleTypeJAXBManager<GeospatialTimeSet> jaxb = SingleTypeJAXBManager
|
||||
.createWithoutException(GeospatialTimeSet.class);
|
||||
|
||||
public static GeospatialData[] getGeoSpatialList(String site,
|
||||
GeospatialMetadata metaData) throws SpatialException {
|
||||
Map<GeospatialMetadata, GeospatialTime> lastRunTimeMap = loadLastRunGeoTimeSet(site);
|
||||
|
@ -171,9 +178,7 @@ public class GeospatialFactory {
|
|||
METADATA_FILE);
|
||||
if (lf.exists()) {
|
||||
try {
|
||||
rval = ((GeospatialTimeSet) SerializationUtil
|
||||
.jaxbUnmarshalFromInputStream(lf.openInputStream()))
|
||||
.getDataAsMap();
|
||||
rval = jaxb.unmarshalFromXmlFile(lf.getFile()).getDataAsMap();
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.WARN,
|
||||
|
@ -248,8 +253,8 @@ public class GeospatialFactory {
|
|||
|
||||
if (lf.exists()) {
|
||||
byte[] data = lf.read();
|
||||
return (GeospatialDataSet) SerializationUtil
|
||||
.transformFromThrift(data);
|
||||
return SerializationUtil.transformFromThrift(
|
||||
GeospatialDataSet.class, data);
|
||||
} else {
|
||||
System.out.println("Attempted to load: " + lf.getName()
|
||||
+ " for site " + site + ", but file does not exist.");
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Geospatial data for a warngen configuration
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -48,6 +48,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class GeospatialMetadata {
|
||||
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String areaSource;
|
||||
|
|
|
@ -25,7 +25,8 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Wrapper for GeospatialConfiguration representing last time a the geometry
|
||||
* data was created for a warngen configuration
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
|
|
@ -29,7 +29,8 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Collection of GeospatialTime representing a set of generated geospatial data
|
||||
* for warngen configurations
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
com.raytheon.uf.common.gridcoverage.LatLonGridCoverage
|
||||
com.raytheon.uf.common.gridcoverage.MercatorGridCoverage
|
||||
com.raytheon.uf.common.gridcoverage.PolarStereoGridCoverage
|
||||
com.raytheon.uf.common.gridcoverage.LambertConformalGridCoverage
|
||||
com.raytheon.uf.common.gridcoverage.StereographicGridCoverage
|
|
@ -1,2 +0,0 @@
|
|||
com.raytheon.uf.edex.plugin.mesowest.common.MESOWestRecord
|
||||
com.raytheon.uf.edex.plugin.mesowest.MESOWestFilter
|
|
@ -24,10 +24,6 @@ import static com.raytheon.uf.common.localization.LocalizationContext.Localizati
|
|||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.JAXBContext;
|
||||
|
@ -45,14 +41,15 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
|||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.serialization.JAXBManager;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.edex.decodertools.core.filterimpl.AbstractFilterElement;
|
||||
import com.raytheon.uf.edex.decodertools.core.filterimpl.AbstractObsFilter;
|
||||
import com.raytheon.uf.edex.decodertools.core.filterimpl.PluginDataObjectFilter;
|
||||
import com.raytheon.uf.edex.decodertools.core.filterimpl.RectFilterElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* A filter for mesowest data that is configured through XML.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -61,6 +58,8 @@ import com.raytheon.uf.edex.decodertools.core.filterimpl.RectFilterElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 23, 2009 jkorman Initial creation
|
||||
* Oct 22, 2013 2361 njensen Use JAXBManager for XML
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -88,22 +87,14 @@ public class MESOWestFilter extends AbstractObsFilter {
|
|||
|
||||
File siteDir = manager.getFile(siteContext, "");
|
||||
if (siteDir.exists()) {
|
||||
File srcFile = new File(siteDir, FILTER_CONFIG);
|
||||
|
||||
byte[] data = new byte[(int) srcFile.length()];
|
||||
|
||||
InputStream stream = getInputStream(srcFile);
|
||||
try {
|
||||
stream.read(data);
|
||||
stream.close();
|
||||
|
||||
AbstractObsFilter filter = (AbstractObsFilter) SerializationUtil
|
||||
.unmarshalFromXml(new String(data));
|
||||
|
||||
setFilterElements(filter.getFilterElements());
|
||||
setFilterName(filter.getFilterName());
|
||||
} catch (IOException e) {
|
||||
logger.error("Unable to read filter config", e);
|
||||
File srcFile = new File(siteDir, FILTER_CONFIG);
|
||||
JAXBManager jaxb = new JAXBManager(MESOWestFilter.class,
|
||||
PluginDataObjectFilter.class);
|
||||
AbstractObsFilter filter = jaxb.unmarshalFromXmlFile(
|
||||
AbstractObsFilter.class, srcFile);
|
||||
this.setFilterElements(filter.getFilterElements());
|
||||
this.setFilterName(filter.getFilterName());
|
||||
} catch (JAXBException e) {
|
||||
logger.error("Unable to unmarshall filter config", e);
|
||||
}
|
||||
|
@ -218,20 +209,4 @@ public class MESOWestFilter extends AbstractObsFilter {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
private static FileInputStream getInputStream(File file) {
|
||||
FileInputStream fis = null;
|
||||
|
||||
try {
|
||||
fis = new FileInputStream(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return fis;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,11 +39,6 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
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;
|
||||
|
@ -55,7 +50,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
/**
|
||||
*
|
||||
* Record for mesowest data
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -68,6 +63,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||
* PluginDataObject.
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Oct 22, 2013 2361 njensen Remove XML annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -77,8 +73,6 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@Entity
|
||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "mesowestseq")
|
||||
@Table(name = "mesowest", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class MESOWestRecord extends PluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable {
|
||||
|
@ -117,152 +111,127 @@ public class MESOWestRecord extends PluginDataObject implements
|
|||
}
|
||||
|
||||
@DataURI(position = 1)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private String networkType;
|
||||
|
||||
// Time of the observation.
|
||||
@DataURI(position = 2)
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Calendar timeObs;
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 3, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
// Observation air temperature in degrees Kelvin.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double temp;
|
||||
|
||||
// Observation dewpoint temperature in degrees Kelvin.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double dwpt;
|
||||
|
||||
// 24 Hour maximum temperature in degrees Kelvin.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double maxT24;
|
||||
|
||||
// 24 Hour minimum temperature in degrees Kelvin.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double minT24;
|
||||
|
||||
// Relative Humidity in percent.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double humidity;
|
||||
|
||||
// Observation wind direction in angular degrees. Integer
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double windDirection;
|
||||
|
||||
// Observation wind speed in meters per second.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double windSpeed;
|
||||
|
||||
// Observation wind gust in meters per second.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double windGust;
|
||||
|
||||
// Observation pressure in Pa.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double pressure;
|
||||
|
||||
// Observation pressure in Pa.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double seaLevelPressure;
|
||||
|
||||
// Observation pressure in Pa.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double altimeter;
|
||||
|
||||
// Observation precip in mm.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip;
|
||||
|
||||
// 1 minute precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_01M;
|
||||
|
||||
// 5 minute precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_05M;
|
||||
|
||||
// 10 minute precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_10M;
|
||||
|
||||
// 15 minute precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_15M;
|
||||
|
||||
// 30 minute precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_30M;
|
||||
|
||||
// 1 hour precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_01H;
|
||||
|
||||
// 3 hour precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_03H;
|
||||
|
||||
// 6 hour precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_06H;
|
||||
|
||||
// 24 hour precip in inches.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double precip_24H;
|
||||
|
||||
// Raw observation text
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String obsText;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue