From 2eb9a4595198a41ccbb6de77667c42daf5978f04 Mon Sep 17 00:00:00 2001 From: Ben Steffensmeier Date: Wed, 4 Dec 2013 10:31:11 -0600 Subject: [PATCH] Issue #2537 Use PointDataAccessFactory for multiple point data types. Change-Id: I655091f116cde662933ed96d926372a14a435dfc Former-commit-id: 7c2a4ef72c46acf4e9d9fb6e8b4f5648d6926c18 [formerly f682e66e9b329ad525030083d29baa7dcf293c0c] [formerly 7c2a4ef72c46acf4e9d9fb6e8b4f5648d6926c18 [formerly f682e66e9b329ad525030083d29baa7dcf293c0c] [formerly 46a466497c6fb250f9957b0cabff05d4d2bd2b25 [formerly 91a3fdbc8bd98603a1cda218729d5542dac809ef]]] Former-commit-id: 46a466497c6fb250f9957b0cabff05d4d2bd2b25 Former-commit-id: fde968a83457d2b4732f438c65de5d7606a525e0 [formerly ad9fee446d781309fd7c40b87c3dff1c673a2f93] Former-commit-id: 956e8b04f27af1e20c328971b849452481637e8c --- .../feature.xml | 4 +- .../feature.xml | 2 +- .../res/spring/bufrmos-common-dataaccess.xml | 41 +++ .../META-INF/MANIFEST.MF | 45 ++- ...f.common.serialization.ISerializableObject | 4 +- .../modelsounding-common-dataaccess.xml | 2 +- .../modelsounding/ModelSoundingDecoder.java | 53 ++-- .../modelsounding/ModelSoundingSeparator.java | 17 +- .../modelsounding/common/SoilLevel.java | 12 +- .../modelsounding/common/SoundingLevel.java | 12 +- .../modelsounding/common/SoundingSite.java | 92 +----- .../decoder/ModelSoundingDataAdapter.java | 24 +- .../decoder/SoundingStations.java | 19 +- .../ingest/ModelBufrSubscriber.java | 24 +- .../META-INF/MANIFEST.MF | 28 +- .../res/spring/profiler-common.xml | 2 +- .../edex/plugin/profiler}/ProfilerDAO.java | 53 +--- .../edex/plugin/profiler/ProfilerDecoder.java | 33 +-- .../plugin/profiler/ProfilerSeparator.java | 15 +- .../profiler/decoder/ProfilerDataAdapter.java | 19 +- .../res/pointdata/sfcobsdb.xml | 2 + .../edex_static/base/python/SfcObsRequest.py | 3 +- .../META-INF/MANIFEST.MF | 23 +- ...f.common.serialization.ISerializableObject | 2 - .../build.properties | 3 +- .../res/spring/obs-common-dataaccess.xml | 12 + .../dataplugin/obs/metar/util/SkyCover.java | 15 +- .../obs/metar/util/WeatherCondition.java | 12 +- .../META-INF/MANIFEST.MF | 27 +- .../build.properties | 3 +- .../res/spring/profiler-common-dataaccess.xml | 32 ++ .../dataplugin/profiler/ProfilerLevel.java | 16 +- .../dataplugin/profiler/ProfilerObs.java | 278 +----------------- .../profiler/dao/ProfilerDataTransform.java | 22 +- .../META-INF/MANIFEST.MF | 16 +- ...f.common.serialization.ISerializableObject | 8 +- .../build.properties | 3 +- .../res/spring/sfcobs-common-dataaccess.xml | 12 + .../uf/common/dataplugin/sfcobs/AncBase.java | 11 +- .../uf/common/dataplugin/sfcobs/AncCloud.java | 11 +- .../common/dataplugin/sfcobs/AncPrecip.java | 12 +- .../uf/common/dataplugin/sfcobs/AncTemp.java | 12 +- .../uf/common/dataplugin/sfcobs/AncWave.java | 11 +- .../uf/common/dataplugin/sfcobs/AncWind.java | 12 +- .../META-INF/MANIFEST.MF | 30 +- .../uf/common/pointdata/Dimension.java | 11 +- .../pointdata/ParameterDescription.java | 12 +- .../common/pointdata/PointDataContainer.java | 10 +- .../PointDataRequestMessageConstraint.java | 10 +- .../pointdata/PointDataSerializable.java | 13 +- .../pointdata/PointDataThriftContainer.java | 13 +- .../dataaccess/PointDataAccessFactory.java | 2 +- .../elements/AbstractPointDataObject.java | 11 +- .../common/pointdata/vadriver/VA_Driver.java | 49 ++- 54 files changed, 480 insertions(+), 740 deletions(-) create mode 100644 edexOsgi/com.raytheon.edex.plugin.bufrmos/res/spring/bufrmos-common-dataaccess.xml rename edexOsgi/{com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao => com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler}/ProfilerDAO.java (53%) create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.obs/res/spring/obs-common-dataaccess.xml create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.profiler/res/spring/profiler-common-dataaccess.xml create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/res/spring/sfcobs-common-dataaccess.xml rename edexOsgi/{com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding => com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata}/dataaccess/PointDataAccessFactory.java (99%) diff --git a/cave/com.raytheon.uf.viz.dataplugin.obs.feature/feature.xml b/cave/com.raytheon.uf.viz.dataplugin.obs.feature/feature.xml index 537bfb1ca8..66481fea61 100644 --- a/cave/com.raytheon.uf.viz.dataplugin.obs.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.dataplugin.obs.feature/feature.xml @@ -34,13 +34,13 @@ download-size="0" install-size="0" version="0.0.0" - unpack="false"/> + unpack="true"/> + unpack="true"/> diff --git a/cave/com.raytheon.uf.viz.dataplugins.feature/feature.xml b/cave/com.raytheon.uf.viz.dataplugins.feature/feature.xml index eac25d17d6..541c99a8ca 100644 --- a/cave/com.raytheon.uf.viz.dataplugins.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.dataplugins.feature/feature.xml @@ -147,7 +147,7 @@ download-size="0" install-size="0" version="0.0.0" - unpack="false"/> + unpack="true"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/MANIFEST.MF index 3aa57ebfff..50736c45b8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/MANIFEST.MF @@ -2,37 +2,26 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Modelsounding Plug-in Bundle-SymbolicName: com.raytheon.edex.plugin.modelsounding -Bundle-Version: 1.13.0.qualifier -Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization +Bundle-Version: 1.13.1.qualifier 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, com.raytheon.edex.plugin.modelsounding.common, com.raytheon.edex.plugin.modelsounding.dao, 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 diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index 68f9031520..29ed5d0216 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -1,3 +1 @@ -com.raytheon.edex.plugin.modelsounding.common.SoundingSite -com.raytheon.edex.plugin.modelsounding.common.SoundingLevel -com.raytheon.edex.plugin.modelsounding.common.SoilLevel \ No newline at end of file +com.raytheon.edex.plugin.modelsounding.common.SoundingSite \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-common-dataaccess.xml b/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-common-dataaccess.xml index 163fd374aa..b7bee9e078 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-common-dataaccess.xml +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-common-dataaccess.xml @@ -2,7 +2,7 @@ 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"> - + diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java index e5298d6f6f..5a114f9782 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingDecoder.java @@ -28,12 +28,10 @@ import java.util.Map; import java.util.Set; import com.raytheon.edex.esb.Headers; -import com.raytheon.edex.exception.DecoderException; import com.raytheon.edex.plugin.AbstractDecoder; import com.raytheon.edex.plugin.modelsounding.common.SoundingSite; import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter; 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.PointDataDescription; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -57,26 +55,28 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 03, 2008 1026       jkorman     Initial implementation.
- * Apr 08, 2008 1039       jkorman     Added traceId for tracing data.
- * Nov 25, 2008 1684       chammack    Camel Refactor
- * Apr 29, 2013 1861       bkowal      Create a separate Point Data Container
- *                                     for  every record so each forecast hour
- *                                     will  receive a unique hdf5 file.
- * Jul 03, 2013 2161       bkowal      Store and retrieve the Point Data
- *                                     Containers  by forecast hour and reftime
- *                                     when completing  a decode operation.
- *                                     Overrode default  Point Data Container
- *                                     size.
- * Jul 16, 2013 2161       bkowal      Store the records in a container that
- *                                     will  be persisted every X (configurable)
- *                                     seconds  by a timer. The timer is started
- *                                     during spring  initialization and
- *                                     destroyed during spring  container
- *                                     destruction.
- * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  1026     jkorman     Initial implementation.
+ * Apr 08, 2008  1039     jkorman     Added traceId for tracing data.
+ * Nov 25, 2008  1684     chammack    Camel Refactor
+ * Apr 29, 2013  1861     bkowal      Create a separate Point Data Container
+ *                                    for  every record so each forecast hour
+ *                                    will  receive a unique hdf5 file.
+ * Jul 03, 2013  2161     bkowal      Store and retrieve the Point Data
+ *                                    Containers  by forecast hour and reftime
+ *                                    when completing  a decode operation.
+ *                                    Overrode default  Point Data Container
+ *                                    size.
+ * Jul 16, 2013  2161     bkowal      Store the records in a container that
+ *                                    will  be persisted every X (configurable)
+ *                                    seconds  by a timer. The timer is started
+ *                                    during spring  initialization and
+ *                                    destroyed during spring  container
+ *                                    destruction.
+ * Aug 30, 2013  2298     rjpeter     Make getPluginName abstract
+ * Dec 02, 2013  2537     bsteffen    Remove dead/deprecated code.
+ * 
  * 
  * 
