Merge "Issue #2537 Use PointDataAccessFactory for multiple point data types. Change-Id: I655091f116cde662933ed96d926372a14a435dfc" into development

Former-commit-id: 648e5bff2e85d00cf5bcee923f2a137aa76117fc
This commit is contained in:
Nate Jensen 2013-12-05 12:59:58 -06:00 committed by Gerrit Code Review
commit ae0bd2a86f
54 changed files with 480 additions and 740 deletions

View file

@ -34,13 +34,13 @@
download-size="0" download-size="0"
install-size="0" install-size="0"
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="true"/>
<plugin <plugin
id="com.raytheon.uf.common.dataplugin.sfcobs" id="com.raytheon.uf.common.dataplugin.sfcobs"
download-size="0" download-size="0"
install-size="0" install-size="0"
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="true"/>
</feature> </feature>

View file

@ -147,7 +147,7 @@
download-size="0" download-size="0"
install-size="0" install-size="0"
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="true"/>
<plugin <plugin
id="com.raytheon.uf.common.dataplugin.qc" id="com.raytheon.uf.common.dataplugin.qc"

View file

@ -0,0 +1,41 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="bufrmosDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosAVN"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosETA"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosGFS"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosHPC"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosLAMP"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosMRF"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="bufrmosNGM"/>
<constructor-arg ref="bufrmosDataAccessFactory"/>
</bean>
</beans>

View file

@ -2,37 +2,26 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: Modelsounding Plug-in Bundle-Name: Modelsounding Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.modelsounding Bundle-SymbolicName: com.raytheon.edex.plugin.modelsounding
Bundle-Version: 1.13.0.qualifier Bundle-Version: 1.13.1.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Vendor: RAYTHEON Bundle-Vendor: RAYTHEON
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Require-Bundle: com.raytheon.uf.edex.core,
com.raytheon.uf.edex.database,
com.raytheon.uf.edex.pointdata,
com.raytheon.uf.edex.decodertools,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.status,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.site
Import-Package: com.raytheon.edex.esb,
com.raytheon.edex.plugin
Export-Package: com.raytheon.edex.plugin.modelsounding, Export-Package: com.raytheon.edex.plugin.modelsounding,
com.raytheon.edex.plugin.modelsounding.common, com.raytheon.edex.plugin.modelsounding.common,
com.raytheon.edex.plugin.modelsounding.dao, com.raytheon.edex.plugin.modelsounding.dao,
com.raytheon.edex.plugin.modelsounding.decoder com.raytheon.edex.plugin.modelsounding.decoder
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
com.google.guava;bundle-version="1.0.0",
javax.measure,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.dataaccess,
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.status;bundle-version="1.12.1174",
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
com.raytheon.uf.common.site;bundle-version="1.12.1174",
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
com.raytheon.uf.edex.database;bundle-version="1.0.0",
com.raytheon.uf.edex.pointdata;bundle-version="1.12.1174",
com.raytheon.uf.edex.decodertools;bundle-version="1.12.1174",
javax.persistence;bundle-version="1.0.0",
org.hibernate;bundle-version="1.0.0",
org.springframework;bundle-version="3.1.4"
Import-Package: com.raytheon.edex.esb,
com.raytheon.edex.exception,
com.raytheon.edex.plugin,
org.apache.commons.logging

View file

@ -1,3 +1 @@
com.raytheon.edex.plugin.modelsounding.common.SoundingSite com.raytheon.edex.plugin.modelsounding.common.SoundingSite
com.raytheon.edex.plugin.modelsounding.common.SoundingLevel
com.raytheon.edex.plugin.modelsounding.common.SoilLevel

View file

@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="mdlsndDataAccessFactory" class="com.raytheon.edex.plugin.modelsounding.dataaccess.PointDataAccessFactory" /> <bean id="mdlsndDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register"> <bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="modelsounding"/> <constructor-arg value="modelsounding"/>

View file