* @@ -140,8 +140,7 @@ public class ModelSoundingDecoder extends AbstractDecoder implements * @return A single decoded observation. May return null if the observation * is a duplicate in the database or is invalid. */ - public PluginDataObject[] decode(byte[] data, Headers headers) - throws DecoderException { + public PluginDataObject[] decode(byte[] data, Headers headers) { String traceId = ""; if (headers != null) { traceId = (String) headers.get("traceId"); @@ -222,12 +221,6 @@ public class ModelSoundingDecoder extends AbstractDecoder implements soundingTemporalData); if (soundingData != null) { soundingData.setTraceId(traceId); - try { - soundingData.constructDataURI(); - } catch (PluginException e) { - logger.error(traceId - + "- Unable to construct dataURI", e); - } String uri = soundingData.getDataURI(); if (dataSet.add(uri)) { container.addPdo(soundingData); diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingSeparator.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingSeparator.java index 5ca9889f88..b969cfa227 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingSeparator.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ModelSoundingSeparator.java @@ -22,15 +22,14 @@ package com.raytheon.edex.plugin.modelsounding; import java.util.ArrayList; 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.plugin.AbstractRecordSeparator; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; 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 * 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. @@ -39,9 +38,10 @@ import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 20080303           1026 jkorman     Initial implementation.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  1026     jkorman     Initial implementation.
+ * Dec 02, 2013  2537     bsteffen    Switch logger to ufstatus.
  * 
  * 
* @@ -50,7 +50,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeaderFinder; */ 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. private List reportLocations = null; diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoilLevel.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoilLevel.java index 59e4e80f54..930cfaefc2 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoilLevel.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoilLevel.java @@ -25,18 +25,18 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; /** - * ProfilerLevel contains the data for a single vertical level observation. + * SoilLevel contains the data for a single soil level forecast. * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 20080303           1026 jkorman     Initial implementation.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  1026     jkorman     Initial implementation.
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class SoilLevel implements Serializable, ISerializableObject { +public class SoilLevel implements Serializable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingLevel.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingLevel.java index eddcfe0378..2be9a656b8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingLevel.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingLevel.java @@ -25,18 +25,18 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; /** - * ProfilerLevel contains the data for a single vertical level observation. + * SoundingLevel contains the data for a single vertical level forecast. * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 20080303           1026 jkorman     Initial implementation.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  1026     jkorman     Initial implementation.
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class SoundingLevel implements Serializable, ISerializableObject { +public class SoundingLevel implements Serializable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java index 201c62ea29..ffd83c6878 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/common/SoundingSite.java @@ -20,7 +20,6 @@ package com.raytheon.edex.plugin.modelsounding.common; import java.util.Calendar; -import java.util.Collection; import java.util.HashSet; import java.util.Set; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.IPersistable; @@ -54,21 +52,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.vividsolutions.jts.geom.Geometry; /** - * The ProfilerObs class encapsulates the location and time information for a - * profiler observation as well as providing a container for the vertical level - * data above the location. + * The SoundingSite class encapsulates the location and time information for a + * model sounding forecast as well as providing a container for the vertical + * level data above the location. * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 03, 2008 1026       jkorman     Initial implementation.
- * Apr 04, 2013 1846       bkowal      Added an index on refTime and
- *                                     forecastTime
- * Apr 12, 2013 1857       bgonzale    Added SequenceGenerator annotation.
- * May 07, 2013 1869       bsteffen    Remove dataURI column from
- *                                     PluginDataObject.
- * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  1026     jkorman     Initial implementation.
+ * Apr 04, 2013  1846     bkowal      Added an index on refTime and
+ *                                    forecastTime
+ * Apr 12, 2013  1857     bgonzale    Added SequenceGenerator annotation.
+ * May 07, 2013  1869     bsteffen    Remove dataURI column from
+ *                                    PluginDataObject.
+ * Aug 30, 2013  2298     rjpeter     Make getPluginName abstract
+ * Dec 02, 2013  2537     bsteffen    Remove IDecoderGettable
  * 
  * 
* @@ -88,7 +87,7 @@ import com.vividsolutions.jts.geom.Geometry; @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement public class SoundingSite extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + ISpatialEnabled, IPointData, IPersistable { private static final long serialVersionUID = 1L; @@ -828,17 +827,6 @@ public class SoundingSite extends PersistablePluginDataObject implements 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 public SurfaceObsLocation getSpatialObject() { return location; @@ -852,58 +840,6 @@ public class SoundingSite extends PersistablePluginDataObject implements 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 getValues(String paramName) { - // TODO Auto-generated method stub - return null; - } - @Override public PointDataView getPointDataView() { return this.pointDataView; diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/ModelSoundingDataAdapter.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/ModelSoundingDataAdapter.java index f946ece08a..e7aecde92e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/ModelSoundingDataAdapter.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/ModelSoundingDataAdapter.java @@ -25,9 +25,6 @@ import java.io.File; import java.util.Calendar; 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.common.SoundingModels; 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.PointDataView; 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.edex.decodertools.bufr.BUFRDataDocument; import com.raytheon.uf.edex.decodertools.bufr.descriptors.BUFRDescriptor; @@ -56,13 +55,14 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 17, 2008 1026       jkorman     Initial implementation.
- * May 09, 2013 1869       bsteffen    Modified D2D time series of point data to
- *                                     work without dataURI.
- * 20130703           2161 bkowal      Relocated the logic used to retrieve
- *                                     temporal information into its own function.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 17, 2008  1026     jkorman     Initial implementation.
+ * May 09, 2013  1869     bsteffen    Modified D2D time series of point data to
+ *                                    work without dataURI.
+ * Jul 03, 2013  2161     bkowal      Relocated the logic used to retrieve
+ *                                    temporal information into its own function.
+ * Dec 02, 2013  2537     bsteffen    Switch logger to ufstatus.
  * 
  * 
* @@ -71,8 +71,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; */ public class ModelSoundingDataAdapter { - private static Log logger = LogFactory - .getLog(ModelSoundingDataAdapter.class); + private static final IUFStatusHandler logger = UFStatus + .getHandler(ModelSoundingDataAdapter.class); private static final Object LOCK = new Object(); diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/SoundingStations.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/SoundingStations.java index 8096b64289..27e38a97c8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/SoundingStations.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/decoder/SoundingStations.java @@ -31,24 +31,24 @@ import java.io.InputStreamReader; import java.util.HashMap; 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.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; 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. * *
  * 
  * SOFTWARE HISTORY
  * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 10, 2009            jkorman     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Aug 10, 2009           jkorman     Initial creation
+ * Dec 02, 2013  2537     bsteffen    Switch logger to ufstatus.
  * 
  * 
* @@ -60,9 +60,10 @@ public class SoundingStations { private static final String STATION_LIST = "modelBufrStationList.txt"; - private static Map stationMap; + private static final IUFStatusHandler logger = UFStatus + .getHandler(SoundingStations.class); - private Log logger = LogFactory.getLog(getClass()); + private static Map stationMap; public SoundingStations(String path) { stationMap = new HashMap(); diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ingest/ModelBufrSubscriber.java b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ingest/ModelBufrSubscriber.java index 5fd7c835b1..88143e3e6b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ingest/ModelBufrSubscriber.java +++ b/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/ingest/ModelBufrSubscriber.java @@ -22,12 +22,10 @@ package com.raytheon.edex.plugin.modelsounding.ingest; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStreamReader; import com.raytheon.edex.plugin.modelsounding.decoder.ModelSoundingDataAdapter; 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; /** - * TODO Add Description + * Subscriber to update the local model sounding sites whenever the national spi + * file changes. * *
  * 
  * SOFTWARE HISTORY
  * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jan 29, 2011            bfarmer     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Jan 29, 2011           bfarmer     Initial creation
+ * Dec 02, 2013  2537     bsteffen    Ensure streams are closed.
  * 
  * 
* @@ -70,8 +70,6 @@ public class ModelBufrSubscriber implements INationalDatasetSubscriber { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(ModelBufrSubscriber.class); - private Thread combineThread = null; - @Override public void notify(String fileName, File file) { @@ -190,6 +188,16 @@ public class ModelBufrSubscriber implements INationalDatasetSubscriber { } } } finally { + if (fis != null) { + try { + fis.close(); + } catch (IOException ioe) { + statusHandler.handle( + Priority.SIGNIFICANT, + "modelBufr:Error closing input file [" + + file.getName() + "]"); + } + } if(fos != null) { try { fos.close(); diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.profiler/META-INF/MANIFEST.MF index bfe537357d..bccdb91ee7 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/META-INF/MANIFEST.MF @@ -2,18 +2,20 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Profiler Plug-in Bundle-SymbolicName: com.raytheon.edex.plugin.profiler -Bundle-Version: 1.12.1174.qualifier -Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization +Bundle-Version: 1.13.0.qualifier Bundle-Vendor: RAYTHEON -Require-Bundle: com.raytheon.edex.common, - 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-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Import-Package: com.raytheon.uf.common.dataplugin.profiler, - com.raytheon.uf.common.dataplugin.profiler.dao, - org.apache.commons.logging +Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization +Require-Bundle: com.raytheon.uf.common.dataplugin.profiler, + 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 diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-common.xml b/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-common.xml index 460474bf2a..d003a90df2 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-common.xml +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/res/spring/profiler-common.xml @@ -10,7 +10,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao/ProfilerDAO.java b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDAO.java similarity index 53% rename from edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao/ProfilerDAO.java rename to edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDAO.java index 76b263d7da..08ff3b8435 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao/ProfilerDAO.java +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDAO.java @@ -17,14 +17,10 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.dataplugin.profiler.dao; - -import java.util.List; - +package com.raytheon.edex.plugin.profiler; import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs; -import com.raytheon.uf.edex.database.DataAccessLayerException; import com.raytheon.uf.edex.pointdata.PointDataPluginDao; /** @@ -32,9 +28,10 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 20080303            969 jkorman     Initial implementation.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  969      jkorman     Initial implementation.
+ * Dec 03, 2013  2537     bsteffen    Move to edex plugin.
  * 
  * 
* @@ -52,46 +49,6 @@ public class ProfilerDAO extends PointDataPluginDao { 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 public String[] getKeysRequiredForFileName() { return new String[] { "dataTime.refTime" }; diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java index b82e388f07..f7374db9c6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerDecoder.java @@ -23,19 +23,15 @@ import java.util.ArrayList; import java.util.Iterator; 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.exception.DecoderException; import com.raytheon.edex.plugin.AbstractDecoder; import com.raytheon.edex.plugin.profiler.decoder.ProfilerDataAdapter; 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.pointdata.PointDataContainer; 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.BUFRDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRFile; @@ -54,11 +50,12 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 03, 2008 969        jkorman     Initial implementation.
- * Apr 08, 2008 1039       jkorman     Added traceId for tracing data.
- * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  969      jkorman     Initial implementation.
+ * Apr 08, 2008  1039     jkorman     Added traceId for tracing data.
+ * Aug 30, 2013  2298     rjpeter     Make getPluginName abstract
+ * Dec 03, 2013  2537     bsteffen    Switch logger to ufstatus.
  * 
  * 
* @@ -72,7 +69,8 @@ public class ProfilerDecoder extends AbstractDecoder implements public static final String PLUGIN_NAME = "profiler"; /** The logger */ - private final Log logger = LogFactory.getLog(getClass()); + private static final IUFStatusHandler logger = UFStatus + .getHandler(ProfilerDecoder.class); 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 * observation is a duplicate in the database or is invalid. */ - public PluginDataObject[] decode(byte[] data, Headers headers) - throws DecoderException { + public PluginDataObject[] decode(byte[] data, Headers headers) { String traceId = ""; if (headers != null) { @@ -161,14 +158,6 @@ public class ProfilerDecoder extends AbstractDecoder implements container, traceId); if (soundingData != null) { soundingData.setTraceId(traceId); - try { - soundingData.constructDataURI(); - PointDataView view = soundingData - .getPointDataView(); - } catch (PluginException e) { - logger.error(traceId - + "- Unable to construct dataURI", e); - } pdoList.add(soundingData); } } diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerSeparator.java b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerSeparator.java index eb94e3fc28..c808091d5a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerSeparator.java +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/ProfilerSeparator.java @@ -22,11 +22,10 @@ package com.raytheon.edex.plugin.profiler; import java.util.ArrayList; 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.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.BUFRDocument; import com.raytheon.uf.edex.decodertools.bufr.BUFRFile; @@ -46,9 +45,10 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 20080303            969 jkorman     Initial implementation.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  969      jkorman     Initial implementation.
+ * Dec 03, 2013  2537     bsteffen    Switch logger to ufstatus.
  * 
  * 
* @@ -58,7 +58,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; public class ProfilerSeparator extends AbstractRecordSeparator implements IDescriptorFactorySelector { - private Log logger = LogFactory.getLog(getClass()); + private static final IUFStatusHandler logger = UFStatus + .getHandler(ProfilerSeparator.class); private WMOHeader wmoHeader = null; diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java index 4613dec3a1..fc5dc7ec91 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java @@ -26,9 +26,6 @@ import java.util.Calendar; import java.util.Iterator; 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.ProfilerSite; 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.PointDataView; 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.edex.decodertools.bufr.BUFRDataDocument; import com.raytheon.uf.edex.decodertools.bufr.packets.BUFRSublistPacket; @@ -55,11 +54,12 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 03, 2008 969        jkorman     Initial implementation.
- * May 09, 2013 1869       bsteffen    Modified D2D time series of point data to
- *                                     work without dataURI.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  969      jkorman     Initial implementation.
+ * May 09, 2013  1869     bsteffen    Modified D2D time series of point data to
+ *                                    work without dataURI.
+ * Dec 03, 2013  2537     bsteffen    Switch logger to ufstatus.
  * 
  * 
* @@ -68,7 +68,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; */ 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"; diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/pointdata/sfcobsdb.xml b/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/pointdata/sfcobsdb.xml index bcb74b5312..68b643a85b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/pointdata/sfcobsdb.xml +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/res/pointdata/sfcobsdb.xml @@ -26,4 +26,6 @@ + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.uengine/utility/edex_static/base/python/SfcObsRequest.py b/edexOsgi/com.raytheon.edex.uengine/utility/edex_static/base/python/SfcObsRequest.py index 82a5468d7c..15fbff13c2 100644 --- a/edexOsgi/com.raytheon.edex.uengine/utility/edex_static/base/python/SfcObsRequest.py +++ b/edexOsgi/com.raytheon.edex.uengine/utility/edex_static/base/python/SfcObsRequest.py @@ -20,7 +20,7 @@ import PointDataQuery 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 # @@ -34,6 +34,7 @@ from com.raytheon.uf.common.message.response import ResponseMessageGeneric # 06/03/09 chammack Initial Creation. # 10/28/10 5705 cjeanbap Updated SfcObsPointDataTransform.MAN_PARAMS_LISTs # 01/13/11 5705 cjeanbap Added makeNullResponse method. +# 12/05/13 2537 bsteffen Update package for the transform. # # diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF index 7c20698618..39366cc321 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/MANIFEST.MF @@ -2,24 +2,17 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Obs Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.obs -Bundle-Version: 1.0.0.qualifier -Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization +Bundle-Version: 1.13.0.qualifier Bundle-Vendor: RAYTHEON +Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization Export-Package: com.raytheon.uf.common.dataplugin.obs.metar, com.raytheon.uf.common.dataplugin.obs.metar.util -Import-Package: com.raytheon.uf.common.dataplugin, - com.raytheon.uf.common.dataplugin.annotations, - com.raytheon.uf.common.dataplugin.persist, - com.raytheon.uf.common.geospatial, +Require-Bundle: com.raytheon.uf.common.dataplugin, 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.util, - javax.measure.quantity, - javax.measure.unit, - javax.persistence -Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1174", - org.hibernate;bundle-version="1.0.0" + com.raytheon.uf.common.geospatial, + com.raytheon.uf.common.serialization, + com.raytheon.uf.common.dataaccess, + javax.measure diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index bd8388a5ff..856ae0f724 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -1,3 +1 @@ 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 \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/build.properties b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/build.properties index 34d2e4d2da..5791d48d5f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/build.properties +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + res/ diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/res/spring/obs-common-dataaccess.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/res/spring/obs-common-dataaccess.xml new file mode 100644 index 0000000000..628f126dec --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/res/spring/obs-common-dataaccess.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/SkyCover.java b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/SkyCover.java index 806bb66f91..5fb9e87b76 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/SkyCover.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/SkyCover.java @@ -32,7 +32,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; 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.DynamicSerializeElement; @@ -43,11 +42,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 2/14/2007 139 Phillippe initial creation - * 20080414 996 jkorman Added cloud genus field. - * 20090511 2338 jsanchez Implemented the Comparable interface. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Feb 14, 2007 139 Phillippe initial creation + * Apr 14, 2008 996 jkorman Added cloud genus field. + * May 11, 2009 2338 jsanchez Implemented the Comparable interface. + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @@ -56,7 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class SkyCover implements Serializable, ISerializableObject, +public class SkyCover implements Serializable, Comparable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/WeatherCondition.java b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/WeatherCondition.java index 8f33fab873..0a8b33bd55 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/WeatherCondition.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/util/WeatherCondition.java @@ -36,7 +36,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; 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.DynamicSerializeElement; @@ -47,10 +46,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 2/14/2007 139 Phillippe Initial creation - * + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Feb 14, 2007 139 Phillippe Initial creation + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @author bphillip @@ -58,7 +58,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class WeatherCondition implements Serializable, ISerializableObject { +public class WeatherCondition implements Serializable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/META-INF/MANIFEST.MF index 0328d6cc49..9e80afc430 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/META-INF/MANIFEST.MF @@ -2,23 +2,18 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Profiler Plug-in Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.profiler -Bundle-Version: 1.12.1174.qualifier +Bundle-Version: 1.13.0.qualifier Bundle-Vendor: RAYTHEON -Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization +Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization Export-Package: com.raytheon.uf.common.dataplugin.profiler, com.raytheon.uf.common.dataplugin.profiler.dao -Require-Bundle: com.raytheon.uf.common.dataplugin;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.datastorage;bundle-version="1.12.1174", - com.raytheon.uf.common.status;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", - 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 +Require-Bundle: com.raytheon.uf.common.dataplugin, + com.raytheon.uf.common.pointdata, + com.raytheon.uf.common.datastorage, + com.raytheon.uf.common.serialization, + com.raytheon.uf.common.geospatial, + com.raytheon.uf.common.status, + com.raytheon.uf.common.dataaccess, + javax.measure diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/build.properties b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/build.properties index 34d2e4d2da..5791d48d5f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/build.properties +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + res/ diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/res/spring/profiler-common-dataaccess.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/res/spring/profiler-common-dataaccess.xml new file mode 100644 index 0000000000..e123267d90 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/res/spring/profiler-common-dataaccess.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + height + uComponent + vComponent + HorizSpStdDev + wComponent + VertSpStdDev + peakPower + levelMode + uvQualityCode + consensusNum + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerLevel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerLevel.java index 8eaaa8413d..03a196e00a 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerLevel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerLevel.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -34,9 +33,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 20080303            969 jkorman     Initial implementation.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  969      jkorman     Initial implementation.
+ * Dec 03, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -45,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class ProfilerLevel implements Serializable, ISerializableObject, Comparable { +public class ProfilerLevel implements Serializable, Comparable { private static final long serialVersionUID = 1L; @@ -327,13 +327,9 @@ public class ProfilerLevel implements Serializable, ISerializableObject, Compara */ @Override public int compareTo(ProfilerLevel other) { - final int BEFORE = -1; - final int EQUAL = 0; - final int AFTER = 1; - int result = 0; if (this == other) { - result = EQUAL; + result = 0; } else { result = levelHeight.compareTo(other.levelHeight); } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java index 3c8720bf16..a777ca0452 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/ProfilerObs.java @@ -21,17 +21,8 @@ package com.raytheon.uf.common.dataplugin.profiler; import java.util.ArrayList; import java.util.Calendar; -import java.util.Collection; -import java.util.HashMap; import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.measure.quantity.Angle; -import javax.measure.quantity.Velocity; -import javax.measure.unit.NonSI; -import javax.measure.unit.SI; -import javax.measure.unit.Unit; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -49,7 +40,6 @@ import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.IPersistable; @@ -69,18 +59,19 @@ import com.vividsolutions.jts.geom.Geometry; * *
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 03, 2008 969        jkorman     Initial implementation.
- * Apr 13, 2009 2251       jsanchez    Implemented IDecoderGettable methods  and
- *                                     plotted Profiler plots.
- * Jun 10, 2009 2489       jsanchez    Updated the windSpeeed & windDirection.
- * Apr 04, 2013 1846       bkowal      Added an index on refTime and
- *                                     forecastTime
- * Apr 12, 2013 1857       bgonzale    Added SequenceGenerator annotation.
- * May 07, 2013 1869       bsteffen    Remove dataURI column from
- *                                     PluginDataObject.
- * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Mar 03, 2008  969      jkorman     Initial implementation.
+ * Apr 13, 2009  2251     jsanchez    Implemented IDecoderGettable methods  and
+ *                                    plotted Profiler plots.
+ * Jun 10, 2009  2489     jsanchez    Updated the windSpeeed & windDirection.
+ * Apr 04, 2013  1846     bkowal      Added an index on refTime and
+ *                                    forecastTime
+ * Apr 12, 2013  1857     bgonzale    Added SequenceGenerator annotation.
+ * May 07, 2013  1869     bsteffen    Remove dataURI column from 
+ *                                    PluginDataObject.
+ * Aug 30, 2013  2298     rjpeter     Make getPluginName abstract
+ * Dec 03, 2013  2537     bsteffen    Remove IDecoderGettable
  * 
  * 
* @@ -100,53 +91,13 @@ import com.vividsolutions.jts.geom.Geometry; @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ProfilerObs extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable, + ISpatialEnabled, IPointData, IPersistable, Comparable { private static final long serialVersionUID = 1L; public static final String PLUGIN_NAME = "profiler"; - private static final HashMap HGT_MAP = new HashMap(); - 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 LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - private static final HashMap PARM_MAP = new HashMap(); - - 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 private String parameterName = null; @@ -383,75 +334,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements 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 getValues(String paramName) { - return null; - } - /** * Get the WMOHeader of the file that contained this data. * @@ -508,17 +390,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements 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 public SurfaceObsLocation getSpatialObject() { return location; @@ -554,86 +425,6 @@ public class ProfilerObs extends PersistablePluginDataObject implements 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"; } - /** - * 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 public int compareTo(ProfilerObs other) { - final int BEFORE = -1; - final int EQUAL = 0; - final int AFTER = 1; int result = 0; if (this == other) { - result = EQUAL; + result = 0; } else { result = timeObs.compareTo(other.timeObs); } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao/ProfilerDataTransform.java b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao/ProfilerDataTransform.java index 66504dbe0e..adc09d76d9 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao/ProfilerDataTransform.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.profiler/src/com/raytheon/uf/common/dataplugin/profiler/dao/ProfilerDataTransform.java @@ -21,18 +21,18 @@ package com.raytheon.uf.common.dataplugin.profiler.dao; import java.util.ArrayList; import java.util.Arrays; +import java.util.Calendar; import java.util.Collections; 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.ProfilerObs; import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataView; 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} @@ -41,9 +41,10 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Oct 28, 2009 jkorman Initial creation + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Oct 28, 2009 jkorman Initial creation + * Dec 03, 2013 2537 bsteffen Switch logger to ufstatus. * * * @@ -53,7 +54,8 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; 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", "profilerId", "profilerName", "validTime", "latitude", "longitude", @@ -102,7 +104,9 @@ public class ProfilerDataTransform { obs = new ProfilerObs(uri); 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(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/MANIFEST.MF index b15080e99e..0d5129548a 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/MANIFEST.MF @@ -2,16 +2,16 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Sfcobs Plug-in Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.sfcobs -Bundle-Version: 1.12.1174.qualifier -Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization +Bundle-Version: 1.13.0.qualifier Bundle-Vendor: RAYTHEON +Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Eclipse-RegisterBuddy: 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.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 -Import-Package: com.raytheon.uf.common.status, - org.apache.commons.logging diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index 5878073d48..edfaa03562 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -1,7 +1 @@ -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 \ No newline at end of file +com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/build.properties b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/build.properties index 34d2e4d2da..5791d48d5f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/build.properties +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + res/ diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/res/spring/sfcobs-common-dataaccess.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/res/spring/sfcobs-common-dataaccess.xml new file mode 100644 index 0000000000..795f932ff4 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/res/spring/sfcobs-common-dataaccess.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncBase.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncBase.java index 19ab2d2f2a..2557d1f6cd 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncBase.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncBase.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -37,9 +36,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 20070925 391 jkorman Initial Coding. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Sep 25, 2007 391 jkorman Initial Coding. + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @author jkorman @@ -47,7 +48,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public abstract class AncBase implements ISerializableObject { +public abstract class AncBase { // Type of the observation. @DynamicSerializeElement diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncCloud.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncCloud.java index 7ea3d9b43c..bf32168c3f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncCloud.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncCloud.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -34,9 +33,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 20070925 391 jkorman Initial Coding. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Sep 25, 2007 391 jkorman Initial Coding. + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @author jkorman @@ -44,7 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class AncCloud implements Serializable, ISerializableObject { +public class AncCloud implements Serializable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncPrecip.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncPrecip.java index 4fcb98189d..93d2f7847e 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncPrecip.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncPrecip.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -34,9 +33,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 20070925 391 jkorman Initial Coding. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Sep 25, 2007 391 jkorman Initial Coding. + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @author jkorman @@ -44,8 +45,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class AncPrecip extends AncBase implements Serializable, - ISerializableObject { +public class AncPrecip extends AncBase implements Serializable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncTemp.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncTemp.java index 625e52eea8..2bb203a61b 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncTemp.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncTemp.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -36,9 +35,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 20070925 391 jkorman Initial Coding. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Sep 25, 2007 391 jkorman Initial Coding. + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @author jkorman @@ -46,8 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class AncTemp extends AncBase implements Serializable, - ISerializableObject { +public class AncTemp extends AncBase implements Serializable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWave.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWave.java index 3d0b25b59a..27d0df2cdd 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWave.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWave.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -36,9 +35,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 20070925 391 jkorman Initial Coding. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Sep 25, 2007 391 jkorman Initial Coding. + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @author jkorman @@ -46,7 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class AncWave implements Serializable, ISerializableObject { +public class AncWave implements Serializable { public static final Integer T_WIND_WAVE = 1000; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWind.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWind.java index 1e750e8da3..d3c58ab261 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWind.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/AncWind.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -36,9 +35,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 20070925 391 jkorman Initial Coding. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Sep 25, 2007 391 jkorman Initial Coding. + * Dec 03, 2013 2537 bsteffen Remove ISerializableObject + * * * * @author jkorman @@ -46,8 +47,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class AncWind extends AncBase implements Serializable, - ISerializableObject { +public class AncWind extends AncBase implements Serializable { private static final long serialVersionUID = 1L; diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.pointdata/META-INF/MANIFEST.MF index 4343015c1a..a1d04abc74 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.pointdata/META-INF/MANIFEST.MF @@ -2,30 +2,24 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: PointData Bundle-SymbolicName: com.raytheon.uf.common.pointdata -Bundle-Version: 1.12.1174.qualifier +Bundle-Version: 1.13.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 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, com.raytheon.uf.common.pointdata.accumulate, + com.raytheon.uf.common.pointdata.dataaccess, com.raytheon.uf.common.pointdata.elements, com.raytheon.uf.common.pointdata.requests, com.raytheon.uf.common.pointdata.spatial, 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 diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/Dimension.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/Dimension.java index a30246b22d..809930b166 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/Dimension.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/Dimension.java @@ -23,17 +23,16 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import com.raytheon.uf.common.serialization.ISerializableObject; - /** * Provides metadata (primarily the size) of a named dimension * *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jul 27, 2009            chammack     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Jul 27, 2009           chammack    Initial creation
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -41,7 +40,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) -public class Dimension implements ISerializableObject { +public class Dimension { @XmlAttribute(name = "name") private String dimensionName; diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/ParameterDescription.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/ParameterDescription.java index 6be79c020f..bc5a17e8a2 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/ParameterDescription.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/ParameterDescription.java @@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; 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.DynamicSerializeElement; @@ -39,10 +38,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 27, 2009            chammack     Initial creation
- * Jun 22, 2009      2538  jsanchez     Added missing  DynamicSerializeElement.
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Apr 27, 2009           chammack    Initial creation
+ * Jun 22, 2009  2538     jsanchez    Added missing  DynamicSerializeElement.
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -51,7 +51,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class ParameterDescription implements ISerializableObject { +public class ParameterDescription { @XmlAttribute(name = "name", required = true) @DynamicSerializeElement diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataContainer.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataContainer.java index 179b0aa393..d029f81f2a 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataContainer.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataContainer.java @@ -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.LongPointDataObject; 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.DynamicSerializeElement; @@ -57,9 +56,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 8, 2009            chammack     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Apr 08, 2009           chammack    Initial creation
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -69,7 +69,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @DynamicSerialize @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) -public class PointDataContainer implements ISerializableObject { +public class PointDataContainer { protected static final int DEFAULT_SZ = 2048; diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataRequestMessageConstraint.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataRequestMessageConstraint.java index fd69ee8b8a..2163875b52 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataRequestMessageConstraint.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataRequestMessageConstraint.java @@ -19,7 +19,6 @@ **/ 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.DynamicSerializeElement; @@ -30,9 +29,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jan 20, 2010            chammack     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Jan 20, 2010           chammack    Initial creation
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -40,7 +40,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * @version 1.0 */ @DynamicSerialize -public class PointDataRequestMessageConstraint implements ISerializableObject { +public class PointDataRequestMessageConstraint { @DynamicSerializeElement private String parameter; diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataSerializable.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataSerializable.java index f5bfebc698..4a7a0a18aa 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataSerializable.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataSerializable.java @@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import com.raytheon.uf.common.pointdata.elements.AbstractPointDataObject; -import com.raytheon.uf.common.serialization.ISerializableObject; /** * A serialization helper class for serializing pointdata maps @@ -33,9 +32,10 @@ import com.raytheon.uf.common.serialization.ISerializableObject; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 16, 2009            chammack     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Apr 16, 2009           chammack    Initial creation
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
  * 
  * 
* @@ -43,13 +43,12 @@ import com.raytheon.uf.common.serialization.ISerializableObject; * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) -public class PointDataSerializable implements ISerializableObject { +public class PointDataSerializable { @XmlElement(name = "item") public PointDataItemSerializable[] items; - public static class PointDataItemSerializable implements - ISerializableObject { + public static class PointDataItemSerializable { @XmlAttribute public String key; diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataThriftContainer.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataThriftContainer.java index 4e090a00f2..0b82b21704 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataThriftContainer.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/PointDataThriftContainer.java @@ -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.LongPointDataObject; 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.DynamicSerializeElement; @@ -41,19 +40,19 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jan 14, 2010            chammack     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * 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().
- * 	
  * 
* * @author chammack * @version 1.0 */ @DynamicSerialize -public class PointDataThriftContainer implements ISerializableObject { +public class PointDataThriftContainer { @DynamicSerializeElement FloatPointDataObject[] floatData; diff --git a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/dataaccess/PointDataAccessFactory.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/dataaccess/PointDataAccessFactory.java similarity index 99% rename from edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/dataaccess/PointDataAccessFactory.java rename to edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/dataaccess/PointDataAccessFactory.java index 9c159ff3d2..d26b9ffd1c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.modelsounding/src/com/raytheon/edex/plugin/modelsounding/dataaccess/PointDataAccessFactory.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/dataaccess/PointDataAccessFactory.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.edex.plugin.modelsounding.dataaccess; +package com.raytheon.uf.common.pointdata.dataaccess; import java.util.ArrayList; import java.util.Arrays; diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/elements/AbstractPointDataObject.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/elements/AbstractPointDataObject.java index a7bc160516..b5e4d3289c 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/elements/AbstractPointDataObject.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/elements/AbstractPointDataObject.java @@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import com.raytheon.uf.common.datastorage.records.IDataRecord; import com.raytheon.uf.common.pointdata.ParameterDescription; 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.DynamicSerializeElement; @@ -38,9 +37,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; *
  * 
  * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Apr 8, 2009            chammack     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Apr 08, 2009           chammack    Initial creation
+ * Dec 02, 2013  2537     bsteffen    Remove ISerializableObject
+ * 
  * 
  * 
* @@ -49,7 +50,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; */ @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public abstract class AbstractPointDataObject implements ISerializableObject { +public abstract class AbstractPointDataObject { static final int STORAGE_CHUNK_SIZE = 1024; diff --git a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/vadriver/VA_Driver.java b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/vadriver/VA_Driver.java index e5d04ed604..72e82c342b 100644 --- a/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/vadriver/VA_Driver.java +++ b/edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/vadriver/VA_Driver.java @@ -37,15 +37,17 @@ import com.raytheon.uf.common.status.UFStatus.Priority; import com.vividsolutions.jts.geom.Coordinate; /** - * TODO Add Description + * Driver for using the VA_Advanced progressive disclosure to generate + * localizaed spi files. * *
  * 
  * SOFTWARE HISTORY
  * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Feb 24, 2011            bfarmer     Initial creation
+ * Date          Ticket#  Engineer    Description
+ * ------------- -------- ----------- --------------------------
+ * Feb 24, 2011           bfarmer     Initial creation
+ * Dec 02, 2013  2537     bsteffen    Ensure streams are closed.
  * 
  * 
* @@ -128,8 +130,11 @@ public class VA_Driver { String line; String[] splitLine; ns = 0; + BufferedReader fis = null; + BufferedReader pis = null; + BufferedWriter fos = null; try { - BufferedReader fis = new BufferedReader(new InputStreamReader( + fis = new BufferedReader(new InputStreamReader( new FileInputStream(goodnessFile))); for (line = fis.readLine(); line != null; line = fis.readLine()) { if (line.startsWith("#")) @@ -180,7 +185,7 @@ public class VA_Driver { ++ns; } if (primary != null) { - BufferedReader pis = new BufferedReader(new InputStreamReader( + pis = new BufferedReader(new InputStreamReader( new FileInputStream(primary))); int g = 0x7FFFFFFF; for (String pline = pis.readLine(); pline != null; pline = pis @@ -205,7 +210,7 @@ public class VA_Driver { distInput = vaa .getVaAdvanced(latLonInput, goodnessInput, distInput); // Write the output. - BufferedWriter fos = new BufferedWriter(new OutputStreamWriter( + fos = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(output))); String nameFormat = String.format("%s%ds", "%", max_name); for (int i = 0; i < ns; ++i) { @@ -216,12 +221,40 @@ public class VA_Driver { distInput[i])); fos.newLine(); } - fos.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block. Please revise as appropriate. statusHandler.handle(Priority.PROBLEM, "Could not read File ", 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() + + "]"); + } + } } }