@ -28,12 +28,10 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import com.raytheon.edex.esb.Headers; import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder; import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite; import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter; import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription; import com.raytheon.uf.common.pointdata.PointDataDescription;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
@ -57,26 +55,28 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Mar 03, 2008 1026 jkorman Initial implementation. * Mar 03, 2008 1026 jkorman Initial implementation.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data. * Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Nov 25, 2008 1684 chammack Camel Refactor * Nov 25, 2008 1684 chammack Camel Refactor
* Apr 29, 2013 1861 bkowal Create a separate Point Data Container * Apr 29, 2013 1861 bkowal Create a separate Point Data Container
* for every record so each forecast hour * for every record so each forecast hour
* will receive a unique hdf5 file. * will receive a unique hdf5 file.
* Jul 03, 2013 2161 bkowal Store and retrieve the Point Data * Jul 03, 2013 2161 bkowal Store and retrieve the Point Data
* Containers by forecast hour and reftime * Containers by forecast hour and reftime
* when completing a decode operation. * when completing a decode operation.
* Overrode default Point Data Container * Overrode default Point Data Container
* size. * size.
* Jul 16, 2013 2161 bkowal Store the records in a container that * Jul 16, 2013 2161 bkowal Store the records in a container that
* will be persisted every X (configurable) * will be persisted every X (configurable)
* seconds by a timer. The timer is started * seconds by a timer. The timer is started
* during spring initialization and * during spring initialization and
* destroyed during spring container * destroyed during spring container
* destruction. * destruction.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 02, 2013 2537 bsteffen Remove dead/deprecated code.
*
* *
* </pre> * </pre>
* *
@ -140,8 +140,7 @@ public class ModelSoundingDecoder extends AbstractDecoder implements
* @return A single decoded observation. May return null if the observation * @return A single decoded observation. May return null if the observation
* is a duplicate in the database or is invalid. * is a duplicate in the database or is invalid.
*/ */
public PluginDataObject[] decode(byte[] data, Headers headers) public PluginDataObject[] decode(byte[] data, Headers headers) {
throws DecoderException {
String traceId = ""; String traceId = "";
if (headers != null) { if (headers != null) {
traceId = (String) headers.get("traceId"); traceId = (String) headers.get("traceId");
@ -222,12 +221,6 @@ public class ModelSoundingDecoder extends AbstractDecoder implements
soundingTemporalData); soundingTemporalData);
if (soundingData != null) { if (soundingData != null) {
soundingData.setTraceId(traceId); soundingData.setTraceId(traceId);
try {
soundingData.constructDataURI();
} catch (PluginException e) {
logger.error(traceId
+ "- Unable to construct dataURI", e);
}
String uri = soundingData.getDataURI(); String uri = soundingData.getDataURI();
if (dataSet.add(uri)) { if (dataSet.add(uri)) {
container.addPdo(soundingData); container.addPdo(soundingData);

View file

@ -22,15 +22,14 @@ package com.raytheon.edex.plugin.modelsounding;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.esb.Headers; import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.plugin.AbstractRecordSeparator; import com.raytheon.edex.plugin.AbstractRecordSeparator;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder; import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder;
/** /**
* The ProfilerSeparator takes a potential weather message and attempts to * The ModelSoundingSeparator takes a potential weather message and attempts to
* determine the WMO header and data type of the enclosed data. Normal usage is * determine the WMO header and data type of the enclosed data. Normal usage is
* to create an instance and set the message data using the setData method. When * to create an instance and set the message data using the setData method. When
* complete the separator contains the WMO header, and all of the data decoded. * complete the separator contains the WMO header, and all of the data decoded.
@ -39,9 +38,10 @@ import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation. * Mar 03, 2008 1026 jkorman Initial implementation.
* Dec 02, 2013 2537 bsteffen Switch logger to ufstatus.
* *
* </pre> * </pre>
* *
@ -50,7 +50,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder;
*/ */
public class ModelSoundingSeparator extends AbstractRecordSeparator { public class ModelSoundingSeparator extends AbstractRecordSeparator {
private Log logger = LogFactory.getLog(getClass()); private static final IUFStatusHandler logger = UFStatus
.getHandler(ModelSoundingSeparator.class);
// List of report start locations. // List of report start locations.
private List<Integer> reportLocations = null; private List<Integer> reportLocations = null;

View file

@ -25,18 +25,18 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/** /**
* ProfilerLevel contains the data for a single vertical level observation. * SoilLevel contains the data for a single soil level forecast.
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation. * Mar 03, 2008 1026 jkorman Initial implementation.
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class SoilLevel implements Serializable, ISerializableObject { public class SoilLevel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -25,18 +25,18 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/** /**
* ProfilerLevel contains the data for a single vertical level observation. * SoundingLevel contains the data for a single vertical level forecast.
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation. * Mar 03, 2008 1026 jkorman Initial implementation.
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class SoundingLevel implements Serializable, ISerializableObject { public class SoundingLevel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -20,7 +20,6 @@
package com.raytheon.edex.plugin.modelsounding.common; package com.raytheon.edex.plugin.modelsounding.common;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index; import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.persist.IPersistable; import com.raytheon.uf.common.dataplugin.persist.IPersistable;
@ -54,21 +52,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.Geometry;
/** /**
* The ProfilerObs class encapsulates the location and time information for a * The SoundingSite class encapsulates the location and time information for a
* profiler observation as well as providing a container for the vertical level * model sounding forecast as well as providing a container for the vertical
* data above the location. * level data above the location.
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Mar 03, 2008 1026 jkorman Initial implementation. * Mar 03, 2008 1026 jkorman Initial implementation.
* Apr 04, 2013 1846 bkowal Added an index on refTime and * Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime * forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from * May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject. * PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 02, 2013 2537 bsteffen Remove IDecoderGettable
* *
* </pre> * </pre>
* *
@ -88,7 +87,7 @@ import com.vividsolutions.jts.geom.Geometry;
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement @XmlRootElement
public class SoundingSite extends PersistablePluginDataObject implements public class SoundingSite extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { ISpatialEnabled, IPointData, IPersistable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -828,17 +827,6 @@ public class SoundingSite extends PersistablePluginDataObject implements
this.snowWaterEquiv = snowWaterEquiv; this.snowWaterEquiv = snowWaterEquiv;
} }
/**
* Get the IDecoderGettable interface implementation. This class does not
* currently support this interface.
*
* @return Returns null.
*/
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override @Override
public SurfaceObsLocation getSpatialObject() { public SurfaceObsLocation getSpatialObject() {
return location; return location;
@ -852,58 +840,6 @@ public class SoundingSite extends PersistablePluginDataObject implements
this.location = location; this.location = location;
} }
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getString(java.lang
* .String)
*/
@Override
public String getString(String paramName) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getStrings(java.lang
* .String)
*/
@Override
public String[] getStrings(String paramName) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getValue(java.lang
* .String)
*/
@Override
public Amount getValue(String paramName) {
// TODO Auto-generated method stub
return null;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.dataplugin.IDecoderGettable#getValues(java.lang
* .String)
*/
@Override
public Collection<Amount> getValues(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override @Override
public PointDataView getPointDataView() { public PointDataView getPointDataView() {
return this.pointDataView; return this.pointDataView;

View file

@ -25,9 +25,6 @@ import java.io.File;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.plugin.modelsounding.SoundingModelTemporalData; import com.raytheon.edex.plugin.modelsounding.SoundingModelTemporalData;
import com.raytheon.edex.plugin.modelsounding.common.SoundingModels; import com.raytheon.edex.plugin.modelsounding.common.SoundingModels;
import com.raytheon.edex.plugin.modelsounding.common.SoundingSite; import com.raytheon.edex.plugin.modelsounding.common.SoundingSite;
@ -42,6 +39,8 @@ import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription.Type; import com.raytheon.uf.common.pointdata.PointDataDescription.Type;
import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.descriptors.BUFRDescriptor; import com.raytheon.uf.edex.decodertools.bufr.descriptors.BUFRDescriptor;
@ -56,13 +55,14 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Mar 17, 2008 1026 jkorman Initial implementation. * Mar 17, 2008 1026 jkorman Initial implementation.
* May 09, 2013 1869 bsteffen Modified D2D time series of point data to * May 09, 2013 1869 bsteffen Modified D2D time series of point data to
* work without dataURI. * work without dataURI.
* 20130703 2161 bkowal Relocated the logic used to retrieve * Jul 03, 2013 2161 bkowal Relocated the logic used to retrieve
* temporal information into its own function. * temporal information into its own function.
* Dec 02, 2013 2537 bsteffen Switch logger to ufstatus.
* *
* </pre> * </pre>
* *
@ -71,8 +71,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*/ */
public class ModelSoundingDataAdapter { public class ModelSoundingDataAdapter {
private static Log logger = LogFactory private static final IUFStatusHandler logger = UFStatus
.getLog(ModelSoundingDataAdapter.class); .getHandler(ModelSoundingDataAdapter.class);
private static final Object LOCK = new Object(); private static final Object LOCK = new Object();

View file

@ -31,24 +31,24 @@ import java.io.InputStreamReader;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
/** /**
* * Loads a map from a file for mapping wmo numbers to icaos.
* *
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Aug 10, 2009 jkorman Initial creation * Aug 10, 2009 jkorman Initial creation
* Dec 02, 2013 2537 bsteffen Switch logger to ufstatus.
* *
* </pre> * </pre>
* *
@ -60,9 +60,10 @@ public class SoundingStations {
private static final String STATION_LIST = "modelBufrStationList.txt"; private static final String STATION_LIST = "modelBufrStationList.txt";
private static Map<String, String> stationMap; private static final IUFStatusHandler logger = UFStatus
.getHandler(SoundingStations.class);
private Log logger = LogFactory.getLog(getClass()); private static Map<String, String> stationMap;
public SoundingStations(String path) { public SoundingStations(String path) {
stationMap = new HashMap<String, String>(); stationMap = new HashMap<String, String>();

View file

@ -22,12 +22,10 @@ package com.raytheon.edex.plugin.modelsounding.ingest;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileReader; import java.io.FileReader;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader;
import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter; import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter;
import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.IPathManager;
@ -42,15 +40,17 @@ import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
/** /**
* TODO Add Description * Subscriber to update the local model sounding sites whenever the national spi
* file changes.
* *
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Jan 29, 2011 bfarmer Initial creation * Jan 29, 2011 bfarmer Initial creation
* Dec 02, 2013 2537 bsteffen Ensure streams are closed.
* *
* </pre> * </pre>
* *
@ -70,8 +70,6 @@ public class ModelBufrSubscriber implements INationalDatasetSubscriber {
private static final transient IUFStatusHandler statusHandler = UFStatus private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(ModelBufrSubscriber.class); .getHandler(ModelBufrSubscriber.class);
private Thread combineThread = null;
@Override @Override
public void notify(String fileName, File file) { public void notify(String fileName, File file) {
@ -190,6 +188,16 @@ public class ModelBufrSubscriber implements INationalDatasetSubscriber {
} }
} }
} finally { } finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ioe) {
statusHandler.handle(
Priority.SIGNIFICANT,
"modelBufr:Error closing input file ["
+ file.getName() + "]");
}
}
if(fos != null) { if(fos != null) {
try { try {
fos.close(); fos.close();

View file

@ -2,18 +2,20 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: Profiler Plug-in Bundle-Name: Profiler Plug-in
Bundle-SymbolicName: com.raytheon.edex.plugin.profiler Bundle-SymbolicName: com.raytheon.edex.plugin.profiler
Bundle-Version: 1.12.1174.qualifier Bundle-Version: 1.13.0.qualifier
Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization
Bundle-Vendor: RAYTHEON Bundle-Vendor: RAYTHEON
Require-Bundle: com.raytheon.edex.common, Bundle-ActivationPolicy: lazy
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
com.raytheon.uf.common.pointdata;bundle-version="1.11.8",
com.raytheon.uf.edex.pointdata;bundle-version="1.11.8",
org.geotools,
javax.persistence,
javax.measure,
com.raytheon.uf.common.localization;bundle-version="1.11.16"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.uf.common.dataplugin.profiler, Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
com.raytheon.uf.common.dataplugin.profiler.dao, Require-Bundle: com.raytheon.uf.common.dataplugin.profiler,
org.apache.commons.logging com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.time,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.status,
com.raytheon.uf.edex.database,
com.raytheon.uf.edex.pointdata,
com.raytheon.uf.edex.decodertools
Import-Package: com.raytheon.edex.esb,
com.raytheon.edex.plugin

View file

@ -10,7 +10,7 @@
<bean id="profilerProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties"> <bean id="profilerProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" ref="profilerPluginName" /> <property name="pluginName" ref="profilerPluginName" />
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.profiler" /> <property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.profiler" />
<property name="dao" value="com.raytheon.uf.common.dataplugin.profiler.dao.ProfilerDAO" /> <property name="dao" value="com.raytheon.edex.plugin.profiler.ProfilerDAO" />
<property name="record" value="com.raytheon.uf.common.dataplugin.profiler.ProfilerObs" /> <property name="record" value="com.raytheon.uf.common.dataplugin.profiler.ProfilerObs" />
</bean> </bean>

View file

@ -17,14 +17,10 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information. * further licensing information.
**/ **/
package com.raytheon.uf.common.dataplugin.profiler.dao; package com.raytheon.edex.plugin.profiler;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs; import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.pointdata.PointDataPluginDao; import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
/** /**
@ -32,9 +28,10 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation. * Mar 03, 2008 969 jkorman Initial implementation.
* Dec 03, 2013 2537 bsteffen Move to edex plugin.
* *
* </pre> * </pre>
* *
@ -52,46 +49,6 @@ public class ProfilerDAO extends PointDataPluginDao<ProfilerObs> {
super(pluginName); super(pluginName);
} }
/**
* Retrieves an MOS report using the datauri .
*
* @param dataURI
* The dataURI to match against.
* @return The report record if it exists.
*/
public ProfilerObs queryByDataURI(String dataURI) {
ProfilerObs report = null;
List<?> obs = null;
try {
obs = queryBySingleCriteria("dataURI", dataURI);
} catch (DataAccessLayerException e) {
e.printStackTrace();
}
if ((obs != null) && (obs.size() > 0)) {
report = (ProfilerObs) obs.get(0);
}
return report;
}
/**
* Queries for to determine if a given data uri exists on the profiler
* table.
*
* @param dataUri
* The DataURI to find.
* @return An array of objects. If not null, there should only be a single
* element.
*/
public Object[] queryDataUriColumn(final String dataUri) {
String sql = "select datauri from awips.prodata where datauri='"
+ dataUri + "';";
Object[] results = executeSQLQuery(sql);
return results;
}
@Override @Override
public String[] getKeysRequiredForFileName() { public String[] getKeysRequiredForFileName() {
return new String[] { "dataTime.refTime" }; return new String[] { "dataTime.refTime" };

View file

@ -23,19 +23,15 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.esb.Headers; import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder; import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.edex.plugin.profiler.decoder.ProfilerDataAdapter; import com.raytheon.edex.plugin.profiler.decoder.ProfilerDataAdapter;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs; import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription; import com.raytheon.uf.common.pointdata.PointDataDescription;
import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRFile; import com.raytheon.uf.edex.decodertools.bufr.BUFRFile;
@ -54,11 +50,12 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation. * Mar 03, 2008 969 jkorman Initial implementation.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data. * Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
* *
* </pre> * </pre>
* *
@ -72,7 +69,8 @@ public class ProfilerDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "profiler"; public static final String PLUGIN_NAME = "profiler";
/** The logger */ /** The logger */
private final Log logger = LogFactory.getLog(getClass()); private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerDecoder.class);
private PointDataDescription pdd; private PointDataDescription pdd;
@ -119,8 +117,7 @@ public class ProfilerDecoder extends AbstractDecoder implements
* @return A single decoded observation. May return array of size 0 if the * @return A single decoded observation. May return array of size 0 if the
* observation is a duplicate in the database or is invalid. * observation is a duplicate in the database or is invalid.
*/ */
public PluginDataObject[] decode(byte[] data, Headers headers) public PluginDataObject[] decode(byte[] data, Headers headers) {
throws DecoderException {
String traceId = ""; String traceId = "";
if (headers != null) { if (headers != null) {
@ -161,14 +158,6 @@ public class ProfilerDecoder extends AbstractDecoder implements
container, traceId); container, traceId);
if (soundingData != null) { if (soundingData != null) {
soundingData.setTraceId(traceId); soundingData.setTraceId(traceId);
try {
soundingData.constructDataURI();
PointDataView view = soundingData
.getPointDataView();
} catch (PluginException e) {
logger.error(traceId
+ "- Unable to construct dataURI", e);
}
pdoList.add(soundingData); pdoList.add(soundingData);
} }
} }

View file

@ -22,11 +22,10 @@ package com.raytheon.edex.plugin.profiler;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.esb.Headers; import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.plugin.AbstractRecordSeparator; import com.raytheon.edex.plugin.AbstractRecordSeparator;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRDocument;
import com.raytheon.uf.edex.decodertools.bufr.BUFRFile; import com.raytheon.uf.edex.decodertools.bufr.BUFRFile;
@ -46,9 +45,10 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation. * Mar 03, 2008 969 jkorman Initial implementation.
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
* *
* </pre> * </pre>
* *
@ -58,7 +58,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
public class ProfilerSeparator extends AbstractRecordSeparator implements public class ProfilerSeparator extends AbstractRecordSeparator implements
IDescriptorFactorySelector { IDescriptorFactorySelector {
private Log logger = LogFactory.getLog(getClass()); private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerSeparator.class);
private WMOHeader wmoHeader = null; private WMOHeader wmoHeader = null;

View file

@ -26,9 +26,6 @@ import java.util.Calendar;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs; import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerSite; import com.raytheon.uf.common.dataplugin.profiler.ProfilerSite;
import com.raytheon.uf.common.dataplugin.profiler.Profilers; import com.raytheon.uf.common.dataplugin.profiler.Profilers;
@ -41,6 +38,8 @@ import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataDescription.Type; import com.raytheon.uf.common.pointdata.PointDataDescription.Type;
import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRDataDocument;
import com.raytheon.uf.edex.decodertools.bufr.packets.BUFRSublistPacket; import com.raytheon.uf.edex.decodertools.bufr.packets.BUFRSublistPacket;
@ -55,11 +54,12 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation. * Mar 03, 2008 969 jkorman Initial implementation.
* May 09, 2013 1869 bsteffen Modified D2D time series of point data to * May 09, 2013 1869 bsteffen Modified D2D time series of point data to
* work without dataURI. * work without dataURI.
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
* *
* </pre> * </pre>
* *
@ -68,7 +68,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*/ */
public class ProfilerDataAdapter { public class ProfilerDataAdapter {
private static Log logger = LogFactory.getLog(ProfilerDataAdapter.class); private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerDataAdapter.class);
private static final String PROFILER_SITES = "profilerSites.xml"; private static final String PROFILER_SITES = "profilerSites.xml";

View file

@ -26,4 +26,6 @@
<parameter name="reportType" queryName="reportType" type="INT" /> <parameter name="reportType" queryName="reportType" type="INT" />
<parameter name="corIndicator" queryName="corIndicator" type="STRING" /> <parameter name="corIndicator" queryName="corIndicator" type="STRING" />
<parameter name="dataURI" queryName="dataURI" type="STRING" /> <parameter name="dataURI" queryName="dataURI" type="STRING" />
<parameter name="refTime" queryName="dataTime.refTime" numDims="1" type="LONG" unit="ms"/>
<parameter name="forecastHr" queryName="dataTime.fcstTime" numDims="1" type="INT" unit="h" dbunit="s"/>
</pointDataDbDescription> </pointDataDbDescription>

View file

@ -20,7 +20,7 @@
import PointDataQuery import PointDataQuery
from java.util import ArrayList from java.util import ArrayList
from com.raytheon.uf.common.dataplugin.sfcobs.dao import SfcObsPointDataTransform from com.raytheon.edex.plugin.sfcobs import SfcObsPointDataTransform
from com.raytheon.uf.common.message.response import ResponseMessageGeneric from com.raytheon.uf.common.message.response import ResponseMessageGeneric
# #
@ -34,6 +34,7 @@ from com.raytheon.uf.common.message.response import ResponseMessageGeneric
# 06/03/09 chammack Initial Creation. # 06/03/09 chammack Initial Creation.
# 10/28/10 5705 cjeanbap Updated SfcObsPointDataTransform.MAN_PARAMS_LISTs # 10/28/10 5705 cjeanbap Updated SfcObsPointDataTransform.MAN_PARAMS_LISTs
# 01/13/11 5705 cjeanbap Added makeNullResponse method. # 01/13/11 5705 cjeanbap Added makeNullResponse method.
# 12/05/13 2537 bsteffen Update package for the transform.
# #
# #

View file

@ -2,24 +2,17 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: Obs Bundle-Name: Obs
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.obs Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.obs
Bundle-Version: 1.0.0.qualifier Bundle-Version: 1.13.0.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Vendor: RAYTHEON Bundle-Vendor: RAYTHEON
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Export-Package: com.raytheon.uf.common.dataplugin.obs.metar, Export-Package: com.raytheon.uf.common.dataplugin.obs.metar,
com.raytheon.uf.common.dataplugin.obs.metar.util com.raytheon.uf.common.dataplugin.obs.metar.util
Import-Package: com.raytheon.uf.common.dataplugin, Require-Bundle: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.dataplugin.annotations,
com.raytheon.uf.common.dataplugin.persist,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.pointdata, com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.pointdata.spatial,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.serialization.annotations,
com.raytheon.uf.common.time, com.raytheon.uf.common.time,
com.raytheon.uf.common.time.util, com.raytheon.uf.common.geospatial,
javax.measure.quantity, com.raytheon.uf.common.serialization,
javax.measure.unit, com.raytheon.uf.common.dataaccess,
javax.persistence javax.measure
Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
org.hibernate;bundle-version="1.0.0"

View file

@ -1,3 +1 @@
com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord
com.raytheon.uf.common.dataplugin.obs.metar.util.SkyCover
com.raytheon.uf.common.dataplugin.obs.metar.util.WeatherCondition

View file

@ -1,4 +1,5 @@
source.. = src/ source.. = src/
output.. = bin/ output.. = bin/
bin.includes = META-INF/,\ bin.includes = META-INF/,\
. .,\
res/

View file

@ -0,0 +1,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="obsDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="obs"/>
<constructor-arg ref="obsDataAccessFactory"/>
</bean>
</beans>

View file

@ -32,7 +32,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord; import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -43,11 +42,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 2/14/2007 139 Phillippe initial creation * Feb 14, 2007 139 Phillippe initial creation
* 20080414 996 jkorman Added cloud genus field. * Apr 14, 2008 996 jkorman Added cloud genus field.
* 20090511 2338 jsanchez Implemented the Comparable interface. * May 11, 2009 2338 jsanchez Implemented the Comparable interface.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* *
* </pre> * </pre>
* *
@ -56,7 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize @DynamicSerialize
public class SkyCover implements Serializable, ISerializableObject, public class SkyCover implements Serializable,
Comparable<SkyCover> { Comparable<SkyCover> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -36,7 +36,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord; import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -47,10 +46,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 2/14/2007 139 Phillippe Initial creation * Feb 14, 2007 139 Phillippe Initial creation
* * Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre> * </pre>
* *
* @author bphillip * @author bphillip
@ -58,7 +58,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize @DynamicSerialize
public class WeatherCondition implements Serializable, ISerializableObject { public class WeatherCondition implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -2,23 +2,18 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: Profiler Plug-in Bundle-Name: Profiler Plug-in
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.profiler Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.profiler
Bundle-Version: 1.12.1174.qualifier Bundle-Version: 1.13.0.qualifier
Bundle-Vendor: RAYTHEON Bundle-Vendor: RAYTHEON
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Export-Package: com.raytheon.uf.common.dataplugin.profiler, Export-Package: com.raytheon.uf.common.dataplugin.profiler,
com.raytheon.uf.common.dataplugin.profiler.dao com.raytheon.uf.common.dataplugin.profiler.dao
Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", Require-Bundle: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.serialization;bundle-version="1.12.1174", com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174", com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174", com.raytheon.uf.common.serialization,
com.raytheon.uf.common.status;bundle-version="1.12.1174", com.raytheon.uf.common.geospatial,
com.raytheon.uf.edex.core;bundle-version="1.12.1174", com.raytheon.uf.common.status,
com.raytheon.uf.edex.database;bundle-version="1.0.0", com.raytheon.uf.common.dataaccess,
com.raytheon.uf.edex.pointdata;bundle-version="1.12.1174", javax.measure
com.raytheon.uf.edex.decodertools;bundle-version="1.12.1174",
org.springframework;bundle-version="3.1.4",
javax.persistence;bundle-version="1.0.0",
org.hibernate;bundle-version="1.0.0",
javax.measure;bundle-version="1.0.0"
Import-Package: org.apache.commons.logging

View file

@ -1,4 +1,5 @@
source.. = src/ source.. = src/
output.. = bin/ output.. = bin/
bin.includes = META-INF/,\ bin.includes = META-INF/,\
. .,\
res/

View file

@ -0,0 +1,32 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="profilerDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="profiler"/>
<constructor-arg ref="profilerDataAccessFactory"/>
</bean>
<bean factory-bean="profilerDataAccessFactory" factory-method="register2D">
<constructor-arg value="numProfLvls"/>
<constructor-arg value="height"/>
<constructor-arg value="FHAG"/>
<constructor-arg>
<list>
<value>height</value>
<value>uComponent</value>
<value>vComponent</value>
<value>HorizSpStdDev</value>
<value>wComponent</value>
<value>VertSpStdDev</value>
<value>peakPower</value>
<value>levelMode</value>
<value>uvQualityCode</value>
<value>consensusNum</value>
</list>
</constructor-arg>
</bean>
</beans>

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -34,9 +33,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation. * Mar 03, 2008 969 jkorman Initial implementation.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class ProfilerLevel implements Serializable, ISerializableObject, Comparable<ProfilerLevel> { public class ProfilerLevel implements Serializable, Comparable<ProfilerLevel> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -327,13 +327,9 @@ public class ProfilerLevel implements Serializable, ISerializableObject, Compara
*/ */
@Override @Override
public int compareTo(ProfilerLevel other) { public int compareTo(ProfilerLevel other) {
final int BEFORE = -1;
final int EQUAL = 0;
final int AFTER = 1;
int result = 0; int result = 0;
if (this == other) { if (this == other) {
result = EQUAL; result = 0;
} else { } else {
result = levelHeight.compareTo(other.levelHeight); result = levelHeight.compareTo(other.levelHeight);
} }

View file

@ -21,17 +21,8 @@ package com.raytheon.uf.common.dataplugin.profiler;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collection;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.measure.quantity.Angle;
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.Access;
import javax.persistence.AccessType; import javax.persistence.AccessType;
import javax.persistence.Column; import javax.persistence.Column;
@ -49,7 +40,6 @@ import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index; import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.persist.IPersistable; import com.raytheon.uf.common.dataplugin.persist.IPersistable;
@ -69,18 +59,19 @@ import com.vividsolutions.jts.geom.Geometry;
* *
* <pre> * <pre>
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Mar 03, 2008 969 jkorman Initial implementation. * Mar 03, 2008 969 jkorman Initial implementation.
* Apr 13, 2009 2251 jsanchez Implemented IDecoderGettable methods and * Apr 13, 2009 2251 jsanchez Implemented IDecoderGettable methods and
* plotted Profiler plots. * plotted Profiler plots.
* Jun 10, 2009 2489 jsanchez Updated the windSpeeed & windDirection. * Jun 10, 2009 2489 jsanchez Updated the windSpeeed & windDirection.
* Apr 04, 2013 1846 bkowal Added an index on refTime and * Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime * forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from * May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject. * PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 03, 2013 2537 bsteffen Remove IDecoderGettable
* *
* </pre> * </pre>
* *
@ -100,53 +91,13 @@ import com.vividsolutions.jts.geom.Geometry;
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize @DynamicSerialize
public class ProfilerObs extends PersistablePluginDataObject implements public class ProfilerObs extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable, ISpatialEnabled, IPointData, IPersistable,
Comparable<ProfilerObs> { Comparable<ProfilerObs> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String PLUGIN_NAME = "profiler"; public static final String PLUGIN_NAME = "profiler";
private static final HashMap<Integer, Integer> HGT_MAP = new HashMap<Integer, Integer>();
static {
HGT_MAP.put(100, 16180);
HGT_MAP.put(150, 13608);
HGT_MAP.put(200, 11784);
HGT_MAP.put(250, 10363);
HGT_MAP.put(300, 9164);
HGT_MAP.put(400, 7185);
HGT_MAP.put(500, 5574);
HGT_MAP.put(700, 3012);
HGT_MAP.put(850, 1457);
HGT_MAP.put(925, 766);
};
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
private static final String PROF_ID = "profid";
static {
PARM_MAP.put("NLAT", STA_LAT);
PARM_MAP.put("NLON", STA_LON);
PARM_MAP.put("WS", SFC_WNDSPD);
PARM_MAP.put("WD", SFC_WNDDIR);
PARM_MAP.put("PROF_ID", PROF_ID);
}
private static final String PRESS = "PRESS";
private static final String AGL = "AGL";
public static final String PRESS_PARAM_PTRN = ".*:" + PRESS + "=\\d{2,4}";
public static final String AGL_PARAM_PTRN = ".*:" + AGL + "=\\d{2,4}";
@Transient @Transient
private String parameterName = null; private String parameterName = null;
@ -383,75 +334,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements
return wmoHeader; return wmoHeader;
} }
@Override
public String getString(String paramName) {
String value = null;
String pName = PARM_MAP.get(paramName);
if (PROF_ID.equals(pName)) {
value = profilerId;
}
return value;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
Amount a = null;
if (parseParameter(paramName)) {
String pName = PARM_MAP.get(parameterName);
if (unit.equals(AGL) && (levelId == 0)) {
Double dValue = null;
if (SFC_WNDSPD.equals(pName)) {
dValue = getSfcWindSpeed();
if (dValue != null) {
a = new Amount(dValue, WIND_SPEED_UNIT);
}
} else if (SFC_WNDDIR.equals(pName)) {
dValue = getSfcWindDir();
if (dValue != null) {
a = new Amount(dValue, WIND_DIR_UNIT);
}
}
} else {
if ((pName != null) && (levels != null) && (levels.size() > 0)) {
profLevel = getLevel(levelId);
if (profLevel != null) {
Double dValue = null;
if (SFC_WNDSPD.equals(pName)) {
dValue = getWindSpeed();
if (dValue != null) {
a = new Amount(dValue, WIND_SPEED_UNIT);
}
} else if (SFC_WNDDIR.equals(pName)) {
dValue = getWindDirection();
if (dValue != null) {
a = new Amount(dValue, WIND_DIR_UNIT);
}
}
}
}
}
} else {
String pName = PARM_MAP.get(paramName);
if (STA_LAT.equals(pName)) {
a = new Amount(getLatitude(), LOCATION_UNIT);
} else if (STA_LON.equals(pName)) {
a = new Amount(getLongitude(), LOCATION_UNIT);
}
}
return a;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
/** /**
* Get the WMOHeader of the file that contained this data. * Get the WMOHeader of the file that contained this data.
* *
@ -508,17 +390,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements
this.levels = levels; this.levels = levels;
} }
/**
* Get the IDecoderGettable interface implementation. This class does not
* currently support this interface.
*
* @return Returns null.
*/
@Override
public IDecoderGettable getDecoderGettable() {
return this;
}
@Override @Override
public SurfaceObsLocation getSpatialObject() { public SurfaceObsLocation getSpatialObject() {
return location; return location;
@ -554,86 +425,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements
this.pointDataView = pointDataView; this.pointDataView = pointDataView;
} }
private Double getWindSpeed() {
if (windSpeed == null) {
double u = profLevel.getUcWind().doubleValue();
double v = profLevel.getVcWind().doubleValue();
// equation from ProfilerUtils.getWindSpeed
windSpeed = Math.sqrt((u * u) + (v * v));
}
return windSpeed;
}
/**
*
* @return
*/
private Double getWindDirection() {
if (windDirection == null) {
double ucw = profLevel.getUcWind().doubleValue();
double vcw = profLevel.getVcWind().doubleValue();
windDirection = Math.toDegrees(Math.atan2(-ucw, -vcw));
if (windDirection < 0) {
windDirection += 360.0;
}
}
return windDirection;
}
private ProfilerLevel getLevel(Integer level) {
ProfilerLevel retValue = null;
if (level != null) {
Integer stdHgt = HGT_MAP.get(level);
if ((unit.equals(PRESS)) && (stdHgt != null)) {
int diff = 99999;
for (ProfilerLevel l : levels) {
Integer height = l.getLevelHeight();
if (height != null) {
int d = Math.abs(stdHgt - height);
if (d < diff) {
// Track of the closest level
diff = d;
retValue = l;
}
}
} // for
} else if (unit.equals(AGL)) {
for (ProfilerLevel l : levels) {
if ((l.getLevelHeight() != null)
&& (getElevation() != null)) {
// Adjust to agl heights!
Integer height = l.getLevelHeight() - getElevation();
if ((level == 1500) && (height <= 1500)
&& (height >= 1250)) {
retValue = l;
} else if ((level == 1250) && (height <= 1500)
&& (height > 1125)) {
retValue = l;
} else if ((level == 1000) && (height <= 1125)
&& (height > 875)) {
retValue = l;
} else if ((level == 750) && (height <= 875)
&& (height > 625)) {
retValue = l;
} else if ((level == 500) && (height <= 625)
&& (height > 0)) {
retValue = l;
}
// No need to go higher than this.
if (height > 2000) {
break;
}
}
}
}
}
return retValue;
}
/** /**
* *
*/ */
@ -642,51 +433,12 @@ public class ProfilerObs extends PersistablePluginDataObject implements
return (profilerId != null) ? profilerId : "UNKN"; return (profilerId != null) ? profilerId : "UNKN";
} }
/**
* Determine if the parameter is a level request, and parse out the pressure
* level or the AGL 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;
int start = 0;
Pattern p = Pattern.compile(PRESS_PARAM_PTRN);
Pattern h = Pattern.compile(AGL_PARAM_PTRN);
Matcher m = p.matcher(parameter);
if (m.find()) {
start = parameter.indexOf(":PRESS=");
if (start > 0) {
unit = PRESS;
parameterName = parameter.substring(0, start);
start += ":PRESS=".length();
levelId = Integer.parseInt(parameter.substring(start));
}
goodParse = true;
} else if ((m = h.matcher(parameter)).find()) {
start = parameter.indexOf(":AGL=");
if (start > 0) {
unit = AGL;
parameterName = parameter.substring(0, start);
start += ":AGL=".length();
levelId = Integer.parseInt(parameter.substring(start));
}
goodParse = true;
}
return goodParse;
}
@Override @Override
public int compareTo(ProfilerObs other) { public int compareTo(ProfilerObs other) {
final int BEFORE = -1;
final int EQUAL = 0;
final int AFTER = 1;
int result = 0; int result = 0;
if (this == other) { if (this == other) {
result = EQUAL; result = 0;
} else { } else {
result = timeObs.compareTo(other.timeObs); result = timeObs.compareTo(other.timeObs);
} }

View file

@ -21,18 +21,18 @@ package com.raytheon.uf.common.dataplugin.profiler.dao;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerLevel; import com.raytheon.uf.common.dataplugin.profiler.ProfilerLevel;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs; import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.edex.decodertools.time.TimeTools; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.util.TimeUtil;
/** /**
* Transforms profiler {@link PointDataContainer}s into {@link ProfilerObs} * Transforms profiler {@link PointDataContainer}s into {@link ProfilerObs}
@ -41,9 +41,10 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Oct 28, 2009 jkorman Initial creation * Oct 28, 2009 jkorman Initial creation
* Dec 03, 2013 2537 bsteffen Switch logger to ufstatus.
* *
* </pre> * </pre>
* *
@ -53,7 +54,8 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
public class ProfilerDataTransform { public class ProfilerDataTransform {
private static Log logger = LogFactory.getLog(ProfilerDataTransform.class); private static final IUFStatusHandler logger = UFStatus
.getHandler(ProfilerDataTransform.class);
public static final String[] HDR_PARAMS = new String[] { "stationId", public static final String[] HDR_PARAMS = new String[] { "stationId",
"profilerId", "profilerName", "validTime", "latitude", "longitude", "profilerId", "profilerName", "validTime", "latitude", "longitude",
@ -102,7 +104,9 @@ public class ProfilerDataTransform {
obs = new ProfilerObs(uri); obs = new ProfilerObs(uri);
long vt = pdv.getNumber("validTime").longValue(); long vt = pdv.getNumber("validTime").longValue();
obs.setTimeObs(TimeTools.newCalendar(vt)); Calendar timeObs = TimeUtil.newGmtCalendar();
timeObs.setTimeInMillis(vt);
obs.setTimeObs(timeObs);
SurfaceObsLocation location = new SurfaceObsLocation(); SurfaceObsLocation location = new SurfaceObsLocation();

View file

@ -2,16 +2,16 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: Sfcobs Plug-in Bundle-Name: Sfcobs Plug-in
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.sfcobs Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.sfcobs
Bundle-Version: 1.12.1174.qualifier Bundle-Version: 1.13.0.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Vendor: RAYTHEON Bundle-Vendor: RAYTHEON
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Require-Bundle: com.raytheon.uf.common.serialization, Require-Bundle: com.raytheon.uf.common.serialization,
javax.persistence,
javax.measure,
com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.dataplugin, com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.geospatial com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.status,
com.raytheon.uf.common.dataaccess,
javax.measure
Export-Package: com.raytheon.uf.common.dataplugin.sfcobs Export-Package: com.raytheon.uf.common.dataplugin.sfcobs
Import-Package: com.raytheon.uf.common.status,
org.apache.commons.logging

View file

@ -1,7 +1 @@
com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon
com.raytheon.uf.common.dataplugin.sfcobs.AncCloud
com.raytheon.uf.common.dataplugin.sfcobs.AncPrecip
com.raytheon.uf.common.dataplugin.sfcobs.AncPressure
com.raytheon.uf.common.dataplugin.sfcobs.AncTemp
com.raytheon.uf.common.dataplugin.sfcobs.AncWave
com.raytheon.uf.common.dataplugin.sfcobs.AncWind

View file

@ -1,4 +1,5 @@
source.. = src/ source.. = src/
output.. = bin/ output.. = bin/
bin.includes = META-INF/,\ bin.includes = META-INF/,\
. .,\
res/

View file

@ -0,0 +1,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="sfcobsDataAccessFactory" class="com.raytheon.uf.common.pointdata.dataaccess.PointDataAccessFactory" />
<bean factory-bean="dataAccessRegistry" factory-method="register">
<constructor-arg value="sfcobs"/>
<constructor-arg ref="sfcobsDataAccessFactory"/>
</bean>
</beans>

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -37,9 +36,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding. * Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre> * </pre>
* *
* @author jkorman * @author jkorman
@ -47,7 +48,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public abstract class AncBase implements ISerializableObject { public abstract class AncBase {
// Type of the observation. // Type of the observation.
@DynamicSerializeElement @DynamicSerializeElement

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -34,9 +33,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding. * Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre> * </pre>
* *
* @author jkorman * @author jkorman
@ -44,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class AncCloud implements Serializable, ISerializableObject { public class AncCloud implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -34,9 +33,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding. * Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre> * </pre>
* *
* @author jkorman * @author jkorman
@ -44,8 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class AncPrecip extends AncBase implements Serializable, public class AncPrecip extends AncBase implements Serializable {
ISerializableObject {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -36,9 +35,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding. * Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre> * </pre>
* *
* @author jkorman * @author jkorman
@ -46,8 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class AncTemp extends AncBase implements Serializable, public class AncTemp extends AncBase implements Serializable {
ISerializableObject {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -36,9 +35,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding. * Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre> * </pre>
* *
* @author jkorman * @author jkorman
@ -46,7 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class AncWave implements Serializable, ISerializableObject { public class AncWave implements Serializable {
public static final Integer T_WIND_WAVE = 1000; public static final Integer T_WIND_WAVE = 1000;

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -36,9 +35,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding. * Sep 25, 2007 391 jkorman Initial Coding.
* Dec 03, 2013 2537 bsteffen Remove ISerializableObject
*
* </pre> * </pre>
* *
* @author jkorman * @author jkorman
@ -46,8 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@DynamicSerialize @DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class AncWind extends AncBase implements Serializable, public class AncWind extends AncBase implements Serializable {
ISerializableObject {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View file

@ -2,30 +2,24 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: PointData Bundle-Name: PointData
Bundle-SymbolicName: com.raytheon.uf.common.pointdata Bundle-SymbolicName: com.raytheon.uf.common.pointdata
Bundle-Version: 1.12.1174.qualifier Bundle-Version: 1.13.0.qualifier
Bundle-Vendor: RAYTHEON Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Require-Bundle: com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.status,
com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.dataaccess,
javax.measure
Export-Package: com.raytheon.uf.common.pointdata, Export-Package: com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.pointdata.accumulate, com.raytheon.uf.common.pointdata.accumulate,
com.raytheon.uf.common.pointdata.dataaccess,
com.raytheon.uf.common.pointdata.elements, com.raytheon.uf.common.pointdata.elements,
com.raytheon.uf.common.pointdata.requests, com.raytheon.uf.common.pointdata.requests,
com.raytheon.uf.common.pointdata.spatial, com.raytheon.uf.common.pointdata.spatial,
com.raytheon.uf.common.pointdata.vadriver com.raytheon.uf.common.pointdata.vadriver
Import-Package: com.raytheon.uf.common.dataquery.requests,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.datastorage.records,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.serialization.adapters,
com.raytheon.uf.common.serialization.annotations,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.status,
com.raytheon.uf.common.time,
javax.measure,
javax.measure.unit
Require-Bundle: net.sf.cglib;bundle-version="2.1.3",
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.geospatial,
javax.persistence,
org.hibernate,
org.geotools

View file

@ -23,17 +23,16 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import com.raytheon.uf.common.serialization.ISerializableObject;
/** /**
* Provides metadata (primarily the size) of a named dimension * Provides metadata (primarily the size) of a named dimension
* *
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Jul 27, 2009 chammack Initial creation * Jul 27, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -41,7 +40,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
* @version 1.0 * @version 1.0
*/ */
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class Dimension implements ISerializableObject { public class Dimension {
@XmlAttribute(name = "name") @XmlAttribute(name = "name")
private String dimensionName; private String dimensionName;

View file

@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import com.raytheon.uf.common.pointdata.PointDataDescription.Type; import com.raytheon.uf.common.pointdata.PointDataDescription.Type;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -39,10 +38,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Apr 27, 2009 chammack Initial creation * Apr 27, 2009 chammack Initial creation
* Jun 22, 2009 2538 jsanchez Added missing DynamicSerializeElement. * Jun 22, 2009 2538 jsanchez Added missing DynamicSerializeElement.
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -51,7 +51,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize @DynamicSerialize
public class ParameterDescription implements ISerializableObject { public class ParameterDescription {
@XmlAttribute(name = "name", required = true) @XmlAttribute(name = "name", required = true)
@DynamicSerializeElement @DynamicSerializeElement

View file

@ -46,7 +46,6 @@ import com.raytheon.uf.common.pointdata.elements.FloatPointDataObject;
import com.raytheon.uf.common.pointdata.elements.IntPointDataObject; import com.raytheon.uf.common.pointdata.elements.IntPointDataObject;
import com.raytheon.uf.common.pointdata.elements.LongPointDataObject; import com.raytheon.uf.common.pointdata.elements.LongPointDataObject;
import com.raytheon.uf.common.pointdata.elements.StringPointDataObject; import com.raytheon.uf.common.pointdata.elements.StringPointDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -57,9 +56,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Apr 8, 2009 chammack Initial creation * Apr 08, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -69,7 +69,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize @DynamicSerialize
@XmlRootElement @XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
public class PointDataContainer implements ISerializableObject { public class PointDataContainer {
protected static final int DEFAULT_SZ = 2048; protected static final int DEFAULT_SZ = 2048;

View file

@ -19,7 +19,6 @@
**/ **/
package com.raytheon.uf.common.pointdata; package com.raytheon.uf.common.pointdata;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -30,9 +29,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Jan 20, 2010 chammack Initial creation * Jan 20, 2010 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -40,7 +40,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* @version 1.0 * @version 1.0
*/ */
@DynamicSerialize @DynamicSerialize
public class PointDataRequestMessageConstraint implements ISerializableObject { public class PointDataRequestMessageConstraint {
@DynamicSerializeElement @DynamicSerializeElement
private String parameter; private String parameter;

View file

@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.pointdata.elements.AbstractPointDataObject; import com.raytheon.uf.common.pointdata.elements.AbstractPointDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
/** /**
* A serialization helper class for serializing pointdata maps * A serialization helper class for serializing pointdata maps
@ -33,9 +32,10 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Apr 16, 2009 chammack Initial creation * Apr 16, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* </pre> * </pre>
* *
@ -43,13 +43,12 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
* @version 1.0 * @version 1.0
*/ */
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class PointDataSerializable implements ISerializableObject { public class PointDataSerializable {
@XmlElement(name = "item") @XmlElement(name = "item")
public PointDataItemSerializable[] items; public PointDataItemSerializable[] items;
public static class PointDataItemSerializable implements public static class PointDataItemSerializable {
ISerializableObject {
@XmlAttribute @XmlAttribute
public String key; public String key;

View file

@ -28,7 +28,6 @@ import com.raytheon.uf.common.pointdata.elements.FloatPointDataObject;
import com.raytheon.uf.common.pointdata.elements.IntPointDataObject; import com.raytheon.uf.common.pointdata.elements.IntPointDataObject;
import com.raytheon.uf.common.pointdata.elements.LongPointDataObject; import com.raytheon.uf.common.pointdata.elements.LongPointDataObject;
import com.raytheon.uf.common.pointdata.elements.StringPointDataObject; import com.raytheon.uf.common.pointdata.elements.StringPointDataObject;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -41,19 +40,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Jan 14, 2010 chammack Initial creation * Jan 14, 2010 chammack Initial creation
* Oct 30, 2012 15448 Xiaochuan Check if container != null first in from().
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
* *
* 10/30/2012 15448 Xiaochuan Check if container != null first in from().
*
* </pre> * </pre>
* *
* @author chammack * @author chammack
* @version 1.0 * @version 1.0
*/ */
@DynamicSerialize @DynamicSerialize
public class PointDataThriftContainer implements ISerializableObject { public class PointDataThriftContainer {
@DynamicSerializeElement @DynamicSerializeElement
FloatPointDataObject[] floatData; FloatPointDataObject[] floatData;

View file

@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for * See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information. * further licensing information.
**/ **/
package com.raytheon.edex.plugin.modelsounding.dataaccess; package com.raytheon.uf.common.pointdata.dataaccess;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View file

@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
import com.raytheon.uf.common.datastorage.records.IDataRecord; import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.pointdata.ParameterDescription; import com.raytheon.uf.common.pointdata.ParameterDescription;
import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -38,9 +37,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Apr 8, 2009 chammack Initial creation * Apr 08, 2009 chammack Initial creation
* Dec 02, 2013 2537 bsteffen Remove ISerializableObject
*
* *
* </pre> * </pre>
* *
@ -49,7 +50,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/ */
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize @DynamicSerialize
public abstract class AbstractPointDataObject<A> implements ISerializableObject { public abstract class AbstractPointDataObject<A> {
static final int STORAGE_CHUNK_SIZE = 1024; static final int STORAGE_CHUNK_SIZE = 1024;

View file

@ -37,15 +37,17 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Coordinate;
/** /**
* TODO Add Description * Driver for using the VA_Advanced progressive disclosure to generate
* localizaed spi files.
* *
* <pre> * <pre>
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Feb 24, 2011 bfarmer Initial creation * Feb 24, 2011 bfarmer Initial creation
* Dec 02, 2013 2537 bsteffen Ensure streams are closed.
* *
* </pre> * </pre>
* *
@ -128,8 +130,11 @@ public class VA_Driver {
String line; String line;
String[] splitLine; String[] splitLine;
ns = 0; ns = 0;
BufferedReader fis = null;
BufferedReader pis = null;
BufferedWriter fos = null;
try { try {
BufferedReader fis = new BufferedReader(new InputStreamReader( fis = new BufferedReader(new InputStreamReader(
new FileInputStream(goodnessFile))); new FileInputStream(goodnessFile)));
for (line = fis.readLine(); line != null; line = fis.readLine()) { for (line = fis.readLine(); line != null; line = fis.readLine()) {
if (line.startsWith("#")) if (line.startsWith("#"))
@ -180,7 +185,7 @@ public class VA_Driver {
++ns; ++ns;
} }
if (primary != null) { if (primary != null) {
BufferedReader pis = new BufferedReader(new InputStreamReader( pis = new BufferedReader(new InputStreamReader(
new FileInputStream(primary))); new FileInputStream(primary)));
int g = 0x7FFFFFFF; int g = 0x7FFFFFFF;
for (String pline = pis.readLine(); pline != null; pline = pis for (String pline = pis.readLine(); pline != null; pline = pis
@ -205,7 +210,7 @@ public class VA_Driver {
distInput = vaa distInput = vaa
.getVaAdvanced(latLonInput, goodnessInput, distInput); .getVaAdvanced(latLonInput, goodnessInput, distInput);
// Write the output. // Write the output.
BufferedWriter fos = new BufferedWriter(new OutputStreamWriter( fos = new BufferedWriter(new OutputStreamWriter(
new FileOutputStream(output))); new FileOutputStream(output)));
String nameFormat = String.format("%s%ds", "%", max_name); String nameFormat = String.format("%s%ds", "%", max_name);
for (int i = 0; i < ns; ++i) { for (int i = 0; i < ns; ++i) {
@ -216,12 +221,40 @@ public class VA_Driver {
distInput[i])); distInput[i]));
fos.newLine(); fos.newLine();
} }
fos.close();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
// TODO Auto-generated catch block. Please revise as appropriate. // TODO Auto-generated catch block. Please revise as appropriate.
statusHandler.handle(Priority.PROBLEM, "Could not read File ", e); statusHandler.handle(Priority.PROBLEM, "Could not read File ", e);
} catch (IOException e) { } catch (IOException e) {
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ioe) {
statusHandler.handle(Priority.SIGNIFICANT,
"Error closing input file ["
+ goodnessFile.getName() + "]");
}
}
if (pis != null) {
try {
pis.close();
} catch (IOException ioe) {
statusHandler.handle(
Priority.SIGNIFICANT,
"Error closing input file ["
+ primary.getName() + "]");
}
}
if (fos != null) {
try {
fos.close();
} catch (IOException ioe) {
statusHandler.handle(Priority.SIGNIFICANT,
"Error closing output file [" + output.getName()
+ "]");
}
}
} }
} }