From 592218edb803f9382b825e0d8bf914257ca4173e Mon Sep 17 00:00:00 2001 From: Richard Peter Date: Fri, 30 Aug 2013 10:40:54 -0500 Subject: [PATCH] Issue #2298: Make getPluginName abstract Change-Id: Ieefc9ab24dee34ed5c653d035db2a2e1f0e6f9ae Former-commit-id: 54356ea774bfab26b85aff317fc759de41e259d1 --- .../d2d/nsharp/rsc/D2DNSharpDataObject.java | 15 +- .../scan/resource/ScanResourceData.java | 18 +- .../viz/radarapps/fsi/FSILauncherLayer.java | 42 +- .../viz/grid/data/RadarRequestableData.java | 9 +- .../raytheon/viz/grid/inv/GridUpdater.java | 41 +- .../raytheon/viz/grid/inv/RadarUpdater.java | 48 +- .../grid/record/RequestableDataRecord.java | 22 +- .../edex/plugin/airep/AirepDecoder.java | 29 +- .../binlightning/BinLightningDecoder.java | 125 +- .../plugin/bufrmos/common/BufrMosData.java | 204 +- .../bufrua/decoder/AbstractBUFRUAAdapter.java | 2 +- .../edex/plugin/ccfp/CcfpDecoder.java | 80 +- .../raytheon/edex/plugin/ccfp/CcfpRecord.java | 24 +- .../edex/plugin/gfe/db/dao/GFED2DDao.java | 21 +- .../goessounding/GOESSoundingDecoder.java | 6 +- .../edex/plugin/grib/Grib1Decoder.java | 47 +- .../edex/plugin/grib/GridToGribConverter.java | 20 +- .../CPCoutlookGribPostProcessor.java | 5 +- .../EnsembleGridAssembler.java | 6 +- .../decoderpostprocessors/GFSProcessor.java | 11 +- .../Nam80PostProcessor.java | 14 +- .../SixHrPrecipGridProcessor.java | 6 +- .../ThreeHrPrecipGridProcessor.java | 8 +- .../res/spring/ldadhydro-common.xml | 9 +- .../res/spring/ldadhydro-ingest.xml | 4 +- .../plugin/ldadhydro/dao/HydroDecoder.java | 17 +- .../res/spring/ldadmanual-common.xml | 6 - .../res/spring/ldadmanual-ingest.xml | 4 +- .../plugin/ldadmanual/dao/ManualDecoder.java | 42 +- .../ldadmanual/dao/ManualLdadRecord.java | 3657 ++++++------ .../ldadprofiler/common/ProfilerLdadObs.java | 501 +- .../modelsounding/ModelSoundingDecoder.java | 34 +- .../modelsounding/common/SoundingSite.java | 14 +- .../META-INF/MANIFEST.MF | 1 - ...f.common.serialization.ISerializableObject | 1 - .../res/spring/obs-ingest.xml | 4 +- .../raytheon/edex/plugin/obs/ObsDecoder.java | 68 +- .../plugin/obs/mesowest/MesowestDecoder.java | 150 - .../plugin/obs/mesowest/MesowestRecord.java | 361 -- .../obs/mesowest/util/package-info.java | 23 - .../edex/plugin/obs/metar/MetarDecoder.java | 41 +- .../obs/metar/MetarPointDataTransform.java | 20 +- .../edex/plugin/pirep/PirepDecoder.java | 15 +- .../poessounding/POESSoundingDecoder.java | 6 +- .../edex/plugin/profiler/ProfilerDecoder.java | 10 +- .../edex/plugin/radar/RadarDecoder.java | 26 +- .../edex/plugin/radar/dao/RadarDao.java | 15 +- .../edex/plugin/recco/RECCODecoder.java | 6 +- .../edex/plugin/recco/common/RECCORecord.java | 17 +- .../edex/plugin/redbook/RedbookDecoder.java | 22 +- .../plugin/redbook/common/RedbookRecord.java | 121 +- .../edex/plugin/sfcobs/SfcObsDecoder.java | 18 +- .../edex/plugin/shef/data/ShefRecord.java | 97 +- .../raytheon/edex/plugin/taf/TafDecoder.java | 25 +- .../edex/plugin/taf/common/TafRecord.java | 44 +- .../edex/plugin/text/TextDecoder.java | 45 +- .../raytheon/edex/plugin/text/TextRecord.java | 7 +- .../textlightning/TextLightningDecoder.java | 29 +- .../edex/uengine/tasks/query/TermQuery.java | 31 +- .../common/dataplugin/acars/ACARSRecord.java | 77 +- .../acarssounding/ACARSSoundingRecord.java | 44 +- .../common/dataplugin/airep/AirepRecord.java | 44 +- .../binlightning/BinLightningRecord.java | 91 +- .../common/dataplugin/bufrascat/AScatObs.java | 465 +- .../common/dataplugin/bufrhdw/BufrHDWObs.java | 1081 ++-- .../dataplugin/bufrmthdw/BufrMTHDWObs.java | 1081 ++-- .../uf/common/dataplugin/ncwf/BUFRncwf.java | 338 +- .../dataplugin/bufrquikscat/QUIKScatObs.java | 534 +- .../dataplugin/bufrsigwx/SigWxData.java | 399 +- .../dataplugin/bufrssmi/SSMIScanData.java | 501 +- .../uf/common/dataplugin/bufrua/UAObs.java | 1355 ++--- .../uf/common/dataplugin/cwa/CWARecord.java | 202 +- .../uf/common/dataplugin/cwat/CWATRecord.java | 25 +- .../uf/common/dataplugin/ffmp/FFMPRecord.java | 44 +- .../uf/common/dataplugin/fog/FogRecord.java | 59 +- .../dataplugin/fssobs/FSSObsRecord.java | 2354 ++++---- .../dataplugin/gfe/db/objects/GFERecord.java | 7 +- .../dataplugin/goessounding/GOESSounding.java | 589 +- .../uf/common/dataplugin/grib/GribRecord.java | 116 +- .../uf/common/dataplugin/grid/GridRecord.java | 39 +- .../dataplugin/ldadhydro/HydroLdadRecord.java | 1956 +++---- .../LdadmesonetPointDataTransform.java | 614 +- .../ldadmesonet/MesonetLdadRecord.java | 3071 +++++----- .../dataplugin/lsr/LocalStormReport.java | 932 +-- .../common/dataplugin/madis/MadisRecord.java | 52 +- .../dataplugin/npp/crimss/CrimssRecord.java | 7 +- .../dataplugin/npp/nucaps/NucapsRecord.java | 8 +- .../dataplugin/npp/viirs/VIIRSDataRecord.java | 26 +- .../dataplugin/obs/metar/MetarRecord.java | 3156 +++++----- .../common/dataplugin/pirep/PirepRecord.java | 66 +- .../dataplugin/poessounding/POESSounding.java | 297 +- .../preciprate/PrecipRateRecord.java | 33 +- .../dataplugin/profiler/ProfilerObs.java | 45 +- .../uf/common/dataplugin/qc/QCRecord.java | 3003 +++++----- .../uf/common/dataplugin/qpf/QPFRecord.java | 35 +- .../common/dataplugin/radar/RadarRecord.java | 85 +- .../dataplugin/satellite/SatelliteRecord.java | 29 +- .../uf/common/dataplugin/scan/ScanRecord.java | 13 +- .../common/dataplugin/sfcobs/ObsCommon.java | 3160 ++++++----- .../common/dataplugin/svrwx/SvrWxRecord.java | 372 +- .../tcg/TropicalCycloneGuidance.java | 374 +- .../tcs/TropicalCycloneSummary.java | 440 +- .../uf/common/dataplugin/vaa/VAARecord.java | 164 +- .../uf/common/dataplugin/vil/VILRecord.java | 31 +- .../warning/AbstractWarningRecord.java | 5 +- .../warning/PracticeWarningRecord.java | 12 +- .../dataplugin/warning/WarningRecord.java | 12 +- .../common/dataplugin/PluginDataObject.java | 37 +- .../dataplugin/annotations/DataURIUtil.java | 9 +- .../database/handlers/DbQueryHandler.java | 9 +- .../uf/edex/database/plugin/PluginDao.java | 21 +- .../util/ResponseProcessingUtilities.java | 17 +- .../filterimpl/PluginDataObjectFilter.java | 151 +- .../filterimpl/WMOHeaderFilterElement.java | 121 +- .../uf/edex/plugin/acars/dao/ACARSDao.java | 4 +- .../acars/decoder/ACARSDataAdapter.java | 17 +- .../acarssounding/tools/SoundingBuilder.java | 34 +- .../bufrascat/decoder/AScatDataAdapter.java | 2 +- .../bufrhdw/decoder/HDWDataAdapter.java | 2 +- .../bufrmthdw/decoder/MTHDWDataAdapter.java | 2 +- .../bufrncwf/decoder/BUFRncwfDataAdapter.java | 507 +- .../decoder/QUIKScatDataAdapter.java | 147 +- .../edex/plugin/bufrsigwx/SigWxDecoder.java | 29 +- .../bufrsigwx/decoder/SigWxDataAdapter.java | 97 +- .../bufrssmi/decoder/SSMIDataAdapter.java | 4 +- .../uf/edex/plugin/cwa/decoder/CWAParser.java | 33 +- .../uf/edex/plugin/cwat/CWATGenerator.java | 13 +- .../uf/edex/plugin/ffmp/FFMPGenerator.java | 62 +- .../uf/edex/plugin/fog/FogGenerator.java | 1 - .../plugin/fssobs/common/FSSObsConfig.java | 8 +- .../plugin/ldadmesonet/MesonetDecoder.java | 43 +- .../uf/edex/plugin/lsr/decoder/LSRParser.java | 14 +- .../edex/plugin/madis/ogc/feature/Madis.java | 213 +- .../uf/edex/plugin/madis/MadisDecoder.java | 255 +- .../edex/plugin/mesowest/MESOWestDecoder.java | 55 +- .../mesowest/common/MESOWestRecord.java | 151 +- .../npp/sounding/NPPSoundingDecoder.java | 16 +- .../preciprate/PrecipRateGenerator.java | 24 +- .../raytheon/uf/edex/plugin/qc/QCScanner.java | 69 +- .../uf/edex/plugin/qpf/QPFGenerator.java | 10 +- .../mcidas/McidasSatelliteDecoder.java | 41 +- .../uf/edex/plugin/scan/ScanGenerator.java | 9 +- .../plugin/svrwx/decoder/SvrWxParser.java | 22 +- .../uf/edex/plugin/tcg/decoder/HURData.java | 167 +- .../uf/edex/plugin/tcg/decoder/QLMData.java | 15 +- .../uf/edex/plugin/tcg/decoder/TCEData.java | 127 +- .../uf/edex/plugin/tcs/decoder/TCMData.java | 26 +- .../uf/edex/plugin/vaa/decoder/VAAParser.java | 12 +- .../uf/edex/plugin/vil/VILGenerator.java | 12 +- .../uf/edex/python/decoder/PythonDecoder.java | 20 +- .../dataplugin/airmet/AirmetRecord.java | 468 +- .../common/dataplugin/atcf/AtcfRecord.java | 1272 ++--- .../ncep/common/dataplugin/aww/AwwRecord.java | 481 +- .../convsigmet/ConvSigmetRecord.java | 405 +- .../ncep/common/dataplugin/ffg/FfgRecord.java | 208 +- .../dataplugin/geomag/GeoMagRecord.java | 13 +- .../common/dataplugin/idft/IdftRecord.java | 52 +- .../intlsigmet/IntlSigmetRecord.java | 910 +-- .../dataplugin/mcidas/McidasRecord.java | 30 +- .../ncairep/NcAirepPointDataTransform.java | 116 +- .../dataplugin/ncairep/NcAirepRecord.java | 1547 ++--- .../dataplugin/ncccfp/NcccfpRecord.java | 57 +- .../dataplugin/ncgrib/NcgribRecord.java | 396 +- .../dataplugin/ncpafm/NcPafmRecord.java | 578 +- .../dataplugin/ncpirep/NcPirepRecord.java | 1354 ++--- .../dataplugin/ncscat/NcscatRecord.java | 13 +- .../common/dataplugin/ncscd/NcScdRecord.java | 1000 ++-- .../ncscd/dao/NcScdPointDataTransform.java | 76 +- .../common/dataplugin/nctaf/NcTafRecord.java | 3188 ++++++----- .../dataplugin/ncuair/NcUairRecord.java | 993 ++-- .../nonconvsigmet/NonConvSigmetRecord.java | 906 ++- .../dataplugin/ntrans/NtransRecord.java | 228 +- .../common/dataplugin/pgen/PgenRecord.java | 12 +- .../common/dataplugin/sgwh/SgwhRecord.java | 3322 ++++++----- .../common/dataplugin/sgwhv/SgwhvRecord.java | 889 +-- .../solarimage/SolarImageRecord.java | 64 +- .../common/dataplugin/ssha/SshaRecord.java | 5056 +++++++++-------- .../stormtrack/StormTrackRecord.java | 1266 ++--- .../ncep/common/dataplugin/tcm/TcmRecord.java | 519 +- .../ncep/common/dataplugin/wcp/WcpRecord.java | 195 +- .../plugin/airmet/decoder/AirmetDecoder.java | 1 - .../edex/plugin/atcf/decoder/AtcfDecoder.java | 23 +- .../res/spring/aww-ingest.xml | 4 +- .../edex/plugin/aww/decoder/AwwDecoder.java | 282 +- .../convsigmet/decoder/ConvSigmetDecoder.java | 46 +- .../res/spring/ffg-ingest.xml | 4 +- .../edex/plugin/ffg/decoder/FfgDecoder.java | 32 +- .../res/spring/geomag-ingest.xml | 1 - .../edex/plugin/geomag/GeoMagDecoder.java | 1234 ++-- .../edex/plugin/idft/decoder/IdftDecoder.java | 58 +- .../intlsigmet/decoder/IntlSigmetDecoder.java | 6 +- .../plugin/mcidas/decoder/McidasDecoder.java | 1651 +++--- .../plugin/mosaic/common/MosaicRecord.java | 13 +- .../plugin/mosaic/common/dao/MosaicDao.java | 83 +- .../plugin/mosaic/decoder/MosaicDecoder.java | 48 +- .../edex/plugin/ncairep/NcAirepDecoder.java | 62 +- .../plugin/ncccfp/decoder/NcccfpDecoder.java | 540 +- .../edex/plugin/ncgrib/Ncgrib1Decoder.java | 418 +- .../edex/plugin/ncgrib/NcgridAssembler.java | 8 +- .../plugin/ncpafm/decoder/NcPafmDecoder.java | 115 +- .../edex/plugin/ncpirep/NcPirepDecoder.java | 229 +- .../plugin/ncscat/decoder/NcscatDecoder.java | 356 +- .../plugin/ncscd/decoder/NcScdDecoder.java | 57 +- .../plugin/nctaf/decoder/NcTafDecoder.java | 101 +- .../plugin/nctext/common/NctextRecord.java | 300 +- .../res/spring/ncuair-ingest.xml | 4 +- .../plugin/ncuair/decoder/NcUairDecoder.java | 1047 ++-- .../decoder/NonConvSigmetDecoder.java | 75 +- .../res/spring/ntrans-ingest.xml | 4 +- .../plugin/ntrans/decoder/NtransDecoder.java | 747 ++- .../pgen/handler/StoreActivityHandler.java | 7 +- .../edex/plugin/sgwh/decoder/SgwhDecoder.java | 40 +- .../plugin/sgwhv/decoder/SgwhvDecoder.java | 11 +- .../plugin/solarimage/SolarImageDecoder.java | 167 +- .../edex/plugin/ssha/decoder/SshaDecoder.java | 38 +- .../META-INF/MANIFEST.MF | 1 + .../res/spring/stormtrack-ingest.xml | 4 +- .../stormtrack/decoder/StormTrackDecoder.java | 81 +- .../edex/plugin/tcm/decoder/TcmDecoder.java | 44 +- .../edex/plugin/wcp/decoder/WcpDecoder.java | 35 +- .../tasks/profile/ObservedSoundingQuery.java | 3585 ++++++------ .../nws/ncep/ui/pgen/store/StorageUtils.java | 16 +- .../decoder/RegionalSatDecoder.java | 30 +- .../shef/TestMetarToShefTransformer.java | 49 +- 224 files changed, 36780 insertions(+), 36856 deletions(-) delete mode 100644 edexOsgi/com.raytheon.edex.plugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject delete mode 100644 edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestDecoder.java delete mode 100644 edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestRecord.java delete mode 100644 edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/util/package-info.java diff --git a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java index 659bfae96b..dd7015b2f2 100644 --- a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java +++ b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpDataObject.java @@ -32,15 +32,16 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Jul 26, 2011            bsteffen     Initial creation
- *
+ * Jul 26, 2011            bsteffen    Initial creation
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * 
  * 
- * + * * @author bsteffen * @version 1.0 */ @@ -79,4 +80,8 @@ public class D2DNSharpDataObject extends PluginDataObject { this.layers = layers; } + @Override + public String getPluginName() { + return "d2dnsharpdataobject"; + } } diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java index 998670cbb8..d1e632fd1c 100644 --- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java +++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java @@ -61,9 +61,10 @@ import com.raytheon.uf.viz.monitor.scan.ScanMonitor; * ------------ ---------- ----------- -------------------------- * Oct 13, 2009 dhladky Initial creation * Feb 28, 2013 1731 bsteffen Optimize construction of scan resource. - * Apr 18, 2013 1926 njensen Reuse URIs in construction of resource - * Jul 24, 2013 2218 mpduff Changed method signature. - * Aug 15, 2013 2143 mpduff Add missing data check. + * Apr 18, 2013 1926 njensen Reuse URIs in construction of resource + * Jul 24, 2013 2218 mpduff Changed method signature. + * Aug 15, 2013 2143 mpduff Add missing data check. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -206,7 +207,6 @@ public class ScanResourceData extends AbstractRequestableResourceData { public void populateRecords(ScanRecord[] records) throws VizException { Map> fileMap = new HashMap>(); for (ScanRecord record : records) { - record.setPluginName("scan"); File loc = HDF5Util.findHDF5Location(record); Set recordSet = fileMap.get(loc); if (recordSet == null) { @@ -263,12 +263,12 @@ public class ScanResourceData extends AbstractRequestableResourceData { List dataList = new ArrayList(); long[] times = monitor.getDMDMaxAngleTimes(icao); - int index = times.length - 1 < 0 ? 0 : times.length - 1; + int index = (times.length - 1) < 0 ? 0 : times.length - 1; if ((times != null) && (times.length != 0)) { - for (int i = 0; i < allTimes.length; i++) { - if (allTimes[i].getRefTime() != null) { - if (allTimes[i].getRefTime().getTime() == times[index]) { - dataList.add(allTimes[i]); + for (DataTime allTime : allTimes) { + if (allTime.getRefTime() != null) { + if (allTime.getRefTime().getTime() == times[index]) { + dataList.add(allTime); index--; if (index == -1) { break; diff --git a/cave/com.raytheon.uf.viz.radarapps.fsi/src/com/raytheon/uf/viz/radarapps/fsi/FSILauncherLayer.java b/cave/com.raytheon.uf.viz.radarapps.fsi/src/com/raytheon/uf/viz/radarapps/fsi/FSILauncherLayer.java index 33c05f9ddb..fb9647b41c 100644 --- a/cave/com.raytheon.uf.viz.radarapps.fsi/src/com/raytheon/uf/viz/radarapps/fsi/FSILauncherLayer.java +++ b/cave/com.raytheon.uf.viz.radarapps.fsi/src/com/raytheon/uf/viz/radarapps/fsi/FSILauncherLayer.java @@ -84,11 +84,11 @@ public class FSILauncherLayer extends private MouseHandler mouseHandler; - private MenuManager quickMenuManager; + private final MenuManager quickMenuManager; - private MenuManager fullMenuManager; + private final MenuManager fullMenuManager; - private Shell shell; + private final Shell shell; public FSILauncherLayer(FSILauncherResourceData fsiLauncherResourceData, LoadProperties loadProperties) { @@ -201,14 +201,16 @@ public class FSILauncherLayer extends } else { try { for (Object o : (ArrayList) ((ResponseMessageGeneric) response) - .getContents()) + .getContents()) { result.add((String) o); + } } catch (RuntimeException e) { throw new VizException("Unexpected server response", e); } } - } else + } else { throw new VizException("Could not load getFsiRadars.py"); + } } catch (VizException e) { statusHandler.handle(Priority.PROBLEM, "Could not retrieve FSI radar list", e); @@ -229,15 +231,16 @@ public class FSILauncherLayer extends geoClickedPoint = getResourceContainer().translateClick(x, y); if (isEditable()) { // panelClickPoint = new Point(x, y); - if (mouseButton == MOUSE_BUTTON_TO_USE) + if (mouseButton == MOUSE_BUTTON_TO_USE) { clicked = true; + } } return false; } @Override public boolean handleMouseUp(int x, int y, int mouseButton) { - if (clicked && mouseButton == MOUSE_BUTTON_TO_USE) { + if (clicked && (mouseButton == MOUSE_BUTTON_TO_USE)) { clicked = false; /* @@ -295,8 +298,9 @@ public class FSILauncherLayer extends throw new VizException("Unexpected server response", e); } } - } else + } else { throw new VizException("Could not retrieve FSI environment"); + } } catch (VizException e) { statusHandler.handle(Priority.PROBLEM, "Could not retrieve FSI radar list", e); @@ -307,7 +311,7 @@ public class FSILauncherLayer extends public class LaunchFSIAction extends Action { - private String radarName; + private final String radarName; private class StormVector { public boolean useSTI = true; @@ -393,7 +397,8 @@ public class FSILauncherLayer extends RadarRecord radarRecord = null; try { List obs = query.performQuery(); - if (obs != null && !obs.isEmpty() && obs.get(0).length > 0) { + if ((obs != null) && !obs.isEmpty() + && (obs.get(0).length > 0)) { radarRecord = (RadarRecord) obs.get(0)[0]; } else { // default to 0.5 for non-terminal radars, test if @@ -409,7 +414,6 @@ public class FSILauncherLayer extends } catch (RuntimeException e) { throw new VizException("Unexpected response format", e); } - radarRecord.setPluginName("radar"); // TODO: huh? File loc = HDF5Util.findHDF5Location(radarRecord); IDataStore dataStore = DataStoreFactory.getDataStore(loc); try { @@ -439,8 +443,9 @@ public class FSILauncherLayer extends private String createControlMessage() { FSIEnvironment env = getFSIEnvironment(); - if (env == null) + if (env == null) { return null; + } // According to FSI_GUI, this must have the format ##.## String subTypeStr = String.format("%04.2f", @@ -540,13 +545,14 @@ public class FSILauncherLayer extends @Override public void run() { String controlMessage = createControlMessage(); - if (controlMessage == null) + if (controlMessage == null) { return; + } File f = PathManagerFactory.getPathManager().getStaticFile( "fsi" + File.separator + FSI_START_SCRIPT_NAME); - if (f == null || !f.exists()) { + if ((f == null) || !f.exists()) { statusHandler.handle(Priority.PROBLEM, "Could not find the FSI start script."); return; @@ -604,12 +610,14 @@ public class FSILauncherLayer extends int nLines = 0; while (true) { String s = br.readLine(); - if (s == null) + if (s == null) { break; + } sb.append(s); sb.append('\n'); - if (++nLines >= MAX_LINES) + if (++nLines >= MAX_LINES) { break; + } } } catch (IOException e) { e.printStackTrace(System.err); @@ -628,7 +636,7 @@ public class FSILauncherLayer extends statusHandler .handle(Priority.PROBLEM, "FSI failed to start: " - + sb.toString()); + + sb.toString()); return; } } catch (InterruptedException e) { diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/data/RadarRequestableData.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/data/RadarRequestableData.java index be8f1a1d20..0f0e3bc2f3 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/data/RadarRequestableData.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/data/RadarRequestableData.java @@ -27,7 +27,6 @@ import javax.measure.unit.Unit; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.comm.CommunicationException; -import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.radar.RadarRecord; @@ -57,7 +56,8 @@ import com.raytheon.viz.grid.util.SliceUtil; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Mar 18, 2010 #4473 rjpeter Initial creation + * Mar 18, 2010 4473 rjpeter Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -69,9 +69,9 @@ public class RadarRequestableData extends GridRequestableData { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(RadarRequestableData.class); - private RadarRecord radarSource; + private final RadarRecord radarSource; - private RadarMapper tiler; + private final RadarMapper tiler; private WeakReference cache = null; @@ -107,7 +107,6 @@ public class RadarRequestableData extends GridRequestableData { Parameter parameter = new Parameter(parameterAbbrev, this.parameterName, unit); record.setParameter(parameter); - record.setPluginName(GridConstants.GRID); record.setDataTime(source.getDataTime()); record.constructDataURI(); setGridSource(record); diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java index 367873f2e3..2b169677c9 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java @@ -58,7 +58,8 @@ import com.raytheon.viz.grid.util.RadarAdapter; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Mar 25, 2010 bsteffen Initial creation + * Mar 25, 2010 bsteffen Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -88,9 +89,9 @@ public class GridUpdater implements IAlertObserver { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + getOuterType().hashCode(); - result = prime * result + ((node == null) ? 0 : node.hashCode()); - result = prime * result + timeOffset; + result = (prime * result) + getOuterType().hashCode(); + result = (prime * result) + ((node == null) ? 0 : node.hashCode()); + result = (prime * result) + timeOffset; return result; } @@ -101,22 +102,29 @@ public class GridUpdater implements IAlertObserver { */ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } UpdateValue other = (UpdateValue) obj; - if (!getOuterType().equals(other.getOuterType())) + if (!getOuterType().equals(other.getOuterType())) { return false; + } if (node == null) { - if (other.node != null) + if (other.node != null) { return false; - } else if (!node.equals(other.node)) + } + } else if (!node.equals(other.node)) { return false; - if (timeOffset != other.timeOffset) + } + if (timeOffset != other.timeOffset) { return false; + } return true; } @@ -126,11 +134,11 @@ public class GridUpdater implements IAlertObserver { } - private Set myUpdates = new HashSet(); + private final Set myUpdates = new HashSet(); - private GridInventory inventory; + private final GridInventory inventory; - private Map> updateMap = new HashMap>(); + private final Map> updateMap = new HashMap>(); public GridUpdater(GridInventory inventory) { this.inventory = inventory; @@ -147,7 +155,7 @@ public class GridUpdater implements IAlertObserver { public synchronized void addNode(AbstractDerivedDataNode node) throws VizException { List dependencies = node.getDependencies(); - if (dependencies == null || dependencies.isEmpty()) { + if ((dependencies == null) || dependencies.isEmpty()) { return; } List dep = new ArrayList(dependencies); @@ -238,7 +246,7 @@ public class GridUpdater implements IAlertObserver { // Null means it is an alias model and supplement means // there exists a true GribNode buried under the or // node - if (method == null + if ((method == null) || !method.getName().equals("Supplement")) { inventory.reinitTree(); // System.out.println(((AbstractDerivedLevelNode) lNode) @@ -256,7 +264,6 @@ public class GridUpdater implements IAlertObserver { } for (UpdateValue value : set) { GridRecord fakeRec = new GridRecord(); - fakeRec.setPluginName(GridInventory.PLUGIN_NAME); Object obj = alert.decodedAlert.get("dataTime"); if (!(obj instanceof DataTime)) { throw new IllegalArgumentException( diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/RadarUpdater.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/RadarUpdater.java index 8dc2089ab6..f74e5ce966 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/RadarUpdater.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/RadarUpdater.java @@ -38,7 +38,8 @@ import com.raytheon.viz.grid.util.RadarProductCodeMapping; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Sep 20, 2012 bsteffen Initial creation + * Sep 20, 2012 bsteffen Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -77,33 +78,39 @@ public class RadarUpdater implements IAlertObserver { public int hashCode() { final int prime = 31; int result = 1; - result = prime - * result + result = (prime * result) + ((elevationAngle == null) ? 0 : elevationAngle.hashCode()); - result = prime * result + result = (prime * result) + ((productCode == null) ? 0 : productCode.hashCode()); return result; } @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } CacheKey other = (CacheKey) obj; if (elevationAngle == null) { - if (other.elevationAngle != null) + if (other.elevationAngle != null) { return false; - } else if (!elevationAngle.equals(other.elevationAngle)) + } + } else if (!elevationAngle.equals(other.elevationAngle)) { return false; + } if (productCode == null) { - if (other.productCode != null) + if (other.productCode != null) { return false; - } else if (!productCode.equals(other.productCode)) + } + } else if (!productCode.equals(other.productCode)) { return false; + } return true; } @@ -122,7 +129,7 @@ public class RadarUpdater implements IAlertObserver { } - private Map cache = new LinkedHashMap( + private final Map cache = new LinkedHashMap( 100, .75f, true) { private static final long serialVersionUID = 2022670836957170184L; @@ -152,14 +159,14 @@ public class RadarUpdater implements IAlertObserver { for (AlertMessage alertMessage : alertMessages) { String icao = alertMessage.decodedAlert .get(RadarAdapter.ICAO_QUERY).toString(); - if (icao == null + if ((icao == null) || !icao.equalsIgnoreCase(configuredRadar.getRdaId())) { continue; } globalTimes = null; Object obj = alertMessage.decodedAlert .get(RadarAdapter.PRODUCT_CODE_QUERY); - if (obj == null || !(obj instanceof Integer)) { + if ((obj == null) || !(obj instanceof Integer)) { continue; } Integer productCode = (Integer) obj; @@ -169,12 +176,12 @@ public class RadarUpdater implements IAlertObserver { continue; } obj = alertMessage.decodedAlert.get("dataTime"); - if (obj == null || !(obj instanceof DataTime)) { + if ((obj == null) || !(obj instanceof DataTime)) { continue; } DataTime time = (DataTime) obj; obj = alertMessage.decodedAlert.get(RadarAdapter.TILT_QUERY); - if (obj == null || !(obj instanceof Double)) { + if ((obj == null) || !(obj instanceof Double)) { continue; } Double elevationAngle = (Double) obj; @@ -188,7 +195,6 @@ public class RadarUpdater implements IAlertObserver { e1.getLocalizedMessage(), e1); } GridRecord fakeRec = new GridRecord(); - fakeRec.setPluginName(GridInventory.PLUGIN_NAME); fakeRec.setDataTime(time); fakeRec.setDatasetId(RadarAdapter.RADAR_SOURCE); @@ -209,12 +215,12 @@ public class RadarUpdater implements IAlertObserver { private CacheKey getCacheKey(RadarRequestableLevelNode rNode) { Map rcMap = rNode.getRequestConstraintMap(); RequestConstraint rc = rcMap.get(RadarAdapter.PRODUCT_CODE_QUERY); - if (rc == null || rc.getConstraintType() != ConstraintType.EQUALS) { + if ((rc == null) || (rc.getConstraintType() != ConstraintType.EQUALS)) { return null; } Integer productCode = Integer.parseInt(rc.getConstraintValue()); rc = rcMap.get(RadarAdapter.TILT_QUERY); - if (rc == null || rc.getConstraintType() != ConstraintType.EQUALS) { + if ((rc == null) || (rc.getConstraintType() != ConstraintType.EQUALS)) { return null; } Double elevationAngle = Double.parseDouble(rc.getConstraintValue()); @@ -232,7 +238,7 @@ public class RadarUpdater implements IAlertObserver { if (entry == null) { return null; } - if (entry.insertTime + CACHE_TIME < System.currentTimeMillis()) { + if ((entry.insertTime + CACHE_TIME) < System.currentTimeMillis()) { cache.remove(cacheKey); return null; } @@ -248,7 +254,7 @@ public class RadarUpdater implements IAlertObserver { if (globalTimes == null) { return null; } - if (globalInsertTime + CACHE_TIME < System.currentTimeMillis()) { + if ((globalInsertTime + CACHE_TIME) < System.currentTimeMillis()) { globalTimes = null; return null; } diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/record/RequestableDataRecord.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/record/RequestableDataRecord.java index e064b79af2..aef53d86d3 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/record/RequestableDataRecord.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/record/RequestableDataRecord.java @@ -24,7 +24,6 @@ import java.util.Collection; import java.util.List; import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.datastorage.Request; import com.raytheon.uf.common.datastorage.records.FloatDataRecord; @@ -40,17 +39,18 @@ import com.raytheon.viz.grid.util.TiltRequest; /** * A PDO that extends GridRecord and wraps a AbstractRequestableData to allow * derived parameters to be used anywhere GridRecords can be used. - * + * *
- *
+ * 
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Mar 18, 2010            bsteffen     Initial creation
+ * Mar 18, 2010            bsteffen    Initial creation
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * 
  * 
- *
  * 
- * + * * @author bsteffen * @version 1.0 */ @@ -67,9 +67,10 @@ public class RequestableDataRecord extends GridRecord { GridCoverage coverage = null; if (requester.getSpace() instanceof GridCoverage) { coverage = (GridCoverage) requester.getSpace(); - if (requester instanceof GridRequestableData) { - setSecondaryId(((GridRequestableData) requester).getGridSource().getSecondaryId()); - } + if (requester instanceof GridRequestableData) { + setSecondaryId(((GridRequestableData) requester) + .getGridSource().getSecondaryId()); + } } setDatasetId(requester.getSource()); setLocation(coverage); @@ -78,7 +79,6 @@ public class RequestableDataRecord extends GridRecord { requester.getParameterName(), requester.getUnit()); setParameter(parameter); - setPluginName(GridConstants.GRID); setDataTime(requester.getDataTime()); try { constructDataURI(); @@ -142,7 +142,7 @@ public class RequestableDataRecord extends GridRecord { } } float[] data = new float[nx * ny]; - for (int i = 0; i < nx * ny; i++) { + for (int i = 0; i < (nx * ny); i++) { data[i] = ((Number) obj).floatValue(); } FloatDataRecord rec = new FloatDataRecord(this.getParameter() diff --git a/edexOsgi/com.raytheon.edex.plugin.airep/src/com/raytheon/edex/plugin/airep/AirepDecoder.java b/edexOsgi/com.raytheon.edex.plugin.airep/src/com/raytheon/edex/plugin/airep/AirepDecoder.java index a3e0b510ba..d9dbd0556c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.airep/src/com/raytheon/edex/plugin/airep/AirepDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.airep/src/com/raytheon/edex/plugin/airep/AirepDecoder.java @@ -47,19 +47,18 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * } * * - * + * *
  * 
  * SOFTWARE HISTORY
  * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * 20080103            384 jkorman     Initial Coding.
- * 20080408           1039 jkorman     Added traceId for tracing data.
- * 11/11/08           1684 chammack    Camel Refactor
- * ======================================
- * AWIPS2 DR Work
- * 20120911           1011 jkorman     Added decode of AIREP turbulence.
+ * Jan 03, 2008 384        jkorman     Initial Coding.
+ * Apr 08, 2008 1039       jkorman     Added traceId for tracing data.
+ * Nov 11, 2008 1684       chammack    Camel Refactor
+ * Sep 11, 2012 1011       jkorman     Added decode of AIREP turbulence.
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
  * 
* * @author jkorman @@ -103,19 +102,19 @@ public class AirepDecoder extends AbstractDecoder { try { WMOHeader wmoHeader = input.wmoHeader; - if(wmoHeader != null) { + if (wmoHeader != null) { traceId = wmoHeader.getWmoHeader().replace(" ", "_"); logger.info(traceId + "- AirepDecoder.decode()"); Calendar refTime = TimeTools.findDataTime( wmoHeader.getYYGGgg(), header); - if(refTime != null) { - report = populateRecord(new AirepParser(input.report, refTime)); + if (refTime != null) { + report = populateRecord(new AirepParser(input.report, + refTime)); } } if (report != null) { report.setTraceId(traceId); - report.setPluginName(PLUGIN_NAME); try { report.constructDataURI(); } catch (PluginException e) { @@ -182,17 +181,17 @@ public class AirepDecoder extends AbstractDecoder { } AirepParser.Turbulence turb = parser.getTurbulence(); int t = -1; - if(turb != null) { + if (turb != null) { t = turb.getTurbulence() << 4; } - if(flightConditions > -1) { - if(t > -1) { + if (flightConditions > -1) { + if (t > -1) { record.setFlightConditions(flightConditions | t); } else { record.setFlightConditions(flightConditions); } } else { - if(t > -1) { + if (t > -1) { record.setFlightConditions(t); } } diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/BinLightningDecoder.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/BinLightningDecoder.java index 40a557f8ec..9d1894ecfb 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/BinLightningDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/BinLightningDecoder.java @@ -64,18 +64,21 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20070810 379 jkorman Initial Coding from prototype. - * 20070817 379 jkorman Changed log info to debug in decode(). - * 20070821 379 jkorman Added SFPA41 lightning data pattern. - * 20070912 379 jkorman Code review cleanup. - * 20070920 379 jkorman Check for null persistence time. - * 20070924 379 jkorman Removed HDFGroup code. Set insert_time + * Aug 10, 2007 379 jkorman Initial Coding from prototype. + * Aug 17, 2007 379 jkorman Changed log info to debug in decode(). + * Aug 21, 2007 379 jkorman Added SFPA41 lightning data pattern. + * Sep 12, 2007 379 jkorman Code review cleanup. + * Sep 20, 2007 379 jkorman Check for null persistence time. + * Sep 24, 2007 379 jkorman Removed HDFGroup code. Set insert_time * directly in decode. - * 20070926 379 jkorman Updated to set DataTime. - * 20080318 1026 jkorman Added debug strike info. - * 20080408 1039 jkorman Added traceId for tracing data. - * 11/11/08 1684 chammack Refactored for camel integration - * 20130503 DCS 112 Wufeng Zhou Modified to be able to handle both the new encrypted data and legacy bit-shifted data + * Sep 26, 2007 379 jkorman Updated to set DataTime. + * Mar 18, 2008 1026 jkorman Added debug strike info. + * Apr 08, 2008 1039 jkorman Added traceId for tracing data. + * Nov 11, 2008 1684 chammack Refactored for camel integration + * May 03, 2013 DCS 112 Wufeng Zhou Modified to be able to handle both the + * new encrypted data and legacy bit-shifted + * data + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -90,9 +93,9 @@ public class BinLightningDecoder extends AbstractDecoder { // Allow ingest up to 10 minutes into the future. private static final long TEN_MINUTES = 10 * 60 * 1000L; - private SimpleDateFormat SDF; + private final SimpleDateFormat SDF; - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); /** * Default lightning strike type for FLASH messages. RT_FLASH documents @@ -101,7 +104,7 @@ public class BinLightningDecoder extends AbstractDecoder { public LtgStrikeType DEFAULT_FLASH_TYPE = LtgStrikeType.STRIKE_CG; private String traceId = null; - + /** * Construct a BinLightning decoder. Calling hasNext() after construction * will return false, decode() will return a null. @@ -118,9 +121,10 @@ public class BinLightningDecoder extends AbstractDecoder { * @throws DecoderException * Thrown if no data is available. */ - public PluginDataObject[] decode(byte[] data, Headers headers) throws DecoderException { + public PluginDataObject[] decode(byte[] data, Headers headers) + throws DecoderException { - //String traceId = null; + // String traceId = null; PluginDataObject[] reports = new PluginDataObject[0]; if (data != null) { @@ -131,43 +135,56 @@ public class BinLightningDecoder extends AbstractDecoder { Calendar baseTime = TimeTools.findDataTime(wmoHdr.getYYGGgg(), headers); - - // Because binary nature of the encrypted data, the string created with its byte[] array may not have the same length of the byte[] array length - // So when DecoderTools.stripWMOHeader() assumes byte[] length == String length in it logic, it is observed that it may return a shorter byte[] than - // the real data array. (Looks like a bug???) -// byte[] pdata = DecoderTools.stripWMOHeader(data, SFUS_PATTERN); -// if (pdata == null) { -// pdata = DecoderTools.stripWMOHeader(data, SFPA_PATTERN); -// } - // instead the following is used to strip WMO header a little more safely. + + // Because binary nature of the encrypted data, the string + // created with its byte[] array may not have the same length of + // the byte[] array length + // So when DecoderTools.stripWMOHeader() assumes byte[] length + // == String length in it logic, it is observed that it may + // return a shorter byte[] than + // the real data array. (Looks like a bug???) + // byte[] pdata = DecoderTools.stripWMOHeader(data, + // SFUS_PATTERN); + // if (pdata == null) { + // pdata = DecoderTools.stripWMOHeader(data, SFPA_PATTERN); + // } + // instead the following is used to strip WMO header a little + // more safely. byte[] pdata = null; - if (wmoHdr.isValid() && wmoHdr.getMessageDataStart() > 0) { - pdata = new byte[data.length - wmoHdr.getMessageDataStart()]; - System.arraycopy(data, wmoHdr.getMessageDataStart(), pdata, 0, data.length - wmoHdr.getMessageDataStart()); - } - + if (wmoHdr.isValid() && (wmoHdr.getMessageDataStart() > 0)) { + pdata = new byte[data.length - wmoHdr.getMessageDataStart()]; + System.arraycopy(data, wmoHdr.getMessageDataStart(), pdata, + 0, data.length - wmoHdr.getMessageDataStart()); + } + if ((pdata == null) || (pdata.length == 0)) { return new PluginDataObject[0]; } - + // - // Modified by Wufeng Zhou to handle both legacy bit-shifted and new encryted data + // Modified by Wufeng Zhou to handle both legacy bit-shifted and + // new encryted data // - // Preserved the legacy decoding in BinLigntningDecoderUtil.decodeBitShiftedBinLightningData(), and added logic to process - // both encrypted data and legacy data - // - - List strikes = BinLigntningDecoderUtil.decodeBinLightningData(data, pdata, traceId, baseTime.getTime()); + // Preserved the legacy decoding in + // BinLigntningDecoderUtil.decodeBitShiftedBinLightningData(), + // and added logic to process + // both encrypted data and legacy data + // + + List strikes = BinLigntningDecoderUtil + .decodeBinLightningData(data, pdata, traceId, + baseTime.getTime()); if (strikes == null) { // keep-alive record, log and return - logger.info(traceId + " - found keep-alive record. ignore for now."); - return reports; + logger.info(traceId + + " - found keep-alive record. ignore for now."); + return reports; } // // Done MOD by Wufeng Zhou // - + // post processing data - if not keep-alive record BinLightningRecord report = null; if (strikes.size() > 0) { @@ -182,22 +199,22 @@ public class BinLightningDecoder extends AbstractDecoder { Calendar c = TimeTools.copy(baseTime); if (c == null) { - throw new DecoderException(traceId + " - Error decoding times"); + throw new DecoderException(traceId + + " - Error decoding times"); } - //report.setInsertTime(c); // OB13.4 source code does not have this line anymore, WZ 05/03/2013 + // report.setInsertTime(c); // OB13.4 source code does not have + // this line anymore, WZ 05/03/2013 Calendar cStart = report.getStartTime(); - if (cStart.getTimeInMillis() > c.getTimeInMillis() - + TEN_MINUTES) { - synchronized (SDF) { - logger.info("Discarding future data for " + traceId - + " at " + SDF.format(cStart.getTime())); - } + if (cStart.getTimeInMillis() > (c.getTimeInMillis() + TEN_MINUTES)) { + synchronized (SDF) { + logger.info("Discarding future data for " + traceId + + " at " + SDF.format(cStart.getTime())); + } } else { Calendar cStop = report.getStopTime(); - TimeRange range = new TimeRange( - cStart.getTimeInMillis(), + TimeRange range = new TimeRange(cStart.getTimeInMillis(), cStop.getTimeInMillis()); DataTime dataTime = new DataTime(cStart, range); @@ -205,19 +222,19 @@ public class BinLightningDecoder extends AbstractDecoder { if (report != null) { report.setTraceId(traceId); - report.setPluginName("binlightning"); try { report.constructDataURI(); reports = new PluginDataObject[] { report }; } catch (PluginException e) { - logger.error("Error constructing datauri", e); - throw new DecoderException("Error constructing datauri", e); + logger.error("Error constructing datauri", e); + throw new DecoderException( + "Error constructing datauri", e); } } } } } else { - logger.error("No WMOHeader found in data"); + logger.error("No WMOHeader found in data"); } return reports; } diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java index 4e3febcf4b..d5d8c9ca18 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/common/BufrMosData.java @@ -59,6 +59,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * May 02, 2013 1970 bgonzale Removed Table annotation, changed from * Entity annotation to MappedSuperClass. * May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -75,123 +76,126 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; public abstract class BufrMosData extends PersistablePluginDataObject implements IPersistable, IPointData { - public static enum MOSType { - ETA, GFS, AVN, LAMP, HPC, MRF, NGM - }; + public static enum MOSType { + ETA, GFS, AVN, LAMP, HPC, MRF, NGM + }; - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String MOS_DATA = "Data"; + public static final String MOS_DATA = "Data"; - // Text of the WMO header - @Transient - @XmlAttribute - @DynamicSerializeElement - private String wmoHeader; + // Text of the WMO header + @Transient + @XmlAttribute + @DynamicSerializeElement + private String wmoHeader; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView = null; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView = null; - @ManyToOne(cascade = { CascadeType.REFRESH }) - @PrimaryKeyJoinColumn - @DataURI(position = 1, embedded = true) - @XmlElement - @DynamicSerializeElement - private BufrMosDataLocation location; + @ManyToOne(cascade = { CascadeType.REFRESH }) + @PrimaryKeyJoinColumn + @DataURI(position = 1, embedded = true) + @XmlElement + @DynamicSerializeElement + private BufrMosDataLocation location; - /** - * Create an empty MOSData object. - */ - public BufrMosData() { - this.pluginName = "bufrmos" + getType(); - } + /** + * Create an empty MOSData object. + */ + public BufrMosData() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public BufrMosData(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public BufrMosData(String uri) { + super(uri); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * @return the type - */ - public abstract MOSType getType(); + /** + * @return the type + */ + public abstract MOSType getType(); - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - identifier = dataURI; - } + /** + * + * @param dataURI + */ + @Override + public void setDataURI(String dataURI) { + identifier = dataURI; + } - public BufrMosDataLocation getLocation() { - return location; - } + public BufrMosDataLocation getLocation() { + return location; + } - public void setLocation(BufrMosDataLocation mosLocation) { - this.location = mosLocation; - } + public void setLocation(BufrMosDataLocation mosLocation) { + this.location = mosLocation; + } - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - } + @Override + public String getPluginName() { + return "bufrmos" + getType(); + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java index 4d44e9d655..09838f5653 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/decoder/AbstractBUFRUAAdapter.java @@ -53,6 +53,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * work without dataURI. * Jul 19, 2013 1992 bsteffen Remove redundant time columns from * bufrua. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -112,7 +113,6 @@ public abstract class AbstractBUFRUAAdapter extends BUFRPointDataAdapter if ((obsData != null) && (wmoStaId != null)) { // pickup the data. - obsData.setPluginName(getPluginName()); obsData.setWmoHeader(wmoHeader.getWmoHeader()); Calendar validTime = obsData.getDataTime() diff --git a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpDecoder.java b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpDecoder.java index 494b368d88..7dd70eccd7 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpDecoder.java @@ -43,11 +43,12 @@ import com.vividsolutions.jts.io.WKTReader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 03/03/2007 908 bwoodle initial creation - * 12/03/2008 chammack Camel refactor - * 09/15/2009 3027 njensen Patterns constants - * 09/21/2009 3072 bsteffen Fixed Decoding of Line Records - * 01/02/2013 DCS 135 tk handle coverage value Line records + * Mar 03, 2007 908 bwoodle initial creation + * Dec 03, 2008 chammack Camel refactor + * Sep 15, 2009 3027 njensen Patterns constants + * Sep 21, 2009 3072 bsteffen Fixed Decoding of Line Records + * Jan 02, 2013 DCS 135 tk handle coverage value Line records + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -86,7 +87,8 @@ public class CcfpDecoder extends AbstractDecoder { private static final String SPACE = " "; - private static final PluginDataObject [] EMPTY_PDO = new PluginDataObject [0]; + private static final PluginDataObject[] EMPTY_PDO = new PluginDataObject[0]; + /** * Constructor * @@ -95,10 +97,11 @@ public class CcfpDecoder extends AbstractDecoder { public CcfpDecoder() throws DecoderException { } - public PluginDataObject[] decode(String msg, Headers headers) throws PluginException { + public PluginDataObject[] decode(String msg, Headers headers) + throws PluginException { + + PluginDataObject[] data = null; - PluginDataObject [] data = null; - Calendar baseTime = null; WMOHeader wmoHdr = new WMOHeader(msg.getBytes()); if (wmoHdr.isValid()) { @@ -106,7 +109,7 @@ public class CcfpDecoder extends AbstractDecoder { } else { baseTime = TimeTools.getSystemCalendar(); } - + CcfpRecord record = new CcfpRecord(); record.setMessageData(msg); CcfpLocation location = new CcfpLocation(); @@ -116,18 +119,20 @@ public class CcfpDecoder extends AbstractDecoder { try { WKTReader wktReader = new WKTReader(); if (matcher.find()) { - Calendar start = TimeTools.getBaseCalendar(Integer - .parseInt(matcher.group(1)), Integer.parseInt(matcher - .group(2)), Integer.parseInt(matcher.group(3))); - start.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher - .group(4))); - Calendar valid = TimeTools.getBaseCalendar(Integer - .parseInt(matcher.group(5)), Integer.parseInt(matcher - .group(6)), Integer.parseInt(matcher.group(7))); - valid.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher - .group(8))); - TimeRange range = new TimeRange(start.getTime(), valid - .getTime()); + Calendar start = TimeTools.getBaseCalendar( + Integer.parseInt(matcher.group(1)), + Integer.parseInt(matcher.group(2)), + Integer.parseInt(matcher.group(3))); + start.set(Calendar.HOUR_OF_DAY, + Integer.parseInt(matcher.group(4))); + Calendar valid = TimeTools.getBaseCalendar( + Integer.parseInt(matcher.group(5)), + Integer.parseInt(matcher.group(6)), + Integer.parseInt(matcher.group(7))); + valid.set(Calendar.HOUR_OF_DAY, + Integer.parseInt(matcher.group(8))); + TimeRange range = new TimeRange(start.getTime(), + valid.getTime()); record.setDataTime(new DataTime(start.getTime().getTime(), range)); record.setProducttype(matcher.group(9)); @@ -147,8 +152,7 @@ public class CcfpDecoder extends AbstractDecoder { record.setTops(Integer.parseInt(matcher.group(4))); record.setSpeed(Integer.parseInt(matcher.group(5))); record.setDirection(Integer.parseInt(matcher.group(6))); - location - .setBoxLat(Double.parseDouble(matcher.group(8)) * 0.1); + location.setBoxLat(Double.parseDouble(matcher.group(8)) * 0.1); location.setBoxLong(Double.parseDouble(matcher.group(9)) * -0.1); String templatlonpairs = matcher.group(7); @@ -157,8 +161,7 @@ public class CcfpDecoder extends AbstractDecoder { wtk.append("POLYGON(("); if (matcher.find()) { wtk.append(Double.toString(Integer.parseInt(matcher - .group(2)) - * -0.1)); + .group(2)) * -0.1)); wtk.append(SPACE); wtk.append(Double.toString(Integer.parseInt(matcher .group(1)) * 0.1)); @@ -167,8 +170,7 @@ public class CcfpDecoder extends AbstractDecoder { wtk.append(COMMA); wtk.append(SPACE); wtk.append(Double.toString(Integer.parseInt(matcher - .group(2)) - * -0.1)); + .group(2)) * -0.1)); wtk.append(SPACE); wtk.append(Double.toString(Integer.parseInt(matcher .group(1)) * 0.1)); @@ -180,30 +182,30 @@ public class CcfpDecoder extends AbstractDecoder { } else if (record.getProducttype().equals("LINE")) { matcher = LINE_PATTERN.matcher(msg); if (matcher.find()) { - record.setCoverage(Integer.parseInt(matcher.group(1))); // change to group 1 + // change to group 1 + record.setCoverage(Integer.parseInt(matcher.group(1))); record.setConf(null); record.setGrowth(null); record.setTops(null); record.setSpeed(null); record.setDirection(null); - String templatlonpairs = matcher.group(2); // change to group 2 + // change to group 2 + String templatlonpairs = matcher.group(2); matcher = PAIR_PATTERN.matcher(templatlonpairs); StringBuffer wtk = new StringBuffer(); wtk.append("LINESTRING("); if (matcher.find()) { - - Double lon = Integer.parseInt(matcher - .group(2)) * -0.1; + + Double lon = Integer.parseInt(matcher.group(2)) * -0.1; String lonStr = Double.toString(lon); - Double lat = Integer.parseInt(matcher - .group(1)) * 0.1; + Double lat = Integer.parseInt(matcher.group(1)) * 0.1; String latStr = Double.toString(lat); location.setBoxLong(lon); location.setBoxLat(lat); - + wtk.append(lonStr); wtk.append(SPACE); wtk.append(latStr); @@ -212,8 +214,7 @@ public class CcfpDecoder extends AbstractDecoder { wtk.append(COMMA); wtk.append(SPACE); wtk.append(Double.toString(Integer.parseInt(matcher - .group(2)) - * -0.1)); + .group(2)) * -0.1)); wtk.append(SPACE); wtk.append(Double.toString(Integer.parseInt(matcher .group(1)) * 0.1)); @@ -228,8 +229,7 @@ public class CcfpDecoder extends AbstractDecoder { logger.error("Unable to decode CCFP", e); } data = EMPTY_PDO; - if(record != null) { - record.setPluginName(PLUGIN_NAME); + if (record != null) { try { record.constructDataURI(); record.setInsertTime(baseTime); diff --git a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java index a88e9ffa48..340a2922a7 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.ccfp/src/com/raytheon/edex/plugin/ccfp/CcfpRecord.java @@ -51,13 +51,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 03/03/2007 908 bwoodle initial creation - * 09/15/2009 3027 njensen Use dates for times - * 09/21/2009 3072 bsteffen Removed times because they are stored in DataTime - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime + * Mar 03, 2007 908 bwoodle initial creation + * Sep 15, 2009 3027 njensen Use dates for times + * Sep 21, 2009 3072 bsteffen Removed times because they are stored in + * DataTime + * 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 * * * @@ -72,12 +75,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ccfp", - indexes = { - @Index(name = "ccfp_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ccfp", indexes = { @Index(name = "ccfp_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -299,4 +298,9 @@ public class CcfpRecord extends PluginDataObject implements ISpatialEnabled { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ccfp"; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFED2DDao.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFED2DDao.java index 9dca291adf..c2f3cf286f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFED2DDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFED2DDao.java @@ -48,15 +48,17 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 03/20/13 #1774 randerso Refactored out of GFEDao - * 04/04/13 #1787 randerso Fixed to support changes to D2D grid location - * Additional cleanup to move the D2D to GFE translation - * logic into D2DGridDatabase. - * 05/03/13 #1974 randerso Changed queryByParmId to look for parm with duration - * suffix first. - * 05/22/13 #1974 randerso Fix bug introduced by the previous fix where query for - * T (T%hr) returned TP6hr - * 06/13/13 #2044 randerso Cleaned up JavaDoc + * Mar 20, 2013 1774 randerso Refactored out of GFEDao + * Apr 04, 2013 1787 randerso Fixed to support changes to D2D grid + * location Additional cleanup to move the + * D2D to GFE translation logic into + * D2DGridDatabase. + * May 03, 2013 1974 randerso Changed queryByParmId to look for parm + * with duration suffix first. + * May 22, 2013 1974 randerso Fix bug introduced by the previous fix + * where query for T (T%hr) returned TP6hr + * Jun 13, 2013 2044 randerso Cleaned up JavaDoc + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -141,7 +143,6 @@ public class GFED2DDao extends GridDao { GridRecord retVal = (GridRecord) s.get(GridRecord.class, rawTimes.get(forecastTime)); - retVal.setPluginName(GridConstants.GRID); return retVal; } finally { diff --git a/edexOsgi/com.raytheon.edex.plugin.goessounding/src/com/raytheon/edex/plugin/goessounding/GOESSoundingDecoder.java b/edexOsgi/com.raytheon.edex.plugin.goessounding/src/com/raytheon/edex/plugin/goessounding/GOESSoundingDecoder.java index dc928a2ffb..58719652ca 100644 --- a/edexOsgi/com.raytheon.edex.plugin.goessounding/src/com/raytheon/edex/plugin/goessounding/GOESSoundingDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.goessounding/src/com/raytheon/edex/plugin/goessounding/GOESSoundingDecoder.java @@ -61,6 +61,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * Apr 14, 2008 1077 jkorman Initial implementation. * Nov 25, 2008 1684 chammack Camel Refactor * May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -74,7 +75,7 @@ public class GOESSoundingDecoder extends AbstractDecoder implements public static final String PLUGIN_NAME = "goessounding"; /** The logger */ - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private PointDataDescription pdd; @@ -131,7 +132,7 @@ public class GOESSoundingDecoder extends AbstractDecoder implements PluginDataObject[] decodedData = null; - if (input != null && input.getDocumentData().length > 0) { + if ((input != null) && (input.getDocumentData().length > 0)) { WMOHeader wmoHeader = input.getWmoHeader(); @@ -153,7 +154,6 @@ public class GOESSoundingDecoder extends AbstractDecoder implements container, this.pdd, dao); if (soundingData != null) { soundingData.setTraceId(traceId); - soundingData.setPluginName(PLUGIN_NAME); PointDataView pdv = soundingData.getPointDataView(); pdv.setString("wmoHeader", soundingData.getWmoHeader()); diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java index 928f65818c..bfcba2b243 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java @@ -92,8 +92,10 @@ import com.raytheon.uf.common.util.mapping.MultipleMappingException; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 3/11/10 4758 bphillip Initial Creation - * Feb 15, 2013 1638 mschenke Moved array based utilities from Util into ArraysUtil + * Mar 11, 2010 4758 bphillip Initial Creation + * Feb 15, 2013 1638 mschenke Moved array based utilities from Util + * into ArraysUtil + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -236,7 +238,7 @@ public class Grib1Decoder extends AbstractDecoder { .getGrib2Parameter(centerAlias, subcenterAlias, tableAlias, pdsVars.getParameterNumber()); - if (parameter == null || parameter.getName().equals(MISSING)) { + if ((parameter == null) || parameter.getName().equals(MISSING)) { try { logger.warn("Unable to map Grib 1 parameter to equivalent Grib 2 parameter for center [" + centerid @@ -294,7 +296,7 @@ public class Grib1Decoder extends AbstractDecoder { // unidata does not handle isEnsemble call when // octet size is less than 40. - if (pdsVars.getLength() > 40 && pdsVars.isEnsemble()) { + if ((pdsVars.getLength() > 40) && pdsVars.isEnsemble()) { // rcg: added code to get perturbation int pos42 = pdsVars.getOctet(42); int pos43 = pdsVars.getOctet(43); @@ -363,13 +365,13 @@ public class Grib1Decoder extends AbstractDecoder { int timeRange = pdsVars.getTimeRangeIndicator(); // Check for initialization of average or accumulation parameters - if ((AVG_ACCUM_LIST.contains(timeRange) && dataTime - .getValidPeriod().getDuration() == 0)) { + if ((AVG_ACCUM_LIST.contains(timeRange) && (dataTime + .getValidPeriod().getDuration() == 0))) { statusHandler.handle(Priority.EVENTA, "Discarding empty accumulation grid"); return null; - } else if ((gdsVars != null && gdsVars.isThin()) - || (gdsVars == null && (gridCoverage instanceof LatLonGridCoverage && ((LatLonGridCoverage) gridCoverage) + } else if (((gdsVars != null) && gdsVars.isThin()) + || ((gdsVars == null) && ((gridCoverage instanceof LatLonGridCoverage) && ((LatLonGridCoverage) gridCoverage) .isThin()))) { // Unfortunately the UCAR Decoder does Cubic Spline // interpolation, however we want to do simpler linear @@ -468,7 +470,7 @@ public class Grib1Decoder extends AbstractDecoder { if (newAbbr == null) { if (!parameterName.equals(MISSING) - && dataTime.getValidPeriod().getDuration() > 0) { + && (dataTime.getValidPeriod().getDuration() > 0)) { parameterAbbreviation = parameterAbbreviation + String.valueOf(dataTime.getValidPeriod() .getDuration() / 3600000) + "hr"; @@ -485,7 +487,6 @@ public class Grib1Decoder extends AbstractDecoder { parameterAbbreviation = e.getArbitraryMapping(); } - retVal.setPluginName("grid"); Parameter param = new Parameter(parameterAbbreviation, parameterName, parameterUnit); GribParamTranslator.getInstance().getParameterNameAlias(modelName, @@ -530,7 +531,7 @@ public class Grib1Decoder extends AbstractDecoder { for (int row = 0; row < rowCount; row++) { for (int column = 0; column < columnCount; column++) { - newGrid[row][column] = data[row * columnCount + column]; + newGrid[row][column] = data[(row * columnCount) + column]; } } @@ -569,8 +570,8 @@ public class Grib1Decoder extends AbstractDecoder { total -= 1; trail = inData[inIndex++]; } - outData[outIndex++] = inData[inIndex] * total + trail - * (1 - total); + outData[outIndex++] = (inData[inIndex] * total) + + (trail * (1 - total)); total += dx; } outData[outIndex++] = inData[inIndex++]; @@ -594,7 +595,7 @@ public class Grib1Decoder extends AbstractDecoder { for (int row = 0; row < rowCount; row++) { for (int column = 0; column < columnCount; column++) { - newGrid[row * columnCount + column] = data[row][column]; + newGrid[(row * columnCount) + column] = data[row][column]; } } return newGrid; @@ -663,7 +664,7 @@ public class Grib1Decoder extends AbstractDecoder { private void correctForScanMode(float[] data, int nx, int ny, boolean bmsExists, int scanMode) { for (int i = 0; i < data.length; i++) { - if (bmsExists && data[i] == -9999) { + if (bmsExists && (data[i] == -9999)) { data[i] = -999999; } } @@ -884,7 +885,7 @@ public class Grib1Decoder extends AbstractDecoder { GridCoverage grid = GribSpatialCache.getInstance().getGrid(coverage); - if (grid == null && gridNumber != 255) { + if ((grid == null) && (gridNumber != 255)) { // 255 is specifically reserved to non-defined grids and should not // use the gridNumber as a lookup value @@ -929,7 +930,7 @@ public class Grib1Decoder extends AbstractDecoder { int subcenterId, int process, GridCoverage grid) { GridModel gridModel = GribModelLookup.getInstance().getModel(centerId, subcenterId, grid, process); - if (gridModel != null && gridModel.getAnalysisOnly()) { + if ((gridModel != null) && gridModel.getAnalysisOnly()) { time.getUtilityFlags().remove(FLAG.FCST_USED); } } @@ -1175,7 +1176,7 @@ public class Grib1Decoder extends AbstractDecoder { level1Value = lval1; break; default: - if (ltype1 > 99 && ltype1 < 200) { + if ((ltype1 > 99) && (ltype1 < 200)) { level1Type = 255; logger.warn("GRIB1 level " + ltype1 + " not recognized"); } @@ -1234,7 +1235,7 @@ public class Grib1Decoder extends AbstractDecoder { } // Scale the level one value if necessary - if (scaleFactor1 == 0 || value1 == 0) { + if ((scaleFactor1 == 0) || (value1 == 0)) { levelOneValue = value1; } else { levelOneValue = new Double((float) (value1 * Math.pow(10, @@ -1249,13 +1250,13 @@ public class Grib1Decoder extends AbstractDecoder { } else if (levelTwoNumber == 1) { levelTwoValue = Level.getInvalidLevelValue(); } else { - if (scaleFactor2 == 0 || value2 == 0) { + if ((scaleFactor2 == 0) || (value2 == 0)) { levelTwoValue = value2; } else { levelTwoValue = (value2 * Math.pow(10, scaleFactor2 * -1)); } } - if (levelName.equals("SFC") && levelOneValue != 0) { + if (levelName.equals("SFC") && (levelOneValue != 0)) { levelOneValue = 0.0; } if (levelName.equals("EATM")) { @@ -1289,7 +1290,7 @@ public class Grib1Decoder extends AbstractDecoder { } if (lon >= 180) { - lon = (180 - lon % 180) * -1; + lon = (180 - (lon % 180)) * -1; } else if (lon < -180) { lon = (180 - (-lon % 180)); } @@ -1313,7 +1314,7 @@ public class Grib1Decoder extends AbstractDecoder { } if (lat > 90) { - lat = 90 - lat % 90; + lat = 90 - (lat % 90); } else if (lat < -90) { lat = (90 - (-lat % 90)) * -1; } diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GridToGribConverter.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GridToGribConverter.java index f5a6dcad2e..96c02d3394 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GridToGribConverter.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GridToGribConverter.java @@ -35,7 +35,8 @@ import com.raytheon.uf.edex.database.DataAccessLayerException; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * May 4, 2012 bsteffen Initial creation + * May 04, 2012 bsteffen Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -62,10 +63,9 @@ public class GridToGribConverter { GridRecord grid = records[i]; GribRecord grib = new GribRecord(); GribModel model = new GribModel(); - grib.setPluginName("grib"); grib.setDataTime(grid.getDataTime()); model.setModelName(grid.getDatasetId()); - if (grid.getSecondaryId() != null + if ((grid.getSecondaryId() != null) && grid.getSecondaryId().startsWith("Version")) { grib.setGridVersion(Integer.parseInt(grid.getSecondaryId() .replace("Version", ""))); @@ -108,31 +108,31 @@ public class GridToGribConverter { model.setTypeEnsemble(3); } Object centerid = grid.getExtraAttribute("centerid"); - if (centerid != null && centerid instanceof Integer) { + if ((centerid != null) && (centerid instanceof Integer)) { model.setCenterid((Integer) centerid); } Object subcenterid = grid.getExtraAttribute("subcenterid"); - if (subcenterid != null && subcenterid instanceof Integer) { + if ((subcenterid != null) && (subcenterid instanceof Integer)) { model.setSubcenterid((Integer) subcenterid); } Object genprocess = grid.getExtraAttribute("genprocess"); - if (genprocess != null && genprocess instanceof Integer) { + if ((genprocess != null) && (genprocess instanceof Integer)) { model.setGenprocess((Integer) genprocess); } Object backGenprocess = grid.getExtraAttribute("backGenprocess"); - if (backGenprocess != null && backGenprocess instanceof Integer) { + if ((backGenprocess != null) && (backGenprocess instanceof Integer)) { model.setBackGenprocess((Integer) backGenprocess); } Object pdsTemplate = grid.getExtraAttribute("pdsTemplate"); - if (pdsTemplate != null && pdsTemplate instanceof Integer) { + if ((pdsTemplate != null) && (pdsTemplate instanceof Integer)) { model.setPdsTemplate((Integer) pdsTemplate); } Object gridid = grid.getExtraAttribute("gridid"); - if (gridid != null && gridid instanceof String) { + if ((gridid != null) && (gridid instanceof String)) { model.setGridid((String) gridid); } Object numForecasts = grid.getExtraAttribute("numForecasts"); - if (numForecasts != null && numForecasts instanceof Integer) { + if ((numForecasts != null) && (numForecasts instanceof Integer)) { model.setNumForecasts((Integer) numForecasts); } model.setLevel(grid.getLevel()); diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/CPCoutlookGribPostProcessor.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/CPCoutlookGribPostProcessor.java index 68b69a2195..93278b301f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/CPCoutlookGribPostProcessor.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/CPCoutlookGribPostProcessor.java @@ -24,7 +24,6 @@ import java.util.Calendar; import com.raytheon.edex.plugin.grib.exception.GribException; import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -51,7 +50,8 @@ import com.raytheon.uf.common.time.DataTime; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 03/09/11 4243 porricel Initial Creation + * Mar 09, 2011 4243 porricel Initial Creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -84,7 +84,6 @@ public class CPCoutlookGribPostProcessor implements IDecoderPostProcessor { record.setDataURI(null); try { - record.setPluginName(GridConstants.GRID); record.constructDataURI(); } catch (PluginException e) { statusHandler.handle(Priority.PROBLEM, diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/EnsembleGridAssembler.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/EnsembleGridAssembler.java index 7cace175e3..31b83e649f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/EnsembleGridAssembler.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/EnsembleGridAssembler.java @@ -70,10 +70,11 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 4/09/10 4638 bphillip Initial Creation + * Apr 09, 2010 4638 bphillip Initial Creation * Mar 14, 2013 1794 djohnson FileUtil.listFiles now returns List. * Mar 27, 2013 1821 bsteffen Reduce db and pypies requests in grid * assembler. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -232,7 +233,6 @@ public class EnsembleGridAssembler implements IDecoderPostProcessor { newRecord.setEnsembleId(record.getEnsembleId()); newRecord.setDataTime(record.getDataTime()); newRecord.setDataURI(null); - newRecord.setPluginName(GridConstants.GRID); newRecord.setInsertTime(Calendar.getInstance()); try { newRecord.constructDataURI(); @@ -320,7 +320,7 @@ public class EnsembleGridAssembler implements IDecoderPostProcessor { } else { Util.insertSubgrid(assembledData, Util.resizeDataTo2D( (float[]) record.getMessageData(), coverage.getNx(), - coverage.getNy()), nx * modIndex - modIndex, 0, nx, ny); + coverage.getNy()), (nx * modIndex) - modIndex, 0, nx, ny); } assembledRecord.setMessageData(Util.resizeDataTo1D(assembledData, diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GFSProcessor.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GFSProcessor.java index 39bb547b18..fcb8386692 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GFSProcessor.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GFSProcessor.java @@ -53,6 +53,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 25, 2011 rgeorge Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -69,7 +70,7 @@ public class GFSProcessor extends SixHrPrecipGridProcessor { public GridRecord[] process(GridRecord record) throws GribException { // Post process the data if this is a Total Precipitation grid if (record.getParameter().getAbbreviation().equals("TP12hr") - && record.getDataTime().getFcstTime() / 3600 > 180) { + && ((record.getDataTime().getFcstTime() / 3600) > 180)) { return super.process(record); } return new GridRecord[] { record }; @@ -86,6 +87,7 @@ public class GFSProcessor extends SixHrPrecipGridProcessor { * @return The generated 6-hr precipitation grids * @throws GribException */ + @Override protected synchronized GridRecord[] generate6hrPrecipGrids(GridRecord record) throws GribException { List generated6hrPrecips = new ArrayList(); @@ -111,11 +113,11 @@ public class GFSProcessor extends SixHrPrecipGridProcessor { Collections.sort(precipInventory, comparator); // loop through set, find twelve hour gaps and create new 6hr records. - for (int i = 0; i < precipInventory.size() - 1; i++) { + for (int i = 0; i < (precipInventory.size() - 1); i++) { GridRecord sequence1Record = precipInventory.get(i); GridRecord sequence2Record = precipInventory.get(i + 1); - if (sequence1Record.getDataTime().getFcstTime() == sequence2Record - .getDataTime().getFcstTime() - SECONDS_IN_12_HRS) { + if (sequence1Record.getDataTime().getFcstTime() == (sequence2Record + .getDataTime().getFcstTime() - SECONDS_IN_12_HRS)) { // we have a 12Hr gap generated6hrPrecips.add(calculate6hrPrecip(sequence1Record, sequence2Record)); @@ -226,7 +228,6 @@ public class GFSProcessor extends SixHrPrecipGridProcessor { record.setDataTime(newDataTime); record.setDataURI(null); try { - record.setPluginName(GridConstants.GRID); record.constructDataURI(); } catch (PluginException e) { statusHandler.handle(Priority.PROBLEM, diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/Nam80PostProcessor.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/Nam80PostProcessor.java index 8e1ccf307c..0819c6dd0c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/Nam80PostProcessor.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/Nam80PostProcessor.java @@ -47,7 +47,8 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Nov 17, 2011 bphillip Initial creation + * Nov 17, 2011 bphillip Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -169,14 +170,14 @@ public class Nam80PostProcessor implements IDecoderPostProcessor { float[] newData = null; float[] tp6Data = null; if (tp12HrRecord.getMessageData() == null) { - newData = (float[]) ((FloatDataRecord) dao.getHDF5Data( - tp12HrRecord, -1)[0]).getFloatData(); + newData = ((FloatDataRecord) dao.getHDF5Data(tp12HrRecord, -1)[0]) + .getFloatData(); } else { newData = (float[]) tp12HrRecord.getMessageData(); } if (tp6HrRecord.getMessageData() == null) { - tp6Data = (float[]) ((FloatDataRecord) dao.getHDF5Data( - tp6HrRecord, -1)[0]).getFloatData(); + tp6Data = ((FloatDataRecord) dao.getHDF5Data(tp6HrRecord, -1)[0]) + .getFloatData(); } else { tp6Data = (float[]) tp6HrRecord.getMessageData(); } @@ -197,7 +198,7 @@ public class Nam80PostProcessor implements IDecoderPostProcessor { Calendar refTime = tp12HrRecord.getDataTime().getRefTimeAsCalendar(); Date start = new Date(tp12HrRecord.getDataTime().getValidPeriod() .getEnd().getTime() - - SECONDS_IN_6_HRS * 1000); + - (SECONDS_IN_6_HRS * 1000)); DataTime newDataTime = new DataTime(refTime, tp12HrRecord.getDataTime() .getFcstTime(), new TimeRange(start, tp12HrRecord.getDataTime() @@ -208,7 +209,6 @@ public class Nam80PostProcessor implements IDecoderPostProcessor { newRecord.getInfo().setId(null); newRecord.setDataURI(null); try { - newRecord.setPluginName(GridConstants.GRID); newRecord.constructDataURI(); } catch (PluginException e) { throw new GribException("Error constructing dataURI!", e); diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/SixHrPrecipGridProcessor.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/SixHrPrecipGridProcessor.java index ba46ff2b56..404fd23597 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/SixHrPrecipGridProcessor.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/SixHrPrecipGridProcessor.java @@ -26,7 +26,6 @@ import java.util.List; import com.raytheon.edex.plugin.grib.exception.GribException; import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.datastorage.records.FloatDataRecord; import com.raytheon.uf.common.parameter.Parameter; @@ -48,6 +47,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 25, 2011 rgeorge Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -107,8 +107,7 @@ public abstract class SixHrPrecipGridProcessor implements IDecoderPostProcessor // previous grid else { for (GridRecord rec : precipInventory) { - if (rec.getDataTime().getFcstTime() == currentFcstTime - - SECONDS_IN_6_HRS) { + if (rec.getDataTime().getFcstTime() == (currentFcstTime - SECONDS_IN_6_HRS)) { tp6hrRecords.add(calculate6hrPrecip(rec, record)); } } @@ -218,7 +217,6 @@ public abstract class SixHrPrecipGridProcessor implements IDecoderPostProcessor record.setDataTime(newDataTime); record.setDataURI(null); try { - record.setPluginName(GridConstants.GRID); record.constructDataURI(); } catch (PluginException e) { statusHandler.handle(Priority.PROBLEM, diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/ThreeHrPrecipGridProcessor.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/ThreeHrPrecipGridProcessor.java index fb3dd3c854..fc51bd5885 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/ThreeHrPrecipGridProcessor.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/ThreeHrPrecipGridProcessor.java @@ -26,7 +26,6 @@ import java.util.List; import com.raytheon.edex.plugin.grib.exception.GribException; import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.datastorage.records.FloatDataRecord; import com.raytheon.uf.common.parameter.Parameter; @@ -47,7 +46,8 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 24, 2012 DR 14299 M. Porricelli Initial creation + * Jan 24, 2012 14299 M. Porricelli Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -108,8 +108,7 @@ public abstract class ThreeHrPrecipGridProcessor implements // previous grid else { for (GridRecord rec : precipInventory) { - if (rec.getDataTime().getFcstTime() == currentFcstTime - - SECONDS_IN_3_HRS) { + if (rec.getDataTime().getFcstTime() == (currentFcstTime - SECONDS_IN_3_HRS)) { tp3hrRecords.add(calculate3hrPrecip(rec, record)); } } @@ -220,7 +219,6 @@ public abstract class ThreeHrPrecipGridProcessor implements record.setDataTime(newDataTime); record.setDataURI(null); try { - record.setPluginName(GridConstants.GRID); record.constructDataURI(); } catch (PluginException e) { statusHandler.handle(Priority.PROBLEM, diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-common.xml b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-common.xml index 2213be0afe..df81cd861b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-common.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-common.xml @@ -2,9 +2,6 @@ - - - @@ -12,12 +9,8 @@ - - - - + - diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml index ae1cc4c127..9823726819 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/res/spring/ldadhydro-ingest.xml @@ -4,9 +4,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - - + diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/src/com/raytheon/edex/plugin/ldadhydro/dao/HydroDecoder.java b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/src/com/raytheon/edex/plugin/ldadhydro/dao/HydroDecoder.java index 5db1fd2eb0..d88dc45536 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadhydro/src/com/raytheon/edex/plugin/ldadhydro/dao/HydroDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.ldadhydro/src/com/raytheon/edex/plugin/ldadhydro/dao/HydroDecoder.java @@ -64,9 +64,10 @@ import com.raytheon.uf.common.time.DataTime; * * SOFTWARE HISTORY * - * ate Ticket# Engineer Description - * ----------- ---------- ----------- -------------------------- - * 9/30/09 vkorolev Initial creation + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * Sep 30, 2009 vkorolev Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author vkorolev @@ -75,8 +76,6 @@ import com.raytheon.uf.common.time.DataTime; public class HydroDecoder extends AbstractDecoder implements IBinaryDecoder { - private final String PLUGIN_NAME; - private String traceId = null; public SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd HH:mm:ss"); @@ -85,10 +84,6 @@ public class HydroDecoder extends AbstractDecoder implements IBinaryDecoder { public Properties configFile = new Properties(); - public HydroDecoder(String pluginName) throws DecoderException { - PLUGIN_NAME = pluginName; - } - public void setTraceId(String id) { traceId = id; } @@ -152,7 +147,6 @@ public class HydroDecoder extends AbstractDecoder implements IBinaryDecoder { HydroLdadRecord record = new HydroLdadRecord(); SurfaceObsLocation location = new SurfaceObsLocation(); record.setDataProvider(dd.provider); - record.setPluginName(PLUGIN_NAME); record.setStationType(dd.type); record.setReportTime(dd.reportTime); // Loop through fields @@ -311,8 +305,7 @@ public class HydroDecoder extends AbstractDecoder implements IBinaryDecoder { Class cls = record.getClass(); Field fieldlist[] = cls.getDeclaredFields(); - for (int i = 0; i < fieldlist.length; i++) { - Field fld = fieldlist[i]; + for (Field fld : fieldlist) { System.out.println("name = " + fld.getName()); // System.out.println("decl class = " + // fld.getDeclaringClass()); diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-common.xml b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-common.xml index 937888fc1c..5e9bde03fa 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-common.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-common.xml @@ -2,9 +2,6 @@ - - - @@ -12,9 +9,6 @@ - - - diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml index 86f2581985..8911bac188 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/res/spring/ldadmanual-ingest.xml @@ -4,9 +4,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - - + diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualDecoder.java b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualDecoder.java index d2e88d62b6..7b1ac16bec 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualDecoder.java @@ -27,7 +27,6 @@ import java.io.StringReader; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -63,9 +62,10 @@ import com.raytheon.uf.common.time.DataTime; * * SOFTWARE HISTORY * - * ate Ticket# Engineer Description - * ----------- ---------- ----------- -------------------------- - * 9/30/09 vkorolev Initial creation + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * Sep 30, 2009 vkorolev Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author vkorolev @@ -73,9 +73,6 @@ import com.raytheon.uf.common.time.DataTime; */ public class ManualDecoder extends AbstractDecoder implements IBinaryDecoder { - - private final String PLUGIN_NAME; - private String traceId = null; public SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd HH:mm:ss"); @@ -84,10 +81,6 @@ public class ManualDecoder extends AbstractDecoder implements IBinaryDecoder public Properties configFile = new Properties(); - public ManualDecoder(String pluginName) throws DecoderException { - PLUGIN_NAME = pluginName; - } - public void setTraceId(String id) { traceId = id; } @@ -151,7 +144,6 @@ public class ManualDecoder extends AbstractDecoder implements IBinaryDecoder ManualLdadRecord record = new ManualLdadRecord(); SurfaceObsLocation location = new SurfaceObsLocation(); record.setProviderId(dd.provider); - record.setPluginName(PLUGIN_NAME); // record.setReportType???(dd.type)); // record.set???(dd.reportTime); // Loop through fields @@ -241,14 +233,13 @@ public class ManualDecoder extends AbstractDecoder implements IBinaryDecoder * @throws ClassNotFoundException * @throws Throwable */ - - @SuppressWarnings("unchecked") public void setProperty(String name, Object obj, String value, String vunit) { String prop = Character.toUpperCase(name.charAt(0)) + name.substring(1); String mname = "set" + prop; Object val = null; try { + @SuppressWarnings("rawtypes") Class cls = obj.getClass(); Field fld = cls.getDeclaredField(name); Class clazz = fld.getType(); @@ -301,27 +292,4 @@ public class ManualDecoder extends AbstractDecoder implements IBinaryDecoder } return; } - - // List of Fields in record - @SuppressWarnings("unchecked") - public static void main(String args[]) { - ManualLdadRecord record = new ManualLdadRecord(); - try { - Class cls = record.getClass(); - - Field fieldlist[] = cls.getDeclaredFields(); - for (int i = 0; i < fieldlist.length; i++) { - Field fld = fieldlist[i]; - System.out.println("name = " + fld.getName()); - // System.out.println("decl class = " + - // fld.getDeclaringClass()); - System.out.println("type = " + fld.getType()); - int mod = fld.getModifiers(); - System.out.println("modifiers = " + Modifier.toString(mod)); - System.out.println("-----"); - } - } catch (Throwable e) { - System.err.println(e); - } - } } diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java index e68fdf830f..55473e338e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.ldadmanual/src/com/raytheon/edex/plugin/ldadmanual/dao/ManualLdadRecord.java @@ -65,12 +65,13 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ----------- ---------- ----------- -------------------------- - * 9/30/09 vkorolev Initial creation - * Apr 4, 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 + * Sep 30, 2009 vkorolev Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. - * + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author vkorolev @@ -84,25 +85,20 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ldad_manual", - indexes = { - @Index(name = "ldad_manual_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ldad_manual", indexes = { @Index(name = "ldad_manual_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize +public class ManualLdadRecord extends PluginDataObject implements + ISpatialEnabled, IDecoderGettable { -public class ManualLdadRecord extends PluginDataObject implements ISpatialEnabled, -IDecoderGettable { - private static final long serialVersionUID = 1L; public static final String OBS_TEXT = "text"; - + public static final Unit LENGTH_UNIT = SI.METER; - + public static final Unit TEMPERATURE_UNIT = SI.KELVIN; public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; @@ -124,727 +120,752 @@ IDecoderGettable { PARM_MAP.put("PMSL", PRES_SLP); PARM_MAP.put("NLAT", STA_LAT); PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("STA","STA"); - PARM_MAP.put("stationid","STA"); - PARM_MAP.put("message",OBS_TEXT); - PARM_MAP.put(OBS_TEXT,OBS_TEXT); + PARM_MAP.put("STA", "STA"); + PARM_MAP.put("stationid", "STA"); + PARM_MAP.put("message", OBS_TEXT); + PARM_MAP.put(OBS_TEXT, OBS_TEXT); } - // Time of the observation. @DataURI(position = 2) @Column @XmlAttribute @DynamicSerializeElement private Calendar observationTime; - - //Location + + // Location @Embedded @DataURI(position = 3, embedded = true) @XmlElement @DynamicSerializeElement - private SurfaceObsLocation location; //latitude, longitude, elevation, stationId - - //Provider of data + private SurfaceObsLocation location; // latitude, longitude, elevation, + // stationId + + // Provider of data @DataURI(position = 1) @Column @DynamicSerializeElement - @XmlElement - private String providerId; //* "050183" Data Provider - - //Name of station + @XmlElement + private String providerId; // * "050183" Data Provider + + // Name of station @Column @DynamicSerializeElement @XmlElement - private String stationName; //* "ALLENSPARK CO-OP" - - // Home WFO Id for the LDAD data + private String stationName; // * "ALLENSPARK CO-OP" + + // Home WFO Id for the LDAD data @Column @DynamicSerializeElement @XmlElement - private String homeWFO; //* "SJU" - - //Type of report + private String homeWFO; // * "SJU" + + // Type of report @Column @DynamicSerializeElement @XmlElement - private Short reportType; // short - // 1 - Regular - // 2 - Corrected - - //Units Code + private Short reportType; // short + // 1 - Regular + // 2 - Corrected + + // Units Code @Column @DynamicSerializeElement @XmlElement - private Short unitsCode; // short - // 8 - English - // 9 - Standard International - - //Current 24 hr precipitation total + private Short unitsCode; // short + // 8 - English + // 9 - Standard International + + // Current 24 hr precipitation total @Column @DynamicSerializeElement @XmlElement - private Float code10; // inches - - //Incremental precip since previous 7 a.m. + private Float code10; // inches + + // Incremental precip since previous 7 a.m. @Column @DynamicSerializeElement @XmlElement - private Float code11; // inches - - //Precip Criteria report from flash flood observer + private Float code11; // inches + + // Precip Criteria report from flash flood observer @Column @DynamicSerializeElement @XmlElement - private Float code12; // inches - - //4 hr precip total at previous 7 a.m. criteria report + private Float code12; // inches + + // 4 hr precip total at previous 7 a.m. criteria report @Column @DynamicSerializeElement @XmlElement - private Float code13; // inches - - //24 hr precipitation total at 7 a.m. 2 days ago + private Float code13; // inches + + // 24 hr precipitation total at 7 a.m. 2 days ago @Column @DynamicSerializeElement @XmlElement - private Float code14; // inches - - //Storm total precipitation + private Float code14; // inches + + // Storm total precipitation @Column @DynamicSerializeElement @XmlElement - private Float code15; // inches - - //Weekly total precipitation + private Float code15; // inches + + // Weekly total precipitation @Column @DynamicSerializeElement @XmlElement - private Float code16; // inches - - //Monthly total precipitation + private Float code16; // inches + + // Monthly total precipitation @Column @DynamicSerializeElement @XmlElement - private Float code17; // inches - - //Off-Time precipitation report + private Float code17; // inches + + // Off-Time precipitation report @Column @DynamicSerializeElement @XmlElement - private Float code18; // inches - - //Short intense precipitation durations + private Float code18; // inches + + // Short intense precipitation durations @Column @DynamicSerializeElement @XmlElement - private Float code19; // hours - - //Precipitation type + private Float code19; // hours + + // Precipitation type @Column @DynamicSerializeElement @XmlElement - private Short code20; // short - // 0 "Ice Prism" - // 1 "Rain" - // 2 "Freezing Rain" - // 3 "Drizzle" - // 4 "Freezing Drizzle" - // 5 "Snow" - // 6 "Snow Pellets" - // 7 "Snow Grains" - // 8 "Ice Pellets" - // 9 "Hail" - - //Current air temperature + private Short code20; // short + // 0 "Ice Prism" + // 1 "Rain" + // 2 "Freezing Rain" + // 3 "Drizzle" + // 4 "Freezing Drizzle" + // 5 "Snow" + // 6 "Snow Pellets" + // 7 "Snow Grains" + // 8 "Ice Pellets" + // 9 "Hail" + + // Current air temperature @Column @DynamicSerializeElement @XmlElement - private Float code21; // degrees F - - //Daily maximum air temperature + private Float code21; // degrees F + + // Daily maximum air temperature @Column @DynamicSerializeElement @XmlElement - private Float code22; // degrees F - - //Daily minimum air temperature + private Float code22; // degrees F + + // Daily minimum air temperature @Column @DynamicSerializeElement @XmlElement - private Float code23; // degrees F - - //Average weekly maximum air temperature + private Float code23; // degrees F + + // Average weekly maximum air temperature @Column @DynamicSerializeElement @XmlElement - private Float code24; // degrees F - - //Average weekly minimum air temperature + private Float code24; // degrees F + + // Average weekly minimum air temperature @Column @DynamicSerializeElement @XmlElement - private Float code25; // degrees F - - //Current water temperature + private Float code25; // degrees F + + // Current water temperature @Column @DynamicSerializeElement @XmlElement - private Float code26; // degrees F - - //Daily maximum soil temperature + private Float code26; // degrees F + + // Daily maximum soil temperature @Column @DynamicSerializeElement @XmlElement - private Float code27; // degrees F - - //Daily minimum soil temperature + private Float code27; // degrees F + + // Daily minimum soil temperature @Column @DynamicSerializeElement @XmlElement - private Float code28; // degrees F - - //Wet Bulb temperature + private Float code28; // degrees F + + // Wet Bulb temperature @Column @DynamicSerializeElement @XmlElement - private Float code29; // degrees F - - //Number of hours temperature is below 25 degrees F + private Float code29; // degrees F + + // Number of hours temperature is below 25 degrees F @Column @DynamicSerializeElement @XmlElement - private Float code30; // Hours - - //Number of hours temperature is below 32 degrees F + private Float code30; // Hours + + // Number of hours temperature is below 32 degrees F @Column @DynamicSerializeElement @XmlElement - private Float code31; // Hours - - //Dew point temperature + private Float code31; // Hours + + // Dew point temperature @Column @DynamicSerializeElement @XmlElement - private Float code32; // degrees F - - //River Stage at specified ob time + private Float code32; // degrees F + + // River Stage at specified ob time @Column @DynamicSerializeElement @XmlElement - private Float code33; // feet - - //River Stage at previous 1 a.m. + private Float code33; // feet + + // River Stage at previous 1 a.m. @Column @DynamicSerializeElement @XmlElement - private Float code34; // feet - - //River Stage at previous 7 p.m. + private Float code34; // feet + + // River Stage at previous 7 p.m. @Column @DynamicSerializeElement @XmlElement - private Float code35; // feet - - //River Stage at previous 1 p.m. + private Float code35; // feet + + // River Stage at previous 1 p.m. @Column @DynamicSerializeElement @XmlElement - private Float code36; // feet - - //River Stage at previous 7 a.m. + private Float code36; // feet + + // River Stage at previous 7 a.m. @Column @DynamicSerializeElement @XmlElement - private Float code37; // feet - - //River Stage at 7 a.m. 2 days ago + private Float code37; // feet + + // River Stage at 7 a.m. 2 days ago @Column @DynamicSerializeElement @XmlElement - private Float code38; // feet - - //River Stage at observed crest time + private Float code38; // feet + + // River Stage at observed crest time @Column @DynamicSerializeElement @XmlElement - private String code39; // char - // Chars0_1 "month" - // Chars2_3 "day" - // Chars4_5 "hour" - // Chars6_7 "minute" - - //River Stage at observed crest + private String code39; // char + // Chars0_1 "month" + // Chars2_3 "day" + // Chars4_5 "hour" + // Chars6_7 "minute" + + // River Stage at observed crest @Column @DynamicSerializeElement @XmlElement - private Float code40; // feet - - //River Stage Trend + private Float code40; // feet + + // River Stage Trend @Column @DynamicSerializeElement @XmlElement private Short code41; // short - // 0" "River below flood stage - Stationary" - // 1" "River below flood stage - Rising" - // 3" "River below flood stage - Falling" - // 4" "River above flood stage - Stationary" - // 5" "River above flood stage - Rising" - // 6" "River above flood stage - Falling" - - //private Double code42;--?????????????????????????????????????? - - //River Discharge instantaneous measured Kilo Cubic Feet Per Second + // 0" "River below flood stage - Stationary" + // 1" "River below flood stage - Rising" + // 3" "River below flood stage - Falling" + // 4" "River above flood stage - Stationary" + // 5" "River above flood stage - Rising" + // 6" "River above flood stage - Falling" + + // private Double code42;--?????????????????????????????????????? + + // River Discharge instantaneous measured Kilo Cubic Feet Per Second @Column @DynamicSerializeElement @XmlElement - private Float code43; // kcfs - - //River Discharge mean daily measured + private Float code43; // kcfs + + // River Discharge mean daily measured @Column @DynamicSerializeElement @XmlElement - private Float code44; // kcfs - - //River Discharge instantaneous computed + private Float code44; // kcfs + + // River Discharge instantaneous computed @Column @DynamicSerializeElement @XmlElement - private Float code45; // kcfs - - //River Discharge mean daily computed + private Float code45; // kcfs + + // River Discharge mean daily computed @Column @DynamicSerializeElement @XmlElement - private Float code46; // kcfs - - //River Discharge instantaneous from rating + private Float code46; // kcfs + + // River Discharge instantaneous from rating @Column @DynamicSerializeElement @XmlElement - private Float code47; // kcfs - - //River Discharge mean daily from rating + private Float code47; // kcfs + + // River Discharge mean daily from rating @Column @DynamicSerializeElement @XmlElement - private Float code48; // kcfs - - //River Discharge peak + private Float code48; // kcfs + + // River Discharge peak @Column @DynamicSerializeElement @XmlElement - private Float code49; // kcfs - - //River Discharge canal diversion + private Float code49; // kcfs + + // River Discharge canal diversion @Column @DynamicSerializeElement @XmlElement - private Float code50; // kcfs - - //private Float code51; //?????????????????????????????????? - - //Reservoir pool elevation at specified ob time + private Float code50; // kcfs + + // private Float code51; //?????????????????????????????????? + + // Reservoir pool elevation at specified ob time @Column @DynamicSerializeElement @XmlElement - private Float code52; // feet - - //Reservoir pool elevation at previous 6Z + private Float code52; // feet + + // Reservoir pool elevation at previous 6Z @Column @DynamicSerializeElement @XmlElement - private Float code53; // feet - - //Reservoir pool forecast, Day 1 + private Float code53; // feet + + // Reservoir pool forecast, Day 1 @Column @DynamicSerializeElement @XmlElement - private Float code54; // feet - - //Reservoir pool forecast, Day 2 + private Float code54; // feet + + // Reservoir pool forecast, Day 2 @Column @DynamicSerializeElement @XmlElement - private Float code55; // feet - - //Reservoir pool forecast, Day 3 + private Float code55; // feet + + // Reservoir pool forecast, Day 3 @Column @DynamicSerializeElement @XmlElement - private Float code56; // feet - - //Reservoir tailwater elevation + private Float code56; // feet + + // Reservoir tailwater elevation @Column @DynamicSerializeElement @XmlElement - private Float code57; // feet - - //Reservoir inflow, instantanious + private Float code57; // feet + + // Reservoir inflow, instantanious @Column @DynamicSerializeElement @XmlElement - private Float code58; // kcfs - - //Reservoir inflow, mean daily + private Float code58; // kcfs + + // Reservoir inflow, mean daily @Column @DynamicSerializeElement @XmlElement - private Float code59; // kcfs - - //Reservoir outflow, instantanious + private Float code59; // kcfs + + // Reservoir outflow, instantanious @Column @DynamicSerializeElement @XmlElement - private Float code60; // kcfs - - //Reservoir outflow, mean daily + private Float code60; // kcfs + + // Reservoir outflow, mean daily @Column @DynamicSerializeElement @XmlElement - private Float code61; // kcfs - - //Reservoir outflow forecast, mean daily, Day 1 + private Float code61; // kcfs + + // Reservoir outflow forecast, mean daily, Day 1 @Column @DynamicSerializeElement @XmlElement - private Float code62; // kcfs - - //Reservoir outflow forecast, mean daily, Day 2 + private Float code62; // kcfs + + // Reservoir outflow forecast, mean daily, Day 2 @Column @DynamicSerializeElement @XmlElement - private Float code63; // kcfs - - //Reservoir outflow forecast, mean daily, Day 3 + private Float code63; // kcfs + + // Reservoir outflow forecast, mean daily, Day 3 @Column @DynamicSerializeElement @XmlElement - private Float code64; // kcfs - - //Reservoir storage at specified ob time KAF=thousand acre feet + private Float code64; // kcfs + + // Reservoir storage at specified ob time KAF=thousand acre feet @Column @DynamicSerializeElement @XmlElement - private Float code65; // kaf - - //Reservoir evaporation, 24 hour total, computed + private Float code65; // kaf + + // Reservoir evaporation, 24 hour total, computed @Column @DynamicSerializeElement @XmlElement - private Float code66; // inches - - //Snow cover, areal extent + private Float code66; // inches + + // Snow cover, areal extent @Column @DynamicSerializeElement @XmlElement - private Float code67; // percent - - //Snow depth, total on ground + private Float code67; // percent + + // Snow depth, total on ground @Column @DynamicSerializeElement @XmlElement - private Float code68; // inches - - //Snow depth, new snow + private Float code68; // inches + + // Snow depth, new snow @Column @DynamicSerializeElement @XmlElement - private Float code69; // inches - - //Snow density + private Float code69; // inches + + // Snow density @Column @DynamicSerializeElement @XmlElement - private Float code70; // inches/inches - - //Snow, Water equivalent, total of snow and ice on ground + private Float code70; // inches/inches + + // Snow, Water equivalent, total of snow and ice on ground @Column @DynamicSerializeElement @XmlElement - private Float code71; // inches - + private Float code71; // inches + // Snow report ref LDAD Table? @Column @DynamicSerializeElement @XmlElement - private String code72; - //FirstDigit0 "Snow structure - no report" - //FirstDigit1 "Snow structure - losely packed" - //FirstDigit2 "Snow structure - densely packed" - //SecondDigit0 "Base of snowcover - no report" - //SecondDigit1 "Base of snowcover - wet snow" - //SecondDigit2 "Base of snowcover - dry snow" - //SecondDigit3 "Base of snowcover - ice layer" - //ThirdDigit0 "Surface of snowcover - no report" - //ThirdDigit1 "Surface of snowcover - snow crust" - //ThirdDigit2 "Surface of snowcover - loose" - //ThirdDigit3 "Surface of snowcover - ice" - //FourthDigit0 "Area description - no report" - //FourthDigit1 "Area description - uniform" - //FourthDigit2 "Area description - some drifts" - //FourthDigit3 "Area description - drifts" - - //Ice cover, areal extent + private String code72; + + // FirstDigit0 "Snow structure - no report" + // FirstDigit1 "Snow structure - losely packed" + // FirstDigit2 "Snow structure - densely packed" + // SecondDigit0 "Base of snowcover - no report" + // SecondDigit1 "Base of snowcover - wet snow" + // SecondDigit2 "Base of snowcover - dry snow" + // SecondDigit3 "Base of snowcover - ice layer" + // ThirdDigit0 "Surface of snowcover - no report" + // ThirdDigit1 "Surface of snowcover - snow crust" + // ThirdDigit2 "Surface of snowcover - loose" + // ThirdDigit3 "Surface of snowcover - ice" + // FourthDigit0 "Area description - no report" + // FourthDigit1 "Area description - uniform" + // FourthDigit2 "Area description - some drifts" + // FourthDigit3 "Area description - drifts" + + // Ice cover, areal extent @Column @DynamicSerializeElement @XmlElement - private Float code73; // percent - - //Ice extent from reporting area, up to downstream + private Float code73; // percent + + // Ice extent from reporting area, up to downstream @Column @DynamicSerializeElement @XmlElement - private Float code74; // miles - - //Ice open water, extent from reporting area, up or downstream + private Float code74; // miles + + // Ice open water, extent from reporting area, up or downstream @Column @DynamicSerializeElement @XmlElement - private Float code75; // miles - - //Ice thickness + private Float code75; // miles + + // Ice thickness @Column @DynamicSerializeElement @XmlElement - private Float code76; // inches - + private Float code76; // inches + // Ice report ref LDAD Table @Column @DynamicSerializeElement @XmlElement - private String code77; - // FirstDigit0 "Ice structure - no report" - // FirstDigit1 "Ice structure - breaking ice" - // FirstDigit2 "Ice structure - floating (running)" - // FirstDigit3 "Ice structure - hanging" - // FirstDigit4 "Ice structure - honeycomb" - // FirstDigit5 "Ice structure - layered" - // FirstDigit6 "Ice structure - rotten" - // FirstDigit7 "Ice structure - stationary" - // FirstDigit8 "Ice structure - stopped" - // FirstDigit9 "Ice structure - slush" - // SecondDigit0 "Ice type - no report" - // SecondDigit1 "Ice type - anchor (also bottom ice)" - // SecondDigit2 "Ice type - cake" - // SecondDigit3 "Ice type - clear" - // SecondDigit4 "Ice type - frazzle" - // SecondDigit5 "Ice type - ice gorge (also jammed ice)" - // SecondDigit6 "Ice type - locally formed" - // SecondDigit7 "Ice type - sheet ice" - // SecondDigit8 "Ice type - sheet ice (also on bridges)" - // SecondDigit9 "Ice type - shore ice" - // ThirdDigit0 "Ice cover - no ice" - // ThirdDigit1 "Ice cover - 1/10 cover" - // ThirdDigit2 "Ice cover - 2/10 cover" - // ThirdDigit3 "Ice cover - 3/10 cover" - // ThirdDigit4 "Ice cover - 4/10 cover" - // ThirdDigit5 "Ice cover - 5/10 cover" - // ThirdDigit6 "Ice cover - 6/10 cover" - // ThirdDigit7 "Ice cover - 7/10 cover" - // ThirdDigit8 "Ice cover - 8/10 - 9/10 cover" - // ThirdDigit9 "Ice cover - fully covered" - - //Depth of frost - @Column - @DynamicSerializeElement - @XmlElement - private Float code78; // inches - - //Depth of frost thawed - @Column - @DynamicSerializeElement - @XmlElement - private Float code79; // inches - - //Frost structure report - @Column - @DynamicSerializeElement - @XmlElement - private Short code80; // short - // 0 "Frost intensity - no frost" - // 1 "Frost intensity - light frost" - // 2 "Frost intensity - moderate frost" - // 3 "Frost intensity - heavy frost" - - //Surface frost intensity - @Column - @DynamicSerializeElement - @XmlElement - private Short code81; //short - // 0 "Frost intensity - no frost" - // 1 "Frost intensity - light frost" - // 2 "Frost intensity - moderate frost" - // 3 "Frost intensity - heavy frost" - - //State of ground - @Column - @DynamicSerializeElement - @XmlElement - private Short code82; // short - // 0 Surface of ground dry" - // 1 Surface of ground moist" - // 2 Surface of ground wet" - // 3 Flooded" - // 5 Glaze on ground" - // 6 Loose dry dust or sand not covering ground completely" - // 7 Thin cover of loose dry dust or sand covering ground completely" - // 8 Moderate or thick cover of loose dry dust or sand covering ground completely" - // 9 Ground extra dry with cracks" - // 10 Ground predominately covered with ice" - // 11 Compact or wet snow (with or without ice) covering less than one half of the ground" - // 12 Compact or wet snow (with or without ice) covering less than one half of the ground but not completely covered" - // 13 Even layer of comapct or wet snow covering ground completely" - // 14 Uneven layer of comapct or wet snow covering ground completely" - // 15 Loose dry snow covering less than one half of the ground" - // 16 Loose dry snow covering at least one half of the ground (but not completely)" - // 17 Even layers of loose dry snow covering ground completely" - // 18 Uneven layers of loose dry snow covering ground completely" - // 19 Snow covering ground completely; Deep drifts" - // 20 Sleet or hail covering ground completely" - - //Soil moisture - @Column - @DynamicSerializeElement - @XmlElement - private Float code83; // inches - - //Present weather - @Column - @DynamicSerializeElement - @XmlElement - private Short code84; // short - // 5 "Haze" - // 7 "Dust or sand raised by wind" - // 8 "Well developed dust whirls or sand whirls" - // 13 "Lightning (no thunder heard)" - // 17 "Thunderstorm, but no precip at ob time" - // 19 "Funnel cloud at or within sight of station during previous hour or at ob time" - // 41 "Fog or ice fog in patches" - // 42 "Fog or ice fog (sky visible)" - // 43 "Fog or ice fog (sky not visible)" - // 51 "Drizzle, not freezing, slight at ob time" - // 53 "Drizzle, not freezing, moderate at ob time" - // 55 "Drizzle, not freezing, heavy at ob time" - // 56 "Drizzle, freezing, light" - // 57 "Drizzle, freezing, moderate or heavy" - // 61 "Rain, not freezing, continuous, slight at ob time" - // 63 "Rain, not freezing, continuous, moderate at ob time" - // 65 "Rain, not freezing, continuous, heavy at ob time" - // 66 "Rain, freezing, light" - // 67 "Rain, freezing, moderate or heavy" - // 68 "Rain or drizzle and snow, light" - // 69 "Rain or drizzle and snow, moderate or heavy" - // 71 "Snow, continuous, light" - // 73 "Snow, continuous, moderate" - // 75 "Snow, continuous, heavy" - // 79 "Ice Pellets or sleet" - // 80 "Rainshower, light" - // 81 "Rainshower, moderate or heavy" - // 82 "Rainshower, violent" - // 83 "Rain and snowshowers, light" - // 84 "Rain and snowshowers, moderate or heavy" - // 85 "Snowshowers, light" - // 86 "Snowshowers, moderate or heavy" - // 89 "Showers of hail, with or without rain or rain and snow mixed at ob time" - // 95 "Thunderstorm, slight or moderate, without hail, but with rain and/or snow" - // 96 "Thunderstorm, slight or moderate, with hail" - // 97 "Thunderstorm, heavy, without hail, but with rain and/or snow" - // 98 "Thunderstorm, with dust or sand storm" - // 99 "Thunderstorm, heavy with hail" - - //Past 6 hour weather - @Column - @DynamicSerializeElement - @XmlElement - private Short code85; // short - // 0 "Cloud covering one half or less of the sky throughout the appropriate period" - // 1 "Cloud covering more than one half the sky throughout the appropriate period and covering one half or less during part of the period" - // 2 "Cloud covering more than one half the sky throughout the appropriate period" - // 3 "Sandstorm, duststrom, or blowing snow" - // 4 "Fog or ice fog or thick haze" - // 5 "Drizzle" - // 6 "Rain" - // 7 "Snow, or rain and snow mixed" - // 8 "Showers" - // 9 "Thunderstorm(s) with or without precip" + private String code77; - //Relative humidity + // FirstDigit0 "Ice structure - no report" + // FirstDigit1 "Ice structure - breaking ice" + // FirstDigit2 "Ice structure - floating (running)" + // FirstDigit3 "Ice structure - hanging" + // FirstDigit4 "Ice structure - honeycomb" + // FirstDigit5 "Ice structure - layered" + // FirstDigit6 "Ice structure - rotten" + // FirstDigit7 "Ice structure - stationary" + // FirstDigit8 "Ice structure - stopped" + // FirstDigit9 "Ice structure - slush" + // SecondDigit0 "Ice type - no report" + // SecondDigit1 "Ice type - anchor (also bottom ice)" + // SecondDigit2 "Ice type - cake" + // SecondDigit3 "Ice type - clear" + // SecondDigit4 "Ice type - frazzle" + // SecondDigit5 "Ice type - ice gorge (also jammed ice)" + // SecondDigit6 "Ice type - locally formed" + // SecondDigit7 "Ice type - sheet ice" + // SecondDigit8 "Ice type - sheet ice (also on bridges)" + // SecondDigit9 "Ice type - shore ice" + // ThirdDigit0 "Ice cover - no ice" + // ThirdDigit1 "Ice cover - 1/10 cover" + // ThirdDigit2 "Ice cover - 2/10 cover" + // ThirdDigit3 "Ice cover - 3/10 cover" + // ThirdDigit4 "Ice cover - 4/10 cover" + // ThirdDigit5 "Ice cover - 5/10 cover" + // ThirdDigit6 "Ice cover - 6/10 cover" + // ThirdDigit7 "Ice cover - 7/10 cover" + // ThirdDigit8 "Ice cover - 8/10 - 9/10 cover" + // ThirdDigit9 "Ice cover - fully covered" + + // Depth of frost @Column @DynamicSerializeElement @XmlElement - private Float code86; // percent - - //Evaporation, measured, Class A pan or other + private Float code78; // inches + + // Depth of frost thawed @Column @DynamicSerializeElement @XmlElement - private Float code87; // inches - - //Wind speed + private Float code79; // inches + + // Frost structure report @Column @DynamicSerializeElement @XmlElement - private Float code88; // miles per hour - - //Wind direction + private Short code80; // short + // 0 "Frost intensity - no frost" + // 1 "Frost intensity - light frost" + // 2 "Frost intensity - moderate frost" + // 3 "Frost intensity - heavy frost" + + // Surface frost intensity @Column @DynamicSerializeElement @XmlElement - private Float code89; // tens of degrees - - //Sunshine, hours per day + private Short code81; // short + // 0 "Frost intensity - no frost" + // 1 "Frost intensity - light frost" + // 2 "Frost intensity - moderate frost" + // 3 "Frost intensity - heavy frost" + + // State of ground + @Column + @DynamicSerializeElement + @XmlElement + private Short code82; // short + // 0 Surface of ground dry" + // 1 Surface of ground moist" + // 2 Surface of ground wet" + // 3 Flooded" + // 5 Glaze on ground" + // 6 Loose dry dust or sand not covering ground + // completely" + // 7 Thin cover of loose dry dust or sand covering + // ground completely" + // 8 Moderate or thick cover of loose dry dust or sand + // covering ground completely" + // 9 Ground extra dry with cracks" + // 10 Ground predominately covered with ice" + // 11 Compact or wet snow (with or without ice) + // covering less than one half of the ground" + // 12 Compact or wet snow (with or without ice) + // covering less than one half of the ground but not + // completely covered" + // 13 Even layer of comapct or wet snow covering + // ground completely" + // 14 Uneven layer of comapct or wet snow covering + // ground completely" + // 15 Loose dry snow covering less than one half of + // the ground" + // 16 Loose dry snow covering at least one half of the + // ground (but not completely)" + // 17 Even layers of loose dry snow covering ground + // completely" + // 18 Uneven layers of loose dry snow covering ground + // completely" + // 19 Snow covering ground completely; Deep drifts" + // 20 Sleet or hail covering ground completely" + + // Soil moisture + @Column + @DynamicSerializeElement + @XmlElement + private Float code83; // inches + + // Present weather + @Column + @DynamicSerializeElement + @XmlElement + private Short code84; // short + // 5 "Haze" + // 7 "Dust or sand raised by wind" + // 8 "Well developed dust whirls or sand whirls" + // 13 "Lightning (no thunder heard)" + // 17 "Thunderstorm, but no precip at ob time" + // 19 + // "Funnel cloud at or within sight of station during previous hour or at ob time" + // 41 "Fog or ice fog in patches" + // 42 "Fog or ice fog (sky visible)" + // 43 "Fog or ice fog (sky not visible)" + // 51 "Drizzle, not freezing, slight at ob time" + // 53 "Drizzle, not freezing, moderate at ob time" + // 55 "Drizzle, not freezing, heavy at ob time" + // 56 "Drizzle, freezing, light" + // 57 "Drizzle, freezing, moderate or heavy" + // 61 + // "Rain, not freezing, continuous, slight at ob time" + // 63 + // "Rain, not freezing, continuous, moderate at ob time" + // 65 + // "Rain, not freezing, continuous, heavy at ob time" + // 66 "Rain, freezing, light" + // 67 "Rain, freezing, moderate or heavy" + // 68 "Rain or drizzle and snow, light" + // 69 "Rain or drizzle and snow, moderate or heavy" + // 71 "Snow, continuous, light" + // 73 "Snow, continuous, moderate" + // 75 "Snow, continuous, heavy" + // 79 "Ice Pellets or sleet" + // 80 "Rainshower, light" + // 81 "Rainshower, moderate or heavy" + // 82 "Rainshower, violent" + // 83 "Rain and snowshowers, light" + // 84 "Rain and snowshowers, moderate or heavy" + // 85 "Snowshowers, light" + // 86 "Snowshowers, moderate or heavy" + // 89 + // "Showers of hail, with or without rain or rain and snow mixed at ob time" + // 95 + // "Thunderstorm, slight or moderate, without hail, but with rain and/or snow" + // 96 "Thunderstorm, slight or moderate, with hail" + // 97 + // "Thunderstorm, heavy, without hail, but with rain and/or snow" + // 98 "Thunderstorm, with dust or sand storm" + // 99 "Thunderstorm, heavy with hail" + + // Past 6 hour weather + @Column + @DynamicSerializeElement + @XmlElement + private Short code85; // short + // 0 + // "Cloud covering one half or less of the sky throughout the appropriate period" + // 1 + // "Cloud covering more than one half the sky throughout the appropriate period and covering one half or less during part of the period" + // 2 + // "Cloud covering more than one half the sky throughout the appropriate period" + // 3 "Sandstorm, duststrom, or blowing snow" + // 4 "Fog or ice fog or thick haze" + // 5 "Drizzle" + // 6 "Rain" + // 7 "Snow, or rain and snow mixed" + // 8 "Showers" + // 9 "Thunderstorm(s) with or without precip" + + // Relative humidity + @Column + @DynamicSerializeElement + @XmlElement + private Float code86; // percent + + // Evaporation, measured, Class A pan or other + @Column + @DynamicSerializeElement + @XmlElement + private Float code87; // inches + + // Wind speed + @Column + @DynamicSerializeElement + @XmlElement + private Float code88; // miles per hour + + // Wind direction + @Column + @DynamicSerializeElement + @XmlElement + private Float code89; // tens of degrees + + // Sunshine, hours per day @Column @DynamicSerializeElement @XmlElement private Float code90; // hours - - //Solar energy, accumulated incoming + + // Solar energy, accumulated incoming @Column @DynamicSerializeElement @XmlElement - private Float code91; // ly - + private Float code91; // ly + // short Dew intensity @Column @DynamicSerializeElement @XmlElement - private Short code92; - // 0 "No dew" - // 1 "Light dew" - // 2 "Moderate dew" - // 3 "Heavy dew" - - //Leaf wetness + private Short code92; + + // 0 "No dew" + // 1 "Light dew" + // 2 "Moderate dew" + // 3 "Heavy dew" + + // Leaf wetness @Column @DynamicSerializeElement @XmlElement private Float code93; // hours ???????????????????? - - //Water pan temperature maximum + + // Water pan temperature maximum @Column @DynamicSerializeElement @XmlElement - private Float code94; // degrees F - - //Water pan temperature minimum + private Float code94; // degrees F + + // Water pan temperature minimum @Column @DynamicSerializeElement @XmlElement - private Float code95; // degrees F - - //24 hour wind flow + private Float code95; // degrees F + + // 24 hour wind flow @Column @DynamicSerializeElement @XmlElement - private Float code96; // miles + private Float code96; // miles // Raw observation text - ROSA raw message @Column @DynamicSerializeElement @XmlElement - private String rawMessage; //rawMessage - + private String rawMessage; // rawMessage + /** * */ @@ -861,1171 +882,1253 @@ IDecoderGettable { public ManualLdadRecord(String uri) { super(uri); } - - + + /** + * @return the code12 + */ + public Float getCode12() { + return code12; + } + + /** + * @param code12 + * the code12 to set + */ + public void setCode12(Float code12) { + this.code12 = code12; + } + + /** + * @return the code13 + */ + public Float getCode13() { + return code13; + } + + /** + * @param code13 + * the code13 to set + */ + public void setCode13(Float code13) { + this.code13 = code13; + } + + /** + * @return the code14 + */ + public Float getCode14() { + return code14; + } + + /** + * @param code14 + * the code14 to set + */ + public void setCode14(Float code14) { + this.code14 = code14; + } + + /** + * @return the code15 + */ + public Float getCode15() { + return code15; + } + + /** + * @param code15 + * the code15 to set + */ + public void setCode15(Float code15) { + this.code15 = code15; + } + + /** + * @return the code16 + */ + public Float getCode16() { + return code16; + } + + /** + * @param code16 + * the code16 to set + */ + public void setCode16(Float code16) { + this.code16 = code16; + } + + /** + * @return the code17 + */ + public Float getCode17() { + return code17; + } + + /** + * @param code17 + * the code17 to set + */ + public void setCode17(Float code17) { + this.code17 = code17; + } + + /** + * @return the code18 + */ + public Float getCode18() { + return code18; + } + + /** + * @param code18 + * the code18 to set + */ + public void setCode18(Float code18) { + this.code18 = code18; + } + + /** + * @return the code19 + */ + public Float getCode19() { + return code19; + } + + /** + * @param code19 + * the code19 to set + */ + public void setCode19(Float code19) { + this.code19 = code19; + } + + /** + * @return the code20 + */ + public Short getCode20() { + return code20; + } + + /** + * @param code20 + * the code20 to set + */ + public void setCode20(Short code20) { + this.code20 = code20; + } + + /** + * @return the code21 + */ + public Float getCode21() { + return code21; + } + + /** + * @param code21 + * the code21 to set + */ + public void setCode21(Float code21) { + this.code21 = code21; + } + + /** + * @return the code22 + */ + public Float getCode22() { + return code22; + } + + /** + * @param code22 + * the code22 to set + */ + public void setCode22(Float code22) { + this.code22 = code22; + } + + /** + * @return the code23 + */ + public Float getCode23() { + return code23; + } + + /** + * @param code23 + * the code23 to set + */ + public void setCode23(Float code23) { + this.code23 = code23; + } + + /** + * @return the code24 + */ + public Float getCode24() { + return code24; + } + + /** + * @param code24 + * the code24 to set + */ + public void setCode24(Float code24) { + this.code24 = code24; + } + + /** + * @return the code25 + */ + public Float getCode25() { + return code25; + } + + /** + * @param code25 + * the code25 to set + */ + public void setCode25(Float code25) { + this.code25 = code25; + } + + /** + * @return the code26 + */ + public Float getCode26() { + return code26; + } + + /** + * @param code26 + * the code26 to set + */ + public void setCode26(Float code26) { + this.code26 = code26; + } + + /** + * @return the code27 + */ + public Float getCode27() { + return code27; + } + + /** + * @param code27 + * the code27 to set + */ + public void setCode27(Float code27) { + this.code27 = code27; + } + + /** + * @return the code28 + */ + public Float getCode28() { + return code28; + } + + /** + * @param code28 + * the code28 to set + */ + public void setCode28(Float code28) { + this.code28 = code28; + } + + /** + * @return the code29 + */ + public Float getCode29() { + return code29; + } + + /** + * @param code29 + * the code29 to set + */ + public void setCode29(Float code29) { + this.code29 = code29; + } + + /** + * @return the code30 + */ + public Float getCode30() { + return code30; + } + + /** + * @param code30 + * the code30 to set + */ + public void setCode30(Float code30) { + this.code30 = code30; + } + + /** + * @return the code31 + */ + public Float getCode31() { + return code31; + } + + /** + * @param code31 + * the code31 to set + */ + public void setCode31(Float code31) { + this.code31 = code31; + } + + /** + * @return the code32 + */ + public Float getCode32() { + return code32; + } + + /** + * @param code32 + * the code32 to set + */ + public void setCode32(Float code32) { + this.code32 = code32; + } + + /** + * @return the code33 + */ + public Float getCode33() { + return code33; + } + + /** + * @param code33 + * the code33 to set + */ + public void setCode33(Float code33) { + this.code33 = code33; + } + + /** + * @return the code34 + */ + public Float getCode34() { + return code34; + } + + /** + * @param code34 + * the code34 to set + */ + public void setCode34(Float code34) { + this.code34 = code34; + } + + /** + * @return the code35 + */ + public Float getCode35() { + return code35; + } + + /** + * @param code35 + * the code35 to set + */ + public void setCode35(Float code35) { + this.code35 = code35; + } + + /** + * @return the code36 + */ + public Float getCode36() { + return code36; + } + + /** + * @param code36 + * the code36 to set + */ + public void setCode36(Float code36) { + this.code36 = code36; + } + + /** + * @return the code37 + */ + public Float getCode37() { + return code37; + } + + /** + * @param code37 + * the code37 to set + */ + public void setCode37(Float code37) { + this.code37 = code37; + } + + /** + * @return the code38 + */ + public Float getCode38() { + return code38; + } + + /** + * @param code38 + * the code38 to set + */ + public void setCode38(Float code38) { + this.code38 = code38; + } + + /** + * @return the code39 + */ + public String getCode39() { + return code39; + } + + /** + * @param code39 + * the code39 to set + */ + public void setCode39(String code39) { + this.code39 = code39; + } + + /** + * @return the code40 + */ + public Float getCode40() { + return code40; + } + + /** + * @param code40 + * the code40 to set + */ + public void setCode40(Float code40) { + this.code40 = code40; + } + + /** + * @return the code41 + */ + public Short getCode41() { + return code41; + } + + /** + * @param code41 + * the code41 to set + */ + public void setCode41(Short code41) { + this.code41 = code41; + } + + /** + * @return the code43 + */ + public Float getCode43() { + return code43; + } + + /** + * @param code43 + * the code43 to set + */ + public void setCode43(Float code43) { + this.code43 = code43; + } + + /** + * @return the code44 + */ + public Float getCode44() { + return code44; + } + + /** + * @param code44 + * the code44 to set + */ + public void setCode44(Float code44) { + this.code44 = code44; + } + + /** + * @return the code45 + */ + public Float getCode45() { + return code45; + } + + /** + * @param code45 + * the code45 to set + */ + public void setCode45(Float code45) { + this.code45 = code45; + } + + /** + * @return the code46 + */ + public Float getCode46() { + return code46; + } + + /** + * @param code46 + * the code46 to set + */ + public void setCode46(Float code46) { + this.code46 = code46; + } + + /** + * @return the code47 + */ + public Float getCode47() { + return code47; + } + + /** + * @param code47 + * the code47 to set + */ + public void setCode47(Float code47) { + this.code47 = code47; + } + + /** + * @return the code48 + */ + public Float getCode48() { + return code48; + } + + /** + * @param code48 + * the code48 to set + */ + public void setCode48(Float code48) { + this.code48 = code48; + } + + /** + * @return the code49 + */ + public Float getCode49() { + return code49; + } + + /** + * @param code49 + * the code49 to set + */ + public void setCode49(Float code49) { + this.code49 = code49; + } + + /** + * @return the code50 + */ + public Float getCode50() { + return code50; + } + + /** + * @param code50 + * the code50 to set + */ + public void setCode50(Float code50) { + this.code50 = code50; + } + + /** + * @return the code52 + */ + public Float getCode52() { + return code52; + } + + /** + * @param code52 + * the code52 to set + */ + public void setCode52(Float code52) { + this.code52 = code52; + } + + /** + * @return the code53 + */ + public Float getCode53() { + return code53; + } + + /** + * @param code53 + * the code53 to set + */ + public void setCode53(Float code53) { + this.code53 = code53; + } + + /** + * @return the code54 + */ + public Float getCode54() { + return code54; + } + + /** + * @param code54 + * the code54 to set + */ + public void setCode54(Float code54) { + this.code54 = code54; + } + + /** + * @return the code55 + */ + public Float getCode55() { + return code55; + } + + /** + * @param code55 + * the code55 to set + */ + public void setCode55(Float code55) { + this.code55 = code55; + } + + /** + * @return the code56 + */ + public Float getCode56() { + return code56; + } + + /** + * @param code56 + * the code56 to set + */ + public void setCode56(Float code56) { + this.code56 = code56; + } + + /** + * @return the code57 + */ + public Float getCode57() { + return code57; + } + + /** + * @param code57 + * the code57 to set + */ + public void setCode57(Float code57) { + this.code57 = code57; + } + + /** + * @return the code58 + */ + public Float getCode58() { + return code58; + } + + /** + * @param code58 + * the code58 to set + */ + public void setCode58(Float code58) { + this.code58 = code58; + } + + /** + * @return the code59 + */ + public Float getCode59() { + return code59; + } + + /** + * @param code59 + * the code59 to set + */ + public void setCode59(Float code59) { + this.code59 = code59; + } + + /** + * @return the code60 + */ + public Float getCode60() { + return code60; + } + + /** + * @param code60 + * the code60 to set + */ + public void setCode60(Float code60) { + this.code60 = code60; + } + + /** + * @return the code61 + */ + public Float getCode61() { + return code61; + } + + /** + * @param code61 + * the code61 to set + */ + public void setCode61(Float code61) { + this.code61 = code61; + } + + /** + * @return the code62 + */ + public Float getCode62() { + return code62; + } + + /** + * @param code62 + * the code62 to set + */ + public void setCode62(Float code62) { + this.code62 = code62; + } + + /** + * @return the code63 + */ + public Float getCode63() { + return code63; + } + + /** + * @param code63 + * the code63 to set + */ + public void setCode63(Float code63) { + this.code63 = code63; + } + + /** + * @return the code64 + */ + public Float getCode64() { + return code64; + } + + /** + * @param code64 + * the code64 to set + */ + public void setCode64(Float code64) { + this.code64 = code64; + } + + /** + * @return the code65 + */ + public Float getCode65() { + return code65; + } + + /** + * @param code65 + * the code65 to set + */ + public void setCode65(Float code65) { + this.code65 = code65; + } + + /** + * @return the code66 + */ + public Float getCode66() { + return code66; + } + + /** + * @param code66 + * the code66 to set + */ + public void setCode66(Float code66) { + this.code66 = code66; + } + + /** + * @return the code67 + */ + public Float getCode67() { + return code67; + } + + /** + * @param code67 + * the code67 to set + */ + public void setCode67(Float code67) { + this.code67 = code67; + } + + /** + * @return the code68 + */ + public Float getCode68() { + return code68; + } + + /** + * @param code68 + * the code68 to set + */ + public void setCode68(Float code68) { + this.code68 = code68; + } + + /** + * @return the code69 + */ + public Float getCode69() { + return code69; + } + + /** + * @param code69 + * the code69 to set + */ + public void setCode69(Float code69) { + this.code69 = code69; + } + + /** + * @return the code70 + */ + public Float getCode70() { + return code70; + } + + /** + * @param code70 + * the code70 to set + */ + public void setCode70(Float code70) { + this.code70 = code70; + } + + /** + * @return the code71 + */ + public Float getCode71() { + return code71; + } + + /** + * @param code71 + * the code71 to set + */ + public void setCode71(Float code71) { + this.code71 = code71; + } + + /** + * @return the code72 + */ + public String getCode72() { + return code72; + } + + /** + * @param code72 + * the code72 to set + */ + public void setCode72(String code72) { + this.code72 = code72; + } + + /** + * @return the code73 + */ + public Float getCode73() { + return code73; + } + + /** + * @param code73 + * the code73 to set + */ + public void setCode73(Float code73) { + this.code73 = code73; + } + + /** + * @return the code74 + */ + public Float getCode74() { + return code74; + } + + /** + * @param code74 + * the code74 to set + */ + public void setCode74(Float code74) { + this.code74 = code74; + } + + /** + * @return the code75 + */ + public Float getCode75() { + return code75; + } + + /** + * @param code75 + * the code75 to set + */ + public void setCode75(Float code75) { + this.code75 = code75; + } + + /** + * @return the code76 + */ + public Float getCode76() { + return code76; + } + + /** + * @param code76 + * the code76 to set + */ + public void setCode76(Float code76) { + this.code76 = code76; + } + + /** + * @return the code77 + */ + public String getCode77() { + return code77; + } + + /** + * @param code77 + * the code77 to set + */ + public void setCode77(String code77) { + this.code77 = code77; + } + + /** + * @return the code78 + */ + public Float getCode78() { + return code78; + } + + /** + * @param code78 + * the code78 to set + */ + public void setCode78(Float code78) { + this.code78 = code78; + } + + /** + * @return the code79 + */ + public Float getCode79() { + return code79; + } + + /** + * @param code79 + * the code79 to set + */ + public void setCode79(Float code79) { + this.code79 = code79; + } + + /** + * @return the code80 + */ + public Short getCode80() { + return code80; + } + + /** + * @param code80 + * the code80 to set + */ + public void setCode80(Short code80) { + this.code80 = code80; + } + + /** + * @return the code81 + */ + public Short getCode81() { + return code81; + } + + /** + * @param code81 + * the code81 to set + */ + public void setCode81(Short code81) { + this.code81 = code81; + } + + /** + * @return the code82 + */ + public Short getCode82() { + return code82; + } + + /** + * @param code82 + * the code82 to set + */ + public void setCode82(Short code82) { + this.code82 = code82; + } + + /** + * @return the code83 + */ + public Float getCode83() { + return code83; + } + + /** + * @param code83 + * the code83 to set + */ + public void setCode83(Float code83) { + this.code83 = code83; + } + + /** + * @return the code84 + */ + public Short getCode84() { + return code84; + } + + /** + * @param code84 + * the code84 to set + */ + public void setCode84(Short code84) { + this.code84 = code84; + } + + /** + * @return the code85 + */ + public Short getCode85() { + return code85; + } + + /** + * @param code85 + * the code85 to set + */ + public void setCode85(Short code85) { + this.code85 = code85; + } + + /** + * @return the code86 + */ + public Float getCode86() { + return code86; + } + + /** + * @param code86 + * the code86 to set + */ + public void setCode86(Float code86) { + this.code86 = code86; + } + + /** + * @return the code87 + */ + public Float getCode87() { + return code87; + } + + /** + * @param code87 + * the code87 to set + */ + public void setCode87(Float code87) { + this.code87 = code87; + } + + /** + * @return the code88 + */ + public Float getCode88() { + return code88; + } + + /** + * @param code88 + * the code88 to set + */ + public void setCode88(Float code88) { + this.code88 = code88; + } + + /** + * @return the code89 + */ + public Float getCode89() { + return code89; + } + + /** + * @param code89 + * the code89 to set + */ + public void setCode89(Float code89) { + this.code89 = code89; + } + + /** + * @return the code90 + */ + public Float getCode90() { + return code90; + } + + /** + * @param code90 + * the code90 to set + */ + public void setCode90(Float code90) { + this.code90 = code90; + } + + /** + * @return the code91 + */ + public Float getCode91() { + return code91; + } + + /** + * @param code91 + * the code91 to set + */ + public void setCode91(Float code91) { + this.code91 = code91; + } + + /** + * @return the code92 + */ + public Short getCode92() { + return code92; + } + + /** + * @param code92 + * the code92 to set + */ + public void setCode92(Short code92) { + this.code92 = code92; + } + + /** + * @return the code93 + */ + public Float getCode93() { + return code93; + } + + /** + * @param code93 + * the code93 to set + */ + public void setCode93(Float code93) { + this.code93 = code93; + } + + /** + * @return the code94 + */ + public Float getCode94() { + return code94; + } + + /** + * @param code94 + * the code94 to set + */ + public void setCode94(Float code94) { + this.code94 = code94; + } + + /** + * @return the code95 + */ + public Float getCode95() { + return code95; + } + + /** + * @param code95 + * the code95 to set + */ + public void setCode95(Float code95) { + this.code95 = code95; + } + + /** + * @return the code96 + */ + public Float getCode96() { + return code96; + } + + /** + * @param code96 + * the code96 to set + */ + public void setCode96(Float code96) { + this.code96 = code96; + } + /** - * @return the code12 - */ - public Float getCode12() { - return code12; - } - - /** - * @param code12 the code12 to set - */ - public void setCode12(Float code12) { - this.code12 = code12; - } - - /** - * @return the code13 - */ - public Float getCode13() { - return code13; - } - - /** - * @param code13 the code13 to set - */ - public void setCode13(Float code13) { - this.code13 = code13; - } - - /** - * @return the code14 - */ - public Float getCode14() { - return code14; - } - - /** - * @param code14 the code14 to set - */ - public void setCode14(Float code14) { - this.code14 = code14; - } - - /** - * @return the code15 - */ - public Float getCode15() { - return code15; - } - - /** - * @param code15 the code15 to set - */ - public void setCode15(Float code15) { - this.code15 = code15; - } - - /** - * @return the code16 - */ - public Float getCode16() { - return code16; - } - - /** - * @param code16 the code16 to set - */ - public void setCode16(Float code16) { - this.code16 = code16; - } - - /** - * @return the code17 - */ - public Float getCode17() { - return code17; - } - - /** - * @param code17 the code17 to set - */ - public void setCode17(Float code17) { - this.code17 = code17; - } - - /** - * @return the code18 - */ - public Float getCode18() { - return code18; - } - - /** - * @param code18 the code18 to set - */ - public void setCode18(Float code18) { - this.code18 = code18; - } - - /** - * @return the code19 - */ - public Float getCode19() { - return code19; - } - - /** - * @param code19 the code19 to set - */ - public void setCode19(Float code19) { - this.code19 = code19; - } - - /** - * @return the code20 - */ - public Short getCode20() { - return code20; - } - - /** - * @param code20 the code20 to set - */ - public void setCode20(Short code20) { - this.code20 = code20; - } - - /** - * @return the code21 - */ - public Float getCode21() { - return code21; - } - - /** - * @param code21 the code21 to set - */ - public void setCode21(Float code21) { - this.code21 = code21; - } - - /** - * @return the code22 - */ - public Float getCode22() { - return code22; - } - - /** - * @param code22 the code22 to set - */ - public void setCode22(Float code22) { - this.code22 = code22; - } - - /** - * @return the code23 - */ - public Float getCode23() { - return code23; - } - - /** - * @param code23 the code23 to set - */ - public void setCode23(Float code23) { - this.code23 = code23; - } - - /** - * @return the code24 - */ - public Float getCode24() { - return code24; - } - - /** - * @param code24 the code24 to set - */ - public void setCode24(Float code24) { - this.code24 = code24; - } - - /** - * @return the code25 - */ - public Float getCode25() { - return code25; - } - - /** - * @param code25 the code25 to set - */ - public void setCode25(Float code25) { - this.code25 = code25; - } - - /** - * @return the code26 - */ - public Float getCode26() { - return code26; - } - - /** - * @param code26 the code26 to set - */ - public void setCode26(Float code26) { - this.code26 = code26; - } - - /** - * @return the code27 - */ - public Float getCode27() { - return code27; - } - - /** - * @param code27 the code27 to set - */ - public void setCode27(Float code27) { - this.code27 = code27; - } - - /** - * @return the code28 - */ - public Float getCode28() { - return code28; - } - - /** - * @param code28 the code28 to set - */ - public void setCode28(Float code28) { - this.code28 = code28; - } - - /** - * @return the code29 - */ - public Float getCode29() { - return code29; - } - - /** - * @param code29 the code29 to set - */ - public void setCode29(Float code29) { - this.code29 = code29; - } - - /** - * @return the code30 - */ - public Float getCode30() { - return code30; - } - - /** - * @param code30 the code30 to set - */ - public void setCode30(Float code30) { - this.code30 = code30; - } - - /** - * @return the code31 - */ - public Float getCode31() { - return code31; - } - - /** - * @param code31 the code31 to set - */ - public void setCode31(Float code31) { - this.code31 = code31; - } - - /** - * @return the code32 - */ - public Float getCode32() { - return code32; - } - - /** - * @param code32 the code32 to set - */ - public void setCode32(Float code32) { - this.code32 = code32; - } - - /** - * @return the code33 - */ - public Float getCode33() { - return code33; - } - - /** - * @param code33 the code33 to set - */ - public void setCode33(Float code33) { - this.code33 = code33; - } - - /** - * @return the code34 - */ - public Float getCode34() { - return code34; - } - - /** - * @param code34 the code34 to set - */ - public void setCode34(Float code34) { - this.code34 = code34; - } - - /** - * @return the code35 - */ - public Float getCode35() { - return code35; - } - - /** - * @param code35 the code35 to set - */ - public void setCode35(Float code35) { - this.code35 = code35; - } - - /** - * @return the code36 - */ - public Float getCode36() { - return code36; - } - - /** - * @param code36 the code36 to set - */ - public void setCode36(Float code36) { - this.code36 = code36; - } - - /** - * @return the code37 - */ - public Float getCode37() { - return code37; - } - - /** - * @param code37 the code37 to set - */ - public void setCode37(Float code37) { - this.code37 = code37; - } - - /** - * @return the code38 - */ - public Float getCode38() { - return code38; - } - - /** - * @param code38 the code38 to set - */ - public void setCode38(Float code38) { - this.code38 = code38; - } - - /** - * @return the code39 - */ - public String getCode39() { - return code39; - } - - /** - * @param code39 the code39 to set - */ - public void setCode39(String code39) { - this.code39 = code39; - } - - /** - * @return the code40 - */ - public Float getCode40() { - return code40; - } - - /** - * @param code40 the code40 to set - */ - public void setCode40(Float code40) { - this.code40 = code40; - } - - /** - * @return the code41 - */ - public Short getCode41() { - return code41; - } - - /** - * @param code41 the code41 to set - */ - public void setCode41(Short code41) { - this.code41 = code41; - } - - /** - * @return the code43 - */ - public Float getCode43() { - return code43; - } - - /** - * @param code43 the code43 to set - */ - public void setCode43(Float code43) { - this.code43 = code43; - } - - /** - * @return the code44 - */ - public Float getCode44() { - return code44; - } - - /** - * @param code44 the code44 to set - */ - public void setCode44(Float code44) { - this.code44 = code44; - } - - /** - * @return the code45 - */ - public Float getCode45() { - return code45; - } - - /** - * @param code45 the code45 to set - */ - public void setCode45(Float code45) { - this.code45 = code45; - } - - /** - * @return the code46 - */ - public Float getCode46() { - return code46; - } - - /** - * @param code46 the code46 to set - */ - public void setCode46(Float code46) { - this.code46 = code46; - } - - /** - * @return the code47 - */ - public Float getCode47() { - return code47; - } - - /** - * @param code47 the code47 to set - */ - public void setCode47(Float code47) { - this.code47 = code47; - } - - /** - * @return the code48 - */ - public Float getCode48() { - return code48; - } - - /** - * @param code48 the code48 to set - */ - public void setCode48(Float code48) { - this.code48 = code48; - } - - /** - * @return the code49 - */ - public Float getCode49() { - return code49; - } - - /** - * @param code49 the code49 to set - */ - public void setCode49(Float code49) { - this.code49 = code49; - } - - /** - * @return the code50 - */ - public Float getCode50() { - return code50; - } - - /** - * @param code50 the code50 to set - */ - public void setCode50(Float code50) { - this.code50 = code50; - } - - /** - * @return the code52 - */ - public Float getCode52() { - return code52; - } - - /** - * @param code52 the code52 to set - */ - public void setCode52(Float code52) { - this.code52 = code52; - } - - /** - * @return the code53 - */ - public Float getCode53() { - return code53; - } - - /** - * @param code53 the code53 to set - */ - public void setCode53(Float code53) { - this.code53 = code53; - } - - /** - * @return the code54 - */ - public Float getCode54() { - return code54; - } - - /** - * @param code54 the code54 to set - */ - public void setCode54(Float code54) { - this.code54 = code54; - } - - /** - * @return the code55 - */ - public Float getCode55() { - return code55; - } - - /** - * @param code55 the code55 to set - */ - public void setCode55(Float code55) { - this.code55 = code55; - } - - /** - * @return the code56 - */ - public Float getCode56() { - return code56; - } - - /** - * @param code56 the code56 to set - */ - public void setCode56(Float code56) { - this.code56 = code56; - } - - /** - * @return the code57 - */ - public Float getCode57() { - return code57; - } - - /** - * @param code57 the code57 to set - */ - public void setCode57(Float code57) { - this.code57 = code57; - } - - /** - * @return the code58 - */ - public Float getCode58() { - return code58; - } - - /** - * @param code58 the code58 to set - */ - public void setCode58(Float code58) { - this.code58 = code58; - } - - /** - * @return the code59 - */ - public Float getCode59() { - return code59; - } - - /** - * @param code59 the code59 to set - */ - public void setCode59(Float code59) { - this.code59 = code59; - } - - /** - * @return the code60 - */ - public Float getCode60() { - return code60; - } - - /** - * @param code60 the code60 to set - */ - public void setCode60(Float code60) { - this.code60 = code60; - } - - /** - * @return the code61 - */ - public Float getCode61() { - return code61; - } - - /** - * @param code61 the code61 to set - */ - public void setCode61(Float code61) { - this.code61 = code61; - } - - /** - * @return the code62 - */ - public Float getCode62() { - return code62; - } - - /** - * @param code62 the code62 to set - */ - public void setCode62(Float code62) { - this.code62 = code62; - } - - /** - * @return the code63 - */ - public Float getCode63() { - return code63; - } - - /** - * @param code63 the code63 to set - */ - public void setCode63(Float code63) { - this.code63 = code63; - } - - /** - * @return the code64 - */ - public Float getCode64() { - return code64; - } - - /** - * @param code64 the code64 to set - */ - public void setCode64(Float code64) { - this.code64 = code64; - } - - /** - * @return the code65 - */ - public Float getCode65() { - return code65; - } - - /** - * @param code65 the code65 to set - */ - public void setCode65(Float code65) { - this.code65 = code65; - } - - /** - * @return the code66 - */ - public Float getCode66() { - return code66; - } - - /** - * @param code66 the code66 to set - */ - public void setCode66(Float code66) { - this.code66 = code66; - } - - /** - * @return the code67 - */ - public Float getCode67() { - return code67; - } - - /** - * @param code67 the code67 to set - */ - public void setCode67(Float code67) { - this.code67 = code67; - } - - /** - * @return the code68 - */ - public Float getCode68() { - return code68; - } - - /** - * @param code68 the code68 to set - */ - public void setCode68(Float code68) { - this.code68 = code68; - } - - /** - * @return the code69 - */ - public Float getCode69() { - return code69; - } - - /** - * @param code69 the code69 to set - */ - public void setCode69(Float code69) { - this.code69 = code69; - } - - /** - * @return the code70 - */ - public Float getCode70() { - return code70; - } - - /** - * @param code70 the code70 to set - */ - public void setCode70(Float code70) { - this.code70 = code70; - } - - /** - * @return the code71 - */ - public Float getCode71() { - return code71; - } - - /** - * @param code71 the code71 to set - */ - public void setCode71(Float code71) { - this.code71 = code71; - } - - /** - * @return the code72 - */ - public String getCode72() { - return code72; - } - - /** - * @param code72 the code72 to set - */ - public void setCode72(String code72) { - this.code72 = code72; - } - - /** - * @return the code73 - */ - public Float getCode73() { - return code73; - } - - /** - * @param code73 the code73 to set - */ - public void setCode73(Float code73) { - this.code73 = code73; - } - - /** - * @return the code74 - */ - public Float getCode74() { - return code74; - } - - /** - * @param code74 the code74 to set - */ - public void setCode74(Float code74) { - this.code74 = code74; - } - - /** - * @return the code75 - */ - public Float getCode75() { - return code75; - } - - /** - * @param code75 the code75 to set - */ - public void setCode75(Float code75) { - this.code75 = code75; - } - - /** - * @return the code76 - */ - public Float getCode76() { - return code76; - } - - /** - * @param code76 the code76 to set - */ - public void setCode76(Float code76) { - this.code76 = code76; - } - - /** - * @return the code77 - */ - public String getCode77() { - return code77; - } - - /** - * @param code77 the code77 to set - */ - public void setCode77(String code77) { - this.code77 = code77; - } - - /** - * @return the code78 - */ - public Float getCode78() { - return code78; - } - - /** - * @param code78 the code78 to set - */ - public void setCode78(Float code78) { - this.code78 = code78; - } - - /** - * @return the code79 - */ - public Float getCode79() { - return code79; - } - - /** - * @param code79 the code79 to set - */ - public void setCode79(Float code79) { - this.code79 = code79; - } - - /** - * @return the code80 - */ - public Short getCode80() { - return code80; - } - - /** - * @param code80 the code80 to set - */ - public void setCode80(Short code80) { - this.code80 = code80; - } - - /** - * @return the code81 - */ - public Short getCode81() { - return code81; - } - - /** - * @param code81 the code81 to set - */ - public void setCode81(Short code81) { - this.code81 = code81; - } - - /** - * @return the code82 - */ - public Short getCode82() { - return code82; - } - - /** - * @param code82 the code82 to set - */ - public void setCode82(Short code82) { - this.code82 = code82; - } - - /** - * @return the code83 - */ - public Float getCode83() { - return code83; - } - - /** - * @param code83 the code83 to set - */ - public void setCode83(Float code83) { - this.code83 = code83; - } - - /** - * @return the code84 - */ - public Short getCode84() { - return code84; - } - - /** - * @param code84 the code84 to set - */ - public void setCode84(Short code84) { - this.code84 = code84; - } - - /** - * @return the code85 - */ - public Short getCode85() { - return code85; - } - - /** - * @param code85 the code85 to set - */ - public void setCode85(Short code85) { - this.code85 = code85; - } - - /** - * @return the code86 - */ - public Float getCode86() { - return code86; - } - - /** - * @param code86 the code86 to set - */ - public void setCode86(Float code86) { - this.code86 = code86; - } - - /** - * @return the code87 - */ - public Float getCode87() { - return code87; - } - - /** - * @param code87 the code87 to set - */ - public void setCode87(Float code87) { - this.code87 = code87; - } - - /** - * @return the code88 - */ - public Float getCode88() { - return code88; - } - - /** - * @param code88 the code88 to set - */ - public void setCode88(Float code88) { - this.code88 = code88; - } - - /** - * @return the code89 - */ - public Float getCode89() { - return code89; - } - - /** - * @param code89 the code89 to set - */ - public void setCode89(Float code89) { - this.code89 = code89; - } - - /** - * @return the code90 - */ - public Float getCode90() { - return code90; - } - - /** - * @param code90 the code90 to set - */ - public void setCode90(Float code90) { - this.code90 = code90; - } - - /** - * @return the code91 - */ - public Float getCode91() { - return code91; - } - - /** - * @param code91 the code91 to set - */ - public void setCode91(Float code91) { - this.code91 = code91; - } - - /** - * @return the code92 - */ - public Short getCode92() { - return code92; - } - - /** - * @param code92 the code92 to set - */ - public void setCode92(Short code92) { - this.code92 = code92; - } - - /** - * @return the code93 - */ - public Float getCode93() { - return code93; - } - - /** - * @param code93 the code93 to set - */ - public void setCode93(Float code93) { - this.code93 = code93; - } - - /** - * @return the code94 - */ - public Float getCode94() { - return code94; - } - - /** - * @param code94 the code94 to set - */ - public void setCode94(Float code94) { - this.code94 = code94; - } - - /** - * @return the code95 - */ - public Float getCode95() { - return code95; - } - - /** - * @param code95 the code95 to set - */ - public void setCode95(Float code95) { - this.code95 = code95; - } - - /** - * @return the code96 - */ - public Float getCode96() { - return code96; - } - - /** - * @param code96 the code96 to set - */ - public void setCode96(Float code96) { - this.code96 = code96; - } - - /** * Get this observation's geometry. * * @return The geometry for this observation. @@ -2033,7 +2136,7 @@ IDecoderGettable { public Geometry getGeometry() { return location.getGeometry(); } - + /** * Get the geometry latitude. * @@ -2051,7 +2154,7 @@ IDecoderGettable { public Double getLongitude() { return location.getLongitude(); } - + /** * Get the elevation, in meters, of the observing platform or location. * @@ -2060,7 +2163,7 @@ IDecoderGettable { public Integer getElevation() { return location.getElevation(); } - + /** * @return the location */ @@ -2069,34 +2172,19 @@ IDecoderGettable { } /** - * @param location the location to set + * @param location + * the location to set */ public void setLocation(SurfaceObsLocation location) { this.location = location; } -// /** -// * -// * @return -// */ -// public String getNetworkType() { -// return networkType; -// } + @Override + public Amount getValue(String paramName) { + // TODO Auto-generated method stub + return null; + } -// /** -// * -// * @return -// */ -// public void setNetworkType(String type) { -// networkType = type; -// } - - @Override - public Amount getValue(String paramName) { - // TODO Auto-generated method stub - return null; - } - /** * @return the timeObs */ @@ -2118,7 +2206,7 @@ IDecoderGettable { public void setSpatialObject(SurfaceObsLocation loc) { location = loc; } - + /** * */ @@ -2126,10 +2214,10 @@ IDecoderGettable { public SurfaceObsLocation getSpatialObject() { return location; } - + /** - * This class implements IDecoderGettable so return this - * instance. + * This class implements IDecoderGettable so return this instance. + * * @return The reference to this instance. */ @Override @@ -2149,7 +2237,7 @@ IDecoderGettable { } else if (OBS_TEXT.equals(pName)) { retValue = getStationId(); } - + return retValue; } @@ -2157,35 +2245,7 @@ IDecoderGettable { public String[] getStrings(String paramName) { return null; } - -// @Override -// public Amount getValue(String paramName) { -// Amount a = null; -// String pName = PARM_MAP.get(paramName); -// -// if (SFC_TEMP.equals(pName)) { -// a = new Amount(temp, TEMPERATURE_UNIT); -// } else if (SFC_DWPT.equals(pName)) { -// a = new Amount(dwpt, TEMPERATURE_UNIT); -// } else if (SFC_WNDSPD.equals(pName)) { -// a = new Amount(windSpeed, WIND_SPEED_UNIT); -// } else if (SFC_WNDGST.equals(pName)) { -// a = new Amount(windGust, WIND_SPEED_UNIT); -// } else if (SFC_WNDDIR.equals(pName)) { -// a = new Amount(windDirection, WIND_DIR_UNIT); -// } else if (PRES_ALTSG.equals(pName)) { -// a = new Amount(altimeter, PRESSURE_UNIT); -// } else if (STA_LAT.equals(pName)) { -// a = new Amount(getLatitude(), LOCATION_UNIT); -// } else if (STA_LON.equals(pName)) { -// a = new Amount(getLongitude(), LOCATION_UNIT); -// } else if (PRES_SLP.equals(pName)) { -// a = new Amount(seaLevelPressure, PRESSURE_UNIT); -// } -// -// return a; -// } - + /** * */ @@ -2194,113 +2254,112 @@ IDecoderGettable { return null; } - /** - * @param providerId the providerId to set - */ - public void setProviderId(String providerId) { - this.providerId = providerId; - } + /** + * @param providerId + * the providerId to set + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } - /** - * @return the providerId - */ - public String getProviderId() { - return providerId; - } + /** + * @return the providerId + */ + public String getProviderId() { + return providerId; + } - /** - * @param stationName the stationName to set - */ - public void setStationName(String stationName) { - this.stationName = stationName; - } + /** + * @param stationName + * the stationName to set + */ + public void setStationName(String stationName) { + this.stationName = stationName; + } - /** - * @return the stationName - */ - public String getStationName() { - return stationName; - } + /** + * @return the stationName + */ + public String getStationName() { + return stationName; + } + /** + * @param homeWFO + * the homeWFO to set + */ + public void setHomeWFO(String homeWFO) { + this.homeWFO = homeWFO; + } - /** - * @param homeWFO the homeWFO to set - */ - public void setHomeWFO(String homeWFO) { - this.homeWFO = homeWFO; - } + /** + * @return the homeWFO + */ + public String getHomeWFO() { + return homeWFO; + } - /** - * @return the homeWFO - */ - public String getHomeWFO() { - return homeWFO; - } + /** + * @param reportType + * the reportType to set + */ + public void setReportType(Short reportType) { + this.reportType = reportType; + } - /** - * @param reportType the reportType to set - */ - public void setReportType(Short reportType) { - this.reportType = reportType; - } + /** + * @return the reportType + */ + public Short getReportType() { + return reportType; + } - /** - * @return the reportType - */ - public Short getReportType() { - return reportType; - } + /** + * @param unitsCode + * the unitsCode to set + */ + public void setUnitsCode(Short unitsCode) { + this.unitsCode = unitsCode; + } - /** - * @param unitsCode the unitsCode to set - */ - public void setUnitsCode(Short unitsCode) { - this.unitsCode = unitsCode; - } + /** + * @return the unitsCode + */ + public Short getUnitsCode() { + return unitsCode; + } - /** - * @return the unitsCode - */ - public Short getUnitsCode() { - return unitsCode; - } + /** + * @param code10 + * the code10 to set + */ + public void setCode10(Float code10) { + this.code10 = code10; + } - /** - * @param code10 the code10 to set - */ - public void setCode10(Float code10) { - this.code10 = code10; - } + /** + * @return the code10 + */ + public Float getCode10() { + return code10; + } - /** - * @return the code10 - */ - public Float getCode10() { - return code10; - } + /** + * @param code11 + * the code11 to set + */ + public void setCode11(Float code11) { + this.code11 = code11; + } - /** - * @param code11 the code11 to set - */ - public void setCode11(Float code11) { - this.code11 = code11; - } + /** + * @return the code11 + */ + public Float getCode11() { + return code11; + } - /** - * @return the code11 - */ - public Float getCode11() { - return code11; - } - -// /** -// * @param stationId the stationId to set -// */ -// public void setStationId(String stationId) { -// this.stationId = stationId; -// } - - /** + /** * Get the station identifier for this observation. * * @return the stationId @@ -2309,24 +2368,30 @@ IDecoderGettable { return location.getStationId(); } - /** - * @param rawMessage the rawMessage to set - */ - public void setRawMessage(String rawMessage) { - this.rawMessage = rawMessage; - } + /** + * @param rawMessage + * the rawMessage to set + */ + public void setRawMessage(String rawMessage) { + this.rawMessage = rawMessage; + } + + /** + * @return the rawMessage + */ + public String getRawMessage() { + return rawMessage; + } - /** - * @return the rawMessage - */ - public String getRawMessage() { - return rawMessage; - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } -} + @Override + public String getPluginName() { + return "ldadmanual"; + } +} diff --git a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java index 3a5b5117f7..f9455f1d31 100644 --- a/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java +++ b/edexOsgi/com.raytheon.edex.plugin.ldadprofiler/src/com/raytheon/edex/plugin/ldadprofiler/common/ProfilerLdadObs.java @@ -68,11 +68,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ----------- ---------- ----------- -------------------------- - * 10/07/09 vkorolev Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Oct 07, 2009 vkorolev Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -87,309 +89,305 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ldadprofiler", - indexes = { - @Index(name = "ldadprofiler_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ldadprofiler", indexes = { @Index(name = "ldadprofiler_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ProfilerLdadObs extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { - public static final String PLUGIN_NAME = "ldadprofiler"; + public static final String PLUGIN_NAME = "ldadprofiler"; - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + 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_SPEED_UNIT = SI.METERS_PER_SECOND; - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - private static final HashMap PARM_MAP = new HashMap(); + private static final HashMap PARM_MAP = new HashMap(); - 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); - } + 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); + } - private static final String PRESS = "PRESS"; + private static final String PRESS = "PRESS"; - private static final String AGL = "AGL"; + private static final String AGL = "AGL"; - public static final String PRESS_PARAM_PTRN = ".*:" + PRESS + "=\\d{2,4}"; + public static final String PRESS_PARAM_PTRN = ".*:" + PRESS + "=\\d{2,4}"; - public static final String AGL_PARAM_PTRN = ".*:" + AGL + "=\\d{2,4}"; + public static final String AGL_PARAM_PTRN = ".*:" + AGL + "=\\d{2,4}"; - @Transient - private String parameterName = null; + @Transient + private String parameterName = null; - @DataURI(position = 1) - @XmlAttribute - @DynamicSerializeElement - private Integer reportType; + @DataURI(position = 1) + @XmlAttribute + @DynamicSerializeElement + private Integer reportType; - // Location - @Embedded - @DataURI(position = 2, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; // latitude, longitude, elevation, + // Location + @Embedded + @DataURI(position = 2, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; // latitude, longitude, elevation, - // stationId + // stationId - // Base time in Epoch "seconds since 1970-01-01 00:00:00 UTC" - @Column - @DynamicSerializeElement - @XmlElement - int base_time; + // Base time in Epoch "seconds since 1970-01-01 00:00:00 UTC" + @Column + @DynamicSerializeElement + @XmlElement + int base_time; - // Consensus start time offset from base_time - // "seconds since 2009/10/07 00:00:00 UTC" - @Column - @DynamicSerializeElement - @XmlElement - double start_time_offset; + // Consensus start time offset from base_time + // "seconds since 2009/10/07 00:00:00 UTC" + @Column + @DynamicSerializeElement + @XmlElement + double start_time_offset; - // Consensus end time offset from base_time - // "seconds since 2009/10/07 00:00:00 UTC" - @Column - @DynamicSerializeElement - @XmlElement - double end_time_offset; + // Consensus end time offset from base_time + // "seconds since 2009/10/07 00:00:00 UTC" + @Column + @DynamicSerializeElement + @XmlElement + double end_time_offset; - // nhts Number of heights? - @Column - @DynamicSerializeElement - @XmlElement - int nhts; + // nhts Number of heights? + @Column + @DynamicSerializeElement + @XmlElement + int nhts; - // the level data - @XmlElement - @DynamicSerializeElement - @Transient - private List levels; + // the level data + @XmlElement + @DynamicSerializeElement + @Transient + private List levels; - // The profiler observation time. - @Column - @XmlAttribute - @DynamicSerializeElement - private Calendar timeObs; + // The profiler observation time. + @Column + @XmlAttribute + @DynamicSerializeElement + private Calendar timeObs; - @Column - @XmlAttribute - @DynamicSerializeElement - private String stationName; + @Column + @XmlAttribute + @DynamicSerializeElement + private String stationName; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - /** - * @return the base_time - */ - public int getBase_time() { - return base_time; - } + /** + * @return the base_time + */ + public int getBase_time() { + return base_time; + } - /** - * @param base_time - * the base_time to set - */ - public void setBase_time(int base_time) { - this.base_time = base_time; - } + /** + * @param base_time + * the base_time to set + */ + public void setBase_time(int base_time) { + this.base_time = base_time; + } - public Calendar getTimeObs() { - return timeObs; - } + public Calendar getTimeObs() { + return timeObs; + } - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } - /** - * @return the start_time_offset - */ - public double getStart_time_offset() { - return start_time_offset; - } + /** + * @return the start_time_offset + */ + public double getStart_time_offset() { + return start_time_offset; + } - /** - * @param start_time_offset - * the start_time_offset to set - */ - public void setStart_time_offset(double start_time_offset) { - this.start_time_offset = start_time_offset; - } + /** + * @param start_time_offset + * the start_time_offset to set + */ + public void setStart_time_offset(double start_time_offset) { + this.start_time_offset = start_time_offset; + } - /** - * @return the end_time_offset - */ - public double getEnd_time_offset() { - return end_time_offset; - } + /** + * @return the end_time_offset + */ + public double getEnd_time_offset() { + return end_time_offset; + } - /** - * @param end_time_offset - * the end_time_offset to set - */ - public void setEnd_time_offset(double end_time_offset) { - this.end_time_offset = end_time_offset; - } + /** + * @param end_time_offset + * the end_time_offset to set + */ + public void setEnd_time_offset(double end_time_offset) { + this.end_time_offset = end_time_offset; + } - /** - * @return the nhts - */ - public int getNhts() { - return nhts; - } + /** + * @return the nhts + */ + public int getNhts() { + return nhts; + } - /** - * @param nhts - * the nhts to set - */ - public void setNhts(int nhts) { - this.nhts = nhts; - } + /** + * @param nhts + * the nhts to set + */ + public void setNhts(int nhts) { + this.nhts = nhts; + } - /** - * @return the levels - */ - public List getLevels() { - return levels; - } + /** + * @return the levels + */ + public List getLevels() { + return levels; + } - /** - * @param levels - * the levels to set - */ - public void setLevels(List levels) { - this.levels = levels; - } + /** + * @param levels + * the levels to set + */ + public void setLevels(List levels) { + this.levels = levels; + } - /** - * @return the pointDataView - */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + /** + * @return the pointDataView + */ + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - public ProfilerLdadObs() { - } + public ProfilerLdadObs() { + } - /** - * @param pointDataView - * the pointDataView to set - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + /** + * @param pointDataView + * the pointDataView to set + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - // ---------------------------------------------------- + // ---------------------------------------------------- - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + // TODO Auto-generated method stub + return null; + } - @Override - public ISpatialObject getSpatialObject() { - // TODO Auto-generated method stub - return null; - } + @Override + public ISpatialObject getSpatialObject() { + // TODO Auto-generated method stub + return null; + } - @Override - public String getString(String paramName) { - // TODO Auto-generated method stub - return null; - } + @Override + public String getString(String paramName) { + // TODO Auto-generated method stub + return null; + } - @Override - public String[] getStrings(String paramName) { - // TODO Auto-generated method stub - return null; - } + @Override + public String[] getStrings(String paramName) { + // TODO Auto-generated method stub + return null; + } - @Override - public Amount getValue(String paramName) { - // TODO Auto-generated method stub - return null; - } + @Override + public Amount getValue(String paramName) { + // TODO Auto-generated method stub + return null; + } - @Override - public Collection getValues(String paramName) { - // TODO Auto-generated method stub - return null; - } + @Override + public Collection getValues(String paramName) { + // TODO Auto-generated method stub + return null; + } - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } - /** - * @param stationName - * the stationName to set - */ - public void setStationName(String stationName) { - this.stationName = stationName; - } + /** + * @param stationName + * the stationName to set + */ + public void setStationName(String stationName) { + this.stationName = stationName; + } - /** - * @return the stationName - */ - public String getStationName() { - return stationName; - } + /** + * @return the stationName + */ + public String getStationName() { + return stationName; + } - /** - * @param parameterName - * the parameterName to set - */ - public void setParameterName(String parameterName) { - this.parameterName = parameterName; - } + /** + * @param parameterName + * the parameterName to set + */ + public void setParameterName(String parameterName) { + this.parameterName = parameterName; + } - /** - * @return the parameterName - */ - public String getParameterName() { - return parameterName; - } + /** + * @return the parameterName + */ + public String getParameterName() { + return parameterName; + } - /** - * @param reportType - * the reportType to set - */ - public void setReportType(Integer reportType) { - this.reportType = reportType; - } + /** + * @param reportType + * the reportType to set + */ + public void setReportType(Integer reportType) { + this.reportType = reportType; + } - /** - * @return the reportType - */ - public Integer getReportType() { - return reportType; - } + /** + * @return the reportType + */ + public Integer getReportType() { + return reportType; + } @Override @Column @@ -397,4 +395,9 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ldadprofiler"; + } } 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 25a3ec5f55..e5298d6f6f 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 @@ -59,21 +59,24 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080303 1026 jkorman Initial implementation. - * 20080408 1039 jkorman Added traceId for tracing data. - * 11/25/08 #1684 chammack Camel Refactor - * 04/29/13 #1861 bkowal Create a separate Point Data Container for - * every record so each forecast hour will - * receive a unique hdf5 file. - * 07/03/13 #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. - * 07/16/13 #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. + * 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 * * * @@ -219,7 +222,6 @@ public class ModelSoundingDecoder extends AbstractDecoder implements soundingTemporalData); if (soundingData != null) { soundingData.setTraceId(traceId); - soundingData.setPluginName(PLUGIN_NAME); try { soundingData.constructDataURI(); } catch (PluginException e) { 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 b0e832e9ad..201c62ea29 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 @@ -62,11 +62,13 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080303 1026 jkorman Initial implementation. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * 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 * * * @@ -911,10 +913,16 @@ public class SoundingSite extends PersistablePluginDataObject implements public void setPointDataView(PointDataView pointDataView) { this.pointDataView = pointDataView; } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "modelsounding"; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF index 052b44a770..6b28604fff 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/MANIFEST.MF @@ -7,7 +7,6 @@ Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serializ Bundle-Vendor: RAYTHEON Export-Package: com.raytheon.edex.plugin.obs, com.raytheon.edex.plugin.obs.mesowest, - com.raytheon.edex.plugin.obs.mesowest.util, com.raytheon.edex.plugin.obs.metar, com.raytheon.edex.plugin.obs.metar.util, com.raytheon.edex.uengine.tasks.obs diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index 9ec19727e4..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.obs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1 +0,0 @@ -com.raytheon.edex.plugin.obs.mesowest.MesowestRecord \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml index 493be3e3cd..f30d8ffeeb 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.obs/res/spring/obs-ingest.xml @@ -3,9 +3,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - - + diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java index d6b488f34c..f53857e922 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/ObsDecoder.java @@ -20,30 +20,6 @@ package com.raytheon.edex.plugin.obs; -/** - * Decoder implementation for observation data types. This class provides a - * wrapper in order to select the correct decoder based on the data type - * - *
- *                     
- * SOFTWARE HISTORY
- * 
- * Date          Ticket#     Engineer    Description
- * -----------  ----------  ----------- --------------------------
- * 4/27/07      199         bphillip    Initial creation
- * 07/31/2007          411  jkorman     Added addition logging
- * 08/10/2007          379  jkorman     Added disposal behavior.
- * 20071217            453  jkorman     Added code to check for duplicate obs.
- * 20080314            995  jkorman     Changed setDecoderStrategy to check for
- *                                      empty data.
- * 20080408           1039  jkorman     Added traceId for tracing data.  
- * Mar 19, 2013       1785  bgonzale    Added performance status handler and added
- *                                      status to decode.
- * 
- * - * @author bphillip - * @version 1 - */ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -58,24 +34,40 @@ import com.raytheon.uf.common.time.util.ITimer; import com.raytheon.uf.common.time.util.TimeUtil; import com.raytheon.uf.edex.wmo.message.WMOHeader; +/** + * Decoder implementation for observation data types. This class provides a + * wrapper in order to select the correct decoder based on the data type + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#     Engineer    Description
+ * -----------  ----------  ----------- --------------------------
+ * Apr 27, 2007 199         bphillip    Initial creation
+ * Jul 31, 2007 411         jkorman     Added addition logging
+ * Aug 10, 2007 379         jkorman     Added disposal behavior.
+ * Dec 17, 2007 453         jkorman     Added code to check for duplicate obs.
+ * Mar 14, 2008 995         jkorman     Changed setDecoderStrategy to check for
+ *                                      empty data.
+ * Apr 08, 2008 1039        jkorman     Added traceId for tracing data.  
+ * Mar 19, 2013 1785        bgonzale    Added performance status handler and added
+ *                                      status to decode.
+ * Aug 30, 2013 2298        rjpeter     Make getPluginName abstract
+ * 
+ * + * @author bphillip + * @version 1 + */ public class ObsDecoder extends AbstractDecoder { /** The logger */ - private Log logger = LogFactory.getLog(getClass()); - - private final String PLUGIN_NAME; + private final Log logger = LogFactory.getLog(getClass()); private final IPerformanceStatusHandler perfLog = PerformanceStatus .getHandler("Obs:"); private String traceId = null; - /** - * Required empty constructor. - */ - public ObsDecoder(String pluginName) { - PLUGIN_NAME = pluginName; - } - /** * * @return A decoded data record. @@ -139,13 +131,13 @@ public class ObsDecoder extends AbstractDecoder { if ('S' == header.getT1()) { switch (header.getT2()) { case 'A': { - decoder = new MetarDecoder(PLUGIN_NAME); - ((MetarDecoder) decoder).setTraceId(traceId); + decoder = new MetarDecoder(); + decoder.setTraceId(traceId); break; } case 'P': { - decoder = new MetarDecoder(PLUGIN_NAME); - ((MetarDecoder) decoder).setTraceId(traceId); + decoder = new MetarDecoder(); + decoder.setTraceId(traceId); break; } } diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestDecoder.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestDecoder.java deleted file mode 100644 index 3bf446464c..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestDecoder.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.plugin.obs.mesowest; - -import java.text.DecimalFormat; - -import com.raytheon.edex.esb.Headers; -import com.raytheon.edex.exception.DecoderException; -import com.raytheon.edex.plugin.AbstractDecoder; -import com.raytheon.edex.util.Util; -import com.raytheon.uf.common.dataplugin.PluginDataObject; -import com.raytheon.uf.common.time.DataTime; -import com.raytheon.uf.edex.decodertools.core.DecoderTools; -import com.raytheon.uf.edex.decodertools.time.TimeTools; - -/** - * Decoder implementation for mesowest plugin - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * 02/14/06		139			bphillip	Initial creation	
- * 11/11/08     1684        chammack    Refactored to camel interfaces
- * 
- * 
- * - * @author bphillip - * @version 1 - */ - -public class MesowestDecoder extends AbstractDecoder { - - private static final DecimalFormat DECIMALTENTHS = new DecimalFormat("#.#"); - - private static final DecimalFormat WHOLENUMBER = new DecimalFormat("#"); - - /** - * Constructor - * - * @throws DecoderException - */ - public MesowestDecoder() throws DecoderException { - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.edex.plugin.IBinaryDecoder#decode(byte[]) - */ - public PluginDataObject[] decode(byte[] data, Headers headers) - throws DecoderException { - - byte[] messageData = null; - - String theMessage = new String(messageData); - - MesowestRecord record = new MesowestRecord(); - record.setMessageData(theMessage); - record.setPluginName("obs"); - record.setReportType("MESOWEST"); - record.setMessageData(theMessage); - - String[] mwObs = theMessage.split(","); - try { - if (mwObs.length >= 7) { - record.setStationID(mwObs[1]); - String timeGroup = mwObs[6].substring(6, 8) - + mwObs[6].substring(9, 13) + "Z"; - String fileName = null; - if (headers != null) { - fileName = (String) headers - .get(DecoderTools.INGEST_FILE_NAME); - } - record.setTimeObs(TimeTools - .findCurrentTime(timeGroup, fileName)); - record.setDataTime(new DataTime(Util - .findReferenceTime(timeGroup))); - record.setRefHour(Util.findReferenceHour(timeGroup)); - } - // Only want the observations in columns 7 through 15 - int mwArrayLength = mwObs.length < 17 ? mwObs.length : 17; - for (int i = 7; i < mwArrayLength; i++) { - if (i == 7 && mwObs[7].length() > 0) { - double temp = calculateCelsius(mwObs[7]); - record.setTemperature(Integer.parseInt(WHOLENUMBER - .format(temp))); - record.setTempFromTenths(Float.parseFloat(DECIMALTENTHS - .format(temp))); - } else if (i == 9 && mwObs[9].length() > 0) { - double wSpeed = Double.valueOf(mwObs[9].trim()) - .doubleValue(); - record.setWindSpeed(Integer.parseInt(WHOLENUMBER - .format(wSpeed))); - } else if (i == 10 && mwObs[10].length() > 0) { - double wGust = Double.valueOf(mwObs[10].trim()) - .doubleValue(); - record.setWindGust(Integer.parseInt(WHOLENUMBER - .format(wGust))); - } else if (i == 11 && mwObs[11].length() > 0) { - record.setWindDir(mwObs[11]); - } else if (i == 13 && mwObs[13].length() > 0) { - double dewp = calculateCelsius(mwObs[13]); - record.setDewPoint(Integer.parseInt(WHOLENUMBER - .format(dewp))); - record.setDewPointFromTenths(Float.parseFloat(DECIMALTENTHS - .format(dewp))); - } else if (i == 15 && mwObs[15].length() > 0) { - record.setSeaLevelPress(Float.parseFloat(mwObs[15])); - } else if (i == 16 && mwObs[16].length() > 0) { - record.setAltimeter(Float.parseFloat(mwObs[16])); - } - } - - } catch (Exception e) { - throw new DecoderException("Unable to decode Mesowest data", e); - } - - if (record == null) - return new PluginDataObject[0]; - return new PluginDataObject[] { record }; - } - - private double calculateCelsius(String tempString) { - double temp = Double.valueOf(tempString.trim()).doubleValue(); - double tempC = (temp - 32.0) * (5.0 / 9.0); - return tempC; - } - -} diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestRecord.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestRecord.java deleted file mode 100644 index 556dd016b9..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/MesowestRecord.java +++ /dev/null @@ -1,361 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.plugin.obs.mesowest; - -import java.util.Calendar; - -import javax.persistence.Access; -import javax.persistence.AccessType; -import javax.persistence.Column; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import com.raytheon.uf.common.dataplugin.IDecoderGettable; -import com.raytheon.uf.common.dataplugin.PluginDataObject; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; - -/** - * Record implementation for mesowest plugin - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * 2/14/2007	139			Phillippe	Initial creation	
- * 20071129            472  jkorman     Added IDecoderGettable interface.
- * May 07, 2013	1869      	bsteffen   	Remove dataURI column from
- *                                      PluginDataObject.
- * 
- * 
- * 
- * - * @author bphillip - * @version 1 - */ -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) -@DynamicSerialize -public class MesowestRecord extends PluginDataObject { - - private static final long serialVersionUID = 1L; - - /** A string denoting the report type */ - @XmlAttribute - @DynamicSerializeElement - private String reportType; - - /** A string denoting the reporting station */ - @XmlAttribute - @DynamicSerializeElement - private String stationID; - - /** A string denoting the time of observation */ - @XmlElement - @DynamicSerializeElement - private Calendar timeObs; - - /** A string denoting the temperature in degrees Celsius */ - @XmlAttribute - @DynamicSerializeElement - private Integer temperature; - - /** A string denoting the current temperature in tenths of degrees Celsius */ - @XmlAttribute - @DynamicSerializeElement - private Float tempFromTenths; - - /** A string denoting the wind direction in degrees from north */ - @XmlAttribute - @DynamicSerializeElement - private String windDir; - - /** A string denoting the wind speed in knots */ - @XmlAttribute - @DynamicSerializeElement - private Integer windSpeed; - - /** A string denoting the wind gusts in knots */ - @XmlAttribute - @DynamicSerializeElement - private Integer windGust; - - /** A string denoting the current dew point in degrees Celsius */ - @XmlAttribute - @DynamicSerializeElement - private Integer dewPoint; - - /** A string denoting the current dew point in tenths of degrees Celsius */ - @XmlAttribute - @DynamicSerializeElement - private Float dewPointFromTenths; - - /** A string denoting the altimeter reading in in/Hg */ - @XmlAttribute - @DynamicSerializeElement - private Float altimeter; - - /** A string denoting the sea level pressure in millibars */ - @XmlAttribute - @DynamicSerializeElement - private Float seaLevelPress; - - /** The reference hour * */ - @XmlElement - @DynamicSerializeElement - private Calendar refHour; - - /** - * No argument constructor - * - */ - public MesowestRecord() { - } - - /** - * Constructs a mesowest record from a dataURI - * - * @param uri - * The dataURI - * @param tableDef - * The table definition associated with this class - */ - public MesowestRecord(String uri) { - super(uri); - } - - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * @return the altimeter - */ - public Float getAltimeter() { - return altimeter; - } - - /** - * @param altimeter - * the altimeter to set - */ - public void setAltimeter(Float altimeter) { - this.altimeter = altimeter; - } - - /** - * @return the dewPoint - */ - public Integer getDewPoint() { - return dewPoint; - } - - /** - * @param dewPoint - * the dewPoint to set - */ - public void setDewPoint(Integer dewPoint) { - this.dewPoint = dewPoint; - } - - /** - * @return the dewPointFromTenths - */ - public Float getDewPointFromTenths() { - return dewPointFromTenths; - } - - /** - * @param dewPointFromTenths - * the dewPointFromTenths to set - */ - public void setDewPointFromTenths(Float dewPointFromTenths) { - this.dewPointFromTenths = dewPointFromTenths; - } - - /** - * @return the refHour - */ - public Calendar getRefHour() { - return refHour; - } - - /** - * @param refHour - * the refHour to set - */ - public void setRefHour(Calendar refHour) { - this.refHour = refHour; - } - - /** - * @return the seaLevelPress - */ - public Float getSeaLevelPress() { - return seaLevelPress; - } - - /** - * @param seaLevelPress - * the seaLevelPress to set - */ - public void setSeaLevelPress(Float seaLevelPress) { - this.seaLevelPress = seaLevelPress; - } - - /** - * @return the stationID - */ - public String getStationID() { - return stationID; - } - - /** - * @param stationID - * the stationID to set - */ - public void setStationID(String stationID) { - this.stationID = stationID; - } - - /** - * @return the temperature - */ - public Integer getTemperature() { - return temperature; - } - - /** - * @param temperature - * the temperature to set - */ - public void setTemperature(Integer temperature) { - this.temperature = temperature; - } - - /** - * @return the tempFromTenths - */ - public Float getTempFromTenths() { - return tempFromTenths; - } - - /** - * @param tempFromTenths - * the tempFromTenths to set - */ - public void setTempFromTenths(Float tempFromTenths) { - this.tempFromTenths = tempFromTenths; - } - - /** - * @return the timeObs - */ - public Calendar getTimeObs() { - return timeObs; - } - - /** - * @param timeObs - * the timeObs to set - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } - - /** - * @return the windDir - */ - public String getWindDir() { - return windDir; - } - - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(String windDir) { - this.windDir = windDir; - } - - /** - * @return the windGust - */ - public Integer getWindGust() { - return windGust; - } - - /** - * @param windGust - * the windGust to set - */ - public void setWindGust(Integer windGust) { - this.windGust = windGust; - } - - /** - * @return the windSpeed - */ - public Integer getWindSpeed() { - return windSpeed; - } - - /** - * @param windSpeed - * the windSpeed to set - */ - public void setWindSpeed(Integer windSpeed) { - this.windSpeed = windSpeed; - } - - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. Null for this - * class. - */ - public IDecoderGettable getDecoderGettable() { - return null; - } - - @Override - @Column - @Access(AccessType.PROPERTY) - public String getDataURI() { - return super.getDataURI(); - } -} diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/util/package-info.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/util/package-info.java deleted file mode 100644 index db65de0edd..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/mesowest/util/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -/** - * Contains utility classes for mesowest plugin - */ -package com.raytheon.edex.plugin.obs.mesowest.util; \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java index 357d7bd238..fd0f96eed5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarDecoder.java @@ -54,29 +54,30 @@ import com.vividsolutions.jts.geom.impl.CoordinateArraySequence; * * SOFTWARE HISTORY * - * ate Ticket# Engineer Description - * ----------- ---------- ----------- -------------------------- - * 2/14/07 139 bphillip Initial creation - * 20071029 505 jkorman Changed setting of DataTime from refhour + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * Feb 14, 2007 139 bphillip Initial creation + * Oct 29, 2007 505 jkorman Changed setting of DataTime from refhour * to observation time. - * 20071128 575 jkorman Added future obs time threshold check in + * Nov 28, 2007 575 jkorman Added future obs time threshold check in * decode. - * 12/07/07 452 bphillip Retrieve lat/lon info from station table - * 12/17/07 628 bphillip Discarding data with no station info - * 20071217 453 jkorman Major restructure of the decode method + * Dec 07, 2007 452 bphillip Retrieve lat/lon info from station table + * Dec 17, 2007 628 bphillip Discarding data with no station info + * Dec 17, 2007 453 jkorman Major restructure of the decode method * to ensure that all sections are decoded * properly. Added cleanMessage method. - * 20071218 453 jkorman Added metric winds and visibility. - * 20071221 665 jkorman Modified metric vis to ensure it is not + * Dec 18, 2007 453 jkorman Added metric winds and visibility. + * Dec 21, 2007 665 jkorman Modified metric vis to ensure it is not * decoding alstg data. Added checks for * NSC, NCD, and CAVOK. Added checks for * metric sector vis. - * 20080102 667 jkorman Added code to properly decode/store clear - * sky conditions. - * 20080116 798 jkorman Changed logging levels. - * 20080414 996 jkorman Rewrote sky cover decode section to handle - * CB/TCU and /// data. - * 11/11/08 1684 chammack Camel refactor. + * Jan 02, 2008 667 jkorman Added code to properly decode/store + * clear sky conditions. + * Jan 16, 2008 798 jkorman Changed logging levels. + * Apr 14, 2008 996 jkorman Rewrote sky cover decode section to + * handle CB/TCU and /// data. + * Nov 11, 2008 1684 chammack Camel refactor. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author bphillip @@ -185,8 +186,6 @@ public class MetarDecoder extends AbstractDecoder { public static final Pattern SUNSHINE = Pattern .compile("(\\b)98(\\d{3}|///)"); - private final String PLUGIN_NAME; - private boolean useMockInfo = false; private ObStation mockInfo = null; @@ -195,8 +194,7 @@ public class MetarDecoder extends AbstractDecoder { private String traceId = null; - public MetarDecoder(String pluginName) throws DecoderException { - PLUGIN_NAME = pluginName; + public MetarDecoder() { VIS_PARSER = new VisibilityParser(); } @@ -924,7 +922,6 @@ public class MetarDecoder extends AbstractDecoder { record.setSunshine(value); } - record.setPluginName(PLUGIN_NAME); record.constructDataURI(); record.setWmoHeader(sep.getWMOHeader().getWmoHeader()); @@ -1008,7 +1005,7 @@ public class MetarDecoder extends AbstractDecoder { StringBuilder sb = null; if (data != null) { sb = new StringBuilder(data); - for (int i = 0; i < sb.length() - 1; i++) { + for (int i = 0; i < (sb.length() - 1); i++) { if (sb.charAt(i) == '0') { sb.setCharAt(i, ' '); } diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java index 927378c2ff..8ca48f7421 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java +++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java @@ -59,6 +59,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * dimensioned size. * May 09, 2013 1869 bsteffen Modified D2D time series of point data to * work without dataURI. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -68,7 +69,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; public class MetarPointDataTransform { - public static final String ALTIMETER = "altimeter"; + public static final String ALTIMETER = "altimeter"; public static final String SEA_LEVEL_PRESS = "seaLevelPress"; @@ -232,8 +233,9 @@ public class MetarPointDataTransform { Map pointMap = new HashMap(); for (PluginDataObject p : pdo) { - if (!(p instanceof MetarRecord)) + if (!(p instanceof MetarRecord)) { continue; + } File f = this.dao.getFullFilePath(p); PointDataContainer pdc = pointMap.get(f); @@ -254,7 +256,7 @@ public class MetarPointDataTransform { MetarRecord record) { PointDataView pdv = container.append(); - if (record.getCorrection() != null + if ((record.getCorrection() != null) && record.getCorrection().equals("COR")) { pdv.setInt(CORRECTION, 1); } else { @@ -272,12 +274,12 @@ public class MetarPointDataTransform { if (record.getSkyCoverage() != null) { int maxSize = container.getDescription(SKY_COVER) - .getDimensionAsInt(); + .getDimensionAsInt(); record.sort(record.getSkyCoverage()); Iterator scIterator = record.getSkyCoverage().iterator(); int i = 0; while (scIterator.hasNext()) { - if(i >= maxSize) { + if (i >= maxSize) { break; } // TODO: storing duplicate info like this, needs to be resolved @@ -285,8 +287,9 @@ public class MetarPointDataTransform { if (sc.getType() != null) { StringBuffer scBuffer = new StringBuffer(); scBuffer.append(sc.getType()); - if (sc.getGenus() != null) + if (sc.getGenus() != null) { scBuffer.append(sc.getGenus()); + } pdv.setString(SKY_COVER, scBuffer.toString(), i); if (sc.getType() != null) { @@ -346,7 +349,7 @@ public class MetarPointDataTransform { pdv.setFloat(SNOWFALL6_HOUR, record.getSnowFall_6Hours()); pdv.setInt(SUNSHINE, record.getSunshine()); - if (record.getWindDir() != null + if ((record.getWindDir() != null) && !record.getWindDir().equalsIgnoreCase("VRB")) { pdv.setFloat("windDir", Float.parseFloat(record.getWindDir())); } @@ -415,7 +418,6 @@ public class MetarPointDataTransform { mr.setPressChange3Hour(pdv.getNumber(PRESS_CHANGE3_HOUR).floatValue()); mr.setPressChangeChar(pdv.getString(PRESS_CHANGE_CHAR)); - mr.setPluginName("obs"); mr.setPrecip1Hour(pdv.getNumber(PRECIP1_HOUR).floatValue()); mr.setPrecip3Hour(pdv.getNumber(PRECIP3_HOUR).floatValue()); mr.setPrecip6Hour(pdv.getNumber(PRECIP6_HOUR).floatValue()); @@ -427,7 +429,7 @@ public class MetarPointDataTransform { int i = 0; Set scList = new HashSet(); for (String s : scType) { - if (s != null && !s.equals("")) { + if ((s != null) && !s.equals("")) { SkyCover skyCover = new SkyCover(); skyCover.setType(s); diff --git a/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java b/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java index dd4922a752..8d8c3f6f66 100644 --- a/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.pirep/src/com/raytheon/edex/plugin/pirep/PirepDecoder.java @@ -59,10 +59,11 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080103 384 jkorman Initial Coding. - * 20080128 861 jkorman Add pirep layer data. - * 20080408 1039 jkorman Added traceId for tracing data. - * 11/13/08 1684 chammack Camel Refactor + * Jan 03, 2008 384 jkorman Initial Coding. + * Jan 28, 2008 861 jkorman Add pirep layer data. + * Apr 08, 2008 1039 jkorman Added traceId for tracing data. + * Nov 13, 2008 1684 chammack Camel Refactor + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author jkorman @@ -108,7 +109,6 @@ public class PirepDecoder extends AbstractDecoder { if (report != null) { report.setTraceId(traceId); - report.setPluginName(PLUGIN_NAME); try { report.constructDataURI(); } catch (PluginException e) { @@ -181,8 +181,7 @@ public class PirepDecoder extends AbstractDecoder { record.setHorzVisibility(parser.getHorxVisibility()); // Collect the decoded icing flight conditions data - List icing = parser - .getIcingLayers(); + List icing = parser.getIcingLayers(); if (icing != null) { PirepLayerData iceLayer = null; for (AircraftFlightCondition layer : icing) { @@ -250,7 +249,7 @@ public class PirepDecoder extends AbstractDecoder { } if (traceIdx >= 0) { newTrace = new StackTraceElement[traceIdx + 1]; - for (int j = 0; j < traceIdx + 1; j++) { + for (int j = 0; j < (traceIdx + 1); j++) { newTrace[j] = trace[j]; } e.setStackTrace(newTrace); diff --git a/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java b/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java index cd0dc6f46f..8c6d44ad16 100644 --- a/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.poessounding/src/com/raytheon/edex/plugin/poessounding/POESSoundingDecoder.java @@ -64,6 +64,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings. * Jul 17, 2013 2112 bsteffen Split poes data so it gets stored in * correct file. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -77,7 +78,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements public static final String PLUGIN_NAME = "poessounding"; /** The logger */ - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private PointDataDescription pdd; @@ -125,7 +126,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements PluginDataObject[] decodedData = null; - if (data != null && data.length > 0) { + if ((data != null) && (data.length > 0)) { WMOHeader wmoHeader = new WMOHeader(data, headers); @@ -153,7 +154,6 @@ public class POESSoundingDecoder extends AbstractDecoder implements container, pdd, dao); if (soundingData != null) { soundingData.setTraceId(traceId); - soundingData.setPluginName(PLUGIN_NAME); pdoList.add(soundingData); } } 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 475f038dc4..b82e388f07 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 @@ -56,8 +56,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080303 969 jkorman Initial implementation. - * 20080408 1039 jkorman Added traceId for tracing data. + * 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 * * * @@ -71,7 +72,7 @@ public class ProfilerDecoder extends AbstractDecoder implements public static final String PLUGIN_NAME = "profiler"; /** The logger */ - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private PointDataDescription pdd; @@ -131,7 +132,7 @@ public class ProfilerDecoder extends AbstractDecoder implements PluginDataObject[] decodedData = null; - if (data != null && data.length > 0) { + if ((data != null) && (data.length > 0)) { WMOHeader wmoHeader = new WMOHeader(data, headers); if ((wmoHeader != null) && (wmoHeader.isValid())) { @@ -160,7 +161,6 @@ public class ProfilerDecoder extends AbstractDecoder implements container, traceId); if (soundingData != null) { soundingData.setTraceId(traceId); - soundingData.setPluginName(PLUGIN_NAME); try { soundingData.constructDataURI(); PointDataView view = soundingData diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java index fddb62a83a..dfa8f257f0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java @@ -87,12 +87,15 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 2/14/2007 139 Phillippe Initial check-in. Refactor of initial implementation. + * Feb 14, 2007 139 Phillippe Initial check-in. Refactor of initial + * implementation. * Dec 17, 2007 600 bphillip Added dao pool usage - * Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz() signature changed. + * Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz() + * signature changed. * Mar 19, 2013 1804 bsteffen Optimize decoder performance. - * Mar 19, 2013 1785 bgonzale Added performance status handler and added status - * to decode. + * Mar 19, 2013 1785 bgonzale Added performance status handler and + * added status to decode. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author bphillip @@ -130,7 +133,7 @@ public class RadarDecoder extends AbstractDecoder { private String traceId = ""; - private RadarInfoDict infoDict; + private final RadarInfoDict infoDict; private RadarStationDao radarStationDao = new RadarStationDao(); @@ -541,7 +544,6 @@ public class RadarDecoder extends AbstractDecoder { private void finalizeRecord(RadarRecord record) throws PluginException { record.setTraceId(traceId); - record.setPluginName("radar"); record.constructDataURI(); record.setInsertTime(TimeTools.getSystemCalendar()); // for GSM, we want all the messages as they have the possibility of @@ -562,7 +564,7 @@ public class RadarDecoder extends AbstractDecoder { if (symbologyBlock == null) { return; } - + int packetsKept = 0; List packetsInLyrs = new ArrayList(); @@ -587,9 +589,9 @@ public class RadarDecoder extends AbstractDecoder { GenericDataPacket genericPacket = (GenericDataPacket) packet; List components = genericPacket .getComponents(); - if (components != null - && components.size() == 1 - && components.get(0).getComponentType() == ComponentType.RADIAL) { + if ((components != null) + && (components.size() == 1) + && (components.get(0).getComponentType() == ComponentType.RADIAL)) { processRadialComponent(record, (RadialComponent) components.get(0)); } else { @@ -698,7 +700,7 @@ public class RadarDecoder extends AbstractDecoder { ClusterTask task = ClusterLockUtils.lookupLock(lockname, record.getIcao()); String formatStatus = RadarUtil.formatBits(messagePart, constants); - if (task == null || task.getExtraInfo() == null) { + if ((task == null) || (task.getExtraInfo() == null)) { ClusterLockUtils.lock(lockname, record.getIcao(), formatStatus, 30, true); EDEXUtil.sendMessageAlertViz(Priority.INFO, @@ -711,7 +713,7 @@ public class RadarDecoder extends AbstractDecoder { } if (task.getExtraInfo() != null) { - if (formatStatus != null + if ((formatStatus != null) && !formatStatus.equals(task.getExtraInfo().trim())) { String details = ""; String temp = ""; diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java index c20aa289b0..cf7c22c7d5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/dao/RadarDao.java @@ -27,8 +27,9 @@ package com.raytheon.edex.plugin.radar.dao; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 02/06/09 1990 bphillip Initial creation + * Feb 06, 2009 1990 bphillip Initial creation * Mar 18, 2013 1804 bsteffen Reduce useless data stored in radar hdf5 + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -120,7 +121,8 @@ public class RadarDao extends PluginDao { dataStore.addDataRecord(rec, sp); } - if (radarRec.getThresholds() != null && radarRec.getProductCode() != 2) { + if ((radarRec.getThresholds() != null) + && (radarRec.getProductCode() != 2)) { IDataRecord rec = new ShortDataRecord( RadarStoredData.THRESHOLDS_ID, radarRec.getDataURI(), radarRec.getThresholds(), 1, new long[] { 16 }); @@ -139,7 +141,7 @@ public class RadarDao extends PluginDao { } Map symData = radarRec.getSymbologyData(); - if (symData != null && !symData.isEmpty()) { + if ((symData != null) && !symData.isEmpty()) { byte[] data = DynamicSerializationManager.getManager( SerializationType.Thrift).serialize(symData); ByteDataRecord bdr = new ByteDataRecord( @@ -161,7 +163,7 @@ public class RadarDao extends PluginDao { Map>> mapProdVals = radarRec .getMapProductVals(); - if (mapProdVals != null && !mapProdVals.isEmpty()) { + if ((mapProdVals != null) && !mapProdVals.isEmpty()) { byte[] data = DynamicSerializationManager.getManager( SerializationType.Thrift).serialize(mapProdVals); ByteDataRecord bdr = new ByteDataRecord( @@ -192,7 +194,7 @@ public class RadarDao extends PluginDao { Map> mapRecVals = radarRec .getMapRecordVals(); - if (mapRecVals != null && !mapRecVals.isEmpty()) { + if ((mapRecVals != null) && !mapRecVals.isEmpty()) { byte[] data = DynamicSerializationManager.getManager( SerializationType.Thrift).serialize(mapRecVals); ByteDataRecord bdr = new ByteDataRecord( @@ -202,7 +204,7 @@ public class RadarDao extends PluginDao { } Map stormIds = radarRec.getStormIDs(); - if (stormIds != null && !stormIds.isEmpty()) { + if ((stormIds != null) && !stormIds.isEmpty()) { byte[] data = DynamicSerializationManager.getManager( SerializationType.Thrift).serialize(stormIds); ByteDataRecord bdr = new ByteDataRecord( @@ -274,7 +276,6 @@ public class RadarDao extends PluginDao { PluginDataObject[] queryResults = getMetadata(query); for (PluginDataObject obj : queryResults) { RadarRecord record = (RadarRecord) obj; - record.setPluginName(pluginName); IDataRecord[] hdf5Data = getHDF5Data(record, tile); record.setMessageData(hdf5Data[0].getDataObject()); record.setAngleData((float[]) hdf5Data[1].getDataObject()); diff --git a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java index a4d2ec96e7..bed1dbd22a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/RECCODecoder.java @@ -54,8 +54,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080103 384 jkorman Initial Coding. - * 11/25/08 #1684 chammack Camel Refactor + * Jan 03, 2008 384 jkorman Initial Coding. + * Nov 25, 2008 1684 chammack Camel Refactor + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author jkorman @@ -115,7 +116,6 @@ public class RECCODecoder extends AbstractDecoder { input.getWmoHeader()); if (report != null) { report.setTraceId(traceId); - report.setPluginName(PLUGIN_NAME); try { report.constructDataURI(); } catch (PluginException e) { diff --git a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java index d1645ed8f5..1a9bbe9204 100644 --- a/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.recco/src/com/raytheon/edex/plugin/recco/common/RECCORecord.java @@ -73,6 +73,7 @@ import com.vividsolutions.jts.geom.Geometry; * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * Jun 20, 2013 2128 bsteffen Ensure setDataURI sets the dataURI. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -86,12 +87,8 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "recco", - indexes = { - @Index(name = "recco_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "recco", indexes = { @Index(name = "recco_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -140,7 +137,7 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled, @XmlAttribute private Calendar refHour; - // + // @Column @DataURI(position = 1) @DynamicSerializeElement @@ -687,6 +684,7 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled, return a; } + @Override public String[] getStrings(String paramName) { return null; } @@ -723,4 +721,9 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled, public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "recco"; + } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java index 063938623c..f5651117af 100644 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/RedbookDecoder.java @@ -47,14 +47,15 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080512 1131 jkorman Initial implementation. - * 20080529 1131 jkorman Added new Separator constructor. - * 11/11/08 1684 chammack Refactored to camel - * 20090327 2019 jkorman Added code to check for non-redbook data. - * 20120524 #647 dgilling Update persistence time in + * May 12, 2008 1131 jkorman Initial implementation. + * May 29, 2008 1131 jkorman Added new Separator constructor. + * Nov 11, 2008 1684 chammack Refactored to camel + * Mar 27, 2009 2019 jkorman Added code to check for non-redbook data. + * May 24, 2012 647 dgilling Update persistence time in * createdBackDatedVersionIfNeeded. - * Mar 19, 2013 1785 bgonzale Added performance status handler and added - * status to decode. + * Mar 19, 2013 1785 bgonzale Added performance status handler and + * added status to decode. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author jkorman @@ -95,6 +96,7 @@ public class RedbookDecoder extends AbstractDecoder { private final IPerformanceStatusHandler perfLog = PerformanceStatus .getHandler("Redbook:"); + private String traceId = null; /** @@ -142,12 +144,11 @@ public class RedbookDecoder extends AbstractDecoder { + "- File is not Redbook data. Type is " + foreign.dataType); } else { - report = new RedbookParser(traceId, data, - wmoHeader).getDecodedRecord(); + report = new RedbookParser(traceId, data, wmoHeader) + .getDecodedRecord(); } if (report != null) { report.setPersistenceTime(new Date()); - report.setPluginName(PLUGIN_NAME); try { report.constructDataURI(); @@ -219,7 +220,6 @@ public class RedbookDecoder extends AbstractDecoder { // and the Wes2Bridge archiver properly finds these backdated // records backDatedRecord.setPersistenceTime(new Date()); - backDatedRecord.setPluginName(PLUGIN_NAME); backDatedRecord.constructDataURI(); } catch (PluginException e) { logger.error(traceId + "Could not create back-dated copy of " diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java index d6ff1ba00d..199634a1d7 100644 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.redbook/src/com/raytheon/edex/plugin/redbook/common/RedbookRecord.java @@ -61,14 +61,17 @@ import com.raytheon.uf.common.time.DataTime; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080512 1131 jkorman Initial implementation. - * 20080529 1131 jkorman getPersistenceTime now returns system time. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 20130408 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * Apr 29, 2013 1958 bgonzale Added equals and hashcode. + * May 12, 2008 1131 jkorman Initial implementation. + * May 29, 2008 1131 jkorman getPersistenceTime now returns system + * time. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Apr 29, 2013 1958 bgonzale Added equals and hashcode. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -82,17 +85,13 @@ import com.raytheon.uf.common.time.DataTime; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "redbook", - indexes = { - @Index(name = "redbook_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "redbook", indexes = { @Index(name = "redbook_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class RedbookRecord extends PersistablePluginDataObject - implements IPersistable, Cloneable { +public class RedbookRecord extends PersistablePluginDataObject implements + IPersistable, Cloneable { private static final long serialVersionUID = 1L; @@ -361,7 +360,8 @@ public class RedbookRecord extends PersistablePluginDataObject other.id = 0; other.dataURI = null; - Date newRefTime = new Date(dataTime.getRefTime().getTime() - 60 * 1000); + Date newRefTime = new Date(dataTime.getRefTime().getTime() + - (60 * 1000)); if (dataTime.getUtilityFlags().contains(DataTime.FLAG.FCST_USED)) { other.dataTime = new DataTime(newRefTime, dataTime.getFcstTime()); } else { @@ -380,22 +380,23 @@ public class RedbookRecord extends PersistablePluginDataObject public int hashCode() { final int prime = 31; int result = super.hashCode(); - result = prime * result + result = (prime * result) + ((corIndicator == null) ? 0 : corIndicator.hashCode()); - result = prime * result + result = (prime * result) + ((fcstHours == null) ? 0 : fcstHours.hashCode()); - result = prime * result + ((fileId == null) ? 0 : fileId.hashCode()); - result = prime * result + result = (prime * result) + ((fileId == null) ? 0 : fileId.hashCode()); + result = (prime * result) + ((originatorId == null) ? 0 : originatorId.hashCode()); - result = prime * result + result = (prime * result) + ((productId == null) ? 0 : productId.hashCode()); - result = prime * result + Arrays.hashCode(redBookData); - result = prime * result + result = (prime * result) + Arrays.hashCode(redBookData); + result = (prime * result) + ((retentionHours == null) ? 0 : retentionHours.hashCode()); - result = prime * result + ((timeObs == null) ? 0 : timeObs.hashCode()); - result = prime * result + result = (prime * result) + + ((timeObs == null) ? 0 : timeObs.hashCode()); + result = (prime * result) + ((wmoCCCCdt == null) ? 0 : wmoCCCCdt.hashCode()); - result = prime * result + result = (prime * result) + ((wmoTTAAii == null) ? 0 : wmoTTAAii.hashCode()); return result; } @@ -407,60 +408,82 @@ public class RedbookRecord extends PersistablePluginDataObject */ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (!super.equals(obj)) + } + if (!super.equals(obj)) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } RedbookRecord other = (RedbookRecord) obj; if (corIndicator == null) { - if (other.corIndicator != null) + if (other.corIndicator != null) { return false; - } else if (!corIndicator.equals(other.corIndicator)) + } + } else if (!corIndicator.equals(other.corIndicator)) { return false; + } if (fcstHours == null) { - if (other.fcstHours != null) + if (other.fcstHours != null) { return false; - } else if (!fcstHours.equals(other.fcstHours)) + } + } else if (!fcstHours.equals(other.fcstHours)) { return false; + } if (fileId == null) { - if (other.fileId != null) + if (other.fileId != null) { return false; - } else if (!fileId.equals(other.fileId)) + } + } else if (!fileId.equals(other.fileId)) { return false; + } if (originatorId == null) { - if (other.originatorId != null) + if (other.originatorId != null) { return false; - } else if (!originatorId.equals(other.originatorId)) + } + } else if (!originatorId.equals(other.originatorId)) { return false; + } if (productId == null) { - if (other.productId != null) + if (other.productId != null) { return false; - } else if (!productId.equals(other.productId)) + } + } else if (!productId.equals(other.productId)) { return false; - if (!Arrays.equals(redBookData, other.redBookData)) + } + if (!Arrays.equals(redBookData, other.redBookData)) { return false; + } if (retentionHours == null) { - if (other.retentionHours != null) + if (other.retentionHours != null) { return false; - } else if (!retentionHours.equals(other.retentionHours)) + } + } else if (!retentionHours.equals(other.retentionHours)) { return false; + } if (timeObs == null) { - if (other.timeObs != null) + if (other.timeObs != null) { return false; - } else if (!timeObs.equals(other.timeObs)) + } + } else if (!timeObs.equals(other.timeObs)) { return false; + } if (wmoCCCCdt == null) { - if (other.wmoCCCCdt != null) + if (other.wmoCCCCdt != null) { return false; - } else if (!wmoCCCCdt.equals(other.wmoCCCCdt)) + } + } else if (!wmoCCCCdt.equals(other.wmoCCCCdt)) { return false; + } if (wmoTTAAii == null) { - if (other.wmoTTAAii != null) + if (other.wmoTTAAii != null) { return false; - } else if (!wmoTTAAii.equals(other.wmoTTAAii)) + } + } else if (!wmoTTAAii.equals(other.wmoTTAAii)) { return false; + } return true; } @@ -471,4 +494,8 @@ public class RedbookRecord extends PersistablePluginDataObject return super.getDataURI(); } + @Override + public String getPluginName() { + return "redbook"; + } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java index 7d67020f90..9d20ce9b65 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsDecoder.java @@ -62,16 +62,17 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20070925 391 jkorman Initial Coding. - * 20071107 391 jkorman Modified findDuplicate to use a different + * Sep 25, 2007 391 jkorman Initial Coding. + * Nov 07, 2007 391 jkorman Modified findDuplicate to use a different * dataURI query. * Dec 17, 2007 600 bphillip Added dao pool usage - * 20080123 758 jkorman Added code to remove observation with a + * Jan 23, 2008 758 jkorman Added code to remove observation with a * time in the future. - * 20080215 887 jkorman Added null checks in decode. - * 20080218 887 jkorman Reverse null checks in findDuplicate. - * Mar 19, 2013 1785 bgonzale Added performance status handler and added status - * to decode. + * Feb 15, 2008 887 jkorman Added null checks in decode. + * Feb 18, 2008 887 jkorman Reverse null checks in findDuplicate. + * Mar 19, 2013 1785 bgonzale Added performance status handler and + * added status to decode. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author jkorman @@ -87,7 +88,7 @@ public class SfcObsDecoder extends AbstractDecoder { .getHandler("SfcObs:"); /** The logger */ - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private boolean removeNILs = true; @@ -169,7 +170,6 @@ public class SfcObsDecoder extends AbstractDecoder { } if (report != null) { report.setTraceId(traceId); - report.setPluginName(PLUGIN_NAME); try { report.constructDataURI(); } catch (PluginException e) { diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java index 8cc186047e..c0b0419c08 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/data/ShefRecord.java @@ -47,14 +47,14 @@ import com.raytheon.uf.common.time.DataTime; /** *
  * SOFTWARE HISTORY
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * June2006		3,14		Phillippe	Initial Creation.	
- * 20071129     472         jkorman     Added IDecoderGettable interface.
- * 19Mar2008    387         M. Duff     Modified to store SHEF data.
- * May 07, 2013	1869      	bsteffen   	Remove dataURI column from
+ * Date         Ticket#     Engineer    Description
+ * ------------ ----------  ----------- --------------------------
+ * June2006     314         Phillippe   Initial Creation.
+ * Nov 29, 2007 472         jkorman     Added IDecoderGettable interface.
+ * Mar 19, 2008 387         M. Duff     Modified to store SHEF data.
+ * May 07, 2013 1869        bsteffen    Remove dataURI column from
  *                                      PluginDataObject.
- * 
+ * Aug 30, 2013 2298        rjpeter     Make getPluginName abstract
  * 
* * @author bphillip @@ -63,21 +63,19 @@ import com.raytheon.uf.common.time.DataTime; @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) public class ShefRecord extends PluginDataObject { - + public static enum ShefType { A, B, E; } - - private static final long serialVersionUID = 2726928942130489733L; - private static final int MILLIS_PER_MINUTE = 1000 * 60; + private static final long serialVersionUID = 2726928942130489733L; /** * Collection of SHEF data values for this record */ @Transient private List dataValues = null; - + @Transient protected String rawMessage = null; @@ -127,12 +125,12 @@ public class ShefRecord extends PluginDataObject { @Transient private SHEFDate obsDate = null; - + @Transient private SHEFDate createDate = null; @Transient - private int durationValue = ParameterCode.Duration.DEFAULT.getValue(); + private final int durationValue = ParameterCode.Duration.DEFAULT.getValue(); /** * Empty constructor @@ -161,12 +159,12 @@ public class ShefRecord extends PluginDataObject { } public void addDataValue(ShefData value) { - if(dataValues == null) { + if (dataValues == null) { dataValues = new ArrayList(); } dataValues.add(value); } - + /** * Get the record type. * @@ -246,19 +244,19 @@ public class ShefRecord extends PluginDataObject { this.recordDate = recordDate; if (recordDate.length() == 4) { int year = ShefUtil.getFullYear(recordDate); - synchronized(ShefConstants.YYYYMMDD_FORMAT){ + synchronized (ShefConstants.YYYYMMDD_FORMAT) { recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(year + recordDate); } } else if (recordDate.length() == 6) { int year = ShefUtil.getFullYear(recordDate); year = year / 100; - synchronized(ShefConstants.YYYYMMDD_FORMAT){ + synchronized (ShefConstants.YYYYMMDD_FORMAT) { recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(year + recordDate); } } else { // recordDate length must be 8 - synchronized(ShefConstants.YYYYMMDD_FORMAT){ + synchronized (ShefConstants.YYYYMMDD_FORMAT) { recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(recordDate); } } @@ -287,7 +285,7 @@ public class ShefRecord extends PluginDataObject { public void setObsDate(SHEFDate date) { obsDate = date; } - + /** * * @return @@ -295,7 +293,7 @@ public class ShefRecord extends PluginDataObject { public SHEFDate getObsDate() { return obsDate; } - + /** * Get the time zone code * @@ -375,7 +373,7 @@ public class ShefRecord extends PluginDataObject { * @param date */ public void setCreationDate(SHEFDate date) { - if(date != null) { + if (date != null) { createDate = date; creationDate = date.toLocal(); creationDateObj = date.toCalendar().getTime(); @@ -385,7 +383,6 @@ public class ShefRecord extends PluginDataObject { creationDateObj = null; } } - /** * Get the creation date Date object @@ -563,54 +560,15 @@ public class ShefRecord extends PluginDataObject { public IDecoderGettable getDecoderGettable() { return null; } - + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Record type = "); sb.append(shefType); - -// if(obsDate != null) { -// sb.append(obsDate.toOutString()); -// } else { -// sb.append(" 0 0 0 0 0 0"); -// } -// sb.append(" "); -// if(createDate != null) { -// sb.append(createDate.toOutString()); -// } else { -// sb.append(" 0 0 0 0 0 0"); -// } -// sb.append(" "); -// // PE -// sb.append("HG"); -// sb.append(" "); -// sb.append(String.format("%4d",durationValue)); -// sb.append(" "); -// // Type Code -// sb.append("R"); -// sb.append(" "); -// // Source Code -// sb.append("G"); -// sb.append(" "); -// // Extremnum -// sb.append("Z"); -// sb.append(" "); -// // Probability Code -// sb.append(" "); -// sb.append(" "); -// // Data Value -// sb.append("00000.000"); -// sb.append(" "); -// // Data Qualifier -// sb.append(" "); -// sb.append(" "); -// // Revision code -// sb.append((revisedRecord) ? "0" : "1"); -// sb.append(ShefConstants.EOL); -// sb.append("----------------------------------------"); - if(dataValues != null) { - for(ShefData d : dataValues) { + + if (dataValues != null) { + for (ShefData d : dataValues) { sb.append(ShefConstants.EOL); d.toString(sb); } @@ -618,11 +576,16 @@ public class ShefRecord extends PluginDataObject { sb.append(ShefConstants.EOL); return sb.toString(); } - + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "shef"; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java index 2f65deae88..8b6e1fddf5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java @@ -30,18 +30,18 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; /** * - * Decoder implementation for taf plugin + * Decoder implementation for taf plugin. * *
  * 
  * SOFTWARE HISTORY
  * 
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * 2/14/07		139			bphillip	Initial creation	
- * 6/21/07		180			bphillip	Updated to use new plugin pattern
- * 20080425           1001  jkorman     Extracted decoder code into TAFParser.
- * 
+ * Date         Ticket#     Engineer    Description
+ * ------------ ----------  ----------- --------------------------
+ * Feb 14, 2007 139         bphillip    Initial creation
+ * Jun 21, 2007 180         bphillip    Updated to use new plugin pattern
+ * Apr 25, 2008 1001        jkorman     Extracted decoder code into TAFParser.
+ * Aug 30, 2013 2298        rjpeter     Make getPluginName abstract
  * 
* * @author bphillip @@ -52,7 +52,7 @@ public class TafDecoder extends AbstractDecoder { // Name of the plugin controlling this decoder. public static final String PLUGIN_NAME = "TAF"; - private String traceId = ""; + private final String traceId = ""; /** * Constructor. @@ -88,12 +88,12 @@ public class TafDecoder extends AbstractDecoder { record = parser.getDecodedRecord(); if (record != null) { record.setTraceId(traceId); - record.setPluginName("taf"); record.constructDataURI(); } else { TAFParts parts = input.tafParts; - if(parts.getTafHeader() != null) { - logger.error("Could not parse TAF for input " + parts.getTafHeader() + " in file " + traceId); + if (parts.getTafHeader() != null) { + logger.error("Could not parse TAF for input " + + parts.getTafHeader() + " in file " + traceId); } else { logger.error("Could not parse file " + traceId); } @@ -107,8 +107,9 @@ public class TafDecoder extends AbstractDecoder { record = null; } - if (record == null) + if (record == null) { return new PluginDataObject[0]; + } return new PluginDataObject[] { record }; } diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java index d48e049b54..4690840804 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafRecord.java @@ -22,7 +22,6 @@ package com.raytheon.edex.plugin.taf.common; import java.util.Date; import java.util.HashSet; -import java.util.Iterator; import java.util.Set; import javax.persistence.Access; @@ -61,13 +60,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 2/14/07 139 bphillip Initial Creation - * 6/21/07 180 bphillip Updated to use new plugin pattern - * 20071129 472 jkorman Added IDecoderGettable interface. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime + * Feb 14, 2007 139 bphillip Initial Creation + * Jun 21, 2007 180 bphillip Updated to use new plugin pattern + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * 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 * * * @@ -81,12 +82,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "taf", - indexes = { - @Index(name = "taf_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "taf", indexes = { @Index(name = "taf_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement @@ -347,10 +344,8 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled { this.identifier = dataURI; - if (this.changeGroups != null && this.changeGroups.size() > 0) { - for (Iterator iter = this.changeGroups.iterator(); iter - .hasNext();) { - ChangeGroup group = iter.next(); + if ((this.changeGroups != null) && (this.changeGroups.size() > 0)) { + for (ChangeGroup group : this.changeGroups) { group.setParentID(this); } } @@ -391,7 +386,7 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + result = (prime * result) + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); return result; } @@ -405,19 +400,23 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled { */ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } TafRecord other = (TafRecord) obj; if (getDataURI() == null) { if (other.getDataURI() != null) { return false; } - } else if (!getDataURI().equals(other.getDataURI())) + } else if (!getDataURI().equals(other.getDataURI())) { return false; + } return true; } @@ -427,4 +426,9 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "taf"; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextDecoder.java b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextDecoder.java index c870667d8e..b06c736958 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextDecoder.java @@ -66,18 +66,19 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 2008 Aug 11 jkorman + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * Aug 11, 2008 jkorman Initial creation * Jul 10, 2009 2191 rjpeter Finished implementation. - * Apr 14, 2010 4734 mhuang Corrected StdTextProduct import - * dependency + * Apr 14, 2010 4734 mhuang Corrected StdTextProduct import + * dependency * May 28, 2010 2187 cjeanbap Added StdTextProductFactory - * functionality. + * functionality. * Aug 26, 2010 2187 cjeanbap Renamed operationalMode for - * consistency. + * consistency. * Dec 13, 2010 5805 cjeanbap Parse Report to get AFOS Product Id - * Jul 16, 2013 DR 16323 D. Friedman Use concurrent map + * Jul 16, 2013 16323 D. Friedman Use concurrent map + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author @@ -99,7 +100,7 @@ public class TextDecoder extends AbstractDecoder { .getEnvProperties().getEnvValue("DEFAULTDATADIR") + "badTxt"; - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private String pluginName; @@ -107,11 +108,11 @@ public class TextDecoder extends AbstractDecoder { private String fileName; - private TextDB textdb = new TextDB(); + private final TextDB textdb = new TextDB(); // keeps track of the headers that have been logged as not mapped and the // time it was logged, so that each one is only logged once a day - private Map notMappedHeaders = new ConcurrentHashMap(); + private final Map notMappedHeaders = new ConcurrentHashMap(); private long msgHdrLogTime = 0; @@ -158,7 +159,6 @@ public class TextDecoder extends AbstractDecoder { if (pdo != null) { pdo.setTraceId(traceId); - pdo.setPluginName(pluginName); try { pdo.constructDataURI(); } catch (PluginException e) { @@ -209,7 +209,7 @@ public class TextDecoder extends AbstractDecoder { TextRecord pdo = null; - WMOReportData rptData = (WMOReportData) separator.next(); + WMOReportData rptData = separator.next(); boolean operationalMode = true; if (rptData != null) { @@ -227,8 +227,8 @@ public class TextDecoder extends AbstractDecoder { if (afosIdContainer != null) { List afosIdList = afosIdContainer .getIdList(); - if (afosIdList != null - && afosIdList.size() > 0) { + if ((afosIdList != null) + && (afosIdList.size() > 0)) { StringTokenizer st = new StringTokenizer( rptData.getReportData(), "\n"); String potentialId = st.nextToken(); @@ -266,20 +266,20 @@ public class TextDecoder extends AbstractDecoder { + rptHdr.getCccc(); Long time = notMappedHeaders.get(key); long curTime = System.currentTimeMillis(); - if (time == null - || (curTime - time > NOT_FOUND_LOG_PERIOD)) { + if ((time == null) + || ((curTime - time) > NOT_FOUND_LOG_PERIOD)) { StringBuilder msg = new StringBuilder(200); msg.append("Could not determine AFOS id for wmo header: ["); msg.append(rptHdr.toString()); msg.append("]"); - if (msgHdr != null + if ((msgHdr != null) && !msgHdr.equals(rptHdr)) { msg.append(" incoming message header ["); msg.append(msgHdr.toString()); msg.append("]"); } - if (curTime - msgHdrLogTime > MSG_HDR_LOG_PERIOD) { + if ((curTime - msgHdrLogTime) > MSG_HDR_LOG_PERIOD) { msg.append("\nMsg for a given header will only be logged once in a " + (NOT_FOUND_LOG_PERIOD / MILLIS_PER_HOUR) + " hour period"); @@ -319,7 +319,6 @@ public class TextDecoder extends AbstractDecoder { if (pdo != null) { pdo.setTraceId(traceId); - pdo.setPluginName(pluginName); try { pdo.constructDataURI(); } catch (PluginException e) { @@ -359,8 +358,8 @@ public class TextDecoder extends AbstractDecoder { key = header.getOriginalMessage(); } Long time = notMappedHeaders.get(key); - if (time == null - || (curTime - time > NOT_FOUND_LOG_PERIOD)) { + if ((time == null) + || ((curTime - time) > NOT_FOUND_LOG_PERIOD)) { notMappedHeaders.put(key, curTime); } else { iter.remove(); @@ -387,7 +386,7 @@ public class TextDecoder extends AbstractDecoder { } } - if (curTime - msgHdrLogTime > MSG_HDR_LOG_PERIOD) { + if ((curTime - msgHdrLogTime) > MSG_HDR_LOG_PERIOD) { msg.append("\nMsg for a given header will only be logged once in a " + (NOT_FOUND_LOG_PERIOD / MILLIS_PER_HOUR) + " hour period"); diff --git a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextRecord.java b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextRecord.java index c7790d7afe..43a9094555 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/TextRecord.java @@ -38,9 +38,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Dec 5, 2008 jkorman Initial creation + * Dec 05, 2008 jkorman Initial creation * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -108,4 +109,8 @@ public class TextRecord extends PluginDataObject { return super.getDataURI(); } + @Override + public String getPluginName() { + return "text"; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.textlightning/src/com/raytheon/edex/plugin/textlightning/TextLightningDecoder.java b/edexOsgi/com.raytheon.edex.plugin.textlightning/src/com/raytheon/edex/plugin/textlightning/TextLightningDecoder.java index 8f530a7c5d..3337e38f5a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.textlightning/src/com/raytheon/edex/plugin/textlightning/TextLightningDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.textlightning/src/com/raytheon/edex/plugin/textlightning/TextLightningDecoder.java @@ -41,22 +41,23 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Mar 25, 2010            jsanchez     Initial creation
- *
+ * Mar 25, 2010            jsanchez    Initial creation
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ public class TextLightningDecoder extends AbstractDecoder implements IBinaryDecoder { - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private String traceId = null; @@ -74,17 +75,18 @@ public class TextLightningDecoder extends AbstractDecoder implements * @throws DecoderException * Thrown if no data is available. */ + @Override public PluginDataObject[] decode(byte[] data) throws DecoderException { ArrayList strikes = new ArrayList(); TextLightningParser parser = new TextLightningParser(data); - + LightningStrikePoint token; - while(parser.hasNext()) { + while (parser.hasNext()) { token = parser.next(); - if(token != null) { + if (token != null) { strikes.add(token); } - } + } BinLightningRecord report = null; if (strikes.size() > 0) { @@ -106,15 +108,14 @@ public class TextLightningDecoder extends AbstractDecoder implements Calendar cStart = report.getStartTime(); Calendar cStop = report.getStopTime(); - TimeRange range = new TimeRange(cStart.getTimeInMillis(), cStop - .getTimeInMillis()); + TimeRange range = new TimeRange(cStart.getTimeInMillis(), + cStop.getTimeInMillis()); DataTime dataTime = new DataTime(cStart, range); report.setDataTime(dataTime); if (report != null) { report.setTraceId(traceId); - report.setPluginName("binlightning"); try { report.constructDataURI(); } catch (PluginException e) { diff --git a/edexOsgi/com.raytheon.edex.uengine/src/com/raytheon/edex/uengine/tasks/query/TermQuery.java b/edexOsgi/com.raytheon.edex.uengine/src/com/raytheon/edex/uengine/tasks/query/TermQuery.java index 40982795d7..4e6ee44dcf 100644 --- a/edexOsgi/com.raytheon.edex.uengine/src/com/raytheon/edex/uengine/tasks/query/TermQuery.java +++ b/edexOsgi/com.raytheon.edex.uengine/src/com/raytheon/edex/uengine/tasks/query/TermQuery.java @@ -20,10 +20,7 @@ package com.raytheon.edex.uengine.tasks.query; -import java.util.List; - import com.raytheon.edex.uengine.exception.MicroEngineException; -import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.edex.database.DataAccessLayerException; import com.raytheon.uf.edex.database.plugin.PluginFactory; @@ -37,12 +34,14 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory; * *
  * SOFTWARE HISTORY
- * Date             PR#             Engineer            Description
- * -----------      ----------      ------------        --------------------------
- * Mar 27, 2007                     njensen             Initial Creation.
- * 9/21/2007        368             grichard            Added plugin operations from superclass.
- * 6/04/2008        875             bphillip            Refactored to use DatabaseQuery
- * 
+ * Date Ticket# Engineer Description + * ------------ ---------- ------------ ---------------------------------------- + * Mar 27, 2007 njensen Initial Creation. + * Sep 21, 2007 368 grichard Added plugin operations from + * superclass. + * Jun 04, 2008 875 bphillip Refactored to use DatabaseQuery + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * * * @author njensen */ @@ -61,6 +60,7 @@ public class TermQuery extends TableQuery { * @throws PluginException * @deprecated */ + @Deprecated public TermQuery(String aPlugin, String dummy1, String dummy2) throws DataAccessLayerException, PluginException { this(aPlugin); @@ -80,19 +80,6 @@ public class TermQuery extends TableQuery { this.plugin = aPlugin; } - @SuppressWarnings("unchecked") - public List execute() throws Exception { - List results = (List) super - .execute(); - - if (results != null) { - for (int i = 0; i < results.size(); i++) { - results.get(i).setPluginName(plugin); - } - } - return results; - } - /** * * @return diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java index 83e2a76d8e..3934a16ec6 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.acars/src/com/raytheon/uf/common/dataplugin/acars/ACARSRecord.java @@ -65,15 +65,17 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 21, 2009 1939 jkorman Initial creation - * Apr 09, 2009 952 jsanchez Updated getValue method. - * Added a getMessageData method. - * Apr 21, 2009 2245 jsanchez Returned temperature unit to kelvin. - * May 21, 2009 2338 jsanchez Updated the getMessageData. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Jan 21, 2009 1939 jkorman Initial creation + * Apr 09, 2009 952 jsanchez Updated getValue method. Added a + * getMessageData method. + * Apr 21, 2009 2245 jsanchez Returned temperature unit to kelvin. + * May 21, 2009 2338 jsanchez Updated the getMessageData. + * 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 * * * @@ -87,12 +89,8 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "acars", - indexes = { - @Index(name = "acars_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "acars", indexes = { @Index(name = "acars_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -698,9 +696,9 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled, a = new Amount(getLatitude(), LOCATION_UNIT); } else if (STA_LON.equals(pName)) { a = new Amount(getLongitude(), LOCATION_UNIT); - } else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) { + } else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) { a = new Amount(getFlightLevel().intValue(), FLIGHT_LEVEL_UNIT); - } else if (SFC_DWPT.equals(pName) && getDwpt() != null) { + } else if (SFC_DWPT.equals(pName) && (getDwpt() != null)) { a = new Amount(getDwpt(), TEMPERATURE_UNIT); } @@ -724,47 +722,53 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled, return String.format(TEXT_FMT, getTailNumber(), getTimeObs()); } - - - - - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + result = (prime * result) + ((tailNumber == null) ? 0 : tailNumber.hashCode()); - result = prime * result + ((timeObs == null) ? 0 : timeObs.hashCode()); + result = (prime * result) + + ((timeObs == null) ? 0 : timeObs.hashCode()); return result; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } ACARSRecord other = (ACARSRecord) obj; if (tailNumber == null) { - if (other.tailNumber != null) + if (other.tailNumber != null) { return false; - } else if (!tailNumber.equals(other.tailNumber)) + } + } else if (!tailNumber.equals(other.tailNumber)) { return false; + } if (timeObs == null) { - if (other.timeObs != null) + if (other.timeObs != null) { return false; - } else if (!timeObs.equals(other.timeObs)) + } + } else if (!timeObs.equals(other.timeObs)) { return false; + } return true; } @@ -782,7 +786,7 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled, if (this == other) { result = EQUAL; } else { - if(getTailNumber().equals(getTailNumber())) { + if (getTailNumber().equals(getTailNumber())) { result = timeObs.compareTo(other.timeObs); } else { result = getTailNumber().compareTo(other.getTailNumber()); @@ -790,11 +794,16 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled, } return result; } - + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "acars"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/src/com/raytheon/uf/common/dataplugin/acarssounding/ACARSSoundingRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/src/com/raytheon/uf/common/dataplugin/acarssounding/ACARSSoundingRecord.java index 7529a40c9c..54f4ed92a9 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/src/com/raytheon/uf/common/dataplugin/acarssounding/ACARSSoundingRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/src/com/raytheon/uf/common/dataplugin/acarssounding/ACARSSoundingRecord.java @@ -64,11 +64,13 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20090403 1939 jkorman Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Apr 03, 2009 1939 jkorman Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -82,12 +84,8 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "acarssounding", - indexes = { - @Index(name = "acarssounding_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "acarssounding", indexes = { @Index(name = "acarssounding_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -122,12 +120,12 @@ public class ACARSSoundingRecord extends PluginDataObject implements @XmlElement private String tailNumber; - // Flight phase (A[scending] D[escending]) + // Flight phase (A[scending] D[escending]) @Column(length = 1) @DynamicSerializeElement @XmlElement private String phase = null; - + // oldest observation time in this sounding @Column @DynamicSerializeElement @@ -139,7 +137,7 @@ public class ACARSSoundingRecord extends PluginDataObject implements @DynamicSerializeElement @XmlElement private Long newestTime = Long.MIN_VALUE; - + // The level data for this observation. @OneToMany(cascade = CascadeType.ALL, mappedBy = "parent", fetch = FetchType.EAGER) @XmlElement @@ -261,7 +259,7 @@ public class ACARSSoundingRecord extends PluginDataObject implements public void setTailNumber(String tailNumber) { this.tailNumber = tailNumber; } - + /** * @return the phase */ @@ -270,7 +268,8 @@ public class ACARSSoundingRecord extends PluginDataObject implements } /** - * @param phase the phase to set + * @param phase + * the phase to set */ public void setPhase(String phase) { this.phase = phase; @@ -284,7 +283,8 @@ public class ACARSSoundingRecord extends PluginDataObject implements } /** - * @param oldestTime the oldestTime to set + * @param oldestTime + * the oldestTime to set */ public void setOldestTime(Long oldestTime) { this.oldestTime = oldestTime; @@ -298,7 +298,8 @@ public class ACARSSoundingRecord extends PluginDataObject implements } /** - * @param newestTime the newestTime to set + * @param newestTime + * the newestTime to set */ public void setNewestTime(Long newestTime) { this.newestTime = newestTime; @@ -328,17 +329,17 @@ public class ACARSSoundingRecord extends PluginDataObject implements * @param cloud */ public void addLevel(ACARSSoundingLayer level) { - if(level != null) { + if (level != null) { level.setParent(this); if (levels == null) { levels = new HashSet(); } levels.add(level); long cTime = level.getTimeObs().getTimeInMillis(); - if(cTime < oldestTime) { + if (cTime < oldestTime) { oldestTime = cTime; } - if(cTime > newestTime) { + if (cTime > newestTime) { newestTime = cTime; } } @@ -386,4 +387,9 @@ public class ACARSSoundingRecord extends PluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "acarssounding"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.airep/src/com/raytheon/uf/common/dataplugin/airep/AirepRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.airep/src/com/raytheon/uf/common/dataplugin/airep/AirepRecord.java index d03ca0e507..d1803bda21 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.airep/src/com/raytheon/uf/common/dataplugin/airep/AirepRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.airep/src/com/raytheon/uf/common/dataplugin/airep/AirepRecord.java @@ -69,16 +69,19 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080103 384 jkorman Initial Coding. - * 20080107 720 jkorman remove default assignments from attributes. - * 20120405 435 dgilling Prevent NullPointerExceptions in + * Jan 03, 2008 384 jkorman Initial Coding. + * Jan 07, 2008 720 jkorman remove default assignments from + * attributes. + * Apr 05, 2012 435 dgilling Prevent NullPointerExceptions in * buildMessageData(). - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 20120911 1011 jkorman Added ability to report turbulence from decoded - * TB group. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Sep 11, 2012 1011 jkorman Added ability to report turbulence from + * decoded TB group. + * 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 * * * @@ -92,12 +95,8 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "airep", - indexes = { - @Index(name = "airep_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "airep", indexes = { @Index(name = "airep_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -330,7 +329,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, */ public String getReportData() { String s = null; - if (messageData != null && messageData instanceof String) { + if ((messageData != null) && (messageData instanceof String)) { s = (String) messageData; } else { s = buildMessageData(); @@ -593,7 +592,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, a = new Amount(this.getLatitude(), LOCATION_UNIT); } else if (STA_LON.equals(pName)) { a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) { + } else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) { a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT); } @@ -627,7 +626,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, String[] retValue = null; String value = null; - if ("FLT_HZD".matches(paramName) && flightHazard != null) { + if ("FLT_HZD".matches(paramName) && (flightHazard != null)) { if (flightHazard != null) { retValue = new String[] { flightHazard.toString() }; } @@ -720,7 +719,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, boolean validLocation = (location != null); StringBuilder messageData = new StringBuilder("ARP "); - if (validLocation && getStationId() != null) { + if (validLocation && (getStationId() != null)) { messageData.append(getStationId()); } messageData.append(' '); @@ -739,7 +738,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, } messageData.append(" F"); - if (validLocation && getFlightLevel() != null) { + if (validLocation && (getFlightLevel() != null)) { int flightLevel = (int) ftToHft.convert(getFlightLevel()); messageData.append(flightLevel); } @@ -761,7 +760,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, messageData.append(windSpeed.intValue()); messageData.append("KT"); } - if(flightConditions != null) { + if (flightConditions != null) { int turb = flightConditions >> 4; if ((turb & 0x80) > 0) { messageData.append(" TB"); @@ -831,7 +830,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + result = (prime * result) + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); return result; } @@ -871,4 +870,9 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled, public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "airep"; + } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/BinLightningRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/BinLightningRecord.java index 3de0e749e4..e6d780cf60 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/BinLightningRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/BinLightningRecord.java @@ -62,24 +62,27 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * * Date Ticket# Engineer Description * ---------- ---------- ----------- -------------------------- - * 20070810 379 jkorman Initial Coding from prototype. - * 20070817 379 jkorman Fixed convert(). Was writing day into + * Aug 10, 2007 379 jkorman Initial Coding from prototype. + * Aug 17, 2007 379 jkorman Fixed convert(). Was writing day into * hours field of new calendar. - * 20070920 379 jkorman Modified getPersistenceTime. - * 20070921 379 jkorman Modified get/set start/stop times due + * Sep 20, 2007 379 jkorman Modified getPersistenceTime. + * Sep 21, 2007 379 jkorman Modified get/set start/stop times due * to JiBX problems. - * 20070924 379 jkorman Removed Group, added insert_time and - * (set/get)ers to make DataURI work. - * 20071129 472 jkorman Added IDecoderGettable interface. - * 20080107 720 jkorman remove default assignments from attributes. - * 20080708 1174 jkorman Added persistenceTime handling. - * 20090206 1990 bphillip Removed populateDataStore method - * 20130227 DCS 152 jgerth/elau Support for WWLLN and multiple sources - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 20130408 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Sep 24, 2007 379 jkorman Removed Group, added insert_time and + * (set/get)ers to make DataURI work. + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Jan 07, 2008 720 jkorman remove default assignments from + * attributes. + * Jul 08, 2008 1174 jkorman Added persistenceTime handling. + * Feb 06, 2009 1990 bphillip Removed populateDataStore method + * Feb 27, 2013 DCS 152 jgerth/elau Support for WWLLN and multiple sources + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * 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 * * * @@ -93,17 +96,13 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "binlightning", - indexes = { - @Index(name = "binlightning_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "binlightning", indexes = { @Index(name = "binlightning_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) -public class BinLightningRecord extends - PersistablePluginDataObject implements IPersistable { +public class BinLightningRecord extends PersistablePluginDataObject implements + IPersistable { /** Serializable id * */ private static final long serialVersionUID = 1L; @@ -159,7 +158,7 @@ public class BinLightningRecord extends @DynamicSerializeElement @XmlAttribute private Calendar stopTime; - + // JJG - source of lightning data @Column(length = 5) @DataURI(position = 3) @@ -221,8 +220,8 @@ public class BinLightningRecord extends */ @SuppressWarnings("unused") private void updatePersistenceTime() { - if (startTimeMillis != Long.MAX_VALUE - && stopTimeMillis != Long.MIN_VALUE) { + if ((startTimeMillis != Long.MAX_VALUE) + && (stopTimeMillis != Long.MIN_VALUE)) { persistTime = (startTimeMillis + stopTimeMillis) / 2; setPersistenceTime(TimeTools.newCalendar(persistTime).getTime()); } else { @@ -238,24 +237,25 @@ public class BinLightningRecord extends * A strike report to add. */ public void addStrike(LightningStrikePoint strike) { - // jjg add - if (lightSource == null) { - if (strike.getLightSource() == null) { - lightSource = (String) "NLDN"; - } else if (strike.getLightSource().isEmpty()) { - lightSource = (String) "UNKN"; - } else { - lightSource = (String) strike.getLightSource(); - } - } else { - if (strike.getLightSource() == null) { - lightSource = (String) "NLDN"; - } else if (!lightSource.equals(strike.getLightSource())) - lightSource = (String) "UNKN"; - } - // end + // jjg add + if (lightSource == null) { + if (strike.getLightSource() == null) { + lightSource = "NLDN"; + } else if (strike.getLightSource().isEmpty()) { + lightSource = "UNKN"; + } else { + lightSource = strike.getLightSource(); + } + } else { + if (strike.getLightSource() == null) { + lightSource = "NLDN"; + } else if (!lightSource.equals(strike.getLightSource())) { + lightSource = "UNKN"; + } + } + // end - if (insertIndex < obsTimes.length) { + if (insertIndex < obsTimes.length) { long t1 = startTimeMillis; Calendar c = TimeTools.getBaseCalendar(strike.getYear(), @@ -445,7 +445,7 @@ public class BinLightningRecord extends public void setLightSource(String lightSource) { this.lightSource = lightSource; } - + /** * Get the IDecoderGettable reference for this record. * @@ -506,4 +506,9 @@ public class BinLightningRecord extends public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "binlightning"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrascat/src/com/raytheon/uf/common/dataplugin/bufrascat/AScatObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrascat/src/com/raytheon/uf/common/dataplugin/bufrascat/AScatObs.java index fe1843e13e..2e1c4f8a27 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrascat/src/com/raytheon/uf/common/dataplugin/bufrascat/AScatObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrascat/src/com/raytheon/uf/common/dataplugin/bufrascat/AScatObs.java @@ -60,6 +60,7 @@ import com.vividsolutions.jts.geom.Geometry; * PluginDataObject. * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -74,283 +75,283 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrascat", - indexes = { - @Index(name = "bufrascat_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrascat", indexes = { @Index(name = "bufrascat_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class AScatObs extends PersistablePluginDataObject implements ISpatialEnabled, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - @DataURI(position = 1) - @DynamicSerializeElement - private Integer satId; + @DataURI(position = 1) + @DynamicSerializeElement + private Integer satId; - @Embedded - @DataURI(position = 2, embedded = true) - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 2, embedded = true) + @DynamicSerializeElement + private SurfaceObsLocation location; - // Text of the WMO header - @Column(length = 32) - @DynamicSerializeElement - private String wmoHeader; + // Text of the WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; - @DynamicSerializeElement - @Transient - private Integer orbitNumber; + @DynamicSerializeElement + @Transient + private Integer orbitNumber; - // The observation time. - @DynamicSerializeElement - @Transient - private Calendar validTime; + // The observation time. + @DynamicSerializeElement + @Transient + private Calendar validTime; - @DynamicSerializeElement - @Transient - private Double windDir; + @DynamicSerializeElement + @Transient + private Double windDir; - @DataURI(position = 3) - @DynamicSerializeElement - private Float windSpd; + @DataURI(position = 3) + @DynamicSerializeElement + private Float windSpd; - @DynamicSerializeElement - @Transient - private Double probRain; + @DynamicSerializeElement + @Transient + private Double probRain; - @DynamicSerializeElement - @Transient - private Integer rainIndex; + @DynamicSerializeElement + @Transient + private Integer rainIndex; - /** - * Empty constructor. - */ - public AScatObs() { - } + /** + * Empty constructor. + */ + public AScatObs() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public AScatObs(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public AScatObs(String uri) { + super(uri); + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Was this location defined from the station catalog? False if not. - * - * @return Was this location defined from the station catalog? - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Was this location defined from the station catalog? False if not. + * + * @return Was this location defined from the station catalog? + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** - * @return the satId - */ - public Integer getSatId() { - return satId; - } + /** + * @return the satId + */ + public Integer getSatId() { + return satId; + } - /** - * @param satId - * the satId to set - */ - public void setSatId(Integer satId) { - this.satId = satId; - } + /** + * @param satId + * the satId to set + */ + public void setSatId(Integer satId) { + this.satId = satId; + } - /** - * @return the orbitNumber - */ - public Integer getOrbitNumber() { - return orbitNumber; - } + /** + * @return the orbitNumber + */ + public Integer getOrbitNumber() { + return orbitNumber; + } - /** - * @param orbitNumber - * the orbitNumber to set - */ - public void setOrbitNumber(Integer orbitNumber) { - this.orbitNumber = orbitNumber; - } + /** + * @param orbitNumber + * the orbitNumber to set + */ + public void setOrbitNumber(Integer orbitNumber) { + this.orbitNumber = orbitNumber; + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @return the windDir - */ - public Double getWindDir() { - return windDir; - } + /** + * @return the windDir + */ + public Double getWindDir() { + return windDir; + } - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(Double windDir) { - this.windDir = windDir; - } + /** + * @param windDir + * the windDir to set + */ + public void setWindDir(Double windDir) { + this.windDir = windDir; + } - /** - * @return the windSpd - */ - public Float getWindSpd() { - return windSpd; - } + /** + * @return the windSpd + */ + public Float getWindSpd() { + return windSpd; + } - /** - * @param windSpd - * the windSpd to set - */ - public void setWindSpd(Float windSpd) { - this.windSpd = windSpd; - } + /** + * @param windSpd + * the windSpd to set + */ + public void setWindSpd(Float windSpd) { + this.windSpd = windSpd; + } - /** - * @return the probRain - */ - public Double getProbRain() { - return probRain; - } + /** + * @return the probRain + */ + public Double getProbRain() { + return probRain; + } - /** - * @param probRain - * the probRain to set - */ - public void setProbRain(Double probRain) { - this.probRain = probRain; - } + /** + * @param probRain + * the probRain to set + */ + public void setProbRain(Double probRain) { + this.probRain = probRain; + } - /** - * @return the rainIndex - */ - public Integer getRainIndex() { - return rainIndex; - } + /** + * @return the rainIndex + */ + public Integer getRainIndex() { + return rainIndex; + } - /** - * @param rainIndex - * the rainIndex to set - */ - public void setRainIndex(Integer rainIndex) { - this.rainIndex = rainIndex; - } + /** + * @param rainIndex + * the rainIndex to set + */ + public void setRainIndex(Integer rainIndex) { + this.rainIndex = rainIndex; + } - /** - * Get the observation time for this data. - * - * @return The data observation time. - */ - public Calendar getValidTime() { - return validTime; - } + /** + * Get the observation time for this data. + * + * @return The data observation time. + */ + public Calendar getValidTime() { + return validTime; + } - /** - * Set the observation time for this data. - * - * @param timeObs - * The data observation time. - */ - public void setValidTime(Calendar time) { - validTime = time; - } + /** + * Set the observation time for this data. + * + * @param timeObs + * The data observation time. + */ + public void setValidTime(Calendar time) { + validTime = time; + } - @Override - public ISpatialObject getSpatialObject() { - return location; - } + @Override + public ISpatialObject getSpatialObject() { + return location; + } - /** + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + @Override + public String getPluginName() { + return "bufrascat"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrhdw/src/com/raytheon/uf/common/dataplugin/bufrhdw/BufrHDWObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrhdw/src/com/raytheon/uf/common/dataplugin/bufrhdw/BufrHDWObs.java index 805bfd631b..ee2fec58b5 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrhdw/src/com/raytheon/uf/common/dataplugin/bufrhdw/BufrHDWObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrhdw/src/com/raytheon/uf/common/dataplugin/bufrhdw/BufrHDWObs.java @@ -59,6 +59,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * PluginDataObject. * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -73,557 +74,557 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrhdw", - indexes = { - @Index(name = "bufrhdw_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrhdw", indexes = { @Index(name = "bufrhdw_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class BufrHDWObs extends PersistablePluginDataObject implements ISpatialEnabled, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // The observation time. - @DataURI(position = 1) - @DynamicSerializeElement - private String satType; - - @DataURI(position = 2) - @DynamicSerializeElement - private Double pressure; - - @Embedded - @DataURI(position = 3, embedded = true) - @DynamicSerializeElement - private SurfaceObsLocation location; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - // Text of the WMO header - @Column(length = 32) - @DynamicSerializeElement - private String wmoHeader; - - // The observation time. - @Column - @DynamicSerializeElement - private Calendar validTime; - - @DynamicSerializeElement - @Transient - private Double windDir; - - @DynamicSerializeElement - @Transient - private Double windSpd; - - @DynamicSerializeElement - @Transient - private Double satelliteID; - - @DynamicSerializeElement - @Transient - private Double originatingID; - - @DynamicSerializeElement - @Transient - private Double satelliteClass; - - @DynamicSerializeElement - @Transient - private Double sgmtSzX; - - @DynamicSerializeElement - @Transient - private Double sgmtSzY; - - @DynamicSerializeElement - @Transient - private Integer satelliteInstr; - - @DynamicSerializeElement - @Transient - private Integer satelliteWindMethod; - - @DynamicSerializeElement - @Transient - private Double satelliteFreq; - - @DynamicSerializeElement - @Transient - private Double satelliteBandWidth; - - @DynamicSerializeElement - @Transient - private Double coldestTemp; - - @DynamicSerializeElement - @Transient - private Integer heightMethod; - - @DynamicSerializeElement - @Transient - private Integer tracerCorrelation; - - @DynamicSerializeElement - @Transient - private Integer landSea; - - @DynamicSerializeElement - @Transient - private Double satelliteZenith; - - @DynamicSerializeElement - @Transient - private Integer firstGuess; - - @DynamicSerializeElement - @Transient - private Integer timeSignificance; - - /** - * Empty constructor. - */ - public BufrHDWObs() { - } - - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public BufrHDWObs(String uri) { - super(uri); - } - - /** - * Get the observation time for this data. - * - * @return The data observation time. - */ - public Calendar getValidTime() { - return validTime; - } - - /** - * Set the observation time for this data. - * - * @param timeObs - * The data observation time. - */ - public void setValidTime(Calendar time) { - validTime = time; - } - - /** - * @return the satType - */ - public String getSatType() { - return satType; - } - - /** - * @param satType - * the satType to set - */ - public void setSatType(String type) { - satType = type; - } - - /** - * @param satType - * the satType to set - */ - public void setSatType(BUFRHDWSatType type) { - satType = type.toString(); - } - - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } - - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * @return the windDir - */ - public Double getWindDir() { - return windDir; - } - - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(Double direction) { - windDir = direction; - } - - /** - * @return the windSpd - */ - public Double getWindSpd() { - return windSpd; - } - - /** - * @param windSpd - * the windSpd to set - */ - public void setWindSpd(Double speed) { - windSpd = speed; - } - - /** - * @return the pressure - */ - public Double getPressure() { - return pressure; - } - - /** - * @param pressure - * the pressure to set - */ - public void setPressure(Double pressure) { - this.pressure = pressure; - } - - /** - * @return the satelliteID - */ - public Double getSatelliteID() { - return satelliteID; - } - - /** - * @param satelliteID - * the satelliteID to set - */ - public void setSatelliteID(Double satelliteID) { - this.satelliteID = satelliteID; - } - - /** - * @return the originatingID - */ - public Double getOriginatingID() { - return originatingID; - } - - /** - * @param originatingID - * the originatingID to set - */ - public void setOriginatingID(Double originatingID) { - this.originatingID = originatingID; - } - - /** - * @return the satelliteClass - */ - public Double getSatelliteClass() { - return satelliteClass; - } - - /** - * @param satelliteClass - * the satelliteClass to set - */ - public void setSatelliteClass(Double satelliteClass) { - this.satelliteClass = satelliteClass; - } - - /** - * @return the sgmtSzX - */ - public Double getSgmtSzX() { - return sgmtSzX; - } - - /** - * @param sgmtSzX - * the sgmtSzX to set - */ - public void setSgmtSzX(Double sgmtSzX) { - this.sgmtSzX = sgmtSzX; - } - - /** - * @return the sgmtSzY - */ - public Double getSgmtSzY() { - return sgmtSzY; - } - - /** - * @param sgmtSzY - * the sgmtSzY to set - */ - public void setSgmtSzY(Double sgmtSzY) { - this.sgmtSzY = sgmtSzY; - } - - /** - * @return the satelliteInstr - */ - public Integer getSatelliteInstr() { - return satelliteInstr; - } - - /** - * @param satelliteInstr - * the satelliteInstr to set - */ - public void setSatelliteInstr(Integer satelliteInstr) { - this.satelliteInstr = satelliteInstr; - } - - /** - * @return the satelliteWindMethod - */ - public Integer getSatelliteWindMethod() { - return satelliteWindMethod; - } - - /** - * @param satelliteWindMethod - * the satelliteWindMethod to set - */ - public void setSatelliteWindMethod(Integer satelliteWindMethod) { - this.satelliteWindMethod = satelliteWindMethod; - } - - /** - * @return the satelliteFreq - */ - public Double getSatelliteFreq() { - return satelliteFreq; - } - - /** - * @param satelliteFreq - * the satelliteFreq to set - */ - public void setSatelliteFreq(Double satelliteFreq) { - this.satelliteFreq = satelliteFreq; - } - - /** - * @return the satelliteBandWidth - */ - public Double getSatelliteBandWidth() { - return satelliteBandWidth; - } - - /** - * @param satelliteBandWidth - * the satelliteBandWidth to set - */ - public void setSatelliteBandWidth(Double satelliteBandWidth) { - this.satelliteBandWidth = satelliteBandWidth; - } - - /** - * @return the coldestTemp - */ - public Double getColdestTemp() { - return coldestTemp; - } - - /** - * @param coldestTemp - * the coldestTemp to set - */ - public void setColdestTemp(Double coldestTemp) { - this.coldestTemp = coldestTemp; - } - - /** - * @return the heightMethod - */ - public Integer getHeightMethod() { - return heightMethod; - } - - /** - * @param heightMethod - * the heightMethod to set - */ - public void setHeightMethod(Integer heightMethod) { - this.heightMethod = heightMethod; - } - - /** - * @return the tracerCorrelation - */ - public Integer getTracerCorrelation() { - return tracerCorrelation; - } - - /** - * @param tracerCorrelation - * the tracerCorrelation to set - */ - public void setTracerCorrelation(Integer tracerCorrelation) { - this.tracerCorrelation = tracerCorrelation; - } - - /** - * @return the landSea - */ - public Integer getLandSea() { - return landSea; - } - - /** - * @param landSea - * the landSea to set - */ - public void setLandSea(Integer landSea) { - this.landSea = landSea; - } - - /** - * @return the satelliteZenith - */ - public Double getSatelliteZenith() { - return satelliteZenith; - } - - /** - * @param satelliteZenith - * the satelliteZenith to set - */ - public void setSatelliteZenith(Double satelliteZenith) { - this.satelliteZenith = satelliteZenith; - } - - /** - * @return the firstGuess - */ - public Integer getFirstGuess() { - return firstGuess; - } - - /** - * @param firstGuess - * the firstGuess to set - */ - public void setFirstGuess(Integer firstGuess) { - this.firstGuess = firstGuess; - } - - /** - * @return the timeSignificance - */ - public Integer getTimeSignificance() { - return timeSignificance; - } - - /** - * @param timeSignificance - * the timeSignificance to set - */ - public void setTimeSignificance(Integer timeSignificance) { - this.timeSignificance = timeSignificance; - } - - @Override - public ISpatialObject getSpatialObject() { - return null; - } - - /** + // The observation time. + @DataURI(position = 1) + @DynamicSerializeElement + private String satType; + + @DataURI(position = 2) + @DynamicSerializeElement + private Double pressure; + + @Embedded + @DataURI(position = 3, embedded = true) + @DynamicSerializeElement + private SurfaceObsLocation location; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + // Text of the WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; + + // The observation time. + @Column + @DynamicSerializeElement + private Calendar validTime; + + @DynamicSerializeElement + @Transient + private Double windDir; + + @DynamicSerializeElement + @Transient + private Double windSpd; + + @DynamicSerializeElement + @Transient + private Double satelliteID; + + @DynamicSerializeElement + @Transient + private Double originatingID; + + @DynamicSerializeElement + @Transient + private Double satelliteClass; + + @DynamicSerializeElement + @Transient + private Double sgmtSzX; + + @DynamicSerializeElement + @Transient + private Double sgmtSzY; + + @DynamicSerializeElement + @Transient + private Integer satelliteInstr; + + @DynamicSerializeElement + @Transient + private Integer satelliteWindMethod; + + @DynamicSerializeElement + @Transient + private Double satelliteFreq; + + @DynamicSerializeElement + @Transient + private Double satelliteBandWidth; + + @DynamicSerializeElement + @Transient + private Double coldestTemp; + + @DynamicSerializeElement + @Transient + private Integer heightMethod; + + @DynamicSerializeElement + @Transient + private Integer tracerCorrelation; + + @DynamicSerializeElement + @Transient + private Integer landSea; + + @DynamicSerializeElement + @Transient + private Double satelliteZenith; + + @DynamicSerializeElement + @Transient + private Integer firstGuess; + + @DynamicSerializeElement + @Transient + private Integer timeSignificance; + + /** + * Empty constructor. + */ + public BufrHDWObs() { + } + + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public BufrHDWObs(String uri) { + super(uri); + } + + /** + * Get the observation time for this data. + * + * @return The data observation time. + */ + public Calendar getValidTime() { + return validTime; + } + + /** + * Set the observation time for this data. + * + * @param timeObs + * The data observation time. + */ + public void setValidTime(Calendar time) { + validTime = time; + } + + /** + * @return the satType + */ + public String getSatType() { + return satType; + } + + /** + * @param satType + * the satType to set + */ + public void setSatType(String type) { + satType = type; + } + + /** + * @param satType + * the satType to set + */ + public void setSatType(BUFRHDWSatType type) { + satType = type.toString(); + } + + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } + + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * @return the windDir + */ + public Double getWindDir() { + return windDir; + } + + /** + * @param windDir + * the windDir to set + */ + public void setWindDir(Double direction) { + windDir = direction; + } + + /** + * @return the windSpd + */ + public Double getWindSpd() { + return windSpd; + } + + /** + * @param windSpd + * the windSpd to set + */ + public void setWindSpd(Double speed) { + windSpd = speed; + } + + /** + * @return the pressure + */ + public Double getPressure() { + return pressure; + } + + /** + * @param pressure + * the pressure to set + */ + public void setPressure(Double pressure) { + this.pressure = pressure; + } + + /** + * @return the satelliteID + */ + public Double getSatelliteID() { + return satelliteID; + } + + /** + * @param satelliteID + * the satelliteID to set + */ + public void setSatelliteID(Double satelliteID) { + this.satelliteID = satelliteID; + } + + /** + * @return the originatingID + */ + public Double getOriginatingID() { + return originatingID; + } + + /** + * @param originatingID + * the originatingID to set + */ + public void setOriginatingID(Double originatingID) { + this.originatingID = originatingID; + } + + /** + * @return the satelliteClass + */ + public Double getSatelliteClass() { + return satelliteClass; + } + + /** + * @param satelliteClass + * the satelliteClass to set + */ + public void setSatelliteClass(Double satelliteClass) { + this.satelliteClass = satelliteClass; + } + + /** + * @return the sgmtSzX + */ + public Double getSgmtSzX() { + return sgmtSzX; + } + + /** + * @param sgmtSzX + * the sgmtSzX to set + */ + public void setSgmtSzX(Double sgmtSzX) { + this.sgmtSzX = sgmtSzX; + } + + /** + * @return the sgmtSzY + */ + public Double getSgmtSzY() { + return sgmtSzY; + } + + /** + * @param sgmtSzY + * the sgmtSzY to set + */ + public void setSgmtSzY(Double sgmtSzY) { + this.sgmtSzY = sgmtSzY; + } + + /** + * @return the satelliteInstr + */ + public Integer getSatelliteInstr() { + return satelliteInstr; + } + + /** + * @param satelliteInstr + * the satelliteInstr to set + */ + public void setSatelliteInstr(Integer satelliteInstr) { + this.satelliteInstr = satelliteInstr; + } + + /** + * @return the satelliteWindMethod + */ + public Integer getSatelliteWindMethod() { + return satelliteWindMethod; + } + + /** + * @param satelliteWindMethod + * the satelliteWindMethod to set + */ + public void setSatelliteWindMethod(Integer satelliteWindMethod) { + this.satelliteWindMethod = satelliteWindMethod; + } + + /** + * @return the satelliteFreq + */ + public Double getSatelliteFreq() { + return satelliteFreq; + } + + /** + * @param satelliteFreq + * the satelliteFreq to set + */ + public void setSatelliteFreq(Double satelliteFreq) { + this.satelliteFreq = satelliteFreq; + } + + /** + * @return the satelliteBandWidth + */ + public Double getSatelliteBandWidth() { + return satelliteBandWidth; + } + + /** + * @param satelliteBandWidth + * the satelliteBandWidth to set + */ + public void setSatelliteBandWidth(Double satelliteBandWidth) { + this.satelliteBandWidth = satelliteBandWidth; + } + + /** + * @return the coldestTemp + */ + public Double getColdestTemp() { + return coldestTemp; + } + + /** + * @param coldestTemp + * the coldestTemp to set + */ + public void setColdestTemp(Double coldestTemp) { + this.coldestTemp = coldestTemp; + } + + /** + * @return the heightMethod + */ + public Integer getHeightMethod() { + return heightMethod; + } + + /** + * @param heightMethod + * the heightMethod to set + */ + public void setHeightMethod(Integer heightMethod) { + this.heightMethod = heightMethod; + } + + /** + * @return the tracerCorrelation + */ + public Integer getTracerCorrelation() { + return tracerCorrelation; + } + + /** + * @param tracerCorrelation + * the tracerCorrelation to set + */ + public void setTracerCorrelation(Integer tracerCorrelation) { + this.tracerCorrelation = tracerCorrelation; + } + + /** + * @return the landSea + */ + public Integer getLandSea() { + return landSea; + } + + /** + * @param landSea + * the landSea to set + */ + public void setLandSea(Integer landSea) { + this.landSea = landSea; + } + + /** + * @return the satelliteZenith + */ + public Double getSatelliteZenith() { + return satelliteZenith; + } + + /** + * @param satelliteZenith + * the satelliteZenith to set + */ + public void setSatelliteZenith(Double satelliteZenith) { + this.satelliteZenith = satelliteZenith; + } + + /** + * @return the firstGuess + */ + public Integer getFirstGuess() { + return firstGuess; + } + + /** + * @param firstGuess + * the firstGuess to set + */ + public void setFirstGuess(Integer firstGuess) { + this.firstGuess = firstGuess; + } + + /** + * @return the timeSignificance + */ + public Integer getTimeSignificance() { + return timeSignificance; + } + + /** + * @param timeSignificance + * the timeSignificance to set + */ + public void setTimeSignificance(Integer timeSignificance) { + this.timeSignificance = timeSignificance; + } + + @Override + public ISpatialObject getSpatialObject() { + return null; + } + + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - /** - * Returns the hashCode for this object. This implementation returns the - * hashCode of the generated dataURI. - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); - return result; - } + /** + * Returns the hashCode for this object. This implementation returns the + * hashCode of the generated dataURI. + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); + return result; + } - /** - * Checks if this record is equal to another by checking the generated - * dataURI. - * - * @param obj - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - BufrHDWObs other = (BufrHDWObs) obj; - if (getDataURI() == null) { - if (other.getDataURI() != null) { - return false; - } - } else if (!getDataURI().equals(other.getDataURI())) { - return false; - } - return true; - } + /** + * Checks if this record is equal to another by checking the generated + * dataURI. + * + * @param obj + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + BufrHDWObs other = (BufrHDWObs) obj; + if (getDataURI() == null) { + if (other.getDataURI() != null) { + return false; + } + } else if (!getDataURI().equals(other.getDataURI())) { + return false; + } + return true; + } + @Override + public String getPluginName() { + return "bufrhdw"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrmthdw/src/com/raytheon/uf/common/dataplugin/bufrmthdw/BufrMTHDWObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrmthdw/src/com/raytheon/uf/common/dataplugin/bufrmthdw/BufrMTHDWObs.java index 70694a43fe..967b670180 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrmthdw/src/com/raytheon/uf/common/dataplugin/bufrmthdw/BufrMTHDWObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrmthdw/src/com/raytheon/uf/common/dataplugin/bufrmthdw/BufrMTHDWObs.java @@ -59,6 +59,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * PluginDataObject. * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -73,557 +74,557 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrmthdw", - indexes = { - @Index(name = "bufrmthdw_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrmthdw", indexes = { @Index(name = "bufrmthdw_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class BufrMTHDWObs extends PersistablePluginDataObject implements ISpatialEnabled, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // The observation time. - @DataURI(position = 1) - @DynamicSerializeElement - private String satType; - - @DataURI(position = 2) - @DynamicSerializeElement - private Double pressure; - - @Embedded - @DataURI(position = 3, embedded = true) - @DynamicSerializeElement - private SurfaceObsLocation location; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - // Text of the WMO header - @Column(length = 32) - @DynamicSerializeElement - private String wmoHeader; - - // The observation time. - @Column - @DynamicSerializeElement - private Calendar validTime; - - @DynamicSerializeElement - @Transient - private Double windDir; - - @DynamicSerializeElement - @Transient - private Double windSpd; - - @DynamicSerializeElement - @Transient - private Double satelliteID; - - @DynamicSerializeElement - @Transient - private Double originatingID; - - @DynamicSerializeElement - @Transient - private Double satelliteClass; - - @DynamicSerializeElement - @Transient - private Double sgmtSzX; - - @DynamicSerializeElement - @Transient - private Double sgmtSzY; - - @DynamicSerializeElement - @Transient - private Integer satelliteInstr; - - @DynamicSerializeElement - @Transient - private Integer satelliteWindMethod; - - @DynamicSerializeElement - @Transient - private Double satelliteFreq; - - @DynamicSerializeElement - @Transient - private Double satelliteBandWidth; - - @DynamicSerializeElement - @Transient - private Double coldestTemp; - - @DynamicSerializeElement - @Transient - private Integer heightMethod; - - @DynamicSerializeElement - @Transient - private Integer tracerCorrelation; - - @DynamicSerializeElement - @Transient - private Integer landSea; - - @DynamicSerializeElement - @Transient - private Double satelliteZenith; - - @DynamicSerializeElement - @Transient - private Integer firstGuess; - - @DynamicSerializeElement - @Transient - private Integer timeSignificance; - - /** - * Empty constructor. - */ - public BufrMTHDWObs() { - } - - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public BufrMTHDWObs(String uri) { - super(uri); - } - - /** - * Get the observation time for this data. - * - * @return The data observation time. - */ - public Calendar getValidTime() { - return validTime; - } - - /** - * Set the observation time for this data. - * - * @param timeObs - * The data observation time. - */ - public void setValidTime(Calendar time) { - validTime = time; - } - - /** - * @return the satType - */ - public String getSatType() { - return satType; - } - - /** - * @param satType - * the satType to set - */ - public void setSatType(String type) { - satType = type; - } - - /** - * @param satType - * the satType to set - */ - public void setSatType(BUFRMTHDWSatType type) { - satType = type.toString(); - } - - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } - - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * @return the windDir - */ - public Double getWindDir() { - return windDir; - } - - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(Double direction) { - windDir = direction; - } - - /** - * @return the windSpd - */ - public Double getWindSpd() { - return windSpd; - } - - /** - * @param windSpd - * the windSpd to set - */ - public void setWindSpd(Double speed) { - windSpd = speed; - } - - /** - * @return the pressure - */ - public Double getPressure() { - return pressure; - } - - /** - * @param pressure - * the pressure to set - */ - public void setPressure(Double pressure) { - this.pressure = pressure; - } - - /** - * @return the satelliteID - */ - public Double getSatelliteID() { - return satelliteID; - } - - /** - * @param satelliteID - * the satelliteID to set - */ - public void setSatelliteID(Double satelliteID) { - this.satelliteID = satelliteID; - } - - /** - * @return the originatingID - */ - public Double getOriginatingID() { - return originatingID; - } - - /** - * @param originatingID - * the originatingID to set - */ - public void setOriginatingID(Double originatingID) { - this.originatingID = originatingID; - } - - /** - * @return the satelliteClass - */ - public Double getSatelliteClass() { - return satelliteClass; - } - - /** - * @param satelliteClass - * the satelliteClass to set - */ - public void setSatelliteClass(Double satelliteClass) { - this.satelliteClass = satelliteClass; - } - - /** - * @return the sgmtSzX - */ - public Double getSgmtSzX() { - return sgmtSzX; - } - - /** - * @param sgmtSzX - * the sgmtSzX to set - */ - public void setSgmtSzX(Double sgmtSzX) { - this.sgmtSzX = sgmtSzX; - } - - /** - * @return the sgmtSzY - */ - public Double getSgmtSzY() { - return sgmtSzY; - } - - /** - * @param sgmtSzY - * the sgmtSzY to set - */ - public void setSgmtSzY(Double sgmtSzY) { - this.sgmtSzY = sgmtSzY; - } - - /** - * @return the satelliteInstr - */ - public Integer getSatelliteInstr() { - return satelliteInstr; - } - - /** - * @param satelliteInstr - * the satelliteInstr to set - */ - public void setSatelliteInstr(Integer satelliteInstr) { - this.satelliteInstr = satelliteInstr; - } - - /** - * @return the satelliteWindMethod - */ - public Integer getSatelliteWindMethod() { - return satelliteWindMethod; - } - - /** - * @param satelliteWindMethod - * the satelliteWindMethod to set - */ - public void setSatelliteWindMethod(Integer satelliteWindMethod) { - this.satelliteWindMethod = satelliteWindMethod; - } - - /** - * @return the satelliteFreq - */ - public Double getSatelliteFreq() { - return satelliteFreq; - } - - /** - * @param satelliteFreq - * the satelliteFreq to set - */ - public void setSatelliteFreq(Double satelliteFreq) { - this.satelliteFreq = satelliteFreq; - } - - /** - * @return the satelliteBandWidth - */ - public Double getSatelliteBandWidth() { - return satelliteBandWidth; - } - - /** - * @param satelliteBandWidth - * the satelliteBandWidth to set - */ - public void setSatelliteBandWidth(Double satelliteBandWidth) { - this.satelliteBandWidth = satelliteBandWidth; - } - - /** - * @return the coldestTemp - */ - public Double getColdestTemp() { - return coldestTemp; - } - - /** - * @param coldestTemp - * the coldestTemp to set - */ - public void setColdestTemp(Double coldestTemp) { - this.coldestTemp = coldestTemp; - } - - /** - * @return the heightMethod - */ - public Integer getHeightMethod() { - return heightMethod; - } - - /** - * @param heightMethod - * the heightMethod to set - */ - public void setHeightMethod(Integer heightMethod) { - this.heightMethod = heightMethod; - } - - /** - * @return the tracerCorrelation - */ - public Integer getTracerCorrelation() { - return tracerCorrelation; - } - - /** - * @param tracerCorrelation - * the tracerCorrelation to set - */ - public void setTracerCorrelation(Integer tracerCorrelation) { - this.tracerCorrelation = tracerCorrelation; - } - - /** - * @return the landSea - */ - public Integer getLandSea() { - return landSea; - } - - /** - * @param landSea - * the landSea to set - */ - public void setLandSea(Integer landSea) { - this.landSea = landSea; - } - - /** - * @return the satelliteZenith - */ - public Double getSatelliteZenith() { - return satelliteZenith; - } - - /** - * @param satelliteZenith - * the satelliteZenith to set - */ - public void setSatelliteZenith(Double satelliteZenith) { - this.satelliteZenith = satelliteZenith; - } - - /** - * @return the firstGuess - */ - public Integer getFirstGuess() { - return firstGuess; - } - - /** - * @param firstGuess - * the firstGuess to set - */ - public void setFirstGuess(Integer firstGuess) { - this.firstGuess = firstGuess; - } - - /** - * @return the timeSignificance - */ - public Integer getTimeSignificance() { - return timeSignificance; - } - - /** - * @param timeSignificance - * the timeSignificance to set - */ - public void setTimeSignificance(Integer timeSignificance) { - this.timeSignificance = timeSignificance; - } - - @Override - public ISpatialObject getSpatialObject() { - return null; - } - - /** + // The observation time. + @DataURI(position = 1) + @DynamicSerializeElement + private String satType; + + @DataURI(position = 2) + @DynamicSerializeElement + private Double pressure; + + @Embedded + @DataURI(position = 3, embedded = true) + @DynamicSerializeElement + private SurfaceObsLocation location; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + // Text of the WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; + + // The observation time. + @Column + @DynamicSerializeElement + private Calendar validTime; + + @DynamicSerializeElement + @Transient + private Double windDir; + + @DynamicSerializeElement + @Transient + private Double windSpd; + + @DynamicSerializeElement + @Transient + private Double satelliteID; + + @DynamicSerializeElement + @Transient + private Double originatingID; + + @DynamicSerializeElement + @Transient + private Double satelliteClass; + + @DynamicSerializeElement + @Transient + private Double sgmtSzX; + + @DynamicSerializeElement + @Transient + private Double sgmtSzY; + + @DynamicSerializeElement + @Transient + private Integer satelliteInstr; + + @DynamicSerializeElement + @Transient + private Integer satelliteWindMethod; + + @DynamicSerializeElement + @Transient + private Double satelliteFreq; + + @DynamicSerializeElement + @Transient + private Double satelliteBandWidth; + + @DynamicSerializeElement + @Transient + private Double coldestTemp; + + @DynamicSerializeElement + @Transient + private Integer heightMethod; + + @DynamicSerializeElement + @Transient + private Integer tracerCorrelation; + + @DynamicSerializeElement + @Transient + private Integer landSea; + + @DynamicSerializeElement + @Transient + private Double satelliteZenith; + + @DynamicSerializeElement + @Transient + private Integer firstGuess; + + @DynamicSerializeElement + @Transient + private Integer timeSignificance; + + /** + * Empty constructor. + */ + public BufrMTHDWObs() { + } + + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public BufrMTHDWObs(String uri) { + super(uri); + } + + /** + * Get the observation time for this data. + * + * @return The data observation time. + */ + public Calendar getValidTime() { + return validTime; + } + + /** + * Set the observation time for this data. + * + * @param timeObs + * The data observation time. + */ + public void setValidTime(Calendar time) { + validTime = time; + } + + /** + * @return the satType + */ + public String getSatType() { + return satType; + } + + /** + * @param satType + * the satType to set + */ + public void setSatType(String type) { + satType = type; + } + + /** + * @param satType + * the satType to set + */ + public void setSatType(BUFRMTHDWSatType type) { + satType = type.toString(); + } + + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } + + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * @return the windDir + */ + public Double getWindDir() { + return windDir; + } + + /** + * @param windDir + * the windDir to set + */ + public void setWindDir(Double direction) { + windDir = direction; + } + + /** + * @return the windSpd + */ + public Double getWindSpd() { + return windSpd; + } + + /** + * @param windSpd + * the windSpd to set + */ + public void setWindSpd(Double speed) { + windSpd = speed; + } + + /** + * @return the pressure + */ + public Double getPressure() { + return pressure; + } + + /** + * @param pressure + * the pressure to set + */ + public void setPressure(Double pressure) { + this.pressure = pressure; + } + + /** + * @return the satelliteID + */ + public Double getSatelliteID() { + return satelliteID; + } + + /** + * @param satelliteID + * the satelliteID to set + */ + public void setSatelliteID(Double satelliteID) { + this.satelliteID = satelliteID; + } + + /** + * @return the originatingID + */ + public Double getOriginatingID() { + return originatingID; + } + + /** + * @param originatingID + * the originatingID to set + */ + public void setOriginatingID(Double originatingID) { + this.originatingID = originatingID; + } + + /** + * @return the satelliteClass + */ + public Double getSatelliteClass() { + return satelliteClass; + } + + /** + * @param satelliteClass + * the satelliteClass to set + */ + public void setSatelliteClass(Double satelliteClass) { + this.satelliteClass = satelliteClass; + } + + /** + * @return the sgmtSzX + */ + public Double getSgmtSzX() { + return sgmtSzX; + } + + /** + * @param sgmtSzX + * the sgmtSzX to set + */ + public void setSgmtSzX(Double sgmtSzX) { + this.sgmtSzX = sgmtSzX; + } + + /** + * @return the sgmtSzY + */ + public Double getSgmtSzY() { + return sgmtSzY; + } + + /** + * @param sgmtSzY + * the sgmtSzY to set + */ + public void setSgmtSzY(Double sgmtSzY) { + this.sgmtSzY = sgmtSzY; + } + + /** + * @return the satelliteInstr + */ + public Integer getSatelliteInstr() { + return satelliteInstr; + } + + /** + * @param satelliteInstr + * the satelliteInstr to set + */ + public void setSatelliteInstr(Integer satelliteInstr) { + this.satelliteInstr = satelliteInstr; + } + + /** + * @return the satelliteWindMethod + */ + public Integer getSatelliteWindMethod() { + return satelliteWindMethod; + } + + /** + * @param satelliteWindMethod + * the satelliteWindMethod to set + */ + public void setSatelliteWindMethod(Integer satelliteWindMethod) { + this.satelliteWindMethod = satelliteWindMethod; + } + + /** + * @return the satelliteFreq + */ + public Double getSatelliteFreq() { + return satelliteFreq; + } + + /** + * @param satelliteFreq + * the satelliteFreq to set + */ + public void setSatelliteFreq(Double satelliteFreq) { + this.satelliteFreq = satelliteFreq; + } + + /** + * @return the satelliteBandWidth + */ + public Double getSatelliteBandWidth() { + return satelliteBandWidth; + } + + /** + * @param satelliteBandWidth + * the satelliteBandWidth to set + */ + public void setSatelliteBandWidth(Double satelliteBandWidth) { + this.satelliteBandWidth = satelliteBandWidth; + } + + /** + * @return the coldestTemp + */ + public Double getColdestTemp() { + return coldestTemp; + } + + /** + * @param coldestTemp + * the coldestTemp to set + */ + public void setColdestTemp(Double coldestTemp) { + this.coldestTemp = coldestTemp; + } + + /** + * @return the heightMethod + */ + public Integer getHeightMethod() { + return heightMethod; + } + + /** + * @param heightMethod + * the heightMethod to set + */ + public void setHeightMethod(Integer heightMethod) { + this.heightMethod = heightMethod; + } + + /** + * @return the tracerCorrelation + */ + public Integer getTracerCorrelation() { + return tracerCorrelation; + } + + /** + * @param tracerCorrelation + * the tracerCorrelation to set + */ + public void setTracerCorrelation(Integer tracerCorrelation) { + this.tracerCorrelation = tracerCorrelation; + } + + /** + * @return the landSea + */ + public Integer getLandSea() { + return landSea; + } + + /** + * @param landSea + * the landSea to set + */ + public void setLandSea(Integer landSea) { + this.landSea = landSea; + } + + /** + * @return the satelliteZenith + */ + public Double getSatelliteZenith() { + return satelliteZenith; + } + + /** + * @param satelliteZenith + * the satelliteZenith to set + */ + public void setSatelliteZenith(Double satelliteZenith) { + this.satelliteZenith = satelliteZenith; + } + + /** + * @return the firstGuess + */ + public Integer getFirstGuess() { + return firstGuess; + } + + /** + * @param firstGuess + * the firstGuess to set + */ + public void setFirstGuess(Integer firstGuess) { + this.firstGuess = firstGuess; + } + + /** + * @return the timeSignificance + */ + public Integer getTimeSignificance() { + return timeSignificance; + } + + /** + * @param timeSignificance + * the timeSignificance to set + */ + public void setTimeSignificance(Integer timeSignificance) { + this.timeSignificance = timeSignificance; + } + + @Override + public ISpatialObject getSpatialObject() { + return null; + } + + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - /** - * Returns the hashCode for this object. This implementation returns the - * hashCode of the generated dataURI. - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); - return result; - } + /** + * Returns the hashCode for this object. This implementation returns the + * hashCode of the generated dataURI. + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); + return result; + } - /** - * Checks if this record is equal to another by checking the generated - * dataURI. - * - * @param obj - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - BufrMTHDWObs other = (BufrMTHDWObs) obj; - if (getDataURI() == null) { - if (other.getDataURI() != null) { - return false; - } - } else if (!getDataURI().equals(other.getDataURI())) { - return false; - } - return true; - } + /** + * Checks if this record is equal to another by checking the generated + * dataURI. + * + * @param obj + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + BufrMTHDWObs other = (BufrMTHDWObs) obj; + if (getDataURI() == null) { + if (other.getDataURI() != null) { + return false; + } + } else if (!getDataURI().equals(other.getDataURI())) { + return false; + } + return true; + } + @Override + public String getPluginName() { + return "bufrmthdw"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrncwf/src/com/raytheon/uf/common/dataplugin/ncwf/BUFRncwf.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrncwf/src/com/raytheon/uf/common/dataplugin/ncwf/BUFRncwf.java index 6c27068227..a81679b54d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrncwf/src/com/raytheon/uf/common/dataplugin/ncwf/BUFRncwf.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrncwf/src/com/raytheon/uf/common/dataplugin/ncwf/BUFRncwf.java @@ -60,10 +60,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 17, 2009 jkorman Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * 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 * * * @@ -77,213 +79,215 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrncwf", - indexes = { - @Index(name = "bufrncwf_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrncwf", indexes = { @Index(name = "bufrncwf_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class BUFRncwf extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - @Embedded - @DataURI(position = 1, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 1, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - @Transient - @XmlElement - @DynamicSerializeElement - private NCWFFeature detection; + @Transient + @XmlElement + @DynamicSerializeElement + private NCWFFeature detection; - @Transient - @XmlElement - @DynamicSerializeElement - private NCWFFeature forecast; + @Transient + @XmlElement + @DynamicSerializeElement + private NCWFFeature forecast; - @Transient - @XmlAttribute - @DynamicSerializeElement - private Double stormDir; + @Transient + @XmlAttribute + @DynamicSerializeElement + private Double stormDir; - @Transient - @XmlAttribute - @DynamicSerializeElement - private Double stormSpeed; + @Transient + @XmlAttribute + @DynamicSerializeElement + private Double stormSpeed; - @Transient - @XmlAttribute - @DynamicSerializeElement - private Double stormTop; + @Transient + @XmlAttribute + @DynamicSerializeElement + private Double stormTop; - /** - * Empty constructor. - */ - public BUFRncwf() { - } + /** + * Empty constructor. + */ + public BUFRncwf() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public BUFRncwf(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public BUFRncwf(String uri) { + super(uri); + } - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** - * @return the detection - */ - public NCWFFeature getDetection() { - return detection; - } + /** + * @return the detection + */ + public NCWFFeature getDetection() { + return detection; + } - /** - * @param detection - * the detection to set - */ - public void setDetection(NCWFFeature detection) { - this.detection = detection; - } + /** + * @param detection + * the detection to set + */ + public void setDetection(NCWFFeature detection) { + this.detection = detection; + } - /** - * @return the forecast - */ - public NCWFFeature getForecast() { - return forecast; - } + /** + * @return the forecast + */ + public NCWFFeature getForecast() { + return forecast; + } - /** - * @param forecast - * the forecast to set - */ - public void setForecast(NCWFFeature forecast) { - this.forecast = forecast; - } + /** + * @param forecast + * the forecast to set + */ + public void setForecast(NCWFFeature forecast) { + this.forecast = forecast; + } - /** - * @return the stormDir - */ - public Double getStormDir() { - return stormDir; - } + /** + * @return the stormDir + */ + public Double getStormDir() { + return stormDir; + } - /** - * @param stormDir - * the stormDir to set - */ - public void setStormDir(Double stormDir) { - this.stormDir = stormDir; - } + /** + * @param stormDir + * the stormDir to set + */ + public void setStormDir(Double stormDir) { + this.stormDir = stormDir; + } - /** - * @return the stormSpeed - */ - public Double getStormSpeed() { - return stormSpeed; - } + /** + * @return the stormSpeed + */ + public Double getStormSpeed() { + return stormSpeed; + } - /** - * @param stormSpeed - * the stormSpeed to set - */ - public void setStormSpeed(Double stormSpeed) { - this.stormSpeed = stormSpeed; - } + /** + * @param stormSpeed + * the stormSpeed to set + */ + public void setStormSpeed(Double stormSpeed) { + this.stormSpeed = stormSpeed; + } - /** - * @return the stormTop - */ - public Double getStormTop() { - return stormTop; - } + /** + * @return the stormTop + */ + public Double getStormTop() { + return stormTop; + } - /** - * @param stormTop - * the stormTop to set - */ - public void setStormTop(Double stormTop) { - this.stormTop = stormTop; - } + /** + * @param stormTop + * the stormTop to set + */ + public void setStormTop(Double stormTop) { + this.stormTop = stormTop; + } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } - @Override - public ISpatialObject getSpatialObject() { - return location; - } + @Override + public ISpatialObject getSpatialObject() { + return location; + } - @Override - public String getString(String paramName) { - return null; - } + @Override + public String getString(String paramName) { + return null; + } - @Override - public String[] getStrings(String paramName) { - return null; - } + @Override + public String[] getStrings(String paramName) { + return null; + } - @Override - public Amount getValue(String paramName) { - return null; - } + @Override + public Amount getValue(String paramName) { + return null; + } - @Override - public Collection getValues(String paramName) { - return null; - } + @Override + public Collection getValues(String paramName) { + return null; + } - /** + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "bufrncwf"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrquikscat/src/com/raytheon/uf/common/dataplugin/bufrquikscat/QUIKScatObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrquikscat/src/com/raytheon/uf/common/dataplugin/bufrquikscat/QUIKScatObs.java index 6f1637c721..2463ebf132 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrquikscat/src/com/raytheon/uf/common/dataplugin/bufrquikscat/QUIKScatObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrquikscat/src/com/raytheon/uf/common/dataplugin/bufrquikscat/QUIKScatObs.java @@ -61,11 +61,13 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jun 18, 2009 2520 jkorman Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Jun 18, 2009 2520 jkorman Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -79,324 +81,326 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrquikscat", - indexes = { - @Index(name = "bufrquikscat_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrquikscat", indexes = { @Index(name = "bufrquikscat_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class QUIKScatObs extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - @DataURI(position = 1) - @XmlAttribute - @DynamicSerializeElement - private Integer satId; + @DataURI(position = 1) + @XmlAttribute + @DynamicSerializeElement + private Integer satId; - @Embedded - @DataURI(position = 2, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 2, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - // Text of the WMO header - @Column(length = 32) - @DynamicSerializeElement - @XmlElement - private String wmoHeader; + // Text of the WMO header + @Column(length = 32) + @DynamicSerializeElement + @XmlElement + private String wmoHeader; - @XmlAttribute - @DynamicSerializeElement - @Transient - private Integer orbitNumber; + @XmlAttribute + @DynamicSerializeElement + @Transient + private Integer orbitNumber; - // The observation time. - @XmlAttribute - @DynamicSerializeElement - @Transient - private Calendar timeObs; + // The observation time. + @XmlAttribute + @DynamicSerializeElement + @Transient + private Calendar timeObs; - @XmlAttribute - @DynamicSerializeElement - @Transient - private Double windDir; + @XmlAttribute + @DynamicSerializeElement + @Transient + private Double windDir; - @XmlAttribute - @DynamicSerializeElement - @Transient - private Double windSpd; + @XmlAttribute + @DynamicSerializeElement + @Transient + private Double windSpd; - @XmlAttribute - @DynamicSerializeElement - @Transient - private Double probRain; + @XmlAttribute + @DynamicSerializeElement + @Transient + private Double probRain; - @XmlAttribute - @DynamicSerializeElement - @Transient - private Integer rainIndex; + @XmlAttribute + @DynamicSerializeElement + @Transient + private Integer rainIndex; - /** - * Empty constructor. - */ - public QUIKScatObs() { - } + /** + * Empty constructor. + */ + public QUIKScatObs() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public QUIKScatObs(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public QUIKScatObs(String uri) { + super(uri); + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Was this location defined from the station catalog? False if not. - * - * @return Was this location defined from the station catalog? - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Was this location defined from the station catalog? False if not. + * + * @return Was this location defined from the station catalog? + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** - * @return the satId - */ - public Integer getSatId() { - return satId; - } + /** + * @return the satId + */ + public Integer getSatId() { + return satId; + } - /** - * @param satId - * the satId to set - */ - public void setSatId(Integer satId) { - this.satId = satId; - } + /** + * @param satId + * the satId to set + */ + public void setSatId(Integer satId) { + this.satId = satId; + } - /** - * @return the orbitNumber - */ - public Integer getOrbitNumber() { - return orbitNumber; - } + /** + * @return the orbitNumber + */ + public Integer getOrbitNumber() { + return orbitNumber; + } - /** - * @param orbitNumber - * the orbitNumber to set - */ - public void setOrbitNumber(Integer orbitNumber) { - this.orbitNumber = orbitNumber; - } + /** + * @param orbitNumber + * the orbitNumber to set + */ + public void setOrbitNumber(Integer orbitNumber) { + this.orbitNumber = orbitNumber; + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @return the windDir - */ - public Double getWindDir() { - return windDir; - } + /** + * @return the windDir + */ + public Double getWindDir() { + return windDir; + } - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(Double windDir) { - this.windDir = windDir; - } + /** + * @param windDir + * the windDir to set + */ + public void setWindDir(Double windDir) { + this.windDir = windDir; + } - /** - * @return the windSpd - */ - public Double getWindSpd() { - return windSpd; - } + /** + * @return the windSpd + */ + public Double getWindSpd() { + return windSpd; + } - /** - * @param windSpd - * the windSpd to set - */ - public void setWindSpd(Double windSpd) { - this.windSpd = windSpd; - } + /** + * @param windSpd + * the windSpd to set + */ + public void setWindSpd(Double windSpd) { + this.windSpd = windSpd; + } - /** - * @return the probRain - */ - public Double getProbRain() { - return probRain; - } + /** + * @return the probRain + */ + public Double getProbRain() { + return probRain; + } - /** - * @param probRain - * the probRain to set - */ - public void setProbRain(Double probRain) { - this.probRain = probRain; - } + /** + * @param probRain + * the probRain to set + */ + public void setProbRain(Double probRain) { + this.probRain = probRain; + } - /** - * @return the rainIndex - */ - public Integer getRainIndex() { - return rainIndex; - } + /** + * @return the rainIndex + */ + public Integer getRainIndex() { + return rainIndex; + } - /** - * @param rainIndex - * the rainIndex to set - */ - public void setRainIndex(Integer rainIndex) { - this.rainIndex = rainIndex; - } + /** + * @param rainIndex + * the rainIndex to set + */ + public void setRainIndex(Integer rainIndex) { + this.rainIndex = rainIndex; + } - /** - * Get the observation time for this data. - * - * @return The data observation time. - */ - public Calendar getTimeObs() { - return timeObs; - } + /** + * Get the observation time for this data. + * + * @return The data observation time. + */ + public Calendar getTimeObs() { + return timeObs; + } - /** - * Set the observation time for this data. - * - * @param timeObs - * The data observation time. - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } + /** + * Set the observation time for this data. + * + * @param timeObs + * The data observation time. + */ + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } - @Override - public ISpatialObject getSpatialObject() { - return location; - } + @Override + public ISpatialObject getSpatialObject() { + return location; + } - @Override - public String getString(String paramName) { - return null; - } + @Override + public String getString(String paramName) { + return null; + } - @Override - public String[] getStrings(String paramName) { - return null; - } + @Override + public String[] getStrings(String paramName) { + return null; + } - @Override - public Amount getValue(String paramName) { - return null; - } + @Override + public Amount getValue(String paramName) { + return null; + } - @Override - public Collection getValues(String paramName) { - return null; - } + @Override + public Collection getValues(String paramName) { + return null; + } - /** + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "bufrquikscat"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrsigwx/src/com/raytheon/uf/common/dataplugin/bufrsigwx/SigWxData.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrsigwx/src/com/raytheon/uf/common/dataplugin/bufrsigwx/SigWxData.java index 86c66ac5ff..054de56379 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrsigwx/src/com/raytheon/uf/common/dataplugin/bufrsigwx/SigWxData.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrsigwx/src/com/raytheon/uf/common/dataplugin/bufrsigwx/SigWxData.java @@ -60,10 +60,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jun 18, 2009 jkorman Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * 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 * * * @@ -77,250 +79,251 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrsigwx", - indexes = { - @Index(name = "bufrswigwx_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrsigwx", indexes = { @Index(name = "bufrswigwx_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) public class SigWxData extends PersistablePluginDataObject implements - IDecoderGettable, IPointData, IPersistable { + IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Column - @DataURI(position = 1) - @XmlElement - @DynamicSerializeElement - private SigWxLayer wxLayer; + @Column + @DataURI(position = 1) + @XmlElement + @DynamicSerializeElement + private SigWxLayer wxLayer; - @Column - @DataURI(position = 2) - @XmlElement - @DynamicSerializeElement - private SigWxType wxType; + @Column + @DataURI(position = 2) + @XmlElement + @DynamicSerializeElement + private SigWxType wxType; - @Column - @DataURI(position = 3) - @XmlAttribute - @DynamicSerializeElement - private Integer key; + @Column + @DataURI(position = 3) + @XmlAttribute + @DynamicSerializeElement + private Integer key; - @Column - @XmlAttribute - @DynamicSerializeElement - private Integer baseHeight; + @Column + @XmlAttribute + @DynamicSerializeElement + private Integer baseHeight; - @Column - @XmlAttribute - @DynamicSerializeElement - private Integer topHeight; + @Column + @XmlAttribute + @DynamicSerializeElement + private Integer topHeight; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @Column(length = 32) - @DynamicSerializeElement - @XmlElement - private String wmoHeader; + // Text of the WMO header + @Column(length = 32) + @DynamicSerializeElement + @XmlElement + private String wmoHeader; - @Transient - @DynamicSerializeElement - @XmlElement - private TropopauseLayerData tropData; + @Transient + @DynamicSerializeElement + @XmlElement + private TropopauseLayerData tropData; - /** - * Empty constructor. - */ - public SigWxData() { - } + /** + * Empty constructor. + */ + public SigWxData() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public SigWxData(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public SigWxData(String uri) { + super(uri); + } - /** - * @return the wxLayer - */ - public SigWxLayer getWxLayer() { - return wxLayer; - } + /** + * @return the wxLayer + */ + public SigWxLayer getWxLayer() { + return wxLayer; + } - /** - * @param wxLayer - * the wxLayer to set - */ - public void setWxLayer(SigWxLayer wxLayer) { - this.wxLayer = wxLayer; - } + /** + * @param wxLayer + * the wxLayer to set + */ + public void setWxLayer(SigWxLayer wxLayer) { + this.wxLayer = wxLayer; + } - /** - * @return the wxType - */ - public SigWxType getWxType() { - return wxType; - } + /** + * @return the wxType + */ + public SigWxType getWxType() { + return wxType; + } - /** - * @param wxType - * the wxType to set - */ - public void setWxType(SigWxType wxType) { - this.wxType = wxType; - } + /** + * @param wxType + * the wxType to set + */ + public void setWxType(SigWxType wxType) { + this.wxType = wxType; + } - /** - * @return the baseHeight - */ - public Integer getBaseHeight() { - return baseHeight; - } + /** + * @return the baseHeight + */ + public Integer getBaseHeight() { + return baseHeight; + } - /** - * @param baseHeight - * the baseHeight to set - */ - public void setBaseHeight(Integer baseHeight) { - this.baseHeight = baseHeight; - } + /** + * @param baseHeight + * the baseHeight to set + */ + public void setBaseHeight(Integer baseHeight) { + this.baseHeight = baseHeight; + } - /** - * @return the topHeight - */ - public Integer getTopHeight() { - return topHeight; - } + /** + * @return the topHeight + */ + public Integer getTopHeight() { + return topHeight; + } - /** - * @param topHeight - * the topHeight to set - */ - public void setTopHeight(Integer topHeight) { - this.topHeight = topHeight; - } + /** + * @param topHeight + * the topHeight to set + */ + public void setTopHeight(Integer topHeight) { + this.topHeight = topHeight; + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @return the tropData - */ - public TropopauseLayerData getTropData() { - return tropData; - } + /** + * @return the tropData + */ + public TropopauseLayerData getTropData() { + return tropData; + } - /** - * @param tropData - * the tropData to set - */ - public void setTropData(TropopauseLayerData tropData) { - this.tropData = tropData; - } + /** + * @param tropData + * the tropData to set + */ + public void setTropData(TropopauseLayerData tropData) { + this.tropData = tropData; + } - /** - * @return the key - */ - public Integer getKey() { - return key; - } + /** + * @return the key + */ + public Integer getKey() { + return key; + } - /** - * @param key - * the key to set - */ - public void setKey(Integer key) { - this.key = key; - } + /** + * @param key + * the key to set + */ + public void setKey(Integer key) { + this.key = key; + } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } - @Override - public String getString(String paramName) { - return null; - } + @Override + public String getString(String paramName) { + return null; + } - @Override - public String[] getStrings(String paramName) { - return null; - } + @Override + public String[] getStrings(String paramName) { + return null; + } - @Override - public Amount getValue(String paramName) { - return null; - } + @Override + public Amount getValue(String paramName) { + return null; + } - @Override - public Collection getValues(String paramName) { - return null; - } + @Override + public Collection getValues(String paramName) { + return null; + } - /** + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - /** - * - * @return - */ - public final SigWxData copyObs() { - SigWxData obs = new SigWxData(); + /** + * + * @return + */ + public final SigWxData copyObs() { + SigWxData obs = new SigWxData(); - obs.dataTime = dataTime.clone(); - obs.pluginName = pluginName; + obs.dataTime = dataTime.clone(); - obs.baseHeight = baseHeight; - obs.topHeight = topHeight; - obs.wxLayer = wxLayer; - obs.wxType = wxType; - obs.wmoHeader = wmoHeader; + obs.baseHeight = baseHeight; + obs.topHeight = topHeight; + obs.wxLayer = wxLayer; + obs.wxType = wxType; + obs.wmoHeader = wmoHeader; + + return obs; + } - return obs; - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "bufrsigwx"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrssmi/src/com/raytheon/uf/common/dataplugin/bufrssmi/SSMIScanData.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrssmi/src/com/raytheon/uf/common/dataplugin/bufrssmi/SSMIScanData.java index 0ff6dd03bb..16eaed9154 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrssmi/src/com/raytheon/uf/common/dataplugin/bufrssmi/SSMIScanData.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrssmi/src/com/raytheon/uf/common/dataplugin/bufrssmi/SSMIScanData.java @@ -61,6 +61,7 @@ import com.vividsolutions.jts.geom.Geometry; * PluginDataObject. * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -75,300 +76,300 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrssmi", - indexes = { - @Index(name = "bufrssmi_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrssmi", indexes = { @Index(name = "bufrssmi_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class SSMIScanData extends PersistablePluginDataObject implements ISpatialEnabled, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @DataURI(position = 1) - @XmlAttribute - @DynamicSerializeElement - private Integer satId; + @DataURI(position = 1) + @XmlAttribute + @DynamicSerializeElement + private Integer satId; - @Embedded - @DataURI(position = 2, embedded = true) - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 2, embedded = true) + @DynamicSerializeElement + private SurfaceObsLocation location; - @DynamicSerializeElement - @Transient - private Integer orbitNumber; + @DynamicSerializeElement + @Transient + private Integer orbitNumber; - @DynamicSerializeElement - @Transient - private Integer scanNumber; + @DynamicSerializeElement + @Transient + private Integer scanNumber; - @DynamicSerializeElement - @Transient - private Integer posNumber; + @DynamicSerializeElement + @Transient + private Integer posNumber; - // The profiler observation time. - @Column - @DynamicSerializeElement - private Calendar timeObs; + // The profiler observation time. + @Column + @DynamicSerializeElement + private Calendar timeObs; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @Column(length = 32) - @DynamicSerializeElement - private String wmoHeader; + // Text of the WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; - /** - * Empty constructor. - */ - public SSMIScanData() { - } + /** + * Empty constructor. + */ + public SSMIScanData() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public SSMIScanData(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public SSMIScanData(String uri) { + super(uri); + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Was this location defined from the station catalog? False if not. - * - * @return Was this location defined from the station catalog? - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Was this location defined from the station catalog? False if not. + * + * @return Was this location defined from the station catalog? + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - /** - * @return the satId - */ - public Integer getSatId() { - return satId; - } + /** + * @return the satId + */ + public Integer getSatId() { + return satId; + } - /** - * @param satId - * the satId to set - */ - public void setSatId(Integer satId) { - this.satId = satId; - } + /** + * @param satId + * the satId to set + */ + public void setSatId(Integer satId) { + this.satId = satId; + } - /** - * @return the orbitNumber - */ - public Integer getOrbitNumber() { - return orbitNumber; - } + /** + * @return the orbitNumber + */ + public Integer getOrbitNumber() { + return orbitNumber; + } - /** - * @param orbitNumber - * the orbitNumber to set - */ - public void setOrbitNumber(Integer orbitNumber) { - this.orbitNumber = orbitNumber; - } + /** + * @param orbitNumber + * the orbitNumber to set + */ + public void setOrbitNumber(Integer orbitNumber) { + this.orbitNumber = orbitNumber; + } - /** - * @return the scanNumber - */ - public Integer getScanNumber() { - return scanNumber; - } + /** + * @return the scanNumber + */ + public Integer getScanNumber() { + return scanNumber; + } - /** - * @param scanNumber - * the scanNumber to set - */ - public void setScanNumber(Integer scanNumber) { - this.scanNumber = scanNumber; - } + /** + * @param scanNumber + * the scanNumber to set + */ + public void setScanNumber(Integer scanNumber) { + this.scanNumber = scanNumber; + } - /** - * @return the posNumber - */ - public Integer getPosNumber() { - return posNumber; - } + /** + * @return the posNumber + */ + public Integer getPosNumber() { + return posNumber; + } - /** - * @param posNumber - * the posNumber to set - */ - public void setPosNumber(Integer posNumber) { - this.posNumber = posNumber; - } + /** + * @param posNumber + * the posNumber to set + */ + public void setPosNumber(Integer posNumber) { + this.posNumber = posNumber; + } - /** - * Get the observation time for this data. - * - * @return The data observation time. - */ - public Calendar getTimeObs() { - return timeObs; - } + /** + * Get the observation time for this data. + * + * @return The data observation time. + */ + public Calendar getTimeObs() { + return timeObs; + } - /** - * Set the observation time for this data. - * - * @param timeObs - * The data observation time. - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } + /** + * Set the observation time for this data. + * + * @param timeObs + * The data observation time. + */ + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - public SurfaceObsLocation getLocation() { - return location; - } + public SurfaceObsLocation getLocation() { + return location; + } - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - /** - * - * @return - */ - public final SSMIScanData copyObs() { - SSMIScanData obs = new SSMIScanData(); + /** + * + * @return + */ + public final SSMIScanData copyObs() { + SSMIScanData obs = new SSMIScanData(); - obs.dataTime = dataTime.clone(); - obs.timeObs = TimeTools.copy(timeObs); - obs.orbitNumber = orbitNumber; - obs.satId = satId; - obs.scanNumber = scanNumber; - obs.wmoHeader = wmoHeader; + obs.dataTime = dataTime.clone(); + obs.timeObs = TimeTools.copy(timeObs); + obs.orbitNumber = orbitNumber; + obs.satId = satId; + obs.scanNumber = scanNumber; + obs.wmoHeader = wmoHeader; - return obs; - } + return obs; + } - /** - * Returns the hashCode for this object. This implementation returns the - * hashCode of the generated dataURI. - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); - return result; - } + /** + * Returns the hashCode for this object. This implementation returns the + * hashCode of the generated dataURI. + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); + return result; + } - /** - * Checks if this record is equal to another by checking the generated - * dataURI. - * - * @param obj - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - SSMIScanData other = (SSMIScanData) obj; - if (getDataURI() == null) { - if (other.getDataURI() != null) { - return false; - } - } else if (!getDataURI().equals(other.getDataURI())) { - return false; - } - return true; - } + /** + * Checks if this record is equal to another by checking the generated + * dataURI. + * + * @param obj + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + SSMIScanData other = (SSMIScanData) obj; + if (getDataURI() == null) { + if (other.getDataURI() != null) { + return false; + } + } else if (!getDataURI().equals(other.getDataURI())) { + return false; + } + return true; + } + @Override + public String getPluginName() { + return "bufrssmi"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java index 668fe416c0..7a8f31ecd3 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.bufrua/src/com/raytheon/uf/common/dataplugin/bufrua/UAObs.java @@ -94,6 +94,7 @@ import com.vividsolutions.jts.geom.Geometry; * Jun 20, 2013 2128 bsteffen Ensure setDataURI sets the dataURI. * Jul 19, 2013 1992 bsteffen Remove redundant time columns from * bufrua. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -107,783 +108,785 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "bufrua", - indexes = { - @Index(name = "bufrua_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "bufrua", indexes = { @Index(name = "bufrua_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class UAObs extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static final Comparator corComparator = new Comparator() { - @Override - public int compare(UAObs a, UAObs b) { - int compValue = 0; - String wmoA = a.getWmoHeader(); - String wmoB = b.getWmoHeader(); + private static final Comparator corComparator = new Comparator() { + @Override + public int compare(UAObs a, UAObs b) { + int compValue = 0; + String wmoA = a.getWmoHeader(); + String wmoB = b.getWmoHeader(); - if (wmoA != null) { - if (wmoB != null) { - compValue = wmoA.compareTo(wmoB); - } - } - if (compValue != 0) { - compValue *= -1; - } - return compValue; - } - }; + if (wmoA != null) { + if (wmoB != null) { + compValue = wmoA.compareTo(wmoB); + } + } + if (compValue != 0) { + compValue *= -1; + } + return compValue; + } + }; - public static final Unit DISTANCE_UNIT = SI.METER; + public static final Unit DISTANCE_UNIT = SI.METER; - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; + public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; + public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("GH", UA_GEOHGT); - PARM_MAP.put("Px", UA_PRESSURE); + private static final HashMap PARM_MAP = new HashMap(); + static { + PARM_MAP.put("GH", UA_GEOHGT); + PARM_MAP.put("Px", UA_PRESSURE); - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("DpT", SFC_DWPT); + PARM_MAP.put("T", SFC_TEMP); + PARM_MAP.put("DpT", SFC_DWPT); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); + PARM_MAP.put("WS", SFC_WNDSPD); + PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - } + PARM_MAP.put("NLAT", STA_LAT); + PARM_MAP.put("NLON", STA_LON); + } - public static final String UA_PARAM_PTRN = ".*:PRESS=\\d{2,4}"; + public static final String UA_PARAM_PTRN = ".*:PRESS=\\d{2,4}"; - // Non persisted value. Hold the last requested parameter name. - @Transient - private String parameterName = null; + // Non persisted value. Hold the last requested parameter name. + @Transient + private String parameterName = null; - // Non persisted value. Hold the last requested level value. - @Transient - private Integer levelId; + // Non persisted value. Hold the last requested level value. + @Transient + private Integer levelId; - // The observation report type. - @DataURI(position = 1) - @Column - @XmlAttribute - @DynamicSerializeElement - private Integer reportType; + // The observation report type. + @DataURI(position = 1) + @Column + @XmlAttribute + @DynamicSerializeElement + private Integer reportType; - @Embedded - @DataURI(position = 4, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 4, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - // Correction indicator from wmo header - @DataURI(position = 2) - @Column - @XmlAttribute - @DynamicSerializeElement - private String corIndicator; + // Correction indicator from wmo header + @DataURI(position = 2) + @Column + @XmlAttribute + @DynamicSerializeElement + private String corIndicator; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @DataURI(position = 3) - @Column - @XmlAttribute - @DynamicSerializeElement - private String wmoHeader; + // Text of the WMO header + @DataURI(position = 3) + @Column + @XmlAttribute + @DynamicSerializeElement + private String wmoHeader; - // Station pressure in Pascals. - @Column - @XmlAttribute - @DynamicSerializeElement - private Integer pressure_station; + // Station pressure in Pascals. + @Column + @XmlAttribute + @DynamicSerializeElement + private Integer pressure_station; - // The total cloud cover in 1/8s coverage. - @Column - @XmlAttribute - @DynamicSerializeElement - private Integer totalCloudCover; + // The total cloud cover in 1/8s coverage. + @Column + @XmlAttribute + @DynamicSerializeElement + private Integer totalCloudCover; - // The platform directio in angular degrees. - @Column - @XmlAttribute - @DynamicSerializeElement - private Integer platformDirection; + // The platform directio in angular degrees. + @Column + @XmlAttribute + @DynamicSerializeElement + private Integer platformDirection; - // The platform movement in meters per second. - @Column - @XmlAttribute - @DynamicSerializeElement - private Double platformMovement; + // The platform movement in meters per second. + @Column + @XmlAttribute + @DynamicSerializeElement + private Double platformMovement; - // ICAO of station if known. - @Column - @XmlAttribute - @DynamicSerializeElement - private String stationName; + // ICAO of station if known. + @Column + @XmlAttribute + @DynamicSerializeElement + private String stationName; - // The level data for this observation. - @Transient - @XmlElement - @DynamicSerializeElement - private List levels; + // The level data for this observation. + @Transient + @XmlElement + @DynamicSerializeElement + private List levels; - @Column(insertable = false, updatable = false) - @XmlAttribute - @DynamicSerializeElement - private Integer idx; + @Column(insertable = false, updatable = false) + @XmlAttribute + @DynamicSerializeElement + private Integer idx; - public void setIdx(Integer idx) { - this.idx = idx; - } + public void setIdx(Integer idx) { + this.idx = idx; + } - public Integer getIdx() { - return idx; - } + public Integer getIdx() { + return idx; + } - /** - * Empty constructor. - */ - public UAObs() { - } + /** + * Empty constructor. + */ + public UAObs() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public UAObs(String uri) { - super(uri); - corIndicator = "null".equals(corIndicator) ? null : corIndicator; - if (location != null) { - String staId = location.getStationId(); - location.setStationId("null".equals(staId) ? null : staId); - } - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public UAObs(String uri) { + super(uri); + corIndicator = "null".equals(corIndicator) ? null : corIndicator; + if (location != null) { + String staId = location.getStationId(); + location.setStationId("null".equals(staId) ? null : staId); + } + } - /** - * Get the set of levels for this observation. - * - * @return The level data. - */ - public List getLevels() { - return levels; - } + /** + * Get the set of levels for this observation. + * + * @return The level data. + */ + public List getLevels() { + return levels; + } - /** - * Set the set of levels for this observation. - * - * @param levels - * the levels to set - */ - public void setLevels(List levels) { - this.levels = levels; - } + /** + * Set the set of levels for this observation. + * + * @param levels + * the levels to set + */ + public void setLevels(List levels) { + this.levels = levels; + } - /** - * - * @param cloud - */ - public void addLevel(UAObsLevel level) { - if (levels == null) { - levels = new ArrayList(); - } - levels.add(level); - } + /** + * + * @param cloud + */ + public void addLevel(UAObsLevel level) { + if (levels == null) { + levels = new ArrayList(); + } + levels.add(level); + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * Get the report correction indicator. - * - * @return The corIndicator - */ - public String getCorIndicator() { - return corIndicator; - } + /** + * Get the report correction indicator. + * + * @return The corIndicator + */ + public String getCorIndicator() { + return corIndicator; + } - /** - * Set the report correction indicator. - * - * @param corIndicator - * The corIndicator. - */ - public void setCorIndicator(String corIndicator) { - this.corIndicator = corIndicator; - } + /** + * Set the report correction indicator. + * + * @param corIndicator + * The corIndicator. + */ + public void setCorIndicator(String corIndicator) { + this.corIndicator = corIndicator; + } - /** - * Get the report data for this observation. - * - * @return The Report data. - */ - public String getReportData() { - String s = null; - if (messageData instanceof String) { - s = (String) messageData; - } - return s; - } + /** + * Get the report data for this observation. + * + * @return The Report data. + */ + public String getReportData() { + String s = null; + if (messageData instanceof String) { + s = (String) messageData; + } + return s; + } - /** - * Set the report data for this observation. - * - * @param reportData - * The Report data. - */ - public void setReportData(String reportData) { - messageData = reportData; - } + /** + * Set the report data for this observation. + * + * @param reportData + * The Report data. + */ + public void setReportData(String reportData) { + messageData = reportData; + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Get whether the location for this observation is defined. - * - * @return Is this location defined. - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Get whether the location for this observation is defined. + * + * @return Is this location defined. + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - /** - * Get the observation report type. - * - * @return the reportType - */ - public Integer getReportType() { - return reportType; - } + /** + * Get the observation report type. + * + * @return the reportType + */ + public Integer getReportType() { + return reportType; + } - /** - * Set the observation report type. - * - * @param reportType - * the reportType to set - */ - public void setReportType(Integer reportType) { - this.reportType = reportType; - } + /** + * Set the observation report type. + * + * @param reportType + * the reportType to set + */ + public void setReportType(Integer reportType) { + this.reportType = reportType; + } - /** - * Get the station pressure at the observation site. - * - * @return the pressure_station - */ - public Integer getPressure_station() { - return pressure_station; - } + /** + * Get the station pressure at the observation site. + * + * @return the pressure_station + */ + public Integer getPressure_station() { + return pressure_station; + } - /** - * Set the station pressure at the observation site. - * - * @param pressure_station - * the pressure_station to set - */ - public void setPressure_station(Integer pressure_station) { - this.pressure_station = pressure_station; - } + /** + * Set the station pressure at the observation site. + * + * @param pressure_station + * the pressure_station to set + */ + public void setPressure_station(Integer pressure_station) { + this.pressure_station = pressure_station; + } - /** - * Get the total clould cover (n/8s). - * - * @return the totalCloudCover - */ - public Integer getTotalCloudCover() { - return totalCloudCover; - } + /** + * Get the total clould cover (n/8s). + * + * @return the totalCloudCover + */ + public Integer getTotalCloudCover() { + return totalCloudCover; + } - /** - * Get the direction the platform is moving. (Valid only for mobile - * observations i.e. TEMPSHIP. - * - * @return the platformDirection - */ - public Integer getPlatformDirection() { - return platformDirection; - } + /** + * Get the direction the platform is moving. (Valid only for mobile + * observations i.e. TEMPSHIP. + * + * @return the platformDirection + */ + public Integer getPlatformDirection() { + return platformDirection; + } - /** - * Set the direction the platform is moving. (Valid only for mobile - * observations i.e. TEMPSHIP. - * - * @param platformDirection - * the platformDirection to set - */ - public void setPlatformDirection(Integer platformDirection) { - this.platformDirection = platformDirection; - } + /** + * Set the direction the platform is moving. (Valid only for mobile + * observations i.e. TEMPSHIP. + * + * @param platformDirection + * the platformDirection to set + */ + public void setPlatformDirection(Integer platformDirection) { + this.platformDirection = platformDirection; + } - /** - * Get the movement of the platform in meters per second. - * - * @return The platform movement in meters per second. - */ - public Double getPlatformMovement() { - return platformMovement; - } + /** + * Get the movement of the platform in meters per second. + * + * @return The platform movement in meters per second. + */ + public Double getPlatformMovement() { + return platformMovement; + } - /** - * Set the movement of the platform in meters per second. - * - * @param shipMovement - * The platform movement in meters per second. - */ - public void setPlatformMovement(Double platformMovement) { - this.platformMovement = platformMovement; - } + /** + * Set the movement of the platform in meters per second. + * + * @param shipMovement + * The platform movement in meters per second. + */ + public void setPlatformMovement(Double platformMovement) { + this.platformMovement = platformMovement; + } - /** - * Set the total clould cover (n/8s). - * - * @param totalCloudCover - * the totalCloudCover to set - */ - public void setTotalCloudCover(Integer totalCloudCover) { - this.totalCloudCover = totalCloudCover; - } + /** + * Set the total clould cover (n/8s). + * + * @param totalCloudCover + * the totalCloudCover to set + */ + public void setTotalCloudCover(Integer totalCloudCover) { + this.totalCloudCover = totalCloudCover; + } - /** - * @return the stationName - */ - public String getStationName() { - return stationName; - } + /** + * @return the stationName + */ + public String getStationName() { + return stationName; + } - /** - * @param stationName - * the stationName to set - */ - public void setStationName(String stationName) { - this.stationName = stationName; - } + /** + * @param stationName + * the stationName to set + */ + public void setStationName(String stationName) { + this.stationName = stationName; + } - /** - * Set the data uri for this observation. - * - * @param A - * data uri. - */ - @Override - public void setDataURI(String dataURI) { + /** + * Set the data uri for this observation. + * + * @param A + * data uri. + */ + @Override + public void setDataURI(String dataURI) { super.setDataURI(dataURI); - identifier = dataURI; - } + identifier = dataURI; + } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } - /** + /** * */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - /** + /** * */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - if ("STA".matches(paramName)) { - return this.getStationId(); - } - return null; - } + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public String getString(String paramName) { + if ("STA".matches(paramName)) { + return this.getStationId(); + } + return null; + } - /** - * Get the value and units of a named parameter within this observation. The - * parameter name may include level information for these observation data. - * The format for parameter is: - * - *
-	 *    "parameterName" may be one of 
-	 *        "GH"  geopotential height
-	 *        "Px"  pressure
-	 *        "T"   temperature
-	 *        "DpT" dewpoint
-	 *        "WS"  wind speed
-	 *        "WD"  wind direction
-	 *    followed by a level specification ":PRESS=xxxx" where xxxx is a level
-	 *    in hPa (millibars). To retrieve the temperature from the 850hPa level
-	 *    use the following getValue("T:PRESS=850");
-	 *    
-	 *    Some data is specific to the observation, latitude/longitude for
-	 *    example. These data may be retrieved using the parameter minus any level
-	 *    information as follows
-	 *    "NLAT"  station latitude
-	 *    "NLON"  station longitude
-	 * 
- * - * If the sounding data defines a surface level, and a request for a level - * below surface is requested, a null value is returned. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; + /** + * Get the value and units of a named parameter within this observation. The + * parameter name may include level information for these observation data. + * The format for parameter is: + * + *
+     *    "parameterName" may be one of 
+     *        "GH"  geopotential height
+     *        "Px"  pressure
+     *        "T"   temperature
+     *        "DpT" dewpoint
+     *        "WS"  wind speed
+     *        "WD"  wind direction
+     *    followed by a level specification ":PRESS=xxxx" where xxxx is a level
+     *    in hPa (millibars). To retrieve the temperature from the 850hPa level
+     *    use the following getValue("T:PRESS=850");
+     *    
+     *    Some data is specific to the observation, latitude/longitude for
+     *    example. These data may be retrieved using the parameter minus any level
+     *    information as follows
+     *    "NLAT"  station latitude
+     *    "NLON"  station longitude
+     * 
+ * + * If the sounding data defines a surface level, and a request for a level + * below surface is requested, a null value is returned. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Amount getValue(String paramName) { + Amount a = null; - if (parseParameter(paramName)) { - String pName = PARM_MAP.get(parameterName); - if ((pName != null) && (levels != null) && (levels.size() > 0)) { + if (parseParameter(paramName)) { + String pName = PARM_MAP.get(parameterName); + if ((pName != null) && (levels != null) && (levels.size() > 0)) { - UAObsLevel obsLevel = getLevel(levelId); - if (obsLevel != null) { - Integer iValue = null; - Double dValue = null; - if (UA_GEOHGT.equals(pName)) { - iValue = obsLevel.getGeoHeight(); - if (iValue != null) { - a = new Amount(iValue, DISTANCE_UNIT); - } - } else if (SFC_TEMP.equals(pName)) { - dValue = obsLevel.getTemp(); - if (dValue != null) { - a = new Amount(dValue, TEMPERATURE_UNIT); - } - } else if (SFC_DWPT.equals(pName)) { - dValue = obsLevel.getDwpt(); - if (dValue != null) { - a = new Amount(dValue, TEMPERATURE_UNIT); - } - } else if (SFC_WNDSPD.equals(pName)) { - dValue = obsLevel.getWindSpeed(); - if (dValue != null) { - a = new Amount(dValue, WIND_SPEED_UNIT); - } - } else if (SFC_WNDDIR.equals(pName)) { - iValue = obsLevel.getWindDirection(); - if (iValue != null) { - a = new Amount(iValue, WIND_DIR_UNIT); - } - } - } - } - } else { - // Assume we are trying to get an observation attribute. - String pName = PARM_MAP.get(paramName); - if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } - } - return a; - } + UAObsLevel obsLevel = getLevel(levelId); + if (obsLevel != null) { + Integer iValue = null; + Double dValue = null; + if (UA_GEOHGT.equals(pName)) { + iValue = obsLevel.getGeoHeight(); + if (iValue != null) { + a = new Amount(iValue, DISTANCE_UNIT); + } + } else if (SFC_TEMP.equals(pName)) { + dValue = obsLevel.getTemp(); + if (dValue != null) { + a = new Amount(dValue, TEMPERATURE_UNIT); + } + } else if (SFC_DWPT.equals(pName)) { + dValue = obsLevel.getDwpt(); + if (dValue != null) { + a = new Amount(dValue, TEMPERATURE_UNIT); + } + } else if (SFC_WNDSPD.equals(pName)) { + dValue = obsLevel.getWindSpeed(); + if (dValue != null) { + a = new Amount(dValue, WIND_SPEED_UNIT); + } + } else if (SFC_WNDDIR.equals(pName)) { + iValue = obsLevel.getWindDirection(); + if (iValue != null) { + a = new Amount(iValue, WIND_DIR_UNIT); + } + } + } + } + } else { + // Assume we are trying to get an observation attribute. + String pName = PARM_MAP.get(paramName); + if (STA_LAT.equals(pName)) { + a = new Amount(this.getLatitude(), LOCATION_UNIT); + } else if (STA_LON.equals(pName)) { + a = new Amount(this.getLongitude(), LOCATION_UNIT); + } + } + return a; + } - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Collection getValues(String paramName) { + return null; + } - /** - * Determine if the parameter is a level request, and parse out the pressure - * level and parameter name if so. - * - * @param parameter - * The parameter string to parse. - * @return This is a level parameter. - */ - private boolean parseParameter(String parameter) { - boolean goodParse = false; - Pattern p = Pattern.compile(UA_PARAM_PTRN); - Matcher m = p.matcher(parameter); - if (m.find()) { - int start = parameter.indexOf(":PRESS="); - if (start > 0) { - parameterName = parameter.substring(0, start); - start += ":PRESS=".length(); - levelId = Integer.parseInt(parameter.substring(start)); - } - goodParse = true; - } - return goodParse; - } + /** + * Determine if the parameter is a level request, and parse out the pressure + * level and parameter name if so. + * + * @param parameter + * The parameter string to parse. + * @return This is a level parameter. + */ + private boolean parseParameter(String parameter) { + boolean goodParse = false; + Pattern p = Pattern.compile(UA_PARAM_PTRN); + Matcher m = p.matcher(parameter); + if (m.find()) { + int start = parameter.indexOf(":PRESS="); + if (start > 0) { + parameterName = parameter.substring(0, start); + start += ":PRESS=".length(); + levelId = Integer.parseInt(parameter.substring(start)); + } + goodParse = true; + } + return goodParse; + } - /** - * Get a specified pressure level data if it exists. If the specified level - * is below the declared surface pressure a null reference is returned. - * - * @param level - * A pressure level to get. - * @return The requested level, if found, null reference if not. - */ - private UAObsLevel getLevel(Integer level) { - UAObsLevel retValue = null; - if (level != null) { - level = level * 100; - for (UAObsLevel l : levels) { - if (IDecoderConstants.MANPRE_LEVEL.equals(l.getVertSig()) - || IDecoderConstants.SIGPRE_LEVEL - .equals(l.getVertSig())) { + /** + * Get a specified pressure level data if it exists. If the specified level + * is below the declared surface pressure a null reference is returned. + * + * @param level + * A pressure level to get. + * @return The requested level, if found, null reference if not. + */ + private UAObsLevel getLevel(Integer level) { + UAObsLevel retValue = null; + if (level != null) { + level = level * 100; + for (UAObsLevel l : levels) { + if (IDecoderConstants.MANPRE_LEVEL.equals(l.getVertSig()) + || IDecoderConstants.SIGPRE_LEVEL + .equals(l.getVertSig())) { - if (level.equals(l.getPressure())) { - retValue = l; - break; - } - } - } - } - if (retValue != null) { - UAObsLevel sfc = getSurfaceLevel(); - if (sfc != null) { - if (LayerTools.isLowerThan(sfc, retValue)) { - retValue = null; - } - } - } - return retValue; - } + if (level.equals(l.getPressure())) { + retValue = l; + break; + } + } + } + } + if (retValue != null) { + UAObsLevel sfc = getSurfaceLevel(); + if (sfc != null) { + if (LayerTools.isLowerThan(sfc, retValue)) { + retValue = null; + } + } + } + return retValue; + } - /** - * Get the defined surface level. If a surface level cannot be found, then - * return null. - * - * @return The surface level found, or null. - */ - private UAObsLevel getSurfaceLevel() { - UAObsLevel retValue = null; - if (levels != null) { - for (UAObsLevel level : levels) { - if (IDecoderConstants.SFC_LEVEL.equals(level.getVertSig())) { - retValue = level; - break; - } - } - } - return retValue; - } + /** + * Get the defined surface level. If a surface level cannot be found, then + * return null. + * + * @return The surface level found, or null. + */ + private UAObsLevel getSurfaceLevel() { + UAObsLevel retValue = null; + if (levels != null) { + for (UAObsLevel level : levels) { + if (IDecoderConstants.SFC_LEVEL.equals(level.getVertSig())) { + retValue = level; + break; + } + } + } + return retValue; + } - @Override - public String[] getStrings(String paramName) { - // TODO Auto-generated method stub - return null; - } + @Override + public String[] getStrings(String paramName) { + // TODO Auto-generated method stub + return null; + } - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - public SurfaceObsLocation getLocation() { - if (location == null) { - location = new SurfaceObsLocation(); - } - return location; - } + public SurfaceObsLocation getLocation() { + if (location == null) { + location = new SurfaceObsLocation(); + } + return location; + } - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** - * Returns the hashCode for this object. This implementation returns the - * hashCode of the generated dataURI. - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); - return result; - } + /** + * Returns the hashCode for this object. This implementation returns the + * hashCode of the generated dataURI. + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); + return result; + } - /** - * Checks if this record is equal to another by checking the generated - * dataURI. - * - * @param obj - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - UAObs other = (UAObs) obj; - if (getDataURI() == null) { - if (other.getDataURI() != null) { - return false; - } - } else if (!getDataURI().equals(other.getDataURI())) { - return false; - } - return true; - } + /** + * Checks if this record is equal to another by checking the generated + * dataURI. + * + * @param obj + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + UAObs other = (UAObs) obj; + if (getDataURI() == null) { + if (other.getDataURI() != null) { + return false; + } + } else if (!getDataURI().equals(other.getDataURI())) { + return false; + } + return true; + } - /** - * Returns a - * - * @param obsList - * @return - */ - public static final List sortByCorrection(List obsList) { + /** + * Returns a + * + * @param obsList + * @return + */ + public static final List sortByCorrection(List obsList) { - // No need to sort for null, empty, or one item. - if ((obsList != null) && (obsList.size() > 1)) { - Collections.sort(obsList, getCorComparator()); - } - return obsList; - } + // No need to sort for null, empty, or one item. + if ((obsList != null) && (obsList.size() > 1)) { + Collections.sort(obsList, getCorComparator()); + } + return obsList; + } - public static Comparator getCorComparator() { - return corComparator; - } + public static Comparator getCorComparator() { + return corComparator; + } - @Override - public String toString() { - return wmoHeader; - } + @Override + public String toString() { + return wmoHeader; + } - public static final void main(String[] args) { + public static final void main(String[] args) { - List obsList = new ArrayList(); - UAObs obsA = new UAObs(); - obsA.setWmoHeader("IUSZ42 KWBC 271845 CCA"); - obsList.add(obsA); - UAObs obsB = new UAObs(); - obsB.setWmoHeader("IUSZ42 KWBC 271835 CCA"); - obsList.add(obsB); - UAObs obs = new UAObs(); - obs.setWmoHeader("IUSZ42 KWBC 271815"); - obsList.add(obs); - obs = new UAObs(); - obs.setWmoHeader("IUSZ42 KWBC 271825 CCA"); - obsList.add(obs); + List obsList = new ArrayList(); + UAObs obsA = new UAObs(); + obsA.setWmoHeader("IUSZ42 KWBC 271845 CCA"); + obsList.add(obsA); + UAObs obsB = new UAObs(); + obsB.setWmoHeader("IUSZ42 KWBC 271835 CCA"); + obsList.add(obsB); + UAObs obs = new UAObs(); + obs.setWmoHeader("IUSZ42 KWBC 271815"); + obsList.add(obs); + obs = new UAObs(); + obs.setWmoHeader("IUSZ42 KWBC 271825 CCA"); + obsList.add(obs); - System.out.println(obsList); - obsList = sortByCorrection(obsList); - System.out.println(obsList); + System.out.println(obsList); + obsList = sortByCorrection(obsList); + System.out.println(obsList); - int c = UAObs.getCorComparator().compare(obsA, obsB); - System.out.println(c); + int c = UAObs.getCorComparator().compare(obsA, obsB); + System.out.println(c); - UAObs test = new UAObs( - "/bufrua/2011-10-07_00:00:00.0/2022/null/IUSZ52_KWBC_070040/72634/44.90833/-84.71944"); + UAObs test = new UAObs( + "/bufrua/2011-10-07_00:00:00.0/2022/null/IUSZ52_KWBC_070040/72634/44.90833/-84.71944"); - System.out.println(test.dataURI); + System.out.println(test.dataURI); + + } - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "bufrua"; + } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.cwa/src/com/raytheon/uf/common/dataplugin/cwa/CWARecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.cwa/src/com/raytheon/uf/common/dataplugin/cwa/CWARecord.java index 58f715f75b..4a372e7c0e 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.cwa/src/com/raytheon/uf/common/dataplugin/cwa/CWARecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.cwa/src/com/raytheon/uf/common/dataplugin/cwa/CWARecord.java @@ -56,11 +56,13 @@ import com.vividsolutions.jts.geom.Coordinate; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Feb 1, 2010 jsanchez Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Feb 01, 2010 jsanchez Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -74,132 +76,134 @@ import com.vividsolutions.jts.geom.Coordinate; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "cwa", - indexes = { - @Index(name = "cwa_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "cwa", indexes = { @Index(name = "cwa_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class CWARecord extends PersistablePluginDataObject implements - IPointData, IPersistable { + IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @Transient - @XmlElement - @DynamicSerializeElement - private String wmoHeader = ""; + // Text of the WMO header + @Transient + @XmlElement + @DynamicSerializeElement + private String wmoHeader = ""; - @Transient - @XmlElement - @DynamicSerializeElement - private CWADimension dimension; + @Transient + @XmlElement + @DynamicSerializeElement + private CWADimension dimension; - @DataURI(position = 1, embedded = true) - @XmlElement - @DynamicSerializeElement - private String eventId; + @DataURI(position = 1, embedded = true) + @XmlElement + @DynamicSerializeElement + private String eventId; - @Transient - @XmlElement - @DynamicSerializeElement - private Coordinate[] coordinates; + @Transient + @XmlElement + @DynamicSerializeElement + private Coordinate[] coordinates; - @Transient - @XmlElement - @DynamicSerializeElement - private String text; + @Transient + @XmlElement + @DynamicSerializeElement + private String text; - public CWADimension getDimension() { - return dimension; - } + public CWADimension getDimension() { + return dimension; + } - public void setDimension(CWADimension dimension) { - this.dimension = dimension; - } + public void setDimension(CWADimension dimension) { + this.dimension = dimension; + } - public String getWmoHeader() { - return wmoHeader; - } + public String getWmoHeader() { + return wmoHeader; + } - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - public Coordinate[] getCoordinates() { - return coordinates; - } + public Coordinate[] getCoordinates() { + return coordinates; + } - public void setCoordinates(Coordinate[] coordinates) { - this.coordinates = coordinates; - } + public void setCoordinates(Coordinate[] coordinates) { + this.coordinates = coordinates; + } - public String getEventId() { - return eventId; - } + public String getEventId() { + return eventId; + } - public void setEventId(String eventId) { - this.eventId = eventId; - } + public void setEventId(String eventId) { + this.eventId = eventId; + } - /** - * Set the data uri for this observation. - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } + /** + * Set the data uri for this observation. + * + * @param dataURI + */ + @Override + public void setDataURI(String dataURI) { + super.setDataURI(dataURI); + identifier = dataURI; + } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } - public String getText() { - return text; - } + public String getText() { + return text; + } - public void setText(String text) { - this.text = text; - } + public void setText(String text) { + this.text = text; + } - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + Calendar c = getDataTime().getRefTimeAsCalendar(); + if (c != null) { + sb.append(String.format("CWA:%1$tY%1$tm%1$td%1$tH%1$tM", + getDataTime().getRefTimeAsCalendar())); + } else { + sb.append("CWA:YYYYMMDDHHmm"); + } + return sb.toString(); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - Calendar c = getDataTime().getRefTimeAsCalendar(); - if (c != null) { - sb.append(String.format("CWA:%1$tY%1$tm%1$td%1$tH%1$tM", - getDataTime().getRefTimeAsCalendar())); - } else { - sb.append("CWA:YYYYMMDDHHmm"); - } - return sb.toString(); - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "cwa"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.cwat/src/com/raytheon/uf/common/dataplugin/cwat/CWATRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.cwat/src/com/raytheon/uf/common/dataplugin/cwat/CWATRecord.java index 0d43eb9d61..d17c81d362 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.cwat/src/com/raytheon/uf/common/dataplugin/cwat/CWATRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.cwat/src/com/raytheon/uf/common/dataplugin/cwat/CWATRecord.java @@ -72,13 +72,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 06/03/09 2037 D. Hladky Initial release - * Apr 04, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from + * Jun 03, 2009 2037 D. Hladky Initial release + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. - * Aug 06, 2013 2228 njensen Use deserialize(byte[]) + * Aug 06, 2013 2228 njensen Use deserialize(byte[]) + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -448,9 +450,9 @@ public class CWATRecord extends PersistablePluginDataObject implements try { IDataRecord[] dataRec = dataStore.retrieve(getDataURI()); - for (int i = 0; i < dataRec.length; i++) { - if (dataRec[i] instanceof ShortDataRecord) { - setDataArray(((ShortDataRecord) dataRec[i]).getShortData()); + for (IDataRecord element : dataRec) { + if (element instanceof ShortDataRecord) { + setDataArray(((ShortDataRecord) element).getShortData()); } } retrieveMapFromDataStore(dataStore); @@ -569,4 +571,9 @@ public class CWATRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "cwat"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java index 139a2b9826..f00d3f8b0d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java @@ -77,18 +77,22 @@ import com.raytheon.uf.common.time.util.ImmutableDate; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 06/03/09 2521 D. Hladky Initial release - * 01/27/13 1478 D. Hladky OUN memory help - * Feb 28, 2013 1729 dhladky Supressed un-necessary debug loggers - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 8, 2013 1293 bkowal Removed references to hdffileid. - * April, 9 2013 1890 dhladky Moved dates to referenced map in record rather than multiple dates in FFMPBasin objs. + * Jun 03, 2009 2521 D. Hladky Initial release + * Jan 27, 2013 1478 D. Hladky OUN memory help + * Feb 28, 2013 1729 dhladky Supressed un-necessary debug loggers + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * April, 9 2013 1890 dhladky Moved dates to referenced map in record + * rather than multiple dates in + * FFMPBasin objs. * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp - * Apr 18, 2013 1919 dhladky Added method for VGB loading + * Apr 18, 2013 1919 dhladky Added method for VGB loading * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -102,18 +106,13 @@ import com.raytheon.uf.common.time.util.ImmutableDate; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ffmp", - indexes = { - @Index(name = "ffmp_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) - +@org.hibernate.annotations.Table(appliesTo = "ffmp", indexes = { @Index(name = "ffmp_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class FFMPRecord extends PersistablePluginDataObject - implements IPersistable { +public class FFMPRecord extends PersistablePluginDataObject implements + IPersistable { private static final long serialVersionUID = 76774564365671L; @@ -273,8 +272,8 @@ public class FFMPRecord extends PersistablePluginDataObject String unit = null; if (field == FIELDS.RATE) { unit = "in/hr"; - } else if (field == FIELDS.QPE || field == FIELDS.QPF - || field == FIELDS.GUIDANCE || field == FIELDS.DIFF) { + } else if ((field == FIELDS.QPE) || (field == FIELDS.QPF) + || (field == FIELDS.GUIDANCE) || (field == FIELDS.DIFF)) { unit = "in"; } else if (field == FIELDS.RATIO) { unit = "%"; @@ -394,7 +393,7 @@ public class FFMPRecord extends PersistablePluginDataObject LinkedHashMap map = template.getMap(getSiteKey(), domain.getCwa(), FFMPRecord.ALL); - if (map != null && !map.isEmpty()) { + if ((map != null) && !map.isEmpty()) { fbd.addBasins(datastoreFile, uri, getSiteKey(), domain.getCwa(), FFMPRecord.ALL, sourceName, idate, map.keySet(), aggregate); @@ -446,7 +445,7 @@ public class FFMPRecord extends PersistablePluginDataObject LinkedHashMap map = template.getMap(getSiteKey(), domain.getCwa(), huc); - if (map != null && map.get(pfaf) != null) { + if ((map != null) && (map.get(pfaf) != null)) { int index = 0; for (Long pfafToCheck : map.keySet()) { @@ -696,4 +695,9 @@ public class FFMPRecord extends PersistablePluginDataObject public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ffmp"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.fog/src/com/raytheon/uf/common/dataplugin/fog/FogRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.fog/src/com/raytheon/uf/common/dataplugin/fog/FogRecord.java index 137c5a7b06..a2314248a7 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.fog/src/com/raytheon/uf/common/dataplugin/fog/FogRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.fog/src/com/raytheon/uf/common/dataplugin/fog/FogRecord.java @@ -62,12 +62,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 12/12/09 D. Hladky Initial release - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 1293 bkowal Removed references to hdffileid. + * Dec 12, 2009 D. Hladky Initial release + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @@ -81,17 +83,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "fog", - indexes = { - @Index(name = "fog_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "fog", indexes = { @Index(name = "fog_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class FogRecord extends PersistablePluginDataObject - implements IPersistable { +public class FogRecord extends PersistablePluginDataObject implements + IPersistable { private static final long serialVersionUID = 76774564365671L; @@ -429,14 +427,14 @@ public class FogRecord extends PersistablePluginDataObject } public GridGeometry2D getGridGeometry2D() { - return gridGeometry2D; - } + return gridGeometry2D; + } - public void setGridGeometry2D(GridGeometry2D gridGeometry2D) { - this.gridGeometry2D = gridGeometry2D; - } + public void setGridGeometry2D(GridGeometry2D gridGeometry2D) { + this.gridGeometry2D = gridGeometry2D; + } - /** + /** * Set the VIS pixel array * * @param data_array @@ -652,28 +650,31 @@ public class FogRecord extends PersistablePluginDataObject // then means both vis_range and ir_range store range of vis if (getRangeType(j) == IMAGE_GROUP.TWILIGHT_GROUP) { - if (i <= getVisRange(j).getEnd() && i >= getVisRange(j).getStart()) { + if ((i <= getVisRange(j).getEnd()) + && (i >= getVisRange(j).getStart())) { return IMAGE_GROUP.VIS_GROUP; } - else if (i <= getIRRange(j).getEnd() - && i >= getIRRange(j).getStart()) { + else if ((i <= getIRRange(j).getEnd()) + && (i >= getIRRange(j).getStart())) { return IMAGE_GROUP.IR_GROUP; } else { return IMAGE_GROUP.TWILIGHT_GROUP; } } else if (getRangeType(j) == IMAGE_GROUP.VIS_GROUP) { - if ((i <= getVisRange(j).getEnd() && i >= getVisRange(j).getStart()) - || (i <= getIRRange(j).getEnd() && i >= getIRRange(j) - .getStart())) { + if (((i <= getVisRange(j).getEnd()) && (i >= getVisRange(j) + .getStart())) + || ((i <= getIRRange(j).getEnd()) && (i >= getIRRange(j) + .getStart()))) { return IMAGE_GROUP.VIS_GROUP; } else { return IMAGE_GROUP.TWILIGHT_GROUP; } } else { - if ((i <= getVisRange(j).getEnd() && i >= getVisRange(j).getStart()) - || (i <= getIRRange(j).getEnd() && i >= getIRRange(j) - .getStart())) { + if (((i <= getVisRange(j).getEnd()) && (i >= getVisRange(j) + .getStart())) + || ((i <= getIRRange(j).getEnd()) && (i >= getIRRange(j) + .getStart()))) { return IMAGE_GROUP.IR_GROUP; } else { return IMAGE_GROUP.TWILIGHT_GROUP; @@ -704,10 +705,16 @@ public class FogRecord extends PersistablePluginDataObject public Calendar getRefHour() { return refHour; } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "fog"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java index 3d9e1d9dd1..8389e5d301 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java @@ -26,6 +26,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; + import org.hibernate.annotations.Index; import com.raytheon.uf.common.dataplugin.IDecoderGettable; @@ -48,1219 +49,1187 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "fssobs", - indexes = { - @Index(name = "fssobs_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "fssobs", indexes = { @Index(name = "fssobs_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class FSSObsRecord extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPersistable, IPointData { + ISpatialEnabled, IDecoderGettable, IPersistable, IPointData { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String PLUGIN_NAME = "fssobs"; + public static final String PLUGIN_NAME = "fssobs"; - private static final int MISSING = -9999; + private static final int MISSING = -9999; - // UNITS + // UNITS - public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; + public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; - public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; + public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; - public static final Unit HEIGHT_UNIT = SI.METER; + public static final Unit HEIGHT_UNIT = SI.METER; - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit PRESSURE_UNIT = SI.HECTO(SI.PASCAL); + public static final Unit PRESSURE_UNIT = SI.HECTO(SI.PASCAL); - public static final Unit PRECIP_UNIT = NonSI.INCH; + public static final Unit PRECIP_UNIT = NonSI.INCH; - public static final Unit WAVE_UNIT = SI.METER; + public static final Unit WAVE_UNIT = SI.METER; - public static final Unit VISIBILITY_UNIT = NonSI.MILE; + public static final Unit VISIBILITY_UNIT = NonSI.MILE; - public static final Unit CLOUD_COVER = NonSI.OCTET; + public static final Unit CLOUD_COVER = NonSI.OCTET; - /** Metar specific parameter keys */ - public static final class ParameterKey { - public static final String SFC_ALTIMETER = "SFC.PRESS.ALTIMETER"; + /** Metar specific parameter keys */ + public static final class ParameterKey { + public static final String SFC_ALTIMETER = "SFC.PRESS.ALTIMETER"; - public static final String PRESSURE_CHANGE = "PCHNG"; + public static final String PRESSURE_CHANGE = "PCHNG"; - public static final String VISIBILITY = "VIS"; + public static final String VISIBILITY = "VIS"; - public static final String PRECIPITATION_1HR = "PR1HR"; - } + public static final String PRECIPITATION_1HR = "PR1HR"; + } - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("rawMessage", "rawMessage"); - } - - /** is feature new **/ - @Transient - @DynamicSerializeElement - @XmlElement - public boolean isNew = true; - - // Current CWA (WFO) - @Column - @DataURI(position = 2) - @DynamicSerializeElement - @XmlElement(nillable = false) - private String cwa; - - // Monitor which should use this station record - // fog = "fog" - // safeseas = "ss" - // snow = "snow" - @Column - @DataURI(position = 4) - @DynamicSerializeElement - @XmlElement - private String monitorUse = ""; - - // Station name - @Column - @DynamicSerializeElement - @XmlElement - private String stnName; - - /* From ============ObReport================= */ - - @XmlElement - @DynamicSerializeElement - @Column - @DataURI(position = 1) - protected String reportType; - - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; - - // Observing platform identifier (same as stationID) - @Transient - @XmlElement - @DynamicSerializeElement - private String platformId; - - // Indicator of whether observing platform is stationary - @Transient - @DynamicSerializeElement - @XmlElement - private boolean isStationary; - - // Actual time of the observation - @Transient - @DynamicSerializeElement - @XmlElement - private Calendar timeObs; - - // Time of the observation to the nearest hour. - @XmlElement - @DynamicSerializeElement - @Column - private Calendar refHour; - - // Raw message - @Transient - @DynamicSerializeElement - @XmlElement - private String rawMessage; - - // Observed wind speed in knots - @Transient - @DynamicSerializeElement - @XmlElement - private float windSpeed = -9999;; - - // Wind gust in knots - @Transient - @DynamicSerializeElement - @XmlElement - private float windGust = -9999;; - - // Observed maximum wind speed in knots - @Transient - @DynamicSerializeElement - @XmlElement - private float maxWindSpeed = -9999; - - // Observed wind direction in azimuth degrees - @Transient - @DynamicSerializeElement - @XmlElement - private float windDir; - - // Observed wind chill in Fahrenheit - @Transient - @DynamicSerializeElement - @XmlElement - private float windChill = -9999; - - // Observed high resolution wave height in - @Transient - @DynamicSerializeElement - @XmlElement - private float highResWaveHeight = -9999; - - // Observed wave steepness in seconds ??? None - @Transient - @DynamicSerializeElement - @XmlElement - private float waveSteepness = -9999; - - // Observed visibility in Statute miles - @Transient - @DynamicSerializeElement - @XmlElement - private float visibility = -9999; - - // Observed visibility in meters for Maritime obs. - @Transient - @DynamicSerializeElement - @XmlElement - private float horzVisibility = -9999; - - // Observed temperature in degrees in Farenheit - @Transient - @DynamicSerializeElement - @XmlElement - private float temperature = -9999; - - // in feet - @Transient - @XmlElement - @DynamicSerializeElement - private Double waveHeight = -9999.0; - - // in seconds - @Transient - @XmlElement - @DynamicSerializeElement - private Integer wavePeriod = -9999; - - // in Azimuth degrees - @Transient - @XmlElement - @DynamicSerializeElement - private Double primarySwellWaveDir = -9999.0; - - // in seconds - @Transient - @XmlElement - @DynamicSerializeElement - private Integer primarySwellWavePeriod = -9999; - - // in feet - @Transient - @XmlElement - @DynamicSerializeElement - private Double primarySwellWaveHeight = -9999.0; - - // in Azimuth degrees - @Transient - @XmlElement - @DynamicSerializeElement - private Double secondarySwellWaveDir = -9999.0; - - // in seconds - @Transient - @XmlElement - @DynamicSerializeElement - private Integer secondarySwellWavePeriod = -9999; - - // in feet - @Transient - @XmlElement - @DynamicSerializeElement - private Double secondarySwellWaveHeight = -9999.0; - - // // Pressure in inches of mercury - // @Transient - // @DynamicSerializeElement - // @XmlElement - // private float pressure = -9999; - - // Three-hour pressure change in thousandths of an inch of mercury ???? - @Transient - @DynamicSerializeElement - @XmlElement - private float pressChange3Hour = -9999f; - - // Pressure change character for metar plot model - /** A string denoting the pressure tendency(rising or falling) */ - @Transient - @DynamicSerializeElement - @XmlElement - private String pressChangeChar; - - // Observed dewpoint in degrees Farenheit - @Transient - @DynamicSerializeElement - @XmlElement - private float dewpoint = -9999f; - - // Observed sea surface temperature in degrees in Farenheit - @Transient - @DynamicSerializeElement - @XmlElement - private float seaSurfaceTemp = -9999f; - - // the sea level pressure in hPa - @XmlElement - @DynamicSerializeElement - @Transient - private float seaLevelPress = -9999f; - - // Altimeter setting in mm Hg. - @Transient - @XmlElement - @DynamicSerializeElement - private float pressureAltimeter = -9999f; - - // Observed hourly precipitation in inches - @Transient - @DynamicSerializeElement - @XmlElement - private float hourlyPrecip = -9999f; - - // Observed snow depth in inch - @Transient - @DynamicSerializeElement - @XmlElement - private float snowDepth = -9999f; - - // Observed snow increasing rapidly, hourly total in inches - @Transient - @DynamicSerializeElement - @XmlElement - private float snincrHourly = -9999f; - - // Observed snow increasing rapidly, total in inches - @Transient - @DynamicSerializeElement - @XmlElement - private float snincrTotal = -9999f; - - // Observed frostbite time in minutes - @Transient - @DynamicSerializeElement - @XmlElement - private float frostbiteTime; - - // present weather conditions for metar plot model - @Transient - @DynamicSerializeElement - @XmlElement - private String[] presWeather; - - // Observed relative humidity in percent - @Transient - @DynamicSerializeElement - @XmlElement - private float relativeHumidity = -9999f; - - // Observed ceiling in feet above ground level - @Transient - @DynamicSerializeElement - @XmlElement - private float ceiling = -9999f; - - // Observed dewpoint depression in Farenheit - @Transient - @DynamicSerializeElement - @XmlElement - private float dewpointDepr = -9999f; - - @XmlElement - @DynamicSerializeElement - @Transient - private String[] skyCover; - - @XmlElement - @DynamicSerializeElement - @Transient - private int totCloudAmount = -9999; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - // ---------------------------------------------------------------------------------------------------- - public FSSObsRecord() { - } - - public FSSObsRecord(String uri) { - super(uri); - } - - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = PARM_MAP.get(paramName); - - if (SFC_TEMP.equals(pName) && (temperature != -9999f)) { - a = new Amount(temperature, TEMPERATURE_UNIT); - } else if (SFC_DWPT.equals(pName) && (dewpoint != -9999f)) { - a = new Amount(dewpoint, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName) && (windSpeed != -9999f)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName) && (windDir != -9999f)) { - a = new Amount(windDir, WIND_DIR_UNIT); - } else if (SFC_WNDGST.equals(pName) && (windGust != -9999f)) { - a = new Amount(windGust, WIND_SPEED_UNIT); - } else if (PRES_SLP.equals(pName) && (seaLevelPress != -9999f)) { - a = new Amount(seaLevelPress, PRESSURE_UNIT); - // } else if (PRES_ALTSG.equals(pName) && (pressureAltimeter != - // -9999f)) { - // a = new Amount(pressureAltimeter, PRESSURE_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if ("WT".equals(pName) && this.seaSurfaceTemp != -9999f) { - a = new Amount(this.seaSurfaceTemp, TEMPERATURE_UNIT); - } else if ("WH".equals(pName)) { - a = new Amount(waveHeight, WAVE_UNIT); - } else if ("SWP".equals(pName)) { - a = new Amount(primarySwellWavePeriod, WAVE_UNIT); - } else if ("SWH".equals(pName)) { - a = new Amount(primarySwellWaveHeight, WAVE_UNIT); - // } else if ("PCHNG".equals(pName) && pressChange3Hour != MISSING) - // { - // a = new Amount(pressChange3Hour, PRESSURE_UNIT); - } else if ("PKWND".equals(paramName) && maxWindSpeed != MISSING) { - a = new Amount(maxWindSpeed, WIND_SPEED_UNIT); - } else if ("SWS".equals(paramName) || "SWGS".equals(paramName)) { - a = new Amount(1, WIND_SPEED_UNIT); - } else if ("SWD".equals(paramName) && primarySwellWaveDir != MISSING) { - a = new Amount(primarySwellWaveDir, WIND_DIR_UNIT); - } - - return a; - } - - /** - * @return the isNew - */ - public boolean getIsNew() { - return isNew; - } - - /** - * @return the cwa - */ - public String getCwa() { - return cwa; - } - - /** - * @param monitorUse - * the monitorUse to set - */ - public void setMonitorUse(String monitorUse) { - this.monitorUse = monitorUse; - } - - /** - * @return the monitorUse - */ - public String getMonitorUse() { - return monitorUse; - } - - /** - * @return the stnName - */ - public String getStnName() { - return stnName; - } - - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } - - /** - * @param platformId - * the platformId to set - */ - public void setPlatformId(String platformId) { - this.platformId = platformId; - } - - /** - * @return the platformId - */ - public String getPlatformId() { - return platformId; - } - - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } - - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } - - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } - - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } - - /** - * @return the isStationary - */ - public boolean isStationary() { - return isStationary; - } - - /** - * @return the refHour - */ - public Calendar getRefHour() { - return refHour; - } - - /** - * @return the rawMessage - */ - public String getRawMessage() { - return rawMessage; - } - - /** - * @return the windSpeed - */ - public float getWindSpeed() { - return windSpeed; - } - - /** - * @return the windGust - */ - public float getWindGust() { - return windGust; - } - - /** - * @return the maxWindSpeed - */ - public float getMaxWindSpeed() { - return maxWindSpeed; - } - - /** - * @return the windDir - */ - public float getWindDir() { - return windDir; - } - - /** - * @return the windChill - */ - public float getWindChill() { - return windChill; - } - - // /** - // * @return the highResWaveHeight - // */ - // public float getHighResWaveHeight() { - // return highResWaveHeight; - // } - - /** - * @return the waveSteepness - */ - public float getWaveSteepness() { - return waveSteepness; - } - - /** - * @return the visibility - */ - public float getVisibility() { - return visibility; - } - - /** - * @return the temperature - */ - public float getTemperature() { - return temperature; - } - - /** - * @return the waveHeight - */ - public Double getWaveHeight() { - return waveHeight; - } - - /** - * @return the wavePeriod - */ - public Integer getWavePeriod() { - return wavePeriod; - } - - /** - * @return the primarySwellWaveDir - */ - public Double getPrimarySwellWaveDir() { - return primarySwellWaveDir; - } - - /** - * @return the primarySwellWavePeriod - */ - public Integer getPrimarySwellWavePeriod() { - return primarySwellWavePeriod; - } - - /** - * @return the primarySwellWaveHeight - */ - public Double getPrimarySwellWaveHeight() { - return primarySwellWaveHeight; - } - - /** - * @return the secondarySwellWaveDir - */ - public Double getSecondarySwellWaveDir() { - return secondarySwellWaveDir; - } - - /** - * @return the secondarySwellWavePeriod - */ - public Integer getSecondarySwellWavePeriod() { - return secondarySwellWavePeriod; - } - - /** - * @return the secondarySwellWaveHeight - */ - public Double getSecondarySwellWaveHeight() { - return secondarySwellWaveHeight; - } - - // /** - // * @return the pressure - // */ - // public float getPressure() { - // return pressure; - // } - // - // - // /** - // * @return the pressChangeChar - // */ - // public String getPressChangeChar() { - // return pressChangeChar; - // } - - /** - * @return the dewpoint - */ - public float getDewpoint() { - return dewpoint; - } - - /** - * @return the seaSurfaceTemp - */ - public float getSeaSurfaceTemp() { - return seaSurfaceTemp; - } - - /** - * @return the seaLevelPress - */ - public float getSeaLevelPress() { - return seaLevelPress; - } - - /** - * @param pressureAltimeter - * the pressureAltimeter to set - */ - public void setPressureAltimeter(float pressureAltimeter) { - this.pressureAltimeter = pressureAltimeter; - } - - /** - * @return the pressureAltimeter - */ - public float getPressureAltimeter() { - return pressureAltimeter; - } - - /** - * @param pressChange3Hour - * the pressChange3Hour to set - */ - public void setPressChange3Hour(float pressChange3Hour) { - this.pressChange3Hour = pressChange3Hour; - } - - /** - * @return the pressChange3Hour - */ - public float getPressChange3Hour() { - return pressChange3Hour; - } - - /** - * @return the snowDepth - */ - public float getSnowDepth() { - return snowDepth; - } - - /** - * @return the snincrHourly - */ - public float getSnincrHourly() { - return snincrHourly; - } - - /** - * @return the snincrTotal - */ - public float getSnincrTotal() { - return snincrTotal; - } - - /** - * @return the frostbiteTime - */ - public float getFrostbiteTime() { - return frostbiteTime; - } - - /** - * @return the relativeHumidity - */ - public float getRelativeHumidity() { - return relativeHumidity; - } - - /** - * @param ceiling - * the ceiling to set - */ - public void setCeiling(float ceiling) { - this.ceiling = ceiling; - } - - /** - * @return the ceiling - */ - public float getCeiling() { - return ceiling; - } - - /** - * @return the dewpointDepr - */ - public float getDewpointDepr() { - return dewpointDepr; - } - - /** - * @param isNew - * the isNew to set - */ - public void setIsNew(boolean isNew) { - this.isNew = isNew; - } - - /** - * @param cwa - * the cwa to set - */ - public void setCwa(String cwa) { - this.cwa = cwa; - } - - /** - * @param stnName - * the stnName to set - */ - public void setStnName(String stnName) { - this.stnName = stnName; - } - - /** - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - /** - * @param isStationary - * the isStationary to set - */ - public void setIsStationary(boolean isStationary) { - this.isStationary = isStationary; - } - - public boolean getIsStationary() { - return isStationary; - } - - /** - * @param timeObs - * the timeObs to set - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } - - /** - * @return the timeObs - */ - public Calendar getTimeObs() { - return timeObs; - } - - /** - * @param refHour - * the refHour to set - */ - public void setRefHour(Calendar refHour) { - this.refHour = refHour; - } - - /** - * @param rawMessage - * the rawMessage to set - */ - public void setRawMessage(String rawMessage) { - this.rawMessage = rawMessage; - } - - /** - * @param windSpeed - * the windSpeed to set - */ - public void setWindSpeed(float windSpeed) { - this.windSpeed = windSpeed; - } - - /** - * @param windGust - * the windGust to set - */ - public void setWindGust(float windGust) { - this.windGust = windGust; - } - - /** - * @param maxWindSpeed - * the maxWindSpeed to set - */ - public void setMaxWindSpeed(float maxWindSpeed) { - this.maxWindSpeed = maxWindSpeed; - } - - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(float windDir) { - this.windDir = windDir; - } - - /** - * @param windChill - * the windChill to set - */ - public void setWindChill(float windChill) { - this.windChill = windChill; - } - - public void setHighResWaveHeight(float highResWaveHeight) { - this.highResWaveHeight = highResWaveHeight; - } - - public float getHighResWaveHeight() { - return highResWaveHeight; - } - - /** - * @param waveSteepness - * the waveSteepness to set - */ - public void setWaveSteepness(float waveSteepness) { - this.waveSteepness = waveSteepness; - } - - /** - * @param visibility - * the visibility to set - */ - public void setVisibility(float visibility) { - this.visibility = visibility; - } - - /** - * @param horzVisibility - * the horzVisibility to set - */ - public void setHorzVisibility(float horzVisibility) { - this.horzVisibility = horzVisibility; - } - - /** - * @return the horzVisibility - */ - public float getHorzVisibility() { - return horzVisibility; - } - - /** - * @param temperature - * the temperature to set - */ - public void setTemperature(float temperature) { - this.temperature = temperature; - } - - /** - * @param waveHeight - * the waveHeight to set - */ - public void setWaveHeight(Double waveHeight) { - this.waveHeight = waveHeight; - } - - /** - * @param wavePeriod - * the wavePeriod to set - */ - public void setWavePeriod(Integer wavePeriod) { - this.wavePeriod = wavePeriod; - } - - /** - * @param primarySwellWaveDir - * the primarySwellWaveDir to set - */ - public void setPrimarySwellWaveDir(Double primarySwellWaveDir) { - this.primarySwellWaveDir = primarySwellWaveDir; - } - - /** - * @param primarySwellWavePeriod - * the primarySwellWavePeriod to set - */ - public void setPrimarySwellWavePeriod(Integer primarySwellWavePeriod) { - this.primarySwellWavePeriod = primarySwellWavePeriod; - } - - /** - * @param primarySwellWaveHeight - * the primarySwellWaveHeight to set - */ - public void setPrimarySwellWaveHeight(Double primarySwellWaveHeight) { - this.primarySwellWaveHeight = primarySwellWaveHeight; - } - - /** - * @param secondarySwellWaveDir - * the secondarySwellWaveDir to set - */ - public void setSecondarySwellWaveDir(Double secondarySwellWaveDir) { - this.secondarySwellWaveDir = secondarySwellWaveDir; - } - - /** - * @param secondarySwellWavePeriod - * the secondarySwellWavePeriod to set - */ - public void setSecondarySwellWavePeriod(Integer secondarySwellWavePeriod) { - this.secondarySwellWavePeriod = secondarySwellWavePeriod; - } - - /** - * @param secondarySwellWaveHeight - * the secondarySwellWaveHeight to set - */ - public void setSecondarySwellWaveHeight(Double secondarySwellWaveHeight) { - this.secondarySwellWaveHeight = secondarySwellWaveHeight; - } - - /** - * @param pressChangeChar - * the pressChangeChar to set - */ - public void setPressChangeChar(String pressChangeChar) { - this.pressChangeChar = pressChangeChar; - } - - /** - * @return the pressChangeChar - */ - public String getPressChangeChar() { - return pressChangeChar; - } - - /** - * @param dewpoint - * the dewpoint to set - */ - public void setDewpoint(float dewpoint) { - this.dewpoint = dewpoint; - } - - /** - * @param seaSurfaceTemp - * the seaSurfaceTemp to set - */ - public void setSeaSurfaceTemp(float seaSurfaceTemp) { - this.seaSurfaceTemp = seaSurfaceTemp; - } - - /** - * @param seaLevelPress - * the seaLevelPress to set - */ - public void setSeaLevelPress(float seaLevelPress) { - this.seaLevelPress = seaLevelPress; - } - - /** - * @param hourlyPrecip - * the hourlyPrecip to set - */ - public void setHourlyPrecip(float hourlyPrecip) { - this.hourlyPrecip = hourlyPrecip; - } - - /** - * @return the hourlyPrecip - */ - public float getHourlyPrecip() { - return hourlyPrecip; - } - - /** - * @param snowDepth - * the snowDepth to set - */ - public void setSnowDepth(float snowDepth) { - this.snowDepth = snowDepth; - } - - /** - * @param snincrHourly - * the snincrHourly to set - */ - public void setSnincrHourly(float snincrHourly) { - this.snincrHourly = snincrHourly; - } - - /** - * @param snincrTotal - * the snincrTotal to set - */ - public void setSnincrTotal(float snincrTotal) { - this.snincrTotal = snincrTotal; - } - - /** - * @param frostbiteTime - * the frostbiteTime to set - */ - public void setFrostbiteTime(float frostbiteTime) { - this.frostbiteTime = frostbiteTime; - } - - /** - * @param relativeHumidity - * the relativeHumidity to set - */ - public void setRelativeHumidity(float relativeHumidity) { - this.relativeHumidity = relativeHumidity; - } - - /** - * @param presWeather - * the presWeather to set - */ - public void setPresWeather(String[] presWeather) { - this.presWeather = presWeather; - } - - /** - * @return the presWeather - */ - public String[] getPresWeather() { - return presWeather; - } - - /** - * @param dewpointDepr - * the dewpointDepr to set - */ - public void setDewpointDepr(float dewpointDepr) { - this.dewpointDepr = dewpointDepr; - } - - /** - * @return the skyCover - */ - public String[] getSkyCover() { - return skyCover; - } - - /** - * @param skyCover - * the skyCover to set - */ - public void setSkyCover(String[] skyCover) { - this.skyCover = skyCover; - } - - /** - * @param totCloudAmount - * the totCloudAmount to set - */ - public void setTotCloudAmount(int totCloudAmount) { - this.totCloudAmount = totCloudAmount; - } - - /** - * @return the totCloudAmount - */ - public int getTotCloudAmount() { - return totCloudAmount; - } - - @Override - public Collection getValues(String paramName) { - return null; - } - - @Override - public String getString(String paramName) { - return null; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - @Override - public ISpatialObject getSpatialObject() { - return location; - } - - /** - * @param pointDataView - * the pointDataView to set - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } - - /** - * @return the pointDataView - */ - @Override - public PointDataView getPointDataView() { - return pointDataView; - } - - /** - * Used for debugging. - */ - @Override - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append("fssObsRec:\n\t"); - if (this != null) { - sb.append(this.getDataURI() + "\n\t"); - sb.append(this.getLocation().getStationId() + " ===> " - + this.getStnName() + "\n\t"); - sb.append("Latitude = " + this.getLocation().getLatitude() + "\n\t"); - sb.append("Longitude = " + this.getLocation().getLongitude() - + "\n\t"); - sb.append(this.getReportType() + "\n\t"); - sb.append("Visibility = " + this.getVisibility() + "\n\t"); - sb.append("Temperature = " + this.getTemperature() + "\n\t"); - sb.append(this.getDataTime().getRefTime() + "\n"); - } - return sb.toString(); - } + private static final HashMap PARM_MAP = new HashMap(); + static { + PARM_MAP.put("NLAT", STA_LAT); + PARM_MAP.put("NLON", STA_LON); + PARM_MAP.put("rawMessage", "rawMessage"); + } + + /** is feature new **/ + @Transient + @DynamicSerializeElement + @XmlElement + public boolean isNew = true; + + // Current CWA (WFO) + @Column + @DataURI(position = 2) + @DynamicSerializeElement + @XmlElement(nillable = false) + private String cwa; + + // Monitor which should use this station record + // fog = "fog" + // safeseas = "ss" + // snow = "snow" + @Column + @DataURI(position = 4) + @DynamicSerializeElement + @XmlElement + private String monitorUse = ""; + + // Station name + @Column + @DynamicSerializeElement + @XmlElement + private String stnName; + + /* From ============ObReport================= */ + + @XmlElement + @DynamicSerializeElement + @Column + @DataURI(position = 1) + protected String reportType; + + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; + + // Observing platform identifier (same as stationID) + @Transient + @XmlElement + @DynamicSerializeElement + private String platformId; + + // Indicator of whether observing platform is stationary + @Transient + @DynamicSerializeElement + @XmlElement + private boolean isStationary; + + // Actual time of the observation + @Transient + @DynamicSerializeElement + @XmlElement + private Calendar timeObs; + + // Time of the observation to the nearest hour. + @XmlElement + @DynamicSerializeElement + @Column + private Calendar refHour; + + // Raw message + @Transient + @DynamicSerializeElement + @XmlElement + private String rawMessage; + + // Observed wind speed in knots + @Transient + @DynamicSerializeElement + @XmlElement + private float windSpeed = -9999;; + + // Wind gust in knots + @Transient + @DynamicSerializeElement + @XmlElement + private float windGust = -9999;; + + // Observed maximum wind speed in knots + @Transient + @DynamicSerializeElement + @XmlElement + private float maxWindSpeed = -9999; + + // Observed wind direction in azimuth degrees + @Transient + @DynamicSerializeElement + @XmlElement + private float windDir; + + // Observed wind chill in Fahrenheit + @Transient + @DynamicSerializeElement + @XmlElement + private float windChill = -9999; + + // Observed high resolution wave height in + @Transient + @DynamicSerializeElement + @XmlElement + private float highResWaveHeight = -9999; + + // Observed wave steepness in seconds ??? None + @Transient + @DynamicSerializeElement + @XmlElement + private float waveSteepness = -9999; + + // Observed visibility in Statute miles + @Transient + @DynamicSerializeElement + @XmlElement + private float visibility = -9999; + + // Observed visibility in meters for Maritime obs. + @Transient + @DynamicSerializeElement + @XmlElement + private float horzVisibility = -9999; + + // Observed temperature in degrees in Farenheit + @Transient + @DynamicSerializeElement + @XmlElement + private float temperature = -9999; + + // in feet + @Transient + @XmlElement + @DynamicSerializeElement + private Double waveHeight = -9999.0; + + // in seconds + @Transient + @XmlElement + @DynamicSerializeElement + private Integer wavePeriod = -9999; + + // in Azimuth degrees + @Transient + @XmlElement + @DynamicSerializeElement + private Double primarySwellWaveDir = -9999.0; + + // in seconds + @Transient + @XmlElement + @DynamicSerializeElement + private Integer primarySwellWavePeriod = -9999; + + // in feet + @Transient + @XmlElement + @DynamicSerializeElement + private Double primarySwellWaveHeight = -9999.0; + + // in Azimuth degrees + @Transient + @XmlElement + @DynamicSerializeElement + private Double secondarySwellWaveDir = -9999.0; + + // in seconds + @Transient + @XmlElement + @DynamicSerializeElement + private Integer secondarySwellWavePeriod = -9999; + + // in feet + @Transient + @XmlElement + @DynamicSerializeElement + private Double secondarySwellWaveHeight = -9999.0; + + // Three-hour pressure change in thousandths of an inch of mercury ???? + @Transient + @DynamicSerializeElement + @XmlElement + private float pressChange3Hour = -9999f; + + // Pressure change character for metar plot model + /** A string denoting the pressure tendency(rising or falling) */ + @Transient + @DynamicSerializeElement + @XmlElement + private String pressChangeChar; + + // Observed dewpoint in degrees Farenheit + @Transient + @DynamicSerializeElement + @XmlElement + private float dewpoint = -9999f; + + // Observed sea surface temperature in degrees in Farenheit + @Transient + @DynamicSerializeElement + @XmlElement + private float seaSurfaceTemp = -9999f; + + // the sea level pressure in hPa + @XmlElement + @DynamicSerializeElement + @Transient + private float seaLevelPress = -9999f; + + // Altimeter setting in mm Hg. + @Transient + @XmlElement + @DynamicSerializeElement + private float pressureAltimeter = -9999f; + + // Observed hourly precipitation in inches + @Transient + @DynamicSerializeElement + @XmlElement + private float hourlyPrecip = -9999f; + + // Observed snow depth in inch + @Transient + @DynamicSerializeElement + @XmlElement + private float snowDepth = -9999f; + + // Observed snow increasing rapidly, hourly total in inches + @Transient + @DynamicSerializeElement + @XmlElement + private float snincrHourly = -9999f; + + // Observed snow increasing rapidly, total in inches + @Transient + @DynamicSerializeElement + @XmlElement + private float snincrTotal = -9999f; + + // Observed frostbite time in minutes + @Transient + @DynamicSerializeElement + @XmlElement + private float frostbiteTime; + + // present weather conditions for metar plot model + @Transient + @DynamicSerializeElement + @XmlElement + private String[] presWeather; + + // Observed relative humidity in percent + @Transient + @DynamicSerializeElement + @XmlElement + private float relativeHumidity = -9999f; + + // Observed ceiling in feet above ground level + @Transient + @DynamicSerializeElement + @XmlElement + private float ceiling = -9999f; + + // Observed dewpoint depression in Farenheit + @Transient + @DynamicSerializeElement + @XmlElement + private float dewpointDepr = -9999f; + + @XmlElement + @DynamicSerializeElement + @Transient + private String[] skyCover; + + @XmlElement + @DynamicSerializeElement + @Transient + private int totCloudAmount = -9999; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + // ---------------------------------------------------------------------------------------------------- + public FSSObsRecord() { + } + + public FSSObsRecord(String uri) { + super(uri); + } + + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } + + @Override + public Amount getValue(String paramName) { + Amount a = null; + + String pName = PARM_MAP.get(paramName); + + if (SFC_TEMP.equals(pName) && (temperature != -9999f)) { + a = new Amount(temperature, TEMPERATURE_UNIT); + } else if (SFC_DWPT.equals(pName) && (dewpoint != -9999f)) { + a = new Amount(dewpoint, TEMPERATURE_UNIT); + } else if (SFC_WNDSPD.equals(pName) && (windSpeed != -9999f)) { + a = new Amount(windSpeed, WIND_SPEED_UNIT); + } else if (SFC_WNDDIR.equals(pName) && (windDir != -9999f)) { + a = new Amount(windDir, WIND_DIR_UNIT); + } else if (SFC_WNDGST.equals(pName) && (windGust != -9999f)) { + a = new Amount(windGust, WIND_SPEED_UNIT); + } else if (PRES_SLP.equals(pName) && (seaLevelPress != -9999f)) { + a = new Amount(seaLevelPress, PRESSURE_UNIT); + // } else if (PRES_ALTSG.equals(pName) && (pressureAltimeter != + // -9999f)) { + // a = new Amount(pressureAltimeter, PRESSURE_UNIT); + } else if (STA_LAT.equals(pName)) { + a = new Amount(this.getLatitude(), LOCATION_UNIT); + } else if (STA_LON.equals(pName)) { + a = new Amount(this.getLongitude(), LOCATION_UNIT); + } else if ("WT".equals(pName) && (this.seaSurfaceTemp != -9999f)) { + a = new Amount(this.seaSurfaceTemp, TEMPERATURE_UNIT); + } else if ("WH".equals(pName)) { + a = new Amount(waveHeight, WAVE_UNIT); + } else if ("SWP".equals(pName)) { + a = new Amount(primarySwellWavePeriod, WAVE_UNIT); + } else if ("SWH".equals(pName)) { + a = new Amount(primarySwellWaveHeight, WAVE_UNIT); + // } else if ("PCHNG".equals(pName) && pressChange3Hour != MISSING) + // { + // a = new Amount(pressChange3Hour, PRESSURE_UNIT); + } else if ("PKWND".equals(paramName) && (maxWindSpeed != MISSING)) { + a = new Amount(maxWindSpeed, WIND_SPEED_UNIT); + } else if ("SWS".equals(paramName) || "SWGS".equals(paramName)) { + a = new Amount(1, WIND_SPEED_UNIT); + } else if ("SWD".equals(paramName) && (primarySwellWaveDir != MISSING)) { + a = new Amount(primarySwellWaveDir, WIND_DIR_UNIT); + } + + return a; + } + + /** + * @return the isNew + */ + public boolean getIsNew() { + return isNew; + } + + /** + * @return the cwa + */ + public String getCwa() { + return cwa; + } + + /** + * @param monitorUse + * the monitorUse to set + */ + public void setMonitorUse(String monitorUse) { + this.monitorUse = monitorUse; + } + + /** + * @return the monitorUse + */ + public String getMonitorUse() { + return monitorUse; + } + + /** + * @return the stnName + */ + public String getStnName() { + return stnName; + } + + /** + * @return the reportType + */ + public String getReportType() { + return reportType; + } + + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } + + /** + * @param platformId + * the platformId to set + */ + public void setPlatformId(String platformId) { + this.platformId = platformId; + } + + /** + * @return the platformId + */ + public String getPlatformId() { + return platformId; + } + + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } + + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } + + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } + + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } + + /** + * @return the isStationary + */ + public boolean isStationary() { + return isStationary; + } + + /** + * @return the refHour + */ + public Calendar getRefHour() { + return refHour; + } + + /** + * @return the rawMessage + */ + public String getRawMessage() { + return rawMessage; + } + + /** + * @return the windSpeed + */ + public float getWindSpeed() { + return windSpeed; + } + + /** + * @return the windGust + */ + public float getWindGust() { + return windGust; + } + + /** + * @return the maxWindSpeed + */ + public float getMaxWindSpeed() { + return maxWindSpeed; + } + + /** + * @return the windDir + */ + public float getWindDir() { + return windDir; + } + + /** + * @return the windChill + */ + public float getWindChill() { + return windChill; + } + + /** + * @return the waveSteepness + */ + public float getWaveSteepness() { + return waveSteepness; + } + + /** + * @return the visibility + */ + public float getVisibility() { + return visibility; + } + + /** + * @return the temperature + */ + public float getTemperature() { + return temperature; + } + + /** + * @return the waveHeight + */ + public Double getWaveHeight() { + return waveHeight; + } + + /** + * @return the wavePeriod + */ + public Integer getWavePeriod() { + return wavePeriod; + } + + /** + * @return the primarySwellWaveDir + */ + public Double getPrimarySwellWaveDir() { + return primarySwellWaveDir; + } + + /** + * @return the primarySwellWavePeriod + */ + public Integer getPrimarySwellWavePeriod() { + return primarySwellWavePeriod; + } + + /** + * @return the primarySwellWaveHeight + */ + public Double getPrimarySwellWaveHeight() { + return primarySwellWaveHeight; + } + + /** + * @return the secondarySwellWaveDir + */ + public Double getSecondarySwellWaveDir() { + return secondarySwellWaveDir; + } + + /** + * @return the secondarySwellWavePeriod + */ + public Integer getSecondarySwellWavePeriod() { + return secondarySwellWavePeriod; + } + + /** + * @return the secondarySwellWaveHeight + */ + public Double getSecondarySwellWaveHeight() { + return secondarySwellWaveHeight; + } + + /** + * @return the dewpoint + */ + public float getDewpoint() { + return dewpoint; + } + + /** + * @return the seaSurfaceTemp + */ + public float getSeaSurfaceTemp() { + return seaSurfaceTemp; + } + + /** + * @return the seaLevelPress + */ + public float getSeaLevelPress() { + return seaLevelPress; + } + + /** + * @param pressureAltimeter + * the pressureAltimeter to set + */ + public void setPressureAltimeter(float pressureAltimeter) { + this.pressureAltimeter = pressureAltimeter; + } + + /** + * @return the pressureAltimeter + */ + public float getPressureAltimeter() { + return pressureAltimeter; + } + + /** + * @param pressChange3Hour + * the pressChange3Hour to set + */ + public void setPressChange3Hour(float pressChange3Hour) { + this.pressChange3Hour = pressChange3Hour; + } + + /** + * @return the pressChange3Hour + */ + public float getPressChange3Hour() { + return pressChange3Hour; + } + + /** + * @return the snowDepth + */ + public float getSnowDepth() { + return snowDepth; + } + + /** + * @return the snincrHourly + */ + public float getSnincrHourly() { + return snincrHourly; + } + + /** + * @return the snincrTotal + */ + public float getSnincrTotal() { + return snincrTotal; + } + + /** + * @return the frostbiteTime + */ + public float getFrostbiteTime() { + return frostbiteTime; + } + + /** + * @return the relativeHumidity + */ + public float getRelativeHumidity() { + return relativeHumidity; + } + + /** + * @param ceiling + * the ceiling to set + */ + public void setCeiling(float ceiling) { + this.ceiling = ceiling; + } + + /** + * @return the ceiling + */ + public float getCeiling() { + return ceiling; + } + + /** + * @return the dewpointDepr + */ + public float getDewpointDepr() { + return dewpointDepr; + } + + /** + * @param isNew + * the isNew to set + */ + public void setIsNew(boolean isNew) { + this.isNew = isNew; + } + + /** + * @param cwa + * the cwa to set + */ + public void setCwa(String cwa) { + this.cwa = cwa; + } + + /** + * @param stnName + * the stnName to set + */ + public void setStnName(String stnName) { + this.stnName = stnName; + } + + /** + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + /** + * @param isStationary + * the isStationary to set + */ + public void setIsStationary(boolean isStationary) { + this.isStationary = isStationary; + } + + public boolean getIsStationary() { + return isStationary; + } + + /** + * @param timeObs + * the timeObs to set + */ + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } + + /** + * @return the timeObs + */ + public Calendar getTimeObs() { + return timeObs; + } + + /** + * @param refHour + * the refHour to set + */ + public void setRefHour(Calendar refHour) { + this.refHour = refHour; + } + + /** + * @param rawMessage + * the rawMessage to set + */ + public void setRawMessage(String rawMessage) { + this.rawMessage = rawMessage; + } + + /** + * @param windSpeed + * the windSpeed to set + */ + public void setWindSpeed(float windSpeed) { + this.windSpeed = windSpeed; + } + + /** + * @param windGust + * the windGust to set + */ + public void setWindGust(float windGust) { + this.windGust = windGust; + } + + /** + * @param maxWindSpeed + * the maxWindSpeed to set + */ + public void setMaxWindSpeed(float maxWindSpeed) { + this.maxWindSpeed = maxWindSpeed; + } + + /** + * @param windDir + * the windDir to set + */ + public void setWindDir(float windDir) { + this.windDir = windDir; + } + + /** + * @param windChill + * the windChill to set + */ + public void setWindChill(float windChill) { + this.windChill = windChill; + } + + public void setHighResWaveHeight(float highResWaveHeight) { + this.highResWaveHeight = highResWaveHeight; + } + + public float getHighResWaveHeight() { + return highResWaveHeight; + } + + /** + * @param waveSteepness + * the waveSteepness to set + */ + public void setWaveSteepness(float waveSteepness) { + this.waveSteepness = waveSteepness; + } + + /** + * @param visibility + * the visibility to set + */ + public void setVisibility(float visibility) { + this.visibility = visibility; + } + + /** + * @param horzVisibility + * the horzVisibility to set + */ + public void setHorzVisibility(float horzVisibility) { + this.horzVisibility = horzVisibility; + } + + /** + * @return the horzVisibility + */ + public float getHorzVisibility() { + return horzVisibility; + } + + /** + * @param temperature + * the temperature to set + */ + public void setTemperature(float temperature) { + this.temperature = temperature; + } + + /** + * @param waveHeight + * the waveHeight to set + */ + public void setWaveHeight(Double waveHeight) { + this.waveHeight = waveHeight; + } + + /** + * @param wavePeriod + * the wavePeriod to set + */ + public void setWavePeriod(Integer wavePeriod) { + this.wavePeriod = wavePeriod; + } + + /** + * @param primarySwellWaveDir + * the primarySwellWaveDir to set + */ + public void setPrimarySwellWaveDir(Double primarySwellWaveDir) { + this.primarySwellWaveDir = primarySwellWaveDir; + } + + /** + * @param primarySwellWavePeriod + * the primarySwellWavePeriod to set + */ + public void setPrimarySwellWavePeriod(Integer primarySwellWavePeriod) { + this.primarySwellWavePeriod = primarySwellWavePeriod; + } + + /** + * @param primarySwellWaveHeight + * the primarySwellWaveHeight to set + */ + public void setPrimarySwellWaveHeight(Double primarySwellWaveHeight) { + this.primarySwellWaveHeight = primarySwellWaveHeight; + } + + /** + * @param secondarySwellWaveDir + * the secondarySwellWaveDir to set + */ + public void setSecondarySwellWaveDir(Double secondarySwellWaveDir) { + this.secondarySwellWaveDir = secondarySwellWaveDir; + } + + /** + * @param secondarySwellWavePeriod + * the secondarySwellWavePeriod to set + */ + public void setSecondarySwellWavePeriod(Integer secondarySwellWavePeriod) { + this.secondarySwellWavePeriod = secondarySwellWavePeriod; + } + + /** + * @param secondarySwellWaveHeight + * the secondarySwellWaveHeight to set + */ + public void setSecondarySwellWaveHeight(Double secondarySwellWaveHeight) { + this.secondarySwellWaveHeight = secondarySwellWaveHeight; + } + + /** + * @param pressChangeChar + * the pressChangeChar to set + */ + public void setPressChangeChar(String pressChangeChar) { + this.pressChangeChar = pressChangeChar; + } + + /** + * @return the pressChangeChar + */ + public String getPressChangeChar() { + return pressChangeChar; + } + + /** + * @param dewpoint + * the dewpoint to set + */ + public void setDewpoint(float dewpoint) { + this.dewpoint = dewpoint; + } + + /** + * @param seaSurfaceTemp + * the seaSurfaceTemp to set + */ + public void setSeaSurfaceTemp(float seaSurfaceTemp) { + this.seaSurfaceTemp = seaSurfaceTemp; + } + + /** + * @param seaLevelPress + * the seaLevelPress to set + */ + public void setSeaLevelPress(float seaLevelPress) { + this.seaLevelPress = seaLevelPress; + } + + /** + * @param hourlyPrecip + * the hourlyPrecip to set + */ + public void setHourlyPrecip(float hourlyPrecip) { + this.hourlyPrecip = hourlyPrecip; + } + + /** + * @return the hourlyPrecip + */ + public float getHourlyPrecip() { + return hourlyPrecip; + } + + /** + * @param snowDepth + * the snowDepth to set + */ + public void setSnowDepth(float snowDepth) { + this.snowDepth = snowDepth; + } + + /** + * @param snincrHourly + * the snincrHourly to set + */ + public void setSnincrHourly(float snincrHourly) { + this.snincrHourly = snincrHourly; + } + + /** + * @param snincrTotal + * the snincrTotal to set + */ + public void setSnincrTotal(float snincrTotal) { + this.snincrTotal = snincrTotal; + } + + /** + * @param frostbiteTime + * the frostbiteTime to set + */ + public void setFrostbiteTime(float frostbiteTime) { + this.frostbiteTime = frostbiteTime; + } + + /** + * @param relativeHumidity + * the relativeHumidity to set + */ + public void setRelativeHumidity(float relativeHumidity) { + this.relativeHumidity = relativeHumidity; + } + + /** + * @param presWeather + * the presWeather to set + */ + public void setPresWeather(String[] presWeather) { + this.presWeather = presWeather; + } + + /** + * @return the presWeather + */ + public String[] getPresWeather() { + return presWeather; + } + + /** + * @param dewpointDepr + * the dewpointDepr to set + */ + public void setDewpointDepr(float dewpointDepr) { + this.dewpointDepr = dewpointDepr; + } + + /** + * @return the skyCover + */ + public String[] getSkyCover() { + return skyCover; + } + + /** + * @param skyCover + * the skyCover to set + */ + public void setSkyCover(String[] skyCover) { + this.skyCover = skyCover; + } + + /** + * @param totCloudAmount + * the totCloudAmount to set + */ + public void setTotCloudAmount(int totCloudAmount) { + this.totCloudAmount = totCloudAmount; + } + + /** + * @return the totCloudAmount + */ + public int getTotCloudAmount() { + return totCloudAmount; + } + + @Override + public Collection getValues(String paramName) { + return null; + } + + @Override + public String getString(String paramName) { + return null; + } + + @Override + public String[] getStrings(String paramName) { + return null; + } + + @Override + public ISpatialObject getSpatialObject() { + return location; + } + + /** + * @param pointDataView + * the pointDataView to set + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + /** + * @return the pointDataView + */ + @Override + public PointDataView getPointDataView() { + return pointDataView; + } + + /** + * Used for debugging. + */ + @Override + public String toString() { + StringBuffer sb = new StringBuffer(); + sb.append("fssObsRec:\n\t"); + if (this != null) { + sb.append(this.getDataURI() + "\n\t"); + sb.append(this.getLocation().getStationId() + " ===> " + + this.getStnName() + "\n\t"); + sb.append("Latitude = " + this.getLocation().getLatitude() + "\n\t"); + sb.append("Longitude = " + this.getLocation().getLongitude() + + "\n\t"); + sb.append(this.getReportType() + "\n\t"); + sb.append("Visibility = " + this.getVisibility() + "\n\t"); + sb.append("Temperature = " + this.getTemperature() + "\n\t"); + sb.append(this.getDataTime().getRefTime() + "\n"); + } + return sb.toString(); + } @Override @Column @@ -1268,4 +1237,9 @@ public class FSSObsRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "fssobs"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java index 7cf79598ea..489dfb9319 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java @@ -77,6 +77,7 @@ import com.raytheon.uf.common.time.TimeRange; * PluginDataObject. * May 13, 2013 1869 bsteffen Remove DataURI column from GFE. * Jun 20, 2013 2127 rjpeter Added OnDelete annotation. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -151,7 +152,6 @@ public class GFERecord extends PluginDataObject { * The parm Info */ public GFERecord(ParmID parmId, TimeRange timeRange) { - this.pluginName = "gfe"; Calendar cal = (Calendar) Calendar.getInstance( TimeZone.getTimeZone("GMT")).clone(); cal.setTime(timeRange.getStart()); @@ -276,4 +276,9 @@ public class GFERecord extends PluginDataObject { } } } + + @Override + public String getPluginName() { + return "gfe"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.goessounding/src/com/raytheon/uf/common/dataplugin/goessounding/GOESSounding.java b/edexOsgi/com.raytheon.uf.common.dataplugin.goessounding/src/com/raytheon/uf/common/dataplugin/goessounding/GOESSounding.java index d8f8be8d89..62e0466b04 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.goessounding/src/com/raytheon/uf/common/dataplugin/goessounding/GOESSounding.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.goessounding/src/com/raytheon/uf/common/dataplugin/goessounding/GOESSounding.java @@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.Geometry; * May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings. * Jul 16, 2013 2181 bsteffen Convert geometry types to use hibernate- * spatial + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -78,348 +79,348 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "goessounding", - indexes = { - @Index(name = "goessounding_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "goessounding", indexes = { @Index(name = "goessounding_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class GOESSounding extends PersistablePluginDataObject implements ISpatialEnabled, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DataURI(position = 1, embedded = true) - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 1, embedded = true) + @DynamicSerializeElement + private SurfaceObsLocation location; - // The bounding box that contains this observation. + // The bounding box that contains this observation. @Column @Type(type = "org.hibernatespatial.GeometryUserType") - @DynamicSerializeElement - private Geometry boxGeometry; + @DynamicSerializeElement + private Geometry boxGeometry; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @Transient - @DynamicSerializeElement - private String wmoHeader; + // Text of the WMO header + @Transient + @DynamicSerializeElement + private String wmoHeader; - @Transient - @DynamicSerializeElement - private Integer satId; + @Transient + @DynamicSerializeElement + private Integer satId; - @Transient - @DynamicSerializeElement - private Integer satInstrument; + @Transient + @DynamicSerializeElement + private Integer satInstrument; - @Transient - @DynamicSerializeElement - private Integer qualityInfo; + @Transient + @DynamicSerializeElement + private Integer qualityInfo; - @Transient - @DynamicSerializeElement - private Integer sounderChannels; + @Transient + @DynamicSerializeElement + private Integer sounderChannels; - @Transient - @DynamicSerializeElement - private Double solarElevation; + @Transient + @DynamicSerializeElement + private Double solarElevation; - // The profiler observation time. - @Transient - @DynamicSerializeElement - private Calendar timeObs; + // The profiler observation time. + @Transient + @DynamicSerializeElement + private Calendar timeObs; - @Transient - @DynamicSerializeElement - private List soundingLevels; + @Transient + @DynamicSerializeElement + private List soundingLevels; - /** - * Create an empty ProfilerObs object. - */ - public GOESSounding() { - } + /** + * Create an empty ProfilerObs object. + */ + public GOESSounding() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public GOESSounding(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public GOESSounding(String uri) { + super(uri); + } - /** - * Get the observation time for this data. - * - * @return The data observation time. - */ - public Calendar getTimeObs() { - return timeObs; - } + /** + * Get the observation time for this data. + * + * @return The data observation time. + */ + public Calendar getTimeObs() { + return timeObs; + } - /** - * Set the observation time for this data. - * - * @param timeObs - * The data observation time. - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } + /** + * Set the observation time for this data. + * + * @param timeObs + * The data observation time. + */ + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Was this location defined from the station catalog? False if not. - * - * @return Was this location defined from the station catalog? - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Was this location defined from the station catalog? False if not. + * + * @return Was this location defined from the station catalog? + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - /** - * Set the WMOHeader of the file that contained this data. - * - * @return The wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * Set the WMOHeader of the file that contained this data. + * + * @return The wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * Get the WMOHeader of the file that contained this data. - * - * @param wmoHeader - * The WMOHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * Get the WMOHeader of the file that contained this data. + * + * @param wmoHeader + * The WMOHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @return the satId - */ - public Integer getSatId() { - return satId; - } + /** + * @return the satId + */ + public Integer getSatId() { + return satId; + } - /** - * @param satId - * the satId to set - */ - public void setSatId(Integer satId) { - this.satId = satId; - } + /** + * @param satId + * the satId to set + */ + public void setSatId(Integer satId) { + this.satId = satId; + } - /** - * @return the satInstrument - */ - public Integer getSatInstrument() { - return satInstrument; - } + /** + * @return the satInstrument + */ + public Integer getSatInstrument() { + return satInstrument; + } - /** - * @param satInstrument - * the satInstrument to set - */ - public void setSatInstrument(Integer satInstrument) { - this.satInstrument = satInstrument; - } + /** + * @param satInstrument + * the satInstrument to set + */ + public void setSatInstrument(Integer satInstrument) { + this.satInstrument = satInstrument; + } - /** - * @return the qualityInfo - */ - public Integer getQualityInfo() { - return qualityInfo; - } + /** + * @return the qualityInfo + */ + public Integer getQualityInfo() { + return qualityInfo; + } - /** - * @param qualityInfo - * the qualityInfo to set - */ - public void setQualityInfo(Integer qualityInfo) { - this.qualityInfo = qualityInfo; - } + /** + * @param qualityInfo + * the qualityInfo to set + */ + public void setQualityInfo(Integer qualityInfo) { + this.qualityInfo = qualityInfo; + } - /** - * Get the satellite channels used to to create the sounding data. - * - *
-	 *  bit  Channel  Wavelength
-	 *   #            micrometers
-	 *   1       1      14.71
-	 *   2       2      14.37
-	 *   3       3      14.06
-	 *   4       4      13.64
-	 *   5       5      13.37
-	 *   6       6      12.66
-	 *   7       7      12.02
-	 *   8       8      11.03
-	 *   9       9       9.71
-	 *  10      10       7.43
-	 *  11      11       7.02
-	 *  12      12       6.51
-	 *  13      13       4.57
-	 *  14      14       4.52
-	 *  15      15       4.45
-	 *  16      16       4.13
-	 *  17      17       3.98
-	 *  18      18       3.74
-	 *  19      19       0.969
-	 *  All 20    Missing value
-	 * 
- * - * @return The sounder channels. - */ - public Integer getSounderChannels() { - return sounderChannels; - } + /** + * Get the satellite channels used to to create the sounding data. + * + *
+     *  bit  Channel  Wavelength
+     *   #            micrometers
+     *   1       1      14.71
+     *   2       2      14.37
+     *   3       3      14.06
+     *   4       4      13.64
+     *   5       5      13.37
+     *   6       6      12.66
+     *   7       7      12.02
+     *   8       8      11.03
+     *   9       9       9.71
+     *  10      10       7.43
+     *  11      11       7.02
+     *  12      12       6.51
+     *  13      13       4.57
+     *  14      14       4.52
+     *  15      15       4.45
+     *  16      16       4.13
+     *  17      17       3.98
+     *  18      18       3.74
+     *  19      19       0.969
+     *  All 20    Missing value
+     * 
+ * + * @return The sounder channels. + */ + public Integer getSounderChannels() { + return sounderChannels; + } - /** - * Get the satellite channels used to to create the sounding data. - * - * @param sounderChannels - * The sounder channels. - */ - public void setSounderChannels(Integer sounderChannels) { - this.sounderChannels = sounderChannels; - } + /** + * Get the satellite channels used to to create the sounding data. + * + * @param sounderChannels + * The sounder channels. + */ + public void setSounderChannels(Integer sounderChannels) { + this.sounderChannels = sounderChannels; + } - /** - * Get the bounding box that contains this observation. - * - * @return The bounding box Geometry. - */ - public Geometry getBoxGeometry() { - return boxGeometry; - } + /** + * Get the bounding box that contains this observation. + * + * @return The bounding box Geometry. + */ + public Geometry getBoxGeometry() { + return boxGeometry; + } - /** - * Set the bounding box that contains this observation. - * - * @param boxGeometry - * The bounding box Geometry. - */ - public void setBoxGeometry(Geometry boxGeometry) { - this.boxGeometry = boxGeometry; - } + /** + * Set the bounding box that contains this observation. + * + * @param boxGeometry + * The bounding box Geometry. + */ + public void setBoxGeometry(Geometry boxGeometry) { + this.boxGeometry = boxGeometry; + } - /** - * @return the solarElevation - */ - public Double getSolarElevation() { - return solarElevation; - } + /** + * @return the solarElevation + */ + public Double getSolarElevation() { + return solarElevation; + } - /** - * @param solarElevation - * the solarElevation to set - */ - public void setSolarElevation(Double solarElevation) { - this.solarElevation = solarElevation; - } + /** + * @param solarElevation + * the solarElevation to set + */ + public void setSolarElevation(Double solarElevation) { + this.solarElevation = solarElevation; + } - /** - * @return the soundingLevels - */ - public List getSoundingLevels() { - return soundingLevels; - } + /** + * @return the soundingLevels + */ + public List getSoundingLevels() { + return soundingLevels; + } - /** - * @param soundingLevels - * the soundingLevels to set - */ - public void setSoundingLevels(List soundingLevels) { - this.soundingLevels = soundingLevels; - } + /** + * @param soundingLevels + * the soundingLevels to set + */ + public void setSoundingLevels(List soundingLevels) { + this.soundingLevels = soundingLevels; + } - /** - * @param soundingLevels - * the soundingLevels to set - */ - public void addSoundingLevel(GOESSoundingLevel soundingLevel) { - if (soundingLevels == null) { - soundingLevels = new ArrayList(); - } - soundingLevels.add(soundingLevel); - } + /** + * @param soundingLevels + * the soundingLevels to set + */ + public void addSoundingLevel(GOESSoundingLevel soundingLevel) { + if (soundingLevels == null) { + soundingLevels = new ArrayList(); + } + soundingLevels.add(soundingLevel); + } - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - public SurfaceObsLocation getLocation() { - return location; - } + public SurfaceObsLocation getLocation() { + return location; + } - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + @Override + public String getPluginName() { + return "goessounding"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/GribRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/GribRecord.java index 6dc4dbf6b1..3af072fc9d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/GribRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/GribRecord.java @@ -65,12 +65,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 4/7/09 1994 bphillip Initial Creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 1293 bkowal Removed references to hdffileid. + * Apr 07, 2009 1994 bphillip Initial Creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @@ -84,12 +86,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "grib", - indexes = { - @Index(name = "grib_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "grib", indexes = { @Index(name = "grib_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -238,7 +236,6 @@ public class GribRecord extends PersistablePluginDataObject implements this.insertTime = (Calendar) recordToCopy.insertTime.clone(); } this.messageData = recordToCopy.messageData; - this.pluginName = recordToCopy.pluginName; this.gridVersion = recordToCopy.gridVersion; if (recordToCopy.hybridCoordList != null) { this.hybridCoordList = Arrays.copyOf(recordToCopy.hybridCoordList, @@ -278,8 +275,9 @@ public class GribRecord extends PersistablePluginDataObject implements @Override public Date getPersistenceTime() { Calendar c = getInsertTime(); - if (c == null) + if (c == null) { return null; + } return c.getTime(); } @@ -526,6 +524,7 @@ public class GribRecord extends PersistablePluginDataObject implements this.resCompFlags = resCompFlags; } + @Override public void setId(int id) { this.id = id; } @@ -566,34 +565,37 @@ public class GribRecord extends PersistablePluginDataObject implements public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + gridVersion; - result = prime * result + Arrays.hashCode(hybridCoordList); - result = prime * result + (hybridGrid ? 1231 : 1237); - result = prime * result + (isVector ? 1231 : 1237); - result = prime * result + Arrays.hashCode(localSection); - result = prime * result + (localSectionUsed ? 1231 : 1237); - result = prime * result + localTableVersion; - result = prime * result + masterTableVersion; - result = prime * result + result = (prime * result) + gridVersion; + result = (prime * result) + Arrays.hashCode(hybridCoordList); + result = (prime * result) + (hybridGrid ? 1231 : 1237); + result = (prime * result) + (isVector ? 1231 : 1237); + result = (prime * result) + Arrays.hashCode(localSection); + result = (prime * result) + (localSectionUsed ? 1231 : 1237); + result = (prime * result) + localTableVersion; + result = (prime * result) + masterTableVersion; + result = (prime * result) + ((modelInfo == null) ? 0 : modelInfo.hashCode()); - result = prime * result + processedDataType; - result = prime * result + productionStatus; - result = prime * result + refTimeSignificance; - result = prime * result + result = (prime * result) + processedDataType; + result = (prime * result) + productionStatus; + result = (prime * result) + refTimeSignificance; + result = (prime * result) + ((resCompFlags == null) ? 0 : resCompFlags.hashCode()); - result = prime * result + (thinnedGrid ? 1231 : 1237); - result = prime * result + Arrays.hashCode(thinnedPts); + result = (prime * result) + (thinnedGrid ? 1231 : 1237); + result = (prime * result) + Arrays.hashCode(thinnedPts); return result; } @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } GribRecord other = (GribRecord) obj; if (!this.dataTime.getRefTimeAsCalendar().equals( other.getDataTime().getRefTimeAsCalendar())) { @@ -606,42 +608,59 @@ public class GribRecord extends PersistablePluginDataObject implements return false; } - if (gridVersion != other.gridVersion) + if (gridVersion != other.gridVersion) { return false; - if (!Arrays.equals(hybridCoordList, other.hybridCoordList)) + } + if (!Arrays.equals(hybridCoordList, other.hybridCoordList)) { return false; - if (hybridGrid != other.hybridGrid) + } + if (hybridGrid != other.hybridGrid) { return false; - if (isVector != other.isVector) + } + if (isVector != other.isVector) { return false; - if (!Arrays.equals(localSection, other.localSection)) + } + if (!Arrays.equals(localSection, other.localSection)) { return false; - if (localSectionUsed != other.localSectionUsed) + } + if (localSectionUsed != other.localSectionUsed) { return false; - if (localTableVersion != other.localTableVersion) + } + if (localTableVersion != other.localTableVersion) { return false; - if (masterTableVersion != other.masterTableVersion) + } + if (masterTableVersion != other.masterTableVersion) { return false; + } if (modelInfo == null) { - if (other.modelInfo != null) + if (other.modelInfo != null) { return false; - } else if (!modelInfo.equals(other.modelInfo)) + } + } else if (!modelInfo.equals(other.modelInfo)) { return false; - if (processedDataType != other.processedDataType) + } + if (processedDataType != other.processedDataType) { return false; - if (productionStatus != other.productionStatus) + } + if (productionStatus != other.productionStatus) { return false; - if (refTimeSignificance != other.refTimeSignificance) + } + if (refTimeSignificance != other.refTimeSignificance) { return false; + } if (resCompFlags == null) { - if (other.resCompFlags != null) + if (other.resCompFlags != null) { return false; - } else if (!resCompFlags.equals(other.resCompFlags)) + } + } else if (!resCompFlags.equals(other.resCompFlags)) { return false; - if (thinnedGrid != other.thinnedGrid) + } + if (thinnedGrid != other.thinnedGrid) { return false; - if (!Arrays.equals(thinnedPts, other.thinnedPts)) + } + if (!Arrays.equals(thinnedPts, other.thinnedPts)) { return false; + } return true; } @@ -651,4 +670,9 @@ public class GribRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "grib"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java index 29f006cc84..13701da938 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java @@ -61,11 +61,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * May 21, 2012 bsteffen Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 21, 2012 bsteffen Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -79,12 +81,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "grid", - indexes = { - @Index(name = "grid_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "grid", indexes = { @Index(name = "grid_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class GridRecord extends PersistablePluginDataObject implements ISpatialEnabled { @@ -110,7 +108,6 @@ public class GridRecord extends PersistablePluginDataObject implements } public GridRecord(GridRecord record) { - this.pluginName = record.getPluginName(); this.dataTime = record.getDataTime(); this.info = new GridInfoRecord(record.getInfoNotNull()); if (record.getExtraAttributes() != null) { @@ -236,24 +233,29 @@ public class GridRecord extends PersistablePluginDataObject implements public int hashCode() { final int prime = 31; int result = super.hashCode(); - result = prime * result + ((info == null) ? 0 : info.hashCode()); + result = (prime * result) + ((info == null) ? 0 : info.hashCode()); return result; } @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (!super.equals(obj)) + } + if (!super.equals(obj)) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } GridRecord other = (GridRecord) obj; if (info == null) { - if (other.info != null) + if (other.info != null) { return false; - } else if (!info.equals(other.info)) + } + } else if (!info.equals(other.info)) { return false; + } return true; } @@ -263,4 +265,9 @@ public class GridRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "grid"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ldadhydro/src/com/raytheon/uf/common/dataplugin/ldadhydro/HydroLdadRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ldadhydro/src/com/raytheon/uf/common/dataplugin/ldadhydro/HydroLdadRecord.java index ea11d952f7..83add3d259 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ldadhydro/src/com/raytheon/uf/common/dataplugin/ldadhydro/HydroLdadRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ldadhydro/src/com/raytheon/uf/common/dataplugin/ldadhydro/HydroLdadRecord.java @@ -70,11 +70,13 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ----------- ---------- ----------- -------------------------- - * 9/30/09 vkorolev Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Sep 30, 2009 vkorolev Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -89,1073 +91,1075 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ldadhydro", - indexes = { - @Index(name = "ldadhydro_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ldadhydro", indexes = { @Index(name = "ldadhydro_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class HydroLdadRecord extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final String OBS_TEXT = "text"; + public static final String OBS_TEXT = "text"; - public static final Unit LENGTH_UNIT = SI.METER; + public static final Unit LENGTH_UNIT = SI.METER; - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; + public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; + public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit PRESSURE_UNIT = SI.PASCAL; + public static final Unit PRESSURE_UNIT = SI.PASCAL; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("DpT", SFC_DWPT); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("WGS", SFC_WNDGST); - PARM_MAP.put("ASET", "SFC.PRESS.ALTIMETER"); - PARM_MAP.put("PMSL", PRES_SLP); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("STA", "STA"); - PARM_MAP.put("stationId", "STA"); - PARM_MAP.put("message", OBS_TEXT); - PARM_MAP.put(OBS_TEXT, OBS_TEXT); - } + private static final HashMap PARM_MAP = new HashMap(); + static { + PARM_MAP.put("T", SFC_TEMP); + PARM_MAP.put("DpT", SFC_DWPT); + PARM_MAP.put("WS", SFC_WNDSPD); + PARM_MAP.put("WD", SFC_WNDDIR); + PARM_MAP.put("WGS", SFC_WNDGST); + PARM_MAP.put("ASET", "SFC.PRESS.ALTIMETER"); + PARM_MAP.put("PMSL", PRES_SLP); + PARM_MAP.put("NLAT", STA_LAT); + PARM_MAP.put("NLON", STA_LON); + PARM_MAP.put("STA", "STA"); + PARM_MAP.put("stationId", "STA"); + PARM_MAP.put("message", OBS_TEXT); + PARM_MAP.put(OBS_TEXT, OBS_TEXT); + } - // Time of the observation. - @DataURI(position = 2) - @Column - @XmlAttribute - @DynamicSerializeElement - private Calendar observationTime; + // Time of the observation. + @DataURI(position = 2) + @Column + @XmlAttribute + @DynamicSerializeElement + private Calendar observationTime; - // numeric WMO identification number - @Column - @XmlElement - @DynamicSerializeElement - private long numericWMOid; + // numeric WMO identification number + @Column + @XmlElement + @DynamicSerializeElement + private long numericWMOid; - // latitude, longitude, elevation, stationId="RALC2" - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + // latitude, longitude, elevation, stationId="RALC2" + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - // Data Provider station Id - @Column - @XmlElement - @DynamicSerializeElement - private String providerId; // * "110" "FA6026DA" + // Data Provider station Id + @Column + @XmlElement + @DynamicSerializeElement + private String providerId; // * "110" "FA6026DA" - @Column - @XmlElement - @DynamicSerializeElement - private String stationName; // * "Ralston_Res" + @Column + @XmlElement + @DynamicSerializeElement + private String stationName; // * "Ralston_Res" - // Handbook Id (AFOS id or SHEF id) - @Column - @XmlElement - @DynamicSerializeElement - private String handbook5Id; + // Handbook Id (AFOS id or SHEF id) + @Column + @XmlElement + @DynamicSerializeElement + private String handbook5Id; - // Home WFO Id for the LDAD data - @Column - @XmlElement - @DynamicSerializeElement - private String homeWFO; + // Home WFO Id for the LDAD data + @Column + @XmlElement + @DynamicSerializeElement + private String homeWFO; - // LDAD hydro station type. - @Column - @XmlElement - @DynamicSerializeElement - private String stationType; + // LDAD hydro station type. + @Column + @XmlElement + @DynamicSerializeElement + private String stationType; - // LDAD hydro data provider - @DataURI(position = 1) - @Column - @XmlElement - @DynamicSerializeElement - private String dataProvider; + // LDAD hydro data provider + @DataURI(position = 1) + @Column + @XmlElement + @DynamicSerializeElement + private String dataProvider; - // time data was processed by the provider - @Column - @XmlElement - @DynamicSerializeElement - private double reportTime; // * 1.247436157E9 + // time data was processed by the provider + @Column + @XmlElement + @DynamicSerializeElement + private double reportTime; // * 1.247436157E9 - // * time data was received - @Column - @XmlElement - @DynamicSerializeElement - private Double receivedTime; // seconds since 1-1-1970 + // * time data was received + @Column + @XmlElement + @DynamicSerializeElement + private Double receivedTime; // seconds since 1-1-1970 - // Below surface - @Column - @XmlElement - @DynamicSerializeElement - private Float belowSurface; // meter + // Below surface + @Column + @XmlElement + @DynamicSerializeElement + private Float belowSurface; // meter - // River stage - @Column - @XmlElement - @DynamicSerializeElement - private Float riverStage; // meter + // River stage + @Column + @XmlElement + @DynamicSerializeElement + private Float riverStage; // meter - // Pool elevation - @Column - @XmlElement - @DynamicSerializeElement - private Float poolElevation; // meter + // Pool elevation + @Column + @XmlElement + @DynamicSerializeElement + private Float poolElevation; // meter - // Tail water stage - @Column - @XmlElement - @DynamicSerializeElement - private Float tailwaterStage; // meter + // Tail water stage + @Column + @XmlElement + @DynamicSerializeElement + private Float tailwaterStage; // meter - // River velocity - @Column - @XmlElement - @DynamicSerializeElement - private Float riverVelocity; // kph + // River velocity + @Column + @XmlElement + @DynamicSerializeElement + private Float riverVelocity; // kph - // River inflow - @Column - @XmlElement - @DynamicSerializeElement - private Float riverInflow; // meter^3 / sec + // River inflow + @Column + @XmlElement + @DynamicSerializeElement + private Float riverInflow; // meter^3 / sec - // River flow - @Column - @XmlElement - @DynamicSerializeElement - private Float riverFlow; // meter^3 / sec + // River flow + @Column + @XmlElement + @DynamicSerializeElement + private Float riverFlow; // meter^3 / sec - // Computed outflow - @Column - @XmlElement - @DynamicSerializeElement - private Float computedOutflow; // meter^3 / sec + // Computed outflow + @Column + @XmlElement + @DynamicSerializeElement + private Float computedOutflow; // meter^3 / sec - // Water temperature - @Column - @XmlElement - @DynamicSerializeElement - private Float waterTemperature; // kelvin + // Water temperature + @Column + @XmlElement + @DynamicSerializeElement + private Float waterTemperature; // kelvin - // Battery voltage - @Column - @XmlElement - @DynamicSerializeElement - private Float voltageBattery; // volt + // Battery voltage + @Column + @XmlElement + @DynamicSerializeElement + private Float voltageBattery; // volt - // Water conductance - @Column - @XmlElement - @DynamicSerializeElement - private Float waterConductance; // umhos/cm + // Water conductance + @Column + @XmlElement + @DynamicSerializeElement + private Float waterConductance; // umhos/cm - // Water oxygen - @Column - @XmlElement - @DynamicSerializeElement - private Float waterOxygen; // mg/l + // Water oxygen + @Column + @XmlElement + @DynamicSerializeElement + private Float waterOxygen; // mg/l - // Water PH - @Column - @XmlElement - @DynamicSerializeElement - private Float waterPH; // pH + // Water PH + @Column + @XmlElement + @DynamicSerializeElement + private Float waterPH; // pH - // Relative humidity - @Column - @XmlElement - @DynamicSerializeElement - private Float relHumidity; + // Relative humidity + @Column + @XmlElement + @DynamicSerializeElement + private Float relHumidity; - // River stage & flow - time of last change (ALERT) - @Column - @XmlElement - @DynamicSerializeElement - private Double riverReportChangeTime; // seconds since 1970-1-1 00:00:00.0 + // River stage & flow - time of last change (ALERT) + @Column + @XmlElement + @DynamicSerializeElement + private Double riverReportChangeTime; // seconds since 1970-1-1 00:00:00.0 - // Observation air temperature in degrees Kelvin. - @Column - @DynamicSerializeElement - @XmlElement - private Float temperature; + // Observation air temperature in degrees Kelvin. + @Column + @DynamicSerializeElement + @XmlElement + private Float temperature; - // Observation dewpoint temperature in degrees Kelvin. - @Column - @DynamicSerializeElement - @XmlElement - private Float dewpoint; + // Observation dewpoint temperature in degrees Kelvin. + @Column + @DynamicSerializeElement + @XmlElement + private Float dewpoint; - // Observation wind direction in angular degrees. - @Column - @DynamicSerializeElement - @XmlElement - private Float windDir; + // Observation wind direction in angular degrees. + @Column + @DynamicSerializeElement + @XmlElement + private Float windDir; - // Observation wind speed in meters per second. - @Column - @DynamicSerializeElement - @XmlElement - private Float windSpeed; + // Observation wind speed in meters per second. + @Column + @DynamicSerializeElement + @XmlElement + private Float windSpeed; - // Wind speed peak - @Column - @XmlElement - @DynamicSerializeElement - private Float windSpeedPeak; + // Wind speed peak + @Column + @XmlElement + @DynamicSerializeElement + private Float windSpeedPeak; - // Observation wind gust in meters per second. - @Column - @DynamicSerializeElement - @XmlElement - private Double windGust; + // Observation wind gust in meters per second. + @Column + @DynamicSerializeElement + @XmlElement + private Double windGust; - // precip accumulation with an unknown time period in mm. - @Column - @DynamicSerializeElement - @XmlElement - private Float precipAccum; // mm + // precip accumulation with an unknown time period in mm. + @Column + @DynamicSerializeElement + @XmlElement + private Float precipAccum; // mm - // 5 minute precip accumulation - @Column - @DynamicSerializeElement - @XmlElement - private Float precip5min; // mm + // 5 minute precip accumulation + @Column + @DynamicSerializeElement + @XmlElement + private Float precip5min; // mm - // 1 hour precip accumulation - @Column - @DynamicSerializeElement - @XmlElement - private Float precip1hr; // mm + // 1 hour precip accumulation + @Column + @DynamicSerializeElement + @XmlElement + private Float precip1hr; // mm - // 3 hour precip accumulation - @Column - @DynamicSerializeElement - @XmlElement - private Float precip3hr; // float precip3hr mm + // 3 hour precip accumulation + @Column + @DynamicSerializeElement + @XmlElement + private Float precip3hr; // float precip3hr mm - // 6 hour precip accumulation - @Column - @DynamicSerializeElement - @XmlElement - private Float precip6hr; // float precip6hr mm + // 6 hour precip accumulation + @Column + @DynamicSerializeElement + @XmlElement + private Float precip6hr; // float precip6hr mm - // 12 hour precip accumulation mm - @Column - @XmlElement - @DynamicSerializeElement - private Float precip12hr; + // 12 hour precip accumulation mm + @Column + @XmlElement + @DynamicSerializeElement + private Float precip12hr; - // 18 hour precip accumulation mm - @Column - @XmlElement - @DynamicSerializeElement - private Float precip18hr; + // 18 hour precip accumulation mm + @Column + @XmlElement + @DynamicSerializeElement + private Float precip18hr; - // 24 hour precip accumulation - @Column - @DynamicSerializeElement - @XmlElement - private Float precip24hr; // mm + // 24 hour precip accumulation + @Column + @DynamicSerializeElement + @XmlElement + private Float precip24hr; // mm - // Raw text LDAD hydro report - @Column - @DynamicSerializeElement - @XmlElement - private String rawMessage; + // Raw text LDAD hydro report + @Column + @DynamicSerializeElement + @XmlElement + private String rawMessage; - private PointDataView pointDataView; + private PointDataView pointDataView; - /** + /** * */ - public HydroLdadRecord() { - } + public HydroLdadRecord() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - */ - public HydroLdadRecord(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + */ + public HydroLdadRecord(String uri) { + super(uri); + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** - * @return the timeObs - */ - public Calendar getObservationTime() { - return observationTime; - } + /** + * @return the timeObs + */ + public Calendar getObservationTime() { + return observationTime; + } - /** - * @param observationTime - * the observationTime to set - */ - public void setObservationTime(Calendar timeObs) { - this.observationTime = timeObs; - } + /** + * @param observationTime + * the observationTime to set + */ + public void setObservationTime(Calendar timeObs) { + this.observationTime = timeObs; + } - /** - * @return the windSpeed - */ - public Float getWindSpeed() { - return windSpeed; - } + /** + * @return the windSpeed + */ + public Float getWindSpeed() { + return windSpeed; + } - /** - * @param windSpeed - * the windSpeed to set - */ - public void setWindSpeed(Float windSpeed) { - this.windSpeed = windSpeed; - } + /** + * @param windSpeed + * the windSpeed to set + */ + public void setWindSpeed(Float windSpeed) { + this.windSpeed = windSpeed; + } - /** - * @return the windGust - */ - public Double getWindGust() { - return windGust; - } + /** + * @return the windGust + */ + public Double getWindGust() { + return windGust; + } - /** - * @param windGust - * the windGust to set - */ - public void setWindGust(Double windGust) { - this.windGust = windGust; - } + /** + * @param windGust + * the windGust to set + */ + public void setWindGust(Double windGust) { + this.windGust = windGust; + } - /** + /** * */ - public void setSpatialObject(SurfaceObsLocation loc) { - location = loc; - } + public void setSpatialObject(SurfaceObsLocation loc) { + location = loc; + } - /** + /** * */ - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - /** - * This class implements IDecoderGettable so return this instance. - * - * @return The reference to this instance. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } + /** + * This class implements IDecoderGettable so return this instance. + * + * @return The reference to this instance. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } - /** + /** * */ - @Override - public String getString(String paramName) { - String retValue = null; - String pName = PARM_MAP.get(paramName); - if ("STA".matches(pName)) { - retValue = getStationId(); - } else if (OBS_TEXT.equals(pName)) { - retValue = getStationId(); - } + @Override + public String getString(String paramName) { + String retValue = null; + String pName = PARM_MAP.get(paramName); + if ("STA".matches(pName)) { + retValue = getStationId(); + } else if (OBS_TEXT.equals(pName)) { + retValue = getStationId(); + } - return retValue; - } + return retValue; + } - @Override - public String[] getStrings(String paramName) { - return null; - } + @Override + public String[] getStrings(String paramName) { + return null; + } - @Override - public Amount getValue(String paramName) { - Amount a = null; - String pName = PARM_MAP.get(paramName); + @Override + public Amount getValue(String paramName) { + Amount a = null; + String pName = PARM_MAP.get(paramName); - if (SFC_TEMP.equals(pName)) { - a = new Amount(temperature, TEMPERATURE_UNIT); - } else if (SFC_DWPT.equals(pName)) { - a = new Amount(dewpoint, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDGST.equals(pName)) { - a = new Amount(windGust, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName)) { - a = new Amount(windDir, WIND_DIR_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(getLongitude(), LOCATION_UNIT); - } + if (SFC_TEMP.equals(pName)) { + a = new Amount(temperature, TEMPERATURE_UNIT); + } else if (SFC_DWPT.equals(pName)) { + a = new Amount(dewpoint, TEMPERATURE_UNIT); + } else if (SFC_WNDSPD.equals(pName)) { + a = new Amount(windSpeed, WIND_SPEED_UNIT); + } else if (SFC_WNDGST.equals(pName)) { + a = new Amount(windGust, WIND_SPEED_UNIT); + } else if (SFC_WNDDIR.equals(pName)) { + a = new Amount(windDir, WIND_DIR_UNIT); + } else 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; - } + return a; + } - /** + /** * */ - @Override - public Collection getValues(String paramName) { - return null; - } - - /** - * @param providerId - * the providerId to set - */ - public void setProviderId(String providerId) { - this.providerId = providerId; - } - - /** - * @return the providerId - */ - public String getProviderId() { - return providerId; - } - - /** - * @param stationName - * the stationName to set - */ - public void setStationName(String stationName) { - this.stationName = stationName; - } - - /** - * @return the stationName - */ - public String getStationName() { - return stationName; - } - - /** - * @param handbook5Id - * the handbook5Id to set - */ - public void setHandbook5Id(String handbook5Id) { - this.handbook5Id = handbook5Id; - } - - /** - * @return the handbook5Id - */ - public String getHandbook5Id() { - return handbook5Id; - } - - /** - * @param homeWFO - * the homeWFO to set - */ - public void setHomeWFO(String homeWFO) { - this.homeWFO = homeWFO; - } - - /** - * @return the homeWFO - */ - public String getHomeWFO() { - return homeWFO; - } - - /** - * @param stationType - * the stationType to set - */ - public void setStationType(String stationType) { - this.stationType = stationType; - } - - /** - * @return the stationType - */ - public String getStationType() { - return stationType; - } - - /** - * @param dataProvider - * the dataProvider to set - */ - public void setDataProvider(String dataProvider) { - this.dataProvider = dataProvider; - } - - /** - * @return the dataProvider - */ - public String getDataProvider() { - return dataProvider; - } - - /** - * @param receivedTime - * the receivedTime to set - */ - public void setReceivedTime(Double receivedTime) { - this.receivedTime = receivedTime; - } - - /** - * @return the receivedTime - */ - public Double getReceivedTime() { - return receivedTime; - } - - /** - * @param belowSurface - * the belowSurface to set - */ - public void setBelowSurface(Float belowSurface) { - this.belowSurface = belowSurface; - } - - /** - * @return the belowSurface - */ - public Float getBelowSurface() { - return belowSurface; - } - - /** - * @param riverStage - * the riverStage to set - */ - public void setRiverStage(Float riverStage) { - this.riverStage = riverStage; - } - - /** - * @return the riverStage - */ - public Float getRiverStage() { - return riverStage; - } - - /** - * @param poolElevation - * the poolElevation to set - */ - public void setPoolElevation(Float poolElevation) { - this.poolElevation = poolElevation; - } - - /** - * @return the poolElevation - */ - public Float getPoolElevation() { - return poolElevation; - } - - /** - * @param tailwaterStage - * the tailwaterStage to set - */ - public void setTailwaterStage(Float tailwaterStage) { - this.tailwaterStage = tailwaterStage; - } - - /** - * @return the tailwaterStage - */ - public Float getTailwaterStage() { - return tailwaterStage; - } - - /** - * @param riverVelocity - * the riverVelocity to set - */ - public void setRiverVelocity(Float riverVelocity) { - this.riverVelocity = riverVelocity; - } - - /** - * @return the riverVelocity - */ - public Float getRiverVelocity() { - return riverVelocity; - } - - /** - * @param riverInflow - * the riverInflow to set - */ - public void setRiverInflow(Float riverInflow) { - this.riverInflow = riverInflow; - } - - /** - * @return the riverInflow - */ - public Float getRiverInflow() { - return riverInflow; - } - - /** - * @param riverFlow - * the riverFlow to set - */ - public void setRiverFlow(Float riverFlow) { - this.riverFlow = riverFlow; - } - - /** - * @return the riverFlow - */ - public Float getRiverFlow() { - return riverFlow; - } - - /** - * @param computedOutflow - * the computedOutflow to set - */ - public void setComputedOutflow(Float computedOutflow) { - this.computedOutflow = computedOutflow; - } - - /** - * @return the computedOutflow - */ - public Float getComputedOutflow() { - return computedOutflow; - } - - /** - * @param waterTemperature - * the waterTemperature to set - */ - public void setWaterTemperature(Float waterTemperature) { - this.waterTemperature = waterTemperature; - } - - /** - * @return the waterTemperature - */ - public Float getWaterTemperature() { - return waterTemperature; - } - - /** - * @param voltageBattery - * the voltageBattery to set - */ - public void setVoltageBattery(Float voltageBattery) { - this.voltageBattery = voltageBattery; - } - - /** - * @return the voltageBattery - */ - public Float getVoltageBattery() { - return voltageBattery; - } - - /** - * @param waterConductance - * the waterConductance to set - */ - public void setWaterConductance(Float waterConductance) { - this.waterConductance = waterConductance; - } - - /** - * @return the waterConductance - */ - public Float getWaterConductance() { - return waterConductance; - } - - /** - * @param waterOxygen - * the waterOxygen to set - */ - public void setWaterOxygen(Float waterOxygen) { - this.waterOxygen = waterOxygen; - } - - /** - * @return the waterOxygen - */ - public Float getWaterOxygen() { - return waterOxygen; - } - - /** - * @param waterPH - * the waterPH to set - */ - public void setWaterPH(Float waterPH) { - this.waterPH = waterPH; - } - - /** - * @return the waterPH - */ - public Float getWaterPH() { - return waterPH; - } - - /** - * @param riverReportChangeTime - * the riverReportChangeTime to set - */ - public void setRiverReportChangeTime(Double riverReportChangeTime) { - this.riverReportChangeTime = riverReportChangeTime; - } - - /** - * @return the riverReportChangeTime - */ - public Double getRiverReportChangeTime() { - return riverReportChangeTime; - } - - /** - * @param precip12hr - * the precip12hr to set - */ - public void setPrecip12hr(Float precip12hr) { - this.precip12hr = precip12hr; - } - - /** - * @return the precip12hr - */ - public Float getPrecip12hr() { - return precip12hr; - } - - /** - * @param precip18hr - * the precip18hr to set - */ - public void setPrecip18hr(Float precip18hr) { - this.precip18hr = precip18hr; - } - - /** - * @return the precip18hr - */ - public Float getPrecip18hr() { - return precip18hr; - } - - /** - * @param temperature - * the temperature to set - */ - public void setTemperature(Float temperature) { - this.temperature = temperature; - } - - /** - * @return the temperature - */ - public Float getTemperature() { - return temperature; - } - - /** - * @param dewpoint - * the dewpoint to set - */ - public void setDewpoint(Float dewpoint) { - this.dewpoint = dewpoint; - } - - /** - * @return the dewpoint - */ - public Float getDewpoint() { - return dewpoint; - } - - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(Float windDir) { - this.windDir = windDir; - } - - /** - * @return the windDir - */ - public Float getWindDir() { - return windDir; - } - - /** - * @param windSpeedPeak - * the windSpeedPeak to set - */ - public void setWindSpeedPeak(Float windSpeedPeak) { - this.windSpeedPeak = windSpeedPeak; - } - - /** - * @return the windSpeedPeak - */ - public Float getWindSpeedPeak() { - return windSpeedPeak; - } - - /** - * @param precipAccum - * the precipAccum to set - */ - public void setPrecipAccum(Float precipAccum) { - this.precipAccum = precipAccum; - } - - /** - * @return the precipAccum - */ - public Float getPrecipAccum() { - return precipAccum; - } - - /** - * @param precip5min - * the precip5min to set - */ - public void setPrecip5min(Float precip5min) { - this.precip5min = precip5min; - } - - /** - * @return the precip5min - */ - public Float getPrecip5min() { - return precip5min; - } - - /** - * @param precip1hr - * the precip1hr to set - */ - public void setPrecip1hr(Float precip1hr) { - this.precip1hr = precip1hr; - } - - /** - * @return the precip1hr - */ - public Float getPrecip1hr() { - return precip1hr; - } - - /** - * @param precip3hr - * the precip3hr to set - */ - public void setPrecip3hr(Float precip3hr) { - this.precip3hr = precip3hr; - } - - /** - * @return the precip3hr - */ - public Float getPrecip3hr() { - return precip3hr; - } - - /** - * @param precip6hr - * the precip6hr to set - */ - public void setPrecip6hr(Float precip6hr) { - this.precip6hr = precip6hr; - } - - /** - * @return the precip6hr - */ - public Float getPrecip6hr() { - return precip6hr; - } - - /** - * @param precip24hr - * the precip24hr to set - */ - public void setPrecip24hr(Float precip24hr) { - this.precip24hr = precip24hr; - } - - /** - * @return the precip24hr - */ - public Float getPrecip24hr() { - return precip24hr; - } - - /** - * @param rawMessage - * the rawMessage to set - */ - public void setRawMessage(String rawMessage) { - this.rawMessage = rawMessage; - } - - /** - * @return the rawMessage - */ - public String getRawMessage() { - return rawMessage; - } - - /** - * @param relHumidity - * the relHumidity to set - */ - public void setRelHumidity(Float relHumidity) { - this.relHumidity = relHumidity; - } - - /** - * @return the relHumidity - */ - public Float getRelHumidity() { - return relHumidity; - } - - /** - * @param numericWMOid - * the numericWMOid to set - */ - public void setNumericWMOid(long numericWMOid) { - this.numericWMOid = numericWMOid; - } - - /** - * @return the numericWMOid - */ - public long getNumericWMOid() { - return numericWMOid; - } - - /** - * @param l - * the reportTime to set - */ - public void setReportTime(long l) { - this.reportTime = l; - } - - /** - * @return the reportTime - */ - public Double getReportTime() { - return reportTime; - } - - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - - } - - /** - * @return the pointDataView - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } + @Override + public Collection getValues(String paramName) { + return null; + } + + /** + * @param providerId + * the providerId to set + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * @return the providerId + */ + public String getProviderId() { + return providerId; + } + + /** + * @param stationName + * the stationName to set + */ + public void setStationName(String stationName) { + this.stationName = stationName; + } + + /** + * @return the stationName + */ + public String getStationName() { + return stationName; + } + + /** + * @param handbook5Id + * the handbook5Id to set + */ + public void setHandbook5Id(String handbook5Id) { + this.handbook5Id = handbook5Id; + } + + /** + * @return the handbook5Id + */ + public String getHandbook5Id() { + return handbook5Id; + } + + /** + * @param homeWFO + * the homeWFO to set + */ + public void setHomeWFO(String homeWFO) { + this.homeWFO = homeWFO; + } + + /** + * @return the homeWFO + */ + public String getHomeWFO() { + return homeWFO; + } + + /** + * @param stationType + * the stationType to set + */ + public void setStationType(String stationType) { + this.stationType = stationType; + } + + /** + * @return the stationType + */ + public String getStationType() { + return stationType; + } + + /** + * @param dataProvider + * the dataProvider to set + */ + public void setDataProvider(String dataProvider) { + this.dataProvider = dataProvider; + } + + /** + * @return the dataProvider + */ + public String getDataProvider() { + return dataProvider; + } + + /** + * @param receivedTime + * the receivedTime to set + */ + public void setReceivedTime(Double receivedTime) { + this.receivedTime = receivedTime; + } + + /** + * @return the receivedTime + */ + public Double getReceivedTime() { + return receivedTime; + } + + /** + * @param belowSurface + * the belowSurface to set + */ + public void setBelowSurface(Float belowSurface) { + this.belowSurface = belowSurface; + } + + /** + * @return the belowSurface + */ + public Float getBelowSurface() { + return belowSurface; + } + + /** + * @param riverStage + * the riverStage to set + */ + public void setRiverStage(Float riverStage) { + this.riverStage = riverStage; + } + + /** + * @return the riverStage + */ + public Float getRiverStage() { + return riverStage; + } + + /** + * @param poolElevation + * the poolElevation to set + */ + public void setPoolElevation(Float poolElevation) { + this.poolElevation = poolElevation; + } + + /** + * @return the poolElevation + */ + public Float getPoolElevation() { + return poolElevation; + } + + /** + * @param tailwaterStage + * the tailwaterStage to set + */ + public void setTailwaterStage(Float tailwaterStage) { + this.tailwaterStage = tailwaterStage; + } + + /** + * @return the tailwaterStage + */ + public Float getTailwaterStage() { + return tailwaterStage; + } + + /** + * @param riverVelocity + * the riverVelocity to set + */ + public void setRiverVelocity(Float riverVelocity) { + this.riverVelocity = riverVelocity; + } + + /** + * @return the riverVelocity + */ + public Float getRiverVelocity() { + return riverVelocity; + } + + /** + * @param riverInflow + * the riverInflow to set + */ + public void setRiverInflow(Float riverInflow) { + this.riverInflow = riverInflow; + } + + /** + * @return the riverInflow + */ + public Float getRiverInflow() { + return riverInflow; + } + + /** + * @param riverFlow + * the riverFlow to set + */ + public void setRiverFlow(Float riverFlow) { + this.riverFlow = riverFlow; + } + + /** + * @return the riverFlow + */ + public Float getRiverFlow() { + return riverFlow; + } + + /** + * @param computedOutflow + * the computedOutflow to set + */ + public void setComputedOutflow(Float computedOutflow) { + this.computedOutflow = computedOutflow; + } + + /** + * @return the computedOutflow + */ + public Float getComputedOutflow() { + return computedOutflow; + } + + /** + * @param waterTemperature + * the waterTemperature to set + */ + public void setWaterTemperature(Float waterTemperature) { + this.waterTemperature = waterTemperature; + } + + /** + * @return the waterTemperature + */ + public Float getWaterTemperature() { + return waterTemperature; + } + + /** + * @param voltageBattery + * the voltageBattery to set + */ + public void setVoltageBattery(Float voltageBattery) { + this.voltageBattery = voltageBattery; + } + + /** + * @return the voltageBattery + */ + public Float getVoltageBattery() { + return voltageBattery; + } + + /** + * @param waterConductance + * the waterConductance to set + */ + public void setWaterConductance(Float waterConductance) { + this.waterConductance = waterConductance; + } + + /** + * @return the waterConductance + */ + public Float getWaterConductance() { + return waterConductance; + } + + /** + * @param waterOxygen + * the waterOxygen to set + */ + public void setWaterOxygen(Float waterOxygen) { + this.waterOxygen = waterOxygen; + } + + /** + * @return the waterOxygen + */ + public Float getWaterOxygen() { + return waterOxygen; + } + + /** + * @param waterPH + * the waterPH to set + */ + public void setWaterPH(Float waterPH) { + this.waterPH = waterPH; + } + + /** + * @return the waterPH + */ + public Float getWaterPH() { + return waterPH; + } + + /** + * @param riverReportChangeTime + * the riverReportChangeTime to set + */ + public void setRiverReportChangeTime(Double riverReportChangeTime) { + this.riverReportChangeTime = riverReportChangeTime; + } + + /** + * @return the riverReportChangeTime + */ + public Double getRiverReportChangeTime() { + return riverReportChangeTime; + } + + /** + * @param precip12hr + * the precip12hr to set + */ + public void setPrecip12hr(Float precip12hr) { + this.precip12hr = precip12hr; + } + + /** + * @return the precip12hr + */ + public Float getPrecip12hr() { + return precip12hr; + } + + /** + * @param precip18hr + * the precip18hr to set + */ + public void setPrecip18hr(Float precip18hr) { + this.precip18hr = precip18hr; + } + + /** + * @return the precip18hr + */ + public Float getPrecip18hr() { + return precip18hr; + } + + /** + * @param temperature + * the temperature to set + */ + public void setTemperature(Float temperature) { + this.temperature = temperature; + } + + /** + * @return the temperature + */ + public Float getTemperature() { + return temperature; + } + + /** + * @param dewpoint + * the dewpoint to set + */ + public void setDewpoint(Float dewpoint) { + this.dewpoint = dewpoint; + } + + /** + * @return the dewpoint + */ + public Float getDewpoint() { + return dewpoint; + } + + /** + * @param windDir + * the windDir to set + */ + public void setWindDir(Float windDir) { + this.windDir = windDir; + } + + /** + * @return the windDir + */ + public Float getWindDir() { + return windDir; + } + + /** + * @param windSpeedPeak + * the windSpeedPeak to set + */ + public void setWindSpeedPeak(Float windSpeedPeak) { + this.windSpeedPeak = windSpeedPeak; + } + + /** + * @return the windSpeedPeak + */ + public Float getWindSpeedPeak() { + return windSpeedPeak; + } + + /** + * @param precipAccum + * the precipAccum to set + */ + public void setPrecipAccum(Float precipAccum) { + this.precipAccum = precipAccum; + } + + /** + * @return the precipAccum + */ + public Float getPrecipAccum() { + return precipAccum; + } + + /** + * @param precip5min + * the precip5min to set + */ + public void setPrecip5min(Float precip5min) { + this.precip5min = precip5min; + } + + /** + * @return the precip5min + */ + public Float getPrecip5min() { + return precip5min; + } + + /** + * @param precip1hr + * the precip1hr to set + */ + public void setPrecip1hr(Float precip1hr) { + this.precip1hr = precip1hr; + } + + /** + * @return the precip1hr + */ + public Float getPrecip1hr() { + return precip1hr; + } + + /** + * @param precip3hr + * the precip3hr to set + */ + public void setPrecip3hr(Float precip3hr) { + this.precip3hr = precip3hr; + } + + /** + * @return the precip3hr + */ + public Float getPrecip3hr() { + return precip3hr; + } + + /** + * @param precip6hr + * the precip6hr to set + */ + public void setPrecip6hr(Float precip6hr) { + this.precip6hr = precip6hr; + } + + /** + * @return the precip6hr + */ + public Float getPrecip6hr() { + return precip6hr; + } + + /** + * @param precip24hr + * the precip24hr to set + */ + public void setPrecip24hr(Float precip24hr) { + this.precip24hr = precip24hr; + } + + /** + * @return the precip24hr + */ + public Float getPrecip24hr() { + return precip24hr; + } + + /** + * @param rawMessage + * the rawMessage to set + */ + public void setRawMessage(String rawMessage) { + this.rawMessage = rawMessage; + } + + /** + * @return the rawMessage + */ + public String getRawMessage() { + return rawMessage; + } + + /** + * @param relHumidity + * the relHumidity to set + */ + public void setRelHumidity(Float relHumidity) { + this.relHumidity = relHumidity; + } + + /** + * @return the relHumidity + */ + public Float getRelHumidity() { + return relHumidity; + } + + /** + * @param numericWMOid + * the numericWMOid to set + */ + public void setNumericWMOid(long numericWMOid) { + this.numericWMOid = numericWMOid; + } + + /** + * @return the numericWMOid + */ + public long getNumericWMOid() { + return numericWMOid; + } + + /** + * @param l + * the reportTime to set + */ + public void setReportTime(long l) { + this.reportTime = l; + } + + /** + * @return the reportTime + */ + public Double getReportTime() { + return reportTime; + } + + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + + } + + /** + * @return the pointDataView + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ldadhydro"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/LdadmesonetPointDataTransform.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/LdadmesonetPointDataTransform.java index b075a2479f..ed82b06a2f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/LdadmesonetPointDataTransform.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/LdadmesonetPointDataTransform.java @@ -25,9 +25,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.ldadmesonet.dao.LdadMesonetDao; import com.raytheon.uf.common.pointdata.PointDataContainer; @@ -44,7 +41,8 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 10/09/09 DR2814 vkorolev Initial creation + * Oct 09, 2009 DR2814 vkorolev Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -53,108 +51,173 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; */ public class LdadmesonetPointDataTransform { - - private Log logger = LogFactory.getLog(getClass()); - + private LdadMesonetDao dao; private PointDataDescription description; - //------------------Common params (From OBS plugin)---------------------------- - private static final String PRESS_CHANGE3_HOUR = "pressChange3Hour"; + + // ------------------Common params (From OBS + // plugin)---------------------------- + private static final String PRESS_CHANGE3_HOUR = "pressChange3Hour"; + private static final String PRESS_CHANGE_CHAR = "pressChangeChar"; + private static final String ALTIMETER = "altimeter"; + private static final String WIND_GUST = "windGust"; + private static final String WIND_SPEED = "windSpeed"; + private static final String DEWPOINT = "dewpoint"; + private static final String TEMPERATURE = "temperature"; + private static final String PRES_WEATHER = "presWeather"; + private static final String VISIBILITY = "visibility"; + private static final String LONGITUDE = "longitude"; + private static final String LATITUDE = "latitude"; - private static final String ELEVATION = "elevation"; + + private static final String ELEVATION = "elevation"; + private static final String STATION_NAME = "stationName"; + private static final String DATAURI = "dataURI"; - //------------------From LDAD mesonet netCDF------------------------ + + // ------------------From LDAD mesonet netCDF------------------------ private static final String STORAGE_TYPE = "storageType"; + private static final String STATION_ID = "stationId"; + private static final String DATA_PROVIDER = "dataProvider"; + private static final String HOME_WFO = "homeWFO"; + private static final String OBSERVATION_TIME = "observationTime"; + private static final String PROVIDER_ID = "providerId"; + private static final String HANDBOOK5_ID = "handbook5Id"; + private static final String STATION_TYPE = "stationType"; + private static final String REPORT_TIME = "reportTime"; + private static final String RECEIVED_TIME = "receivedTime"; + private static final String NUMERICAL_WMO_ID = "numericWMOid"; + private static final String DATA_PLATFORM_TYPE = "dataPlatformType"; + private static final String PLATFORM_TRUE_DIRECTION = "platformTrueDirection"; + private static final String PLARFORM_TRUE_SPEED = "platformTrueSpeed"; + private static final String TEMP_CHANGE_TIME = "tempChangeTime"; + private static final String WET_BULB_TEMPERATURE = "wetBulbTemperature"; + private static final String RH_CHANGE_TIME = "rhChangeTime"; + private static final String STATION_PRESSURE = "stationPressure"; + private static final String STATION_PRESS_CHANGE_TIME = "stationPressChangeTime"; + private static final String WIND_DIR_CHANGE_TIME = "windDirChangeTime"; + private static final String WIND_SPEED_CHANGE_TIME = "windSpeedChangeTime"; + private static final String WIND_GUST_CHANGE_TIME = "windGustChangeTime"; + private static final String WIND_DIR_MIN = "windDirMin"; + private static final String WIND_DIR_MAX = "windDirMax"; + private static final String VISIBILITY_STATUS = "visibilityStatus"; + private static final String TOTAL_CLOUD_COVER = "totalCloudCover"; + private static final String CLOUD_BASE_HEIGHT = "cloudBaseHeight"; + private static final String LOW_LEVEL_CLOUD_TYPE = "lowLevelCloudType"; + private static final String MID_LEVEL_CLOUD_TYPE = "midLevelCloudType"; + private static final String HIGH_LEVEL_CLOUD_TYPE = "highLevelCloudType"; + private static final String MAX_TEMP_RECORD_PERIOD = "maxTempRecordPeriod"; + private static final String MAXIMUM_TEMPERATURE = "maximumTemperature"; + private static final String MIN_TEMP_RECORD_PERIOD = "minTempRecordPeriod"; + private static final String MINIMUM_TEMPERATURE = "minimumTemperature"; + private static final String PRECIP_ACCUM = "precipAccum"; + private static final String PRECIP_TYPE = "precipType"; + private static final String PRECIP_INTENSITY = "precipIntensity"; + private static final String TIME_SINCE_LAST_PCP = "timeSinceLastPcp"; + private static final String SOLAR_RADIATION = "solarRadiation"; + private static final String SOLAR_RAD_CHANGE_TIME = "solarRadChangeTime"; + private static final String SEA_SURFACE_TEMP = "seaSurfaceTemp"; + private static final String WAVE_PERIOD = "wavePeriod"; + private static final String WAVE_HEIGHT = "waveHeight"; + private static final String RAW_MESONET = "rawMessage"; + private static final String REL_HUMIDITY = "relHumidity"; + private static final String WIND_DIR = "windDir"; + private static final String PRESSURE = "pressure"; + private static final String SEA_LEVEL_PRESSURE = "seaLevelPressure"; + private static final String PRECIP_RATE = "precipRate"; + private static final String FUEL_TEMPERATURE = "fuelTemperature"; + private static final String FUEL_MOISTURE = "fuelMoisture"; + private static final String SOIL_TEMPERATURE = "soilTemperature"; + private static final String SOIL_MOISTURE = "soilMoisture"; - + /** * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! It is important to * keep this up to date or risk breaking backwards compatibility * */ private static final String[] ALL_PARAMS = { PRESS_CHANGE3_HOUR, - PRESS_CHANGE_CHAR, ALTIMETER, WIND_GUST, WIND_SPEED, DEWPOINT, + PRESS_CHANGE_CHAR, ALTIMETER, WIND_GUST, WIND_SPEED, DEWPOINT, TEMPERATURE, PRES_WEATHER, VISIBILITY, LONGITUDE, LATITUDE, SEA_LEVEL_PRESSURE, STATION_NAME, DATAURI, STORAGE_TYPE, ELEVATION, - STATION_ID, DATA_PROVIDER, HOME_WFO, OBSERVATION_TIME, PROVIDER_ID, - HANDBOOK5_ID, STATION_TYPE, REPORT_TIME, RECEIVED_TIME, - NUMERICAL_WMO_ID, DATA_PLATFORM_TYPE, PLATFORM_TRUE_DIRECTION, - PLARFORM_TRUE_SPEED, TEMP_CHANGE_TIME, WET_BULB_TEMPERATURE, - RH_CHANGE_TIME, STATION_PRESSURE, STATION_PRESS_CHANGE_TIME, - WIND_DIR_CHANGE_TIME, WIND_SPEED_CHANGE_TIME, - WIND_GUST_CHANGE_TIME, WIND_DIR_MIN, WIND_DIR_MAX, - VISIBILITY_STATUS, TOTAL_CLOUD_COVER, CLOUD_BASE_HEIGHT, - LOW_LEVEL_CLOUD_TYPE, MID_LEVEL_CLOUD_TYPE, HIGH_LEVEL_CLOUD_TYPE, - MAX_TEMP_RECORD_PERIOD, MAXIMUM_TEMPERATURE, - MIN_TEMP_RECORD_PERIOD, MINIMUM_TEMPERATURE, PRECIP_ACCUM, PRECIP_TYPE, - PRECIP_INTENSITY, TIME_SINCE_LAST_PCP, SOLAR_RADIATION, - SOLAR_RAD_CHANGE_TIME, SEA_SURFACE_TEMP, WAVE_PERIOD, WAVE_HEIGHT, - RAW_MESONET, REL_HUMIDITY, WIND_DIR, PRESSURE, SEA_LEVEL_PRESSURE, - PRECIP_RATE, FUEL_TEMPERATURE, FUEL_MOISTURE, SOIL_TEMPERATURE, - SOIL_MOISTURE - }; + STATION_ID, DATA_PROVIDER, HOME_WFO, OBSERVATION_TIME, PROVIDER_ID, + HANDBOOK5_ID, STATION_TYPE, REPORT_TIME, RECEIVED_TIME, + NUMERICAL_WMO_ID, DATA_PLATFORM_TYPE, PLATFORM_TRUE_DIRECTION, + PLARFORM_TRUE_SPEED, TEMP_CHANGE_TIME, WET_BULB_TEMPERATURE, + RH_CHANGE_TIME, STATION_PRESSURE, STATION_PRESS_CHANGE_TIME, + WIND_DIR_CHANGE_TIME, WIND_SPEED_CHANGE_TIME, + WIND_GUST_CHANGE_TIME, WIND_DIR_MIN, WIND_DIR_MAX, + VISIBILITY_STATUS, TOTAL_CLOUD_COVER, CLOUD_BASE_HEIGHT, + LOW_LEVEL_CLOUD_TYPE, MID_LEVEL_CLOUD_TYPE, HIGH_LEVEL_CLOUD_TYPE, + MAX_TEMP_RECORD_PERIOD, MAXIMUM_TEMPERATURE, + MIN_TEMP_RECORD_PERIOD, MINIMUM_TEMPERATURE, PRECIP_ACCUM, + PRECIP_TYPE, PRECIP_INTENSITY, TIME_SINCE_LAST_PCP, + SOLAR_RADIATION, SOLAR_RAD_CHANGE_TIME, SEA_SURFACE_TEMP, + WAVE_PERIOD, WAVE_HEIGHT, RAW_MESONET, REL_HUMIDITY, WIND_DIR, + PRESSURE, SEA_LEVEL_PRESSURE, PRECIP_RATE, FUEL_TEMPERATURE, + FUEL_MOISTURE, SOIL_TEMPERATURE, SOIL_MOISTURE }; public static final String ALL_PARAMS_LIST; static { @@ -192,11 +255,12 @@ public class LdadmesonetPointDataTransform { if (pdo.length > 0) { Map pointMap = new HashMap(); - + for (PluginDataObject p : pdo) { - if (!(p instanceof MesonetLdadRecord)) + if (!(p instanceof MesonetLdadRecord)) { continue; - + } + File f = this.dao.getFullFilePath(p); PointDataContainer pdc = pointMap.get(f); @@ -213,228 +277,198 @@ public class LdadmesonetPointDataTransform { return pdo; } - // private PointDataDescription getDescription(String type) - // throws JAXBException { - // InputStream is = this.getClass().getResourceAsStream( - // "/res/pointdata/" + type + ".xml"); - // if (is == null) { - // throw new RuntimeException("Cannot find descriptor for: " + type); - // } - // return PointDataDescription.fromStream(is); - // - // } - private PointDataView buildView(PointDataContainer container, - MesonetLdadRecord record) { + MesonetLdadRecord record) { PointDataView pdv = container.append(); - - -// if (record.getStationName()!=null) { -// pdv.setString(STATION_NAME, record.getStationName()); -// } - if (record.getRawMessage()!=null) { - pdv.setString(RAW_MESONET, record.getRawMessage()); - } - if (record.getSeaLevelPressure()!=null) { - pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure()); - } - // if (record.getLocation()!=null) { - // pdv.setFloat(LATITUDE, (float) record.getLatitude()); - // pdv.setFloat(LONGITUDE, (float) record.getLongitude()); - // pdv.setFloat(ELEVATION, record.getElevation()); - // } - if (record.getObservationTime()!=null) { + + if (record.getRawMessage() != null) { + pdv.setString(RAW_MESONET, record.getRawMessage()); + } + if (record.getSeaLevelPressure() != null) { + pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure()); + } + + if (record.getObservationTime() != null) { pdv.setLong(OBSERVATION_TIME, record.getDataTime().getRefTime() .getTime()); - } - if (record.getVisibility()!=null) { - pdv.setFloat(VISIBILITY, record.getVisibility()); - } - if (record.getTemperature()!=null) { - pdv.setFloat(TEMPERATURE, record.getTemperature()); - } - if (record.getDewpoint()!=null) { - pdv.setFloat(DEWPOINT, record.getDewpoint()); - } - if (record.getWindSpeed()!=null) { - pdv.setFloat(WIND_SPEED, record.getWindSpeed()); - } - if (record.getWindGust()!=null) { - pdv.setFloat(WIND_GUST, record.getWindGust()); - } - if (record.getAltimeter()!=null) { - pdv.setFloat(ALTIMETER, record.getAltimeter()); - } - if (record.getPressChangeChar()!=null) { - pdv.setInt(PRESS_CHANGE_CHAR, record.getPressChangeChar() - .intValue()); - } - if (record.getPressChange3Hour()!=null) { - pdv.setFloat(PRESS_CHANGE3_HOUR, record.getPressChange3Hour()); - } - //pdv.setString(DATAURI, record.getDataURI()); - -//--------------------------------------LDAD mesonet specific------------------------ - -// if (record.getDataProvider()!=null) { -// pdv.setString(DATA_PROVIDER, record.getDataProvider()); -// } -// if (record.getHomeWFO()!=null) { -// pdv.setString(HOME_WFO, record.getHomeWFO()); -// } -// if (record.getProviderId()!=null) { -// pdv.setString(PROVIDER_ID, record.getProviderId()); -// } -// if (record.getHandbook5Id()!=null) { -// pdv.setString(HANDBOOK5_ID, record.getHandbook5Id()); -// } -// if (record.getStationType()!=null) { -// pdv.setString(STATION_TYPE, record.getStationType()); -// } - if (record.getReportTime()!=null) { - pdv.setLong(REPORT_TIME, record.getReportTime()); - } - if (record.getReceivedTime()!=null) { - pdv.setLong(RECEIVED_TIME, record.getReceivedTime().longValue()); - } - if (record.getNumericWMOid()!=null) { - pdv.setLong(NUMERICAL_WMO_ID, record.getNumericWMOid()); - } - if (record.getDataPlatformType()!=null) { - pdv.setInt(DATA_PLATFORM_TYPE, record.getDataPlatformType().intValue()); - } - if (record.getPlatformTrueDirection()!=null) { - pdv.setFloat(PLATFORM_TRUE_DIRECTION, record.getPlatformTrueDirection()); - } - if (record.getPlatformTrueSpeed()!=null) { - pdv.setFloat(PLARFORM_TRUE_SPEED, record.getPlatformTrueSpeed()); - } - if (record.getTempChangeTime()!=null) { - pdv.setLong(TEMP_CHANGE_TIME, record.getTempChangeTime() - .longValue()); - } - if (record.getWetBulbTemperature()!=null) { - pdv.setFloat(WET_BULB_TEMPERATURE, record.getWetBulbTemperature()); - } - if (record.getRhChangeTime()!=null) { - pdv.setLong(RH_CHANGE_TIME, record.getRhChangeTime().longValue()); - } - if (record.getStationPressure()!=null) { - pdv.setFloat(STATION_PRESSURE, record.getStationPressure()); - } - if (record.getStationPressChangeTime()!=null) { - pdv.setLong(STATION_PRESS_CHANGE_TIME, record.getStationPressChangeTime().longValue()); - } - if (record.getWindDirChangeTime()!=null) { - pdv.setLong(WIND_DIR_CHANGE_TIME, record.getWindDirChangeTime() - .longValue()); - } - if (record.getWindSpeedChangeTime()!=null) { - pdv.setLong(WIND_SPEED_CHANGE_TIME, record.getWindSpeedChangeTime() - .longValue()); - } - if (record.getWindGustChangeTime()!=null) { - pdv.setLong(WIND_GUST_CHANGE_TIME, record.getWindGustChangeTime() - .longValue()); - } - if (record.getWindDirMin()!=null) { - pdv.setFloat(WIND_DIR_MIN, record.getWindDirMin()); - } - if (record.getWindDirMax()!=null) { - pdv.setFloat(WIND_DIR_MAX, record.getWindDirMax()); - } - if (record.getVisibilityStatus()!=null) { - pdv.setString(VISIBILITY_STATUS, record.getVisibilityStatus()); - } - if (record.getTotalCloudCover()!=null) { - pdv.setFloat(TOTAL_CLOUD_COVER, record.getTotalCloudCover()); - } - if (record.getCloudBaseHeight()!=null) { - pdv.setInt(CLOUD_BASE_HEIGHT, record.getCloudBaseHeight() - .intValue()); - } - if (record.getLowLevelCloudType()!=null) { - pdv.setInt(LOW_LEVEL_CLOUD_TYPE, record.getLowLevelCloudType() - .intValue()); - } - if (record.getMidLevelCloudType()!=null) { - pdv.setInt(MID_LEVEL_CLOUD_TYPE, record.getMidLevelCloudType() - .intValue()); - } - if (record.getHighLevelCloudType()!=null) { - pdv.setInt(HIGH_LEVEL_CLOUD_TYPE, record.getHighLevelCloudType() - .intValue()); - } - if (record.getMinTempRecordPeriod()!=null) { - pdv.setInt(MAX_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod() - .intValue()); - } - if (record.getMaximumTemperature()!=null) { - pdv.setFloat(MAXIMUM_TEMPERATURE, record.getMaximumTemperature()); - } - if (record.getMinTempRecordPeriod()!=null) { - pdv.setInt(MIN_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod() - .intValue()); - } - if (record.getMinimumTemperature()!=null) { - pdv.setFloat(MINIMUM_TEMPERATURE, record.getMinimumTemperature()); - } - if (record.getPrecipAccum()!=null) { - pdv.setFloat(PRECIP_ACCUM, record.getPrecipAccum()); - } - if (record.getPrecipType()!=null) { - pdv.setInt(PRECIP_TYPE, record.getPrecipType().intValue()); - } - if (record.getPrecipIntensity()!=null) { - pdv.setInt(PRECIP_INTENSITY, record.getPrecipIntensity().intValue()); - } - if (record.getTimeSinceLastPcp()!=null) { - pdv.setLong(TIME_SINCE_LAST_PCP, record.getTimeSinceLastPcp() - .longValue()); - } - if (record.getSolarRadiation()!=null) { - pdv.setFloat(SOLAR_RADIATION, record.getSolarRadiation()); - } - if (record.getSolarRadChangeTime()!=null) { - pdv.setLong(SOLAR_RAD_CHANGE_TIME, record.getSolarRadChangeTime().longValue()); - } - if (record.getSeaSurfaceTemp()!=null) { - pdv.setFloat(SEA_SURFACE_TEMP, record.getSeaSurfaceTemp()); - } - if (record.getWavePeriod()!=null) { - pdv.setFloat(WAVE_PERIOD, record.getWavePeriod()); - } - if (record.getWaveHeight()!=null) { - pdv.setFloat(WAVE_HEIGHT, record.getWaveHeight()); - } - if (record.getRelHumidity()!=null) { - pdv.setFloat(REL_HUMIDITY, record.getRelHumidity()); - } - if (record.getWindDir()!=null) { - pdv.setFloat(WIND_DIR, record.getWindDir()); - } - if (record.getPressure()!=null) { - pdv.setFloat(PRESSURE, record.getPressure()); - } - if (record.getSeaLevelPressure()!=null) { - pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure()); - } - if (record.getPrecipRate()!=null) { - pdv.setFloat(PRECIP_RATE, record.getPrecipRate()); - } - if (record.getFuelTemperature()!=null) { - pdv.setFloat(FUEL_TEMPERATURE, record.getFuelTemperature()); - } - if (record.getFuelMoisture()!=null) { - pdv.setFloat(FUEL_MOISTURE, record.getFuelMoisture()); - } - if (record.getSoilTemperature()!=null) { - pdv.setFloat(SOIL_TEMPERATURE, record.getSoilTemperature()); - } - if (record.getSoilMoisture()!=null) { - pdv.setFloat(SOIL_MOISTURE, record.getSoilMoisture()); - } - return pdv; + } + if (record.getVisibility() != null) { + pdv.setFloat(VISIBILITY, record.getVisibility()); + } + if (record.getTemperature() != null) { + pdv.setFloat(TEMPERATURE, record.getTemperature()); + } + if (record.getDewpoint() != null) { + pdv.setFloat(DEWPOINT, record.getDewpoint()); + } + if (record.getWindSpeed() != null) { + pdv.setFloat(WIND_SPEED, record.getWindSpeed()); + } + if (record.getWindGust() != null) { + pdv.setFloat(WIND_GUST, record.getWindGust()); + } + if (record.getAltimeter() != null) { + pdv.setFloat(ALTIMETER, record.getAltimeter()); + } + if (record.getPressChangeChar() != null) { + pdv.setInt(PRESS_CHANGE_CHAR, record.getPressChangeChar() + .intValue()); + } + if (record.getPressChange3Hour() != null) { + pdv.setFloat(PRESS_CHANGE3_HOUR, record.getPressChange3Hour()); + } + + // --------------------------------------LDAD mesonet + // specific------------------------ + + if (record.getReportTime() != null) { + pdv.setLong(REPORT_TIME, record.getReportTime()); + } + if (record.getReceivedTime() != null) { + pdv.setLong(RECEIVED_TIME, record.getReceivedTime().longValue()); + } + if (record.getNumericWMOid() != null) { + pdv.setLong(NUMERICAL_WMO_ID, record.getNumericWMOid()); + } + if (record.getDataPlatformType() != null) { + pdv.setInt(DATA_PLATFORM_TYPE, record.getDataPlatformType() + .intValue()); + } + if (record.getPlatformTrueDirection() != null) { + pdv.setFloat(PLATFORM_TRUE_DIRECTION, + record.getPlatformTrueDirection()); + } + if (record.getPlatformTrueSpeed() != null) { + pdv.setFloat(PLARFORM_TRUE_SPEED, record.getPlatformTrueSpeed()); + } + if (record.getTempChangeTime() != null) { + pdv.setLong(TEMP_CHANGE_TIME, record.getTempChangeTime() + .longValue()); + } + if (record.getWetBulbTemperature() != null) { + pdv.setFloat(WET_BULB_TEMPERATURE, record.getWetBulbTemperature()); + } + if (record.getRhChangeTime() != null) { + pdv.setLong(RH_CHANGE_TIME, record.getRhChangeTime().longValue()); + } + if (record.getStationPressure() != null) { + pdv.setFloat(STATION_PRESSURE, record.getStationPressure()); + } + if (record.getStationPressChangeTime() != null) { + pdv.setLong(STATION_PRESS_CHANGE_TIME, record + .getStationPressChangeTime().longValue()); + } + if (record.getWindDirChangeTime() != null) { + pdv.setLong(WIND_DIR_CHANGE_TIME, record.getWindDirChangeTime() + .longValue()); + } + if (record.getWindSpeedChangeTime() != null) { + pdv.setLong(WIND_SPEED_CHANGE_TIME, record.getWindSpeedChangeTime() + .longValue()); + } + if (record.getWindGustChangeTime() != null) { + pdv.setLong(WIND_GUST_CHANGE_TIME, record.getWindGustChangeTime() + .longValue()); + } + if (record.getWindDirMin() != null) { + pdv.setFloat(WIND_DIR_MIN, record.getWindDirMin()); + } + if (record.getWindDirMax() != null) { + pdv.setFloat(WIND_DIR_MAX, record.getWindDirMax()); + } + if (record.getVisibilityStatus() != null) { + pdv.setString(VISIBILITY_STATUS, record.getVisibilityStatus()); + } + if (record.getTotalCloudCover() != null) { + pdv.setFloat(TOTAL_CLOUD_COVER, record.getTotalCloudCover()); + } + if (record.getCloudBaseHeight() != null) { + pdv.setInt(CLOUD_BASE_HEIGHT, record.getCloudBaseHeight() + .intValue()); + } + if (record.getLowLevelCloudType() != null) { + pdv.setInt(LOW_LEVEL_CLOUD_TYPE, record.getLowLevelCloudType() + .intValue()); + } + if (record.getMidLevelCloudType() != null) { + pdv.setInt(MID_LEVEL_CLOUD_TYPE, record.getMidLevelCloudType() + .intValue()); + } + if (record.getHighLevelCloudType() != null) { + pdv.setInt(HIGH_LEVEL_CLOUD_TYPE, record.getHighLevelCloudType() + .intValue()); + } + if (record.getMinTempRecordPeriod() != null) { + pdv.setInt(MAX_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod() + .intValue()); + } + if (record.getMaximumTemperature() != null) { + pdv.setFloat(MAXIMUM_TEMPERATURE, record.getMaximumTemperature()); + } + if (record.getMinTempRecordPeriod() != null) { + pdv.setInt(MIN_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod() + .intValue()); + } + if (record.getMinimumTemperature() != null) { + pdv.setFloat(MINIMUM_TEMPERATURE, record.getMinimumTemperature()); + } + if (record.getPrecipAccum() != null) { + pdv.setFloat(PRECIP_ACCUM, record.getPrecipAccum()); + } + if (record.getPrecipType() != null) { + pdv.setInt(PRECIP_TYPE, record.getPrecipType().intValue()); + } + if (record.getPrecipIntensity() != null) { + pdv.setInt(PRECIP_INTENSITY, record.getPrecipIntensity().intValue()); + } + if (record.getTimeSinceLastPcp() != null) { + pdv.setLong(TIME_SINCE_LAST_PCP, record.getTimeSinceLastPcp() + .longValue()); + } + if (record.getSolarRadiation() != null) { + pdv.setFloat(SOLAR_RADIATION, record.getSolarRadiation()); + } + if (record.getSolarRadChangeTime() != null) { + pdv.setLong(SOLAR_RAD_CHANGE_TIME, record.getSolarRadChangeTime() + .longValue()); + } + if (record.getSeaSurfaceTemp() != null) { + pdv.setFloat(SEA_SURFACE_TEMP, record.getSeaSurfaceTemp()); + } + if (record.getWavePeriod() != null) { + pdv.setFloat(WAVE_PERIOD, record.getWavePeriod()); + } + if (record.getWaveHeight() != null) { + pdv.setFloat(WAVE_HEIGHT, record.getWaveHeight()); + } + if (record.getRelHumidity() != null) { + pdv.setFloat(REL_HUMIDITY, record.getRelHumidity()); + } + if (record.getWindDir() != null) { + pdv.setFloat(WIND_DIR, record.getWindDir()); + } + if (record.getPressure() != null) { + pdv.setFloat(PRESSURE, record.getPressure()); + } + if (record.getSeaLevelPressure() != null) { + pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure()); + } + if (record.getPrecipRate() != null) { + pdv.setFloat(PRECIP_RATE, record.getPrecipRate()); + } + if (record.getFuelTemperature() != null) { + pdv.setFloat(FUEL_TEMPERATURE, record.getFuelTemperature()); + } + if (record.getFuelMoisture() != null) { + pdv.setFloat(FUEL_MOISTURE, record.getFuelMoisture()); + } + if (record.getSoilTemperature() != null) { + pdv.setFloat(SOIL_TEMPERATURE, record.getSoilTemperature()); + } + if (record.getSoilMoisture() != null) { + pdv.setFloat(SOIL_MOISTURE, record.getSoilMoisture()); + } + return pdv; } public static MesonetLdadRecord toMesonetLdadRecord(PointDataView pdv) { @@ -445,14 +479,13 @@ public class LdadmesonetPointDataTransform { pdv.getString(STATION_ID)); Double lat = pdv.getNumber(LATITUDE).doubleValue(); Double lon = pdv.getNumber(LONGITUDE).doubleValue(); - loc.assignLocation(lat,lon); + loc.assignLocation(lat, lon); loc.setElevation(pdv.getNumber(ELEVATION).intValue()); mr.setLocation(loc); - mr.setPluginName("ldadmesonet"); mr.setReportType(pdv.getString(STORAGE_TYPE)); mr.setProviderId(pdv.getString(PROVIDER_ID)); mr.setPressChange3Hour(pdv.getNumber(PRESS_CHANGE3_HOUR).floatValue()); - mr.setPressChangeChar((short) pdv.getInt(PRESS_CHANGE_CHAR)); + mr.setPressChangeChar((short) pdv.getInt(PRESS_CHANGE_CHAR)); mr.setSeaLevelPressure(pdv.getNumber(SEA_LEVEL_PRESSURE).floatValue()); mr.setTemperature(pdv.getNumber(TEMPERATURE).floatValue()); mr.setVisibility(pdv.getNumber(VISIBILITY).floatValue()); @@ -461,50 +494,53 @@ public class LdadmesonetPointDataTransform { mr.setWindSpeed(pdv.getFloat(WIND_SPEED)); mr.setDataURI(pdv.getString(DATAURI)); mr.setReceivedTime(pdv.getNumber(RECEIVED_TIME).doubleValue()); -//---------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------- mr.setTempChangeTime(pdv.getNumber(TEMP_CHANGE_TIME).doubleValue()); - mr.setWetBulbTemperature(pdv.getFloat(WET_BULB_TEMPERATURE)); - mr.setRhChangeTime((Double) pdv.getNumber(RH_CHANGE_TIME)); - mr.setStationPressure(pdv.getFloat(STATION_PRESSURE)); - mr.setStationPressChangeTime((Double) pdv.getNumber(STATION_PRESS_CHANGE_TIME)); - mr.setWindDirChangeTime((Double) pdv.getNumber(WIND_DIR_CHANGE_TIME)); - mr.setWindSpeedChangeTime((Double) pdv.getNumber(WIND_SPEED_CHANGE_TIME)); - mr.setWindGustChangeTime((Double) pdv.getNumber(WIND_GUST_CHANGE_TIME)); + mr.setWetBulbTemperature(pdv.getFloat(WET_BULB_TEMPERATURE)); + mr.setRhChangeTime((Double) pdv.getNumber(RH_CHANGE_TIME)); + mr.setStationPressure(pdv.getFloat(STATION_PRESSURE)); + mr.setStationPressChangeTime((Double) pdv + .getNumber(STATION_PRESS_CHANGE_TIME)); + mr.setWindDirChangeTime((Double) pdv.getNumber(WIND_DIR_CHANGE_TIME)); + mr.setWindSpeedChangeTime((Double) pdv + .getNumber(WIND_SPEED_CHANGE_TIME)); + mr.setWindGustChangeTime((Double) pdv.getNumber(WIND_GUST_CHANGE_TIME)); mr.setWindDirMin(pdv.getFloat(WIND_DIR_MIN)); mr.setWindDirMax(pdv.getFloat(WIND_DIR_MAX)); - mr.setVisibilityStatus(pdv.getString(VISIBILITY_STATUS )); - mr.setTotalCloudCover(pdv.getFloat(TOTAL_CLOUD_COVER )); + mr.setVisibilityStatus(pdv.getString(VISIBILITY_STATUS)); + mr.setTotalCloudCover(pdv.getFloat(TOTAL_CLOUD_COVER)); mr.setCloudBaseHeight((Short) pdv.getNumber(CLOUD_BASE_HEIGHT)); mr.setLowLevelCloudType((Short) pdv.getNumber(LOW_LEVEL_CLOUD_TYPE)); - mr.setMidLevelCloudType((Short) pdv.getNumber(MID_LEVEL_CLOUD_TYPE )); - mr.setHighLevelCloudType((Short) pdv.getNumber(HIGH_LEVEL_CLOUD_TYPE )); - mr.setMaxTempRecordPeriod((Short) pdv.getNumber(MAX_TEMP_RECORD_PERIOD )); - mr.setMaximumTemperature(pdv.getFloat(MAXIMUM_TEMPERATURE )); - mr.setMinTempRecordPeriod((Short) pdv.getNumber(MIN_TEMP_RECORD_PERIOD )); - mr.setMaximumTemperature(pdv.getFloat(MINIMUM_TEMPERATURE )); - mr.setPrecipAccum(pdv.getFloat(PRECIP_ACCUM )); - mr.setPrecipType((Short) pdv.getNumber(PRECIP_TYPE )); - mr.setPrecipIntensity((Short) pdv.getNumber(PRECIP_INTENSITY )); - mr.setTimeSinceLastPcp((Double) pdv.getNumber(TIME_SINCE_LAST_PCP )); - mr.setSolarRadiation(pdv.getFloat(SOLAR_RADIATION )); - mr.setSolarRadChangeTime((Double) pdv.getNumber(SOLAR_RAD_CHANGE_TIME )); - mr.setSeaSurfaceTemp(pdv.getFloat(SEA_SURFACE_TEMP )); - mr.setWavePeriod(pdv.getFloat(WAVE_PERIOD )); - mr.setWaveHeight(pdv.getFloat(WAVE_HEIGHT )); + mr.setMidLevelCloudType((Short) pdv.getNumber(MID_LEVEL_CLOUD_TYPE)); + mr.setHighLevelCloudType((Short) pdv.getNumber(HIGH_LEVEL_CLOUD_TYPE)); + mr.setMaxTempRecordPeriod((Short) pdv.getNumber(MAX_TEMP_RECORD_PERIOD)); + mr.setMaximumTemperature(pdv.getFloat(MAXIMUM_TEMPERATURE)); + mr.setMinTempRecordPeriod((Short) pdv.getNumber(MIN_TEMP_RECORD_PERIOD)); + mr.setMaximumTemperature(pdv.getFloat(MINIMUM_TEMPERATURE)); + mr.setPrecipAccum(pdv.getFloat(PRECIP_ACCUM)); + mr.setPrecipType((Short) pdv.getNumber(PRECIP_TYPE)); + mr.setPrecipIntensity((Short) pdv.getNumber(PRECIP_INTENSITY)); + mr.setTimeSinceLastPcp((Double) pdv.getNumber(TIME_SINCE_LAST_PCP)); + mr.setSolarRadiation(pdv.getFloat(SOLAR_RADIATION)); + mr.setSolarRadChangeTime((Double) pdv.getNumber(SOLAR_RAD_CHANGE_TIME)); + mr.setSeaSurfaceTemp(pdv.getFloat(SEA_SURFACE_TEMP)); + mr.setWavePeriod(pdv.getFloat(WAVE_PERIOD)); + mr.setWaveHeight(pdv.getFloat(WAVE_HEIGHT)); mr.setRawMessage(pdv.getString(RAW_MESONET)); - mr.setRelHumidity(pdv.getFloat(REL_HUMIDITY)); - mr.setWindDir(pdv.getFloat(WIND_DIR )); - mr.setPressure(pdv.getFloat(PRESSURE )); - mr.setSeaLevelPressure(pdv.getFloat(SEA_LEVEL_PRESSURE )); - mr.setPrecipRate(pdv.getFloat(PRECIP_RATE )); - mr.setFuelTemperature(pdv.getFloat(FUEL_TEMPERATURE )); - mr.setFuelMoisture(pdv.getFloat(FUEL_MOISTURE )); - mr.setSoilTemperature(pdv.getFloat(SOIL_TEMPERATURE )); - mr.setSoilMoisture(pdv.getFloat(SOIL_MOISTURE )); + mr.setRelHumidity(pdv.getFloat(REL_HUMIDITY)); + mr.setWindDir(pdv.getFloat(WIND_DIR)); + mr.setPressure(pdv.getFloat(PRESSURE)); + mr.setSeaLevelPressure(pdv.getFloat(SEA_LEVEL_PRESSURE)); + mr.setPrecipRate(pdv.getFloat(PRECIP_RATE)); + mr.setFuelTemperature(pdv.getFloat(FUEL_TEMPERATURE)); + mr.setFuelMoisture(pdv.getFloat(FUEL_MOISTURE)); + mr.setSoilTemperature(pdv.getFloat(SOIL_TEMPERATURE)); + mr.setSoilMoisture(pdv.getFloat(SOIL_MOISTURE)); return mr; } - public static MesonetLdadRecord[] toMesonetLdadRecords(PointDataContainer container) { + public static MesonetLdadRecord[] toMesonetLdadRecords( + PointDataContainer container) { List records = new ArrayList(); container.setCurrentSz(container.getAllocatedSz()); for (int i = 0; i < container.getCurrentSz(); i++) { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/MesonetLdadRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/MesonetLdadRecord.java index c8b169b277..0889f89703 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/MesonetLdadRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ldadmesonet/src/com/raytheon/uf/common/dataplugin/ldadmesonet/MesonetLdadRecord.java @@ -60,6 +60,7 @@ import com.vividsolutions.jts.geom.Geometry; * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -76,1590 +77,1590 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ldadmesonet", - indexes = { - @Index(name = "ldadmesonet_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ldadmesonet", indexes = { @Index(name = "ldadmesonet_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class MesonetLdadRecord extends PersistablePluginDataObject implements ISpatialEnabled, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; private static final String OBS_TIME_FMT = "%1$tY/% * @@ -86,475 +88,477 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "lsr", - indexes = { - @Index(name = "lsr_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "lsr", indexes = { @Index(name = "lsr_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class LocalStormReport extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { - - private static final long serialVersionUID = 1L; - - private static final int MISSING = -9999; - - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit PRESSURE_UNIT = SI.PASCAL; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit WAVE_UNIT = SI.METER; - - public static final Unit VISIBILITY_UNIT = NonSI.MILE; - - public static final Unit CLOUD_COVER = NonSI.OCTET; - - // - @DataURI(position = 1) - @Column - @XmlElement - @DynamicSerializeElement - private LSREventType eventType; - - // Correction indicator from wmo header - @DataURI(position = 2) - @Column - @XmlElement - @DynamicSerializeElement - private String corIndicator; - - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - // Text of the WMO header - @Transient - @XmlElement - @DynamicSerializeElement - private String wmoHeader = ""; - - // Text of the office - @XmlElement - @DynamicSerializeElement - private String officeid = ""; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private String cityLoc = ""; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private String source = ""; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private String countyLoc = ""; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private String stateLoc = ""; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private String remarks = ""; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private Float magnitude = -9999.0f; - - // 0 = unknown - // 1 = estimated - // 2 = measured - // 3 = - // 4 = - @Transient - @XmlElement - @DynamicSerializeElement - private Integer magQual = MISSING; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private Integer injuries = MISSING; - - // - @Transient - @XmlElement - @DynamicSerializeElement - private Integer fatalities = MISSING; - - /** - * Empty default constructor - */ - public LocalStormReport() { - } - - /** - * Construct an instance of this class using the supplied datauri. - * - * @param dataUri - */ - public LocalStormReport(String dataUri) { - super(dataUri); - } - - /** - * @return the eventType - */ - public LSREventType getEventType() { - return eventType; - } - - /** - * @param eventType - * the eventType to set - */ - public void setEventType(LSREventType eventType) { - this.eventType = eventType; - } - - /** - * @return the corIndicator - */ - public String getCorIndicator() { - return corIndicator; - } - - /** - * @param corIndicator - * the corIndicator to set - */ - public void setCorIndicator(String corIndicator) { - this.corIndicator = corIndicator; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * @return the officeid - */ - public String getOfficeid() { - return officeid; - } - - /** - * @param officeid - * the officeid to set - */ - public void setOfficeid(String officeid) { - this.officeid = officeid; - } - - /** - * @return the cityLoc - */ - public String getCityLoc() { - return cityLoc; - } - - /** - * @param cityLoc - * the cityLoc to set - */ - public void setCityLoc(String cityLoc) { - this.cityLoc = cityLoc; - } - - /** - * @return the source - */ - public String getSource() { - return source; - } - - /** - * @param source - * the source to set - */ - public void setSource(String source) { - this.source = source; - } - - /** - * @return the countyLoc - */ - public String getCountyLoc() { - return countyLoc; - } - - /** - * @param countyLoc - * the countyLoc to set - */ - public void setCountyLoc(String countyLoc) { - this.countyLoc = countyLoc; - } - - /** - * @return the stateLoc - */ - public String getStateLoc() { - return stateLoc; - } - - /** - * @param stateLoc - * the stateLoc to set - */ - public void setStateLoc(String stateLoc) { - this.stateLoc = stateLoc; - } - - /** - * @return the remarks - */ - public String getRemarks() { - return remarks; - } - - /** - * @param remarks - * the remarks to set - */ - public void setRemarks(String remarks) { - this.remarks = remarks; - } - - /** - * @return the magnitude - */ - public Float getMagnitude() { - return magnitude; - } - - /** - * @param magnitude - * the magnitude to set - */ - public void setMagnitude(Float magnitude) { - this.magnitude = magnitude; - } - - /** - * @return the magQual - */ - public Integer getMagQual() { - return magQual; - } - - /** - * @param magQual - * the magQual to set - */ - public void setMagQual(Integer magQual) { - this.magQual = magQual; - } - - /** - * @return the injuries - */ - public Integer getInjuries() { - return injuries; - } - - /** - * @param injuries - * the injuries to set - */ - public void setInjuries(Integer injuries) { - this.injuries = injuries; - } - - /** - * @return the fatalities - */ - public Integer getFatalities() { - return fatalities; - } - - /** - * @param fatalities - * the fatalities to set - */ - public void setFatalities(Integer fatalities) { - this.fatalities = fatalities; - } - - /** - * Set the data uri for this observation. - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } - - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } - - public SurfaceObsLocation getLocation() { - return location; - } - - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } - - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } - - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } - - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } - - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } - - /** - * Get whether the location for this observation is defined. - * - * @return Is this location defined. - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } - - @Override - public Amount getValue(String paramName) { - return null; - } - - @Override - public String getString(String paramName) { - return null; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - @Override - public Collection getValues(String paramName) { - return null; - } - - @Override - public PointDataView getPointDataView() { - return pointDataView; - } - - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - Calendar c = getDataTime().getRefTimeAsCalendar(); - if (c != null) { - sb.append(String.format("LSR:%1$tY%1$tm%1$td%1$tH%1$tM", - getDataTime().getRefTimeAsCalendar())); - } else { - sb.append("LSR:YYYYMMDDHHmm"); - } - sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); - sb.append(String.format("%s:", cityLoc)); - sb.append(String.format("%s:", eventType.getEventName())); - sb.append(String.format("%5.2f:%s", getMagnitude(), getEventType() - .getEventUnits())); - return sb.toString(); - } + ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + + private static final long serialVersionUID = 1L; + + private static final int MISSING = -9999; + + public static final Unit TEMPERATURE_UNIT = SI.KELVIN; + + public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; + + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + + public static final Unit PRESSURE_UNIT = SI.PASCAL; + + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + + public static final Unit WAVE_UNIT = SI.METER; + + public static final Unit VISIBILITY_UNIT = NonSI.MILE; + + public static final Unit CLOUD_COVER = NonSI.OCTET; + + // + @DataURI(position = 1) + @Column + @XmlElement + @DynamicSerializeElement + private LSREventType eventType; + + // Correction indicator from wmo header + @DataURI(position = 2) + @Column + @XmlElement + @DynamicSerializeElement + private String corIndicator; + + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + // Text of the WMO header + @Transient + @XmlElement + @DynamicSerializeElement + private String wmoHeader = ""; + + // Text of the office + @XmlElement + @DynamicSerializeElement + private String officeid = ""; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private String cityLoc = ""; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private String source = ""; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private String countyLoc = ""; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private String stateLoc = ""; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private String remarks = ""; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private Float magnitude = -9999.0f; + + // 0 = unknown + // 1 = estimated + // 2 = measured + // 3 = + // 4 = + @Transient + @XmlElement + @DynamicSerializeElement + private Integer magQual = MISSING; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private Integer injuries = MISSING; + + // + @Transient + @XmlElement + @DynamicSerializeElement + private Integer fatalities = MISSING; + + /** + * Empty default constructor + */ + public LocalStormReport() { + } + + /** + * Construct an instance of this class using the supplied datauri. + * + * @param dataUri + */ + public LocalStormReport(String dataUri) { + super(dataUri); + } + + /** + * @return the eventType + */ + public LSREventType getEventType() { + return eventType; + } + + /** + * @param eventType + * the eventType to set + */ + public void setEventType(LSREventType eventType) { + this.eventType = eventType; + } + + /** + * @return the corIndicator + */ + public String getCorIndicator() { + return corIndicator; + } + + /** + * @param corIndicator + * the corIndicator to set + */ + public void setCorIndicator(String corIndicator) { + this.corIndicator = corIndicator; + } + + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * @return the officeid + */ + public String getOfficeid() { + return officeid; + } + + /** + * @param officeid + * the officeid to set + */ + public void setOfficeid(String officeid) { + this.officeid = officeid; + } + + /** + * @return the cityLoc + */ + public String getCityLoc() { + return cityLoc; + } + + /** + * @param cityLoc + * the cityLoc to set + */ + public void setCityLoc(String cityLoc) { + this.cityLoc = cityLoc; + } + + /** + * @return the source + */ + public String getSource() { + return source; + } + + /** + * @param source + * the source to set + */ + public void setSource(String source) { + this.source = source; + } + + /** + * @return the countyLoc + */ + public String getCountyLoc() { + return countyLoc; + } + + /** + * @param countyLoc + * the countyLoc to set + */ + public void setCountyLoc(String countyLoc) { + this.countyLoc = countyLoc; + } + + /** + * @return the stateLoc + */ + public String getStateLoc() { + return stateLoc; + } + + /** + * @param stateLoc + * the stateLoc to set + */ + public void setStateLoc(String stateLoc) { + this.stateLoc = stateLoc; + } + + /** + * @return the remarks + */ + public String getRemarks() { + return remarks; + } + + /** + * @param remarks + * the remarks to set + */ + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + /** + * @return the magnitude + */ + public Float getMagnitude() { + return magnitude; + } + + /** + * @param magnitude + * the magnitude to set + */ + public void setMagnitude(Float magnitude) { + this.magnitude = magnitude; + } + + /** + * @return the magQual + */ + public Integer getMagQual() { + return magQual; + } + + /** + * @param magQual + * the magQual to set + */ + public void setMagQual(Integer magQual) { + this.magQual = magQual; + } + + /** + * @return the injuries + */ + public Integer getInjuries() { + return injuries; + } + + /** + * @param injuries + * the injuries to set + */ + public void setInjuries(Integer injuries) { + this.injuries = injuries; + } + + /** + * @return the fatalities + */ + public Integer getFatalities() { + return fatalities; + } + + /** + * @param fatalities + * the fatalities to set + */ + public void setFatalities(Integer fatalities) { + this.fatalities = fatalities; + } + + /** + * Set the data uri for this observation. + * + * @param dataURI + */ + @Override + public void setDataURI(String dataURI) { + super.setDataURI(dataURI); + identifier = dataURI; + } + + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } + + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } + + public SurfaceObsLocation getLocation() { + return location; + } + + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } + + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } + + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } + + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } + + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } + + /** + * Get whether the location for this observation is defined. + * + * @return Is this location defined. + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } + + @Override + public Amount getValue(String paramName) { + return null; + } + + @Override + public String getString(String paramName) { + return null; + } + + @Override + public String[] getStrings(String paramName) { + return null; + } + + @Override + public Collection getValues(String paramName) { + return null; + } + + @Override + public PointDataView getPointDataView() { + return pointDataView; + } + + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + Calendar c = getDataTime().getRefTimeAsCalendar(); + if (c != null) { + sb.append(String.format("LSR:%1$tY%1$tm%1$td%1$tH%1$tM", + getDataTime().getRefTimeAsCalendar())); + } else { + sb.append("LSR:YYYYMMDDHHmm"); + } + sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); + sb.append(String.format("%s:", cityLoc)); + sb.append(String.format("%s:", eventType.getEventName())); + sb.append(String.format("%5.2f:%s", getMagnitude(), getEventType() + .getEventUnits())); + return sb.toString(); + } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "lsr"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.madis/src/com/raytheon/uf/common/dataplugin/madis/MadisRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.madis/src/com/raytheon/uf/common/dataplugin/madis/MadisRecord.java index ffd95cc6f7..339da123db 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.madis/src/com/raytheon/uf/common/dataplugin/madis/MadisRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.madis/src/com/raytheon/uf/common/dataplugin/madis/MadisRecord.java @@ -66,13 +66,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * MAR 27, 2013 1746 dhladky MADIS data record creation + * Mar 27, 2013 1746 dhladky MADIS data record creation * May 15, 2013 1658 djohnson Add sequence. * May 16, 2013 753 dhladky Restored dataUri as unique key - * June 03, 2013 1763 dhladky Added ValMap lookups for QCD - * July 08, 2013 2171 dhladky Removed dataURI - * July 12, 2013 2096 mpduff Changed temperature unit to F. - * July 14, 2013 2180 dhladky GUI update for mouse over display + * Jun 03, 2013 1763 dhladky Added ValMap lookups for QCD + * Jul 08, 2013 2171 dhladky Removed dataURI + * Jul 12, 2013 2096 mpduff Changed temperature unit to F. + * Jul 14, 2013 2180 dhladky GUI update for mouse over display + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author dhladky @@ -564,7 +565,8 @@ public class MadisRecord extends PersistablePluginDataObject implements * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Mar 16, 2013 dhladky Initial creation + * Mar 16, 2013 dhladky Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author dhladky @@ -572,21 +574,22 @@ public class MadisRecord extends PersistablePluginDataObject implements */ @XmlEnum public enum QCD { - //C - Coarse pass, passed level 1 - //S - Screened, passed levels 1 and 2 - //V - Verified, passed levels 1, 2, and 3 - //X - Rejected/erroneous, failed level 1 - //Q - Questioned, passed level 1, failed 2 or 3 - //G - Subjective good - //B - Subjective bad - @XmlEnumValue(QCD.V) VERIFIED("V"), - @XmlEnumValue(QCD.S) SCREENED("S"), - @XmlEnumValue(QCD.Q) QUESTIONED("Q"), - @XmlEnumValue(QCD.B) BAD("B"), - @XmlEnumValue(QCD.C) COARSEPASS("C"), - @XmlEnumValue(QCD.G) GOOD("G"), - @XmlEnumValue(QCD.Z) MISSING("Z"), - @XmlEnumValue(QCD.X) REJECTED("X"); + // C - Coarse pass, passed level 1 + // S - Screened, passed levels 1 and 2 + // V - Verified, passed levels 1, 2, and 3 + // X - Rejected/erroneous, failed level 1 + // Q - Questioned, passed level 1, failed 2 or 3 + // G - Subjective good + // B - Subjective bad + @XmlEnumValue(QCD.V) + VERIFIED("V"), @XmlEnumValue(QCD.S) + SCREENED("S"), @XmlEnumValue(QCD.Q) + QUESTIONED("Q"), @XmlEnumValue(QCD.B) + BAD("B"), @XmlEnumValue(QCD.C) + COARSEPASS("C"), @XmlEnumValue(QCD.G) + GOOD("G"), @XmlEnumValue(QCD.Z) + MISSING("Z"), @XmlEnumValue(QCD.X) + REJECTED("X"); private static final String V = "V"; @@ -1138,7 +1141,7 @@ public class MadisRecord extends PersistablePluginDataObject implements public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + result = (prime * result) + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); return result; } @@ -1164,4 +1167,9 @@ public class MadisRecord extends PersistablePluginDataObject implements } return true; } + + @Override + public String getPluginName() { + return PLUGIN_NAME; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.crimss/src/com/raytheon/uf/common/dataplugin/npp/crimss/CrimssRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.crimss/src/com/raytheon/uf/common/dataplugin/npp/crimss/CrimssRecord.java index f924464cad..84bb14f688 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.crimss/src/com/raytheon/uf/common/dataplugin/npp/crimss/CrimssRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.crimss/src/com/raytheon/uf/common/dataplugin/npp/crimss/CrimssRecord.java @@ -43,10 +43,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Dec 2, 2011 bsteffen Initial creation + * Dec 02, 2011 bsteffen Initial creation * 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 * * * @@ -84,4 +85,8 @@ public class CrimssRecord extends NPPSoundingRecord { return super.getDataURI(); } + @Override + public String getPluginName() { + return "crimss"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.nucaps/src/com/raytheon/uf/common/dataplugin/npp/nucaps/NucapsRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.nucaps/src/com/raytheon/uf/common/dataplugin/npp/nucaps/NucapsRecord.java index 5b77febd23..d216865280 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.nucaps/src/com/raytheon/uf/common/dataplugin/npp/nucaps/NucapsRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.nucaps/src/com/raytheon/uf/common/dataplugin/npp/nucaps/NucapsRecord.java @@ -43,10 +43,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 15, 2013 mschenke Initial creation + * Jan 15, 2013 mschenke Initial creation * 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 * * * @@ -88,7 +89,6 @@ public class NucapsRecord extends NPPSoundingRecord { public static final String PDV_QUALITY_FLAG = "Quality_Flag"; public NucapsRecord() { - setPluginName(PLUGIN_NAME); } @Override @@ -98,4 +98,8 @@ public class NucapsRecord extends NPPSoundingRecord { return super.getDataURI(); } + @Override + public String getPluginName() { + return PLUGIN_NAME; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSDataRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSDataRecord.java index 5bfa9b08bd..a6f5a1a84d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSDataRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSDataRecord.java @@ -53,11 +53,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Nov 30, 2011 mschenke Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Nov 30, 2011 mschenke Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -71,12 +73,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "viirs", - indexes = { - @Index(name = "viirs_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "viirs", indexes = { @Index(name = "viirs_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class VIIRSDataRecord extends PersistablePluginDataObject implements ISpatialEnabled { @@ -127,7 +125,6 @@ public class VIIRSDataRecord extends PersistablePluginDataObject implements private VIIRSSpatialCoverage coverage; public VIIRSDataRecord() { - setPluginName(VIIRSDataRecord.class.getAnnotation(Table.class).name()); } /* @@ -256,8 +253,9 @@ public class VIIRSDataRecord extends PersistablePluginDataObject implements @Override public Date getPersistenceTime() { Calendar c = getInsertTime(); - if (c == null) + if (c == null) { return null; + } return c.getTime(); } @@ -296,10 +294,16 @@ public class VIIRSDataRecord extends PersistablePluginDataObject implements public IDecoderGettable getDecoderGettable() { return null; } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "viirs"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java index a864957ea4..173fad6ece 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.obs/src/com/raytheon/uf/common/dataplugin/obs/metar/MetarRecord.java @@ -25,7 +25,6 @@ import java.util.Calendar; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.SortedSet; @@ -76,24 +75,28 @@ import com.raytheon.uf.common.time.util.TimeUtil; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ---------- ---------- ----------- -------------------------- - * 02/14/07 139 bphillip Initial creation - * Nov 15, 2007 njensen Added static units info. - * 20071129 472 jkorman Added IDecoderGettable interface. - * 20071204 472 jkorman getValue was using wrong select value. - * Dec 07,2007 452 bphillip Added station lat/lon - * 20071217 472 jkorman Changed to use ALTIMETER_UNIT. - * 20071221 666 jkorman Modified to default all numerics to -9999. - * 20090423 2338 jsanchez Implemented precip plots, cloud/vis. - * Added @DynamicSerializeElement to location. - * 20090528 2225 jsanchez Implemented tempFromTenths and dewPointFromTenths. - * 20090629 2538 jsanchez Made the sort public. - * Apr 4, 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 + * Date Ticket# Engineer Description + * ------------ ---------- ----------- --------------------------------------- + * Feb 14, 2007 139 bphillip Initial creation + * Nov 15, 2007 njensen Added static units info. + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Dec 04, 2007 472 jkorman getValue was using wrong select value. + * Dec 07, 2007 452 bphillip Added station lat/lon + * Dec 17, 2007 472 jkorman Changed to use ALTIMETER_UNIT. + * Dec 21, 2007 666 jkorman Modified to default all numerics to + * -9999. + * Apr 23, 2009 2338 jsanchez Implemented precip plots, cloud/vis. + * Added @DynamicSerializeElement to + * location. + * May 28, 2009 2225 jsanchez Implemented tempFromTenths and + * dewPointFromTenths. + * Jun 29, 2009 2538 jsanchez Made the sort public. + * 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 * * * @author bphillip @@ -106,1611 +109,1612 @@ import com.raytheon.uf.common.time.util.TimeUtil; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "obs", - indexes = { - @Index(name = "obs_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "obs", indexes = { @Index(name = "obs_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class MetarRecord extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData { + ISpatialEnabled, IDecoderGettable, IPointData { - public static final String PLUGIN_NAME = "obs"; + public static final String PLUGIN_NAME = "obs"; - public static final String STATION_ID = "stationId"; + public static final String STATION_ID = "stationId"; - public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; + public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; - public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; + public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; - public static final Unit HEIGHT_UNIT = SI.METER; + public static final Unit HEIGHT_UNIT = SI.METER; - public static final Unit VISIBILITY_UNIT = SI.KILO(NonSI.MILE); + public static final Unit VISIBILITY_UNIT = SI.KILO(NonSI.MILE); - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit PRESSURE_UNIT = SI.HECTO(SI.PASCAL); + public static final Unit PRESSURE_UNIT = SI.HECTO(SI.PASCAL); - public static final Unit ALTIMETER_UNIT = SI.PASCAL; + public static final Unit ALTIMETER_UNIT = SI.PASCAL; - public static final Unit PRECIP_UNIT = NonSI.INCH; + public static final Unit PRECIP_UNIT = NonSI.INCH; - /** Metar specific parameter keys */ - public static final class ParameterKey { - public static final String SFC_ALTIMETER = "SFC.PRESS.ALTIMETER"; + /** Metar specific parameter keys */ + public static final class ParameterKey { + public static final String SFC_ALTIMETER = "SFC.PRESS.ALTIMETER"; - public static final String PRESSURE_CHANGE = "PCHNG"; + public static final String PRESSURE_CHANGE = "PCHNG"; - public static final String VISIBILITY = "VIS"; + public static final String VISIBILITY = "VIS"; - public static final String PRECIPITATION_1HR = "PR1HR"; + public static final String PRECIPITATION_1HR = "PR1HR"; - public static final String PRECIPITATION_3HR = "PR3HR"; + public static final String PRECIPITATION_3HR = "PR3HR"; - public static final String PRECIPITATION_6HR = "PR6HR"; + public static final String PRECIPITATION_6HR = "PR6HR"; - public static final String PRECIPITATION_24HR = "PR24HR"; - } + public static final String PRECIPITATION_24HR = "PR24HR"; + } - /** Parameter keys used in the legacy system */ - public static final class LegacyParameterKey { + /** Parameter keys used in the legacy system */ + public static final class LegacyParameterKey { - public static final String TEMPERATURE = "T"; + public static final String TEMPERATURE = "T"; - public static final String DEW_POINT = "DpT"; + public static final String DEW_POINT = "DpT"; - public static final String WIND_SPEED = "wSp"; + public static final String WIND_SPEED = "wSp"; - public static final String WIND_DIRECTION = "WD"; + public static final String WIND_DIRECTION = "WD"; - public static final String WIND_GUST = "Gust"; + public static final String WIND_GUST = "Gust"; - public static final String ALTIMETER = "Alti"; + public static final String ALTIMETER = "Alti"; - public static final String SEA_LEVEL_PRESSURE = "msl-P"; + public static final String SEA_LEVEL_PRESSURE = "msl-P"; - public static final String PRESSURE_CHANGE_3HR = "PT3"; + public static final String PRESSURE_CHANGE_3HR = "PT3"; - public static final String VISABILITY = "Vis"; + public static final String VISABILITY = "Vis"; - public static final String PRECIPITATION_1HR = "TP"; + public static final String PRECIPITATION_1HR = "TP"; - public static final String PRECIPITATION_3HR = "TP3hr"; + public static final String PRECIPITATION_3HR = "TP3hr"; - public static final String PRECIPITATION_6HR = "TP6hr"; + public static final String PRECIPITATION_6HR = "TP6hr"; - public static final String PRECIPITATION_24HR = "TP24hr"; + public static final String PRECIPITATION_24HR = "TP24hr"; - // public static final String SNOW_DEPTH = "snow"; - // - // public static final String SNOW_WATER = "weqs"; - // - // public static final String SNOWFALL6_HOUR = "TP24hr"; - // - // public static final String SUNSHINE = "msun"; - // - // public static final String TEMP_MAX_6HOUR = "t6xc"; - // - // public static final String TEMP_MIN_6HOUR = "t6nc"; + // public static final String SNOW_DEPTH = "snow"; + // + // public static final String SNOW_WATER = "weqs"; + // + // public static final String SNOWFALL6_HOUR = "TP24hr"; + // + // public static final String SUNSHINE = "msun"; + // + // public static final String TEMP_MAX_6HOUR = "t6xc"; + // + // public static final String TEMP_MIN_6HOUR = "t6nc"; - private String value; + private String value; - /** - * - * @param value - * the value of this legacy parameter key - */ - public void setValue(String value) { - this.value = value; - } + /** + * + * @param value + * the value of this legacy parameter key + */ + public void setValue(String value) { + this.value = value; + } - /** - * - * @return the value of this legacy parameter key - */ - public String getValue() { - return value; - } + /** + * + * @return the value of this legacy parameter key + */ + public String getValue() { + return value; + } - } + } - /** Serializable id * */ - private static final long serialVersionUID = 1L; + /** Serializable id * */ + private static final long serialVersionUID = 1L; + + /** + * Maps common AWIPS I keys to IDecoderGettable and newer parameter key + * constants + */ + private static final HashMap PARM_MAP = new HashMap(); + static { + PARM_MAP.put(LegacyParameterKey.TEMPERATURE, SFC_TEMP); + PARM_MAP.put(LegacyParameterKey.DEW_POINT, SFC_DWPT); + PARM_MAP.put(LegacyParameterKey.WIND_SPEED, SFC_WNDSPD); + PARM_MAP.put(LegacyParameterKey.WIND_DIRECTION, SFC_WNDDIR); + PARM_MAP.put(LegacyParameterKey.WIND_GUST, SFC_WNDGST); + PARM_MAP.put(LegacyParameterKey.ALTIMETER, ParameterKey.SFC_ALTIMETER); + PARM_MAP.put(LegacyParameterKey.SEA_LEVEL_PRESSURE, PRES_SLP); + PARM_MAP.put("NLAT", STA_LAT); + PARM_MAP.put("NLON", STA_LON); + PARM_MAP.put(LegacyParameterKey.PRESSURE_CHANGE_3HR, + ParameterKey.PRESSURE_CHANGE); + // PARM_MAP.put("T24", "T24"); // not used + // PARM_MAP.put("DpT24", "DpT24"); // not used + // PARM_MAP.put("WS24", "WS24"); // not used + // PARM_MAP.put("WD24", "WD24"); // not used + // PARM_MAP.put("WGS24", "WGS24"); // not used + // PARM_MAP.put("ASET24", "ASET24"); // not used + // PARM_MAP.put("HIWC", "HIWC"); // not used + PARM_MAP.put(LegacyParameterKey.VISABILITY, ParameterKey.VISIBILITY); + PARM_MAP.put(LegacyParameterKey.PRECIPITATION_1HR, + ParameterKey.PRECIPITATION_1HR); + PARM_MAP.put(LegacyParameterKey.PRECIPITATION_3HR, + ParameterKey.PRECIPITATION_3HR); + PARM_MAP.put(LegacyParameterKey.PRECIPITATION_6HR, + ParameterKey.PRECIPITATION_6HR); + PARM_MAP.put(LegacyParameterKey.PRECIPITATION_24HR, + ParameterKey.PRECIPITATION_24HR); + } + + @Transient + private String sampleType = null; + + @Transient + private boolean isSkyCoverageSorted = false; + + @XmlElement + @DynamicSerializeElement + @Transient + private String report; + + @XmlElement + @DynamicSerializeElement + @Transient + private String wmoHeader; + + /** Nominal Time extracted from WMO header * */ + @XmlElement + @DynamicSerializeElement + @Transient + private String nominalTime; + + /** A string denoting the time of observation */ + @XmlElement + @DynamicSerializeElement + @Transient + private Calendar timeObs; + + /** Report type extracted from WMO header * */ + @XmlElement + @DynamicSerializeElement + @Column + @DataURI(position = 1) + protected String reportType; + + /** A string denoting if this report is a correction */ + @XmlElement + @DynamicSerializeElement + @Column + @DataURI(position = 2) + private String correction; + + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; + + /** A string denoting the type of automated station (AO1 or AO2) */ + @XmlElement + @DynamicSerializeElement + @Transient + private String autoStationType; + + @XmlElement + @DynamicSerializeElement + @Transient + private String skyKey; + + @XmlElement + @DynamicSerializeElement + @Transient + private Set skyCoverage = new HashSet(); + + /** A string denoting the vertical visibility */ + @XmlElement + @DynamicSerializeElement + @Transient + private int vertVisibility = -9999; + + /** A string denoting the lowest layer of clouds */ + @XmlElement + @DynamicSerializeElement + @Transient + private int skyLayerBase = -9999; + + /** The visibility in statute miles */ + @XmlElement + @DynamicSerializeElement + @Transient + private float visibility = -9999; + + /** A String used as the foreign key to the present weather table * */ + @XmlElement + @DynamicSerializeElement + @Transient + private String weatherKey; + + /** A Set of present weather conditions * */ + @DynamicSerializeElement + @XmlElement + @Transient + private List weatherCondition = new ArrayList(); + + /** A string denoting the sea level pressure in millibars */ + @XmlElement + @DynamicSerializeElement + @Transient + private float seaLevelPress = -9999; + + /** A string denoting the temperature in degrees Celsius */ + @XmlElement + @DynamicSerializeElement + @Transient + private int temperature = -9999; + + /** A string denoting the current temperature in tenths of degrees Celsius */ + @XmlElement + @DynamicSerializeElement + @Transient + private float tempFromTenths = -9999; + + /** A string denoting the current dew point in degrees Celsius */ + @XmlElement + @DynamicSerializeElement + @Transient + private int dewPoint = -9999; + + /** A string denoting the current dew point in tenths of degrees Celsius */ + @XmlElement + @DynamicSerializeElement + @Transient + private float dewPointFromTenths = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private String windDir; + + @XmlElement + @DynamicSerializeElement + @Transient + private int windSpeed = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private int windGust = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private int pkWndDir = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private int pkWndSpd = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private Calendar pkWndTime = null; + + @XmlElement + @DynamicSerializeElement + @Transient + private float altimeterInPa = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private float altimeter = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private float minTemp24Hour = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private float maxTemp24Hour = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private float minTemp6Hour = -9999; + + @XmlElement + @DynamicSerializeElement + @Transient + private float maxTemp6Hour = -9999; + + /** A string denoting inches of precipitation observed in the last hour */ + @XmlElement + @DynamicSerializeElement + @Transient + private float precip1Hour = -9999; + + /** A string denoting inches of precipitation observed in the last 3 hours */ + @XmlElement + @DynamicSerializeElement + @Transient + private float precip3Hour = -9999; + + /** A string denoting inches of precipitation observed in the last 6 hours */ + @XmlElement + @DynamicSerializeElement + @Transient + private float precip6Hour = -9999; + + /** A string denoting inches of precipitation observed in the last 24 hours */ + @XmlElement + @DynamicSerializeElement + @Transient + private float precip24Hour = -9999; + + /** A string denoting the pressure tendency(rising or falling) */ + @XmlElement + @DynamicSerializeElement + @Transient + private String pressChangeChar; + + /** A string denoting the pressure change observed in the past 3 hrs. */ + @XmlElement + @DynamicSerializeElement + @Transient + private float pressChange3Hour = -9999; + + // Amount of snow on the ground in inches. + @XmlElement + @DynamicSerializeElement + @Transient + private int snowDepth = -9999; + + // Water equivalent in 0.1 inch increments. + @XmlElement + @DynamicSerializeElement + @Transient + private float snowWater = -9999; + + // Snow fall last 6 hours. + @XmlElement + @DynamicSerializeElement + @Transient + private float snowFall_6Hours = -9999; + + // Number of minutes of sunshine. + @XmlElement + @DynamicSerializeElement + @Transient + private int sunshine = -9999; + + @XmlElement + @DynamicSerializeElement + @Column + private Calendar refHour; + + @DynamicSerializeElement + @Embedded + private PointDataView pointDataView; + + public MetarRecord() { + } + + /** + * Constructs a metar record from a dataURI + * + * @param uri + * The dataURI + * @param tableDef + * The table definition associated with this class + */ + public MetarRecord(String uri) { + super(uri); + } + + /** + * @return the serialVersionUID + */ + public static long getSerialVersionUID() { + return serialVersionUID; + } + + /** + * @return the altimeter + */ + public float getAltimeter() { + return altimeter; + } + + /** + * @param altimeter + * the altimeter to set + */ + public void setAltimeter(float altimeter) { + this.altimeter = altimeter; + } + + /** + * @return the altimeterInPa + */ + public float getAltimeterInPa() { + return altimeterInPa; + } + + /** + * @param altimeterInPa + * the altimeterInPa to set + */ + public void setAltimeterInPa(float altimeterInPa) { + this.altimeterInPa = altimeterInPa; + } + + /** + * @return the autoStationType + */ + public String getAutoStationType() { + return autoStationType; + } + + /** + * @param autoStationType + * the autoStationType to set + */ + public void setAutoStationType(String autoStationType) { + this.autoStationType = autoStationType; + } + + /** + * @return the correction + */ + public String getCorrection() { + return correction; + } + + /** + * @param correction + * the correction to set + */ + public void setCorrection(String correction) { + this.correction = correction; + } + + /** + * @return the dewPoint + */ + public int getDewPoint() { + return dewPoint; + } + + /** + * @param dewPoint + * the dewPoint to set + */ + public void setDewPoint(int dewPoint) { + this.dewPoint = dewPoint; + } + + /** + * @return the dewPointFromTenths + */ + public float getDewPointFromTenths() { + return dewPointFromTenths; + } + + /** + * @param dewPointFromTenths + * the dewPointFromTenths to set + */ + public void setDewPointFromTenths(float dewPointFromTenths) { + this.dewPointFromTenths = dewPointFromTenths; + } + + /** + * @return the maxTemp24Hour + */ + public float getMaxTemp24Hour() { + return maxTemp24Hour; + } + + /** + * @param maxTemp24Hour + * the maxTemp24Hour to set + */ + public void setMaxTemp24Hour(float maxTemp24Hour) { + this.maxTemp24Hour = maxTemp24Hour; + } + + /** + * @return the minTemp24Hour + */ + public float getMinTemp24Hour() { + return minTemp24Hour; + } + + /** + * @param minTemp24Hour + * the minTemp24Hour to set + */ + public void setMinTemp24Hour(float minTemp24Hour) { + this.minTemp24Hour = minTemp24Hour; + } + + /** + * @return the minTemp6Hour + */ + public float getMinTemp6Hour() { + return minTemp6Hour; + } + + /** + * @param minTemp6Hour + * the minTemp6Hour to set + */ + public void setMinTemp6Hour(float minTemp6Hour) { + this.minTemp6Hour = minTemp6Hour; + } + + /** + * @return the maxTemp6Hour + */ + public float getMaxTemp6Hour() { + return maxTemp6Hour; + } + + /** + * @param maxTemp6Hour + * the maxTemp6Hour to set + */ + public void setMaxTemp6Hour(float maxTemp6Hour) { + this.maxTemp6Hour = maxTemp6Hour; + } + + /** + * @return the precip1Hour + */ + public float getPrecip1Hour() { + return precip1Hour; + } + + /** + * @param precip1Hour + * the precip1Hour to set + */ + public void setPrecip1Hour(float precip1Hour) { + this.precip1Hour = precip1Hour; + } + + /** + * @return the precip3Hour + */ + public float getPrecip3Hour() { + return precip3Hour; + } + + /** + * @param precip3Hour + * the precip3Hour to set + */ + public void setPrecip3Hour(float precip3Hour) { + this.precip3Hour = precip3Hour; + } + + /** + * @return the precip6Hour + */ + public float getPrecip6Hour() { + return precip6Hour; + } + + /** + * @param precip6Hour + * the precip6Hour to set + */ + public void setPrecip6Hour(float precip6Hour) { + this.precip6Hour = precip6Hour; + } + + /** + * @return the precip24Hour + */ + public float getPrecip24Hour() { + return precip24Hour; + } + + /** + * @param precip24Hour + * the precip24Hour to set + */ + public void setPrecip24Hour(float precip24Hour) { + this.precip24Hour = precip24Hour; + } + + /** + * @return the pressChange3Hour + */ + public float getPressChange3Hour() { + return pressChange3Hour; + } + + /** + * @param pressChange3Hour + * the pressChange3Hour to set + */ + public void setPressChange3Hour(float pressChange3Hour) { + this.pressChange3Hour = pressChange3Hour; + } + + /** + * @return the pressChangeChar + */ + public String getPressChangeChar() { + return pressChangeChar; + } + + /** + * @param pressChangeChar + * the pressChangeChar to set + */ + public void setPressChangeChar(String pressChangeChar) { + this.pressChangeChar = pressChangeChar; + } + + /** + * @return the seaLevelPress + */ + public float getSeaLevelPress() { + return seaLevelPress; + } + + /** + * @param seaLevelPress + * the seaLevelPress to set + */ + public void setSeaLevelPress(float seaLevelPress) { + this.seaLevelPress = seaLevelPress; + } + + /** + * @return the skyLayerBase + */ + public int getSkyLayerBase() { + return skyLayerBase; + } + + /** + * @param skyLayerBase + * the skyLayerBase to set + */ + public void setSkyLayerBase(int skyLayerBase) { + this.skyLayerBase = skyLayerBase; + } + + /** + * @return the temperature + */ + public int getTemperature() { + return temperature; + } + + /** + * @param temperature + * the temperature to set + */ + public void setTemperature(int temperature) { + this.temperature = temperature; + } + + /** + * @return the tempFromTenths + */ + public float getTempFromTenths() { + return tempFromTenths; + } + + /** + * @param tempFromTenths + * the tempFromTenths to set + */ + public void setTempFromTenths(float tempFromTenths) { + this.tempFromTenths = tempFromTenths; + } + + /** + * @return the vertVisibility + */ + public int getVertVisibility() { + return vertVisibility; + } + + /** + * @param vertVisibility + * the vertVisibility to set + */ + public void setVertVisibility(int vertVisibility) { + this.vertVisibility = vertVisibility; + } + + /** + * @return the visibility + */ + public float getVisibility() { + + return visibility; + } + + /** + * @param visibility + * the visibility to set + */ + public void setVisibility(float visibility) { + this.visibility = visibility; + } + + /** + * @return the windDir + */ + public String getWindDir() { + return windDir; + } + + /** + * @param windDir + * the windDir to set + */ + public void setWindDir(String windDir) { + this.windDir = windDir; + } + + /** + * @return the windGust + */ + public int getWindGust() { + return windGust; + } + + /** + * @param windGust + * the windGust to set + */ + public void setWindGust(int windGust) { + this.windGust = windGust; + } + + /** + * @return the windSpeed + */ + public int getWindSpeed() { + return windSpeed; + } + + /** + * @param windSpeed + * the windSpeed to set + */ + public void setWindSpeed(int windSpeed) { + this.windSpeed = windSpeed; + } + + /** + * @return the pkWndDir + */ + public int getPkWndDir() { + return pkWndDir; + } + + /** + * @param pkWndDir + * the pkWndDir to set + */ + public void setPkWndDir(int pkWndDir) { + this.pkWndDir = pkWndDir; + } + + /** + * @return the pkWndSpd + */ + public int getPkWndSpd() { + return pkWndSpd; + } + + /** + * @param pkWndSpd + * the pkWndSpd to set + */ + public void setPkWndSpd(int pkWndSpd) { + this.pkWndSpd = pkWndSpd; + } + + /** + * @return the pkWndTime + */ + public Calendar getPkWndTime() { + return pkWndTime; + } + + /** + * @param pkWndTime + * the pkWndTime to set + */ + public void setPkWndTime(Calendar pkWndTime) { + this.pkWndTime = pkWndTime; + } + + /** + * @return the timeObs + */ + public Calendar getTimeObs() { + if (this.dataTime == null) { + return null; + } + return this.dataTime.getRefTimeAsCalendar(); + } + + /** + * @param timeObs + * the timeObs to set + */ + public void setTimeObs(Calendar timeObs) { + this.nominalTime = TimeUtil.formatCalendar(timeObs); + this.timeObs = timeObs; + } + + /** + * @return the skyCoverage + */ + public Set getSkyCoverage() { + return skyCoverage; + } + + /** + * @param skyCoverage + * the skyCoverage to set + */ + public void setSkyCoverage(Set skyCoverage) { + this.skyCoverage = skyCoverage; + } + + public void addSkyCoverage(SkyCover cover) { + skyCoverage.add(cover); + cover.setParentMetar(this); + } + + /** + * @return the skyKey + */ + public String getSkyKey() { + return skyKey; + } + + /** + * @param skyKey + * the skyKey to set + */ + public void setSkyKey(String skyKey) { + this.skyKey = skyKey; + } + + /** + * @return the weatherCondition + */ + public List getWeatherCondition() { + return weatherCondition; + } + + /** + * @param weatherCondition + * the weatherCondition to set + */ + public void setWeatherCondition(List weatherCondition) { + this.weatherCondition = weatherCondition; + } + + public void addWeatherCondition(WeatherCondition condition) { + this.weatherCondition.add(condition); + condition.setParentMetar(this); + } + + /** + * @return the weatherKey + */ + public String getWeatherKey() { + return weatherKey; + } + + /** + * @param weatherKey + * the weatherKey to set + */ + public void setWeatherKey(String weatherKey) { + this.weatherKey = weatherKey; + } + + /** + * @return the refHour + */ + public Calendar getRefHour() { + return refHour; + } + + /** + * @param refHour + * the refHour to set + */ + public void setRefHour(Calendar refHour) { + this.refHour = refHour; + } + + /** + * @return the snowDepth + */ + public int getSnowDepth() { + return snowDepth; + } + + /** + * @param snowDepth + * the snowDepth to set + */ + public void setSnowDepth(int snowDepth) { + this.snowDepth = snowDepth; + } + + /** + * @return the snowFall_6Hours + */ + public float getSnowFall_6Hours() { + return snowFall_6Hours; + } + + /** + * @param snowFall_6Hours + * the snowFall_6Hours to set + */ + public void setSnowFall_6Hours(float snowFall_6Hours) { + this.snowFall_6Hours = snowFall_6Hours; + } + + /** + * @return the sunshine + */ + public int getSunshine() { + return sunshine; + } + + /** + * @param sunshine + * the sunshine to set + */ + public void setSunshine(int sunshine) { + this.sunshine = sunshine; + } + + /** + * @return the snowWater + */ + public float getSnowWater() { + return snowWater; + } + + /** + * @param snowWater + * the snowWater to set + */ + public void setSnowWater(float snowWater) { + this.snowWater = snowWater; + } + + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + this.identifier = dataURI; + // set the parentID to the dataURI for all values + if ((this.getWeatherCondition() != null) + && (this.getWeatherCondition().size() > 0)) { + for (WeatherCondition cond : this.getWeatherCondition()) { + cond.setParentMetar(this); + } + } + + // set the parentID to the dataURI for all values + if ((this.getSkyCoverage() != null) + && (this.getSkyCoverage().size() > 0)) { + for (SkyCover cover : this.getSkyCoverage()) { + cover.setParentMetar(this); + } + } + } + + public String getReportType() { + return reportType; + } + + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } + + public String getNominalTime() { + return nominalTime; + } + + public void setNominalTime(String nominalTime) { + this.nominalTime = nominalTime; + } + + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } + + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public String getString(String paramName) { + if ("STA".matches(paramName)) { + return getStationId(); + } + if ("WX".matches(paramName)) { + return this.weatherKey; + } + + return null; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.dataplugin.IDecoderGettable#getValue(java.lang + * .String) + */ + @Override + public Amount getValue(String paramName) { + Amount a = null; + + String pName = paramName; + if (PARM_MAP.containsKey(paramName)) { + // we have recieved an AWIPS I parameter name + pName = PARM_MAP.get(paramName); + } + + if (SFC_TEMP.equals(pName)) { + if (tempFromTenths != -9999) { + a = new Amount(tempFromTenths, TEMPERATURE_UNIT); + } else if (temperature != -9999) { + a = new Amount(temperature, TEMPERATURE_UNIT); + } + } else if (SFC_DWPT.equals(pName)) { + if (dewPointFromTenths != -9999) { + a = new Amount(dewPointFromTenths, TEMPERATURE_UNIT); + } else if (dewPoint != -9999) { + a = new Amount(dewPoint, TEMPERATURE_UNIT); + } + } else if (SFC_WNDSPD.equals(pName)) { + a = new Amount(windSpeed, WIND_SPEED_UNIT); + } else if (SFC_WNDGST.equals(pName)) { + a = new Amount(windGust, WIND_SPEED_UNIT); + } else if (ParameterKey.PRESSURE_CHANGE.equals(pName) + && (pressChange3Hour != -9999)) { + a = new Amount(pressChange3Hour, PRESSURE_UNIT); + } else if (SFC_WNDDIR.equals(pName)) { + String windDir = getWindDir(); + if ((windDir != null) && !windDir.equalsIgnoreCase("VRB")) { + Double result = Double.parseDouble(windDir); + a = new Amount(result, WIND_DIR_UNIT); + } + } else if (PRES_ALTSG.equals(pName)) { + a = new Amount(altimeterInPa, ALTIMETER_UNIT); + } else if (STA_LAT.equals(pName)) { + a = new Amount(getLatitude(), LOCATION_UNIT); + } else if (STA_LON.equals(pName)) { + a = new Amount(getLongitude(), LOCATION_UNIT); + } else if (PRES_SLP.equals(pName)) { + a = new Amount(this.seaLevelPress, PRESSURE_UNIT); + } else if (pName.startsWith("HGT")) { + int start = "HGT".length(); + int index = Integer.parseInt(pName.substring(start)); + if ((index < skyCoverage.size()) + && (getSkyCover(index).getHeight() != null)) { + a = new Amount(getSkyCover(index).getHeight(), HEIGHT_UNIT); + } + } else if (pName.startsWith("HMSL")) { + int start = "HMSL".length(); + int index = Integer.parseInt(pName.substring(start)); + if ((index < skyCoverage.size()) + && (getSkyCover(index).getHeight() != null) + && (getSpatialObject() != null) + && (getSpatialObject().getElevation() != null)) { + a = new Amount(getSkyCover(index).getHeight() + + getSpatialObject().getElevation(), HEIGHT_UNIT); + } + } else if (ParameterKey.PRECIPITATION_1HR.equals(pName) + || ParameterKey.PRECIPITATION_24HR.equals(pName)) { + sampleType = "PR"; + if (precip1Hour != -9999) { + a = new Amount(precip1Hour, PRECIP_UNIT); + } + } else if (ParameterKey.PRECIPITATION_3HR.equals(pName)) { + sampleType = "PR"; + if (precip3Hour != -9999) { + a = new Amount(precip3Hour, PRECIP_UNIT); + } + } else if (ParameterKey.PRECIPITATION_6HR.equals(pName)) { + sampleType = "PR"; + if (precip6Hour != -9999) { + a = new Amount(precip6Hour, PRECIP_UNIT); + } + } else if (ParameterKey.VISIBILITY.equals(pName)) { + a = new Amount(visibility, VISIBILITY_UNIT); + } + + return a; + } + + /** + * Get the value and units of a named parameter within this observation that + * has a multiplicity greater than 1. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Collection getValues(String paramName) { + return null; + } + + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } + + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } + + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } + + @Override + public String[] getStrings(String paramName) { + if ("SCV".matches(paramName)) { + ArrayList skyCoverage = new ArrayList(); + for (SkyCover sky : this.skyCoverage) { + skyCoverage.add(sky.getType()); + } + if (skyCoverage.size() > 0) { + return skyCoverage.toArray(new String[skyCoverage.size()]); + } + } else if ("WX".matches(paramName)) { + if (this.weatherKey != null) { + String[] presentWeather = { this.weatherKey }; + return presentWeather; + } + } else if (paramName.startsWith("CLD")) { + int start = "CLD".length(); + int index = Integer.parseInt(paramName.substring(start)); + String[] retVal = { "BLNK" }; + if (index < skyCoverage.size()) { + if (getSkyCover(index).getType() != null) { + retVal[0] = getSkyCover(index).getType(); + } + } + return retVal; + } else if (paramName.matches("CCHAR") && (pressChangeChar != null)) { + String[] changeChar = { pressChangeChar }; + return changeChar; + } + return null; + } + + @Override + public int hashCode() { + final int PRIME = 31; + int result = 1; + result = (PRIME * result) + Float.floatToIntBits(altimeter); + result = (PRIME * result) + Float.floatToIntBits(altimeterInPa); + result = (PRIME * result) + + ((autoStationType == null) ? 0 : autoStationType.hashCode()); + result = (PRIME * result) + + ((correction == null) ? 0 : correction.hashCode()); + result = (PRIME * result) + dewPoint; + result = (PRIME * result) + Float.floatToIntBits(dewPointFromTenths); + result = (PRIME * result) + Float.floatToIntBits(maxTemp24Hour); + result = (PRIME * result) + Float.floatToIntBits(minTemp24Hour); + result = (PRIME * result) + + ((nominalTime == null) ? 0 : nominalTime.hashCode()); + result = (PRIME * result) + Float.floatToIntBits(precip1Hour); + result = (PRIME * result) + Float.floatToIntBits(precip3Hour); + result = (PRIME * result) + Float.floatToIntBits(precip6Hour); + result = (PRIME * result) + Float.floatToIntBits(pressChange3Hour); + result = (PRIME * result) + + ((pressChangeChar == null) ? 0 : pressChangeChar.hashCode()); + result = (PRIME * result) + + ((refHour == null) ? 0 : refHour.hashCode()); + result = (PRIME * result) + + ((reportType == null) ? 0 : reportType.hashCode()); + result = (PRIME * result) + Float.floatToIntBits(seaLevelPress); + result = (PRIME * result) + + ((skyCoverage == null) ? 0 : skyCoverage.hashCode()); + result = (PRIME * result) + ((skyKey == null) ? 0 : skyKey.hashCode()); + result = (PRIME * result) + skyLayerBase; + result = (PRIME * result) + + ((getStationId() == null) ? 0 : getStationId().hashCode()); + long temp; + temp = Double.doubleToLongBits(getLatitude()); + result = (PRIME * result) + (int) (temp ^ (temp >>> 32)); + temp = Double.doubleToLongBits(getLongitude()); + result = (PRIME * result) + (int) (temp ^ (temp >>> 32)); + result = (PRIME * result) + Float.floatToIntBits(tempFromTenths); + result = (PRIME * result) + temperature; + result = (PRIME * result) + + ((timeObs == null) ? 0 : timeObs.hashCode()); + result = (PRIME * result) + vertVisibility; + result = (PRIME * result) + +Float.floatToIntBits(visibility); + + result = (PRIME * result) + + ((weatherCondition == null) ? 0 : weatherCondition.hashCode()); + result = (PRIME * result) + + ((weatherKey == null) ? 0 : weatherKey.hashCode()); + result = (PRIME * result) + + ((windDir == null) ? 0 : windDir.hashCode()); + result = (PRIME * result) + windGust; + result = (PRIME * result) + windSpeed; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final MetarRecord other = (MetarRecord) obj; + if (Float.floatToIntBits(altimeter) != Float + .floatToIntBits(other.altimeter)) { + return false; + } + if (Float.floatToIntBits(altimeterInPa) != Float + .floatToIntBits(other.altimeterInPa)) { + return false; + } + if (autoStationType == null) { + if (other.autoStationType != null) { + return false; + } + } else if (!autoStationType.equals(other.autoStationType)) { + return false; + } + if (correction == null) { + if (other.correction != null) { + return false; + } + } else if (!correction.equals(other.correction)) { + return false; + } + if (dewPoint != other.dewPoint) { + return false; + } + if (Float.floatToIntBits(dewPointFromTenths) != Float + .floatToIntBits(other.dewPointFromTenths)) { + return false; + } + if (Float.floatToIntBits(maxTemp24Hour) != Float + .floatToIntBits(other.maxTemp24Hour)) { + return false; + } + if (Float.floatToIntBits(minTemp24Hour) != Float + .floatToIntBits(other.minTemp24Hour)) { + return false; + } + if (nominalTime == null) { + if (other.nominalTime != null) { + return false; + } + } else if (!nominalTime.equals(other.nominalTime)) { + return false; + } + if (Float.floatToIntBits(precip1Hour) != Float + .floatToIntBits(other.precip1Hour)) { + return false; + } + if (Float.floatToIntBits(precip3Hour) != Float + .floatToIntBits(other.precip3Hour)) { + return false; + } + if (Float.floatToIntBits(precip6Hour) != Float + .floatToIntBits(other.precip6Hour)) { + return false; + } + if (Float.floatToIntBits(pressChange3Hour) != Float + .floatToIntBits(other.pressChange3Hour)) { + return false; + } + if (pressChangeChar == null) { + if (other.pressChangeChar != null) { + return false; + } + } else if (!pressChangeChar.equals(other.pressChangeChar)) { + return false; + } + if (refHour == null) { + if (other.refHour != null) { + return false; + } + } else if (!refHour.equals(other.refHour)) { + return false; + } + if (reportType == null) { + if (other.reportType != null) { + return false; + } + } else if (!reportType.equals(other.reportType)) { + return false; + } + if (Float.floatToIntBits(seaLevelPress) != Float + .floatToIntBits(other.seaLevelPress)) { + return false; + } + if (skyCoverage == null) { + if (other.skyCoverage != null) { + return false; + } + } else if (!skyCoverage.equals(other.skyCoverage)) { + return false; + } + if (skyKey == null) { + if (other.skyKey != null) { + return false; + } + } else if (!skyKey.equals(other.skyKey)) { + return false; + } + if (skyLayerBase != other.skyLayerBase) { + return false; + } + + if (getStationId() == null) { + if (other.getStationId() != null) { + return false; + } + } else if (!getStationId().equals(other.getStationId())) { + return false; + } + + Double lat = location.getLatitude(); + if (lat == null) { + if (other.location.getLatitude() != null) { + return false; + } + } else { + if (!lat.equals(other.location.getLatitude())) { + return false; + } + } + Double lon = location.getLongitude(); + if (lon == null) { + if (other.location.getLongitude() != null) { + return false; + } + } else { + if (!lon.equals(other.location.getLongitude())) { + return false; + } + } + + if (Float.floatToIntBits(tempFromTenths) != Float + .floatToIntBits(other.tempFromTenths)) { + return false; + } + if (temperature != other.temperature) { + return false; + } + if (timeObs == null) { + if (other.timeObs != null) { + return false; + } + } else if (!timeObs.equals(other.timeObs)) { + return false; + } + if (vertVisibility != other.vertVisibility) { + return false; + } + if (Float.floatToIntBits(visibility) != Float + .floatToIntBits(other.visibility)) { + return false; + } + + if (weatherCondition == null) { + if (other.weatherCondition != null) { + return false; + } + } else if (!weatherCondition.equals(other.weatherCondition)) { + return false; + } + if (weatherKey == null) { + if (other.weatherKey != null) { + return false; + } + } else if (!weatherKey.equals(other.weatherKey)) { + return false; + } + if (windDir == null) { + if (other.windDir != null) { + return false; + } + } else if (!windDir.equals(other.windDir)) { + return false; + } + if (windGust != other.windGust) { + return false; + } + if (windSpeed != other.windSpeed) { + return false; + } + return true; + } + + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } + + public SurfaceObsLocation getLocation() { + return location; + } + + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + public String getReport() { + return report; + } + + public void setReport(String report) { + this.report = report; + } + + /** + * + * @return + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * + * @param header + */ + public void setWmoHeader(String header) { + wmoHeader = header; + } + + @Override + public void setMessageData(Object message) { + this.messageData = message; + this.report = (String) message; + } + + @Override + public String getMessageData() { + if ((sampleType != null) && sampleType.equals("PR")) { + return getStationId(); + } + return report; + } + + private SkyCover getSkyCover(int index) { + if (!isSkyCoverageSorted) { + isSkyCoverageSorted = true; + sort(skyCoverage); + } + SkyCover[] sc = skyCoverage.toArray(new SkyCover[skyCoverage.size()]); + return sc[index]; + + } + + public void sort(Set skySet) { + SortedSet skSet = new TreeSet(); + for (SkyCover sc : skySet) { + skSet.add(sc); + } + + skyCoverage = skSet; + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon + * .uf.common.pointdata.PointDataView) + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + public static Set getAvailableParameters() { + return PARM_MAP.keySet(); + } - /** - * Maps common AWIPS I keys to IDecoderGettable and newer parameter key - * constants - */ - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put(LegacyParameterKey.TEMPERATURE, SFC_TEMP); - PARM_MAP.put(LegacyParameterKey.DEW_POINT, SFC_DWPT); - PARM_MAP.put(LegacyParameterKey.WIND_SPEED, SFC_WNDSPD); - PARM_MAP.put(LegacyParameterKey.WIND_DIRECTION, SFC_WNDDIR); - PARM_MAP.put(LegacyParameterKey.WIND_GUST, SFC_WNDGST); - PARM_MAP.put(LegacyParameterKey.ALTIMETER, ParameterKey.SFC_ALTIMETER); - PARM_MAP.put(LegacyParameterKey.SEA_LEVEL_PRESSURE, PRES_SLP); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put(LegacyParameterKey.PRESSURE_CHANGE_3HR, - ParameterKey.PRESSURE_CHANGE); - // PARM_MAP.put("T24", "T24"); // not used - // PARM_MAP.put("DpT24", "DpT24"); // not used - // PARM_MAP.put("WS24", "WS24"); // not used - // PARM_MAP.put("WD24", "WD24"); // not used - // PARM_MAP.put("WGS24", "WGS24"); // not used - // PARM_MAP.put("ASET24", "ASET24"); // not used - // PARM_MAP.put("HIWC", "HIWC"); // not used - PARM_MAP.put(LegacyParameterKey.VISABILITY, ParameterKey.VISIBILITY); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_1HR, - ParameterKey.PRECIPITATION_1HR); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_3HR, - ParameterKey.PRECIPITATION_3HR); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_6HR, - ParameterKey.PRECIPITATION_6HR); - PARM_MAP.put(LegacyParameterKey.PRECIPITATION_24HR, - ParameterKey.PRECIPITATION_24HR); - } - - @Transient - private String sampleType = null; - - @Transient - private boolean isSkyCoverageSorted = false; - - @XmlElement - @DynamicSerializeElement - @Transient - private String report; - - @XmlElement - @DynamicSerializeElement - @Transient - private String wmoHeader; - - /** Nominal Time extracted from WMO header * */ - @XmlElement - @DynamicSerializeElement - @Transient - private String nominalTime; - - /** A string denoting the time of observation */ - @XmlElement - @DynamicSerializeElement - @Transient - private Calendar timeObs; - - /** Report type extracted from WMO header * */ - @XmlElement - @DynamicSerializeElement - @Column - @DataURI(position = 1) - protected String reportType; - - /** A string denoting if this report is a correction */ - @XmlElement - @DynamicSerializeElement - @Column - @DataURI(position = 2) - private String correction; - - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; - - /** A string denoting the type of automated station (AO1 or AO2) */ - @XmlElement - @DynamicSerializeElement - @Transient - private String autoStationType; - - @XmlElement - @DynamicSerializeElement - @Transient - private String skyKey; - - @XmlElement - @DynamicSerializeElement - @Transient - private Set skyCoverage = new HashSet(); - - /** A string denoting the vertical visibility */ - @XmlElement - @DynamicSerializeElement - @Transient - private int vertVisibility = -9999; - - /** A string denoting the lowest layer of clouds */ - @XmlElement - @DynamicSerializeElement - @Transient - private int skyLayerBase = -9999; - - /** The visibility in statute miles */ - @XmlElement - @DynamicSerializeElement - @Transient - private float visibility = -9999; - - /** A String used as the foreign key to the present weather table * */ - @XmlElement - @DynamicSerializeElement - @Transient - private String weatherKey; - - /** A Set of present weather conditions * */ - @DynamicSerializeElement - @XmlElement - @Transient - private List weatherCondition = new ArrayList(); - - /** A string denoting the sea level pressure in millibars */ - @XmlElement - @DynamicSerializeElement - @Transient - private float seaLevelPress = -9999; - - /** A string denoting the temperature in degrees Celsius */ - @XmlElement - @DynamicSerializeElement - @Transient - private int temperature = -9999; - - /** A string denoting the current temperature in tenths of degrees Celsius */ - @XmlElement - @DynamicSerializeElement - @Transient - private float tempFromTenths = -9999; - - /** A string denoting the current dew point in degrees Celsius */ - @XmlElement - @DynamicSerializeElement - @Transient - private int dewPoint = -9999; - - /** A string denoting the current dew point in tenths of degrees Celsius */ - @XmlElement - @DynamicSerializeElement - @Transient - private float dewPointFromTenths = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private String windDir; - - @XmlElement - @DynamicSerializeElement - @Transient - private int windSpeed = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private int windGust = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private int pkWndDir = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private int pkWndSpd = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private Calendar pkWndTime = null; - - @XmlElement - @DynamicSerializeElement - @Transient - private float altimeterInPa = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private float altimeter = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private float minTemp24Hour = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private float maxTemp24Hour = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private float minTemp6Hour = -9999; - - @XmlElement - @DynamicSerializeElement - @Transient - private float maxTemp6Hour = -9999; - - /** A string denoting inches of precipitation observed in the last hour */ - @XmlElement - @DynamicSerializeElement - @Transient - private float precip1Hour = -9999; - - /** A string denoting inches of precipitation observed in the last 3 hours */ - @XmlElement - @DynamicSerializeElement - @Transient - private float precip3Hour = -9999; - - /** A string denoting inches of precipitation observed in the last 6 hours */ - @XmlElement - @DynamicSerializeElement - @Transient - private float precip6Hour = -9999; - - /** A string denoting inches of precipitation observed in the last 24 hours */ - @XmlElement - @DynamicSerializeElement - @Transient - private float precip24Hour = -9999; - - /** A string denoting the pressure tendency(rising or falling) */ - @XmlElement - @DynamicSerializeElement - @Transient - private String pressChangeChar; - - /** A string denoting the pressure change observed in the past 3 hrs. */ - @XmlElement - @DynamicSerializeElement - @Transient - private float pressChange3Hour = -9999; - - // Amount of snow on the ground in inches. - @XmlElement - @DynamicSerializeElement - @Transient - private int snowDepth = -9999; - - // Water equivalent in 0.1 inch increments. - @XmlElement - @DynamicSerializeElement - @Transient - private float snowWater = -9999; - - // Snow fall last 6 hours. - @XmlElement - @DynamicSerializeElement - @Transient - private float snowFall_6Hours = -9999; - - // Number of minutes of sunshine. - @XmlElement - @DynamicSerializeElement - @Transient - private int sunshine = -9999; - - @XmlElement - @DynamicSerializeElement - @Column - private Calendar refHour; - - @DynamicSerializeElement - @Embedded - private PointDataView pointDataView; - - public MetarRecord() { - } - - /** - * Constructs a metar record from a dataURI - * - * @param uri - * The dataURI - * @param tableDef - * The table definition associated with this class - */ - public MetarRecord(String uri) { - super(uri); - } - - /** - * @return the serialVersionUID - */ - public static long getSerialVersionUID() { - return serialVersionUID; - } - - /** - * @return the altimeter - */ - public float getAltimeter() { - return altimeter; - } - - /** - * @param altimeter - * the altimeter to set - */ - public void setAltimeter(float altimeter) { - this.altimeter = altimeter; - } - - /** - * @return the altimeterInPa - */ - public float getAltimeterInPa() { - return altimeterInPa; - } - - /** - * @param altimeterInPa - * the altimeterInPa to set - */ - public void setAltimeterInPa(float altimeterInPa) { - this.altimeterInPa = altimeterInPa; - } - - /** - * @return the autoStationType - */ - public String getAutoStationType() { - return autoStationType; - } - - /** - * @param autoStationType - * the autoStationType to set - */ - public void setAutoStationType(String autoStationType) { - this.autoStationType = autoStationType; - } - - /** - * @return the correction - */ - public String getCorrection() { - return correction; - } - - /** - * @param correction - * the correction to set - */ - public void setCorrection(String correction) { - this.correction = correction; - } - - /** - * @return the dewPoint - */ - public int getDewPoint() { - return dewPoint; - } - - /** - * @param dewPoint - * the dewPoint to set - */ - public void setDewPoint(int dewPoint) { - this.dewPoint = dewPoint; - } - - /** - * @return the dewPointFromTenths - */ - public float getDewPointFromTenths() { - return dewPointFromTenths; - } - - /** - * @param dewPointFromTenths - * the dewPointFromTenths to set - */ - public void setDewPointFromTenths(float dewPointFromTenths) { - this.dewPointFromTenths = dewPointFromTenths; - } - - /** - * @return the maxTemp24Hour - */ - public float getMaxTemp24Hour() { - return maxTemp24Hour; - } - - /** - * @param maxTemp24Hour - * the maxTemp24Hour to set - */ - public void setMaxTemp24Hour(float maxTemp24Hour) { - this.maxTemp24Hour = maxTemp24Hour; - } - - /** - * @return the minTemp24Hour - */ - public float getMinTemp24Hour() { - return minTemp24Hour; - } - - /** - * @param minTemp24Hour - * the minTemp24Hour to set - */ - public void setMinTemp24Hour(float minTemp24Hour) { - this.minTemp24Hour = minTemp24Hour; - } - - /** - * @return the minTemp6Hour - */ - public float getMinTemp6Hour() { - return minTemp6Hour; - } - - /** - * @param minTemp6Hour - * the minTemp6Hour to set - */ - public void setMinTemp6Hour(float minTemp6Hour) { - this.minTemp6Hour = minTemp6Hour; - } - - /** - * @return the maxTemp6Hour - */ - public float getMaxTemp6Hour() { - return maxTemp6Hour; - } - - /** - * @param maxTemp6Hour - * the maxTemp6Hour to set - */ - public void setMaxTemp6Hour(float maxTemp6Hour) { - this.maxTemp6Hour = maxTemp6Hour; - } - - /** - * @return the precip1Hour - */ - public float getPrecip1Hour() { - return precip1Hour; - } - - /** - * @param precip1Hour - * the precip1Hour to set - */ - public void setPrecip1Hour(float precip1Hour) { - this.precip1Hour = precip1Hour; - } - - /** - * @return the precip3Hour - */ - public float getPrecip3Hour() { - return precip3Hour; - } - - /** - * @param precip3Hour - * the precip3Hour to set - */ - public void setPrecip3Hour(float precip3Hour) { - this.precip3Hour = precip3Hour; - } - - /** - * @return the precip6Hour - */ - public float getPrecip6Hour() { - return precip6Hour; - } - - /** - * @param precip6Hour - * the precip6Hour to set - */ - public void setPrecip6Hour(float precip6Hour) { - this.precip6Hour = precip6Hour; - } - - /** - * @return the precip24Hour - */ - public float getPrecip24Hour() { - return precip24Hour; - } - - /** - * @param precip24Hour - * the precip24Hour to set - */ - public void setPrecip24Hour(float precip24Hour) { - this.precip24Hour = precip24Hour; - } - - /** - * @return the pressChange3Hour - */ - public float getPressChange3Hour() { - return pressChange3Hour; - } - - /** - * @param pressChange3Hour - * the pressChange3Hour to set - */ - public void setPressChange3Hour(float pressChange3Hour) { - this.pressChange3Hour = pressChange3Hour; - } - - /** - * @return the pressChangeChar - */ - public String getPressChangeChar() { - return pressChangeChar; - } - - /** - * @param pressChangeChar - * the pressChangeChar to set - */ - public void setPressChangeChar(String pressChangeChar) { - this.pressChangeChar = pressChangeChar; - } - - /** - * @return the seaLevelPress - */ - public float getSeaLevelPress() { - return seaLevelPress; - } - - /** - * @param seaLevelPress - * the seaLevelPress to set - */ - public void setSeaLevelPress(float seaLevelPress) { - this.seaLevelPress = seaLevelPress; - } - - /** - * @return the skyLayerBase - */ - public int getSkyLayerBase() { - return skyLayerBase; - } - - /** - * @param skyLayerBase - * the skyLayerBase to set - */ - public void setSkyLayerBase(int skyLayerBase) { - this.skyLayerBase = skyLayerBase; - } - - /** - * @return the temperature - */ - public int getTemperature() { - return temperature; - } - - /** - * @param temperature - * the temperature to set - */ - public void setTemperature(int temperature) { - this.temperature = temperature; - } - - /** - * @return the tempFromTenths - */ - public float getTempFromTenths() { - return tempFromTenths; - } - - /** - * @param tempFromTenths - * the tempFromTenths to set - */ - public void setTempFromTenths(float tempFromTenths) { - this.tempFromTenths = tempFromTenths; - } - - /** - * @return the vertVisibility - */ - public int getVertVisibility() { - return vertVisibility; - } - - /** - * @param vertVisibility - * the vertVisibility to set - */ - public void setVertVisibility(int vertVisibility) { - this.vertVisibility = vertVisibility; - } - - /** - * @return the visibility - */ - public float getVisibility() { - - return visibility; - } - - /** - * @param visibility - * the visibility to set - */ - public void setVisibility(float visibility) { - this.visibility = visibility; - } - - /** - * @return the windDir - */ - public String getWindDir() { - return windDir; - } - - /** - * @param windDir - * the windDir to set - */ - public void setWindDir(String windDir) { - this.windDir = windDir; - } - - /** - * @return the windGust - */ - public int getWindGust() { - return windGust; - } - - /** - * @param windGust - * the windGust to set - */ - public void setWindGust(int windGust) { - this.windGust = windGust; - } - - /** - * @return the windSpeed - */ - public int getWindSpeed() { - return windSpeed; - } - - /** - * @param windSpeed - * the windSpeed to set - */ - public void setWindSpeed(int windSpeed) { - this.windSpeed = windSpeed; - } - - /** - * @return the pkWndDir - */ - public int getPkWndDir() { - return pkWndDir; - } - - /** - * @param pkWndDir - * the pkWndDir to set - */ - public void setPkWndDir(int pkWndDir) { - this.pkWndDir = pkWndDir; - } - - /** - * @return the pkWndSpd - */ - public int getPkWndSpd() { - return pkWndSpd; - } - - /** - * @param pkWndSpd - * the pkWndSpd to set - */ - public void setPkWndSpd(int pkWndSpd) { - this.pkWndSpd = pkWndSpd; - } - - /** - * @return the pkWndTime - */ - public Calendar getPkWndTime() { - return pkWndTime; - } - - /** - * @param pkWndTime - * the pkWndTime to set - */ - public void setPkWndTime(Calendar pkWndTime) { - this.pkWndTime = pkWndTime; - } - - /** - * @return the timeObs - */ - public Calendar getTimeObs() { - if (this.dataTime == null) { - return null; - } - return this.dataTime.getRefTimeAsCalendar(); - } - - /** - * @param timeObs - * the timeObs to set - */ - public void setTimeObs(Calendar timeObs) { - this.nominalTime = TimeUtil.formatCalendar(timeObs); - this.timeObs = timeObs; - } - - /** - * @return the skyCoverage - */ - public Set getSkyCoverage() { - return skyCoverage; - } - - /** - * @param skyCoverage - * the skyCoverage to set - */ - public void setSkyCoverage(Set skyCoverage) { - this.skyCoverage = skyCoverage; - } - - public void addSkyCoverage(SkyCover cover) { - skyCoverage.add(cover); - cover.setParentMetar(this); - } - - /** - * @return the skyKey - */ - public String getSkyKey() { - return skyKey; - } - - /** - * @param skyKey - * the skyKey to set - */ - public void setSkyKey(String skyKey) { - this.skyKey = skyKey; - } - - /** - * @return the weatherCondition - */ - public List getWeatherCondition() { - return weatherCondition; - } - - /** - * @param weatherCondition - * the weatherCondition to set - */ - public void setWeatherCondition(List weatherCondition) { - this.weatherCondition = weatherCondition; - } - - public void addWeatherCondition(WeatherCondition condition) { - this.weatherCondition.add(condition); - condition.setParentMetar(this); - } - - /** - * @return the weatherKey - */ - public String getWeatherKey() { - return weatherKey; - } - - /** - * @param weatherKey - * the weatherKey to set - */ - public void setWeatherKey(String weatherKey) { - this.weatherKey = weatherKey; - } - - /** - * @return the refHour - */ - public Calendar getRefHour() { - return refHour; - } - - /** - * @param refHour - * the refHour to set - */ - public void setRefHour(Calendar refHour) { - this.refHour = refHour; - } - - /** - * @return the snowDepth - */ - public int getSnowDepth() { - return snowDepth; - } - - /** - * @param snowDepth - * the snowDepth to set - */ - public void setSnowDepth(int snowDepth) { - this.snowDepth = snowDepth; - } - - /** - * @return the snowFall_6Hours - */ - public float getSnowFall_6Hours() { - return snowFall_6Hours; - } - - /** - * @param snowFall_6Hours - * the snowFall_6Hours to set - */ - public void setSnowFall_6Hours(float snowFall_6Hours) { - this.snowFall_6Hours = snowFall_6Hours; - } - - /** - * @return the sunshine - */ - public int getSunshine() { - return sunshine; - } - - /** - * @param sunshine - * the sunshine to set - */ - public void setSunshine(int sunshine) { - this.sunshine = sunshine; - } - - /** - * @return the snowWater - */ - public float getSnowWater() { - return snowWater; - } - - /** - * @param snowWater - * the snowWater to set - */ - public void setSnowWater(float snowWater) { - this.snowWater = snowWater; - } - - /** - * Override existing set method to modify any classes that use the dataURI - * as a foreign key - */ - @Override - public void setIdentifier(Object dataURI) { - this.identifier = dataURI; - // set the parentID to the dataURI for all values - if (this.getWeatherCondition() != null - && this.getWeatherCondition().size() > 0) { - for (Iterator iter = this.getWeatherCondition() - .iterator(); iter.hasNext();) { - WeatherCondition cond = iter.next(); - cond.setParentMetar(this); - } - } - - // set the parentID to the dataURI for all values - if (this.getSkyCoverage() != null && this.getSkyCoverage().size() > 0) { - for (Iterator iter = this.getSkyCoverage().iterator(); iter - .hasNext();) { - SkyCover cover = iter.next(); - cover.setParentMetar(this); - } - } - } - - public String getReportType() { - return reportType; - } - - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } - - public String getNominalTime() { - return nominalTime; - } - - public void setNominalTime(String nominalTime) { - this.nominalTime = nominalTime; - } - - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - if ("STA".matches(paramName)) { - return getStationId(); - } - if ("WX".matches(paramName)) { - return this.weatherKey; - } - - return null; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.IDecoderGettable#getValue(java.lang - * .String) - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = paramName; - if (PARM_MAP.containsKey(paramName)) { - // we have recieved an AWIPS I parameter name - pName = PARM_MAP.get(paramName); - } - - if (SFC_TEMP.equals(pName)) { - if (tempFromTenths != -9999) { - a = new Amount(tempFromTenths, TEMPERATURE_UNIT); - } else if (temperature != -9999) { - a = new Amount(temperature, TEMPERATURE_UNIT); - } - } else if (SFC_DWPT.equals(pName)) { - if (dewPointFromTenths != -9999) { - a = new Amount(dewPointFromTenths, TEMPERATURE_UNIT); - } else if (dewPoint != -9999) { - a = new Amount(dewPoint, TEMPERATURE_UNIT); - } - } else if (SFC_WNDSPD.equals(pName)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDGST.equals(pName)) { - a = new Amount(windGust, WIND_SPEED_UNIT); - } else if (ParameterKey.PRESSURE_CHANGE.equals(pName) - && pressChange3Hour != -9999) { - a = new Amount(pressChange3Hour, PRESSURE_UNIT); - } else if (SFC_WNDDIR.equals(pName)) { - String windDir = getWindDir(); - if (windDir != null && !windDir.equalsIgnoreCase("VRB")) { - Double result = Double.parseDouble(windDir); - a = new Amount(result, WIND_DIR_UNIT); - } - } else if (PRES_ALTSG.equals(pName)) { - a = new Amount(altimeterInPa, ALTIMETER_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(getLongitude(), LOCATION_UNIT); - } else if (PRES_SLP.equals(pName)) { - a = new Amount(this.seaLevelPress, PRESSURE_UNIT); - } else if (pName.startsWith("HGT")) { - int start = "HGT".length(); - int index = Integer.parseInt(pName.substring(start)); - if (index < skyCoverage.size() - && getSkyCover(index).getHeight() != null) { - a = new Amount(getSkyCover(index).getHeight(), HEIGHT_UNIT); - } - } else if (pName.startsWith("HMSL")) { - int start = "HMSL".length(); - int index = Integer.parseInt(pName.substring(start)); - if (index < skyCoverage.size() - && getSkyCover(index).getHeight() != null - && getSpatialObject() != null - && getSpatialObject().getElevation() != null) { - a = new Amount(getSkyCover(index).getHeight() - + getSpatialObject().getElevation(), HEIGHT_UNIT); - } - } else if (ParameterKey.PRECIPITATION_1HR.equals(pName) - || ParameterKey.PRECIPITATION_24HR.equals(pName)) { - sampleType = "PR"; - if (precip1Hour != -9999) { - a = new Amount(precip1Hour, PRECIP_UNIT); - } - } else if (ParameterKey.PRECIPITATION_3HR.equals(pName)) { - sampleType = "PR"; - if (precip3Hour != -9999) { - a = new Amount(precip3Hour, PRECIP_UNIT); - } - } else if (ParameterKey.PRECIPITATION_6HR.equals(pName)) { - sampleType = "PR"; - if (precip6Hour != -9999) { - a = new Amount(precip6Hour, PRECIP_UNIT); - } - } else if (ParameterKey.VISIBILITY.equals(pName)) { - a = new Amount(visibility, VISIBILITY_UNIT); - } - - return a; - } - - /** - * Get the value and units of a named parameter within this observation that - * has a multiplicity greater than 1. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } - - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } - - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } - - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } - - @Override - public String[] getStrings(String paramName) { - if ("SCV".matches(paramName)) { - ArrayList skyCoverage = new ArrayList(); - for (SkyCover sky : this.skyCoverage) { - skyCoverage.add(sky.getType()); - } - if (skyCoverage.size() > 0) { - return skyCoverage.toArray(new String[skyCoverage.size()]); - } - } else if ("WX".matches(paramName)) { - if (this.weatherKey != null) { - String[] presentWeather = { this.weatherKey }; - return presentWeather; - } - } else if (paramName.startsWith("CLD")) { - int start = "CLD".length(); - int index = Integer.parseInt(paramName.substring(start)); - String[] retVal = { "BLNK" }; - if (index < skyCoverage.size()) { - if (getSkyCover(index).getType() != null) { - retVal[0] = getSkyCover(index).getType(); - } - } - return retVal; - } else if (paramName.matches("CCHAR") && pressChangeChar != null) { - String[] changeChar = { pressChangeChar }; - return changeChar; - } - return null; - } - - @Override - public int hashCode() { - final int PRIME = 31; - int result = 1; - result = PRIME * result + Float.floatToIntBits(altimeter); - result = PRIME * result + Float.floatToIntBits(altimeterInPa); - result = PRIME * result - + ((autoStationType == null) ? 0 : autoStationType.hashCode()); - result = PRIME * result - + ((correction == null) ? 0 : correction.hashCode()); - result = PRIME * result + dewPoint; - result = PRIME * result + Float.floatToIntBits(dewPointFromTenths); - result = PRIME * result + Float.floatToIntBits(maxTemp24Hour); - result = PRIME * result + Float.floatToIntBits(minTemp24Hour); - result = PRIME * result - + ((nominalTime == null) ? 0 : nominalTime.hashCode()); - result = PRIME * result + Float.floatToIntBits(precip1Hour); - result = PRIME * result + Float.floatToIntBits(precip3Hour); - result = PRIME * result + Float.floatToIntBits(precip6Hour); - result = PRIME * result + Float.floatToIntBits(pressChange3Hour); - result = PRIME * result - + ((pressChangeChar == null) ? 0 : pressChangeChar.hashCode()); - result = PRIME * result + ((refHour == null) ? 0 : refHour.hashCode()); - result = PRIME * result - + ((reportType == null) ? 0 : reportType.hashCode()); - result = PRIME * result + Float.floatToIntBits(seaLevelPress); - result = PRIME * result - + ((skyCoverage == null) ? 0 : skyCoverage.hashCode()); - result = PRIME * result + ((skyKey == null) ? 0 : skyKey.hashCode()); - result = PRIME * result + skyLayerBase; - result = PRIME * result - + ((getStationId() == null) ? 0 : getStationId().hashCode()); - long temp; - temp = Double.doubleToLongBits(getLatitude()); - result = PRIME * result + (int) (temp ^ (temp >>> 32)); - temp = Double.doubleToLongBits(getLongitude()); - result = PRIME * result + (int) (temp ^ (temp >>> 32)); - result = PRIME * result + Float.floatToIntBits(tempFromTenths); - result = PRIME * result + temperature; - result = PRIME * result + ((timeObs == null) ? 0 : timeObs.hashCode()); - result = PRIME * result + vertVisibility; - result = PRIME * result + +Float.floatToIntBits(visibility); - - result = PRIME - * result - + ((weatherCondition == null) ? 0 : weatherCondition.hashCode()); - result = PRIME * result - + ((weatherKey == null) ? 0 : weatherKey.hashCode()); - result = PRIME * result + ((windDir == null) ? 0 : windDir.hashCode()); - result = PRIME * result + windGust; - result = PRIME * result + windSpeed; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final MetarRecord other = (MetarRecord) obj; - if (Float.floatToIntBits(altimeter) != Float - .floatToIntBits(other.altimeter)) { - return false; - } - if (Float.floatToIntBits(altimeterInPa) != Float - .floatToIntBits(other.altimeterInPa)) { - return false; - } - if (autoStationType == null) { - if (other.autoStationType != null) { - return false; - } - } else if (!autoStationType.equals(other.autoStationType)) { - return false; - } - if (correction == null) { - if (other.correction != null) { - return false; - } - } else if (!correction.equals(other.correction)) { - return false; - } - if (dewPoint != other.dewPoint) { - return false; - } - if (Float.floatToIntBits(dewPointFromTenths) != Float - .floatToIntBits(other.dewPointFromTenths)) { - return false; - } - if (Float.floatToIntBits(maxTemp24Hour) != Float - .floatToIntBits(other.maxTemp24Hour)) { - return false; - } - if (Float.floatToIntBits(minTemp24Hour) != Float - .floatToIntBits(other.minTemp24Hour)) { - return false; - } - if (nominalTime == null) { - if (other.nominalTime != null) { - return false; - } - } else if (!nominalTime.equals(other.nominalTime)) { - return false; - } - if (Float.floatToIntBits(precip1Hour) != Float - .floatToIntBits(other.precip1Hour)) { - return false; - } - if (Float.floatToIntBits(precip3Hour) != Float - .floatToIntBits(other.precip3Hour)) { - return false; - } - if (Float.floatToIntBits(precip6Hour) != Float - .floatToIntBits(other.precip6Hour)) { - return false; - } - if (Float.floatToIntBits(pressChange3Hour) != Float - .floatToIntBits(other.pressChange3Hour)) { - return false; - } - if (pressChangeChar == null) { - if (other.pressChangeChar != null) { - return false; - } - } else if (!pressChangeChar.equals(other.pressChangeChar)) { - return false; - } - if (refHour == null) { - if (other.refHour != null) { - return false; - } - } else if (!refHour.equals(other.refHour)) { - return false; - } - if (reportType == null) { - if (other.reportType != null) { - return false; - } - } else if (!reportType.equals(other.reportType)) { - return false; - } - if (Float.floatToIntBits(seaLevelPress) != Float - .floatToIntBits(other.seaLevelPress)) { - return false; - } - if (skyCoverage == null) { - if (other.skyCoverage != null) { - return false; - } - } else if (!skyCoverage.equals(other.skyCoverage)) { - return false; - } - if (skyKey == null) { - if (other.skyKey != null) { - return false; - } - } else if (!skyKey.equals(other.skyKey)) { - return false; - } - if (skyLayerBase != other.skyLayerBase) { - return false; - } - - if (getStationId() == null) { - if (other.getStationId() != null) { - return false; - } - } else if (!getStationId().equals(other.getStationId())) { - return false; - } - - Double lat = location.getLatitude(); - if (lat == null) { - if (other.location.getLatitude() != null) { - return false; - } - } else { - if (!lat.equals(other.location.getLatitude())) { - return false; - } - } - Double lon = location.getLongitude(); - if (lon == null) { - if (other.location.getLongitude() != null) { - return false; - } - } else { - if (!lon.equals(other.location.getLongitude())) { - return false; - } - } - - if (Float.floatToIntBits(tempFromTenths) != Float - .floatToIntBits(other.tempFromTenths)) { - return false; - } - if (temperature != other.temperature) { - return false; - } - if (timeObs == null) { - if (other.timeObs != null) { - return false; - } - } else if (!timeObs.equals(other.timeObs)) { - return false; - } - if (vertVisibility != other.vertVisibility) { - return false; - } - if (Float.floatToIntBits(visibility) != Float - .floatToIntBits(other.visibility)) { - return false; - } - - if (weatherCondition == null) { - if (other.weatherCondition != null) { - return false; - } - } else if (!weatherCondition.equals(other.weatherCondition)) { - return false; - } - if (weatherKey == null) { - if (other.weatherKey != null) { - return false; - } - } else if (!weatherKey.equals(other.weatherKey)) { - return false; - } - if (windDir == null) { - if (other.windDir != null) { - return false; - } - } else if (!windDir.equals(other.windDir)) { - return false; - } - if (windGust != other.windGust) { - return false; - } - if (windSpeed != other.windSpeed) { - return false; - } - return true; - } - - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } - - public SurfaceObsLocation getLocation() { - return location; - } - - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - public String getReport() { - return report; - } - - public void setReport(String report) { - this.report = report; - } - - /** - * - * @return - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * - * @param header - */ - public void setWmoHeader(String header) { - wmoHeader = header; - } - - @Override - public void setMessageData(Object message) { - this.messageData = message; - this.report = (String) message; - } - - @Override - public String getMessageData() { - if (sampleType != null && sampleType.equals("PR")) { - return getStationId(); - } - return report; - } - - private SkyCover getSkyCover(int index) { - if (!isSkyCoverageSorted) { - isSkyCoverageSorted = true; - sort(skyCoverage); - } - SkyCover[] sc = skyCoverage.toArray(new SkyCover[skyCoverage.size()]); - return sc[index]; - - } - - public void sort(Set skySet) { - SortedSet skSet = new TreeSet(); - for (SkyCover sc : skySet) { - skSet.add(sc); - } - - skyCoverage = skSet; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon - * .uf.common.pointdata.PointDataView) - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } - - public static Set getAvailableParameters() { - return PARM_MAP.keySet(); - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "obs"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.pirep/src/com/raytheon/uf/common/dataplugin/pirep/PirepRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.pirep/src/com/raytheon/uf/common/dataplugin/pirep/PirepRecord.java index e32435712c..fe0e9f21fa 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.pirep/src/com/raytheon/uf/common/dataplugin/pirep/PirepRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.pirep/src/com/raytheon/uf/common/dataplugin/pirep/PirepRecord.java @@ -71,20 +71,21 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080103 384 jkorman Initial Coding. - * 20090408 952 jsanchez Updated getValue and getStrings methods. - * Added getMessageData method. - * 20090521 2338 jsanchez Changed the unit of the alititude. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * ====================================== - * AWIPS2 DR Work - * 08/09/2012 1011 jkorman Added separate max icing level as well - * as separated code to generate distinct max icing/turbulence levels. Removed - * code that used "display" boolean to determine data access. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Jan 03, 2008 384 jkorman Initial Coding. + * Apr 08, 2009 952 jsanchez Updated getValue and getStrings methods. + * Added getMessageData method. + * May 21, 2009 2338 jsanchez Changed the unit of the alititude. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Aug 09, 2012 1011 jkorman Added separate max icing level as well + * as separated code to generate distinct + * max icing/turbulence levels. Removed + * code that used "display" boolean to + * determine data access. + * 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 * * * @author jkorman @@ -97,12 +98,8 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "pirep", - indexes = { - @Index(name = "pirep_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "pirep", indexes = { @Index(name = "pirep_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -635,14 +632,14 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled, a = new Amount(this.getLatitude(), LOCATION_UNIT); } else if (STA_LON.equals(pName)) { a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) { + } else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) { a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT); - } else if (UA_TOPHGT.equals(pName) && maxTurbcLayerData != null - && maxTurbcLayerData.getTopLayerHeight() != null) { + } else if (UA_TOPHGT.equals(pName) && (maxTurbcLayerData != null) + && (maxTurbcLayerData.getTopLayerHeight() != null)) { a = new Amount(maxTurbcLayerData.getTopLayerHeight().intValue(), ALTITUDE_UNIT); - } else if (UA_BOTHGT.equals(pName) && maxTurbcLayerData != null - && maxTurbcLayerData.getBaseLayerHeight() != null) { + } else if (UA_BOTHGT.equals(pName) && (maxTurbcLayerData != null) + && (maxTurbcLayerData.getBaseLayerHeight() != null)) { a = new Amount(maxTurbcLayerData.getBaseLayerHeight().intValue(), ALTITUDE_UNIT); } @@ -675,7 +672,7 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled, retData = new String[] { intensity }; } } - } else if ("ICT".matches(paramName) && maxIcingLayerData != null) { + } else if ("ICT".matches(paramName) && (maxIcingLayerData != null)) { if (maxIcingLayerData != null) { String type = maxIcingLayerData.getDataType(); if (type != null) { @@ -791,7 +788,7 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled, public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + result = (prime * result) + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); return result; } @@ -805,21 +802,26 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled, */ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } PirepRecord other = (PirepRecord) obj; if (getDataURI() == null) { if (other.getDataURI() != null) { return false; } - } else if (!getDataURI().equals(other.getDataURI())) + } else if (!getDataURI().equals(other.getDataURI())) { return false; + } return true; } + @Override @Column @Access(AccessType.PROPERTY) @@ -843,4 +845,8 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled, return maxIcingLayerData; } -} \ No newline at end of file + @Override + public String getPluginName() { + return "pirep"; + } +} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.poessounding/src/com/raytheon/uf/common/dataplugin/poessounding/POESSounding.java b/edexOsgi/com.raytheon.uf.common.dataplugin.poessounding/src/com/raytheon/uf/common/dataplugin/poessounding/POESSounding.java index a21ff790f7..2bdbc8a8ec 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.poessounding/src/com/raytheon/uf/common/dataplugin/poessounding/POESSounding.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.poessounding/src/com/raytheon/uf/common/dataplugin/poessounding/POESSounding.java @@ -59,6 +59,7 @@ import com.vividsolutions.jts.geom.Geometry; * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -73,184 +74,174 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "poessounding", - indexes = { - @Index(name = "poessounding_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "poessounding", indexes = { @Index(name = "poessounding_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class POESSounding extends PersistablePluginDataObject implements ISpatialEnabled, IPointData { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // The profiler observation time. - // @Column - // @DynamicSerializeElement - // @XmlElement - // private Calendar timeObs; + // Text of the WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; - // @XmlAttribute - // @DynamicSerializeElement - // private Long fcstSeconds; + @Transient + private Set soundingLevels; - // Text of the WMO header - @Column(length = 32) - @DynamicSerializeElement - private String wmoHeader; + @Embedded + @DataURI(position = 1, embedded = true) + @DynamicSerializeElement + private SurfaceObsLocation location; - @Transient - private Set soundingLevels; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - @Embedded - @DataURI(position = 1, embedded = true) - @DynamicSerializeElement - private SurfaceObsLocation location; + /** + * Create an empty ProfilerObs object. + */ + public POESSounding() { + } - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public POESSounding(String uri) { + super(uri); + } - /** - * Create an empty ProfilerObs object. - */ - public POESSounding() { - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public POESSounding(String uri) { - super(uri); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Was this location defined from the station catalog? False if not. + * + * @return Was this location defined from the station catalog? + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Set the WMOHeader of the file that contained this data. + * + * @return The wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * Was this location defined from the station catalog? False if not. - * - * @return Was this location defined from the station catalog? - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Get the WMOHeader of the file that contained this data. + * + * @param wmoHeader + * The WMOHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * Set the WMOHeader of the file that contained this data. - * - * @return The wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the soundingLevels + */ + public Set getSoundingLevels() { + return soundingLevels; + } - /** - * Get the WMOHeader of the file that contained this data. - * - * @param wmoHeader - * The WMOHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param soundingLevels + * the soundingLevels to set + */ + public void setSoundingLevels(Set soundingLevels) { + this.soundingLevels = soundingLevels; + } - /** - * @return the soundingLevels - */ - public Set getSoundingLevels() { - return soundingLevels; - } + /** + * @param soundingLevels + * the soundingLevels to set + */ + public void addSoundingLevel(POESSoundingLevel soundingLevel) { + if (soundingLevels == null) { + soundingLevels = new HashSet(); + } + soundingLevels.add(soundingLevel); + } - /** - * @param soundingLevels - * the soundingLevels to set - */ - public void setSoundingLevels(Set soundingLevels) { - this.soundingLevels = soundingLevels; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - /** - * @param soundingLevels - * the soundingLevels to set - */ - public void addSoundingLevel(POESSoundingLevel soundingLevel) { - if (soundingLevels == null) { - soundingLevels = new HashSet(); - } - soundingLevels.add(soundingLevel); - } + public SurfaceObsLocation getLocation() { + return location; + } - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - public SurfaceObsLocation getLocation() { - return location; - } + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + @Override + public String getPluginName() { + return "poessounding"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.preciprate/src/com/raytheon/uf/common/dataplugin/preciprate/PrecipRateRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.preciprate/src/com/raytheon/uf/common/dataplugin/preciprate/PrecipRateRecord.java index 80cb92d537..1630156a3e 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.preciprate/src/com/raytheon/uf/common/dataplugin/preciprate/PrecipRateRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.preciprate/src/com/raytheon/uf/common/dataplugin/preciprate/PrecipRateRecord.java @@ -74,13 +74,15 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 01/25/10 3796 D. Hladky Initial release - * Apr 04, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from + * Jan 25, 2010 3796 D. Hladky Initial release + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. - * Aug 06, 2013 2228 njensen Use deserialize(byte[]) + * Aug 06, 2013 2228 njensen Use deserialize(byte[]) + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -330,14 +332,14 @@ public class PrecipRateRecord extends PersistablePluginDataObject implements } if (dataRec != null) { - for (int i = 0; i < dataRec.length; i++) { - if (dataRec[i].getName().equals("Data")) { - setRawData(((ByteDataRecord) dataRec[i]).getByteData()); - } else if (dataRec[i].getName().equals("Angles")) { - setAngleData(((FloatDataRecord) dataRec[i]).getFloatData()); - } else if (dataRec[i].getName().equals("DHRMap")) { + for (IDataRecord element : dataRec) { + if (element.getName().equals("Data")) { + setRawData(((ByteDataRecord) element).getByteData()); + } else if (element.getName().equals("Angles")) { + setAngleData(((FloatDataRecord) element).getFloatData()); + } else if (element.getName().equals("DHRMap")) { try { - ByteDataRecord byteData = (ByteDataRecord) dataRec[i]; + ByteDataRecord byteData = (ByteDataRecord) element; Object o = DynamicSerializationManager.getManager( SerializationType.Thrift).deserialize( byteData.getByteData()); @@ -611,4 +613,9 @@ public class PrecipRateRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "preciprate"; + } } 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 89ea424bee..d98ceee511 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 @@ -71,14 +71,16 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080303 969 jkorman Initial implementation. - * 20090413 2251 jsanchez Implemented IDecoderGettable methods - * and plotted Profiler plots. - * 20090610 2489 jsanchez Updated the windSpeeed & windDirection. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * 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 * * * @@ -92,12 +94,8 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "profiler", - indexes = { - @Index(name = "profiler_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "profiler", indexes = { @Index(name = "profiler_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -607,18 +605,20 @@ public class ProfilerObs extends PersistablePluginDataObject implements // Adjust to agl heights! Integer height = l.getLevelHeight() - getElevation(); - if (level == 1500 && height <= 1500 && height >= 1250) { + if ((level == 1500) && (height <= 1500) + && (height >= 1250)) { retValue = l; - } else if (level == 1250 && height <= 1500 - && height > 1125) { + } else if ((level == 1250) && (height <= 1500) + && (height > 1125)) { retValue = l; - } else if (level == 1000 && height <= 1125 - && height > 875) { + } else if ((level == 1000) && (height <= 1125) + && (height > 875)) { retValue = l; - } else if (level == 750 && height <= 875 - && height > 625) { + } else if ((level == 750) && (height <= 875) + && (height > 625)) { retValue = l; - } else if (level == 500 && height <= 625 && height > 0) { + } else if ((level == 500) && (height <= 625) + && (height > 0)) { retValue = l; } // No need to go higher than this. @@ -697,4 +697,9 @@ public class ProfilerObs extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "profiler"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java index 42fcfbec87..01a02b4cd1 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.qc/src/com/raytheon/uf/common/dataplugin/qc/QCRecord.java @@ -56,6 +56,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * May 16, 2013 1869 bsteffen Remove DataURI column from qc. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -70,1892 +71,1894 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "qc", - indexes = { - @Index(name = "qc_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "qc", indexes = { @Index(name = "qc_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class QCRecord extends PluginDataObject implements ISpatialEnabled { - private static final long serialVersionUID = -8836262244188895665L; + private static final long serialVersionUID = -8836262244188895665L; - @Transient - private Date invTime; + @Transient + private Date invTime; - /** Time to process stages 1 and 2 */ - @Transient - private int secondsStage1_2; + /** Time to process stages 1 and 2 */ + @Transient + private int secondsStage1_2; - /** Time to process stage 3 */ - @Transient - private int secondsStage3; + /** Time to process stage 3 */ + @Transient + private int secondsStage3; - /** Data provider station id */ - @Transient - private String providerId; + /** Data provider station id */ + @Transient + private String providerId; - /** Home WFO id */ - @Transient - private String homeWFO; + /** Home WFO id */ + @Transient + private String homeWFO; - /** Numeric WMO identification */ - @Transient - private int numericWMOid; + /** Numeric WMO identification */ + @Transient + private int numericWMOid; - /** LDAD Station Type */ - @Transient - private String stationType; + /** LDAD Station Type */ + @Transient + private String stationType; - /** Local data provider */ - @Transient - private String dataProvider; + /** Local data provider */ + @Transient + private String dataProvider; - @Transient - private int filterSetNum; + @Transient + private int filterSetNum; - /** List of possible QC checks */ - @Transient - private String qct; + /** List of possible QC checks */ + @Transient + private String qct; - /** List of possible IC checks */ - @Transient - private String ict; + /** List of possible IC checks */ + @Transient + private String ict; - @Embedded - @DataURI(position = 2, embedded = true) - @DynamicSerializeElement - private SurfaceObsLocation location; // latitude, longitude, elevation, + @Embedded + @DataURI(position = 2, embedded = true) + @DynamicSerializeElement + private SurfaceObsLocation location; // latitude, longitude, elevation, - @Column(nullable = false, length = 20) - @DataURI(position = 1) - @DynamicSerializeElement - private String qcType; + @Column(nullable = false, length = 20) + @DataURI(position = 1) + @DynamicSerializeElement + private String qcType; - /** Data Platform Type */ - @Transient - private int dataPlatformType; + /** Data Platform Type */ + @Transient + private int dataPlatformType; - /** Data Platform true direction */ - @Transient - private int platformTrueDirection; + /** Data Platform true direction */ + @Transient + private int platformTrueDirection; - /** Data platform true speed */ - @Transient - private int platformTrueSpeed; + /** Data platform true speed */ + @Transient + private int platformTrueSpeed; - /** Time of observation */ - @Transient - private Date observationTime; + /** Time of observation */ + @Transient + private Date observationTime; - /** Time data was processed by the provider */ - @Transient - private Date reportTime; + /** Time data was processed by the provider */ + @Transient + private Date reportTime; - /** Time data was received */ - @Transient - private Date receivedTime; + /** Time data was received */ + @Transient + private Date receivedTime; - /** Temperature reading */ - @Transient - private float temperature; + /** Temperature reading */ + @Transient + private float temperature; - /** Temperature time of last change */ - @Transient - private Date tempChangeTime; + /** Temperature time of last change */ + @Transient + private Date tempChangeTime; - /** Temperature QC summary value */ - @Transient - private String temperatureDD; + /** Temperature QC summary value */ + @Transient + private String temperatureDD; - /** Temperature QC applied word */ - @Transient - private String[] temperatureQCA; + /** Temperature QC applied word */ + @Transient + private String[] temperatureQCA; - /** Temperature QC Results word */ - @Transient - private String[] temperatureQCR; + /** Temperature QC Results word */ + @Transient + private String[] temperatureQCR; - /** Temperature QC departures */ - @Transient - private int[] temperatureQCD; + /** Temperature QC departures */ + @Transient + private int[] temperatureQCD; - /** Temperature IC applied word */ - @Transient - private String temperatureICA; + /** Temperature IC applied word */ + @Transient + private String temperatureICA; - /** Temperature IC results word */ - @Transient - private String temperatureICR; + /** Temperature IC results word */ + @Transient + private String temperatureICR; - /** Dew Point temperature */ - @Transient - private float dewpoint; + /** Dew Point temperature */ + @Transient + private float dewpoint; - /** Dew Point QC summary value */ - @Transient - private String dewpointDD; + /** Dew Point QC summary value */ + @Transient + private String dewpointDD; - /** Dew point QC applied word */ - @Transient - private String[] dewpointQCA; + /** Dew point QC applied word */ + @Transient + private String[] dewpointQCA; - /** dew point QC results word */ - @Transient - private String[] dewpointQCR; + /** dew point QC results word */ + @Transient + private String[] dewpointQCR; - /** dew point QC departures */ - @Transient - private int[] dewpointQCD; + /** dew point QC departures */ + @Transient + private int[] dewpointQCD; - /** dew point IC applied word */ - @Transient - private String dewpointICA; + /** dew point IC applied word */ + @Transient + private String dewpointICA; - /** dew point IC results word */ - @Transient - private String dewpointICR; + /** dew point IC results word */ + @Transient + private String dewpointICR; - /** wet bulb temperature */ - @Transient - private float wetBulbTemperature; + /** wet bulb temperature */ + @Transient + private float wetBulbTemperature; - /** relative humidity */ - @Transient - private float relHumidity; + /** relative humidity */ + @Transient + private float relHumidity; - /** relative humidity time of last change */ - @Transient - private Date rhChangeTime; + /** relative humidity time of last change */ + @Transient + private Date rhChangeTime; - /** relative humidity QC summary value */ - @Transient - private String relHumidityDD; + /** relative humidity QC summary value */ + @Transient + private String relHumidityDD; - /** relative humidity QC applied word */ - @Transient - private String[] relHumidityQCA; + /** relative humidity QC applied word */ + @Transient + private String[] relHumidityQCA; - /** relative humidity QC results word */ - @Transient - private String[] relHumidityQCR; + /** relative humidity QC results word */ + @Transient + private String[] relHumidityQCR; - /** relative humidity QC departures */ - @Transient - private int[] relHumidityQCD; + /** relative humidity QC departures */ + @Transient + private int[] relHumidityQCD; - /** station pressure */ - @Transient - private float stationPressure; + /** station pressure */ + @Transient + private float stationPressure; - /** station press time of last change */ - @Transient - private Date stationPressChangeTime; + /** station press time of last change */ + @Transient + private Date stationPressChangeTime; - /** station pressure QC summary value */ - @Transient - private String stationPressureDD; + /** station pressure QC summary value */ + @Transient + private String stationPressureDD; - /** station pressure QC applied word */ - @Transient - private String[] stationPressureQCA; + /** station pressure QC applied word */ + @Transient + private String[] stationPressureQCA; - /** station pressure QC results word */ - @Transient - private String[] stationPressureQCR; + /** station pressure QC results word */ + @Transient + private String[] stationPressureQCR; - /** station pressure QC departures */ - @Transient - private int[] stationPressureQCD; + /** station pressure QC departures */ + @Transient + private int[] stationPressureQCD; - /** station pressure IC applied word */ - @Transient - private String stationPressureICA; + /** station pressure IC applied word */ + @Transient + private String stationPressureICA; - /** station pressure IC results word */ - @Transient - private String stationPressureICR; + /** station pressure IC results word */ + @Transient + private String stationPressureICR; - /** sea level pressure */ - @Transient - private float seaLevelPressure; + /** sea level pressure */ + @Transient + private float seaLevelPressure; - /** Sea level pressure QC summary value */ - @Transient - private String seaLevelPressureDD; + /** Sea level pressure QC summary value */ + @Transient + private String seaLevelPressureDD; - /** sea level pressure QC applied word */ - @Transient - private String[] seaLevelPressureQCA; + /** sea level pressure QC applied word */ + @Transient + private String[] seaLevelPressureQCA; - /** sea level pressure QC results word */ - @Transient - private String[] seaLevelPressureQCR; + /** sea level pressure QC results word */ + @Transient + private String[] seaLevelPressureQCR; - /** sea level pressure QC departures */ - @Transient - private int[] seaLevelPressureQCD; + /** sea level pressure QC departures */ + @Transient + private int[] seaLevelPressureQCD; - /** sea level pressure IC applied word */ - @Transient - private String seaLevelPressureICA; + /** sea level pressure IC applied word */ + @Transient + private String seaLevelPressureICA; - /** sea level pressure IC results word */ - @Transient - private String seaLevelPressureICR; + /** sea level pressure IC results word */ + @Transient + private String seaLevelPressureICR; - /** character of pressure change */ - @Transient - private String pressChangeChar; + /** character of pressure change */ + @Transient + private String pressChangeChar; - /** 3 hour pressure change */ - @Transient - private float pressChange3Hour; + /** 3 hour pressure change */ + @Transient + private float pressChange3Hour; - /** 3h pressure change QC summary value */ - @Transient - private String pressChange3HourDD; + /** 3h pressure change QC summary value */ + @Transient + private String pressChange3HourDD; - /** 3h pressure change QC applied word */ - @Transient - private String[] pressChange3HourQCA; + /** 3h pressure change QC applied word */ + @Transient + private String[] pressChange3HourQCA; - /** 3h pressure change QC results word */ - @Transient - private String[] pressChange3HourQCR; + /** 3h pressure change QC results word */ + @Transient + private String[] pressChange3HourQCR; - /** 3h pressure change QC departures */ - @Transient - private int[] pressChange3HourQCD; + /** 3h pressure change QC departures */ + @Transient + private int[] pressChange3HourQCD; - /** 3h pressure change IC applied word */ - @Transient - private String pressChange3HourICA; + /** 3h pressure change IC applied word */ + @Transient + private String pressChange3HourICA; - /** 3h pressure change IC results word */ - @Transient - private String pressChange3HourICR; + /** 3h pressure change IC results word */ + @Transient + private String pressChange3HourICR; - /** altimeter setting */ - @Transient - private float altimeter; + /** altimeter setting */ + @Transient + private float altimeter; - /** altimeter setting QC summary value */ - @Transient - private String altimeterDD; + /** altimeter setting QC summary value */ + @Transient + private String altimeterDD; - /** altimeter setting QC applied word */ - @Transient - private String[] altimeterQCA; + /** altimeter setting QC applied word */ + @Transient + private String[] altimeterQCA; - /** altimeter setting QC results word */ - @Transient - private String[] altimeterQCR; + /** altimeter setting QC results word */ + @Transient + private String[] altimeterQCR; - /** altimeter setting QC departures */ - @Transient - private int[] altimeterQCD; + /** altimeter setting QC departures */ + @Transient + private int[] altimeterQCD; - /** wind direction */ - @Transient - private float windDir; + /** wind direction */ + @Transient + private float windDir; - /** wind direction time of last change */ - @Transient - private Date windDirChangeTime; + /** wind direction time of last change */ + @Transient + private Date windDirChangeTime; - /** wind direction QC summary value */ - @Transient - private String windDirDD; + /** wind direction QC summary value */ + @Transient + private String windDirDD; - /** wind direction QC applied word */ - @Transient - private String[] windDirQCA; + /** wind direction QC applied word */ + @Transient + private String[] windDirQCA; - /** wind direction QC results word */ - @Transient - private String[] windDirQCR; + /** wind direction QC results word */ + @Transient + private String[] windDirQCR; - /** wind direction QC departures */ - @Transient - private int[] windDirQCD; + /** wind direction QC departures */ + @Transient + private int[] windDirQCD; - /** wind direction IC applied word */ - @Transient - private String windDirICA; + /** wind direction IC applied word */ + @Transient + private String windDirICA; - /** wind direction IC results word */ - @Transient - private String windDirICR; + /** wind direction IC results word */ + @Transient + private String windDirICR; - /** wind speed */ - @Transient - private float windSpeed; + /** wind speed */ + @Transient + private float windSpeed; - /** wind speed time of last change */ - @Transient - private Date windSpeedChangeTime; + /** wind speed time of last change */ + @Transient + private Date windSpeedChangeTime; - /** wind speed QC summary value */ - @Transient - private String windSpeedDD; + /** wind speed QC summary value */ + @Transient + private String windSpeedDD; - /** wind speed QC applied word */ - @Transient - private String[] windSpeedQCA; + /** wind speed QC applied word */ + @Transient + private String[] windSpeedQCA; - /** wind speed QC results word */ - @Transient - private String[] windSpeedQCR; + /** wind speed QC results word */ + @Transient + private String[] windSpeedQCR; - /** wind speed QC departures */ - @Transient - private int[] windSpeedQCD; + /** wind speed QC departures */ + @Transient + private int[] windSpeedQCD; - /** wind speed IC applied word */ - @Transient - private String windSpeedICA; + /** wind speed IC applied word */ + @Transient + private String windSpeedICA; - /** wind speed IC results word */ - @Transient - private String windSpeedICR; + /** wind speed IC results word */ + @Transient + private String windSpeedICR; - /** wind gust */ - @Transient - private float windGust; + /** wind gust */ + @Transient + private float windGust; - /** Wind gust QC applied word */ - @Transient - private String[] windGustQCA; + /** Wind gust QC applied word */ + @Transient + private String[] windGustQCA; - /** Wind gust QC results word */ - @Transient - private String[] windGustQCR; + /** Wind gust QC results word */ + @Transient + private String[] windGustQCR; - /** Wind gust QC departures */ - @Transient - private int[] windGustQCD; + /** Wind gust QC departures */ + @Transient + private int[] windGustQCD; - /** wind direction at mininum windspeed */ - @Transient - private float windDirMin; + /** wind direction at mininum windspeed */ + @Transient + private float windDirMin; - /** wind direction at gust */ - @Transient - private float windDirMax; + /** wind direction at gust */ + @Transient + private float windDirMax; - /** wind direction at gust QC summary value */ - @Transient - private String windDirMaxDD; + /** wind direction at gust QC summary value */ + @Transient + private String windDirMaxDD; - /** wind direction at gust QC applied word */ - @Transient - private String[] windDirMaxQCA; + /** wind direction at gust QC applied word */ + @Transient + private String[] windDirMaxQCA; - /** wind direction at gust QC results word */ - @Transient - private String[] windDirMaxQCR; + /** wind direction at gust QC results word */ + @Transient + private String[] windDirMaxQCR; - /** wind direction at gust QC departures */ - @Transient - private int[] windDirMaxQCD; + /** wind direction at gust QC departures */ + @Transient + private int[] windDirMaxQCD; - /** sky cover */ - @Transient - private String skyCover; + /** sky cover */ + @Transient + private String skyCover; - /** sky cover layer base */ - @Transient - private float[] skyLayerBase; + /** sky cover layer base */ + @Transient + private float[] skyLayerBase; - /** visibility */ - @Transient - private float visibility; + /** visibility */ + @Transient + private float visibility; - /** visibility QC summary value */ - @Transient - private String visibilityDD; + /** visibility QC summary value */ + @Transient + private String visibilityDD; - /** visibility QC applied word */ - @Transient - private String[] visibilityQCA; + /** visibility QC applied word */ + @Transient + private String[] visibilityQCA; - /** visibility QC results word */ - @Transient - private String[] visibilityQCR; + /** visibility QC results word */ + @Transient + private String[] visibilityQCR; - /** visibility QC departures */ - @Transient - private int[] visibilityQCD; + /** visibility QC departures */ + @Transient + private int[] visibilityQCD; - /** visibility QC applied word */ - @Transient - private String visibilityICA; + /** visibility QC applied word */ + @Transient + private String visibilityICA; - /** visibility IC results word */ - @Transient - private String visibilityICR; + /** visibility IC results word */ + @Transient + private String visibilityICR; - /** fraction of sky covered by clouds */ - @Transient - private float totalCloudCover; + /** fraction of sky covered by clouds */ + @Transient + private float totalCloudCover; - /** height of the lowest cloud layer */ - @Transient - private String cloudBaseHeight; + /** height of the lowest cloud layer */ + @Transient + private String cloudBaseHeight; - /** present weather */ - @Transient - private String presWeather; + /** present weather */ + @Transient + private String presWeather; - /** low level cloud type */ - @Transient - private String lowLevelCloudType; + /** low level cloud type */ + @Transient + private String lowLevelCloudType; - /** middle level cloud type */ - @Transient - private String midLevelCloudType; + /** middle level cloud type */ + @Transient + private String midLevelCloudType; - /** high level cloud type */ - @Transient - private String highLevelCloudType; + /** high level cloud type */ + @Transient + private String highLevelCloudType; - /** maximum temperature recording period */ - @Transient - private String maxTempRecordPeriod; + /** maximum temperature recording period */ + @Transient + private String maxTempRecordPeriod; - /** minimum temperature recording period */ - @Transient - private String minTempRecordPeriod; + /** minimum temperature recording period */ + @Transient + private String minTempRecordPeriod; - /** minimum temperature */ - @Transient - private float minimumTemperature; + /** minimum temperature */ + @Transient + private float minimumTemperature; - /** raw precip accumulation */ - @Transient - private float rawPrecip; + /** raw precip accumulation */ + @Transient + private float rawPrecip; - /** precip accumulation */ - @Transient - private float precipAccum; + /** precip accumulation */ + @Transient + private float precipAccum; - /** precip amount QC summary value */ - @Transient - private String precipAccumDD; + /** precip amount QC summary value */ + @Transient + private String precipAccumDD; - /** precip amount QC applied word */ - @Transient - private String[] precipAccumQCA; + /** precip amount QC applied word */ + @Transient + private String[] precipAccumQCA; - /** precip amount QC results word */ - @Transient - private String[] precipAccumQCR; + /** precip amount QC results word */ + @Transient + private String[] precipAccumQCR; - /** precip amount QC departures */ - @Transient - private int[] precipAccumQCD; + /** precip amount QC departures */ + @Transient + private int[] precipAccumQCD; - /** precip amount IC applied word */ - @Transient - private String precipAccumICA; + /** precip amount IC applied word */ + @Transient + private String precipAccumICA; - /** precip amount IC results word */ - @Transient - private String precipAccumICR; + /** precip amount IC results word */ + @Transient + private String precipAccumICR; - /** precipitation rate */ - @Transient - private float precipRate; + /** precipitation rate */ + @Transient + private float precipRate; - /** precip rate QC summary value */ - @Transient - private String precipRateDD; + /** precip rate QC summary value */ + @Transient + private String precipRateDD; - /** precip rate QC applied word */ - @Transient - private String[] precipRateQCA; + /** precip rate QC applied word */ + @Transient + private String[] precipRateQCA; - /** precip rate QC results word */ - @Transient - private String[] precipRateQCR; + /** precip rate QC results word */ + @Transient + private String[] precipRateQCR; - /** precip rate QC departures */ - @Transient - private int[] precipRateQCD; + /** precip rate QC departures */ + @Transient + private int[] precipRateQCD; - /** precipitation type */ - @Transient - private String precipType; + /** precipitation type */ + @Transient + private String precipType; - /** precipitation intensity */ - @Transient - private String precipIntensity; + /** precipitation intensity */ + @Transient + private String precipIntensity; - /** time since last precip */ - @Transient - private int timeSinceLastPcp; + /** time since last precip */ + @Transient + private int timeSinceLastPcp; - /** solar radiation */ - @Transient - private float solarRadiation; + /** solar radiation */ + @Transient + private float solarRadiation; - /** solar radiation time of last change */ - @Transient - private Date solarRadiationChangeTime; + /** solar radiation time of last change */ + @Transient + private Date solarRadiationChangeTime; - /** sea surface temperature */ - @Transient - private float seaSurfaceTemp; + /** sea surface temperature */ + @Transient + private float seaSurfaceTemp; - /** Sea surface temperature QC summary value */ - @Transient - private String seaSurfaceTempDD; + /** Sea surface temperature QC summary value */ + @Transient + private String seaSurfaceTempDD; - /** Sea surface temperature QC applied word */ - @Transient - private String[] seaSurfaceTempQCA; + /** Sea surface temperature QC applied word */ + @Transient + private String[] seaSurfaceTempQCA; - /** SeaSurfaceTemp QC Results word */ - @Transient - private String[] seaSurfaceTempQCR; + /** SeaSurfaceTemp QC Results word */ + @Transient + private String[] seaSurfaceTempQCR; - /** Sea surface temperature QC departures */ - @Transient - private int[] seaSurfaceTempQCD; + /** Sea surface temperature QC departures */ + @Transient + private int[] seaSurfaceTempQCD; - /** Sea surface temperature IC applied word */ - @Transient - private String seaSurfaceTempICA; + /** Sea surface temperature IC applied word */ + @Transient + private String seaSurfaceTempICA; - /** Sea surface temperature IC results word */ - @Transient - private String seaSurfaceTempICR; + /** Sea surface temperature IC results word */ + @Transient + private String seaSurfaceTempICR; - /** wave period */ - @Transient - private float wavePeriod; + /** wave period */ + @Transient + private float wavePeriod; - /** wave height */ - @Transient - private float waveHeight; + /** wave height */ + @Transient + private float waveHeight; - /** raw text LDAD mesonet message */ - @Transient - private String rawMessage; + /** raw text LDAD mesonet message */ + @Transient + private String rawMessage; - /** Total column precipitable water vapor */ - @Transient - private float totalColumnPWV; + /** Total column precipitable water vapor */ + @Transient + private float totalColumnPWV; - /** Total GPS signal delay */ - @Transient - private float totalSignalDelay; + /** Total GPS signal delay */ + @Transient + private float totalSignalDelay; - /** Dry component GPS signal delay */ - @Transient - private float drySignalDelay; + /** Dry component GPS signal delay */ + @Transient + private float drySignalDelay; - /** Wet component GPS signal delay */ - @Transient - private float wetSignalDelay; + /** Wet component GPS signal delay */ + @Transient + private float wetSignalDelay; - /** Mean weighted temperature */ - @Transient - private float meanWeightedTemperature; + /** Mean weighted temperature */ + @Transient + private float meanWeightedTemperature; - /** Formal Error */ - @Transient - private float formalError; + /** Formal Error */ + @Transient + private float formalError; - /** Wet delay mapping function */ - @Transient - private float capPi; + /** Wet delay mapping function */ + @Transient + private float capPi; - @Column(length = 15) - private String ncSet; + @Column(length = 15) + private String ncSet; - @Embedded - @DynamicSerializeElement - private FakePointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private FakePointDataView pointDataView; - @Embeddable - @DynamicSerialize - private static class FakePointDataView { - @DynamicSerializeElement - @Column(name = "idx") - int curIdx; - } + @Embeddable + @DynamicSerialize + private static class FakePointDataView { + @DynamicSerializeElement + @Column(name = "idx") + int curIdx; + } - public QCRecord() { + public QCRecord() { - } + } - public QCRecord(String uri) { - super(uri); - } + public QCRecord(String uri) { + super(uri); + } - public Date getInvTime() { - return invTime; - } - - public void setInvTime(Date invTime) { - this.invTime = invTime; - } - - public int getSecondsStage1_2() { - return secondsStage1_2; - } - - public void setSecondsStage1_2(int secondsStage1_2) { - this.secondsStage1_2 = secondsStage1_2; - } - - public int getSecondsStage3() { - return secondsStage3; - } - - public void setSecondsStage3(int secondsStage3) { - this.secondsStage3 = secondsStage3; - } - - public String getProviderId() { - return providerId; - } - - public void setProviderId(String providerId) { - this.providerId = providerId; - } - - public String getStationId() { - return location.getStationId(); - } - - public String getHomeWFO() { - return homeWFO; - } - - public void setHomeWFO(String homeWFO) { - this.homeWFO = homeWFO; - } - - public int getNumericWMOid() { - return numericWMOid; - } - - public void setNumericWMOid(int numericWMOid) { - this.numericWMOid = numericWMOid; - } - - public String getStationType() { - return stationType; - } - - public void setStationType(String stationType) { - this.stationType = stationType; - } - - public String getDataProvider() { - return dataProvider; - } - - public void setDataProvider(String dataProvider) { - this.dataProvider = dataProvider; - } - - public int getFilterSetNum() { - return filterSetNum; - } - - public void setFilterSetNum(int filterSetNum) { - this.filterSetNum = filterSetNum; - } - - public String getQct() { - return qct; - } - - public void setQct(String qct) { - this.qct = qct; - } - - public String getIct() { - return ict; - } - - public void setIct(String ict) { - this.ict = ict; - } + public Date getInvTime() { + return invTime; + } + + public void setInvTime(Date invTime) { + this.invTime = invTime; + } + + public int getSecondsStage1_2() { + return secondsStage1_2; + } + + public void setSecondsStage1_2(int secondsStage1_2) { + this.secondsStage1_2 = secondsStage1_2; + } + + public int getSecondsStage3() { + return secondsStage3; + } + + public void setSecondsStage3(int secondsStage3) { + this.secondsStage3 = secondsStage3; + } + + public String getProviderId() { + return providerId; + } + + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + public String getStationId() { + return location.getStationId(); + } + + public String getHomeWFO() { + return homeWFO; + } + + public void setHomeWFO(String homeWFO) { + this.homeWFO = homeWFO; + } + + public int getNumericWMOid() { + return numericWMOid; + } + + public void setNumericWMOid(int numericWMOid) { + this.numericWMOid = numericWMOid; + } + + public String getStationType() { + return stationType; + } + + public void setStationType(String stationType) { + this.stationType = stationType; + } + + public String getDataProvider() { + return dataProvider; + } + + public void setDataProvider(String dataProvider) { + this.dataProvider = dataProvider; + } + + public int getFilterSetNum() { + return filterSetNum; + } + + public void setFilterSetNum(int filterSetNum) { + this.filterSetNum = filterSetNum; + } + + public String getQct() { + return qct; + } + + public void setQct(String qct) { + this.qct = qct; + } + + public String getIct() { + return ict; + } + + public void setIct(String ict) { + this.ict = ict; + } - /** - * @return the location - */ - public SurfaceObsLocation getLocation() { - return location; - } - - /** - * @param location - * the location to set - */ - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - public float getLatitude() { - return location.getLatitude().floatValue(); - } - - public float getLongitude() { - return location.getLongitude().floatValue(); - } - - public float getElevation() { - return location.getElevation(); - } - - public int getDataPlatformType() { - return dataPlatformType; - } - - public void setDataPlatformType(int dataPlatformType) { - this.dataPlatformType = dataPlatformType; - } - - public int getPlatformTrueDirection() { - return platformTrueDirection; - } - - public void setPlatformTrueDirection(int platformTrueDirection) { - this.platformTrueDirection = platformTrueDirection; - } - - public int getPlatformTrueSpeed() { - return platformTrueSpeed; - } - - public void setPlatformTrueSpeed(int platformTrueSpeed) { - this.platformTrueSpeed = platformTrueSpeed; - } - - public Date getObservationTime() { - return observationTime; - } - - public void setObservationTime(Date observationTime) { - this.observationTime = observationTime; - } - - public Date getReportTime() { - return reportTime; - } - - public void setReportTime(Date reportTime) { - this.reportTime = reportTime; - } - - public Date getReceivedTime() { - return receivedTime; - } - - public void setReceivedTime(Date receivedTime) { - this.receivedTime = receivedTime; - } - - public float getTemperature() { - return temperature; - } - - public void setTemperature(float temperature) { - this.temperature = temperature; - } - - public Date getTempChangeTime() { - return tempChangeTime; - } - - public void setTempChangeTime(Date tempChangeTime) { - this.tempChangeTime = tempChangeTime; - } - - public String getTemperatureDD() { - return temperatureDD; - } - - public void setTemperatureDD(String temperatureDD) { - this.temperatureDD = temperatureDD; - } - - public String[] getTemperatureQCA() { - return temperatureQCA; - } - - public void setTemperatureQCA(String[] temperatureQCA) { - this.temperatureQCA = temperatureQCA; - } + /** + * @return the location + */ + public SurfaceObsLocation getLocation() { + return location; + } + + /** + * @param location + * the location to set + */ + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + public float getLatitude() { + return location.getLatitude().floatValue(); + } + + public float getLongitude() { + return location.getLongitude().floatValue(); + } + + public float getElevation() { + return location.getElevation(); + } + + public int getDataPlatformType() { + return dataPlatformType; + } + + public void setDataPlatformType(int dataPlatformType) { + this.dataPlatformType = dataPlatformType; + } + + public int getPlatformTrueDirection() { + return platformTrueDirection; + } + + public void setPlatformTrueDirection(int platformTrueDirection) { + this.platformTrueDirection = platformTrueDirection; + } + + public int getPlatformTrueSpeed() { + return platformTrueSpeed; + } + + public void setPlatformTrueSpeed(int platformTrueSpeed) { + this.platformTrueSpeed = platformTrueSpeed; + } + + public Date getObservationTime() { + return observationTime; + } + + public void setObservationTime(Date observationTime) { + this.observationTime = observationTime; + } + + public Date getReportTime() { + return reportTime; + } + + public void setReportTime(Date reportTime) { + this.reportTime = reportTime; + } + + public Date getReceivedTime() { + return receivedTime; + } + + public void setReceivedTime(Date receivedTime) { + this.receivedTime = receivedTime; + } + + public float getTemperature() { + return temperature; + } + + public void setTemperature(float temperature) { + this.temperature = temperature; + } + + public Date getTempChangeTime() { + return tempChangeTime; + } + + public void setTempChangeTime(Date tempChangeTime) { + this.tempChangeTime = tempChangeTime; + } + + public String getTemperatureDD() { + return temperatureDD; + } + + public void setTemperatureDD(String temperatureDD) { + this.temperatureDD = temperatureDD; + } + + public String[] getTemperatureQCA() { + return temperatureQCA; + } + + public void setTemperatureQCA(String[] temperatureQCA) { + this.temperatureQCA = temperatureQCA; + } - public String[] getTemperatureQCR() { - return temperatureQCR; - } + public String[] getTemperatureQCR() { + return temperatureQCR; + } - public void setTemperatureQCR(String[] temperatureQCR) { - this.temperatureQCR = temperatureQCR; - } + public void setTemperatureQCR(String[] temperatureQCR) { + this.temperatureQCR = temperatureQCR; + } - public int[] getTemperatureQCD() { - return temperatureQCD; - } + public int[] getTemperatureQCD() { + return temperatureQCD; + } - public void setTemperatureQCD(int[] temperatureQCD) { - this.temperatureQCD = temperatureQCD; - } + public void setTemperatureQCD(int[] temperatureQCD) { + this.temperatureQCD = temperatureQCD; + } - public String getTemperatureICA() { - return temperatureICA; - } + public String getTemperatureICA() { + return temperatureICA; + } - public void setTemperatureICA(String temperatureICA) { - this.temperatureICA = temperatureICA; - } + public void setTemperatureICA(String temperatureICA) { + this.temperatureICA = temperatureICA; + } - public String getTemperatureICR() { - return temperatureICR; - } + public String getTemperatureICR() { + return temperatureICR; + } - public void setTemperatureICR(String temperatureICR) { - this.temperatureICR = temperatureICR; - } + public void setTemperatureICR(String temperatureICR) { + this.temperatureICR = temperatureICR; + } - public float getDewpoint() { - return dewpoint; - } + public float getDewpoint() { + return dewpoint; + } - public void setDewpoint(float dewpoint) { - this.dewpoint = dewpoint; - } + public void setDewpoint(float dewpoint) { + this.dewpoint = dewpoint; + } - public String getDewpointDD() { - return dewpointDD; - } + public String getDewpointDD() { + return dewpointDD; + } - public void setDewpointDD(String dewpointDD) { - this.dewpointDD = dewpointDD; - } + public void setDewpointDD(String dewpointDD) { + this.dewpointDD = dewpointDD; + } - public String[] getDewpointQCA() { - return dewpointQCA; - } + public String[] getDewpointQCA() { + return dewpointQCA; + } - public void setDewpointQCA(String[] dewpointQCA) { - this.dewpointQCA = dewpointQCA; - } + public void setDewpointQCA(String[] dewpointQCA) { + this.dewpointQCA = dewpointQCA; + } - public String[] getDewpointQCR() { - return dewpointQCR; - } + public String[] getDewpointQCR() { + return dewpointQCR; + } - public void setDewpointQCR(String[] dewpointQCR) { - this.dewpointQCR = dewpointQCR; - } + public void setDewpointQCR(String[] dewpointQCR) { + this.dewpointQCR = dewpointQCR; + } - public int[] getDewpointQCD() { - return dewpointQCD; - } + public int[] getDewpointQCD() { + return dewpointQCD; + } - public void setDewpointQCD(int[] dewpointQCD) { - this.dewpointQCD = dewpointQCD; - } + public void setDewpointQCD(int[] dewpointQCD) { + this.dewpointQCD = dewpointQCD; + } - public String getDewpointICA() { - return dewpointICA; - } + public String getDewpointICA() { + return dewpointICA; + } - public void setDewpointICA(String dewpointICA) { - this.dewpointICA = dewpointICA; - } + public void setDewpointICA(String dewpointICA) { + this.dewpointICA = dewpointICA; + } - public String getDewpointICR() { - return dewpointICR; - } + public String getDewpointICR() { + return dewpointICR; + } - public void setDewpointICR(String dewpointICR) { - this.dewpointICR = dewpointICR; - } + public void setDewpointICR(String dewpointICR) { + this.dewpointICR = dewpointICR; + } - public float getWetBulbTemperature() { - return wetBulbTemperature; - } + public float getWetBulbTemperature() { + return wetBulbTemperature; + } - public void setWetBulbTemperature(float wetBulbTemperature) { - this.wetBulbTemperature = wetBulbTemperature; - } + public void setWetBulbTemperature(float wetBulbTemperature) { + this.wetBulbTemperature = wetBulbTemperature; + } - public float getRelHumidity() { - return relHumidity; - } + public float getRelHumidity() { + return relHumidity; + } - public void setRelHumidity(float relHumidity) { - this.relHumidity = relHumidity; - } + public void setRelHumidity(float relHumidity) { + this.relHumidity = relHumidity; + } - public Date getRhChangeTime() { - return rhChangeTime; - } + public Date getRhChangeTime() { + return rhChangeTime; + } - public void setRhChangeTime(Date rhChangeTime) { - this.rhChangeTime = rhChangeTime; - } + public void setRhChangeTime(Date rhChangeTime) { + this.rhChangeTime = rhChangeTime; + } - public String getRelHumidityDD() { - return relHumidityDD; - } + public String getRelHumidityDD() { + return relHumidityDD; + } - public void setRelHumidityDD(String relHumidityDD) { - this.relHumidityDD = relHumidityDD; - } + public void setRelHumidityDD(String relHumidityDD) { + this.relHumidityDD = relHumidityDD; + } - public String[] getRelHumidityQCA() { - return relHumidityQCA; - } + public String[] getRelHumidityQCA() { + return relHumidityQCA; + } - public void setRelHumidityQCA(String[] relHumidityQCA) { - this.relHumidityQCA = relHumidityQCA; - } + public void setRelHumidityQCA(String[] relHumidityQCA) { + this.relHumidityQCA = relHumidityQCA; + } - public String[] getRelHumidityQCR() { - return relHumidityQCR; - } + public String[] getRelHumidityQCR() { + return relHumidityQCR; + } - public void setRelHumidityQCR(String[] relHumidityQCR) { - this.relHumidityQCR = relHumidityQCR; - } + public void setRelHumidityQCR(String[] relHumidityQCR) { + this.relHumidityQCR = relHumidityQCR; + } - public int[] getRelHumidityQCD() { - return relHumidityQCD; - } + public int[] getRelHumidityQCD() { + return relHumidityQCD; + } - public void setRelHumidityQCD(int[] relHumidityQCD) { - this.relHumidityQCD = relHumidityQCD; - } + public void setRelHumidityQCD(int[] relHumidityQCD) { + this.relHumidityQCD = relHumidityQCD; + } - public float getStationPressure() { - return stationPressure; - } + public float getStationPressure() { + return stationPressure; + } - public void setStationPressure(float stationPressure) { - this.stationPressure = stationPressure; - } + public void setStationPressure(float stationPressure) { + this.stationPressure = stationPressure; + } - public Date getStationPressChangeTime() { - return stationPressChangeTime; - } + public Date getStationPressChangeTime() { + return stationPressChangeTime; + } - public void setStationPressChangeTime(Date stationPressChangeTime) { - this.stationPressChangeTime = stationPressChangeTime; - } + public void setStationPressChangeTime(Date stationPressChangeTime) { + this.stationPressChangeTime = stationPressChangeTime; + } - public String getStationPressureDD() { - return stationPressureDD; - } + public String getStationPressureDD() { + return stationPressureDD; + } - public void setStationPressureDD(String stationPressureDD) { - this.stationPressureDD = stationPressureDD; - } + public void setStationPressureDD(String stationPressureDD) { + this.stationPressureDD = stationPressureDD; + } - public String[] getStationPressureQCA() { - return stationPressureQCA; - } + public String[] getStationPressureQCA() { + return stationPressureQCA; + } - public void setStationPressureQCA(String[] stationPressureQCA) { - this.stationPressureQCA = stationPressureQCA; - } + public void setStationPressureQCA(String[] stationPressureQCA) { + this.stationPressureQCA = stationPressureQCA; + } - public String[] getStationPressureQCR() { - return stationPressureQCR; - } + public String[] getStationPressureQCR() { + return stationPressureQCR; + } - public void setStationPressureQCR(String[] stationPressureQCR) { - this.stationPressureQCR = stationPressureQCR; - } + public void setStationPressureQCR(String[] stationPressureQCR) { + this.stationPressureQCR = stationPressureQCR; + } - public int[] getStationPressureQCD() { - return stationPressureQCD; - } + public int[] getStationPressureQCD() { + return stationPressureQCD; + } - public void setStationPressureQCD(int[] stationPressureQCD) { - this.stationPressureQCD = stationPressureQCD; - } + public void setStationPressureQCD(int[] stationPressureQCD) { + this.stationPressureQCD = stationPressureQCD; + } - public String getStationPressureICA() { - return stationPressureICA; - } + public String getStationPressureICA() { + return stationPressureICA; + } - public void setStationPressureICA(String stationPressureICA) { - this.stationPressureICA = stationPressureICA; - } + public void setStationPressureICA(String stationPressureICA) { + this.stationPressureICA = stationPressureICA; + } - public String getStationPressureICR() { - return stationPressureICR; - } + public String getStationPressureICR() { + return stationPressureICR; + } - public void setStationPressureICR(String stationPressureICR) { - this.stationPressureICR = stationPressureICR; - } + public void setStationPressureICR(String stationPressureICR) { + this.stationPressureICR = stationPressureICR; + } - public float getSeaLevelPressure() { - return seaLevelPressure; - } + public float getSeaLevelPressure() { + return seaLevelPressure; + } - public void setSeaLevelPressure(float seaLevelPressure) { - this.seaLevelPressure = seaLevelPressure; - } + public void setSeaLevelPressure(float seaLevelPressure) { + this.seaLevelPressure = seaLevelPressure; + } - public String getSeaLevelPressureDD() { - return seaLevelPressureDD; - } + public String getSeaLevelPressureDD() { + return seaLevelPressureDD; + } - public void setSeaLevelPressureDD(String seaLevelPressureDD) { - this.seaLevelPressureDD = seaLevelPressureDD; - } + public void setSeaLevelPressureDD(String seaLevelPressureDD) { + this.seaLevelPressureDD = seaLevelPressureDD; + } - public String[] getSeaLevelPressureQCA() { - return seaLevelPressureQCA; - } + public String[] getSeaLevelPressureQCA() { + return seaLevelPressureQCA; + } - public void setSeaLevelPressureQCA(String[] seaLevelPressureQCA) { - this.seaLevelPressureQCA = seaLevelPressureQCA; - } + public void setSeaLevelPressureQCA(String[] seaLevelPressureQCA) { + this.seaLevelPressureQCA = seaLevelPressureQCA; + } - public String[] getSeaLevelPressureQCR() { - return seaLevelPressureQCR; - } + public String[] getSeaLevelPressureQCR() { + return seaLevelPressureQCR; + } - public void setSeaLevelPressureQCR(String[] seaLevelPressureQCR) { - this.seaLevelPressureQCR = seaLevelPressureQCR; - } + public void setSeaLevelPressureQCR(String[] seaLevelPressureQCR) { + this.seaLevelPressureQCR = seaLevelPressureQCR; + } - public int[] getSeaLevelPressureQCD() { - return seaLevelPressureQCD; - } + public int[] getSeaLevelPressureQCD() { + return seaLevelPressureQCD; + } - public void setSeaLevelPressureQCD(int[] seaLevelPressureQCD) { - this.seaLevelPressureQCD = seaLevelPressureQCD; - } + public void setSeaLevelPressureQCD(int[] seaLevelPressureQCD) { + this.seaLevelPressureQCD = seaLevelPressureQCD; + } - public String getSeaLevelPressureICA() { - return seaLevelPressureICA; - } + public String getSeaLevelPressureICA() { + return seaLevelPressureICA; + } - public void setSeaLevelPressureICA(String seaLevelPressureICA) { - this.seaLevelPressureICA = seaLevelPressureICA; - } + public void setSeaLevelPressureICA(String seaLevelPressureICA) { + this.seaLevelPressureICA = seaLevelPressureICA; + } - public String getSeaLevelPressureICR() { - return seaLevelPressureICR; - } + public String getSeaLevelPressureICR() { + return seaLevelPressureICR; + } - public void setSeaLevelPressureICR(String seaLevelPressureICR) { - this.seaLevelPressureICR = seaLevelPressureICR; - } + public void setSeaLevelPressureICR(String seaLevelPressureICR) { + this.seaLevelPressureICR = seaLevelPressureICR; + } - public String getPressChangeChar() { - return pressChangeChar; - } + public String getPressChangeChar() { + return pressChangeChar; + } - public void setPressChangeChar(String pressChangeChar) { - this.pressChangeChar = pressChangeChar; - } + public void setPressChangeChar(String pressChangeChar) { + this.pressChangeChar = pressChangeChar; + } - public float getPressChange3Hour() { - return pressChange3Hour; - } + public float getPressChange3Hour() { + return pressChange3Hour; + } - public void setPressChange3Hour(float pressChange3Hour) { - this.pressChange3Hour = pressChange3Hour; - } + public void setPressChange3Hour(float pressChange3Hour) { + this.pressChange3Hour = pressChange3Hour; + } - public String getPressChange3HourDD() { - return pressChange3HourDD; - } + public String getPressChange3HourDD() { + return pressChange3HourDD; + } - public void setPressChange3HourDD(String pressChange3HourDD) { - this.pressChange3HourDD = pressChange3HourDD; - } + public void setPressChange3HourDD(String pressChange3HourDD) { + this.pressChange3HourDD = pressChange3HourDD; + } - public String[] getPressChange3HourQCA() { - return pressChange3HourQCA; - } + public String[] getPressChange3HourQCA() { + return pressChange3HourQCA; + } - public void setPressChange3HourQCA(String[] pressChange3HourQCA) { - this.pressChange3HourQCA = pressChange3HourQCA; - } + public void setPressChange3HourQCA(String[] pressChange3HourQCA) { + this.pressChange3HourQCA = pressChange3HourQCA; + } - public String[] getPressChange3HourQCR() { - return pressChange3HourQCR; - } + public String[] getPressChange3HourQCR() { + return pressChange3HourQCR; + } - public void setPressChange3HourQCR(String[] pressChange3HourQCR) { - this.pressChange3HourQCR = pressChange3HourQCR; - } + public void setPressChange3HourQCR(String[] pressChange3HourQCR) { + this.pressChange3HourQCR = pressChange3HourQCR; + } - public int[] getPressChange3HourQCD() { - return pressChange3HourQCD; - } + public int[] getPressChange3HourQCD() { + return pressChange3HourQCD; + } - public void setPressChange3HourQCD(int[] pressChange3HourQCD) { - this.pressChange3HourQCD = pressChange3HourQCD; - } + public void setPressChange3HourQCD(int[] pressChange3HourQCD) { + this.pressChange3HourQCD = pressChange3HourQCD; + } - public String getPressChange3HourICA() { - return pressChange3HourICA; - } + public String getPressChange3HourICA() { + return pressChange3HourICA; + } - public void setPressChange3HourICA(String pressChange3HourICA) { - this.pressChange3HourICA = pressChange3HourICA; - } + public void setPressChange3HourICA(String pressChange3HourICA) { + this.pressChange3HourICA = pressChange3HourICA; + } - public String getPressChange3HourICR() { - return pressChange3HourICR; - } + public String getPressChange3HourICR() { + return pressChange3HourICR; + } - public void setPressChange3HourICR(String pressChange3HourICR) { - this.pressChange3HourICR = pressChange3HourICR; - } + public void setPressChange3HourICR(String pressChange3HourICR) { + this.pressChange3HourICR = pressChange3HourICR; + } - public float getAltimeter() { - return altimeter; - } + public float getAltimeter() { + return altimeter; + } - public void setAltimeter(float altimeter) { - this.altimeter = altimeter; - } + public void setAltimeter(float altimeter) { + this.altimeter = altimeter; + } - public String getAltimeterDD() { - return altimeterDD; - } + public String getAltimeterDD() { + return altimeterDD; + } - public void setAltimeterDD(String altimeterDD) { - this.altimeterDD = altimeterDD; - } + public void setAltimeterDD(String altimeterDD) { + this.altimeterDD = altimeterDD; + } - public String[] getAltimeterQCA() { - return altimeterQCA; - } + public String[] getAltimeterQCA() { + return altimeterQCA; + } - public void setAltimeterQCA(String[] altimeterQCA) { - this.altimeterQCA = altimeterQCA; - } + public void setAltimeterQCA(String[] altimeterQCA) { + this.altimeterQCA = altimeterQCA; + } - public String[] getAltimeterQCR() { - return altimeterQCR; - } + public String[] getAltimeterQCR() { + return altimeterQCR; + } - public void setAltimeterQCR(String[] altimeterQCR) { - this.altimeterQCR = altimeterQCR; - } + public void setAltimeterQCR(String[] altimeterQCR) { + this.altimeterQCR = altimeterQCR; + } - public int[] getAltimeterQCD() { - return altimeterQCD; - } + public int[] getAltimeterQCD() { + return altimeterQCD; + } - public void setAltimeterQCD(int[] altimeterQCD) { - this.altimeterQCD = altimeterQCD; - } + public void setAltimeterQCD(int[] altimeterQCD) { + this.altimeterQCD = altimeterQCD; + } - public float getWindDir() { - return windDir; - } + public float getWindDir() { + return windDir; + } - public void setWindDir(float windDir) { - this.windDir = windDir; - } + public void setWindDir(float windDir) { + this.windDir = windDir; + } - public Date getWindDirChangeTime() { - return windDirChangeTime; - } + public Date getWindDirChangeTime() { + return windDirChangeTime; + } - public void setWindDirChangeTime(Date windDirChangeTime) { - this.windDirChangeTime = windDirChangeTime; - } + public void setWindDirChangeTime(Date windDirChangeTime) { + this.windDirChangeTime = windDirChangeTime; + } - public String getWindDirDD() { - return windDirDD; - } + public String getWindDirDD() { + return windDirDD; + } - public void setWindDirDD(String windDirDD) { - this.windDirDD = windDirDD; - } + public void setWindDirDD(String windDirDD) { + this.windDirDD = windDirDD; + } - public String[] getWindDirQCA() { - return windDirQCA; - } + public String[] getWindDirQCA() { + return windDirQCA; + } - public void setWindDirQCA(String[] windDirQCA) { - this.windDirQCA = windDirQCA; - } + public void setWindDirQCA(String[] windDirQCA) { + this.windDirQCA = windDirQCA; + } - public String[] getWindDirQCR() { - return windDirQCR; - } + public String[] getWindDirQCR() { + return windDirQCR; + } - public void setWindDirQCR(String[] windDirQCR) { - this.windDirQCR = windDirQCR; - } + public void setWindDirQCR(String[] windDirQCR) { + this.windDirQCR = windDirQCR; + } - public int[] getWindDirQCD() { - return windDirQCD; - } + public int[] getWindDirQCD() { + return windDirQCD; + } - public void setWindDirQCD(int[] windDirQCD) { - this.windDirQCD = windDirQCD; - } + public void setWindDirQCD(int[] windDirQCD) { + this.windDirQCD = windDirQCD; + } - public String getWindDirICA() { - return windDirICA; - } + public String getWindDirICA() { + return windDirICA; + } - public void setWindDirICA(String windDirICA) { - this.windDirICA = windDirICA; - } + public void setWindDirICA(String windDirICA) { + this.windDirICA = windDirICA; + } - public String getWindDirICR() { - return windDirICR; - } + public String getWindDirICR() { + return windDirICR; + } - public void setWindDirICR(String windDirICR) { - this.windDirICR = windDirICR; - } + public void setWindDirICR(String windDirICR) { + this.windDirICR = windDirICR; + } - public float getWindSpeed() { - return windSpeed; - } + public float getWindSpeed() { + return windSpeed; + } - public void setWindSpeed(float windSpeed) { - this.windSpeed = windSpeed; - } + public void setWindSpeed(float windSpeed) { + this.windSpeed = windSpeed; + } - public Date getWindSpeedChangeTime() { - return windSpeedChangeTime; - } + public Date getWindSpeedChangeTime() { + return windSpeedChangeTime; + } - public void setWindSpeedChangeTime(Date windSpeedChangeTime) { - this.windSpeedChangeTime = windSpeedChangeTime; - } + public void setWindSpeedChangeTime(Date windSpeedChangeTime) { + this.windSpeedChangeTime = windSpeedChangeTime; + } - public String getWindSpeedDD() { - return windSpeedDD; - } + public String getWindSpeedDD() { + return windSpeedDD; + } - public void setWindSpeedDD(String windSpeedDD) { - this.windSpeedDD = windSpeedDD; - } + public void setWindSpeedDD(String windSpeedDD) { + this.windSpeedDD = windSpeedDD; + } - public String[] getWindSpeedQCA() { - return windSpeedQCA; - } + public String[] getWindSpeedQCA() { + return windSpeedQCA; + } - public void setWindSpeedQCA(String[] windSpeedQCA) { - this.windSpeedQCA = windSpeedQCA; - } + public void setWindSpeedQCA(String[] windSpeedQCA) { + this.windSpeedQCA = windSpeedQCA; + } - public String[] getWindSpeedQCR() { - return windSpeedQCR; - } + public String[] getWindSpeedQCR() { + return windSpeedQCR; + } - public void setWindSpeedQCR(String[] windSpeedQCR) { - this.windSpeedQCR = windSpeedQCR; - } + public void setWindSpeedQCR(String[] windSpeedQCR) { + this.windSpeedQCR = windSpeedQCR; + } - public int[] getWindSpeedQCD() { - return windSpeedQCD; - } + public int[] getWindSpeedQCD() { + return windSpeedQCD; + } - public void setWindSpeedQCD(int[] windSpeedQCD) { - this.windSpeedQCD = windSpeedQCD; - } + public void setWindSpeedQCD(int[] windSpeedQCD) { + this.windSpeedQCD = windSpeedQCD; + } - public String getWindSpeedICA() { - return windSpeedICA; - } + public String getWindSpeedICA() { + return windSpeedICA; + } - public void setWindSpeedICA(String windSpeedICA) { - this.windSpeedICA = windSpeedICA; - } + public void setWindSpeedICA(String windSpeedICA) { + this.windSpeedICA = windSpeedICA; + } - public String getWindSpeedICR() { - return windSpeedICR; - } + public String getWindSpeedICR() { + return windSpeedICR; + } - public void setWindSpeedICR(String windSpeedICR) { - this.windSpeedICR = windSpeedICR; - } + public void setWindSpeedICR(String windSpeedICR) { + this.windSpeedICR = windSpeedICR; + } - public float getWindGust() { - return windGust; - } + public float getWindGust() { + return windGust; + } - public void setWindGust(float windGust) { - this.windGust = windGust; - } + public void setWindGust(float windGust) { + this.windGust = windGust; + } - public String[] getWindGustQCA() { - return windGustQCA; - } + public String[] getWindGustQCA() { + return windGustQCA; + } - public void setWindGustQCA(String[] windGustQCA) { - this.windGustQCA = windGustQCA; - } + public void setWindGustQCA(String[] windGustQCA) { + this.windGustQCA = windGustQCA; + } - public String[] getWindGustQCR() { - return windGustQCR; - } + public String[] getWindGustQCR() { + return windGustQCR; + } - public void setWindGustQCR(String[] windGustQCR) { - this.windGustQCR = windGustQCR; - } + public void setWindGustQCR(String[] windGustQCR) { + this.windGustQCR = windGustQCR; + } - public int[] getWindGustQCD() { - return windGustQCD; - } + public int[] getWindGustQCD() { + return windGustQCD; + } - public void setWindGustQCD(int[] windGustQCD) { - this.windGustQCD = windGustQCD; - } + public void setWindGustQCD(int[] windGustQCD) { + this.windGustQCD = windGustQCD; + } - public float getWindDirMin() { - return windDirMin; - } + public float getWindDirMin() { + return windDirMin; + } - public void setWindDirMin(float windDirMin) { - this.windDirMin = windDirMin; - } + public void setWindDirMin(float windDirMin) { + this.windDirMin = windDirMin; + } - public float getWindDirMax() { - return windDirMax; - } + public float getWindDirMax() { + return windDirMax; + } - public void setWindDirMax(float windDirMax) { - this.windDirMax = windDirMax; - } + public void setWindDirMax(float windDirMax) { + this.windDirMax = windDirMax; + } - public String getWindDirMaxDD() { - return windDirMaxDD; - } + public String getWindDirMaxDD() { + return windDirMaxDD; + } - public void setWindDirMaxDD(String windDirMaxDD) { - this.windDirMaxDD = windDirMaxDD; - } + public void setWindDirMaxDD(String windDirMaxDD) { + this.windDirMaxDD = windDirMaxDD; + } - public String[] getWindDirMaxQCA() { - return windDirMaxQCA; - } + public String[] getWindDirMaxQCA() { + return windDirMaxQCA; + } - public void setWindDirMaxQCA(String[] windDirMaxQCA) { - this.windDirMaxQCA = windDirMaxQCA; - } + public void setWindDirMaxQCA(String[] windDirMaxQCA) { + this.windDirMaxQCA = windDirMaxQCA; + } - public String[] getWindDirMaxQCR() { - return windDirMaxQCR; - } + public String[] getWindDirMaxQCR() { + return windDirMaxQCR; + } - public void setWindDirMaxQCR(String[] windDirMaxQCR) { - this.windDirMaxQCR = windDirMaxQCR; - } + public void setWindDirMaxQCR(String[] windDirMaxQCR) { + this.windDirMaxQCR = windDirMaxQCR; + } - public int[] getWindDirMaxQCD() { - return windDirMaxQCD; - } + public int[] getWindDirMaxQCD() { + return windDirMaxQCD; + } - public void setWindDirMaxQCD(int[] windDirMaxQCD) { - this.windDirMaxQCD = windDirMaxQCD; - } + public void setWindDirMaxQCD(int[] windDirMaxQCD) { + this.windDirMaxQCD = windDirMaxQCD; + } - public String getSkyCover() { - return skyCover; - } + public String getSkyCover() { + return skyCover; + } - public void setSkyCover(String skyCover) { - this.skyCover = skyCover; - } + public void setSkyCover(String skyCover) { + this.skyCover = skyCover; + } - public float[] getSkyLayerBase() { - return skyLayerBase; - } + public float[] getSkyLayerBase() { + return skyLayerBase; + } - public void setSkyLayerBase(float[] skyLayerBase) { - this.skyLayerBase = skyLayerBase; - } + public void setSkyLayerBase(float[] skyLayerBase) { + this.skyLayerBase = skyLayerBase; + } - public float getVisibility() { - return visibility; - } + public float getVisibility() { + return visibility; + } - public void setVisibility(float visibility) { - this.visibility = visibility; - } + public void setVisibility(float visibility) { + this.visibility = visibility; + } - public String getVisibilityDD() { - return visibilityDD; - } + public String getVisibilityDD() { + return visibilityDD; + } - public void setVisibilityDD(String visibilityDD) { - this.visibilityDD = visibilityDD; - } + public void setVisibilityDD(String visibilityDD) { + this.visibilityDD = visibilityDD; + } - public String[] getVisibilityQCA() { - return visibilityQCA; - } + public String[] getVisibilityQCA() { + return visibilityQCA; + } - public void setVisibilityQCA(String[] visibilityQCA) { - this.visibilityQCA = visibilityQCA; - } + public void setVisibilityQCA(String[] visibilityQCA) { + this.visibilityQCA = visibilityQCA; + } - public String[] getVisibilityQCR() { - return visibilityQCR; - } + public String[] getVisibilityQCR() { + return visibilityQCR; + } - public void setVisibilityQCR(String[] visibilityQCR) { - this.visibilityQCR = visibilityQCR; - } + public void setVisibilityQCR(String[] visibilityQCR) { + this.visibilityQCR = visibilityQCR; + } - public int[] getVisibilityQCD() { - return visibilityQCD; - } + public int[] getVisibilityQCD() { + return visibilityQCD; + } - public void setVisibilityQCD(int[] visibilityQCD) { - this.visibilityQCD = visibilityQCD; - } + public void setVisibilityQCD(int[] visibilityQCD) { + this.visibilityQCD = visibilityQCD; + } - public String getVisibilityICA() { - return visibilityICA; - } + public String getVisibilityICA() { + return visibilityICA; + } - public void setVisibilityICA(String visibilityICA) { - this.visibilityICA = visibilityICA; - } + public void setVisibilityICA(String visibilityICA) { + this.visibilityICA = visibilityICA; + } - public String getVisibilityICR() { - return visibilityICR; - } + public String getVisibilityICR() { + return visibilityICR; + } - public void setVisibilityICR(String visibilityICR) { - this.visibilityICR = visibilityICR; - } + public void setVisibilityICR(String visibilityICR) { + this.visibilityICR = visibilityICR; + } - public float getTotalCloudCover() { - return totalCloudCover; - } + public float getTotalCloudCover() { + return totalCloudCover; + } - public void setTotalCloudCover(float totalCloudCover) { - this.totalCloudCover = totalCloudCover; - } + public void setTotalCloudCover(float totalCloudCover) { + this.totalCloudCover = totalCloudCover; + } - public String getCloudBaseHeight() { - return cloudBaseHeight; - } + public String getCloudBaseHeight() { + return cloudBaseHeight; + } - public void setCloudBaseHeight(String cloudBaseHeight) { - this.cloudBaseHeight = cloudBaseHeight; - } + public void setCloudBaseHeight(String cloudBaseHeight) { + this.cloudBaseHeight = cloudBaseHeight; + } - public String getPresWeather() { - return presWeather; - } + public String getPresWeather() { + return presWeather; + } - public void setPresWeather(String presWeather) { - this.presWeather = presWeather; - } + public void setPresWeather(String presWeather) { + this.presWeather = presWeather; + } - public String getLowLevelCloudType() { - return lowLevelCloudType; - } + public String getLowLevelCloudType() { + return lowLevelCloudType; + } - public void setLowLevelCloudType(String lowLevelCloudType) { - this.lowLevelCloudType = lowLevelCloudType; - } + public void setLowLevelCloudType(String lowLevelCloudType) { + this.lowLevelCloudType = lowLevelCloudType; + } - public String getMidLevelCloudType() { - return midLevelCloudType; - } + public String getMidLevelCloudType() { + return midLevelCloudType; + } - public void setMidLevelCloudType(String midLevelCloudType) { - this.midLevelCloudType = midLevelCloudType; - } + public void setMidLevelCloudType(String midLevelCloudType) { + this.midLevelCloudType = midLevelCloudType; + } - public String getHighLevelCloudType() { - return highLevelCloudType; - } + public String getHighLevelCloudType() { + return highLevelCloudType; + } - public void setHighLevelCloudType(String highLevelCloudType) { - this.highLevelCloudType = highLevelCloudType; - } + public void setHighLevelCloudType(String highLevelCloudType) { + this.highLevelCloudType = highLevelCloudType; + } - public String getMaxTempRecordPeriod() { - return maxTempRecordPeriod; - } + public String getMaxTempRecordPeriod() { + return maxTempRecordPeriod; + } - public void setMaxTempRecordPeriod(String maxTempRecordPeriod) { - this.maxTempRecordPeriod = maxTempRecordPeriod; - } + public void setMaxTempRecordPeriod(String maxTempRecordPeriod) { + this.maxTempRecordPeriod = maxTempRecordPeriod; + } - public String getMinTempRecordPeriod() { - return minTempRecordPeriod; - } + public String getMinTempRecordPeriod() { + return minTempRecordPeriod; + } - public void setMinTempRecordPeriod(String minTempRecordPeriod) { - this.minTempRecordPeriod = minTempRecordPeriod; - } + public void setMinTempRecordPeriod(String minTempRecordPeriod) { + this.minTempRecordPeriod = minTempRecordPeriod; + } - public float getMinimumTemperature() { - return minimumTemperature; - } + public float getMinimumTemperature() { + return minimumTemperature; + } - public void setMinimumTemperature(float minimumTemperature) { - this.minimumTemperature = minimumTemperature; - } + public void setMinimumTemperature(float minimumTemperature) { + this.minimumTemperature = minimumTemperature; + } - public float getRawPrecip() { - return rawPrecip; - } + public float getRawPrecip() { + return rawPrecip; + } - public void setRawPrecip(float rawPrecip) { - this.rawPrecip = rawPrecip; - } + public void setRawPrecip(float rawPrecip) { + this.rawPrecip = rawPrecip; + } - public float getPrecipAccum() { - return precipAccum; - } + public float getPrecipAccum() { + return precipAccum; + } - public void setPrecipAccum(float precipAccum) { - this.precipAccum = precipAccum; - } + public void setPrecipAccum(float precipAccum) { + this.precipAccum = precipAccum; + } - public String getPrecipAccumDD() { - return precipAccumDD; - } + public String getPrecipAccumDD() { + return precipAccumDD; + } - public void setPrecipAccumDD(String precipAccumDD) { - this.precipAccumDD = precipAccumDD; - } + public void setPrecipAccumDD(String precipAccumDD) { + this.precipAccumDD = precipAccumDD; + } - public String[] getPrecipAccumQCA() { - return precipAccumQCA; - } + public String[] getPrecipAccumQCA() { + return precipAccumQCA; + } - public void setPrecipAccumQCA(String[] precipAccumQCA) { - this.precipAccumQCA = precipAccumQCA; - } + public void setPrecipAccumQCA(String[] precipAccumQCA) { + this.precipAccumQCA = precipAccumQCA; + } - public String[] getPrecipAccumQCR() { - return precipAccumQCR; - } + public String[] getPrecipAccumQCR() { + return precipAccumQCR; + } - public void setPrecipAccumQCR(String[] precipAccumQCR) { - this.precipAccumQCR = precipAccumQCR; - } + public void setPrecipAccumQCR(String[] precipAccumQCR) { + this.precipAccumQCR = precipAccumQCR; + } - public int[] getPrecipAccumQCD() { - return precipAccumQCD; - } + public int[] getPrecipAccumQCD() { + return precipAccumQCD; + } - public void setPrecipAccumQCD(int[] precipAccumQCD) { - this.precipAccumQCD = precipAccumQCD; - } + public void setPrecipAccumQCD(int[] precipAccumQCD) { + this.precipAccumQCD = precipAccumQCD; + } - public String getPrecipAccumICA() { - return precipAccumICA; - } + public String getPrecipAccumICA() { + return precipAccumICA; + } - public void setPrecipAccumICA(String precipAccumICA) { - this.precipAccumICA = precipAccumICA; - } + public void setPrecipAccumICA(String precipAccumICA) { + this.precipAccumICA = precipAccumICA; + } - public String getPrecipAccumICR() { - return precipAccumICR; - } + public String getPrecipAccumICR() { + return precipAccumICR; + } - public void setPrecipAccumICR(String precipAccumICR) { - this.precipAccumICR = precipAccumICR; - } + public void setPrecipAccumICR(String precipAccumICR) { + this.precipAccumICR = precipAccumICR; + } - public float getPrecipRate() { - return precipRate; - } + public float getPrecipRate() { + return precipRate; + } - public void setPrecipRate(float precipRate) { - this.precipRate = precipRate; - } + public void setPrecipRate(float precipRate) { + this.precipRate = precipRate; + } - public String getPrecipRateDD() { - return precipRateDD; - } + public String getPrecipRateDD() { + return precipRateDD; + } - public void setPrecipRateDD(String precipRateDD) { - this.precipRateDD = precipRateDD; - } + public void setPrecipRateDD(String precipRateDD) { + this.precipRateDD = precipRateDD; + } - public String[] getPrecipRateQCA() { - return precipRateQCA; - } + public String[] getPrecipRateQCA() { + return precipRateQCA; + } - public void setPrecipRateQCA(String[] precipRateQCA) { - this.precipRateQCA = precipRateQCA; - } + public void setPrecipRateQCA(String[] precipRateQCA) { + this.precipRateQCA = precipRateQCA; + } - public String[] getPrecipRateQCR() { - return precipRateQCR; - } + public String[] getPrecipRateQCR() { + return precipRateQCR; + } - public void setPrecipRateQCR(String[] precipRateQCR) { - this.precipRateQCR = precipRateQCR; - } + public void setPrecipRateQCR(String[] precipRateQCR) { + this.precipRateQCR = precipRateQCR; + } - public int[] getPrecipRateQCD() { - return precipRateQCD; - } + public int[] getPrecipRateQCD() { + return precipRateQCD; + } - public void setPrecipRateQCD(int[] precipRateQCD) { - this.precipRateQCD = precipRateQCD; - } + public void setPrecipRateQCD(int[] precipRateQCD) { + this.precipRateQCD = precipRateQCD; + } - public String getPrecipType() { - return precipType; - } + public String getPrecipType() { + return precipType; + } - public void setPrecipType(String precipType) { - this.precipType = precipType; - } + public void setPrecipType(String precipType) { + this.precipType = precipType; + } - public String getPrecipIntensity() { - return precipIntensity; - } + public String getPrecipIntensity() { + return precipIntensity; + } - public void setPrecipIntensity(String precipIntensity) { - this.precipIntensity = precipIntensity; - } + public void setPrecipIntensity(String precipIntensity) { + this.precipIntensity = precipIntensity; + } - public int getTimeSinceLastPcp() { - return timeSinceLastPcp; - } + public int getTimeSinceLastPcp() { + return timeSinceLastPcp; + } - public void setTimeSinceLastPcp(int timeSinceLastPcp) { - this.timeSinceLastPcp = timeSinceLastPcp; - } + public void setTimeSinceLastPcp(int timeSinceLastPcp) { + this.timeSinceLastPcp = timeSinceLastPcp; + } - public float getSolarRadiation() { - return solarRadiation; - } + public float getSolarRadiation() { + return solarRadiation; + } - public void setSolarRadiation(float solarRadiation) { - this.solarRadiation = solarRadiation; - } + public void setSolarRadiation(float solarRadiation) { + this.solarRadiation = solarRadiation; + } - public Date getSolarRadiationChangeTime() { - return solarRadiationChangeTime; - } + public Date getSolarRadiationChangeTime() { + return solarRadiationChangeTime; + } - public void setSolarRadiationChangeTime(Date solarRadiationChangeTime) { - this.solarRadiationChangeTime = solarRadiationChangeTime; - } + public void setSolarRadiationChangeTime(Date solarRadiationChangeTime) { + this.solarRadiationChangeTime = solarRadiationChangeTime; + } - public float getSeaSurfaceTemp() { - return seaSurfaceTemp; - } + public float getSeaSurfaceTemp() { + return seaSurfaceTemp; + } - public void setSeaSurfaceTemp(float seaSurfaceTemp) { - this.seaSurfaceTemp = seaSurfaceTemp; - } + public void setSeaSurfaceTemp(float seaSurfaceTemp) { + this.seaSurfaceTemp = seaSurfaceTemp; + } - public String getSeaSurfaceTempDD() { - return seaSurfaceTempDD; - } + public String getSeaSurfaceTempDD() { + return seaSurfaceTempDD; + } - public void setSeaSurfaceTempDD(String seaSurfaceTempDD) { - this.seaSurfaceTempDD = seaSurfaceTempDD; - } + public void setSeaSurfaceTempDD(String seaSurfaceTempDD) { + this.seaSurfaceTempDD = seaSurfaceTempDD; + } - public String[] getSeaSurfaceTempQCA() { - return seaSurfaceTempQCA; - } + public String[] getSeaSurfaceTempQCA() { + return seaSurfaceTempQCA; + } - public void setSeaSurfaceTempQCA(String[] seaSurfaceTempQCA) { - this.seaSurfaceTempQCA = seaSurfaceTempQCA; - } + public void setSeaSurfaceTempQCA(String[] seaSurfaceTempQCA) { + this.seaSurfaceTempQCA = seaSurfaceTempQCA; + } - public String[] getSeaSurfaceTempQCR() { - return seaSurfaceTempQCR; - } + public String[] getSeaSurfaceTempQCR() { + return seaSurfaceTempQCR; + } - public void setSeaSurfaceTempQCR(String[] seaSurfaceTempQCR) { - this.seaSurfaceTempQCR = seaSurfaceTempQCR; - } + public void setSeaSurfaceTempQCR(String[] seaSurfaceTempQCR) { + this.seaSurfaceTempQCR = seaSurfaceTempQCR; + } - public int[] getSeaSurfaceTempQCD() { - return seaSurfaceTempQCD; - } + public int[] getSeaSurfaceTempQCD() { + return seaSurfaceTempQCD; + } - public void setSeaSurfaceTempQCD(int[] seaSurfaceTempQCD) { - this.seaSurfaceTempQCD = seaSurfaceTempQCD; - } + public void setSeaSurfaceTempQCD(int[] seaSurfaceTempQCD) { + this.seaSurfaceTempQCD = seaSurfaceTempQCD; + } - public String getSeaSurfaceTempICA() { - return seaSurfaceTempICA; - } + public String getSeaSurfaceTempICA() { + return seaSurfaceTempICA; + } - public void setSeaSurfaceTempICA(String seaSurfaceTempICA) { - this.seaSurfaceTempICA = seaSurfaceTempICA; - } + public void setSeaSurfaceTempICA(String seaSurfaceTempICA) { + this.seaSurfaceTempICA = seaSurfaceTempICA; + } - public String getSeaSurfaceTempICR() { - return seaSurfaceTempICR; - } - - public void setSeaSurfaceTempICR(String seaSurfaceTempICR) { - this.seaSurfaceTempICR = seaSurfaceTempICR; - } - - public float getWavePeriod() { - return wavePeriod; - } - - public void setWavePeriod(float wavePeriod) { - this.wavePeriod = wavePeriod; - } - - public float getWaveHeight() { - return waveHeight; - } - - public void setWaveHeight(float waveHeight) { - this.waveHeight = waveHeight; - } - - public String getRawMessage() { - return rawMessage; - } - - public void setRawMessage(String rawMessage) { - this.rawMessage = rawMessage; - } - - public float getTotalColumnPWV() { - return totalColumnPWV; - } - - public void setTotalColumnPWV(float totalColumnPWV) { - this.totalColumnPWV = totalColumnPWV; - } - - public float getTotalSignalDelay() { - return totalSignalDelay; - } - - public void setTotalSignalDelay(float totalSignalDelay) { - this.totalSignalDelay = totalSignalDelay; - } - - public float getDrySignalDelay() { - return drySignalDelay; - } - - public void setDrySignalDelay(float drySignalDelay) { - this.drySignalDelay = drySignalDelay; - } - - public float getWetSignalDelay() { - return wetSignalDelay; - } - - public void setWetSignalDelay(float wetSignalDelay) { - this.wetSignalDelay = wetSignalDelay; - } - - public float getMeanWeightedTemperature() { - return meanWeightedTemperature; - } - - public void setMeanWeightedTemperature(float meanWeightedTemperature) { - this.meanWeightedTemperature = meanWeightedTemperature; - } - - public float getFormalError() { - return formalError; - } - - public void setFormalError(float formalError) { - this.formalError = formalError; - } - - public float getCapPi() { - return capPi; - } - - public void setCapPi(float capPi) { - this.capPi = capPi; - } - - public static long getSerialVersionUID() { - return serialVersionUID; - } - - /** - * @return the ncSet - */ - public String getNcSet() { - return ncSet; - } - - /** - * @param ncSet - * the ncSet to set - */ - public void setNcSet(String ncSet) { - this.ncSet = ncSet; - } - - /** - * @return the ncIndex - */ - public int getNcIndex() { - return pointDataView != null ? pointDataView.curIdx : -1; - } - - /** - * @param ncIndex - * the ncIndex to set - */ - public void setNcIndex(int ncIndex) { - if (this.pointDataView == null) - pointDataView = new FakePointDataView(); - this.pointDataView.curIdx = ncIndex; - } - - @Override - public ISpatialObject getSpatialObject() { - return location; - } - - /** - * @return the qcType - */ - public String getQcType() { - return qcType; - } - - /** - * @param qcType - * the qcType to set - */ - public void setQcType(String qcType) { - this.qcType = qcType; - } - - public FakePointDataView getPointDataView() { - return pointDataView; - } - - public void setPointDataView(FakePointDataView pointDataView) { - this.pointDataView = pointDataView; - } + public String getSeaSurfaceTempICR() { + return seaSurfaceTempICR; + } + + public void setSeaSurfaceTempICR(String seaSurfaceTempICR) { + this.seaSurfaceTempICR = seaSurfaceTempICR; + } + + public float getWavePeriod() { + return wavePeriod; + } + + public void setWavePeriod(float wavePeriod) { + this.wavePeriod = wavePeriod; + } + + public float getWaveHeight() { + return waveHeight; + } + + public void setWaveHeight(float waveHeight) { + this.waveHeight = waveHeight; + } + + public String getRawMessage() { + return rawMessage; + } + + public void setRawMessage(String rawMessage) { + this.rawMessage = rawMessage; + } + + public float getTotalColumnPWV() { + return totalColumnPWV; + } + + public void setTotalColumnPWV(float totalColumnPWV) { + this.totalColumnPWV = totalColumnPWV; + } + + public float getTotalSignalDelay() { + return totalSignalDelay; + } + + public void setTotalSignalDelay(float totalSignalDelay) { + this.totalSignalDelay = totalSignalDelay; + } + + public float getDrySignalDelay() { + return drySignalDelay; + } + + public void setDrySignalDelay(float drySignalDelay) { + this.drySignalDelay = drySignalDelay; + } + + public float getWetSignalDelay() { + return wetSignalDelay; + } + + public void setWetSignalDelay(float wetSignalDelay) { + this.wetSignalDelay = wetSignalDelay; + } + + public float getMeanWeightedTemperature() { + return meanWeightedTemperature; + } + + public void setMeanWeightedTemperature(float meanWeightedTemperature) { + this.meanWeightedTemperature = meanWeightedTemperature; + } + + public float getFormalError() { + return formalError; + } + + public void setFormalError(float formalError) { + this.formalError = formalError; + } + + public float getCapPi() { + return capPi; + } + + public void setCapPi(float capPi) { + this.capPi = capPi; + } + + public static long getSerialVersionUID() { + return serialVersionUID; + } + + /** + * @return the ncSet + */ + public String getNcSet() { + return ncSet; + } + + /** + * @param ncSet + * the ncSet to set + */ + public void setNcSet(String ncSet) { + this.ncSet = ncSet; + } + + /** + * @return the ncIndex + */ + public int getNcIndex() { + return pointDataView != null ? pointDataView.curIdx : -1; + } + + /** + * @param ncIndex + * the ncIndex to set + */ + public void setNcIndex(int ncIndex) { + if (this.pointDataView == null) { + pointDataView = new FakePointDataView(); + } + this.pointDataView.curIdx = ncIndex; + } + + @Override + public ISpatialObject getSpatialObject() { + return location; + } + + /** + * @return the qcType + */ + public String getQcType() { + return qcType; + } + + /** + * @param qcType + * the qcType to set + */ + public void setQcType(String qcType) { + this.qcType = qcType; + } + + public FakePointDataView getPointDataView() { + return pointDataView; + } + + public void setPointDataView(FakePointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + @Override + public String getPluginName() { + return "qc"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.qpf/src/com/raytheon/uf/common/dataplugin/qpf/QPFRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.qpf/src/com/raytheon/uf/common/dataplugin/qpf/QPFRecord.java index 52b7ec81bb..990b1bda20 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.qpf/src/com/raytheon/uf/common/dataplugin/qpf/QPFRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.qpf/src/com/raytheon/uf/common/dataplugin/qpf/QPFRecord.java @@ -64,14 +64,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 2/24/09 2027 D. Hladky Initial release - * 4/27/12 #562 dgilling Rename getters/setters to - * match Java conventions. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 #1293 bkowal Removed references to hdffileid. + * Feb 24, 2009 2027 D. Hladky Initial release + * Apr 27, 2012 562 dgilling Rename getters/setters to match Java + * conventions. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @@ -85,17 +87,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "qpf", - indexes = { - @Index(name = "qpf_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "qpf", indexes = { @Index(name = "qpf_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class QPFRecord extends PersistablePluginDataObject - implements ISpatialEnabled, IMonitorProcessing { +public class QPFRecord extends PersistablePluginDataObject implements + ISpatialEnabled, IMonitorProcessing { private static final long serialVersionUID = 767763365671L; @@ -515,9 +513,9 @@ public class QPFRecord extends PersistablePluginDataObject try { IDataRecord[] dataRec = dataStore.retrieve(getDataURI()); - for (int i = 0; i < dataRec.length; i++) { - if (dataRec[i] instanceof FloatDataRecord) { - setDataArray(((FloatDataRecord) dataRec[i]).getFloatData()); + for (IDataRecord element : dataRec) { + if (element instanceof FloatDataRecord) { + setDataArray(((FloatDataRecord) element).getFloatData()); } } } catch (Exception se) { @@ -592,4 +590,9 @@ public class QPFRecord extends PersistablePluginDataObject public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "qpf"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java index 7e86311d89..93aafa1d65 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/RadarRecord.java @@ -118,19 +118,22 @@ import com.vividsolutions.jts.geom.Coordinate; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 02/14/2007 139 Phillippe Initial creation - * 09/14/2007 379 jkorman Added populateDataStore() and - * getPersistenceTime() from new IPersistable - * 10/09/2007 465 randerso Updated to better represent level 3 data - * 20071129 472 jkorman Added IDecoderGettable interface. - * 03/04/2013 DCS51 zwang Handle MIGFA product + * Feb 14, 2007 139 Phillippe Initial creation + * Sep 14, 2007 379 jkorman Added populateDataStore() and + * getPersistenceTime() from new + * IPersistable + * Oct 09, 2007 465 randerso Updated to better represent level 3 data + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Mar 04, 2013 DCS51 zwang Handle MIGFA product * Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar * HDF5. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @@ -144,12 +147,8 @@ import com.vividsolutions.jts.geom.Coordinate; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "radar", - indexes = { - @Index(name = "radar_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "radar", indexes = { @Index(name = "radar_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -384,7 +383,6 @@ public class RadarRecord extends PersistablePluginDataObject implements public RadarRecord(RadarRecord that) { this.id = that.id; this.dataURI = that.dataURI; - this.pluginName = that.pluginName; this.dataTime = that.dataTime; this.insertTime = that.insertTime; this.messageData = that.messageData; @@ -614,18 +612,18 @@ public class RadarRecord extends PersistablePluginDataObject implements public void setRawDataValue(int radial, int bin, byte value) { byte[] rawData = getRawData(); - if (rawData != null && numRadials != null && numBins != null) { + if ((rawData != null) && (numRadials != null) && (numBins != null)) { if ((radial < numRadials) && (bin < numBins)) { - rawData[radial * numBins + bin] = value; + rawData[(radial * numBins) + bin] = value; } } } public byte getRawDataValue(int radial, int bin) { byte[] rawData = getRawData(); - if (rawData != null && numRadials != null && numBins != null) { + if ((rawData != null) && (numRadials != null) && (numBins != null)) { if ((radial < numRadials) && (bin < numBins)) { - return rawData[radial * numBins + bin]; + return rawData[(radial * numBins) + bin]; } } return 0; @@ -638,9 +636,9 @@ public class RadarRecord extends PersistablePluginDataObject implements short[] rawShortData = getRawShortData(); byte[] rawData = getRawData(); if (rawShortData != null) { - return rawShortData[radial * numBins + bin]; + return rawShortData[(radial * numBins) + bin]; } else if (rawData != null) { - return (short) (rawData[radial * numBins + bin] & 0xFF); + return (short) (rawData[(radial * numBins) + bin] & 0xFF); } } return 0; @@ -652,9 +650,9 @@ public class RadarRecord extends PersistablePluginDataObject implements short[] rawShortData = getRawShortData(); byte[] rawData = getRawData(); if (rawShortData != null) { - return rawShortData[radial * numBins + bin] & 0xFFFF; + return rawShortData[(radial * numBins) + bin] & 0xFFFF; } else if (rawData != null) { - return rawData[radial * numBins + bin] & 0xFF; + return rawData[(radial * numBins) + bin] & 0xFF; } } return 0; @@ -892,7 +890,7 @@ public class RadarRecord extends PersistablePluginDataObject implements pix = new double[] { 129, 149 }; } - double[] data = { offset, offset + (nLevels - 1) * scale }; + double[] data = { offset, offset + ((nLevels - 1) * scale) }; rval = new PiecewisePixel(getUnitObject(), pix, data); } else { @@ -1127,7 +1125,7 @@ public class RadarRecord extends PersistablePluginDataObject implements } // distance - double mag = Math.sqrt(i * i + j * j); + double mag = Math.sqrt((i * i) + (j * j)); // 1 i or j is 1/4 km, so convert to meters mag *= 250; @@ -1201,19 +1199,19 @@ public class RadarRecord extends PersistablePluginDataObject implements private void addPacketData(double i, double j, String stormID, int type, RadarProductType productType, T currData, boolean needToConvert) { - - // Convert x/y to lon/lat - if (needToConvert) { - Coordinate coor; - - // for MIGFA, i/j unit is 1km, for other radar products, unit is 1/4km - if (type == 140) { - coor = convertStormLatLon(i * 4.0, j * 4.0); - } - else { + + // Convert x/y to lon/lat + if (needToConvert) { + Coordinate coor; + + // for MIGFA, i/j unit is 1km, for other radar products, unit is + // 1/4km + if (type == 140) { + coor = convertStormLatLon(i * 4.0, j * 4.0); + } else { coor = convertStormLatLon(i, j); - } - + } + i = coor.x; j = coor.y; } @@ -1496,11 +1494,11 @@ public class RadarRecord extends PersistablePluginDataObject implements convertLatLon = true; Map map = new HashMap(); - + for (GenericDataParameter param : packet.getParams() .values()) { - - GFMAttributeIDs id = null; + + GFMAttributeIDs id = null; id = GFMAttributeIDs.getAttribute(param.getId()); if (id != null) { @@ -1517,7 +1515,7 @@ public class RadarRecord extends PersistablePluginDataObject implements for (GenericDataComponent currComponent : packet .getFeatures().values()) { currFeature = (AreaComponent) currComponent; - //first point of GFM + // first point of GFM i = currFeature.getPoints().get(0).getCoordinate1(); j = currFeature.getPoints().get(0).getCoordinate2(); @@ -1525,7 +1523,7 @@ public class RadarRecord extends PersistablePluginDataObject implements currFeature, convertLatLon); } continue PACKET; - }else if (currPacket instanceof GenericDataPacket) { + } else if (currPacket instanceof GenericDataPacket) { // Generic Packet will contain most of the data for the // product, so, in general, nothing probably needs to be // done here @@ -1753,4 +1751,9 @@ public class RadarRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "radar"; + } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java index eb53f60740..a1cfd10443 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatelliteRecord.java @@ -57,21 +57,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 02/14/07 139 bphillip Initial Creation - * 20070914 379 jkorman Added populateDataStore() and - * getPersistenceTime() from new IPersistable - * 20071129 472 jkorman Added IDecoderGettable interface. - * 20081106 1515 jkorman Changed units length from 16 to 26 - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * - AWIPS2 Baseline Repository -------- - * 07/30/2012 798 jkorman Support for common satellite data. - * 03/25/2013 1823 dgilling Replace underscores with spaces in URI + * Feb 14, 2007 139 bphillip Initial Creation + * Sep 14, 2007 379 jkorman Added populateDataStore() and + * getPersistenceTime() from new + * IPersistable + * Nov 29, 2007 472 jkorman Added IDecoderGettable interface. + * Nov 06, 2008 1515 jkorman Changed units length from 16 to 26 + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Jul 30, 2012 798 jkorman Support for common satellite data. + * Mar 25, 2013 1823 dgilling Replace underscores with spaces in URI * constructor. - * 04/08/2013 1293 bkowal Removed references to hdffileid. + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @author bphillip @@ -213,7 +214,6 @@ public class SatelliteRecord extends PersistablePluginDataObject implements * No-arg constructor. */ public SatelliteRecord() { - setPluginName(PLUGIN_ID); } /** @@ -410,4 +410,9 @@ public class SatelliteRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "satellite"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/ScanRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/ScanRecord.java index 52125a72d7..8a78407569 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/ScanRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.scan/src/com/raytheon/uf/common/dataplugin/scan/ScanRecord.java @@ -67,15 +67,17 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 03/17/10 2521 D. Hladky Initial release - * 02/01/13 1649 D. Hladky better logging, + * Mar 17, 2010 2521 D. Hladky Initial release + * Feb 01, 2013 1649 D. Hladky better logging, * Feb 28, 2013 1731 bsteffen Optimize construction of scan resource. - * Apr 04, 2013 1846 bkowal Added an index on refTime and forecastTime + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * Aug 06, 2013 2228 njensen Use deserialize(byte[]) + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -402,4 +404,9 @@ public class ScanRecord extends PersistablePluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "scan"; + } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java index b2fadfe38c..74cb688e0d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.sfcobs/src/com/raytheon/uf/common/dataplugin/sfcobs/ObsCommon.java @@ -71,11 +71,13 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Oct 1, 2009 jkorman Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Oct 01, 2009 jkorman Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -89,1589 +91,1591 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "sfcobs", - indexes = { - @Index(name = "sfcobs_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "sfcobs", indexes = { @Index(name = "sfcobs_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class ObsCommon extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData { - - private static final long serialVersionUID = 1L; - - private static final int MISSING = -9999; - - public static final Unit TEMPERATURE_UNIT = SI.KELVIN; - - public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; - - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit PRESSURE_UNIT = SI.PASCAL; - - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - - public static final Unit WAVE_UNIT = SI.METER; - - public static final Unit VISIBILITY_UNIT = NonSI.MILE; - - public static final Unit CLOUD_COVER = NonSI.OCTET; - - private static final HashMap PARM_MAP = new HashMap(); - static { - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("DpT", SFC_DWPT); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("WGS", SFC_WNDGST); - PARM_MAP.put("Px", PRES_STATION); - PARM_MAP.put("PMSL", PRES_SLP); - PARM_MAP.put("ASET", PRES_ALTSG); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("WT", "WT"); - PARM_MAP.put("TCC", "TCC"); - PARM_MAP.put("WP", "WP"); - PARM_MAP.put("WH", "WH"); - PARM_MAP.put("SWP", "SWP"); - PARM_MAP.put("SWH", "SWH"); - PARM_MAP.put("SWS", "SWS"); - PARM_MAP.put("SWD", "SWD"); - PARM_MAP.put("SWGS", "SWGS"); - PARM_MAP.put("PCHNG", "PCHNG"); - PARM_MAP.put("PKWND", "PKWND"); - PARM_MAP.put("VIS", "VIS"); - PARM_MAP.put("COVpct", "COVpct"); - } - - // - @DataURI(position = 1) - @Column - @XmlAttribute - @DynamicSerializeElement - @Index(name = "reporttype_index") - private Integer reportType; - - // Correction indicator from wmo header - @DataURI(position = 2) - @Column - @XmlElement - @DynamicSerializeElement - private String corIndicator; - - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; - - // Time of the observation. - @Column - @XmlAttribute - @DynamicSerializeElement - private Calendar timeObs; - - // Time of the observation to the nearest hour. - @Column - @XmlAttribute - @DynamicSerializeElement - private Calendar refHour; - - @Transient - @XmlElement - @DynamicSerializeElement - private String obsText = ""; - - // Text of the WMO header - @Transient - @XmlElement - @DynamicSerializeElement - private String wmoHeader = ""; - - // Observation air temperature in degrees Kelvin. - @Transient - @XmlElement - @DynamicSerializeElement - private Double temp = -9999.0; - - // Observation dewpoint temperature in degrees Kelvin. - @Transient - @XmlElement - @DynamicSerializeElement - private Double dwpt = -9999.0; - - // Relative Humidity in percent. Decimal(5,2) - @Transient - @XmlElement - @DynamicSerializeElement - private Double humidity = -9999.0; - - // Observation sea surface temperature in degrees Kelvin. - @Transient - @XmlElement - @DynamicSerializeElement - private Double seaTemp = -9999.0; - - // Observation wetbulb temperature in degrees Kelvin. - @Transient - @XmlElement - @DynamicSerializeElement - private Double wetBulb = -9999.0; - - // Observation wind direction in angular degrees. Integer - @Transient - @XmlElement - @DynamicSerializeElement - private Integer windDirection = -9999; - - // Observation wind speed in meters per second. - @Transient - @XmlElement - @DynamicSerializeElement - private Double windSpeed = -9999.0; - - // Observation wind speed gust in meters per second. - @Transient - @XmlElement - @DynamicSerializeElement - private Double windGust = -9999.0; - - // Direction of the peak wind observation in angular degrees - @Transient - @XmlElement - @DynamicSerializeElement - private Integer peakWindDir = -9999; - - // Speed of the peak wind observation in meters per second. - @Transient - @XmlElement - @DynamicSerializeElement - private Double peakWindSpeed = -9999.0; - - // Time of the peak wind observation. - @Transient - @XmlElement - @DynamicSerializeElement - private Long peakWindTime = -1L; - - // The equivilent 10 meter wind speed in meters per second. - @Transient - @XmlElement - @DynamicSerializeElement - private Double wind10mSpeed = -9999.0; - - // The equivilent 20 meter wind speed in meters per second. - @Transient - @XmlElement - @DynamicSerializeElement - private Double wind20mSpeed = -9999.0; - - // Altimeter setting in Pascals. - @Transient - @XmlElement - @DynamicSerializeElement - private Integer pressureAltimeter = -9999; - - // Sea level pressure in Pascals. - @Transient - @XmlElement - @DynamicSerializeElement - private Integer pressureSealevel = -9999; - - // Station pressure in Pascals. - @Transient - @XmlElement - @DynamicSerializeElement - private Integer pressureStation = -9999; - - // Three hour pressure change in pascals. - @Transient - @XmlElement - @DynamicSerializeElement - private Double pressChange3Hr = -9999.0; - - // Three hour pressure change characteristic. - @Transient - @XmlElement - @DynamicSerializeElement - private Integer pressChangeChar = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer wx_past_1 = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer wx_past_2 = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer wx_present = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private String presWeather = null; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer wx_report_type = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer horzVisibility = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer vertVisibility = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer totalCloudCover = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer cloudBaseHeight = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer lowCloudType = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer midCloudType = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer highCloudType = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer platformDirection = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double platformMovement = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private String shipIceData = ""; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double windWaveHeight = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer windWavePeriod = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double waveSteepness = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double waveHeight = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer wavePeriod = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double highResWaveHeight = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double primarySwellWaveDir = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer primarySwellWavePeriod = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double primarySwellWaveHeight = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double secondarySwellWaveDir = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private Integer secondarySwellWavePeriod = -9999; - - @Transient - @XmlElement - @DynamicSerializeElement - private Double secondarySwellWaveHeight = -9999.0; - - @Transient - @XmlElement - @DynamicSerializeElement - private List ancClouds; - - @Transient - @XmlElement - @DynamicSerializeElement - private List ancWaves; - - @Transient - @XmlElement - @DynamicSerializeElement - private List ancTemp; - - @Transient - @XmlElement - @DynamicSerializeElement - private List ancPrecip; - - @Transient - @XmlElement - @DynamicSerializeElement - private List ancWinds; - - @Transient - @XmlElement - @DynamicSerializeElement - private List ancPressure; - - @Transient - @XmlElement - @DynamicSerializeElement - private List interWinds; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - /** - * Empty default constructor - */ - public ObsCommon() { - } - - /** - * Construct an instance of this class using the supplied datauri. - * - * @param dataUri - */ - public ObsCommon(String dataUri) { - super(dataUri); - } - - /** - * @return the reportType - */ - public Integer getReportType() { - return reportType; - } - - /** - * @param reportType - * the reportType to set - */ - public void setReportType(Integer reportType) { - this.reportType = reportType; - } - - /** - * @return the corIndicator - */ - public String getCorIndicator() { - return corIndicator; - } - - /** - * @param corIndicator - * the corIndicator to set - */ - public void setCorIndicator(String corIndicator) { - this.corIndicator = corIndicator; - } - - /** - * @return the timeObs - */ - public Calendar getTimeObs() { - return timeObs; - } - - /** - * @param timeObs - * the timeObs to set - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } - - /** - * @return the refHour - */ - public Calendar getRefHour() { - return refHour; - } - - /** - * @param refHour - * the refHour to set - */ - public void setRefHour(Calendar refHour) { - this.refHour = refHour; - } - - /** - * @return the obsText - */ - public String getObsText() { - return obsText; - } - - /** - * @param obsText - * the obsText to set - */ - public void setObsText(String obsText) { - this.obsText = obsText; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * @return the temp - */ - public Double getTemp() { - return temp; - } - - /** - * @param temp - * the temp to set - */ - public void setTemp(Double temp) { - this.temp = temp; - } - - /** - * @return the dwpt - */ - public Double getDwpt() { - return dwpt; - } - - /** - * @param dwpt - * the dwpt to set - */ - public void setDwpt(Double dwpt) { - this.dwpt = dwpt; - } - - /** - * @return the humidity - */ - public Double getHumidity() { - return humidity; - } - - /** - * @param humidity - * the humidity to set - */ - public void setHumidity(Double humidity) { - this.humidity = humidity; - } - - /** - * @return the seaTemp - */ - public Double getSeaTemp() { - return seaTemp; - } - - /** - * @param seaTemp - * the seaTemp to set - */ - public void setSeaTemp(Double seaTemp) { - this.seaTemp = seaTemp; - } - - /** - * @return the wetBulb - */ - public Double getWetBulb() { - return wetBulb; - } - - /** - * @param wetBulb - * the wetBulb to set - */ - public void setWetBulb(Double wetBulb) { - this.wetBulb = wetBulb; - } - - /** - * @return the windDirection - */ - public Integer getWindDirection() { - return windDirection; - } - - /** - * @param windDirection - * the windDirection to set - */ - public void setWindDirection(Integer windDirection) { - this.windDirection = windDirection; - } - - /** - * @return the windSpeed - */ - public Double getWindSpeed() { - return windSpeed; - } - - /** - * @param windSpeed - * the windSpeed to set - */ - public void setWindSpeed(Double windSpeed) { - this.windSpeed = windSpeed; - } - - /** - * - * @return the windGust - */ - public Double getWindGust() { - return windGust; - } - - /** - * - * @param windGust - * the windGust to set - */ - public void setWindGust(Double windGust) { - this.windGust = windGust; - } - - /** - * Get the direction of the peak wind observation. - * - * @return The direction of the peak wind observation in angular degrees - */ - public Integer getPeakWindDir() { - return peakWindDir; - } - - /** - * Set the direction of the peak wind observation. - * - * @param peakWindDir - * The direction of the peak wind observation in angular degrees - */ - public void setPeakWindDir(Integer peakWindDir) { - this.peakWindDir = peakWindDir; - } - - /** - * Get the speed of the peak wind observation. - * - * @return The speed of the peak wind observation in meters per second. - */ - public Double getPeakWindSpeed() { - return peakWindSpeed; - } - - /** - * Set the speed of the peak wind observation. - * - * @param peakWindSpeed - * The speed of the peak wind observation in meters per second. - */ - public void setPeakWindSpeed(Double peakWindSpeed) { - this.peakWindSpeed = peakWindSpeed; - } - - /** - * Set the time of the peak wind observation. - * - * @return The time of the peak wind observation (msecs from 1-1-1970). - */ - public Long getPeakWindTime() { - return peakWindTime; - } - - /** - * Get the time of the peak wind observation. - * - * @param peakWindTime - * The time of the peak wind observation (msecs from 1-1-1970). - */ - public void setPeakWindTime(Long peakWindTime) { - this.peakWindTime = peakWindTime; - } - - /** - * Get the equivilent 10 meter wind speed. - * - * @return The equivilent 10 meter wind speed in meters per second. - */ - public Double getWind10mSpeed() { - return wind10mSpeed; - } - - /** - * Set the equivilent 10 meter wind speed. - * - * @param windSpeed - * The equivilent 20 meter wind speed in meters per second. - */ - public void setWind10mSpeed(Double windSpeed) { - this.wind10mSpeed = windSpeed; - } - - /** - * Get the equivilent 20 meter wind speed. - * - * @return The equivilent 20 meter wind speed in meters per second. - */ - public Double getWind20mSpeed() { - return wind20mSpeed; - } - - /** - * Set the equivilent 20 meter wind speed. - * - * @param windSpeed - * The equivilent 20 meter wind speed in meters per second. - */ - public void setWind20mSpeed(Double windSpeed) { - this.wind20mSpeed = windSpeed; - } - - /** - * Get the altimeter setting. - * - * @return The altimeter setting in Pascals. - */ - public Integer getPressureAltimeter() { - return pressureAltimeter; - } - - /** - * Set the altimeter setting. - * - * @param pressure - * The altimeter setting in Pascals. - */ - public void setPressureAltimeter(Integer pressure) { - pressureAltimeter = pressure; - } - - /** - * Get the sea level pressure. - * - * @return The sea level pressure in Pascals. - */ - public Integer getPressureSealevel() { - return pressureSealevel; - } - - /** - * Set the sea level pressure. - * - * @param pressure - * The sea level pressure in Pascals. - */ - public void setPressureSealevel(Integer pressure) { - pressureSealevel = pressure; - } - - /** - * Get the station pressure. - * - * @return The station pressure in Pascals. - */ - public Integer getPressureStation() { - return pressureStation; - } - - /** - * Set the station pressure. - * - * @param pressure - * The station pressure in Pascals. - */ - public void setPressureStation(Integer pressure) { - this.pressureStation = pressure; - } - - /** - * Get the three hour pressure change. - * - * @return The three hour pressure change in Pascals. - */ - public Double getPressChange3Hr() { - return pressChange3Hr; - } - - /** - * Set the three hour pressure change. - * - *
-	 *   0 = press same or higher than 3 hrs ago
-	 *   1 = increasing then steady
-	 *   2 = increasing
-	 *   3 = decreasing or steady,then increasing
-	 *   4 = steady
-	 *   5 = press same or lower than 3 hrs ago
-	 *   6 = decreasing then steady
-	 *   7 = decreasing
-	 *   8 = steady or increasing,then decreasing
-	 * 
- * - * @param pressure - * The three hour pressure change in Pascals. - */ - public void setPressChange3Hr(Double pressure) { - this.pressChange3Hr = pressure; - } - - /** - * Get the three hour pressure change characteristic. - * - * @return The three hour pressure change characteristic. - */ - public Integer getPressChangeChar() { - return pressChangeChar; - } - - /** - * Set the three hour pressure change characteristic. - * - * @param pressChangeChar - * The three hour pressure change characteristic. - */ - public void setPressChangeChar(Integer pressChangeChar) { - this.pressChangeChar = pressChangeChar; - } - - /** - * @return the wx_past_1 - */ - public Integer getWx_past_1() { - return wx_past_1; - } - - /** - * @param wx_past_1 - * the wx_past_1 to set - */ - public void setWx_past_1(Integer wx_past_1) { - this.wx_past_1 = wx_past_1; - } - - /** - * @return the wx_past_2 - */ - public Integer getWx_past_2() { - return wx_past_2; - } - - /** - * @param wx_past_2 - * the wx_past_2 to set - */ - public void setWx_past_2(Integer wx_past_2) { - this.wx_past_2 = wx_past_2; - } - - /** - * @return the wx_present - */ - public Integer getWx_present() { - return wx_present; - } - - /** - * @param wx_present - * the wx_present to set - */ - public void setWx_present(Integer wx_present) { - this.wx_present = wx_present; - } - - /** - * @return the presWeather - */ - public String getPresWeather() { - return presWeather; - } - - /** - * @param presWeather - * the presWeather to set - */ - public void setPresWeather(String presWeather) { - this.presWeather = presWeather; - } - - /** - * @return the wx_report_type - */ - public Integer getWx_report_type() { - return wx_report_type; - } - - /** - * @param wx_report_type - * the wx_report_type to set - */ - public void setWx_report_type(Integer wx_report_type) { - this.wx_report_type = wx_report_type; - } - - /** - * @return the horzVisibility - */ - public Integer getHorzVisibility() { - return horzVisibility; - } - - /** - * @param horzVisibility - * the horzVisibility to set - */ - public void setHorzVisibility(Integer horzVisibility) { - this.horzVisibility = horzVisibility; - } - - /** - * @return the vertVisibility - */ - public Integer getVertVisibility() { - return vertVisibility; - } - - /** - * @param vertVisibility - * the vertVisibility to set - */ - public void setVertVisibility(Integer vertVisibility) { - this.vertVisibility = vertVisibility; - } - - /** - * @return the totalCloudCover - */ - public Integer getTotalCloudCover() { - return totalCloudCover; - } - - /** - * @param totalCloudCover - * the totalCloudCover to set - */ - public void setTotalCloudCover(Integer totalCloudCover) { - this.totalCloudCover = totalCloudCover; - } - - /** - * @return the cloudBaseHeight - */ - public Integer getCloudBaseHeight() { - return cloudBaseHeight; - } - - /** - * @param cloudBaseHeight - * the cloudBaseHeight to set - */ - public void setCloudBaseHeight(Integer cloudBaseHeight) { - this.cloudBaseHeight = cloudBaseHeight; - } - - /** - * @return the lowCloudType - */ - public Integer getLowCloudType() { - return lowCloudType; - } - - /** - * @param lowCloudType - * the lowCloudType to set - */ - public void setLowCloudType(Integer lowCloudType) { - this.lowCloudType = lowCloudType; - } - - /** - * @return the midCloudType - */ - public Integer getMidCloudType() { - return midCloudType; - } - - /** - * @param midCloudType - * the midCloudType to set - */ - public void setMidCloudType(Integer midCloudType) { - this.midCloudType = midCloudType; - } - - /** - * @return the highCloudType - */ - public Integer getHighCloudType() { - return highCloudType; - } - - /** - * @param highCloudType - * the highCloudType to set - */ - public void setHighCloudType(Integer highCloudType) { - this.highCloudType = highCloudType; - } - - /** - * @return the platformDirection - */ - public Integer getPlatformDirection() { - return platformDirection; - } - - /** - * @param platformDirection - * the platformDirection to set - */ - public void setPlatformDirection(Integer direction) { - platformDirection = direction; - } - - /** - * @return the platformMovement - */ - public Double getPlatformMovement() { - return platformMovement; - } - - /** - * @param platformMovement - * the platformMovement to set - */ - public void setPlatformMovement(Double movement) { - platformMovement = movement; - } - - /** - * @return the shipIceData - */ - public String getShipIceData() { - return shipIceData; - } - - /** - * @param shipIceData - * the shipIceData to set - */ - public void setShipIceData(String iceData) { - shipIceData = iceData; - } - - /** - * Set the wind wave height. - * - * @param windWaveHeight - * The windWaveHeight in meters. - */ - public void setWindWaveHeight(Double waveHeight) { - windWaveHeight = waveHeight; - } - - /** - * Get the wind wave height. - * - * @return The windWaveHeight in meters. - */ - public Double getWindWaveHeight() { - return windWaveHeight; - } - - /** - * Set the wind wave period. - * - * @param windWavePeriod - * The windWavePeriod in seconds. - */ - public void setWindWavePeriod(Integer wavePeriod) { - windWavePeriod = wavePeriod; - } - - /** - * Get the wind wave period. - * - * @return The windWavePeriod in seconds. - */ - public Integer getWindWavePeriod() { - return windWavePeriod; - } - - /** - * @return the waveSteepness - */ - public Double getWaveSteepness() { - return waveSteepness; - } - - /** - * @param waveSteepness - * the waveSteepness to set - */ - public void setWaveSteepness(Double waveSteepness) { - this.waveSteepness = waveSteepness; - } - - /** - * @return the waveHeight - */ - public Double getWaveHeight() { - return waveHeight; - } - - /** - * @param waveHeight - * the waveHeight to set - */ - public void setWaveHeight(Double waveHeight) { - this.waveHeight = waveHeight; - } - - /** - * @return the wavePeriod - */ - public Integer getWavePeriod() { - return wavePeriod; - } - - /** - * @param wavePeriod - * the wavePeriod to set - */ - public void setWavePeriod(Integer wavePeriod) { - this.wavePeriod = wavePeriod; - } - - /** - * @return the highResWaveHeight - */ - public Double getHighResWaveHeight() { - return highResWaveHeight; - } - - /** - * @param highResWaveHeight - * the highResWaveHeight to set - */ - public void setHighResWaveHeight(Double waveHeight) { - highResWaveHeight = waveHeight; - } - - /** - * @return the primarySwellWaveDir - */ - public Double getPrimarySwellWaveDir() { - return primarySwellWaveDir; - } - - /** - * @param primarySwellWaveDir - * the primarySwellWaveDir to set - */ - public void setPrimarySwellWaveDir(Double waveDir) { - primarySwellWaveDir = waveDir; - } - - /** - * @return the primarySwellWavePeriod - */ - public Integer getPrimarySwellWavePeriod() { - return primarySwellWavePeriod; - } - - /** - * @param primarySwellWavePeriod - * the primarySwellWavePeriod to set - */ - public void setPrimarySwellWavePeriod(Integer primarySwellWavePeriod) { - this.primarySwellWavePeriod = primarySwellWavePeriod; - } - - /** - * @return the primarySwellWaveHeight - */ - public Double getPrimarySwellWaveHeight() { - return primarySwellWaveHeight; - } - - /** - * @param primarySwellWaveHeight - * the primarySwellWaveHeight to set - */ - public void setPrimarySwellWaveHeight(Double waveHeight) { - primarySwellWaveHeight = waveHeight; - } - - /** - * @return the secondarySwellWaveDir - */ - public Double getSecondarySwellWaveDir() { - return secondarySwellWaveDir; - } - - /** - * @param secondarySwellWaveDir - * the secondarySwellWaveDir to set - */ - public void setSecondarySwellWaveDir(Double waveDir) { - secondarySwellWaveDir = waveDir; - } - - /** - * @return the secondarySwellWavePeriod - */ - public Integer getSecondarySwellWavePeriod() { - return secondarySwellWavePeriod; - } - - /** - * @param secondarySwellWavePeriod - * the secondarySwellWavePeriod to set - */ - public void setSecondarySwellWavePeriod(Integer wavePeriod) { - secondarySwellWavePeriod = wavePeriod; - } - - /** - * @return the secondarySwellWaveHeight - */ - public Double getSecondarySwellWaveHeight() { - return secondarySwellWaveHeight; - } - - /** - * @param secondarySwellWaveHeight - * the secondarySwellWaveHeight to set - */ - public void setSecondarySwellWaveHeight(Double height) { - secondarySwellWaveHeight = height; - } - - /** - * @return the ancClouds - */ - public List getAncClouds() { - return ancClouds; - } - - /** - * @param ancClouds - * the ancClouds to set - */ - public void setAncClouds(List ancClouds) { - this.ancClouds = ancClouds; - } - - /** - * - * @param cloud - */ - public void addCloud(AncCloud cloud) { - if (ancClouds == null) { - ancClouds = new ArrayList(); - } - ancClouds.add(cloud); - } - - /** - * @return the ancWaves - */ - public List getAncWaves() { - return ancWaves; - } - - /** - * @param ancWaves - * the ancWaves to set - */ - public void setAncWaves(List ancWaves) { - this.ancWaves = ancWaves; - } - - /** - * - * @param wave - */ - public void addWave(AncWave wave) { - if (ancWaves == null) { - ancWaves = new ArrayList(); - } - ancWaves.add(wave); - } - - /** - * @return the ancTemp - */ - public List getAncTemp() { - return ancTemp; - } - - /** - * @param ancTemp - * the ancTemp to set - */ - public void setAncTemp(List ancTemp) { - this.ancTemp = ancTemp; - } - - /** - * - * @param temp - */ - public void addTemp(AncTemp temp) { - if (ancTemp == null) { - ancTemp = new ArrayList(); - } - ancTemp.add(temp); - } - - /** - * @return the ancPrecip - */ - public List getAncPrecip() { - return ancPrecip; - } - - /** - * @param ancPrecip - * the ancPrecip to set - */ - public void setAncPrecip(List ancPrecip) { - this.ancPrecip = ancPrecip; - } - - /** - * - * @param precip - */ - public void addPrecip(AncPrecip precip) { - if (ancPrecip == null) { - ancPrecip = new ArrayList(); - } - ancPrecip.add(precip); - } - - /** - * @return the ancWinds - */ - public List getAncWinds() { - return ancWinds; - } - - /** - * @param ancWinds - * the ancWinds to set - */ - public void setAncWinds(List ancWinds) { - this.ancWinds = ancWinds; - } - - /** - * - * @param wind - */ - public void addWind(AncWind wind) { - if (ancWinds == null) { - ancWinds = new ArrayList(); - } - ancWinds.add(wind); - } - - /** - * @return the ancPressure - */ - public List getAncPressure() { - return ancPressure; - } - - /** - * @param ancPressure - * the ancPressure to set - */ - public void setAncPressure(List ancPressure) { - this.ancPressure = ancPressure; - } - - /** - * - * @param pressure - */ - public void addPressure(AncPressure pressure) { - if (ancPressure == null) { - ancPressure = new ArrayList(); - } - ancPressure.add(pressure); - } - - /** - * @return the ancPressure - */ - public List getInterWinds() { - return interWinds; - } - - /** - * @param ancPressure - * the ancPressure to set - */ - public void setInterWinds(List winds) { - interWinds = winds; - } - - /** - * - * @param pressure - */ - public void addInterWind(InterWinds wind) { - if (interWinds == null) { - interWinds = new ArrayList(); - } - interWinds.add(wind); - } - - /** - * Set the data uri for this observation. - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } - - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } - - public SurfaceObsLocation getLocation() { - return location; - } - - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } - - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } - - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } - - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } - - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } - - /** - * Get whether the location for this observation is defined. - * - * @return Is this location defined. - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } - - @Override - public String getString(String paramName) { - return null; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = PARM_MAP.get(paramName); - - if (SFC_TEMP.equals(pName) && (temp != null)) { - a = new Amount(temp, TEMPERATURE_UNIT); - } else if (SFC_DWPT.equals(pName) && (dwpt != null)) { - a = new Amount(dwpt, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { - a = new Amount(windDirection, WIND_DIR_UNIT); - } else if (SFC_WNDGST.equals(pName) && (windGust != null)) { - a = new Amount(windGust, WIND_SPEED_UNIT); - } else if (PRES_STATION.equals(pName) && (pressureStation != null)) { - a = new Amount(pressureStation, PRESSURE_UNIT); - } else if (PRES_SLP.equals(pName) && (pressureSealevel != null)) { - a = new Amount(pressureSealevel, PRESSURE_UNIT); - } else if (PRES_ALTSG.equals(pName) && (pressureAltimeter != null)) { - a = new Amount(pressureAltimeter, PRESSURE_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if ("WT".equals(pName) && this.seaTemp != null) { - a = new Amount(this.seaTemp, TEMPERATURE_UNIT); - } else if ("TCC".equals(pName) && this.totalCloudCover != null) { - a = new Amount(this.totalCloudCover, CLOUD_COVER); - } else if ("COVpct".equals(pName) && this.totalCloudCover != null) { - a = new Amount(this.totalCloudCover * 10, CLOUD_COVER); - } else if ("WP".equals(pName)) { - a = new Amount(wavePeriod, WAVE_UNIT); - } else if ("WH".equals(pName)) { - a = new Amount(waveHeight, WAVE_UNIT); - } else if ("SWP".equals(pName)) { - a = new Amount(primarySwellWavePeriod, WAVE_UNIT); - } else if ("SWH".equals(pName)) { - a = new Amount(primarySwellWaveHeight, WAVE_UNIT); - } else if ("PCHNG".equals(pName) && pressChange3Hr != MISSING) { - a = new Amount(pressChange3Hr, PRESSURE_UNIT); - } else if ("VIS".equals(pName) && this.horzVisibility != null) { - a = new Amount(this.horzVisibility / 1000, VISIBILITY_UNIT); - } else if ("PKWND".equals(paramName) && peakWindSpeed != MISSING) { - a = new Amount(peakWindSpeed, WIND_SPEED_UNIT); - } else if ("SWS".equals(paramName) || "SWGS".equals(paramName)) { - a = new Amount(1, WIND_SPEED_UNIT); - } else if ("SWD".equals(paramName) && primarySwellWaveDir != MISSING) { - a = new Amount(primarySwellWaveDir, WIND_DIR_UNIT); - } - - return a; - } - - @Override - public Collection getValues(String paramName) { - return null; - } - - @Override - public PointDataView getPointDataView() { - return pointDataView; - } - - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + ISpatialEnabled, IDecoderGettable, IPointData { + + private static final long serialVersionUID = 1L; + + private static final int MISSING = -9999; + + public static final Unit TEMPERATURE_UNIT = SI.KELVIN; + + public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; + + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + + public static final Unit PRESSURE_UNIT = SI.PASCAL; + + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + + public static final Unit WAVE_UNIT = SI.METER; + + public static final Unit VISIBILITY_UNIT = NonSI.MILE; + + public static final Unit CLOUD_COVER = NonSI.OCTET; + + private static final HashMap PARM_MAP = new HashMap(); + static { + PARM_MAP.put("T", SFC_TEMP); + PARM_MAP.put("DpT", SFC_DWPT); + PARM_MAP.put("WS", SFC_WNDSPD); + PARM_MAP.put("WD", SFC_WNDDIR); + PARM_MAP.put("WGS", SFC_WNDGST); + PARM_MAP.put("Px", PRES_STATION); + PARM_MAP.put("PMSL", PRES_SLP); + PARM_MAP.put("ASET", PRES_ALTSG); + PARM_MAP.put("NLAT", STA_LAT); + PARM_MAP.put("NLON", STA_LON); + PARM_MAP.put("WT", "WT"); + PARM_MAP.put("TCC", "TCC"); + PARM_MAP.put("WP", "WP"); + PARM_MAP.put("WH", "WH"); + PARM_MAP.put("SWP", "SWP"); + PARM_MAP.put("SWH", "SWH"); + PARM_MAP.put("SWS", "SWS"); + PARM_MAP.put("SWD", "SWD"); + PARM_MAP.put("SWGS", "SWGS"); + PARM_MAP.put("PCHNG", "PCHNG"); + PARM_MAP.put("PKWND", "PKWND"); + PARM_MAP.put("VIS", "VIS"); + PARM_MAP.put("COVpct", "COVpct"); + } + + // + @DataURI(position = 1) + @Column + @XmlAttribute + @DynamicSerializeElement + @Index(name = "reporttype_index") + private Integer reportType; + + // Correction indicator from wmo header + @DataURI(position = 2) + @Column + @XmlElement + @DynamicSerializeElement + private String corIndicator; + + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; + + // Time of the observation. + @Column + @XmlAttribute + @DynamicSerializeElement + private Calendar timeObs; + + // Time of the observation to the nearest hour. + @Column + @XmlAttribute + @DynamicSerializeElement + private Calendar refHour; + + @Transient + @XmlElement + @DynamicSerializeElement + private String obsText = ""; + + // Text of the WMO header + @Transient + @XmlElement + @DynamicSerializeElement + private String wmoHeader = ""; + + // Observation air temperature in degrees Kelvin. + @Transient + @XmlElement + @DynamicSerializeElement + private Double temp = -9999.0; + + // Observation dewpoint temperature in degrees Kelvin. + @Transient + @XmlElement + @DynamicSerializeElement + private Double dwpt = -9999.0; + + // Relative Humidity in percent. Decimal(5,2) + @Transient + @XmlElement + @DynamicSerializeElement + private Double humidity = -9999.0; + + // Observation sea surface temperature in degrees Kelvin. + @Transient + @XmlElement + @DynamicSerializeElement + private Double seaTemp = -9999.0; + + // Observation wetbulb temperature in degrees Kelvin. + @Transient + @XmlElement + @DynamicSerializeElement + private Double wetBulb = -9999.0; + + // Observation wind direction in angular degrees. Integer + @Transient + @XmlElement + @DynamicSerializeElement + private Integer windDirection = -9999; + + // Observation wind speed in meters per second. + @Transient + @XmlElement + @DynamicSerializeElement + private Double windSpeed = -9999.0; + + // Observation wind speed gust in meters per second. + @Transient + @XmlElement + @DynamicSerializeElement + private Double windGust = -9999.0; + + // Direction of the peak wind observation in angular degrees + @Transient + @XmlElement + @DynamicSerializeElement + private Integer peakWindDir = -9999; + + // Speed of the peak wind observation in meters per second. + @Transient + @XmlElement + @DynamicSerializeElement + private Double peakWindSpeed = -9999.0; + + // Time of the peak wind observation. + @Transient + @XmlElement + @DynamicSerializeElement + private Long peakWindTime = -1L; + + // The equivilent 10 meter wind speed in meters per second. + @Transient + @XmlElement + @DynamicSerializeElement + private Double wind10mSpeed = -9999.0; + + // The equivilent 20 meter wind speed in meters per second. + @Transient + @XmlElement + @DynamicSerializeElement + private Double wind20mSpeed = -9999.0; + + // Altimeter setting in Pascals. + @Transient + @XmlElement + @DynamicSerializeElement + private Integer pressureAltimeter = -9999; + + // Sea level pressure in Pascals. + @Transient + @XmlElement + @DynamicSerializeElement + private Integer pressureSealevel = -9999; + + // Station pressure in Pascals. + @Transient + @XmlElement + @DynamicSerializeElement + private Integer pressureStation = -9999; + + // Three hour pressure change in pascals. + @Transient + @XmlElement + @DynamicSerializeElement + private Double pressChange3Hr = -9999.0; + + // Three hour pressure change characteristic. + @Transient + @XmlElement + @DynamicSerializeElement + private Integer pressChangeChar = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer wx_past_1 = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer wx_past_2 = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer wx_present = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private String presWeather = null; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer wx_report_type = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer horzVisibility = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer vertVisibility = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer totalCloudCover = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer cloudBaseHeight = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer lowCloudType = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer midCloudType = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer highCloudType = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer platformDirection = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double platformMovement = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private String shipIceData = ""; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double windWaveHeight = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer windWavePeriod = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double waveSteepness = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double waveHeight = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer wavePeriod = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double highResWaveHeight = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double primarySwellWaveDir = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer primarySwellWavePeriod = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double primarySwellWaveHeight = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double secondarySwellWaveDir = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private Integer secondarySwellWavePeriod = -9999; + + @Transient + @XmlElement + @DynamicSerializeElement + private Double secondarySwellWaveHeight = -9999.0; + + @Transient + @XmlElement + @DynamicSerializeElement + private List ancClouds; + + @Transient + @XmlElement + @DynamicSerializeElement + private List ancWaves; + + @Transient + @XmlElement + @DynamicSerializeElement + private List ancTemp; + + @Transient + @XmlElement + @DynamicSerializeElement + private List ancPrecip; + + @Transient + @XmlElement + @DynamicSerializeElement + private List ancWinds; + + @Transient + @XmlElement + @DynamicSerializeElement + private List ancPressure; + + @Transient + @XmlElement + @DynamicSerializeElement + private List interWinds; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + /** + * Empty default constructor + */ + public ObsCommon() { + } + + /** + * Construct an instance of this class using the supplied datauri. + * + * @param dataUri + */ + public ObsCommon(String dataUri) { + super(dataUri); + } + + /** + * @return the reportType + */ + public Integer getReportType() { + return reportType; + } + + /** + * @param reportType + * the reportType to set + */ + public void setReportType(Integer reportType) { + this.reportType = reportType; + } + + /** + * @return the corIndicator + */ + public String getCorIndicator() { + return corIndicator; + } + + /** + * @param corIndicator + * the corIndicator to set + */ + public void setCorIndicator(String corIndicator) { + this.corIndicator = corIndicator; + } + + /** + * @return the timeObs + */ + public Calendar getTimeObs() { + return timeObs; + } + + /** + * @param timeObs + * the timeObs to set + */ + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } + + /** + * @return the refHour + */ + public Calendar getRefHour() { + return refHour; + } + + /** + * @param refHour + * the refHour to set + */ + public void setRefHour(Calendar refHour) { + this.refHour = refHour; + } + + /** + * @return the obsText + */ + public String getObsText() { + return obsText; + } + + /** + * @param obsText + * the obsText to set + */ + public void setObsText(String obsText) { + this.obsText = obsText; + } + + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * @return the temp + */ + public Double getTemp() { + return temp; + } + + /** + * @param temp + * the temp to set + */ + public void setTemp(Double temp) { + this.temp = temp; + } + + /** + * @return the dwpt + */ + public Double getDwpt() { + return dwpt; + } + + /** + * @param dwpt + * the dwpt to set + */ + public void setDwpt(Double dwpt) { + this.dwpt = dwpt; + } + + /** + * @return the humidity + */ + public Double getHumidity() { + return humidity; + } + + /** + * @param humidity + * the humidity to set + */ + public void setHumidity(Double humidity) { + this.humidity = humidity; + } + + /** + * @return the seaTemp + */ + public Double getSeaTemp() { + return seaTemp; + } + + /** + * @param seaTemp + * the seaTemp to set + */ + public void setSeaTemp(Double seaTemp) { + this.seaTemp = seaTemp; + } + + /** + * @return the wetBulb + */ + public Double getWetBulb() { + return wetBulb; + } + + /** + * @param wetBulb + * the wetBulb to set + */ + public void setWetBulb(Double wetBulb) { + this.wetBulb = wetBulb; + } + + /** + * @return the windDirection + */ + public Integer getWindDirection() { + return windDirection; + } + + /** + * @param windDirection + * the windDirection to set + */ + public void setWindDirection(Integer windDirection) { + this.windDirection = windDirection; + } + + /** + * @return the windSpeed + */ + public Double getWindSpeed() { + return windSpeed; + } + + /** + * @param windSpeed + * the windSpeed to set + */ + public void setWindSpeed(Double windSpeed) { + this.windSpeed = windSpeed; + } + + /** + * + * @return the windGust + */ + public Double getWindGust() { + return windGust; + } + + /** + * + * @param windGust + * the windGust to set + */ + public void setWindGust(Double windGust) { + this.windGust = windGust; + } + + /** + * Get the direction of the peak wind observation. + * + * @return The direction of the peak wind observation in angular degrees + */ + public Integer getPeakWindDir() { + return peakWindDir; + } + + /** + * Set the direction of the peak wind observation. + * + * @param peakWindDir + * The direction of the peak wind observation in angular degrees + */ + public void setPeakWindDir(Integer peakWindDir) { + this.peakWindDir = peakWindDir; + } + + /** + * Get the speed of the peak wind observation. + * + * @return The speed of the peak wind observation in meters per second. + */ + public Double getPeakWindSpeed() { + return peakWindSpeed; + } + + /** + * Set the speed of the peak wind observation. + * + * @param peakWindSpeed + * The speed of the peak wind observation in meters per second. + */ + public void setPeakWindSpeed(Double peakWindSpeed) { + this.peakWindSpeed = peakWindSpeed; + } + + /** + * Set the time of the peak wind observation. + * + * @return The time of the peak wind observation (msecs from 1-1-1970). + */ + public Long getPeakWindTime() { + return peakWindTime; + } + + /** + * Get the time of the peak wind observation. + * + * @param peakWindTime + * The time of the peak wind observation (msecs from 1-1-1970). + */ + public void setPeakWindTime(Long peakWindTime) { + this.peakWindTime = peakWindTime; + } + + /** + * Get the equivilent 10 meter wind speed. + * + * @return The equivilent 10 meter wind speed in meters per second. + */ + public Double getWind10mSpeed() { + return wind10mSpeed; + } + + /** + * Set the equivilent 10 meter wind speed. + * + * @param windSpeed + * The equivilent 20 meter wind speed in meters per second. + */ + public void setWind10mSpeed(Double windSpeed) { + this.wind10mSpeed = windSpeed; + } + + /** + * Get the equivilent 20 meter wind speed. + * + * @return The equivilent 20 meter wind speed in meters per second. + */ + public Double getWind20mSpeed() { + return wind20mSpeed; + } + + /** + * Set the equivilent 20 meter wind speed. + * + * @param windSpeed + * The equivilent 20 meter wind speed in meters per second. + */ + public void setWind20mSpeed(Double windSpeed) { + this.wind20mSpeed = windSpeed; + } + + /** + * Get the altimeter setting. + * + * @return The altimeter setting in Pascals. + */ + public Integer getPressureAltimeter() { + return pressureAltimeter; + } + + /** + * Set the altimeter setting. + * + * @param pressure + * The altimeter setting in Pascals. + */ + public void setPressureAltimeter(Integer pressure) { + pressureAltimeter = pressure; + } + + /** + * Get the sea level pressure. + * + * @return The sea level pressure in Pascals. + */ + public Integer getPressureSealevel() { + return pressureSealevel; + } + + /** + * Set the sea level pressure. + * + * @param pressure + * The sea level pressure in Pascals. + */ + public void setPressureSealevel(Integer pressure) { + pressureSealevel = pressure; + } + + /** + * Get the station pressure. + * + * @return The station pressure in Pascals. + */ + public Integer getPressureStation() { + return pressureStation; + } + + /** + * Set the station pressure. + * + * @param pressure + * The station pressure in Pascals. + */ + public void setPressureStation(Integer pressure) { + this.pressureStation = pressure; + } + + /** + * Get the three hour pressure change. + * + * @return The three hour pressure change in Pascals. + */ + public Double getPressChange3Hr() { + return pressChange3Hr; + } + + /** + * Set the three hour pressure change. + * + *
+     *   0 = press same or higher than 3 hrs ago
+     *   1 = increasing then steady
+     *   2 = increasing
+     *   3 = decreasing or steady,then increasing
+     *   4 = steady
+     *   5 = press same or lower than 3 hrs ago
+     *   6 = decreasing then steady
+     *   7 = decreasing
+     *   8 = steady or increasing,then decreasing
+     * 
+ * + * @param pressure + * The three hour pressure change in Pascals. + */ + public void setPressChange3Hr(Double pressure) { + this.pressChange3Hr = pressure; + } + + /** + * Get the three hour pressure change characteristic. + * + * @return The three hour pressure change characteristic. + */ + public Integer getPressChangeChar() { + return pressChangeChar; + } + + /** + * Set the three hour pressure change characteristic. + * + * @param pressChangeChar + * The three hour pressure change characteristic. + */ + public void setPressChangeChar(Integer pressChangeChar) { + this.pressChangeChar = pressChangeChar; + } + + /** + * @return the wx_past_1 + */ + public Integer getWx_past_1() { + return wx_past_1; + } + + /** + * @param wx_past_1 + * the wx_past_1 to set + */ + public void setWx_past_1(Integer wx_past_1) { + this.wx_past_1 = wx_past_1; + } + + /** + * @return the wx_past_2 + */ + public Integer getWx_past_2() { + return wx_past_2; + } + + /** + * @param wx_past_2 + * the wx_past_2 to set + */ + public void setWx_past_2(Integer wx_past_2) { + this.wx_past_2 = wx_past_2; + } + + /** + * @return the wx_present + */ + public Integer getWx_present() { + return wx_present; + } + + /** + * @param wx_present + * the wx_present to set + */ + public void setWx_present(Integer wx_present) { + this.wx_present = wx_present; + } + + /** + * @return the presWeather + */ + public String getPresWeather() { + return presWeather; + } + + /** + * @param presWeather + * the presWeather to set + */ + public void setPresWeather(String presWeather) { + this.presWeather = presWeather; + } + + /** + * @return the wx_report_type + */ + public Integer getWx_report_type() { + return wx_report_type; + } + + /** + * @param wx_report_type + * the wx_report_type to set + */ + public void setWx_report_type(Integer wx_report_type) { + this.wx_report_type = wx_report_type; + } + + /** + * @return the horzVisibility + */ + public Integer getHorzVisibility() { + return horzVisibility; + } + + /** + * @param horzVisibility + * the horzVisibility to set + */ + public void setHorzVisibility(Integer horzVisibility) { + this.horzVisibility = horzVisibility; + } + + /** + * @return the vertVisibility + */ + public Integer getVertVisibility() { + return vertVisibility; + } + + /** + * @param vertVisibility + * the vertVisibility to set + */ + public void setVertVisibility(Integer vertVisibility) { + this.vertVisibility = vertVisibility; + } + + /** + * @return the totalCloudCover + */ + public Integer getTotalCloudCover() { + return totalCloudCover; + } + + /** + * @param totalCloudCover + * the totalCloudCover to set + */ + public void setTotalCloudCover(Integer totalCloudCover) { + this.totalCloudCover = totalCloudCover; + } + + /** + * @return the cloudBaseHeight + */ + public Integer getCloudBaseHeight() { + return cloudBaseHeight; + } + + /** + * @param cloudBaseHeight + * the cloudBaseHeight to set + */ + public void setCloudBaseHeight(Integer cloudBaseHeight) { + this.cloudBaseHeight = cloudBaseHeight; + } + + /** + * @return the lowCloudType + */ + public Integer getLowCloudType() { + return lowCloudType; + } + + /** + * @param lowCloudType + * the lowCloudType to set + */ + public void setLowCloudType(Integer lowCloudType) { + this.lowCloudType = lowCloudType; + } + + /** + * @return the midCloudType + */ + public Integer getMidCloudType() { + return midCloudType; + } + + /** + * @param midCloudType + * the midCloudType to set + */ + public void setMidCloudType(Integer midCloudType) { + this.midCloudType = midCloudType; + } + + /** + * @return the highCloudType + */ + public Integer getHighCloudType() { + return highCloudType; + } + + /** + * @param highCloudType + * the highCloudType to set + */ + public void setHighCloudType(Integer highCloudType) { + this.highCloudType = highCloudType; + } + + /** + * @return the platformDirection + */ + public Integer getPlatformDirection() { + return platformDirection; + } + + /** + * @param platformDirection + * the platformDirection to set + */ + public void setPlatformDirection(Integer direction) { + platformDirection = direction; + } + + /** + * @return the platformMovement + */ + public Double getPlatformMovement() { + return platformMovement; + } + + /** + * @param platformMovement + * the platformMovement to set + */ + public void setPlatformMovement(Double movement) { + platformMovement = movement; + } + + /** + * @return the shipIceData + */ + public String getShipIceData() { + return shipIceData; + } + + /** + * @param shipIceData + * the shipIceData to set + */ + public void setShipIceData(String iceData) { + shipIceData = iceData; + } + + /** + * Set the wind wave height. + * + * @param windWaveHeight + * The windWaveHeight in meters. + */ + public void setWindWaveHeight(Double waveHeight) { + windWaveHeight = waveHeight; + } + + /** + * Get the wind wave height. + * + * @return The windWaveHeight in meters. + */ + public Double getWindWaveHeight() { + return windWaveHeight; + } + + /** + * Set the wind wave period. + * + * @param windWavePeriod + * The windWavePeriod in seconds. + */ + public void setWindWavePeriod(Integer wavePeriod) { + windWavePeriod = wavePeriod; + } + + /** + * Get the wind wave period. + * + * @return The windWavePeriod in seconds. + */ + public Integer getWindWavePeriod() { + return windWavePeriod; + } + + /** + * @return the waveSteepness + */ + public Double getWaveSteepness() { + return waveSteepness; + } + + /** + * @param waveSteepness + * the waveSteepness to set + */ + public void setWaveSteepness(Double waveSteepness) { + this.waveSteepness = waveSteepness; + } + + /** + * @return the waveHeight + */ + public Double getWaveHeight() { + return waveHeight; + } + + /** + * @param waveHeight + * the waveHeight to set + */ + public void setWaveHeight(Double waveHeight) { + this.waveHeight = waveHeight; + } + + /** + * @return the wavePeriod + */ + public Integer getWavePeriod() { + return wavePeriod; + } + + /** + * @param wavePeriod + * the wavePeriod to set + */ + public void setWavePeriod(Integer wavePeriod) { + this.wavePeriod = wavePeriod; + } + + /** + * @return the highResWaveHeight + */ + public Double getHighResWaveHeight() { + return highResWaveHeight; + } + + /** + * @param highResWaveHeight + * the highResWaveHeight to set + */ + public void setHighResWaveHeight(Double waveHeight) { + highResWaveHeight = waveHeight; + } + + /** + * @return the primarySwellWaveDir + */ + public Double getPrimarySwellWaveDir() { + return primarySwellWaveDir; + } + + /** + * @param primarySwellWaveDir + * the primarySwellWaveDir to set + */ + public void setPrimarySwellWaveDir(Double waveDir) { + primarySwellWaveDir = waveDir; + } + + /** + * @return the primarySwellWavePeriod + */ + public Integer getPrimarySwellWavePeriod() { + return primarySwellWavePeriod; + } + + /** + * @param primarySwellWavePeriod + * the primarySwellWavePeriod to set + */ + public void setPrimarySwellWavePeriod(Integer primarySwellWavePeriod) { + this.primarySwellWavePeriod = primarySwellWavePeriod; + } + + /** + * @return the primarySwellWaveHeight + */ + public Double getPrimarySwellWaveHeight() { + return primarySwellWaveHeight; + } + + /** + * @param primarySwellWaveHeight + * the primarySwellWaveHeight to set + */ + public void setPrimarySwellWaveHeight(Double waveHeight) { + primarySwellWaveHeight = waveHeight; + } + + /** + * @return the secondarySwellWaveDir + */ + public Double getSecondarySwellWaveDir() { + return secondarySwellWaveDir; + } + + /** + * @param secondarySwellWaveDir + * the secondarySwellWaveDir to set + */ + public void setSecondarySwellWaveDir(Double waveDir) { + secondarySwellWaveDir = waveDir; + } + + /** + * @return the secondarySwellWavePeriod + */ + public Integer getSecondarySwellWavePeriod() { + return secondarySwellWavePeriod; + } + + /** + * @param secondarySwellWavePeriod + * the secondarySwellWavePeriod to set + */ + public void setSecondarySwellWavePeriod(Integer wavePeriod) { + secondarySwellWavePeriod = wavePeriod; + } + + /** + * @return the secondarySwellWaveHeight + */ + public Double getSecondarySwellWaveHeight() { + return secondarySwellWaveHeight; + } + + /** + * @param secondarySwellWaveHeight + * the secondarySwellWaveHeight to set + */ + public void setSecondarySwellWaveHeight(Double height) { + secondarySwellWaveHeight = height; + } + + /** + * @return the ancClouds + */ + public List getAncClouds() { + return ancClouds; + } + + /** + * @param ancClouds + * the ancClouds to set + */ + public void setAncClouds(List ancClouds) { + this.ancClouds = ancClouds; + } + + /** + * + * @param cloud + */ + public void addCloud(AncCloud cloud) { + if (ancClouds == null) { + ancClouds = new ArrayList(); + } + ancClouds.add(cloud); + } + + /** + * @return the ancWaves + */ + public List getAncWaves() { + return ancWaves; + } + + /** + * @param ancWaves + * the ancWaves to set + */ + public void setAncWaves(List ancWaves) { + this.ancWaves = ancWaves; + } + + /** + * + * @param wave + */ + public void addWave(AncWave wave) { + if (ancWaves == null) { + ancWaves = new ArrayList(); + } + ancWaves.add(wave); + } + + /** + * @return the ancTemp + */ + public List getAncTemp() { + return ancTemp; + } + + /** + * @param ancTemp + * the ancTemp to set + */ + public void setAncTemp(List ancTemp) { + this.ancTemp = ancTemp; + } + + /** + * + * @param temp + */ + public void addTemp(AncTemp temp) { + if (ancTemp == null) { + ancTemp = new ArrayList(); + } + ancTemp.add(temp); + } + + /** + * @return the ancPrecip + */ + public List getAncPrecip() { + return ancPrecip; + } + + /** + * @param ancPrecip + * the ancPrecip to set + */ + public void setAncPrecip(List ancPrecip) { + this.ancPrecip = ancPrecip; + } + + /** + * + * @param precip + */ + public void addPrecip(AncPrecip precip) { + if (ancPrecip == null) { + ancPrecip = new ArrayList(); + } + ancPrecip.add(precip); + } + + /** + * @return the ancWinds + */ + public List getAncWinds() { + return ancWinds; + } + + /** + * @param ancWinds + * the ancWinds to set + */ + public void setAncWinds(List ancWinds) { + this.ancWinds = ancWinds; + } + + /** + * + * @param wind + */ + public void addWind(AncWind wind) { + if (ancWinds == null) { + ancWinds = new ArrayList(); + } + ancWinds.add(wind); + } + + /** + * @return the ancPressure + */ + public List getAncPressure() { + return ancPressure; + } + + /** + * @param ancPressure + * the ancPressure to set + */ + public void setAncPressure(List ancPressure) { + this.ancPressure = ancPressure; + } + + /** + * + * @param pressure + */ + public void addPressure(AncPressure pressure) { + if (ancPressure == null) { + ancPressure = new ArrayList(); + } + ancPressure.add(pressure); + } + + /** + * @return the ancPressure + */ + public List getInterWinds() { + return interWinds; + } + + /** + * @param ancPressure + * the ancPressure to set + */ + public void setInterWinds(List winds) { + interWinds = winds; + } + + /** + * + * @param pressure + */ + public void addInterWind(InterWinds wind) { + if (interWinds == null) { + interWinds = new ArrayList(); + } + interWinds.add(wind); + } + + /** + * Set the data uri for this observation. + * + * @param dataURI + */ + @Override + public void setDataURI(String dataURI) { + super.setDataURI(dataURI); + identifier = dataURI; + } + + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } + + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } + + public SurfaceObsLocation getLocation() { + return location; + } + + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } + + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } + + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } + + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } + + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } + + /** + * Get whether the location for this observation is defined. + * + * @return Is this location defined. + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } + + @Override + public String getString(String paramName) { + return null; + } + + @Override + public String[] getStrings(String paramName) { + return null; + } + + /** + * Get the value and units of a named parameter within this observation. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Amount getValue(String paramName) { + Amount a = null; + + String pName = PARM_MAP.get(paramName); + + if (SFC_TEMP.equals(pName) && (temp != null)) { + a = new Amount(temp, TEMPERATURE_UNIT); + } else if (SFC_DWPT.equals(pName) && (dwpt != null)) { + a = new Amount(dwpt, TEMPERATURE_UNIT); + } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { + a = new Amount(windSpeed, WIND_SPEED_UNIT); + } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { + a = new Amount(windDirection, WIND_DIR_UNIT); + } else if (SFC_WNDGST.equals(pName) && (windGust != null)) { + a = new Amount(windGust, WIND_SPEED_UNIT); + } else if (PRES_STATION.equals(pName) && (pressureStation != null)) { + a = new Amount(pressureStation, PRESSURE_UNIT); + } else if (PRES_SLP.equals(pName) && (pressureSealevel != null)) { + a = new Amount(pressureSealevel, PRESSURE_UNIT); + } else if (PRES_ALTSG.equals(pName) && (pressureAltimeter != null)) { + a = new Amount(pressureAltimeter, PRESSURE_UNIT); + } else if (STA_LAT.equals(pName)) { + a = new Amount(this.getLatitude(), LOCATION_UNIT); + } else if (STA_LON.equals(pName)) { + a = new Amount(this.getLongitude(), LOCATION_UNIT); + } else if ("WT".equals(pName) && (this.seaTemp != null)) { + a = new Amount(this.seaTemp, TEMPERATURE_UNIT); + } else if ("TCC".equals(pName) && (this.totalCloudCover != null)) { + a = new Amount(this.totalCloudCover, CLOUD_COVER); + } else if ("COVpct".equals(pName) && (this.totalCloudCover != null)) { + a = new Amount(this.totalCloudCover * 10, CLOUD_COVER); + } else if ("WP".equals(pName)) { + a = new Amount(wavePeriod, WAVE_UNIT); + } else if ("WH".equals(pName)) { + a = new Amount(waveHeight, WAVE_UNIT); + } else if ("SWP".equals(pName)) { + a = new Amount(primarySwellWavePeriod, WAVE_UNIT); + } else if ("SWH".equals(pName)) { + a = new Amount(primarySwellWaveHeight, WAVE_UNIT); + } else if ("PCHNG".equals(pName) && (pressChange3Hr != MISSING)) { + a = new Amount(pressChange3Hr, PRESSURE_UNIT); + } else if ("VIS".equals(pName) && (this.horzVisibility != null)) { + a = new Amount(this.horzVisibility / 1000, VISIBILITY_UNIT); + } else if ("PKWND".equals(paramName) && (peakWindSpeed != MISSING)) { + a = new Amount(peakWindSpeed, WIND_SPEED_UNIT); + } else if ("SWS".equals(paramName) || "SWGS".equals(paramName)) { + a = new Amount(1, WIND_SPEED_UNIT); + } else if ("SWD".equals(paramName) && (primarySwellWaveDir != MISSING)) { + a = new Amount(primarySwellWaveDir, WIND_DIR_UNIT); + } + + return a; + } + + @Override + public Collection getValues(String paramName) { + return null; + } + + @Override + public PointDataView getPointDataView() { + return pointDataView; + } + + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "sfcobs"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.svrwx/src/com/raytheon/uf/common/dataplugin/svrwx/SvrWxRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.svrwx/src/com/raytheon/uf/common/dataplugin/svrwx/SvrWxRecord.java index f88ea2a2d4..db716a3398 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.svrwx/src/com/raytheon/uf/common/dataplugin/svrwx/SvrWxRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.svrwx/src/com/raytheon/uf/common/dataplugin/svrwx/SvrWxRecord.java @@ -57,11 +57,13 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 4, 2010 jsanchez Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Jan 04, 2010 jsanchez Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -75,229 +77,231 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "svrwx", - indexes = { - @Index(name = "svrwx_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "svrwx", indexes = { @Index(name = "svrwx_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class SvrWxRecord extends PersistablePluginDataObject implements - ISpatialEnabled, IPointData { + ISpatialEnabled, IPointData { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @Transient - @XmlElement - @DynamicSerializeElement - private String wmoHeader = ""; + // Text of the WMO header + @Transient + @XmlElement + @DynamicSerializeElement + private String wmoHeader = ""; - @Embedded - @DataURI(position = 2, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 2, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - @Transient - @XmlElement - @DynamicSerializeElement - protected String eventKey; + @Transient + @XmlElement + @DynamicSerializeElement + protected String eventKey; - @XmlElement - @DynamicSerializeElement - @Column - @DataURI(position = 1) - protected String reportType; + @XmlElement + @DynamicSerializeElement + @Column + @DataURI(position = 1) + protected String reportType; - @Transient - @XmlElement - @DynamicSerializeElement - protected String details; + @Transient + @XmlElement + @DynamicSerializeElement + protected String details; - @Transient - @XmlElement - @DynamicSerializeElement - protected String greenTime; + @Transient + @XmlElement + @DynamicSerializeElement + protected String greenTime; - /** - * Empty default constructor - */ - public SvrWxRecord() { - } + /** + * Empty default constructor + */ + public SvrWxRecord() { + } - /** - * Construct an instance of this class using the supplied datauri. - * - * @param dataUri - */ - public SvrWxRecord(String dataUri) { - super(dataUri); - } + /** + * Construct an instance of this class using the supplied datauri. + * + * @param dataUri + */ + public SvrWxRecord(String dataUri) { + super(dataUri); + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * Set the data uri for this observation. - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } + /** + * Set the data uri for this observation. + * + * @param dataURI + */ + @Override + public void setDataURI(String dataURI) { + super.setDataURI(dataURI); + identifier = dataURI; + } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - public SurfaceObsLocation getLocation() { - return location; - } + public SurfaceObsLocation getLocation() { + return location; + } - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - public String getEventKey() { - return eventKey; - } + public String getEventKey() { + return eventKey; + } - public void setEventKey(String eventKey) { - this.eventKey = eventKey; - } + public void setEventKey(String eventKey) { + this.eventKey = eventKey; + } - public String getGreenTime() { - return greenTime; - } + public String getGreenTime() { + return greenTime; + } - public void setGreenTime(String greenTime) { - this.greenTime = greenTime; - } + public void setGreenTime(String greenTime) { + this.greenTime = greenTime; + } - public String getDetails() { - return details; - } + public String getDetails() { + return details; + } - public void setDetails(String details) { - this.details = details; - } + public void setDetails(String details) { + this.details = details; + } - public String getReportType() { - return reportType; - } + public String getReportType() { + return reportType; + } - public void setReportType(String reportType) { - this.reportType = reportType; - } + public void setReportType(String reportType) { + this.reportType = reportType; + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Get whether the location for this observation is defined. - * - * @return Is this location defined. - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Get whether the location for this observation is defined. + * + * @return Is this location defined. + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + Calendar c = getDataTime().getRefTimeAsCalendar(); + if (c != null) { + sb.append(String.format("SvrWx:%1$tY%1$tm%1$td%1$tH%1$tM", + getDataTime().getRefTimeAsCalendar())); + } else { + sb.append("SvrWx:YYYYMMDDHHmm"); + } + sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); + return sb.toString(); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - Calendar c = getDataTime().getRefTimeAsCalendar(); - if (c != null) { - sb.append(String.format("SvrWx:%1$tY%1$tm%1$td%1$tH%1$tM", - getDataTime().getRefTimeAsCalendar())); - } else { - sb.append("SvrWx:YYYYMMDDHHmm"); - } - sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); - return sb.toString(); - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "svrwx"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.tcg/src/com/raytheon/uf/common/dataplugin/tcg/TropicalCycloneGuidance.java b/edexOsgi/com.raytheon.uf.common.dataplugin.tcg/src/com/raytheon/uf/common/dataplugin/tcg/TropicalCycloneGuidance.java index 09eccfafa4..2e63810550 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.tcg/src/com/raytheon/uf/common/dataplugin/tcg/TropicalCycloneGuidance.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.tcg/src/com/raytheon/uf/common/dataplugin/tcg/TropicalCycloneGuidance.java @@ -57,11 +57,13 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Oct 28, 2009 jsanchez Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Oct 28, 2009 jsanchez Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -75,230 +77,232 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "tcg", - indexes = { - @Index(name = "tcg_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "tcg", indexes = { @Index(name = "tcg_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class TropicalCycloneGuidance extends PersistablePluginDataObject - implements ISpatialEnabled, IPointData { + implements ISpatialEnabled, IPointData { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @Transient - @XmlElement - @DynamicSerializeElement - private String wmoHeader = ""; + // Text of the WMO header + @Transient + @XmlElement + @DynamicSerializeElement + private String wmoHeader = ""; - @XmlElement - @DynamicSerializeElement - @Transient - protected String stormName; + @XmlElement + @DynamicSerializeElement + @Transient + protected String stormName; - @XmlElement - @DynamicSerializeElement - @DataURI(position = 1) - @Column - protected String productType = ""; + @XmlElement + @DynamicSerializeElement + @DataURI(position = 1) + @Column + protected String productType = ""; - @XmlElement - @DynamicSerializeElement - @DataURI(position = 2) - @Column - protected String modelName = "NONE"; + @XmlElement + @DynamicSerializeElement + @DataURI(position = 2) + @Column + protected String modelName = "NONE"; - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - @Transient - @XmlElement - @DynamicSerializeElement - protected TCGStormType type = TCGStormType.UNKNOWN; + @Transient + @XmlElement + @DynamicSerializeElement + protected TCGStormType type = TCGStormType.UNKNOWN; - /** - * Empty default constructor - */ - public TropicalCycloneGuidance() { - } + /** + * Empty default constructor + */ + public TropicalCycloneGuidance() { + } - /** - * Construct an instance of this class using the supplied datauri. - * - * @param dataUri - */ - public TropicalCycloneGuidance(String dataUri) { - super(dataUri); - } + /** + * Construct an instance of this class using the supplied datauri. + * + * @param dataUri + */ + public TropicalCycloneGuidance(String dataUri) { + super(dataUri); + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - public String getModelName() { - return modelName; - } + public String getModelName() { + return modelName; + } - public void setModelName(String modelName) { - this.modelName = modelName; - } + public void setModelName(String modelName) { + this.modelName = modelName; + } - /** - * Set the data uri for this observation. - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } + /** + * Set the data uri for this observation. + * + * @param dataURI + */ + @Override + public void setDataURI(String dataURI) { + super.setDataURI(dataURI); + identifier = dataURI; + } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - public SurfaceObsLocation getLocation() { - return location; - } + public SurfaceObsLocation getLocation() { + return location; + } - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - public String getStormName() { - return stormName; - } + public String getStormName() { + return stormName; + } - public void setStormName(String stormName) { - this.stormName = stormName; - } + public void setStormName(String stormName) { + this.stormName = stormName; + } - public TCGStormType getType() { - return type; - } + public TCGStormType getType() { + return type; + } - public void setType(TCGStormType type) { - this.type = type; - } + public void setType(TCGStormType type) { + this.type = type; + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } - /** - * Get whether the location for this observation is defined. - * - * @return Is this location defined. - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Get whether the location for this observation is defined. + * + * @return Is this location defined. + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - public String getProductType() { - return productType; - } + public String getProductType() { + return productType; + } - public void setProductType(String productType) { - this.productType = productType; - } + public void setProductType(String productType) { + this.productType = productType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + Calendar c = getDataTime().getRefTimeAsCalendar(); + if (c != null) { + sb.append(String.format("TCG:%1$tY%1$tm%1$td%1$tH%1$tM", + getDataTime().getRefTimeAsCalendar())); + } else { + sb.append("TCG:YYYYMMDDHHmm"); + } + sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); + return sb.toString(); + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - Calendar c = getDataTime().getRefTimeAsCalendar(); - if (c != null) { - sb.append(String.format("TCG:%1$tY%1$tm%1$td%1$tH%1$tM", - getDataTime().getRefTimeAsCalendar())); - } else { - sb.append("TCG:YYYYMMDDHHmm"); - } - sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); - return sb.toString(); - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "tcg"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.tcs/src/com/raytheon/uf/common/dataplugin/tcs/TropicalCycloneSummary.java b/edexOsgi/com.raytheon.uf.common.dataplugin.tcs/src/com/raytheon/uf/common/dataplugin/tcs/TropicalCycloneSummary.java index d891f550e6..89ae09e699 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.tcs/src/com/raytheon/uf/common/dataplugin/tcs/TropicalCycloneSummary.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.tcs/src/com/raytheon/uf/common/dataplugin/tcs/TropicalCycloneSummary.java @@ -58,11 +58,13 @@ import com.vividsolutions.jts.geom.Geometry; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Nov 12, 2009 jsanchez Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Nov 12, 2009 jsanchez Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -76,272 +78,274 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "tcs", - indexes = { - @Index(name = "tcs_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "tcs", indexes = { @Index(name = "tcs_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class TropicalCycloneSummary extends PersistablePluginDataObject - implements ISpatialEnabled, IPointData { + implements ISpatialEnabled, IPointData { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - // Text of the WMO header - @Transient - @XmlElement - @DynamicSerializeElement - private String wmoHeader = ""; + // Text of the WMO header + @Transient + @XmlElement + @DynamicSerializeElement + private String wmoHeader = ""; - @XmlElement - @DynamicSerializeElement - @Column - @DataURI(position = 1) - protected String productType = ""; + @XmlElement + @DynamicSerializeElement + @Column + @DataURI(position = 1) + protected String productType = ""; - @Embedded - @DataURI(position = 2, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + @Embedded + @DataURI(position = 2, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - @XmlElement - @DynamicSerializeElement - @Transient - protected String name; + @XmlElement + @DynamicSerializeElement + @Transient + protected String name; - @XmlElement - @DynamicSerializeElement - @Transient - private boolean tropical; + @XmlElement + @DynamicSerializeElement + @Transient + private boolean tropical; - @XmlElement - @DynamicSerializeElement - @Transient - private String displayTime; + @XmlElement + @DynamicSerializeElement + @Transient + private String displayTime; - @XmlElement - @DynamicSerializeElement - @Transient - private int pressure; + @XmlElement + @DynamicSerializeElement + @Transient + private int pressure; - @XmlElement - @DynamicSerializeElement - @Transient - protected int windSpeed; + @XmlElement + @DynamicSerializeElement + @Transient + protected int windSpeed; - @XmlElement - @DynamicSerializeElement - @Transient - protected ArrayList radiusList; + @XmlElement + @DynamicSerializeElement + @Transient + protected ArrayList radiusList; - // @XmlElement - // @DynamicSerializeElement - // @Transient - // protected List windRadii; + // @XmlElement + // @DynamicSerializeElement + // @Transient + // protected List windRadii; - /** - * Empty default constructor - */ - public TropicalCycloneSummary() { - tropical = true; - windSpeed = 0; - displayTime = ""; - } + /** + * Empty default constructor + */ + public TropicalCycloneSummary() { + tropical = true; + windSpeed = 0; + displayTime = ""; + } - public TropicalCycloneSummary(String dataUri) { - super(dataUri); - tropical = true; - windSpeed = 0; - displayTime = ""; - } + public TropicalCycloneSummary(String dataUri) { + super(dataUri); + tropical = true; + windSpeed = 0; + displayTime = ""; + } - public TropicalCycloneSummary(String name, int pressure, double longitude, - double latitude, String displayTime, int wind, boolean tropical) { - this.name = name; - this.pressure = pressure; - location = new SurfaceObsLocation(name); - location.setLatitude(latitude); - location.setLongitude(longitude); - this.displayTime = displayTime; - this.windSpeed = wind; - this.tropical = tropical; - } + public TropicalCycloneSummary(String name, int pressure, double longitude, + double latitude, String displayTime, int wind, boolean tropical) { + this.name = name; + this.pressure = pressure; + location = new SurfaceObsLocation(name); + location.setLatitude(latitude); + location.setLongitude(longitude); + this.displayTime = displayTime; + this.windSpeed = wind; + this.tropical = tropical; + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * Set the data uri for this observation. - * - * @param dataURI - */ - @Override - public void setDataURI(String dataURI) { - super.setDataURI(dataURI); - identifier = dataURI; - } + /** + * Set the data uri for this observation. + * + * @param dataURI + */ + @Override + public void setDataURI(String dataURI) { + super.setDataURI(dataURI); + identifier = dataURI; + } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } - @Override - public PointDataView getPointDataView() { - return pointDataView; - } + @Override + public PointDataView getPointDataView() { + return pointDataView; + } - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - public String getProductType() { - return productType; - } + public String getProductType() { + return productType; + } - public void setProductType(String productType) { - this.productType = productType; - } + public void setProductType(String productType) { + this.productType = productType; + } - public String getName() { - return name; - } + public String getName() { + return name; + } - public void setName(String name) { - this.name = name; - } + public void setName(String name) { + this.name = name; + } - public int getPressure() { - return pressure; - } + public int getPressure() { + return pressure; + } - public void setPressure(int pressure) { - this.pressure = pressure; - } + public void setPressure(int pressure) { + this.pressure = pressure; + } - public SurfaceObsLocation getLocation() { - return location; - } + public SurfaceObsLocation getLocation() { + return location; + } - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - public boolean isTropical() { - return tropical; - } + public boolean isTropical() { + return tropical; + } - public void setTropical(boolean tropical) { - this.tropical = tropical; - } + public void setTropical(boolean tropical) { + this.tropical = tropical; + } - public String getDisplayTime() { - return displayTime; - } + public String getDisplayTime() { + return displayTime; + } - public void setDisplayTime(String displayTime) { - this.displayTime = displayTime; - } + public void setDisplayTime(String displayTime) { + this.displayTime = displayTime; + } - public int getWindSpeed() { - return windSpeed; - } + public int getWindSpeed() { + return windSpeed; + } - public void setWindSpeed(int windSpeed) { - this.windSpeed = windSpeed; - } + public void setWindSpeed(int windSpeed) { + this.windSpeed = windSpeed; + } - public ArrayList getRadiusList() { - return radiusList; - } + public ArrayList getRadiusList() { + return radiusList; + } - public void setRadiusList(ArrayList radiusList) { - this.radiusList = radiusList; - } + public void setRadiusList(ArrayList radiusList) { + this.radiusList = radiusList; + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - Calendar c = getDataTime().getRefTimeAsCalendar(); - if (c != null) { - sb.append(String.format("TCS:%1$tY%1$tm%1$td%1$tH%1$tM", - getDataTime().getRefTimeAsCalendar())); - } else { - sb.append("TCS:YYYYMMDDHHmm"); - } - sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); - return sb.toString(); - } + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + Calendar c = getDataTime().getRefTimeAsCalendar(); + if (c != null) { + sb.append(String.format("TCS:%1$tY%1$tm%1$td%1$tH%1$tM", + getDataTime().getRefTimeAsCalendar())); + } else { + sb.append("TCS:YYYYMMDDHHmm"); + } + sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude())); + return sb.toString(); + } + + public String print() { + String s = ""; + s += "Display Time = " + displayTime + "\n"; + s += location.getLatitude() + ", " + location.getLongitude() + "\n"; + s += "Wind Speed = " + windSpeed + "\n"; + if (radiusList != null) { + for (Radius r : radiusList) { + s += r + "\n"; + } + } + return s; + } - public String print() { - String s = ""; - s += "Display Time = " + displayTime + "\n"; - s += location.getLatitude() + ", " + location.getLongitude() + "\n"; - s += "Wind Speed = " + windSpeed + "\n"; - if (radiusList != null) { - for (Radius r : radiusList) { - s += r + "\n"; - } - } - return s; - } @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "tcs"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.vaa/src/com/raytheon/uf/common/dataplugin/vaa/VAARecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.vaa/src/com/raytheon/uf/common/dataplugin/vaa/VAARecord.java index 0bacb09b39..b3d62641c8 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.vaa/src/com/raytheon/uf/common/dataplugin/vaa/VAARecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.vaa/src/com/raytheon/uf/common/dataplugin/vaa/VAARecord.java @@ -22,9 +22,9 @@ package com.raytheon.uf.common.dataplugin.vaa; import java.util.HashSet; import java.util.Set; -import javax.persistence.CascadeType; import javax.persistence.Access; import javax.persistence.AccessType; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; @@ -58,11 +58,13 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Nov 4, 2009 jkorman Initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Nov 04, 2009 jkorman Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 07, 2013 1869 bsteffen Remove dataURI column from - + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * * PluginDataObject. * * @@ -71,7 +73,6 @@ import com.vividsolutions.jts.geom.Geometry; * @version 1.0 */ - @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "vaaseq") @Table(name = "vaa", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -79,20 +80,15 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "vaa", - indexes = { - @Index(name = "vaa_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "vaa", indexes = { @Index(name = "vaa_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class VAARecord extends PluginDataObject implements - ISpatialEnabled { - +public class VAARecord extends PluginDataObject implements ISpatialEnabled { + private static final long serialVersionUID = 1L; - + @Embedded @DataURI(position = 1, embedded = true) @XmlElement @@ -106,7 +102,7 @@ public class VAARecord extends PluginDataObject implements @DataURI(position = 2) @XmlElement @DynamicSerializeElement - private String recordType; + private String recordType; /** * @@ -115,8 +111,8 @@ public class VAARecord extends PluginDataObject implements @DataURI(position = 3) @XmlElement @DynamicSerializeElement - private String advisoryNumber; - + private String advisoryNumber; + // Correction indicator from wmo header @DataURI(position = 4) @Column(length = 8) @@ -135,7 +131,7 @@ public class VAARecord extends PluginDataObject implements @Column(length = 2048) @XmlElement @DynamicSerializeElement - private String message; + private String message; /** * @@ -143,7 +139,7 @@ public class VAARecord extends PluginDataObject implements @Column(length = 512) @XmlElement @DynamicSerializeElement - private String anal00Hr; + private String anal00Hr; /** * @@ -151,7 +147,7 @@ public class VAARecord extends PluginDataObject implements @Column(length = 512) @XmlElement @DynamicSerializeElement - private String fcst06Hr; + private String fcst06Hr; /** * @@ -159,7 +155,7 @@ public class VAARecord extends PluginDataObject implements @Column(length = 512) @XmlElement @DynamicSerializeElement - private String fcst12Hr; + private String fcst12Hr; /** * @@ -167,8 +163,8 @@ public class VAARecord extends PluginDataObject implements @Column(length = 512) @XmlElement @DynamicSerializeElement - private String fcst18Hr; - + private String fcst18Hr; + // Text of the WMO header @Column(length = 64) @XmlElement @@ -180,21 +176,21 @@ public class VAARecord extends PluginDataObject implements @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentId", fetch = FetchType.EAGER) private Set subParts = new HashSet(); - /** * Empty default constructor */ public VAARecord() { } - + /** * Construct an instance of this class using the supplied datauri. + * * @param dataUri */ public VAARecord(String dataUri) { super(dataUri); } - + /** * @return the corIndicator */ @@ -203,12 +199,13 @@ public class VAARecord extends PluginDataObject implements } /** - * @param corIndicator the corIndicator to set + * @param corIndicator + * the corIndicator to set */ public void setCorIndicator(String corIndicator) { this.corIndicator = corIndicator; } - + /** * @return the centerId */ @@ -217,7 +214,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param centerId the centerId to set + * @param centerId + * the centerId to set */ public void setCenterId(String centerId) { this.centerId = centerId; @@ -231,7 +229,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param wmoHeader the wmoHeader to set + * @param wmoHeader + * the wmoHeader to set */ public void setWmoHeader(String wmoHeader) { this.wmoHeader = wmoHeader; @@ -241,7 +240,7 @@ public class VAARecord extends PluginDataObject implements public IDecoderGettable getDecoderGettable() { return null; } - + @Override public SurfaceObsLocation getSpatialObject() { return location; @@ -254,7 +253,7 @@ public class VAARecord extends PluginDataObject implements public void setLocation(SurfaceObsLocation location) { this.location = location; } - + /** * Get this observation's geometry. * @@ -308,9 +307,7 @@ public class VAARecord extends PluginDataObject implements public Boolean getLocationDefined() { return location.getLocationDefined(); } - - - + /** * @return the recordType */ @@ -319,7 +316,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param recordType the recordType to set + * @param recordType + * the recordType to set */ public void setRecordType(String recordType) { this.recordType = recordType; @@ -333,7 +331,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param advisoryNumber the advisoryNumber to set + * @param advisoryNumber + * the advisoryNumber to set */ public void setAdvisoryNumber(String advisoryNumber) { this.advisoryNumber = advisoryNumber; @@ -347,7 +346,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param message the message to set + * @param message + * the message to set */ public void setMessage(String message) { this.message = message; @@ -361,7 +361,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param anal00Hr the anal00Hr to set + * @param anal00Hr + * the anal00Hr to set */ public void setAnal00Hr(String anal00Hr) { this.anal00Hr = anal00Hr; @@ -375,7 +376,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param fcst06Hr the fcst06Hr to set + * @param fcst06Hr + * the fcst06Hr to set */ public void setFcst06Hr(String fcst06Hr) { this.fcst06Hr = fcst06Hr; @@ -389,7 +391,8 @@ public class VAARecord extends PluginDataObject implements } /** - * @param fcst12Hr the fcst12Hr to set + * @param fcst12Hr + * the fcst12Hr to set */ public void setFcst12Hr(String fcst12Hr) { this.fcst12Hr = fcst12Hr; @@ -403,21 +406,21 @@ public class VAARecord extends PluginDataObject implements } /** - * @param fcst18Hr the fcst18Hr to set + * @param fcst18Hr + * the fcst18Hr to set */ public void setFcst18Hr(String fcst18Hr) { this.fcst18Hr = fcst18Hr; } public void addSubPart(VAASubPart part) { - if(subParts == null) { + if (subParts == null) { subParts = new HashSet(); } part.setParentId(this); subParts.add(part); } - - + /** * @return the subParts */ @@ -426,15 +429,16 @@ public class VAARecord extends PluginDataObject implements } /** - * @param subParts the subParts to set + * @param subParts + * the subParts to set */ public void setSubParts(Set subParts) { - for(VAASubPart p : subParts) { + for (VAASubPart p : subParts) { p.setParentId(this); } this.subParts = subParts; } - + /** * */ @@ -448,36 +452,35 @@ public class VAARecord extends PluginDataObject implements sb.append(","); sb.append(getLongitude()); sb.append("]"); - - + return sb.toString(); } - -// "\r\r\nVA ADVISORY" + -// "\r\r\nDTG: 20091104/1708Z" + -// "\r\r\nVAAC: WASHINGTON" + -// "\r\r\nVOLCANO: SOUFRIERE HILLS 1600-05" + -// "\r\r\nPSN: N1642 W06210" + -// "\r\r\nAREA: W_INDIES" + -// "\r\r\nSUMMIT ELEV: 3002 FT (915 M)" + -// "\r\r\nADVISORY NR: 2009/146" + -// "\r\r\nINFO SOURCE: GOES-12. GFS WINDS." + -// "\r\r\nERUPTION DETAILS: CONTINUOUS EMISSIONS" + -// "\r\r\nOBS VA DTG: 04/1645Z" + -// "\r\r\nOBS VA CLD: SFC/FL100 42NM WID LINE BTN N1638" + -// "\r\r\nW06611 - N1643 W06214. MOV W 7KT" + -// "\r\r\nFCST VA CLD +6HR: 04/2300Z SFC/FL100 40NM WID" + -// "\r\r\nLINE BTN N1640 W06614 - N1644 W06214." + -// "\r\r\nFCST VA CLD +12HR: 05/0500Z SFC/FL100 40NM WID" + -// "\r\r\nLINE BTN N1638 W06614 - N1643 W06214. SFC/FL100" + -// "\r\r\n40NM WID LINE BTN N1641 W06616 - N1643 W06214." + -// "\r\r\nFCST VA CLD +18HR: 05/1100Z" + -// "\r\r\nRMK: A SPREADING 42 NMI WIDE ASH PLUME MOVING AT" + -// "\r\r\nA MEASURED 7 KTS EXTENDS AT LEAST 211 NMI TO THE" + -// "\r\r\nWEST OF THE VOLCANO, OR TO ABOUT 66W. NO" + -// "\r\r\nSIGNIFICANT CHANGE IN DIRECTION OR SPEED IS" + -// "\r\r\nANTICIPATED DURING THE NEXT 12 HOURS. ...BALDWIN" + -// "\r\r\nNXT ADVISORY: WILL BE ISSUED BY 20091104/2315Z" + + + // "\r\r\nVA ADVISORY" + + // "\r\r\nDTG: 20091104/1708Z" + + // "\r\r\nVAAC: WASHINGTON" + + // "\r\r\nVOLCANO: SOUFRIERE HILLS 1600-05" + + // "\r\r\nPSN: N1642 W06210" + + // "\r\r\nAREA: W_INDIES" + + // "\r\r\nSUMMIT ELEV: 3002 FT (915 M)" + + // "\r\r\nADVISORY NR: 2009/146" + + // "\r\r\nINFO SOURCE: GOES-12. GFS WINDS." + + // "\r\r\nERUPTION DETAILS: CONTINUOUS EMISSIONS" + + // "\r\r\nOBS VA DTG: 04/1645Z" + + // "\r\r\nOBS VA CLD: SFC/FL100 42NM WID LINE BTN N1638" + + // "\r\r\nW06611 - N1643 W06214. MOV W 7KT" + + // "\r\r\nFCST VA CLD +6HR: 04/2300Z SFC/FL100 40NM WID" + + // "\r\r\nLINE BTN N1640 W06614 - N1644 W06214." + + // "\r\r\nFCST VA CLD +12HR: 05/0500Z SFC/FL100 40NM WID" + + // "\r\r\nLINE BTN N1638 W06614 - N1643 W06214. SFC/FL100" + + // "\r\r\n40NM WID LINE BTN N1641 W06616 - N1643 W06214." + + // "\r\r\nFCST VA CLD +18HR: 05/1100Z" + + // "\r\r\nRMK: A SPREADING 42 NMI WIDE ASH PLUME MOVING AT" + + // "\r\r\nA MEASURED 7 KTS EXTENDS AT LEAST 211 NMI TO THE" + + // "\r\r\nWEST OF THE VOLCANO, OR TO ABOUT 66W. NO" + + // "\r\r\nSIGNIFICANT CHANGE IN DIRECTION OR SPEED IS" + + // "\r\r\nANTICIPATED DURING THE NEXT 12 HOURS. ...BALDWIN" + + // "\r\r\nNXT ADVISORY: WILL BE ISSUED BY 20091104/2315Z" + @Override @Column @@ -485,4 +488,9 @@ public class VAARecord extends PluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "vaa"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.vil/src/com/raytheon/uf/common/dataplugin/vil/VILRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.vil/src/com/raytheon/uf/common/dataplugin/vil/VILRecord.java index 1fcf2e33ea..e190a15221 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.vil/src/com/raytheon/uf/common/dataplugin/vil/VILRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.vil/src/com/raytheon/uf/common/dataplugin/vil/VILRecord.java @@ -63,12 +63,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 1/14/09 2027 D. Hladky Initial release - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 #1293 bkowal Removed references to hdffileid. + * Jan 14, 2009 2027 D. Hladky Initial release + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @@ -82,17 +84,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "vil", - indexes = { - @Index(name = "vil_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "vil", indexes = { @Index(name = "vil_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class VILRecord extends PersistablePluginDataObject - implements ISpatialEnabled { +public class VILRecord extends PersistablePluginDataObject implements + ISpatialEnabled { private static final long serialVersionUID = 767763365671L; @@ -416,9 +414,9 @@ public class VILRecord extends PersistablePluginDataObject try { IDataRecord[] dataRec = dataStore.retrieve(getDataURI()); - for (int i = 0; i < dataRec.length; i++) { - if (dataRec[i] instanceof FloatDataRecord) { - setDataArray(((FloatDataRecord) dataRec[i]).getFloatData()); + for (IDataRecord element : dataRec) { + if (element instanceof FloatDataRecord) { + setDataArray(((FloatDataRecord) element).getFloatData()); } } } catch (Exception se) { @@ -493,4 +491,9 @@ public class VILRecord extends PersistablePluginDataObject public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "vil"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java index 795ac802e1..71837ff86a 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/AbstractWarningRecord.java @@ -55,7 +55,9 @@ import com.vividsolutions.jts.geom.Geometry; * table. * Jul 16, 2013 2181 bsteffen Convert geometry types to use hibernate- * spatial - * 08/08/2013 2243 jsanchez Removed super method in copy constructor. + * Aug 08, 2013 2243 jsanchez Removed super method in copy + * constructor. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author bwoodle @@ -249,7 +251,6 @@ public abstract class AbstractWarningRecord extends PluginDataObject { this.setMotspd(old.getMotspd()); this.setPil(old.getPil()); this.setPhensig(old.getPhensig()); - this.setPluginName(old.getPluginName()); this.setRawmessage(old.getRawmessage()); this.setSeg(old.getSeg()); this.setTraceId(old.getTraceId()); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/PracticeWarningRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/PracticeWarningRecord.java index b0c3ee50cf..e5d59797e7 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/PracticeWarningRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/PracticeWarningRecord.java @@ -41,13 +41,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 10/04/2011 10049 bgonzale initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime + * Oct 04, 2011 10049 bgonzale initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 02, 2013 1949 rjpeter Removed ugcZones. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * Aug 13, 2013 2253 mnash Fixed null data uri errors + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author bgonzale @@ -75,7 +77,6 @@ public class PracticeWarningRecord extends AbstractWarningRecord { */ public PracticeWarningRecord() { super(); - setPluginName("practicewarning"); } /** @@ -106,4 +107,9 @@ public class PracticeWarningRecord extends AbstractWarningRecord { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "practicewarning"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/WarningRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/WarningRecord.java index 0705416ce2..587f4d7ec7 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/WarningRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/WarningRecord.java @@ -44,13 +44,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 03/12/2007 1003 bwoodle initial creation - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime + * Mar 12, 2007 1003 bwoodle initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. * May 02, 2013 1949 rjpeter Removed ugcZones. * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * Aug 13, 2013 2253 mnash Fixed null data uri errors + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author bwoodle @@ -138,7 +140,6 @@ public class WarningRecord extends AbstractWarningRecord { */ public WarningRecord() { super(); - setPluginName("warning"); } /** @@ -169,4 +170,9 @@ public class WarningRecord extends AbstractWarningRecord { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "warning"; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java index 52f74e4406..b1a22cadd5 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java @@ -102,6 +102,7 @@ import com.raytheon.uf.common.time.DataTime; * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * May 16, 2013 1869 bsteffen Rewrite dataURI property mappings. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * */ @@ -123,12 +124,6 @@ public abstract class PluginDataObject extends PersistableDataObject implements @Id protected int id; - /** The name of the plugin this object is associated with */ - @Transient - @XmlAttribute - @DynamicSerializeElement - protected String pluginName; - /** The data time for this record */ @Embedded @XmlElement @@ -190,7 +185,7 @@ public abstract class PluginDataObject extends PersistableDataObject implements } public String getDataURI() { - if (dataURI == null && pluginName != null) { + if (dataURI == null) { try { this.dataURI = DataURIUtil.createDataURI(this); } catch (PluginException e) { @@ -230,13 +225,7 @@ public abstract class PluginDataObject extends PersistableDataObject implements this.messageData = messageData; } - public String getPluginName() { - return pluginName; - } - - public void setPluginName(String pluginName) { - this.pluginName = pluginName; - } + public abstract String getPluginName(); public void setDataTime(DataTime dataTime) { this.dataTime = dataTime; @@ -325,11 +314,13 @@ public abstract class PluginDataObject extends PersistableDataObject implements return false; } + String pluginName = getPluginName(); + String rhsPluginName = rhs.getPluginName(); if (pluginName == null) { - if (rhs.pluginName != null) { + if (rhsPluginName != null) { return false; } - } else if (!pluginName.equals(rhs.pluginName)) { + } else if (!pluginName.equals(rhsPluginName)) { return false; } @@ -340,14 +331,16 @@ public abstract class PluginDataObject extends PersistableDataObject implements public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + result = (prime * result) + ((dataTime == null) ? 0 : dataTime.hashCode()); - result = prime * result - + ((getDataURI() == null) ? 0 : dataURI.hashCode()); - result = prime * result + id; - result = prime * result + String dataUri = getDataURI(); + result = (prime * result) + + ((dataUri == null) ? 0 : dataURI.hashCode()); + result = (prime * result) + id; + result = (prime * result) + ((insertTime == null) ? 0 : insertTime.hashCode()); - result = prime * result + String pluginName = getPluginName(); + result = (prime * result) + ((pluginName == null) ? 0 : pluginName.hashCode()); return result; } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/annotations/DataURIUtil.java b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/annotations/DataURIUtil.java index 1c96cbf508..4878fba7dc 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/annotations/DataURIUtil.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/annotations/DataURIUtil.java @@ -54,6 +54,7 @@ import com.raytheon.uf.common.util.ConvertUtil; * from PluginDataObject * May 15, 2013 1869 bsteffen Move uri map creation from RecordFactory. * May 16, 2013 1869 bsteffen Rewrite dataURI property mappings. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -165,7 +166,7 @@ public class DataURIUtil { throws PluginException { List tokens = tokenizeURI(dataURI); Map dataMap = new HashMap( - (int) (tokens.size() / 0.75f + 1), 0.75f); + (int) ((tokens.size() / 0.75f) + 1), 0.75f); String pluginName = tokens.get(0); tokens = tokens.subList(1, tokens.size()); dataMap.put(PLUGIN_NAME_KEY, pluginName); @@ -246,7 +247,6 @@ public class DataURIUtil { */ public static void populatePluginDataObject(PluginDataObject pdo, Map dataMap) throws PluginException { - pdo.setPluginName(dataMap.get(PLUGIN_NAME_KEY).toString()); populateObject(pdo, dataMap); } @@ -275,7 +275,7 @@ public class DataURIUtil { throws PluginException { DataURIFieldAccess[] accessArray = getAccess(object.getClass()); Map dataMap = new HashMap( - (int) (accessArray.length / 0.75f + 2), 0.75f); + (int) ((accessArray.length / 0.75f) + 2), 0.75f); if (object instanceof PluginDataObject) { dataMap.put(PLUGIN_NAME_KEY, ((PluginDataObject) object).getPluginName()); @@ -316,7 +316,6 @@ public class DataURIUtil { */ private static void populatePluginDataObject(PluginDataObject pdo, List uriTokens) throws PluginException { - pdo.setPluginName(uriTokens.get(0)); uriTokens = uriTokens.subList(1, uriTokens.size()); DataURIFieldAccess[] access = getAccess(pdo.getClass()); for (int i = 0; i < access.length; i += 1) { @@ -471,7 +470,7 @@ public class DataURIUtil { throws PluginException { Object source = pdo; try { - for (int i = 0; i < fieldNames.length - 1; i += 1) { + for (int i = 0; i < (fieldNames.length - 1); i += 1) { Object obj = PropertyUtils.getProperty(source, fieldNames[i]); if (obj == null) { diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/handlers/DbQueryHandler.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/handlers/DbQueryHandler.java index e41bc25a6e..ec8d93c7f7 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/handlers/DbQueryHandler.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/handlers/DbQueryHandler.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataquery.db.QueryParam; import com.raytheon.uf.common.dataquery.db.QueryParam.QueryOperand; import com.raytheon.uf.common.dataquery.db.ReturnedField; @@ -49,8 +48,9 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 21, 2010 mschenke Initial creation + * Jan 21, 2010 mschenke Initial creation * Mar 19, 2013 1807 rferrel OrderBy now performed. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -179,10 +179,7 @@ public class DbQueryHandler implements IRequestHandler { if (row == null) { continue; } - if (fields == null || fields.size() == 0) { - if (row instanceof PluginDataObject) { - ((PluginDataObject) row).setPluginName(pluginName); - } + if ((fields == null) || (fields.size() == 0)) { objectMap.put(null, row); } else if (fields.size() == 1) { objectMap.put(fields.get(0).field, row); diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java index 8155bfd963..817736c896 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/plugin/PluginDao.java @@ -112,8 +112,10 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; * May 07, 2013 1869 bsteffen Remove dataURI column from * PluginDataObject. * May 16, 2013 1869 bsteffen Rewrite dataURI property mappings. - * Jun 11, 2013 2090 djohnson Separate the hdf5 purge by ref time for reuse. + * Jun 11, 2013 2090 djohnson Separate the hdf5 purge by ref time for + * reuse. * Jun 11, 2013 2092 bclement Added purge results + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -362,8 +364,8 @@ public abstract class PluginDao extends CoreDao { Boolean hasDataURIColumn = pluginDataURIColumn.get(pdoClazz); if (!Boolean.FALSE.equals(hasDataURIColumn)) { try { - getSessionFactory().getClassMetadata(pdoClazz) - .getPropertyType("dataURI"); + getSessionFactory().getClassMetadata(pdoClazz).getPropertyType( + "dataURI"); criteria.add(Restrictions.eq("dataURI", pdo.getDataURI())); return; } catch (QueryException e) { @@ -635,7 +637,6 @@ public abstract class PluginDao extends CoreDao { throws PluginException { PluginDataObject[] queryResults = getMetadata(query); for (PluginDataObject obj : queryResults) { - obj.setPluginName(pluginName); obj.setMessageData(getHDF5Data(obj, tile)); } return queryResults; @@ -793,8 +794,7 @@ public abstract class PluginDao extends CoreDao { * @throws DataAccessLayerException */ protected RuleResult purgeExpiredKey(PurgeRuleSet ruleSet, - String[] purgeKeys) - throws DataAccessLayerException { + String[] purgeKeys) throws DataAccessLayerException { List rules = ruleSet.getRuleForKeys(purgeKeys); if (rules == null) { @@ -888,7 +888,7 @@ public abstract class PluginDao extends CoreDao { long dateTimeAsLong = timeToCompare.getTime(); if (rule.isDeltaTimeMultiple()) { - if (dateTimeAsLong % delta == 0) { + if ((dateTimeAsLong % delta) == 0) { // If the versions to keep is zero we keep it if // it does not exceed the period specified, if // any @@ -1662,7 +1662,8 @@ public abstract class PluginDao extends CoreDao { } private Date roundDateToHour(Date dateToRound) { - return new Date(dateToRound.getTime() - dateToRound.getTime() % 3600000); + return new Date(dateToRound.getTime() + - (dateToRound.getTime() % 3600000)); } /** @@ -1806,7 +1807,7 @@ public abstract class PluginDao extends CoreDao { // remove .h5 int index = path.lastIndexOf('.'); - if ((index > 0) && (path.length() - index < 5)) { + if ((index > 0) && ((path.length() - index) < 5)) { // ensure its end of string in case extension is // dropped/changed path = path.substring(0, index); @@ -1870,7 +1871,7 @@ public abstract class PluginDao extends CoreDao { } protected void updateRate(float rate) { - cumulativeRate = (rate + cumulativeRate * total) / (total + 1); + cumulativeRate = (rate + (cumulativeRate * total)) / (total + 1); duplicateCheck = cumulativeRate < DUPLICATE_CHECK_THRESHOLD; if (total < DUPLICATE_MEMORY) { diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/ResponseProcessingUtilities.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/ResponseProcessingUtilities.java index 22c66bd081..e145ca8280 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/ResponseProcessingUtilities.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.retrieval/src/com/raytheon/uf/edex/datadelivery/retrieval/util/ResponseProcessingUtilities.java @@ -46,9 +46,12 @@ import com.raytheon.uf.common.time.DataTime; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jan 07, 2011 dhladky Initial creation - * Aug 20, 2012 0743 djohnson Fix cache lookup to use the model name and not hashcode. - * Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry objects. - * Jan 30, 2013 1543 djohnson Log exception stacktrace. + * Aug 20, 2012 0743 djohnson Fix cache lookup to use the model name + * and not hashcode. + * Nov 19, 2012 1166 djohnson Clean up JAXB representation of registry + * objects. + * Jan 30, 2013 1543 djohnson Log exception stacktrace. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -62,8 +65,7 @@ public class ResponseProcessingUtilities { .getHandler(ResponseProcessingUtilities.class); public static GridRecord getGridRecord(String name, Parameter parm, - Level level, String ensembleId, - GridCoverage gridCoverage) { + Level level, String ensembleId, GridCoverage gridCoverage) { com.raytheon.uf.common.parameter.Parameter parameter = new com.raytheon.uf.common.parameter.Parameter(); parameter.setAbbreviation(parm.getName()); @@ -71,7 +73,6 @@ public class ResponseProcessingUtilities { parameter.setUnitString(parm.getUnits()); GridRecord record = new GridRecord(); - record.setPluginName("grid"); record.setLocation(gridCoverage); record.setLevel(level); record.setParameter(parameter); @@ -160,8 +161,8 @@ public class ResponseProcessingUtilities { for (int index = startLevel; index <= endLevel; index++) { double levelOneValue = plevels.getLevelAt(index); - String masterLevelName = LevelType - .getLevelTypeIdName(plevels.getLevelType()); + String masterLevelName = LevelType.getLevelTypeIdName(plevels + .getLevelType()); MasterLevel masterLevel = LevelFactory.getInstance() .getMasterLevel(masterLevelName); Level level = LevelFactory.getInstance().getLevel( diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java index efd6eb6d43..10ad340aad 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/PluginDataObjectFilter.java @@ -21,16 +21,13 @@ package com.raytheon.uf.edex.decodertools.core.filterimpl; import static com.raytheon.uf.common.localization.LocalizationContext.LocalizationType.EDEX_STATIC; -import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; -import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @@ -44,8 +41,8 @@ import com.raytheon.uf.common.geospatial.ISpatialEnabled; import com.raytheon.uf.common.geospatial.ISpatialObject; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; -import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; +import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -59,6 +56,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 16, 2009 jkorman Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -73,10 +71,10 @@ public class PluginDataObjectFilter extends AbstractObsFilter { private static final String ERROR_1_FMT = "Could not create {%s} context for file \"%s\""; private static final String ERROR_2_FMT = "File %s does not exist"; - + public static final String FILTERS_DIR = "plugin-filters"; - - private Log logger = LogFactory.getLog(getClass()); + + private final Log logger = LogFactory.getLog(getClass()); private String filterConfigFile = null; @@ -87,11 +85,12 @@ public class PluginDataObjectFilter extends AbstractObsFilter { filterConfigFile = configFile; try { File filterDir = null; - + IPathManager manager = PathManagerFactory.getPathManager(); - if(manager != null) { - LocalizationContext context = manager.getContext(EDEX_STATIC, LocalizationLevel.valueOf(localContext)); - if(context != null) { + if (manager != null) { + LocalizationContext context = manager.getContext(EDEX_STATIC, + LocalizationLevel.valueOf(localContext)); + if (context != null) { filterDir = manager.getFile(context, FILTERS_DIR); if (filterDir.exists()) { File srcFile = new File(filterDir, filterConfigFile); @@ -111,22 +110,24 @@ public class PluginDataObjectFilter extends AbstractObsFilter { } catch (IOException e) { logger.error("Unable to read filter config", e); } catch (JAXBException e) { - logger.error("Unable to unmarshall filter config", e); + logger.error("Unable to unmarshall filter config", + e); } } else { - logger.error(String.format(ERROR_2_FMT,filterDir.getPath())); + logger.error(String.format(ERROR_2_FMT, + filterDir.getPath())); createDummyFilter(); } } else { - logger.error(String.format(ERROR_1_FMT, localContext,configFile)); + logger.error(String.format(ERROR_1_FMT, localContext, + configFile)); createDummyFilter(); } } else { // Could not create PathManager } } catch (Exception e) { - logger.error( - "Error creating filter.", e); + logger.error("Error creating filter.", e); createDummyFilter(); } logger.info("Filter name = " + getFilterName()); @@ -144,24 +145,27 @@ public class PluginDataObjectFilter extends AbstractObsFilter { int reportCount = 0; if (reports != null) { - for (int i = 0; i < reports.length; i++) { PluginDataObject r = null; boolean keep = true; for (AbstractFilterElement element : filterElements) { r = element.filter(reports[i]); - - // Only allow keep to be set to true. Once true it stays that way. - if(AbstractObsFilter.INCLUDE_TYPE.equals(element.getFilterType())) { + + // Only allow keep to be set to true. Once true it stays + // that way. + if (AbstractObsFilter.INCLUDE_TYPE.equals(element + .getFilterType())) { // Did the filter pass? - if(r == null) { - // If we fail an element, exit now. + if (r == null) { + // If we fail an element, exit now. keep = false; break; } - } else if(AbstractObsFilter.EXCLUDE_TYPE.equals(element.getFilterType())) { - if(r != null) { - // There was a match, so we want to remove this item. + } else if (AbstractObsFilter.EXCLUDE_TYPE.equals(element + .getFilterType())) { + if (r != null) { + // There was a match, so we want to remove this + // item. keep = false; // And there's no reason for further checks. break; @@ -220,30 +224,37 @@ public class PluginDataObjectFilter extends AbstractObsFilter { return fis; } - private static class TestObject extends PluginDataObject implements ISpatialEnabled { + private static class TestObject extends PluginDataObject implements + ISpatialEnabled { private static final long serialVersionUID = 1L; SurfaceObsLocation location; - + @Override public IDecoderGettable getDecoderGettable() { return null; } - + @Override public ISpatialObject getSpatialObject() { return location; } - + + @Override public String toString() { return location.getStationId() + " Passed"; } + + @Override + public String getPluginName() { + return "test"; + } } - - public static final void main(String [] args) { - - RadiusFilterElement element = new RadiusFilterElement(0,0,60); + + public static final void main(String[] args) { + + RadiusFilterElement element = new RadiusFilterElement(0, 0, 60); element.setFilterType("INCLUDE"); TestObject p = new TestObject(); @@ -257,26 +268,26 @@ public class PluginDataObjectFilter extends AbstractObsFilter { p.location.assignLocation(.7, .7); p = (TestObject) element.filter(p); System.out.println((p == null) ? "failed" : p); - + // Southeast corner of OAX WFO - element = new RadiusFilterElement(40,-94.90,100); + element = new RadiusFilterElement(40, -94.90, 100); element.setFilterType("INCLUDE"); p = new TestObject(); p.location = new SurfaceObsLocation("2.1"); - p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W + p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W p = (TestObject) element.filter(p); System.out.println((p == null) ? p : "failed"); p = new TestObject(); p.location = new SurfaceObsLocation("2.2"); - p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W + p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W p = (TestObject) element.filter(p); System.out.println((p != null) ? p : "failed"); - + // Test set 3 PluginDataObjectFilter filter = new PluginDataObjectFilter(); - element = new RadiusFilterElement(40,-94.90,100); + element = new RadiusFilterElement(40, -94.90, 100); element.setFilterType("INCLUDE"); filter.addFilterElement(element); @@ -288,55 +299,55 @@ public class PluginDataObjectFilter extends AbstractObsFilter { e.setLowerRightLon(-94.90); e.setFilterType("INCLUDE"); filter.addFilterElement(e); - - PluginDataObject [] pp = new PluginDataObject [3]; + + PluginDataObject[] pp = new PluginDataObject[3]; p = new TestObject(); p.location = new SurfaceObsLocation("KSLN"); - p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W + p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W pp[0] = p; p = new TestObject(); p.location = new SurfaceObsLocation("KMHK"); - p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W + p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W pp[1] = p; p = new TestObject(); p.location = new SurfaceObsLocation("KSTJ"); p.location.assignLocation(41, -96.00); pp[2] = p; - + pp = filter.filter(pp); - + System.out.println("----------------------------------"); System.out.println("- Success = KSTJ"); System.out.println("----------"); - for(PluginDataObject o : pp) { + for (PluginDataObject o : pp) { System.out.println(o); } - + // Test set 4 - pp = new PluginDataObject [4]; + pp = new PluginDataObject[4]; p = new TestObject(); p.location = new SurfaceObsLocation("KORD"); - p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W + p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W pp[0] = p; - + p = new TestObject(); p.location = new SurfaceObsLocation("KSLN"); - p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W + p.location.assignLocation(38.78, -97.65); // KSLN 38 47N 097 39W pp[1] = p; p = new TestObject(); p.location = new SurfaceObsLocation("KMHK"); - p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W + p.location.assignLocation(39.13, -96.68); // KMHK 39 08N 096 41W pp[2] = p; p = new TestObject(); p.location = new SurfaceObsLocation("KSTJ"); p.location.assignLocation(41, -96.00); pp[3] = p; - + filter = new PluginDataObjectFilter(); StationIdFilterElement s = new StationIdFilterElement(); @@ -345,10 +356,10 @@ public class PluginDataObjectFilter extends AbstractObsFilter { s.setFilterType(INCLUDE_TYPE); filter.addFilterElement(s); -// s = new StationIdFilterElement(); -// s.addPattern("KM[HIJ]K"); -// s.setFilterType(EXCLUDE_TYPE); -// filter.addFilterElement(s); + // s = new StationIdFilterElement(); + // s.addPattern("KM[HIJ]K"); + // s.setFilterType(EXCLUDE_TYPE); + // filter.addFilterElement(s); e = new RectFilterElement(); e.setUpperLeftLat(42.90); @@ -359,36 +370,14 @@ public class PluginDataObjectFilter extends AbstractObsFilter { e.setFilterType("INCLUDE"); filter.addFilterElement(e); - - - - pp = filter.filter(pp); - + System.out.println("----------------------------------"); System.out.println("- Success = KSLN, KSTJ"); System.out.println("----------"); - for(PluginDataObject o : pp) { + for (PluginDataObject o : pp) { System.out.println(o); } System.out.println("----------------------------------"); - - -// try { -// JAXBContext ctx = JAXBContext.newInstance(PluginDataObjectFilter.class,StationIdFilterElement.class); -// -// Marshaller msh = ctx.createMarshaller(); -// -// msh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); -// -// ByteArrayOutputStream istrm = new ByteArrayOutputStream(); -// msh.marshal(filter, istrm); -// -// String ss = istrm.toString(); -// -// System.out.println(ss); -// } catch(Exception ee) { -// ee.printStackTrace(); -// } } } diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/WMOHeaderFilterElement.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/WMOHeaderFilterElement.java index b88f813c0e..cd337e1be3 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/WMOHeaderFilterElement.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/filterimpl/WMOHeaderFilterElement.java @@ -30,11 +30,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; -import com.raytheon.uf.common.geospatial.ISpatialEnabled; -import com.raytheon.uf.common.geospatial.ISpatialObject; -import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -42,23 +38,25 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Oct 25, 2011 11312      jkorman     Initial creation
- *
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class WMOHeaderFilterElement extends AbstractFilterElement implements ISerializableObject { - - private static final Class [] GETTER_CLASS = new Class [0]; +public class WMOHeaderFilterElement extends AbstractFilterElement implements + ISerializableObject { + + private static final Class[] GETTER_CLASS = new Class[0]; private static final String WMO_HEADER = "getWmoHeader"; @@ -69,7 +67,7 @@ public class WMOHeaderFilterElement extends AbstractFilterElement implements ISe public WMOHeaderFilterElement() { super(); } - + /** * @return the patterns */ @@ -78,7 +76,8 @@ public class WMOHeaderFilterElement extends AbstractFilterElement implements ISe } /** - * @param patterns the patterns to set + * @param patterns + * the patterns to set */ public void setPatterns(List patterns) { this.patterns = patterns; @@ -89,7 +88,7 @@ public class WMOHeaderFilterElement extends AbstractFilterElement implements ISe * @param pattern */ public void addPattern(Pattern pattern) { - if(patterns == null) { + if (patterns == null) { patterns = new ArrayList(); } patterns.add(pattern); @@ -100,26 +99,27 @@ public class WMOHeaderFilterElement extends AbstractFilterElement implements ISe * @param pattern */ public void addPattern(String pattern) { - if(pattern != null) { + if (pattern != null) { addPattern(Pattern.compile(pattern)); } } /** * This execute + * * @see com.raytheon.uf.edex.decodertools.core.IObsFilterElement#filter(com.raytheon.uf.common.dataplugin.PluginDataObject) */ @Override public PluginDataObject filter(PluginDataObject report) { boolean pass = false; - if(report != null) { + if (report != null) { String wmoHeader = getWMOHeader(report); - - if(wmoHeader != null) { - for(Pattern p : patterns) { - if(p != null) { + + if (wmoHeader != null) { + for (Pattern p : patterns) { + if (p != null) { Matcher m = p.matcher(wmoHeader); - if(m.matches()) { + if (m.matches()) { pass = true; break; } @@ -127,105 +127,48 @@ public class WMOHeaderFilterElement extends AbstractFilterElement implements ISe } } } - return (pass ? report : null) ; + return (pass ? report : null); } /** - * Get the WMO header from this report object. If an error occurs or the - * WMO header is not defined, a null String reference is returned. + * Get the WMO header from this report object. If an error occurs or the WMO + * header is not defined, a null String reference is returned. + * * @param report * @return */ private String getWMOHeader(PluginDataObject report) { - + String header = null; - if(report != null) { + if (report != null) { Method getter = null; try { getter = report.getClass().getMethod(WMO_HEADER, GETTER_CLASS); } catch (Exception e) { // Nothing } - if(getter != null) { + if (getter != null) { try { header = (String) getter.invoke(report); - } catch(Exception e) { + } catch (Exception e) { // Nothing } } } return header; } - + /** * */ @Override public String toString() { StringBuilder sb = new StringBuilder("WMOHeaderFilterElement:{"); - for(Pattern p : patterns) { + for (Pattern p : patterns) { sb.append(p.pattern()); sb.append(","); } sb.append("}"); return sb.toString(); } - - private static class TestObject extends PluginDataObject implements ISpatialEnabled { - private static final long serialVersionUID = 1L; - - String wmoHeader = null; - - SurfaceObsLocation location; - - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - - @Override - public ISpatialObject getSpatialObject() { - return location; - } - - public String getWmoHeader() { - return wmoHeader; - } - - public void setWmoHeader(String header) { - wmoHeader = header; - } - - public String toString() { - return wmoHeader + " Passed"; - } - - } - - public static final void main(String [] args) { - - PluginDataObjectFilter filter = new PluginDataObjectFilter(); - WMOHeaderFilterElement element = new WMOHeaderFilterElement(); - element.setFilterElementName(""); - element.setFilterType(AbstractObsFilter.EXCLUDE_TYPE); - element.addPattern(Pattern.compile("SAUS70.*")); - filter.addFilterElement(element); - - TestObject t = new TestObject(); - System.out.println("---- Test 1 -----"); - PluginDataObject [] pp = new TestObject[] { t, }; - t.setWmoHeader("SAUS43 KWBC 251300"); - pp = filter.filter(pp); - for(PluginDataObject p : pp) { - System.out.println(p); - } - - System.out.println("---- Test 2 -----"); - t.setWmoHeader("SAUS70 KWBC 251410 RRA"); - pp = new TestObject[] { t, }; - pp = filter.filter(pp); - for(PluginDataObject p : pp) { - System.out.println(p); - } - } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/dao/ACARSDao.java b/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/dao/ACARSDao.java index 3e81fd1a43..76e680fc13 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/dao/ACARSDao.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/dao/ACARSDao.java @@ -41,9 +41,10 @@ import com.raytheon.uf.edex.database.DataAccessLayerException; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 21, 2009 1939 jkorman Initial creation + * Jan 21, 2009 1939 jkorman Initial creation * Oct 10, 2012 1261 djohnson Add some generics wildcarding. * Nov 02, 2012 1302 djohnson Add Javadoc. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -201,7 +202,6 @@ public class ACARSDao extends DefaultPluginDao { retData = new ArrayList(); for (Object o : result) { ACARSRecord r = (ACARSRecord) o; - r.setPluginName(pluginName); retData.add(r); } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/decoder/ACARSDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/decoder/ACARSDataAdapter.java index 07def435a6..ba9180c769 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/decoder/ACARSDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.acars/src/com/raytheon/uf/edex/plugin/acars/decoder/ACARSDataAdapter.java @@ -52,7 +52,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 22, 2009 1939 jkorman Initial creation + * Jan 22, 2009 1939 jkorman Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -72,13 +73,13 @@ public class ACARSDataAdapter { private static final int SECOND_OFFSET = 5; - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); // Map detailed flight phase [0-08-009] to flight phase [0-08-004] private static final int[] DETAIL_PHASE_MAP = { 3, 4, 2, 3, 4, 5, 6, 5, 5, 5, 5, 6, 6, 6, 6, 7, }; - private String pluginName; + private final String pluginName; private String traceId = null; @@ -115,7 +116,6 @@ public class ACARSDataAdapter { ACARSRecord record = getDataRecord(parser.next()); if (record != null) { record.setWmoHeader(parser.getWmoHeader().getWmoHeader()); - record.setPluginName(pluginName); try { record.constructDataURI(); @@ -333,14 +333,13 @@ public class ACARSDataAdapter { } } } - if(rpt != null) { - if(rpt.getFlightLevel() == null) { - logger.error(traceId - + " -No aircraft flight level was found"); + if (rpt != null) { + if (rpt.getFlightLevel() == null) { + logger.error(traceId + " -No aircraft flight level was found"); rpt = null; } } - + return rpt; } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/src/com/raytheon/uf/edex/plugin/acarssounding/tools/SoundingBuilder.java b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/src/com/raytheon/uf/edex/plugin/acarssounding/tools/SoundingBuilder.java index 29aa287239..525372b6d6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/src/com/raytheon/uf/edex/plugin/acarssounding/tools/SoundingBuilder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/src/com/raytheon/uf/edex/plugin/acarssounding/tools/SoundingBuilder.java @@ -55,6 +55,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Apr 16, 2009 jkorman Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -64,11 +65,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; public class SoundingBuilder { - private Log logger = LogFactory.getLog(getClass()); - - private String pluginName = ACARSSoundingTools.ACARS_SNDG_PLUGIN_NAME; - - private String acarsPluginName = ACARSSoundingTools.ACARS_PLUGIN_NAME; + private final Log logger = LogFactory.getLog(getClass()); File dataDir = null; @@ -237,7 +234,6 @@ public class SoundingBuilder { loc.setElevation(airport.getElevation().intValue()); sounding.setLocation(loc); sounding.setTailNumber(data.getTailNumber()); - sounding.setPluginName(pluginName); try { sounding.constructDataURI(); @@ -288,8 +284,9 @@ public class SoundingBuilder { // If we find an obs with the same time as one in // the sounding, get rid of it. if (layer.getTimeObs().equals(r.getTimeObs())) { - if(logger.isDebugEnabled()) { - logger.debug("Deleting duplicate layer" + r.getDataURI()); + if (logger.isDebugEnabled()) { + logger.debug("Deleting duplicate layer" + + r.getDataURI()); } obs.remove(cRec); incNext = false; @@ -298,8 +295,10 @@ public class SoundingBuilder { // Is the obs time between the current // layers? If so we want to find out if // it needs to be included. - if(ACARSSoundingTools.checkBetween(lastLayer,r,layer)) { - logger.info("Found candidate layer" + r.getDataURI()); + if (ACARSSoundingTools.checkBetween( + lastLayer, r, layer)) { + logger.info("Found candidate layer" + + r.getDataURI()); obs.remove(cRec); incNext = false; } else { @@ -319,7 +318,6 @@ public class SoundingBuilder { } } - /** * Returns a sorted not-null list of layers that are contained in a set of * layers. @@ -395,12 +393,10 @@ public class SoundingBuilder { currTime.add(lastRec); for (int i = 1; i < obsData.size(); i++) { ACARSRecord r = obsData.get(i); - if(r != null) { - r.setPluginName(acarsPluginName); - + if (r != null) { // Do the observations have the same time? - if (ACARSSoundingTools.ACARS_TIME_COMPARATOR - .compare(lastRec, r) != 0) { + if (ACARSSoundingTools.ACARS_TIME_COMPARATOR.compare( + lastRec, r) != 0) { // Different times, so create a new list currTime = new ArrayList(); times.add(currTime); @@ -516,10 +512,4 @@ public class SoundingBuilder { } return retValue; } - - - public static final void main(String[] args) { - - } - } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/src/com/raytheon/uf/edex/plugin/bufrascat/decoder/AScatDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/src/com/raytheon/uf/edex/plugin/bufrascat/decoder/AScatDataAdapter.java index 292a81bb32..c400b70369 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/src/com/raytheon/uf/edex/plugin/bufrascat/decoder/AScatDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrascat/src/com/raytheon/uf/edex/plugin/bufrascat/decoder/AScatDataAdapter.java @@ -48,6 +48,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * Mar 03, 2008 969 jkorman Initial implementation. * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -118,7 +119,6 @@ public class AScatDataAdapter extends BUFRPointDataAdapter { obsData = getHeaderData(dataList); if (obsData != null) { // pickup the data. - obsData.setPluginName(getPluginName()); obsData.setWmoHeader(wmoHeader.getWmoHeader()); PointDataContainer container = getContainer(obsData); if (container != null) { diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/src/com/raytheon/uf/edex/plugin/bufrhdw/decoder/HDWDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/src/com/raytheon/uf/edex/plugin/bufrhdw/decoder/HDWDataAdapter.java index efb4b7fa05..9d5263b4dc 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/src/com/raytheon/uf/edex/plugin/bufrhdw/decoder/HDWDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrhdw/src/com/raytheon/uf/edex/plugin/bufrhdw/decoder/HDWDataAdapter.java @@ -49,6 +49,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * Mar 03, 2008 969 jkorman Initial implementation. * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -105,7 +106,6 @@ public class HDWDataAdapter extends BUFRPointDataAdapter { if ((obsData = getHeaderData(dataList)) != null) { // Need to set plugin name before getting container! obsData.setWmoHeader(wmoHeader.getWmoHeader()); - obsData.setPluginName(getPluginName()); obsData = getPointData(obsData, dataList); } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/src/com/raytheon/uf/edex/plugin/bufrmthdw/decoder/MTHDWDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/src/com/raytheon/uf/edex/plugin/bufrmthdw/decoder/MTHDWDataAdapter.java index d8cc115695..eff6e8765e 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/src/com/raytheon/uf/edex/plugin/bufrmthdw/decoder/MTHDWDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrmthdw/src/com/raytheon/uf/edex/plugin/bufrmthdw/decoder/MTHDWDataAdapter.java @@ -50,6 +50,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * Jul 26, 2010 jkorman Initial creation * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -107,7 +108,6 @@ public class MTHDWDataAdapter extends BUFRPointDataAdapter { if ((obsData = getHeaderData(dataList)) != null) { // Need to set plugin name before getting container! obsData.setWmoHeader(wmoHeader.getWmoHeader()); - obsData.setPluginName(getPluginName()); obsData = getPointData(obsData, dataList); } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/src/com/raytheon/uf/edex/plugin/bufrncwf/decoder/BUFRncwfDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/src/com/raytheon/uf/edex/plugin/bufrncwf/decoder/BUFRncwfDataAdapter.java index eebfcdbbc6..c31dd22356 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/src/com/raytheon/uf/edex/plugin/bufrncwf/decoder/BUFRncwfDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrncwf/src/com/raytheon/uf/edex/plugin/bufrncwf/decoder/BUFRncwfDataAdapter.java @@ -55,6 +55,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 17, 2009 jkorman Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -64,281 +65,295 @@ import com.vividsolutions.jts.geom.Coordinate; public class BUFRncwfDataAdapter extends BUFRPointDataAdapter { - // Position within sub-list - private static final int YEAR_POS = 0; - private static final int MONTH_POS = 1; - private static final int DAY_POS = 2; - private static final int HOUR_POS = 3; - private static final int MINUTE_POS = 4; - private static final int SECOND_POS = 5; + // Position within sub-list + private static final int YEAR_POS = 0; - private static final int FEATURES_POS = 6; + private static final int MONTH_POS = 1; - private static final int FEATURE_TIMSIG_POS = 0; - private static final int FEATURE_TIMEPD_POS = 1; - private static final int FEATURE_ATTSIG_POS = 2; - private static final int FEATURE_DIMSIG_POS = 3; - private static final int FEATURE_LAT_POS = 4; - private static final int FEATURE_LON_POS = 5; - private static final int BOUNDARY_ATTSIG_POS = 6; - private static final int BOUNDARY_DIMSIG_POS = 7; - private static final int BOUNDARY_SUBLIST_POS = 8; + private static final int DAY_POS = 2; - private static final int VERTEX_LAT_POS = 0; - private static final int VERTEX_LON_POS = 1; + private static final int HOUR_POS = 3; - private static final int STORM_TOP_POS = 7; - private static final int STORM_DIR_POS = 8; - private static final int STORM_SPD_POS = 9; + private static final int MINUTE_POS = 4; - private static final int INVALID = -9999; + private static final int SECOND_POS = 5; - /** - * - * @param pdd - * @param dao - * @param pluginName - */ - public BUFRncwfDataAdapter(PointDataDescription pdd, - PointDataPluginDao dao, String pluginName) { - super(pdd, dao, pluginName); - } + private static final int FEATURES_POS = 6; - /** - * Not used. - * - * @see com.raytheon.uf.edex.bufrtools.BUFRPointDataAdapter#createData(java.util.Iterator, - * com.raytheon.uf.edex.wmo.message.WMOHeader) - */ - @Override - public BUFRncwf createData(Iterator iterator, - WMOHeader wmoHeader) { - return null; - } + private static final int FEATURE_TIMSIG_POS = 0; - /** - * - * - * - * - * @see com.raytheon.uf.edex.bufrtools.BUFRPointDataAdapter#createDataList(java.util.Iterator, - * com.raytheon.uf.edex.wmo.message.WMOHeader) - */ - @Override - public List createDataList(Iterator iterator, - WMOHeader wmoHeader) { + private static final int FEATURE_TIMEPD_POS = 1; - List reports = new ArrayList(); + private static final int FEATURE_ATTSIG_POS = 2; - BUFRDataDocument dataDoc = iterator.next(); - if (dataDoc != null) { - // Get the primary data list. - List dataList = dataDoc.getList(); - for (IBUFRDataPacket p : dataList) { - if (p != null) { - List sList = getPacketSubList(p); - for (IBUFRDataPacket pp : sList) { - BUFRncwf ncwfReport = getReport(pp); + private static final int FEATURE_DIMSIG_POS = 3; - if (ncwfReport != null) { - ncwfReport.setPluginName(getPluginName()); + private static final int FEATURE_LAT_POS = 4; - PointDataContainer container = getContainer(ncwfReport); - if (container != null) { - PointDataView view = container.append(); + private static final int FEATURE_LON_POS = 5; - long vt = ncwfReport.getDataTime() - .getValidTime().getTimeInMillis(); - view.setLong("validTime", vt); + private static final int BOUNDARY_ATTSIG_POS = 6; - view.setFloat("storm_top", ncwfReport - .getStormTop().floatValue()); - view.setFloat("storm_dir", ncwfReport - .getStormDir().floatValue()); - view.setFloat("storm_speed", ncwfReport - .getStormSpeed().floatValue()); + private static final int BOUNDARY_DIMSIG_POS = 7; - NCWFFeature detect = ncwfReport.getDetection(); - view.setFloat("or_centroid_lat", - (float) detect.getCentroidLatitude()); - view.setFloat("or_centroid_lon", - (float) detect.getCentroidLongitude()); - int pos = 0; - for (Coordinate dc : detect - .getFeatureBoundary()) { - float lat = (float) DecoderTools - .getCoordinateLatitude(dc); - float lon = (float) DecoderTools - .getCoordinateLongitude(dc); - view.setFloat("oalat", lat, pos); - view.setFloat("oalon", lon, pos++); - } - view.setInt("or_num_of_vertices", pos); - NCWFFeature forecast = ncwfReport.getForecast(); - view.setFloat("centroid_lat", - (float) forecast.getCentroidLatitude()); - view.setFloat("centroid_lon", - (float) forecast.getCentroidLongitude()); - pos = 0; - for (Coordinate dc : forecast - .getFeatureBoundary()) { - float lat = (float) DecoderTools - .getCoordinateLatitude(dc); - float lon = (float) DecoderTools - .getCoordinateLongitude(dc); - view.setFloat("alat", lat, pos); - view.setFloat("alon", lon, pos++); - } - view.setInt("num_of_vertices", pos); + private static final int BOUNDARY_SUBLIST_POS = 8; - ncwfReport.setPointDataView(view); - reports.add(ncwfReport); - } - } - } - } - } - } - return reports; - } + private static final int VERTEX_LAT_POS = 0; - @SuppressWarnings("unchecked") - private BUFRncwf getReport(IBUFRDataPacket packet) { - BUFRncwf ncwfReport = null; - if (packet != null) { - List sList = (List) packet - .getValue(); + private static final int VERTEX_LON_POS = 1; - Calendar c = getTimeInfo(sList); - if (c != null) { - ncwfReport = new BUFRncwf(); + private static final int STORM_TOP_POS = 7; - ncwfReport.setDataTime(new DataTime(TimeTools.copy(c))); - List features = getPacketSubList(sList - .get(FEATURES_POS)); + private static final int STORM_DIR_POS = 8; - ncwfReport - .setDetection(getFeatureData(getPacketSubList(features - .get(0)))); - ncwfReport.setForecast(getFeatureData(getPacketSubList(features - .get(1)))); + private static final int STORM_SPD_POS = 9; - double height = getDouble(sList.get(STORM_TOP_POS), INVALID); - if (height >= 0) { - height = Math.floor((height * 3.280839) / 100); - } - ncwfReport.setStormTop(height); - ncwfReport.setStormDir(getDouble(sList.get(STORM_DIR_POS), - INVALID)); - ncwfReport.setStormSpeed(getDouble(sList.get(STORM_SPD_POS), - INVALID)); - if (ncwfReport.getDetection() != null) { - Coordinate centroid = ncwfReport.getDetection() - .getCentroidLocation(); - SurfaceObsLocation loc = new SurfaceObsLocation(); - loc.assignLocation( - DecoderTools.getCoordinateLatitude(centroid), - DecoderTools.getCoordinateLongitude(centroid)); - ncwfReport.setLocation(loc); - } - } - } - return ncwfReport; - } + private static final int INVALID = -9999; - private NCWFFeature getFeatureData(List featureList) { - NCWFFeature feature = null; - if ((featureList != null) && (featureList.size() > 0)) { - // 0 0 08 021 : CODE TABLE Comments: Time significance - // 1 0 04 026 : Second Comments: Time period or displacement - // 2 0 08 005 : Comments: Meteorological attribute significance - // 3 0 08 007 : Comments: Dimensional significance - // 4 0 05 001 : Comments: Latitude (high accuracy) - // 5 0 06 001 : Comments: Longitude (high accuracy) - // 6 0 08 005 : Comments: Meteorological attribute significance - // 7 0 08 007 : Comments: Dimensional significance - // 8 1 01 000 : Comments: Boundary-Sublist + /** + * + * @param pdd + * @param dao + * @param pluginName + */ + public BUFRncwfDataAdapter(PointDataDescription pdd, + PointDataPluginDao dao, String pluginName) { + super(pdd, dao, pluginName); + } - double lat = getDouble(featureList.get(FEATURE_LAT_POS), INVALID); - double lon = getDouble(featureList.get(FEATURE_LON_POS), INVALID); - if ((lat != INVALID) && (lon != INVALID)) { - feature = new NCWFFeature(lat, lon); + /** + * Not used. + * + * @see com.raytheon.uf.edex.bufrtools.BUFRPointDataAdapter#createData(java.util.Iterator, + * com.raytheon.uf.edex.wmo.message.WMOHeader) + */ + @Override + public BUFRncwf createData(Iterator iterator, + WMOHeader wmoHeader) { + return null; + } - IBUFRDataPacket p1 = featureList.get(BOUNDARY_SUBLIST_POS); - feature.setFeatureBoundary(getVertices(getPacketSubList(p1))); - } - } - return feature; - } + /** + * + * + * + * + * @see com.raytheon.uf.edex.bufrtools.BUFRPointDataAdapter#createDataList(java.util.Iterator, + * com.raytheon.uf.edex.wmo.message.WMOHeader) + */ + @Override + public List createDataList(Iterator iterator, + WMOHeader wmoHeader) { - /** - * - * @param vertexList - * @return - */ - private List getVertices(List vertexList) { - List vertices = new ArrayList(); - if (vertexList != null) { - for (IBUFRDataPacket p : vertexList) { - List vertex = getPacketSubList(p); - double lat = getDouble(vertex.get(VERTEX_LAT_POS), INVALID); - double lon = getDouble(vertex.get(VERTEX_LON_POS), INVALID); - if ((lat != INVALID) && (lon != INVALID)) { - vertices.add(DecoderTools.createCoordinate(lat, lon)); - } - } - } - return vertices; - } + List reports = new ArrayList(); - /** - * - * @param dataList - * @return - */ - private Calendar getTimeInfo(List dataList) { + BUFRDataDocument dataDoc = iterator.next(); + if (dataDoc != null) { + // Get the primary data list. + List dataList = dataDoc.getList(); + for (IBUFRDataPacket p : dataList) { + if (p != null) { + List sList = getPacketSubList(p); + for (IBUFRDataPacket pp : sList) { + BUFRncwf ncwfReport = getReport(pp); - int year = getInt(dataList.get(YEAR_POS), IDecoderConstants.VAL_MISSING); - int month = getInt(dataList.get(MONTH_POS), - IDecoderConstants.VAL_MISSING); - int day = getInt(dataList.get(DAY_POS), IDecoderConstants.VAL_MISSING); - int hour = getInt(dataList.get(HOUR_POS), IDecoderConstants.VAL_MISSING); - int minute = getInt(dataList.get(MINUTE_POS), - IDecoderConstants.VAL_MISSING); - int second = getInt(dataList.get(SECOND_POS), - IDecoderConstants.VAL_MISSING); + if (ncwfReport != null) { + PointDataContainer container = getContainer(ncwfReport); + if (container != null) { + PointDataView view = container.append(); - Calendar baseTime = null; + long vt = ncwfReport.getDataTime() + .getValidTime().getTimeInMillis(); + view.setLong("validTime", vt); - // Ensure that we have all of the time info and create the - // date-time and datatime info. - if ((year > 0) && (month > 0) && (day > 0) && (hour >= 0) - && (minute >= 0) && (second >= 0)) { - baseTime = TimeTools.getBaseCalendar(year, month, day); - baseTime.set(Calendar.HOUR_OF_DAY, hour); - baseTime.set(Calendar.MINUTE, minute); - baseTime.set(Calendar.SECOND, second); - baseTime.set(Calendar.MILLISECOND, 0); - } - return baseTime; - } + view.setFloat("storm_top", ncwfReport + .getStormTop().floatValue()); + view.setFloat("storm_dir", ncwfReport + .getStormDir().floatValue()); + view.setFloat("storm_speed", ncwfReport + .getStormSpeed().floatValue()); - /** - * - * @param packet - * @return - */ - @SuppressWarnings("unchecked") - private static List getPacketSubList(IBUFRDataPacket packet) { - List list = null; - if (packet instanceof BUFRSublistPacket) { - if (RepSubList.getPacketType().equals(packet.getUnits())) { - list = (List) packet.getValue(); - } else if (SubSetList.getPacketType().equals(packet.getUnits())) { - list = (List) packet.getValue(); - } - } - return list; - } + NCWFFeature detect = ncwfReport.getDetection(); + view.setFloat("or_centroid_lat", + (float) detect.getCentroidLatitude()); + view.setFloat("or_centroid_lon", + (float) detect.getCentroidLongitude()); + int pos = 0; + for (Coordinate dc : detect + .getFeatureBoundary()) { + float lat = (float) DecoderTools + .getCoordinateLatitude(dc); + float lon = (float) DecoderTools + .getCoordinateLongitude(dc); + view.setFloat("oalat", lat, pos); + view.setFloat("oalon", lon, pos++); + } + view.setInt("or_num_of_vertices", pos); + NCWFFeature forecast = ncwfReport.getForecast(); + view.setFloat("centroid_lat", + (float) forecast.getCentroidLatitude()); + view.setFloat("centroid_lon", + (float) forecast.getCentroidLongitude()); + pos = 0; + for (Coordinate dc : forecast + .getFeatureBoundary()) { + float lat = (float) DecoderTools + .getCoordinateLatitude(dc); + float lon = (float) DecoderTools + .getCoordinateLongitude(dc); + view.setFloat("alat", lat, pos); + view.setFloat("alon", lon, pos++); + } + view.setInt("num_of_vertices", pos); + + ncwfReport.setPointDataView(view); + reports.add(ncwfReport); + } + } + } + } + } + } + return reports; + } + + @SuppressWarnings("unchecked") + private BUFRncwf getReport(IBUFRDataPacket packet) { + BUFRncwf ncwfReport = null; + if (packet != null) { + List sList = (List) packet + .getValue(); + + Calendar c = getTimeInfo(sList); + if (c != null) { + ncwfReport = new BUFRncwf(); + + ncwfReport.setDataTime(new DataTime(TimeTools.copy(c))); + List features = getPacketSubList(sList + .get(FEATURES_POS)); + + ncwfReport + .setDetection(getFeatureData(getPacketSubList(features + .get(0)))); + ncwfReport.setForecast(getFeatureData(getPacketSubList(features + .get(1)))); + + double height = getDouble(sList.get(STORM_TOP_POS), INVALID); + if (height >= 0) { + height = Math.floor((height * 3.280839) / 100); + } + ncwfReport.setStormTop(height); + ncwfReport.setStormDir(getDouble(sList.get(STORM_DIR_POS), + INVALID)); + ncwfReport.setStormSpeed(getDouble(sList.get(STORM_SPD_POS), + INVALID)); + if (ncwfReport.getDetection() != null) { + Coordinate centroid = ncwfReport.getDetection() + .getCentroidLocation(); + SurfaceObsLocation loc = new SurfaceObsLocation(); + loc.assignLocation( + DecoderTools.getCoordinateLatitude(centroid), + DecoderTools.getCoordinateLongitude(centroid)); + ncwfReport.setLocation(loc); + } + } + } + return ncwfReport; + } + + private NCWFFeature getFeatureData(List featureList) { + NCWFFeature feature = null; + if ((featureList != null) && (featureList.size() > 0)) { + // 0 0 08 021 : CODE TABLE Comments: Time significance + // 1 0 04 026 : Second Comments: Time period or displacement + // 2 0 08 005 : Comments: Meteorological attribute significance + // 3 0 08 007 : Comments: Dimensional significance + // 4 0 05 001 : Comments: Latitude (high accuracy) + // 5 0 06 001 : Comments: Longitude (high accuracy) + // 6 0 08 005 : Comments: Meteorological attribute significance + // 7 0 08 007 : Comments: Dimensional significance + // 8 1 01 000 : Comments: Boundary-Sublist + + double lat = getDouble(featureList.get(FEATURE_LAT_POS), INVALID); + double lon = getDouble(featureList.get(FEATURE_LON_POS), INVALID); + if ((lat != INVALID) && (lon != INVALID)) { + feature = new NCWFFeature(lat, lon); + + IBUFRDataPacket p1 = featureList.get(BOUNDARY_SUBLIST_POS); + feature.setFeatureBoundary(getVertices(getPacketSubList(p1))); + } + } + return feature; + } + + /** + * + * @param vertexList + * @return + */ + private List getVertices(List vertexList) { + List vertices = new ArrayList(); + if (vertexList != null) { + for (IBUFRDataPacket p : vertexList) { + List vertex = getPacketSubList(p); + double lat = getDouble(vertex.get(VERTEX_LAT_POS), INVALID); + double lon = getDouble(vertex.get(VERTEX_LON_POS), INVALID); + if ((lat != INVALID) && (lon != INVALID)) { + vertices.add(DecoderTools.createCoordinate(lat, lon)); + } + } + } + return vertices; + } + + /** + * + * @param dataList + * @return + */ + private Calendar getTimeInfo(List dataList) { + + int year = getInt(dataList.get(YEAR_POS), IDecoderConstants.VAL_MISSING); + int month = getInt(dataList.get(MONTH_POS), + IDecoderConstants.VAL_MISSING); + int day = getInt(dataList.get(DAY_POS), IDecoderConstants.VAL_MISSING); + int hour = getInt(dataList.get(HOUR_POS), IDecoderConstants.VAL_MISSING); + int minute = getInt(dataList.get(MINUTE_POS), + IDecoderConstants.VAL_MISSING); + int second = getInt(dataList.get(SECOND_POS), + IDecoderConstants.VAL_MISSING); + + Calendar baseTime = null; + + // Ensure that we have all of the time info and create the + // date-time and datatime info. + if ((year > 0) && (month > 0) && (day > 0) && (hour >= 0) + && (minute >= 0) && (second >= 0)) { + baseTime = TimeTools.getBaseCalendar(year, month, day); + baseTime.set(Calendar.HOUR_OF_DAY, hour); + baseTime.set(Calendar.MINUTE, minute); + baseTime.set(Calendar.SECOND, second); + baseTime.set(Calendar.MILLISECOND, 0); + } + return baseTime; + } + + /** + * + * @param packet + * @return + */ + @SuppressWarnings("unchecked") + private static List getPacketSubList(IBUFRDataPacket packet) { + List list = null; + if (packet instanceof BUFRSublistPacket) { + if (RepSubList.getPacketType().equals(packet.getUnits())) { + list = (List) packet.getValue(); + } else if (SubSetList.getPacketType().equals(packet.getUnits())) { + list = (List) packet.getValue(); + } + } + return list; + } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/src/com/raytheon/uf/edex/plugin/bufrquikscat/decoder/QUIKScatDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/src/com/raytheon/uf/edex/plugin/bufrquikscat/decoder/QUIKScatDataAdapter.java index e7604a748a..ca115d97f4 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/src/com/raytheon/uf/edex/plugin/bufrquikscat/decoder/QUIKScatDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrquikscat/src/com/raytheon/uf/edex/plugin/bufrquikscat/decoder/QUIKScatDataAdapter.java @@ -45,7 +45,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080303 969 jkorman Initial implementation. + * Mar 03, 2008 969 jkorman Initial implementation. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -55,21 +56,29 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; public class QUIKScatDataAdapter extends BUFRPointDataAdapter { // Note inverted logic private static final int RAIN_FLAG_NOT_USABLE = 0x00001000; - private static final int RAIN_FLAG = 0x00002000; - - private static final int RAIN_DATA_MASK = RAIN_FLAG_NOT_USABLE | RAIN_FLAG; - - private static final int RAIN_NOT_PRESENT = 0x00000000; - private static final int RAIN_PRESENT = RAIN_FLAG; - - private static final int YEAR_POS = 2; - private static final int MONTH_POS = 3; - private static final int DAY_POS = 4; - private static final int HOUR_POS = 5; + + private static final int RAIN_FLAG = 0x00002000; + + private static final int RAIN_DATA_MASK = RAIN_FLAG_NOT_USABLE | RAIN_FLAG; + + private static final int RAIN_NOT_PRESENT = 0x00000000; + + private static final int RAIN_PRESENT = RAIN_FLAG; + + private static final int YEAR_POS = 2; + + private static final int MONTH_POS = 3; + + private static final int DAY_POS = 4; + + private static final int HOUR_POS = 5; + private static final int MINUTE_POS = 6; + private static final int SECOND_POS = 7; private static final int SAT_ID_POS = 0; + private static final int ORBIT_N_POS = 1; /** @@ -78,8 +87,9 @@ public class QUIKScatDataAdapter extends BUFRPointDataAdapter { * @param dao * @param pluginName */ - public QUIKScatDataAdapter(PointDataDescription pdd, PointDataPluginDao dao, String pluginName) { - super(pdd,dao,pluginName); + public QUIKScatDataAdapter(PointDataDescription pdd, + PointDataPluginDao dao, String pluginName) { + super(pdd, dao, pluginName); } /** @@ -93,53 +103,56 @@ public class QUIKScatDataAdapter extends BUFRPointDataAdapter { * @return A ProfilerObs instance, or null in the event of an error. */ @Override - public QUIKScatObs createData( - Iterator iterator, WMOHeader wmoHeader) { + public QUIKScatObs createData(Iterator iterator, + WMOHeader wmoHeader) { QUIKScatObs obsData = null; BUFRDataDocument dataDoc = iterator.next(); - + if (dataDoc != null) { // Get the primary data list. List dataList = dataDoc.getList(); - + obsData = getHeaderData(dataList); - if(obsData != null) { + if (obsData != null) { // pickup the data. - obsData.setPluginName(getPluginName()); obsData.setWmoHeader(wmoHeader.getWmoHeader()); PointDataContainer container = getContainer(obsData); - if(container != null) { - + if (container != null) { + logger.debug("Creating obs data "); - PointDataView view = container.append(); + PointDataView view = container.append(); // view.setInt("satelliteID", obsData.getSatId()); view.setInt("orbitNumber", obsData.getOrbitNumber()); - view.setLong("validTime",obsData.getTimeObs().getTimeInMillis()); - - double lat = getDouble(dataList.get(8), IDecoderConstants.VAL_MISSING); - double lon = getDouble(dataList.get(9), IDecoderConstants.VAL_MISSING); - + view.setLong("validTime", obsData.getTimeObs() + .getTimeInMillis()); + + double lat = getDouble(dataList.get(8), + IDecoderConstants.VAL_MISSING); + double lon = getDouble(dataList.get(9), + IDecoderConstants.VAL_MISSING); + SurfaceObsLocation location = new SurfaceObsLocation(); - location.assignLocation(lat,lon); + location.assignLocation(lat, lon); obsData.setLocation(location); - view.setFloat("latitude",(float) lat); - view.setFloat("longitude",(float) lon); - - int rainFlag = getInt(dataList.get(10),IDecoderConstants.VAL_MISSING); - switch((rainFlag & RAIN_DATA_MASK)) { - case RAIN_NOT_PRESENT : { + view.setFloat("latitude", (float) lat); + view.setFloat("longitude", (float) lon); + + int rainFlag = getInt(dataList.get(10), + IDecoderConstants.VAL_MISSING); + switch ((rainFlag & RAIN_DATA_MASK)) { + case RAIN_NOT_PRESENT: { rainFlag = 0; break; } - case RAIN_PRESENT : { + case RAIN_PRESENT: { rainFlag = 1; break; } - default : { // + default: { // rainFlag = -9999; break; } @@ -147,22 +160,23 @@ public class QUIKScatDataAdapter extends BUFRPointDataAdapter { view.setInt("rainIndex", rainFlag); setViewData("probRain", view, dataList.get(11)); // Wind data - float val = (float) getDouble(dataList.get(12), PDV_FILL_DBL); - if(val < 0) { + float val = (float) getDouble(dataList.get(12), + PDV_FILL_DBL); + if (val < 0) { val = (float) PDV_FILL_DBL; } view.setFloat("windSpd", val); val = (float) getDouble(dataList.get(13), PDV_FILL_DBL); - if(val < 0) { + if (val < 0) { val = (float) PDV_FILL_DBL; } view.setFloat("windDir", val); - + obsData.setPointDataView(view); } } } - + return obsData; } @@ -176,7 +190,7 @@ public class QUIKScatDataAdapter extends BUFRPointDataAdapter { return obsList; } - + /** * * @param dataList @@ -184,21 +198,24 @@ public class QUIKScatDataAdapter extends BUFRPointDataAdapter { */ private QUIKScatObs getHeaderData(List dataList) { QUIKScatObs obsData = null; - + Calendar obsTime = getTimeInfo(dataList); - if(obsTime != null) { + if (obsTime != null) { obsData = new QUIKScatObs(); obsData.setTimeObs(obsTime); obsData.setDataTime(new DataTime(TimeTools.copy(obsTime))); - int satId = getInt(dataList.get(SAT_ID_POS), IDecoderConstants.VAL_MISSING); - int orbNo = getInt(dataList.get(ORBIT_N_POS), IDecoderConstants.VAL_MISSING); - - logger.debug("getHeaderData(" + satId + "," + orbNo + ")" + obsData.getDataTime()); - - if(satId != IDecoderConstants.VAL_MISSING) { + int satId = getInt(dataList.get(SAT_ID_POS), + IDecoderConstants.VAL_MISSING); + int orbNo = getInt(dataList.get(ORBIT_N_POS), + IDecoderConstants.VAL_MISSING); + + logger.debug("getHeaderData(" + satId + "," + orbNo + ")" + + obsData.getDataTime()); + + if (satId != IDecoderConstants.VAL_MISSING) { obsData.setSatId(satId); - if(orbNo != IDecoderConstants.VAL_MISSING) { + if (orbNo != IDecoderConstants.VAL_MISSING) { obsData.setOrbitNumber(orbNo); } else { obsData = null; @@ -209,26 +226,30 @@ public class QUIKScatDataAdapter extends BUFRPointDataAdapter { } return obsData; } - + /** * * @param dataList * @return */ private Calendar getTimeInfo(List dataList) { - - int year = getInt(dataList.get(YEAR_POS),IDecoderConstants.VAL_MISSING); - int month = getInt(dataList.get(MONTH_POS),IDecoderConstants.VAL_MISSING); - int day = getInt(dataList.get(DAY_POS),IDecoderConstants.VAL_MISSING); - int hour = getInt(dataList.get(HOUR_POS),IDecoderConstants.VAL_MISSING); - int minute = getInt(dataList.get(MINUTE_POS),IDecoderConstants.VAL_MISSING); - int second = getInt(dataList.get(SECOND_POS),IDecoderConstants.VAL_MISSING); - + + int year = getInt(dataList.get(YEAR_POS), IDecoderConstants.VAL_MISSING); + int month = getInt(dataList.get(MONTH_POS), + IDecoderConstants.VAL_MISSING); + int day = getInt(dataList.get(DAY_POS), IDecoderConstants.VAL_MISSING); + int hour = getInt(dataList.get(HOUR_POS), IDecoderConstants.VAL_MISSING); + int minute = getInt(dataList.get(MINUTE_POS), + IDecoderConstants.VAL_MISSING); + int second = getInt(dataList.get(SECOND_POS), + IDecoderConstants.VAL_MISSING); + Calendar baseTime = null; - + // Ensure that we have all of the time info and create the // date-time and datatime info. - if ((year > 0) && (month > 0) && (day > 0) && (hour >= 0)&& (minute >= 0)&& (second >= 0)) { + if ((year > 0) && (month > 0) && (day > 0) && (hour >= 0) + && (minute >= 0) && (second >= 0)) { baseTime = TimeTools.getBaseCalendar(year, month, day); baseTime.set(Calendar.HOUR_OF_DAY, hour); baseTime.set(Calendar.MINUTE, minute); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/SigWxDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/SigWxDecoder.java index 4235e2a9f6..1d3e921e19 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/SigWxDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/SigWxDecoder.java @@ -41,7 +41,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 21, 2009 1939 jkorman Initial creation + * Jan 21, 2009 1939 jkorman Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -51,7 +52,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; public class SigWxDecoder extends AbstractBUFRDecoder { - private PointDataDescription pdd = null; + private final PointDataDescription pdd = null; private SigWxDataDao dao; @@ -68,21 +69,23 @@ public class SigWxDecoder extends AbstractBUFRDecoder { * */ @Override - public List decodeData(List document, String traceId, WMOHeader wmoHeader) { + public List decodeData(List document, + String traceId, WMOHeader wmoHeader) { - List decodedData = null; - if(document != null) { + List decodedData = null; + if (document != null) { decodedData = new ArrayList(); - SigWxDataAdapter adapter = SigWxDataAdapter.getAdapter(pdd, dao, traceId, wmoHeader); + SigWxDataAdapter adapter = SigWxDataAdapter.getAdapter(pdd, dao, + traceId, wmoHeader); logger.debug(traceId + " - Document size = " + document.size()); Iterator iterator = document.iterator(); while (iterator.hasNext()) { logger.debug(traceId + " - Entering createDataList"); - List sigwx = adapter.createDataList(iterator, wmoHeader); + List sigwx = adapter.createDataList(iterator, + wmoHeader); if (sigwx != null) { - for(SigWxData d : sigwx) { - d.setPluginName(getPluginName()); + for (SigWxData d : sigwx) { d.setTraceId(traceId); try { d.constructDataURI(); @@ -99,23 +102,23 @@ public class SigWxDecoder extends AbstractBUFRDecoder { } return decodedData; } - + /** * * @param recreate */ @Override protected void createDAO(boolean recreate) { - if(recreate) { + if (recreate) { dao = null; } try { dao = new SigWxDataDao(pluginName); } catch (Exception e) { - logger.error("SigWxDataDao creation failed",e); + logger.error("SigWxDataDao creation failed", e); logger.error("Plugin set to failSafe mode"); setFailSafe(true); } } - + } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/decoder/SigWxDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/decoder/SigWxDataAdapter.java index 1eff18adc7..ed45dd0fe7 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/decoder/SigWxDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrsigwx/src/com/raytheon/uf/edex/plugin/bufrsigwx/decoder/SigWxDataAdapter.java @@ -19,7 +19,6 @@ **/ package com.raytheon.uf.edex.plugin.bufrsigwx.decoder; - import static com.raytheon.uf.edex.decodertools.bufr.packets.DataPacketTypes.RepSubList; import static com.raytheon.uf.edex.decodertools.bufr.packets.DataPacketTypes.SubSetList; @@ -52,8 +51,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20080303 969 jkorman Initial implementation. - * 20090706 2538 jsanchez Added latitude,longitude to point data. + * Mar 03, 2008 969 jkorman Initial implementation. + * Jul 06, 2009 2538 jsanchez Added latitude,longitude to point data. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -64,30 +64,37 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { private static Log logger = LogFactory.getLog(SigWxDataAdapter.class); - private static final int YEAR_POS = 0; - private static final int MONTH_POS = 1; - private static final int DAY_POS = 2; - private static final int HOUR_POS = 3; + private static final int YEAR_POS = 0; + + private static final int MONTH_POS = 1; + + private static final int DAY_POS = 2; + + private static final int HOUR_POS = 3; + private static final int MINUTE_POS = 4; private static final int TIME_SIG_FCST = 4; - + private static final int BASE_HGT_POS = 13; + private static final int TOP_HGT_POS = 14; - + private static final int MID_LYR_BASE = 3050; + private static final int HI_LYR_TOP = 19200; - + static final int MISSING = PointDataDescription.FILL_VALUE_INT; - + /** * * @param pdd * @param dao * @param pluginName */ - public SigWxDataAdapter(PointDataDescription pdd, PointDataPluginDao dao, String pluginName) { - super(pdd,dao,pluginName); + public SigWxDataAdapter(PointDataDescription pdd, + PointDataPluginDao dao, String pluginName) { + super(pdd, dao, pluginName); } /** @@ -101,8 +108,8 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { * @return A ProfilerObs instance, or null in the event of an error. */ @Override - public SigWxData createData( - Iterator iterator, WMOHeader wmoHeader) { + public SigWxData createData(Iterator iterator, + WMOHeader wmoHeader) { return null; } @@ -111,8 +118,9 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { * @param iterator * @param wmoHeader */ - public List createDataList( - Iterator iterator, WMOHeader wmoHeader) { + @Override + public List createDataList(Iterator iterator, + WMOHeader wmoHeader) { List tropList = null; @@ -125,9 +133,8 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { // Extract the header data. sigWx = getHeaderData(dataList); - + if (sigWx != null) { - sigWx.setPluginName(getPluginName()); sigWx.setWmoHeader(wmoHeader.getWmoHeader()); sigWx.setWxType(getType()); // Go collect the data specific to the data being decoded. @@ -136,7 +143,7 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { } return tropList; } - + /** * * @param dataList @@ -149,7 +156,7 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { if (TIME_SIG_FCST == timeSig) { Calendar baseTime = getTimeInfo(dataList, 2); Calendar fcstTime = getTimeInfo(dataList, 8); - if ((fcstTime != null)&&(baseTime != null)) { + if ((fcstTime != null) && (baseTime != null)) { sigWx = new SigWxData(); int fcstSeconds = (int) (fcstTime.getTimeInMillis() - baseTime @@ -179,25 +186,26 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { } return sigWx; } - + /** * * @param dataList * @return */ private Calendar getTimeInfo(List dataList, int basePos) { - - int year = getInt(dataList.get(basePos + YEAR_POS),MISSING); - int month = getInt(dataList.get(basePos + MONTH_POS),MISSING); - int day = getInt(dataList.get(basePos + DAY_POS),MISSING); - int hour = getInt(dataList.get(basePos + HOUR_POS),MISSING); - int minute = getInt(dataList.get(basePos + MINUTE_POS),MISSING); - + + int year = getInt(dataList.get(basePos + YEAR_POS), MISSING); + int month = getInt(dataList.get(basePos + MONTH_POS), MISSING); + int day = getInt(dataList.get(basePos + DAY_POS), MISSING); + int hour = getInt(dataList.get(basePos + HOUR_POS), MISSING); + int minute = getInt(dataList.get(basePos + MINUTE_POS), MISSING); + Calendar baseTime = null; - + // Ensure that we have all of the time info and create the // date-time and datatime info. - if ((year > 0) && (month > 0) && (day > 0) && (hour >= 0)&& (minute >= 0)) { + if ((year > 0) && (month > 0) && (day > 0) && (hour >= 0) + && (minute >= 0)) { baseTime = TimeTools.getBaseCalendar(year, month, day); baseTime.set(Calendar.HOUR_OF_DAY, hour); baseTime.set(Calendar.MINUTE, minute); @@ -206,21 +214,21 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { } return baseTime; } - + /** * * @param sigWx * @param index */ - abstract List getSigWxData(SigWxData sigWx, List dataList); - + abstract List getSigWxData(SigWxData sigWx, + List dataList); + /** * * @return */ abstract SigWxType getType(); - abstract void setType(SigWxType type); /** @@ -231,7 +239,7 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { @SuppressWarnings("unchecked") static List getPacketSubList(IBUFRDataPacket packet) { List list = null; - if(packet instanceof BUFRSublistPacket) { + if (packet instanceof BUFRSublistPacket) { if (RepSubList.getPacketType().equals(packet.getUnits())) { list = (List) packet.getValue(); } else if (SubSetList.getPacketType().equals(packet.getUnits())) { @@ -302,23 +310,26 @@ public abstract class SigWxDataAdapter extends BUFRPointDataAdapter { adapter.setType(SigWxType.VTS); } else { adapter = new SigWxNullData(pdd, dao, pluginName); - logger.error("No decoder adapter for file " + wmoHeader.getWmoHeader()); + logger.error("No decoder adapter for file " + + wmoHeader.getWmoHeader()); } return adapter; } private static PointDataDescription loadPDD(String pddFileName) { - + PointDataDescription pdd = null; try { - pdd = PointDataDescription.fromStream(SigWxDataAdapter.class.getResourceAsStream(pddFileName)); + pdd = PointDataDescription.fromStream(SigWxDataAdapter.class + .getResourceAsStream(pddFileName)); logger.info(pddFileName + "PointDataDescription loaded"); - - } catch(Exception e) { - logger.error("PointDataDescription failed loading " + pddFileName,e); + + } catch (Exception e) { + logger.error("PointDataDescription failed loading " + pddFileName, + e); } - + return pdd; } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/src/com/raytheon/uf/edex/plugin/bufrssmi/decoder/SSMIDataAdapter.java b/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/src/com/raytheon/uf/edex/plugin/bufrssmi/decoder/SSMIDataAdapter.java index 3ed5ec1706..39a7fb75c8 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/src/com/raytheon/uf/edex/plugin/bufrssmi/decoder/SSMIDataAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.bufrssmi/src/com/raytheon/uf/edex/plugin/bufrssmi/decoder/SSMIDataAdapter.java @@ -53,6 +53,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * Jul 06, 2009 2538 jsanchez Added latitude,longitude to point data. * May 17, 2013 1869 bsteffen Remove DataURI column from sat plot * types. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -114,7 +115,6 @@ public class SSMIDataAdapter extends BUFRPointDataAdapter { if (obsData != null) { // Need to set plugin name before getting container! - obsData.setPluginName(getPluginName()); PointDataContainer container = getContainer(obsData); if (container != null) { PointDataView view = container.append(); @@ -138,6 +138,7 @@ public class SSMIDataAdapter extends BUFRPointDataAdapter { /** * */ + @Override @SuppressWarnings("unchecked") public List createDataList( Iterator iterator, WMOHeader wmoHeader) { @@ -182,7 +183,6 @@ public class SSMIDataAdapter extends BUFRPointDataAdapter { // Make a copy for each data point. SSMIScanData pointData = obsData.copyObs(); // Need to set plugin name before getting container! - pointData.setPluginName(getPluginName()); pointData = getPointData(pointData, p, it.next()); if (pointData != null) { obsList.add(pointData); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.cwa/src/com/raytheon/uf/edex/plugin/cwa/decoder/CWAParser.java b/edexOsgi/com.raytheon.uf.edex.plugin.cwa/src/com/raytheon/uf/edex/plugin/cwa/decoder/CWAParser.java index f04904b37b..893f6c494b 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.cwa/src/com/raytheon/uf/edex/plugin/cwa/decoder/CWAParser.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.cwa/src/com/raytheon/uf/edex/plugin/cwa/decoder/CWAParser.java @@ -60,10 +60,10 @@ import com.vividsolutions.jts.geom.Coordinate; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Feb 01, 2010 jsanchez Initial creation - * Apr 18, 2012 #473 dgilling Modify parser to set - * DataTime based on ingest - * file name. + * Feb 01, 2010 jsanchez Initial creation + * Apr 18, 2012 473 dgilling Modify parser to set DataTime based on + * ingest file name. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -72,7 +72,7 @@ import com.vividsolutions.jts.geom.Coordinate; */ public class CWAParser { /** The logger */ - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private final PointDataDescription pointDataDescription; @@ -80,11 +80,11 @@ public class CWAParser { private final CWARecordDao cwaDao; - private Map containerMap; + private final Map containerMap; private final GeodeticCalculator gc = new GeodeticCalculator(); - private String pluginName; + private final String pluginName; private String eventId; @@ -98,7 +98,7 @@ public class CWAParser { private CWADimension dimension; - private List coordinates = new ArrayList(); + private final List coordinates = new ArrayList(); boolean isVicinity; @@ -108,7 +108,7 @@ public class CWAParser { int currentReport = -1; - private HashMap URI_MAP = new HashMap(); + private final HashMap URI_MAP = new HashMap(); private static HashMap dirToDeg = new HashMap(); @@ -258,7 +258,8 @@ public class CWAParser { String s = iRpt.getReportLine(); switch (iRpt.getLineType()) { case ISSUANCE: - if (eventId != null && dimension != CWADimension.CANCELED) { + if ((eventId != null) + && (dimension != CWADimension.CANCELED)) { reports.add(getRecord()); } clearData(); @@ -286,7 +287,8 @@ public class CWAParser { } break; case END: - if (eventId != null && dimension != CWADimension.CANCELED) { + if ((eventId != null) + && (dimension != CWADimension.CANCELED)) { reports.add(getRecord()); } clearData(); @@ -322,7 +324,7 @@ public class CWAParser { private void parseIssuanceInfo(String issuanceInfo) { String[] parts = issuanceInfo.split(" "); - if (parts != null && parts[0] != null) { + if ((parts != null) && (parts[0] != null)) { eventId = parts[0]; } @@ -412,7 +414,7 @@ public class CWAParser { } dimension = CWADimension.AREA; distance = 0; - } else if (tok.length() == 0 || tok.equals("")) { + } else if ((tok.length() == 0) || tok.equals("")) { getMoreCoords = true; } else { logger.error("Bad location. '" + tok @@ -444,7 +446,7 @@ public class CWAParser { } } - if (!found && size == 0 && (isVicinity || coordinates.size() > 0)) { + if (!found && (size == 0) && (isVicinity || (coordinates.size() > 0))) { size = 2000; // 2 km = 2000 m } } @@ -474,7 +476,6 @@ public class CWAParser { record.setEventId(eventId); record.setDimension(dimension); record.setMessageData(text); - record.setPluginName(pluginName); // TimeRange tr = new TimeRange( // startTime.getRefTimeAsCalendar(), // endTime.getRefTimeAsCalendar()); @@ -485,7 +486,7 @@ public class CWAParser { Coordinate[] coord = null; if (coordinates.size() == 1) { coord = Utility.makeArea(coordinates.get(0), size); - } else if (coordinates.size() == 2 && size > 0) { + } else if ((coordinates.size() == 2) && (size > 0)) { coord = Utility.makeArea( coordinates.toArray(new Coordinate[coordinates.size()]), size); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.cwat/src/com/raytheon/uf/edex/plugin/cwat/CWATGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.cwat/src/com/raytheon/uf/edex/plugin/cwat/CWATGenerator.java index 3ae35f6153..50335b752b 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.cwat/src/com/raytheon/uf/edex/plugin/cwat/CWATGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.cwat/src/com/raytheon/uf/edex/plugin/cwat/CWATGenerator.java @@ -48,7 +48,8 @@ import com.raytheon.uf.edex.plugin.cwat.common.CWATConfig; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 02/25/13 1660 D. Hladky Fixed configuration bug in scan. + * Feb 25, 2013 1660 D. Hladky Fixed configuration bug in scan. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -67,7 +68,7 @@ public class CWATGenerator extends CompositeProductGenerator implements /** Set of icaos to filter for */ private Set icaos = null; - + /** run configuration manager **/ public SCANRunSiteConfigurationManager srcm = null; @@ -97,7 +98,7 @@ public class CWATGenerator extends CompositeProductGenerator implements if (!configValid) { statusHandler.handle(Priority.WARN, - "Configuration for CWAT(scan) is invalid!!!"); + "Configuration for CWAT(scan) is invalid!!!"); return; } @@ -132,7 +133,7 @@ public class CWATGenerator extends CompositeProductGenerator implements cwa_config = new CWATConfig(genMessage, this); } catch (Exception e) { statusHandler.handle(Priority.ERROR, - "CWAT Configuration parameters for run not met...",e); + "CWAT Configuration parameters for run not met...", e); return; } @@ -155,8 +156,6 @@ public class CWATGenerator extends CompositeProductGenerator implements + cwa_config.getVil().getNumBins()); } - cwaRec.setPluginName(cwa_config.getGenerator() - .getCompositeProductType()); cwaRec.setIcao(cwa_config.getIcao()); cwaRec.setDataTime(new DataTime(cwa_config.getCZ().getDataTime() .getRefTime())); @@ -192,7 +191,7 @@ public class CWATGenerator extends CompositeProductGenerator implements resetFilters(); } } - + /** * run config manager * diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java index 78b029cccf..49514b6199 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPGenerator.java @@ -32,7 +32,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; import java.util.regex.Pattern; -import com.raytheon.uf.common.dataplugin.message.DataURINotificationMessage; import com.raytheon.edex.plugin.radar.dao.RadarStationDao; import com.raytheon.edex.urifilter.URIFilter; import com.raytheon.edex.urifilter.URIGenerateMessage; @@ -47,6 +46,7 @@ import com.raytheon.uf.common.dataplugin.ffmp.FFMPTemplates; import com.raytheon.uf.common.dataplugin.ffmp.FFMPTemplates.MODE; import com.raytheon.uf.common.dataplugin.ffmp.FFMPUtils; import com.raytheon.uf.common.dataplugin.ffmp.SourceBinList; +import com.raytheon.uf.common.dataplugin.message.DataURINotificationMessage; import com.raytheon.uf.common.dataplugin.radar.RadarStation; import com.raytheon.uf.common.dataplugin.radar.util.RadarsInUseUtil; import com.raytheon.uf.common.datastorage.DataStoreFactory; @@ -113,17 +113,28 @@ import com.raytheon.uf.edex.plugin.ffmp.common.FFTIRatioDiff; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 06/21/2009 2521 dhladky Initial Creation. - * 02/03/2011 6500 cjeanbap Fixed NullPointerException. - * 07/31/2011 578 dhladky FFTI modifications - * 01/27/13 1478 D. Hladky Added creation of full cache records to help read write stress on NAS - * 02/01/13 1569 D. Hladky Added constants, switched to using aggregate records written through pypies - * 02/20/13 1635 D. Hladky Added some finally methods to increase dead lock safety. Reduced wait times for threads. - * 02/25/13 1660 D. Hladky Redesigned data flow for FFTI in order to have only one mosaic piece in memory at a time. - * 03/13/13 1478 D. Hladky non-FFTI mosaic containers weren't getting ejected. Made it so that they are ejected after processing as well. - * 03/22/13 1803 D. Hladky Fixed broken performance logging for ffmp. - * 07/03/13 2131 D. Hladky InitialLoad array was forcing total FDC re-query with every update. - * Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL + * Jun 21, 2009 2521 dhladky Initial Creation. + * Feb 03, 2011 6500 cjeanbap Fixed NullPointerException. + * Jul 31, 2011 578 dhladky FFTI modifications + * Jan 27, 2013 1478 D. Hladky Added creation of full cache records to + * help read write stress on NAS + * Feb 01, 2013 1569 D. Hladky Added constants, switched to using + * aggregate records written through pypies + * Feb 20, 2013 1635 D. Hladky Added some finally methods to increase + * dead lock safety. Reduced wait times for + * threads. + * Feb 25, 2013 1660 D. Hladky Redesigned data flow for FFTI in order to + * have only one mosaic piece in memory at a + * time. + * Mar 13, 2013 1478 D. Hladky non-FFTI mosaic containers weren't + * getting ejected. Made it so that they + * are ejected after processing as well. + * Mar 22, 2013 1803 D. Hladky Fixed broken performance logging for + * ffmp. + * Jul 03, 2013 2131 D. Hladky InitialLoad array was forcing total FDC + * re-query with every update. + * Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author dhladky @@ -407,9 +418,9 @@ public class FFMPGenerator extends CompositeProductGenerator implements if (messages instanceof DataURINotificationMessage) { URIFilter[] filters = getFilters(); if (filters != null) { - for (int i = 0; i < filters.length; i++) { - if (filters[i] != null) { - FFMPURIFilter filter = (FFMPURIFilter) filters[i]; + for (URIFilter filter2 : filters) { + if (filter2 != null) { + FFMPURIFilter filter = (FFMPURIFilter) filter2; if (loaded) { @@ -681,7 +692,6 @@ public class FFMPGenerator extends CompositeProductGenerator implements ffmpRec.setSourceName(ffmpProduct.getSourceName()); ffmpRec.setDataKey(dataKey); ffmpRec.setSiteKey(siteKey); - ffmpRec.setPluginName(getCompositeProductType()); ffmpRec.setWfo(config.getCWA()); FFMPProcessor ffmp = new FFMPProcessor(config, generator, ffmpRec, template); @@ -889,7 +899,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements if (source.isRfc()) { int i = 0; for (String dataKey : ingest.getDataKey()) { - if (i < ingest.getDataKey().size() - 1) { + if (i < (ingest.getDataKey().size() - 1)) { buf.append(dataKey + ","); } else { buf.append(dataKey); @@ -1233,7 +1243,6 @@ public class FFMPGenerator extends CompositeProductGenerator implements - (TimeUtil.MILLIS_PER_HOUR * SOURCE_CACHE_TIME)); } - // pull from disk if there fdc = getFFMPDataContainer(sourceSiteDataKey, backDate); @@ -1264,7 +1273,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements Date newDate = fdc.getNewest(); Date oldDate = fdc.getOldest(); - if (newDate != null && oldDate != null) { + if ((newDate != null) && (oldDate != null)) { if ((ffmpRec.getDataTime().getRefTime().getTime() - newDate .getTime()) >= (source .getExpirationMinutes(ffmpRec.getSiteKey()) * TimeUtil.MILLIS_PER_MINUTE)) { @@ -1376,14 +1385,14 @@ public class FFMPGenerator extends CompositeProductGenerator implements } // condition for first time read in - if (fdc == null && record != null) { + if ((fdc == null) && (record != null)) { // creates a place holder for this source fdc = new FFMPDataContainer(sourceSiteDataKey, record); populated = true; } // condition for update to fdc while in use - if (record != null && !populated) { + if ((record != null) && !populated) { fdc.setAggregateData(record); } @@ -1443,10 +1452,11 @@ public class FFMPGenerator extends CompositeProductGenerator implements */ private class WriteAggregateRecord implements Runnable { - private FFMPDataContainer fdc; + private final FFMPDataContainer fdc; - private String sourceSiteDataKey; + private final String sourceSiteDataKey; + @Override public void run() { try { write(); @@ -1749,7 +1759,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements } // This will only happen at initial load, update, and duration changes. - if (accumulator.isReset() || accumulator.getDuration() != duration) { + if (accumulator.isReset() || (accumulator.getDuration() != duration)) { accumulator.setDuration(duration); accumulator.setUnit(unit); @@ -1851,7 +1861,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements if (isFFTI(siteDataKey)) { values = (FFTIRatioDiff) getFFTIData(siteDataKey); - if (values.getGuids() == null || values.getQpes() == null) { + if ((values.getGuids() == null) || (values.getQpes() == null)) { values.setReset(true); } } else { @@ -1859,7 +1869,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements } // This will only happen at initial load, update, and duration changes. - if (values.isReset() || values.getDuration() != duration) { + if (values.isReset() || (values.getDuration() != duration)) { values.setDuration(duration); values.setUnit(unit); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.fog/src/com/raytheon/uf/edex/plugin/fog/FogGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.fog/src/com/raytheon/uf/edex/plugin/fog/FogGenerator.java index 8a9aa4eefc..e71127fed7 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.fog/src/com/raytheon/uf/edex/plugin/fog/FogGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.fog/src/com/raytheon/uf/edex/plugin/fog/FogGenerator.java @@ -70,7 +70,6 @@ public class FogGenerator extends CompositeProductGenerator { FogRecord fogRec = new FogRecord(); this.setPluginDao(new FogDao(productType)); - fogRec.setPluginName(this.getCompositeProductType()); fogRec.setDataTime(this.getProductTime()); fogRec.setRefHour(TimeTools.roundToNearestHour(fogRec.getDataTime() .getValidTime())); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/common/FSSObsConfig.java b/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/common/FSSObsConfig.java index 04c05710cf..01f3a3ee1b 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/common/FSSObsConfig.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/common/FSSObsConfig.java @@ -41,7 +41,8 @@ import com.raytheon.uf.edex.plugin.fssobs.FSSObsUtils; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Nov 19, 2010 skorolev Initial creation + * Nov 19, 2010 skorolev Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -108,8 +109,8 @@ public class FSSObsConfig { tableRow.setRelativeHumidity(RH); } float[] snowData = FSSObsUtils.getSnowData(tableRow); - if (tableRow.getTemperature() != FSSObsUtils.MISSING - && tableRow.getDewpoint() != FSSObsUtils.MISSING) { + if ((tableRow.getTemperature() != FSSObsUtils.MISSING) + && (tableRow.getDewpoint() != FSSObsUtils.MISSING)) { // TODO to check if this is correct. calcdpd() in Meteolib tableRow.setDewpointDepr(tableRow.getTemperature() - tableRow.getDewpoint()); @@ -122,7 +123,6 @@ public class FSSObsConfig { tableRow.setWindChill(snowData[3]); tableRow.setFrostbiteTime(snowData[4]); - tableRow.setPluginName("fssobs"); tableRow.setCwa(cwa); tableRow.setMonitorUse(monitorUse); tableRow.setPlatformId(tableRow.getLocation().getStationId()); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/src/com/raytheon/uf/edex/plugin/ldadmesonet/MesonetDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/src/com/raytheon/uf/edex/plugin/ldadmesonet/MesonetDecoder.java index 1cdf0f192e..c6929e8080 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/src/com/raytheon/uf/edex/plugin/ldadmesonet/MesonetDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ldadmesonet/src/com/raytheon/uf/edex/plugin/ldadmesonet/MesonetDecoder.java @@ -68,6 +68,7 @@ import com.raytheon.uf.common.time.DataTime; * ----------- ---------- ----------- -------------------------- * Sep 04, 2009 vkorolev Initial creation * May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author vkorolev @@ -84,7 +85,7 @@ public class MesonetDecoder extends AbstractDecoder implements private String traceId = null; private String currentFile = null; - + public SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd HH:mm:ss"); public File confile; @@ -190,7 +191,6 @@ public class MesonetDecoder extends AbstractDecoder implements MesonetLdadRecord record = new MesonetLdadRecord(); SurfaceObsLocation location = new SurfaceObsLocation(); record.setDataProvider(dd.provider); - record.setPluginName(PLUGIN_NAME); record.setStationType(dd.type); record.setReportTime(dd.reportTime); record.setReportType(dd.storageType); @@ -241,9 +241,9 @@ public class MesonetDecoder extends AbstractDecoder implements } } // for // DataTime = Observation time - + Calendar ot = record.getObservationTime(); - if(ot != null) { + if (ot != null) { DataTime dt = new DataTime(ot); record.setDataTime(dt); record.setLocation(location); @@ -306,21 +306,22 @@ public class MesonetDecoder extends AbstractDecoder implements cal.setTimeZone(TimeZone.getTimeZone("GMT")); cal.setTime(ot); val = cal; - } catch(Exception e) { + } catch (Exception e) { abort = true; - logger.error("Could not parse date field [" + name + ":" + value + "] for file " + currentFile); + logger.error("Could not parse date field [" + name + ":" + + value + "] for file " + currentFile); } // only numbers } else { - + // Get rid of some troublesome data // TODO: find out what should be done with these values abort = "B".equals(value); abort |= "R".equals(value); abort |= "V".equals(value); abort |= "NAN0".equals(value); - - if(!abort) { + + if (!abort) { Double tval = null; try { tval = Double.parseDouble(value); @@ -333,20 +334,21 @@ public class MesonetDecoder extends AbstractDecoder implements } if (configFile.containsKey(vunit)) { Unit inUnit = null; - + Unit outUnit = null; - + try { - inUnit = (Unit) UnitFormat - .getUCUMInstance().parseObject( - configFile.getProperty(vunit)); - outUnit = (Unit) UnitFormat - .getUCUMInstance().parseObject( - configFile.getProperty(name)); + inUnit = (Unit) UnitFormat.getUCUMInstance() + .parseObject(configFile.getProperty(vunit)); + outUnit = (Unit) UnitFormat.getUCUMInstance() + .parseObject(configFile.getProperty(name)); tval = inUnit.getConverterTo(outUnit).convert( (tval).doubleValue()); } catch (ConversionException ce) { - logger.error("Property[" + fld.getName() + "]Input unit " + inUnit.getStandardUnit() + " not compatable with Output unit " + outUnit.getStandardUnit()); + logger.error("Property[" + fld.getName() + + "]Input unit " + inUnit.getStandardUnit() + + " not compatable with Output unit " + + outUnit.getStandardUnit()); return; } } @@ -361,7 +363,7 @@ public class MesonetDecoder extends AbstractDecoder implements } } } - if(!abort) { + if (!abort) { Class types = clazz; Method method = obj.getClass().getMethod(mname, types); method.invoke(obj, val); @@ -432,8 +434,7 @@ public class MesonetDecoder extends AbstractDecoder implements Class cls = record.getClass(); Field fieldlist[] = cls.getDeclaredFields(); - for (int i = 0; i < fieldlist.length; i++) { - Field fld = fieldlist[i]; + for (Field fld : fieldlist) { System.out.println("name = " + fld.getName()); System.out.println("decl class = " + fld.getDeclaringClass().getSimpleName()); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.lsr/src/com/raytheon/uf/edex/plugin/lsr/decoder/LSRParser.java b/edexOsgi/com.raytheon.uf.edex.plugin.lsr/src/com/raytheon/uf/edex/plugin/lsr/decoder/LSRParser.java index 5dbaff30a9..5ac9ffe7f0 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.lsr/src/com/raytheon/uf/edex/plugin/lsr/decoder/LSRParser.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.lsr/src/com/raytheon/uf/edex/plugin/lsr/decoder/LSRParser.java @@ -52,7 +52,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 21, 2009 1939 jkorman Initial creation + * Jan 21, 2009 1939 jkorman Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -137,18 +138,18 @@ public class LSRParser { } // private Pattern rptStartPtrn = Pattern.compile(TIME_PTRN); - private Pattern latlanPtrn = Pattern.compile(LATLON_PTRN); + private final Pattern latlanPtrn = Pattern.compile(LATLON_PTRN); /** The logger */ - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private final PointDataDescription pointDataDescription; private final LocalStormReportDao lsrDao; - private Map containerMap; + private final Map containerMap; - private String pluginName; + private final String pluginName; private WMOHeader wmoHeader; @@ -166,7 +167,7 @@ public class LSRParser { int currentReport = -1; - private HashMap URI_MAP = new HashMap(); + private final HashMap URI_MAP = new HashMap(); private List reports; @@ -361,7 +362,6 @@ public class LSRParser { .getWmoHeader()); rpt.setOfficeid(officeid); rpt.setTraceId(traceId); - rpt.setPluginName(pluginName); reports.add(rpt); } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/feature/Madis.java b/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/feature/Madis.java index 8bccaac549..b3883c8ed0 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/feature/Madis.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.madis.ogc/src/com/raytheon/uf/edex/plugin/madis/ogc/feature/Madis.java @@ -45,14 +45,16 @@ import com.raytheon.uf.edex.ogc.common.feature.ObsLocation; /** * Madis Feature Type + * *
- *                     
+ * 
  * SOFTWARE HISTORY
  * 
  * Date          Ticket#     Engineer    Description
  * -----------  ----------  ----------- --------------------------
- * 3/27/13      1746         dhladky    Initial creation
- * Jun 03, 2013 1763         dhladky    Altered QCD values map
+ * Mar 27, 2013 1746        dhladky     Initial creation
+ * Jun 03, 2013 1763        dhladky     Altered QCD values map
+ * Aug 30, 2013 2298        rjpeter     Make getPluginName abstract
  * 
* * @author dhladky @@ -60,118 +62,119 @@ import com.raytheon.uf.edex.ogc.common.feature.ObsLocation; */ @XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "madis", propOrder = { "provider", "sub_provider", "dataset", "restriction", "obsLocation", "timeObs", - "dewpoint", "dewpoint_qcd", "dewpoint_qca", "dewpoint_qcr", "rh", - "rh_qcd", "rh_qca", "rh_qcr", "altimeter", "altimeter_qcd", "altimeter_qca", - "altimeter_qcr", "temperature", "temperature_qcd", "temperature_qca", "temperature_qcr", - "windDirection", "windDirection_qcd", "windDirection_qca", "windDirection_qcr", - "precipRate", "precipRate_qcd", "precipRate_qca", "precipRate_qcr", "windSpeed", "windSpeed_qcd", - "windSpeed_qca", "windSpeed_qcr", "windGust", "windGust_qcd", "windGust_qca", "windGust_qcr", "precipitalWater", - "precipitalWater_qcd", "precipitalWater_qca", "precipitalWater_qcr", "pressure", - "pressure_qcd", "pressure_qca", "pressure_qcr"}) - +@XmlType(name = "madis", propOrder = { "provider", "sub_provider", "dataset", + "restriction", "obsLocation", "timeObs", "dewpoint", "dewpoint_qcd", + "dewpoint_qca", "dewpoint_qcr", "rh", "rh_qcd", "rh_qca", "rh_qcr", + "altimeter", "altimeter_qcd", "altimeter_qca", "altimeter_qcr", + "temperature", "temperature_qcd", "temperature_qca", "temperature_qcr", + "windDirection", "windDirection_qcd", "windDirection_qca", + "windDirection_qcr", "precipRate", "precipRate_qcd", "precipRate_qca", + "precipRate_qcr", "windSpeed", "windSpeed_qcd", "windSpeed_qca", + "windSpeed_qcr", "windGust", "windGust_qcd", "windGust_qca", + "windGust_qcr", "precipitalWater", "precipitalWater_qcd", + "precipitalWater_qca", "precipitalWater_qcr", "pressure", + "pressure_qcd", "pressure_qca", "pressure_qcr" }) public class Madis extends AbstractFeatureType { - + private static final int intNullVal = -9999; private static final float floatNullVal = -9999; - + protected String provider = ""; - + protected String sub_provider = ""; - + protected int restriction = intNullVal; - + protected int dataset = intNullVal; - + protected ObsLocation obsLocation; @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar timeObs; - + protected float dewpoint = floatNullVal; - + protected String dewpoint_qcd = QCD.MISSING.name(); - + protected int dewpoint_qca = intNullVal; - + protected int dewpoint_qcr = intNullVal; - + protected float rh = floatNullVal; - + protected String rh_qcd = QCD.MISSING.name(); - + protected int rh_qca = intNullVal; - + protected int rh_qcr = intNullVal; - + protected float altimeter = floatNullVal; - + protected String altimeter_qcd = QCD.MISSING.name(); - + protected int altimeter_qca = intNullVal; - + protected int altimeter_qcr = intNullVal; - + protected float temperature = floatNullVal; - + protected String temperature_qcd = QCD.MISSING.name(); - + protected int temperature_qca = intNullVal; - + protected int temperature_qcr = intNullVal; - + protected int windDirection = intNullVal; - + protected String windDirection_qcd = QCD.MISSING.name(); - + protected int windDirection_qca = intNullVal; - + protected int windDirection_qcr = intNullVal; - + protected float precipRate = floatNullVal; - + protected String precipRate_qcd = QCD.MISSING.name(); - + protected int precipRate_qca = intNullVal; - + protected int precipRate_qcr = intNullVal; protected float windSpeed = floatNullVal; - - protected String windSpeed_qcd = QCD.MISSING.name(); - - protected int windSpeed_qca = intNullVal; - - protected int windSpeed_qcr = intNullVal; - - protected float windGust = floatNullVal; - - protected String windGust_qcd = QCD.MISSING.name(); - - protected int windGust_qca = intNullVal; - - protected int windGust_qcr = intNullVal; - - protected float precipitalWater = floatNullVal; - - protected String precipitalWater_qcd = QCD.MISSING.name(); - - protected int precipitalWater_qca = intNullVal; - - protected int precipitalWater_qcr = intNullVal; - - protected float pressure = floatNullVal; - - protected String pressure_qcd = QCD.MISSING.name(); - - protected int pressure_qca = intNullVal; - - protected int pressure_qcr = intNullVal; - - private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(Madis.class); + protected String windSpeed_qcd = QCD.MISSING.name(); + + protected int windSpeed_qca = intNullVal; + + protected int windSpeed_qcr = intNullVal; + + protected float windGust = floatNullVal; + + protected String windGust_qcd = QCD.MISSING.name(); + + protected int windGust_qca = intNullVal; + + protected int windGust_qcr = intNullVal; + + protected float precipitalWater = floatNullVal; + + protected String precipitalWater_qcd = QCD.MISSING.name(); + + protected int precipitalWater_qca = intNullVal; + + protected int precipitalWater_qcr = intNullVal; + + protected float pressure = floatNullVal; + + protected String pressure_qcd = QCD.MISSING.name(); + + protected int pressure_qca = intNullVal; + + protected int pressure_qcr = intNullVal; + + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(Madis.class); /** * Converts a MADIS record to a MADIS feature @@ -179,7 +182,7 @@ public class Madis extends AbstractFeatureType { * @param record */ public Madis(MadisRecord record) { - + this.setProvider(record.getProvider()); this.setSub_provider(record.getSubProvider()); this.setDataset(getInt(record.getDataset(), intNullVal)); @@ -205,8 +208,10 @@ public class Madis extends AbstractFeatureType { this.setTemperature_qcr(getInt(record.getTemperature_qcr(), intNullVal)); this.setWindDirection(getInt(record.getWindDirection(), intNullVal)); this.setWindDirection_qcd(record.getWindDirection_qcd().name()); - this.setWindDirection_qca(getInt(record.getWindDirection_qca(), intNullVal)); - this.setWindDirection_qcr(getInt(record.getWindDirection_qcr(), intNullVal)); + this.setWindDirection_qca(getInt(record.getWindDirection_qca(), + intNullVal)); + this.setWindDirection_qcr(getInt(record.getWindDirection_qcr(), + intNullVal)); this.setPrecipRate(getFloat(record.getPrecipRate(), floatNullVal)); this.setPrecipRate_qcd(record.getPrecipRate_qcd().name()); this.setPrecipRate_qca(getInt(record.getPrecipRate_qca(), intNullVal)); @@ -219,29 +224,33 @@ public class Madis extends AbstractFeatureType { this.setWindGust_qcd(record.getWindGust_qcd().name()); this.setWindGust_qca(getInt(record.getWindGust_qca(), intNullVal)); this.setWindGust_qcr(getInt(record.getWindGust_qcr(), intNullVal)); - this.setPrecipitalWater(getFloat(record.getPrecipitalWater(), floatNullVal)); + this.setPrecipitalWater(getFloat(record.getPrecipitalWater(), + floatNullVal)); this.setPrecipitalWater_qcd(record.getPrecipitalWater_qcd().name()); - this.setPrecipitalWater_qca(getInt(record.getPrecipitalWater_qca(), intNullVal)); - this.setPrecipitalWater_qcr(getInt(record.getPrecipitalWater_qcr(), intNullVal)); + this.setPrecipitalWater_qca(getInt(record.getPrecipitalWater_qca(), + intNullVal)); + this.setPrecipitalWater_qcr(getInt(record.getPrecipitalWater_qcr(), + intNullVal)); this.setPressure(getFloat(record.getPressure(), floatNullVal)); this.setPressure_qcd(record.getPressure_qcd().name()); this.setPressure_qca(getInt(record.getPressure_qca(), intNullVal)); this.setPressure_qcr(getInt(record.getPressure_qcr(), intNullVal)); } - + /** * Converts a MADIS feature to a MADIS record + * * @return */ - public MadisRecord getRecord() { - + public MadisRecord getRecord() { + MadisRecord record = new MadisRecord(); - record.setPluginName(MadisRecord.PLUGIN_NAME); record.setProvider(this.getProvider()); record.setSubProvider(this.getSub_provider()); record.setDataset(this.getDataset()); record.setRestriction(this.getRestriction()); - Date date = new Date(this.getTimeObs().toGregorianCalendar().getTimeInMillis()); + Date date = new Date(this.getTimeObs().toGregorianCalendar() + .getTimeInMillis()); record.setDataTime(new DataTime(date)); record.setTimeObs(date); record.setLocation(getSfcObsLocation(this.getObsLocation())); @@ -290,7 +299,7 @@ public class Madis extends AbstractFeatureType { } public Madis() { - + } /* @@ -302,7 +311,7 @@ public class Madis extends AbstractFeatureType { public Madis createNewInstance() { return new Madis(); } - + public String getProvider() { return provider; } @@ -462,7 +471,7 @@ public class Madis extends AbstractFeatureType { public void setPrecipitalWater_qcd(String precipitalWater_qcd) { this.precipitalWater_qcd = precipitalWater_qcd; } - + public float getPressure() { return pressure; } @@ -622,7 +631,7 @@ public class Madis extends AbstractFeatureType { public void setPrecipitalWater_qcr(int precipitalWater_qcr) { this.precipitalWater_qcr = precipitalWater_qcr; } - + public int getPressure_qca() { return precipitalWater_qca; } @@ -638,7 +647,7 @@ public class Madis extends AbstractFeatureType { public void setPressure_qcr(int pressure_qcr) { this.pressure_qcr = pressure_qcr; } - + /** * Gets the value of the timeObs property. * @@ -659,7 +668,7 @@ public class Madis extends AbstractFeatureType { public void setTimeObs(XMLGregorianCalendar value) { this.timeObs = value; } - + protected XMLGregorianCalendar getCalendar(Calendar cal) { if (cal == null) { return null; @@ -674,7 +683,7 @@ public class Madis extends AbstractFeatureType { return null; } } - + private Integer getInt(int i, int nullVal) { if (i == nullVal) { return null; @@ -712,28 +721,32 @@ public class Madis extends AbstractFeatureType { public void setObsLocation(ObsLocation obsLocation) { this.obsLocation = obsLocation; } - - /**. + + /** + * . + * * @param obsLocation * @return */ private ObsLocation getObsLocation(SurfaceObsLocation from) { return new ObsLocation(from); } - + /** * transform to SfcObsLocation + * * @param obsLocation * @return */ private SurfaceObsLocation getSfcObsLocation(ObsLocation obsLocation) { - SurfaceObsLocation sol = new SurfaceObsLocation(obsLocation.getStationId()); + SurfaceObsLocation sol = new SurfaceObsLocation( + obsLocation.getStationId()); sol.setElevation(obsLocation.getElevation()); List points = obsLocation.getLocation().getPos().getValue(); sol.setLongitude(points.get(0)); sol.setLatitude(points.get(1)); - + return sol; } - + } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.madis/src/com/raytheon/uf/edex/plugin/madis/MadisDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.madis/src/com/raytheon/uf/edex/plugin/madis/MadisDecoder.java index d70ef474b8..318c57ae3e 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.madis/src/com/raytheon/uf/edex/plugin/madis/MadisDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.madis/src/com/raytheon/uf/edex/plugin/madis/MadisDecoder.java @@ -44,15 +44,17 @@ import com.raytheon.uf.edex.pointdata.spatial.ObStationDao; import com.vividsolutions.jts.geom.Coordinate; /** - * Decoder implementation for Madis data type. + * Decoder implementation for Madis data type. + * *
- *                     
+ * 
  * SOFTWARE HISTORY
  * 
  * Date          Ticket#     Engineer    Description
  * -----------  ----------  ----------- --------------------------
- * 3/27/13      1746         dhladky    Initial creation
- * 6/17/13       2113        dhladky    QPID memory usage alleviation
+ * Mar 27, 2013 1746        dhladky     Initial creation
+ * Jun 17, 2013 2113        dhladky     QPID memory usage alleviation
+ * Aug 30, 2013 2298        rjpeter     Make getPluginName abstract
  * 
* * @author dhladky @@ -62,26 +64,36 @@ import com.vividsolutions.jts.geom.Coordinate; public class MadisDecoder extends AbstractDecoder { private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(MadisDecoder.class); - - public static final String[] typeDHeader = new String[] {"STAID","OBDATE","OBTIME","PVDR","SUBPVDR","DS","RES","TD","D","RH","QCD","ALTSE","D","T","QCD","DD","D","FF","QCD","ELEV","D","LAT","QCD","LON","D","PCPRATE","D","FFGUST","D","PWV","D", "P", "D"}; - - public static final String[] typeFHeader = new String[] {"STAID","OBDATE","OBTIME","PVDR","SUBPVDR","DS","RES","TD","D","QCA","QCR","RH","D","QCA","QCR","ALTSE","D","QCA","QCR","T","D","QCA","QCR","DD","D","QCA","QCR","FF","D","QCA","QCR","ELEV","D","QCA","QCR","LAT","D","QCA","QCR","LON","QCA","QCR","D","PCPRATE","D","QCA","QCR","FFGUST","D","QCA","QCR","PWV","D","QCA","QCR","P","D","QCA","QCR"}; - + .getHandler(MadisDecoder.class); + + public static final String[] typeDHeader = new String[] { "STAID", + "OBDATE", "OBTIME", "PVDR", "SUBPVDR", "DS", "RES", "TD", "D", + "RH", "QCD", "ALTSE", "D", "T", "QCD", "DD", "D", "FF", "QCD", + "ELEV", "D", "LAT", "QCD", "LON", "D", "PCPRATE", "D", "FFGUST", + "D", "PWV", "D", "P", "D" }; + + public static final String[] typeFHeader = new String[] { "STAID", + "OBDATE", "OBTIME", "PVDR", "SUBPVDR", "DS", "RES", "TD", "D", + "QCA", "QCR", "RH", "D", "QCA", "QCR", "ALTSE", "D", "QCA", "QCR", + "T", "D", "QCA", "QCR", "DD", "D", "QCA", "QCR", "FF", "D", "QCA", + "QCR", "ELEV", "D", "QCA", "QCR", "LAT", "D", "QCA", "QCR", "LON", + "QCA", "QCR", "D", "PCPRATE", "D", "QCA", "QCR", "FFGUST", "D", + "QCA", "QCR", "PWV", "D", "QCA", "QCR", "P", "D", "QCA", "QCR" }; + private static final Pattern regex = Pattern.compile(","); - + private static final String BLANK = ""; - + private static final float MISSING_FLOAT = -99999; - + private static final String STRING_NULL = "null"; - + private static final int MISSING_INT = -99999; - + private static final Pattern QUOTES_PATTERN = Pattern.compile("\""); private final String PLUGIN_NAME; - + private static ThreadLocal madisDateFormat = new ThreadLocal() { @Override @@ -92,9 +104,9 @@ public class MadisDecoder extends AbstractDecoder { } }; - + private static final String MADIS_DATE_FORMAT = "MM/dd/yyyy HH:mm"; - + /** * Required constructor. */ @@ -102,7 +114,6 @@ public class MadisDecoder extends AbstractDecoder { PLUGIN_NAME = pluginName; } - /** * Decoder for MADIS * @@ -110,8 +121,7 @@ public class MadisDecoder extends AbstractDecoder { * @return * @throws DecoderException */ - public PluginDataObject[] decode(String path) - throws DecoderException { + public PluginDataObject[] decode(String path) throws DecoderException { // de-serialize the object from the path long time = System.currentTimeMillis(); @@ -120,8 +130,8 @@ public class MadisDecoder extends AbstractDecoder { if (mio != null) { - statusHandler.handle(Priority.INFO, - "Starting MADIS record decode."); + statusHandler + .handle(Priority.INFO, "Starting MADIS record decode."); List retList = new ArrayList(); String[] headerType = mio.getHeader(); int i = 0; @@ -152,7 +162,7 @@ public class MadisDecoder extends AbstractDecoder { File file = new File(path); if (file.exists()) { file.delete(); - } + } } if (!retList.isEmpty()) { @@ -160,7 +170,7 @@ public class MadisDecoder extends AbstractDecoder { retVal = retList.toArray(new PluginDataObject[size]); } } - + if (retVal.length == 0) { statusHandler.handle(Priority.WARN, "No MADIS data decoded!!!! Bad file format!"); @@ -184,7 +194,7 @@ public class MadisDecoder extends AbstractDecoder { MadisRecord rec = null; - if (!line.isEmpty() && headerType != null) { + if (!line.isEmpty() && (headerType != null)) { if (headerType.length == typeDHeader.length) { rec = processTypeD(line, headerType); @@ -204,7 +214,8 @@ public class MadisDecoder extends AbstractDecoder { * Creates a MadisRecord from a type D file * * @param line - * @param String[] + * @param String + * [] * @return */ private MadisRecord processTypeD(String line, String[] headerType) { @@ -221,7 +232,7 @@ public class MadisDecoder extends AbstractDecoder { QCD td_qcd = QCD.MISSING; // 8 float rh = MISSING_FLOAT; // 9 QCD rh_qcd = QCD.MISSING; // 10 - float altimeter = MISSING_FLOAT; //11 + float altimeter = MISSING_FLOAT; // 11 QCD altimeter_qcd = QCD.MISSING; // 12 float temperature = MISSING_FLOAT; // 13 QCD temperature_qcd = QCD.MISSING; // 14 @@ -243,9 +254,9 @@ public class MadisDecoder extends AbstractDecoder { QCD precipitalWater_qcd = QCD.MISSING;// 30 float pressure = MISSING_FLOAT;// 31 QCD pressure_qcd = QCD.MISSING;// 32 - + String[] commaSepList = null; - + try { commaSepList = regex.split(line); @@ -253,7 +264,6 @@ public class MadisDecoder extends AbstractDecoder { if (commaSepList.length == typeDHeader.length) { rec = new MadisRecord(); - rec.setPluginName(PLUGIN_NAME); int i = 0; // get STAID stationId = trimQuotes(commaSepList[i++]).trim(); @@ -269,28 +279,32 @@ public class MadisDecoder extends AbstractDecoder { // get PVDR provider = trimQuotes(commaSepList[i++]).trim(); rec.setProvider(provider); - + // get SUBPVDR sub_provider = trimQuotes(commaSepList[i++]).trim(); - if(sub_provider.equals(BLANK)) { + if (sub_provider.equals(BLANK)) { rec.setSubProvider(STRING_NULL); } else { rec.setSubProvider(sub_provider); } // the Dataset value - dataset = new Integer(trimQuotes(commaSepList[i++]).trim()).intValue(); + dataset = new Integer(trimQuotes(commaSepList[i++]).trim()) + .intValue(); rec.setDataset(dataset); // the Restriction value - restriction = new Integer(trimQuotes(commaSepList[i++]).trim()).intValue(); + restriction = new Integer(trimQuotes(commaSepList[i++]).trim()) + .intValue(); rec.setRestriction(restriction); // get TD - td = new Float(trimQuotes(commaSepList[i++]).trim()).floatValue(); + td = new Float(trimQuotes(commaSepList[i++]).trim()) + .floatValue(); rec.setDewpoint(td); // get TD QCD td_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); rec.setDewpoint_qcd(td_qcd); // get RH - rh = new Float(trimQuotes(commaSepList[i++]).trim()).floatValue(); + rh = new Float(trimQuotes(commaSepList[i++]).trim()) + .floatValue(); rec.setRh(rh); // get RH QCD rh_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); @@ -300,7 +314,8 @@ public class MadisDecoder extends AbstractDecoder { .floatValue(); rec.setAltimeter(altimeter); // get Altimeter QCD - altimeter_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + altimeter_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setAltimeter_qcd(altimeter_qcd); // get Temperature temperature = new Float(trimQuotes(commaSepList[i++]).trim()) @@ -315,33 +330,37 @@ public class MadisDecoder extends AbstractDecoder { .intValue(); rec.setWindDirection(windDirection); // get Wind Direction QCD - windDirection_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) - .trim()); + windDirection_qcd = QCD + .fromString(trimQuotes(commaSepList[i++]).trim()); rec.setWindDirection_qcd(windDirection_qcd); // wind speed windSpeed = new Float(trimQuotes(commaSepList[i++]).trim()) .intValue(); rec.setWindSpeed(windSpeed); // get Wind Speed QCD - windSpeed_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + windSpeed_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setWindSpeed_qcd(windSpeed_qcd); // get Elevation elevation = new Float(trimQuotes(commaSepList[i++]).trim()) .intValue(); // get Elevation QCD - elevation_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + elevation_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setElevation_qcd(elevation_qcd); // get Latitude latitude = new Float(trimQuotes(commaSepList[i++]).trim()) .floatValue(); // get Latitude QCD - latitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + latitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setLatitude_qcd(latitude_qcd); // get Longitude longitude = new Float(trimQuotes(commaSepList[i++]).trim()) .floatValue(); // get Longitude QCD - longitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + longitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setLongitude_qcd(longitude_qcd); // get precipRate precipRate = new Float(trimQuotes(commaSepList[i++]).trim()) @@ -356,22 +375,24 @@ public class MadisDecoder extends AbstractDecoder { .floatValue(); rec.setWindGust(windGust); // get Wind Gust QCD - windGust_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + windGust_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setWindGust_qcd(windGust_qcd); // get precipitalWater - precipitalWater = new Float(trimQuotes(commaSepList[i++]).trim()) - .floatValue(); + precipitalWater = new Float(trimQuotes(commaSepList[i++]) + .trim()).floatValue(); rec.setPrecipitalWater(precipitalWater); // get precipitalWater QCD - precipitalWater_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) - .trim()); + precipitalWater_qcd = QCD.fromString(trimQuotes( + commaSepList[i++]).trim()); rec.setPrecipitalWater_qcd(precipitalWater_qcd); // get pressure pressure = new Float(trimQuotes(commaSepList[i++]).trim()) .floatValue(); rec.setPressure(pressure); // get pressure QCD - pressure_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + pressure_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setPressure_qcd(pressure_qcd); // Take care of creating the station @@ -457,7 +478,7 @@ public class MadisDecoder extends AbstractDecoder { QCD pressure_qcd = QCD.MISSING;// 56 int pressure_qca = MISSING_INT; // 57 int pressure_qcr = MISSING_INT; // 58 - + String[] commaSepList = null; try { @@ -467,7 +488,6 @@ public class MadisDecoder extends AbstractDecoder { if (commaSepList.length == typeFHeader.length) { rec = new MadisRecord(); - rec.setPluginName(PLUGIN_NAME); int i = 0; // get STAID stationId = trimQuotes(commaSepList[i++]).trim(); @@ -483,23 +503,26 @@ public class MadisDecoder extends AbstractDecoder { // get PVDR provider = trimQuotes(commaSepList[i++]).trim(); rec.setProvider(provider); - + // get SUBPVDR sub_provider = trimQuotes(commaSepList[i++]).trim(); - if(sub_provider.equals(BLANK)) { + if (sub_provider.equals(BLANK)) { rec.setSubProvider(STRING_NULL); } else { rec.setSubProvider(sub_provider); } - + // the Dataset value - dataset = new Integer(trimQuotes(commaSepList[i++]).trim()).intValue(); + dataset = new Integer(trimQuotes(commaSepList[i++]).trim()) + .intValue(); rec.setDataset(dataset); // the Restriction value - restriction = new Integer(trimQuotes(commaSepList[i++]).trim()).intValue(); + restriction = new Integer(trimQuotes(commaSepList[i++]).trim()) + .intValue(); rec.setRestriction(restriction); // get TD - td = new Float(trimQuotes(commaSepList[i++]).trim()).floatValue(); + td = new Float(trimQuotes(commaSepList[i++]).trim()) + .floatValue(); rec.setDewpoint(td); // get TD QCD td_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); @@ -513,7 +536,8 @@ public class MadisDecoder extends AbstractDecoder { .intValue(); rec.setDewpoint_qcr(td_qcr); // get RH - rh = new Float(trimQuotes(commaSepList[i++]).trim()).floatValue(); + rh = new Float(trimQuotes(commaSepList[i++]).trim()) + .floatValue(); rec.setRh(rh); // get RH QCD rh_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); @@ -531,15 +555,16 @@ public class MadisDecoder extends AbstractDecoder { .floatValue(); rec.setAltimeter(altimeter); // get Altimeter QCD - altimeter_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + altimeter_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setAltimeter_qcd(altimeter_qcd); // get Altimeter QCA - altimeter_qca = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + altimeter_qca = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setAltimeter_qca(altimeter_qca); // get Altimeter QCR - altimeter_qcr = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + altimeter_qcr = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setAltimeter_qcr(altimeter_qcr); // get Temperature temperature = new Float(trimQuotes(commaSepList[i++]).trim()) @@ -562,8 +587,8 @@ public class MadisDecoder extends AbstractDecoder { .intValue(); rec.setWindDirection(windDirection); // get Wind Direction QCD - windDirection_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) - .trim()); + windDirection_qcd = QCD + .fromString(trimQuotes(commaSepList[i++]).trim()); rec.setWindDirection_qcd(windDirection_qcd); // get WindDirection QCA windDirection_qca = new Integer(trimQuotes(commaSepList[i++]) @@ -578,35 +603,38 @@ public class MadisDecoder extends AbstractDecoder { .intValue(); rec.setWindSpeed(windSpeed); // get Wind Speed QCD - windSpeed_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + windSpeed_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setWindSpeed_qcd(windSpeed_qcd); // get WindSpeed QCA - windSpeed_qca = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + windSpeed_qca = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setWindSpeed_qca(windSpeed_qca); // get WindSpeed QCR - windSpeed_qcr = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + windSpeed_qcr = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setWindSpeed_qcr(windSpeed_qcr); // get Elevation elevation = new Float(trimQuotes(commaSepList[i++]).trim()) .intValue(); // get Elevation QCD - elevation_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + elevation_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setElevation_qcd(elevation_qcd); // get Elevation QCA - elevation_qca = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + elevation_qca = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setElevation_qca(elevation_qca); // get Elevation QCR - elevation_qcr = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + elevation_qcr = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setElevation_qcr(elevation_qcr); // get Latitude latitude = new Float(trimQuotes(commaSepList[i++]).trim()) .floatValue(); // get Latitude QCD - latitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + latitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setLatitude_qcd(latitude_qcd); // get latitude QCA latitude_qca = new Integer(trimQuotes(commaSepList[i++]).trim()) @@ -620,15 +648,16 @@ public class MadisDecoder extends AbstractDecoder { longitude = new Float(trimQuotes(commaSepList[i++]).trim()) .floatValue(); // get Longitude QCD - longitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + longitude_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setLongitude_qcd(longitude_qcd); // get longitude QCA - longitude_qca = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + longitude_qca = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setLongitude_qca(longitude_qca); // get longitude QCR - longitude_qcr = new Integer(trimQuotes(commaSepList[i++]).trim()) - .intValue(); + longitude_qcr = new Integer(trimQuotes(commaSepList[i++]) + .trim()).intValue(); rec.setLongitude_qcr(longitude_qcr); // get precipRate precipRate = new Float(trimQuotes(commaSepList[i++]).trim()) @@ -651,7 +680,8 @@ public class MadisDecoder extends AbstractDecoder { .floatValue(); rec.setWindGust(windGust); // get Wind Gust QCD - windGust_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + windGust_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setWindGust_qcd(windGust_qcd); // get Wind Gust QCA windGust_qca = new Integer(trimQuotes(commaSepList[i++]).trim()) @@ -662,12 +692,12 @@ public class MadisDecoder extends AbstractDecoder { .intValue(); rec.setPrecipRate_qcr(windGust_qcr); // get precipitalWater - precipitalWater = new Float(trimQuotes(commaSepList[i++]).trim()) - .floatValue(); + precipitalWater = new Float(trimQuotes(commaSepList[i++]) + .trim()).floatValue(); rec.setPrecipitalWater(precipitalWater); // get precipitalWater QCD - precipitalWater_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) - .trim()); + precipitalWater_qcd = QCD.fromString(trimQuotes( + commaSepList[i++]).trim()); rec.setPrecipitalWater_qcd(precipitalWater_qcd); // get precipitalWater QCA precipitalWater_qca = new Integer(trimQuotes(commaSepList[i++]) @@ -682,7 +712,8 @@ public class MadisDecoder extends AbstractDecoder { .floatValue(); rec.setPressure(pressure); // get pressure QCD - pressure_qcd = QCD.fromString(trimQuotes(commaSepList[i++]).trim()); + pressure_qcd = QCD.fromString(trimQuotes(commaSepList[i++]) + .trim()); rec.setPressure_qcd(pressure_qcd); // get pressure QCA pressure_qca = new Integer(trimQuotes(commaSepList[i++]).trim()) @@ -717,7 +748,7 @@ public class MadisDecoder extends AbstractDecoder { return QUOTES_PATTERN.matcher(val).replaceAll(BLANK); } - + /** * Look for station info * @@ -738,39 +769,43 @@ public class MadisDecoder extends AbstractDecoder { return station; } - + /** * Sets the time if applicable + * * @param obsDate * @param obsTime * @param rec * @return */ - private MadisRecord setTimeObs(String obsDate, String obsTime, MadisRecord rec, String[] headerType) { - - if (obsDate != null && obsTime != null) { + private MadisRecord setTimeObs(String obsDate, String obsTime, + MadisRecord rec, String[] headerType) { + + if ((obsDate != null) && (obsTime != null)) { StringBuilder sb = new StringBuilder(); sb.append(obsDate); sb.append(" "); sb.append(obsTime); - sb.append(":01"); - + sb.append(":01"); + try { Date time = getDateFormatter().get().parse(sb.toString()); rec.setTimeObs(time); - + } catch (ParseException e) { - statusHandler.handle(Priority.PROBLEM, "Can't parse Madis date format!", e); + statusHandler.handle(Priority.PROBLEM, + "Can't parse Madis date format!", e); } } - + return rec; } - + /** * Sets the station location info + * * @param stationId * @param latitude * @param longitude @@ -778,8 +813,9 @@ public class MadisDecoder extends AbstractDecoder { * @param rec * @return */ - private MadisRecord setObsLocation(String stationId, float latitude, float longitude, int elevation, MadisRecord rec) { - + private MadisRecord setObsLocation(String stationId, float latitude, + float longitude, int elevation, MadisRecord rec) { + ObStation station = getStationInfo(stationId); SurfaceObsLocation loc = new SurfaceObsLocation(stationId); @@ -800,8 +836,9 @@ public class MadisDecoder extends AbstractDecoder { loc.assignLatitude(latitude); } if (elevation != MISSING_INT) { - if (loc.getElevation() != elevation) + if (loc.getElevation() != elevation) { loc.setElevation(elevation); + } } } else { loc.assignLongitude(longitude); @@ -820,18 +857,20 @@ public class MadisDecoder extends AbstractDecoder { return rec; } - + /** * Get the date formatter + * * @return */ private ThreadLocal getDateFormatter() { - + return madisDateFormat; } - + /** * Sets the time and basically finishes the record decode + * * @param rec * @return */ @@ -840,10 +879,10 @@ public class MadisDecoder extends AbstractDecoder { rec.setDataTime(new DataTime(rec.getTimeObs())); return rec; } catch (Exception e) { - statusHandler.handle(Priority.ERROR, - "Can't set Madis Record URI! " + rec.getStationId(), e); + statusHandler.handle(Priority.ERROR, "Can't set Madis Record URI! " + + rec.getStationId(), e); } - + return null; } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/MESOWestDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/MESOWestDecoder.java index be6bcf1e5c..3b90cfe1bc 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/MESOWestDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/MESOWestDecoder.java @@ -37,27 +37,28 @@ import com.raytheon.uf.edex.plugin.mesowest.decoder.MESOWestParser; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Mar 3, 2009            jkorman     Initial creation
- *
+ * Mar 03, 2009            jkorman     Initial creation
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ public class MESOWestDecoder { - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private String pluginName = "mesowest"; - private Map parserMap = new HashMap(); - + private final Map parserMap = new HashMap(); + /** * * @param name @@ -77,27 +78,28 @@ public class MESOWestDecoder { PluginDataObject[] decodedData = null; String traceId = null; - + logger.debug("MESOWestDecoder.decode()"); - - if(input != null) { - traceId = (String) input.getProperty(MESOWestConstants.TRACEID); + + if (input != null) { + traceId = input.getProperty(MESOWestConstants.TRACEID); MESOWestRecord record = null; - + String type = input.getProperty(MESOWestConstants.K_DATATYPE); - if(MESOWestConstants.T_PARMHEADER.equals(type)) { - parserMap.put(input.getProperty("uuid"),new MESOWestParser(input.getReport())); + if (MESOWestConstants.T_PARMHEADER.equals(type)) { + parserMap.put(input.getProperty("uuid"), new MESOWestParser( + input.getReport())); logger.debug("Created parser "); } else if (MESOWestConstants.T_LASTITEM.equals(type)) { parserMap.remove(input.getProperty("uuid")); logger.debug("Destroyed parser "); } else { - MESOWestParser parser = parserMap.get(input.getProperty("uuid")); - if(parser != null) { - if(input.getReport().length() > 10) { - if((record = parser.decode(input.getReport())) != null) { - record.setPluginName(pluginName); + MESOWestParser parser = parserMap + .get(input.getProperty("uuid")); + if (parser != null) { + if (input.getReport().length() > 10) { + if ((record = parser.decode(input.getReport())) != null) { record.setTraceId(traceId); record.setObsText(input.getReport() + "\n"); } @@ -106,15 +108,16 @@ public class MESOWestDecoder { logger.error("Unexpected data in data stream"); } } - + try { if (record != null) { logger.info("Decoded obs " + record.getStationId()); - + try { record.constructDataURI(); } catch (PluginException e) { - throw new DecoderException("Unable to construct dataURI", e); + throw new DecoderException( + "Unable to construct dataURI", e); } decodedData = new PluginDataObject[] { record }; @@ -124,7 +127,7 @@ public class MESOWestDecoder { } catch (Exception e) { logger.error("Error in MESOWestDecoder", e); } finally { - if(decodedData == null) { + if (decodedData == null) { decodedData = new PluginDataObject[0]; } } @@ -134,7 +137,7 @@ public class MESOWestDecoder { return decodedData; } - + /** * @return the pluginName */ diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/common/MESOWestRecord.java b/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/common/MESOWestRecord.java index 2eb7f65b23..04a4dfc50b 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/common/MESOWestRecord.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.mesowest/src/com/raytheon/uf/edex/plugin/mesowest/common/MESOWestRecord.java @@ -63,10 +63,11 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Mar 3, 2009 jkorman Initial creation - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Mar 03, 2009 jkorman Initial creation + * 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 * * * @@ -79,15 +80,15 @@ import com.vividsolutions.jts.geom.Geometry; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public class MESOWestRecord extends PluginDataObject implements ISpatialEnabled, -IDecoderGettable { - +public class MESOWestRecord extends PluginDataObject implements + ISpatialEnabled, IDecoderGettable { + private static final long serialVersionUID = 1L; public static final String OBS_TEXT = "text"; - + public static final Unit LENGTH_UNIT = SI.METER; - + public static final Unit TEMPERATURE_UNIT = SI.KELVIN; public static final Unit WIND_SPEED_UNIT = SI.METERS_PER_SECOND; @@ -109,10 +110,10 @@ IDecoderGettable { PARM_MAP.put("PMSL", PRES_SLP); PARM_MAP.put("NLAT", STA_LAT); PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("STA","STA"); - PARM_MAP.put("stationid","STA"); - PARM_MAP.put("message",OBS_TEXT); - PARM_MAP.put(OBS_TEXT,OBS_TEXT); + PARM_MAP.put("STA", "STA"); + PARM_MAP.put("stationid", "STA"); + PARM_MAP.put("message", OBS_TEXT); + PARM_MAP.put(OBS_TEXT, OBS_TEXT); } @DataURI(position = 1) @@ -131,7 +132,7 @@ IDecoderGettable { @XmlElement @DynamicSerializeElement private SurfaceObsLocation location; - + // Observation air temperature in degrees Kelvin. @Column @DynamicSerializeElement @@ -155,7 +156,7 @@ IDecoderGettable { @DynamicSerializeElement @XmlElement private Double minT24; - + // Relative Humidity in percent. @Column @DynamicSerializeElement @@ -197,7 +198,7 @@ IDecoderGettable { @DynamicSerializeElement @XmlElement private Double altimeter; - + // Observation precip in mm. @Column @DynamicSerializeElement @@ -209,7 +210,7 @@ IDecoderGettable { @DynamicSerializeElement @XmlElement private Double precip_01M; - + // 5 minute precip in inches. @Column @DynamicSerializeElement @@ -257,13 +258,13 @@ IDecoderGettable { @DynamicSerializeElement @XmlElement private Double precip_24H; - + // Raw observation text @Column @DynamicSerializeElement @XmlElement private String obsText; - + /** * */ @@ -280,8 +281,7 @@ IDecoderGettable { public MESOWestRecord(String uri) { super(uri); } - - + /** * Get this observation's geometry. * @@ -290,7 +290,7 @@ IDecoderGettable { public Geometry getGeometry() { return location.getGeometry(); } - + /** * Get the geometry latitude. * @@ -308,7 +308,7 @@ IDecoderGettable { public double getLongitude() { return location.getLongitude(); } - + /** * Get the station identifier for this observation. * @@ -326,7 +326,7 @@ IDecoderGettable { public Integer getElevation() { return location.getElevation(); } - + /** * @return the location */ @@ -335,7 +335,8 @@ IDecoderGettable { } /** - * @param location the location to set + * @param location + * the location to set */ public void setLocation(SurfaceObsLocation location) { this.location = location; @@ -343,7 +344,7 @@ IDecoderGettable { /** * - * @return + * @return */ public String getNetworkType() { return networkType; @@ -351,7 +352,7 @@ IDecoderGettable { /** * - * @return + * @return */ public void setNetworkType(String type) { networkType = type; @@ -373,7 +374,7 @@ IDecoderGettable { } // ****************************************** - + /** * @return the temp */ @@ -382,7 +383,8 @@ IDecoderGettable { } /** - * @param temp the temp to set + * @param temp + * the temp to set */ public void setTemp(Double temp) { this.temp = temp; @@ -396,12 +398,13 @@ IDecoderGettable { } /** - * @param dwpt the dwpt to set + * @param dwpt + * the dwpt to set */ public void setDwpt(Double dwpt) { this.dwpt = dwpt; } - + /** * @return the maxT24 */ @@ -410,7 +413,8 @@ IDecoderGettable { } /** - * @param maxT24 the maxT24 to set + * @param maxT24 + * the maxT24 to set */ public void setMaxT24(Double maxT24) { this.maxT24 = maxT24; @@ -424,7 +428,8 @@ IDecoderGettable { } /** - * @param minT24 the minT24 to set + * @param minT24 + * the minT24 to set */ public void setMinT24(Double minT24) { this.minT24 = minT24; @@ -438,7 +443,8 @@ IDecoderGettable { } /** - * @param humidity the humidity to set + * @param humidity + * the humidity to set */ public void setHumidity(Double humidity) { this.humidity = humidity; @@ -452,7 +458,8 @@ IDecoderGettable { } /** - * @param windDirection the windDirection to set + * @param windDirection + * the windDirection to set */ public void setWindDirection(Double windDirection) { this.windDirection = windDirection; @@ -466,7 +473,8 @@ IDecoderGettable { } /** - * @param windSpeed the windSpeed to set + * @param windSpeed + * the windSpeed to set */ public void setWindSpeed(Double windSpeed) { this.windSpeed = windSpeed; @@ -480,12 +488,13 @@ IDecoderGettable { } /** - * @param windGust the windGust to set + * @param windGust + * the windGust to set */ public void setWindGust(Double windGust) { this.windGust = windGust; } - + /** * @return the pressure */ @@ -494,12 +503,13 @@ IDecoderGettable { } /** - * @param pressure the pressure to set + * @param pressure + * the pressure to set */ public void setPressure(Double pressure) { this.pressure = pressure; } - + /** * @return the seaLevelPressure */ @@ -508,7 +518,8 @@ IDecoderGettable { } /** - * @param seaLevelPressure the seaLevelPressure to set + * @param seaLevelPressure + * the seaLevelPressure to set */ public void setSeaLevelPressure(Double seaLevelPressure) { this.seaLevelPressure = seaLevelPressure; @@ -522,12 +533,12 @@ IDecoderGettable { } /** - * @param altimeter the altimeter to set + * @param altimeter + * the altimeter to set */ public void setAltimeter(Double altimeter) { this.altimeter = altimeter; } - /** * @return the precip @@ -537,7 +548,8 @@ IDecoderGettable { } /** - * @param precip the precip to set + * @param precip + * the precip to set */ public void setPrecip(Double precip) { this.precip = precip; @@ -551,7 +563,8 @@ IDecoderGettable { } /** - * @param precip_01M the precip_01M to set + * @param precip_01M + * the precip_01M to set */ public void setPrecip_01M(Double precip_01M) { this.precip_01M = precip_01M; @@ -565,7 +578,8 @@ IDecoderGettable { } /** - * @param precip_05M the precip_05M to set + * @param precip_05M + * the precip_05M to set */ public void setPrecip_05M(Double precip_05M) { this.precip_05M = precip_05M; @@ -579,7 +593,8 @@ IDecoderGettable { } /** - * @param precip_10M the precip_10M to set + * @param precip_10M + * the precip_10M to set */ public void setPrecip_10M(Double precip_10M) { this.precip_10M = precip_10M; @@ -593,7 +608,8 @@ IDecoderGettable { } /** - * @param precip_15M the precip_15M to set + * @param precip_15M + * the precip_15M to set */ public void setPrecip_15M(Double precip_15M) { this.precip_15M = precip_15M; @@ -607,7 +623,8 @@ IDecoderGettable { } /** - * @param precip_30M the precip_30M to set + * @param precip_30M + * the precip_30M to set */ public void setPrecip_30M(Double precip_30M) { this.precip_30M = precip_30M; @@ -621,7 +638,8 @@ IDecoderGettable { } /** - * @param precip_01H the precip_01H to set + * @param precip_01H + * the precip_01H to set */ public void setPrecip_01H(Double precip_01H) { this.precip_01H = precip_01H; @@ -635,7 +653,8 @@ IDecoderGettable { } /** - * @param precip_03H the precip_03H to set + * @param precip_03H + * the precip_03H to set */ public void setPrecip_03H(Double precip_03H) { this.precip_03H = precip_03H; @@ -649,7 +668,8 @@ IDecoderGettable { } /** - * @param precip_06H the precip_06H to set + * @param precip_06H + * the precip_06H to set */ public void setPrecip_06H(Double precip_06H) { this.precip_06H = precip_06H; @@ -663,7 +683,8 @@ IDecoderGettable { } /** - * @param precip_24H the precip_24H to set + * @param precip_24H + * the precip_24H to set */ public void setPrecip_24H(Double precip_24H) { this.precip_24H = precip_24H; @@ -677,12 +698,13 @@ IDecoderGettable { } /** - * @param obsText the obsText to set + * @param obsText + * the obsText to set */ public void setObsText(String obsText) { this.obsText = obsText; } - + // ****************************************** /** @@ -691,7 +713,7 @@ IDecoderGettable { public void setSpatialObject(SurfaceObsLocation loc) { location = loc; } - + /** * */ @@ -699,10 +721,10 @@ IDecoderGettable { public SurfaceObsLocation getSpatialObject() { return location; } - + /** - * This class implements IDecoderGettable so return this - * instance. + * This class implements IDecoderGettable so return this instance. + * * @return The reference to this instance. */ @Override @@ -722,7 +744,7 @@ IDecoderGettable { } else if (OBS_TEXT.equals(pName)) { retValue = getStationId(); } - + return retValue; } @@ -730,7 +752,7 @@ IDecoderGettable { public String[] getStrings(String paramName) { return null; } - + @Override public Amount getValue(String paramName) { Amount a = null; @@ -755,10 +777,10 @@ IDecoderGettable { } else if (PRES_SLP.equals(pName)) { a = new Amount(seaLevelPressure, PRESSURE_UNIT); } - + return a; } - + /** * */ @@ -766,11 +788,16 @@ IDecoderGettable { public Collection getValues(String paramName) { return null; } - + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "mesowest"; + } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.sounding/src/com/raytheon/uf/edex/plugin/npp/sounding/NPPSoundingDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.npp.sounding/src/com/raytheon/uf/edex/plugin/npp/sounding/NPPSoundingDecoder.java index 8ca9ec0a69..d6007ea832 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.sounding/src/com/raytheon/uf/edex/plugin/npp/sounding/NPPSoundingDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp.sounding/src/com/raytheon/uf/edex/plugin/npp/sounding/NPPSoundingDecoder.java @@ -57,7 +57,8 @@ import com.raytheon.uf.edex.plugin.npp.AbstractNPPDecoder; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 4, 2013 mschenke Initial creation + * Jan 04, 2013 mschenke Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -67,14 +68,14 @@ import com.raytheon.uf.edex.plugin.npp.AbstractNPPDecoder; public class NPPSoundingDecoder extends AbstractNPPDecoder { - private IUFStatusHandler statusHandler = UFStatus + private final IUFStatusHandler statusHandler = UFStatus .getHandler(NPPSoundingDecoder.class); private static final String LATITUDE_DATASET_ID = "Latitude@"; private static final String LONGITUDE_DATASET_ID = "Longitude@"; - private String pluginName; + private final String pluginName; private NPPSoundingDao pluginDao; @@ -128,7 +129,7 @@ public class NPPSoundingDecoder extends AbstractNPPDecoder { longitude = var; } } - if (latitude == null || longitude == null) { + if ((latitude == null) || (longitude == null)) { throw new DecoderException("Unable to find lat/lon information"); } @@ -142,7 +143,6 @@ public class NPPSoundingDecoder extends AbstractNPPDecoder { // Create PDO for lat/lon entry NPPSoundingRecord record = (NPPSoundingRecord) pluginDao .newObject(); - record.setPluginName(pluginName); record.setDataTime(dataTime); record.setLatitude((double) latArray.getFloat(i)); record.setLongitude((double) lonArray.getFloat(i)); @@ -182,7 +182,7 @@ public class NPPSoundingDecoder extends AbstractNPPDecoder { } else if (sourceNumDims == 1) { read1D(records, var, name); } - } else if (sourceNumDims == 1 && destNumDims == 2) { + } else if ((sourceNumDims == 1) && (destNumDims == 2)) { read1Dto2D(records, var, name); } } @@ -209,8 +209,8 @@ public class NPPSoundingDecoder extends AbstractNPPDecoder { String parameter) throws IOException { int numLevels = var.getDimension(0).getLength(); Array data = var.read(); - for (int i = 0; i < records.length; i++) { - PointDataView pdv = records[i].getPointDataView(); + for (NPPSoundingRecord record : records) { + PointDataView pdv = record.getPointDataView(); for (int j = 0; j < numLevels; j++) { float value = data.getFloat(j); pdv.setFloat(parameter, value, j); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/PrecipRateGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/PrecipRateGenerator.java index a4eb34215c..b336638cae 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/PrecipRateGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/PrecipRateGenerator.java @@ -48,8 +48,9 @@ import com.raytheon.uf.edex.plugin.preciprate.common.PrecipRateConfig; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 01/25/10 3796 D. Hladky Initial release - * 02/25/13 1660 D. Hladky Fixed SCAN configuration bug. + * Jan 25, 2010 3796 D. Hladky Initial release + * Feb 25, 2013 1660 D. Hladky Fixed SCAN configuration bug. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -58,15 +59,15 @@ import com.raytheon.uf.edex.plugin.preciprate.common.PrecipRateConfig; */ public class PrecipRateGenerator extends CompositeProductGenerator implements -MonitorConfigListener{ - + MonitorConfigListener { + private static final IUFStatusHandler statusHandler = UFStatus .getHandler(PrecipRateGenerator.class); private static final String genName = "PrecipRate"; private static final String productType = "preciprate"; - + /** run configuration manager **/ public SCANRunSiteConfigurationManager srcm = null; @@ -98,7 +99,7 @@ MonitorConfigListener{ if (!configValid) { statusHandler.handle(Priority.WARN, - "Configuration for PrecipRate(scan) is invalid!!!"); + "Configuration for PrecipRate(scan) is invalid!!!"); return; } @@ -136,7 +137,6 @@ MonitorConfigListener{ PrecipRateRecord precipRateRec = new PrecipRateRecord(); this.setPluginDao(new PrecipRateDao(productType)); - precipRateRec.setPluginName(this.getCompositeProductType()); precipRateRec.setDataTime(this.getProductTime()); precipRateRec.setIcao(preciprate_config.getIcao()); precipRateRec.setGateResolution(preciprate_config.getDHR() @@ -165,8 +165,7 @@ MonitorConfigListener{ precipRateRec.setAcoefficent(pr.getDhrMap().get( DHRValues.ZRMULTCOEFF)); - precipRateRec.setBias(pr.getDhrMap().get( - DHRValues.BIAS)); + precipRateRec.setBias(pr.getDhrMap().get(DHRValues.BIAS)); precipRateRec.setHailcap(pr.getDhrMap().get( DHRValues.MAXPRECIPRATEALLOW)); precipRateRec.setCoefficent(pr.getDhrMap().get( @@ -192,12 +191,13 @@ MonitorConfigListener{ @Override public void configChanged(MonitorConfigEvent fce) { if (fce.getSource() instanceof SCANRunSiteConfigurationManager) { - statusHandler.handle(Priority.INFO, - "Re-configuring PrecipRate URI filters...Run Site Config change"); + statusHandler + .handle(Priority.INFO, + "Re-configuring PrecipRate URI filters...Run Site Config change"); resetFilters(); } } - + /** * run config manager * diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.qc/src/com/raytheon/uf/edex/plugin/qc/QCScanner.java b/edexOsgi/com.raytheon.uf.edex.plugin.qc/src/com/raytheon/uf/edex/plugin/qc/QCScanner.java index b8c39b423c..5c77463dda 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.qc/src/com/raytheon/uf/edex/plugin/qc/QCScanner.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.qc/src/com/raytheon/uf/edex/plugin/qc/QCScanner.java @@ -45,8 +45,8 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory; import com.raytheon.uf.edex.plugin.qc.dao.QCDao; /** - * Scans NetCDF files generated by A1 legacy applications and generates - * QCRecord instances that refer to their records. + * Scans NetCDF files generated by A1 legacy applications and generates QCRecord + * instances that refer to their records. * *
  * 
@@ -58,6 +58,7 @@ import com.raytheon.uf.edex.plugin.qc.dao.QCDao;
  * Mar 07, 2013 15842      D. Friedman Use Java NetCDF library instead of
  *                                     pupynere
  * May 16, 2013 1869       bsteffen    Remove DataURI column from qc.
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
  * 
  * 
* @@ -66,7 +67,7 @@ import com.raytheon.uf.edex.plugin.qc.dao.QCDao; */ public class QCScanner { private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(QCScanner.class); + .getHandler(QCScanner.class); private Integer maxRecordsInChunk; @@ -123,8 +124,10 @@ public class QCScanner { private static final int ID_LENGTH = 24; private class QCDirectoryScanner { - private String qcType; - private File directory; + private final String qcType; + + private final File directory; + private QCDao qcDao; public QCDirectoryScanner(String qcType, File directory) { @@ -140,8 +143,9 @@ public class QCScanner { try { scanFile(fn); } catch (Exception e) { - statusHandler.error(String.format("error reading %s/%s: %s", - directory, fn, e.getMessage()), e); + statusHandler.error(String.format( + "error reading %s/%s: %s", directory, fn, + e.getMessage()), e); } } } @@ -151,60 +155,68 @@ public class QCScanner { NetcdfFile nc = NetcdfFile.open(new File(directory, fn).toString()); try { int index = qcDao.getMaxRecordIndex(qcType, fn); - if (index < 0) + if (index < 0) { index = 0; - else + } else { index += 1; + } int nRecords = nc.getUnlimitedDimension().getLength(); - if (index >= nRecords) + if (index >= nRecords) { return; + } String[] idVariablesNames = nc - .findGlobalAttribute("idVariables") - .getStringValue().split(","); + .findGlobalAttribute("idVariables").getStringValue() + .split(","); String[] timeVariableNames = nc - .findGlobalAttribute("timeVariables") - .getStringValue().split(","); + .findGlobalAttribute("timeVariables").getStringValue() + .split(","); Variable[] idVariables = new Variable[idVariablesNames.length]; - for (int i = 0; i < idVariables.length; ++i) + for (int i = 0; i < idVariables.length; ++i) { idVariables[i] = nc.findVariable(idVariablesNames[i]); + } Variable vObsTime = nc.findVariable(timeVariableNames[0]); - double vObsTimeFillValue = vObsTime.findAttribute("_FillValue").getNumericValue().doubleValue(); + double vObsTimeFillValue = vObsTime.findAttribute("_FillValue") + .getNumericValue().doubleValue(); Double vObsTimeMissingValue = null; Attribute a = vObsTime.findAttribute("missing_value"); - if (a != null) + if (a != null) { vObsTimeMissingValue = a.getNumericValue().doubleValue(); + } Variable vLat = nc.findVariable("latitude"); Variable vLon = nc.findVariable("longitude"); Variable vElev = nc.findVariable("elevation"); while (index < nRecords) { - PluginDataObject[] records = new PluginDataObject[Math.min(maxRecordsInChunk, nRecords - index)]; + PluginDataObject[] records = new PluginDataObject[Math.min( + maxRecordsInChunk, nRecords - index)]; int[] ofs = new int[] { index }; int[] len = new int[] { records.length }; Section sec = new Section(); - sec.appendRange(index, index + records.length - 1); + sec.appendRange(index, (index + records.length) - 1); sec.appendRange(); Array dObsTime = vObsTime.read(ofs, len); Array dLat = vLat.read(ofs, len); Array dLon = vLon.read(ofs, len); Array dElev = vElev.read(ofs, len); ArrayChar[] dIDs = new ArrayChar[idVariables.length]; - for (int i = 0; i < dIDs.length; ++i) + for (int i = 0; i < dIDs.length; ++i) { dIDs[i] = (ArrayChar) idVariables[i].read(sec); + } int ri = 0; int oi = 0; while (ri < records.length) { QCRecord r = new QCRecord(); - r.setPluginName("qc"); double obsTime = dObsTime.getDouble(ri); - if (obsTime != vObsTimeFillValue && - (vObsTimeMissingValue == null || - vObsTimeMissingValue != obsTime)) { - r.setDataTime(new DataTime(new Date((long)(obsTime * 1000)))); + if ((obsTime != vObsTimeFillValue) + && ((vObsTimeMissingValue == null) || (vObsTimeMissingValue != obsTime))) { + r.setDataTime(new DataTime(new Date( + (long) (obsTime * 1000)))); SurfaceObsLocation loc = new SurfaceObsLocation(); - loc.assignLocation(dLat.getDouble(ri), dLon.getDouble(ri)); + loc.assignLocation(dLat.getDouble(ri), + dLon.getDouble(ri)); loc.setElevation(dElev.getInt(ri)); - StringBuilder stationId = new StringBuilder(ID_LENGTH); + StringBuilder stationId = new StringBuilder( + ID_LENGTH); for (ArrayChar idArray : dIDs) { stationId.append(idArray.getString(ri)); } @@ -218,8 +230,9 @@ public class QCScanner { ++index; ++ri; } - if (oi < records.length) + if (oi < records.length) { records = Arrays.copyOf(records, oi); + } target.acceptRecords(records); } } finally { diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.qpf/src/com/raytheon/uf/edex/plugin/qpf/QPFGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.qpf/src/com/raytheon/uf/edex/plugin/qpf/QPFGenerator.java index 4ecea91968..0589fa24fe 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.qpf/src/com/raytheon/uf/edex/plugin/qpf/QPFGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.qpf/src/com/raytheon/uf/edex/plugin/qpf/QPFGenerator.java @@ -48,10 +48,11 @@ import com.raytheon.uf.edex.plugin.qpf.common.QPFConfig; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 02/07/2009 1981 dhladky Initial Creation. - * 04/27/2012 #562 dgilling Accept getter and setter - * renames in QPFRecord. - * 02/25/13 1660 D. Hladky Fixed configuration bug in scan. + * Feb 07, 2009 1981 dhladky Initial Creation. + * Apr 27, 2012 562 dgilling Accept getter and setter renames in + * QPFRecord. + * Feb 25, 2013 1660 D. Hladky Fixed configuration bug in scan. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -163,7 +164,6 @@ public class QPFGenerator extends CompositeProductGenerator implements .getNumBins()); } - qpfRec.setPluginName(this.getCompositeProductType()); qpfRec.setIcao(qpf_config.getIcao()); qpfRec.setDataTime(this.getProductTime()); qpfRec.setSpatialInfo(qpf_config.getSpatialInfo()); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/src/com/raytheon/uf/edex/plugin/satellite/mcidas/McidasSatelliteDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/src/com/raytheon/uf/edex/plugin/satellite/mcidas/McidasSatelliteDecoder.java index 45d31869c2..c55436c775 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/src/com/raytheon/uf/edex/plugin/satellite/mcidas/McidasSatelliteDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/src/com/raytheon/uf/edex/plugin/satellite/mcidas/McidasSatelliteDecoder.java @@ -98,7 +98,8 @@ public class McidasSatelliteDecoder { /** * - * @param data The file byte array data to be decoded. + * @param data + * The file byte array data to be decoded. * @return The decoded data record(s). * @return * @throws Exception @@ -160,13 +161,13 @@ public class McidasSatelliteDecoder { /* int creationHhmmss = */buf.getInt(); int bandMap1to32 = buf.getInt(); int bandMap33to64 = buf.getInt(); - buf.position(buf.position() + 4 * 4); // sensor specific - buf.position(buf.position() + 4 * 8); // memo + buf.position(buf.position() + (4 * 4)); // sensor specific + buf.position(buf.position() + (4 * 8)); // memo int areaNumber = buf.getInt(); int dataBlockOffset = buf.getInt(); int navBlockOffset = buf.getInt(); /* int validityCode = */buf.getInt(); - buf.position(buf.position() + 8 * 4); // PDL + buf.position(buf.position() + (8 * 4)); // PDL buf.getInt(); // GOES AA band 8 /* int imageYyyddd = */buf.getInt(); /* int imageHhmmssOrMillis = */buf.getInt(); @@ -176,7 +177,7 @@ public class McidasSatelliteDecoder { /* int prefixBandListLength = */buf.getInt(); buf.getInt(); // source type buf.getInt(); // cal type - buf.position(buf.position() + 3 * 4); // reserved + buf.position(buf.position() + (3 * 4)); // reserved /* int originalSourceType = */buf.getInt(); // actually a 4cc? /* int units = */buf.getInt(); // also 4cc? /* int scaling = */buf.getInt(); @@ -218,7 +219,8 @@ public class McidasSatelliteDecoder { rec.setCoverage(coverage); // TODO: Line pad if not a multiple of four bytes - if (linePrefixLength == 0 && nBytesPerElement == 1 && nBands == 1) { + if ((linePrefixLength == 0) && (nBytesPerElement == 1) + && (nBands == 1)) { byte[] imageBytes = new byte[nLines * nElementsPerLine]; buf.position(dataBlockOffset); buf.get(imageBytes); @@ -227,7 +229,7 @@ public class McidasSatelliteDecoder { } else if (nBytesPerElement == 1) { byte[] imageBytes = new byte[nLines * nElementsPerLine]; - int si = dataBlockOffset + ri * nBytesPerElement; + int si = dataBlockOffset + (ri * nBytesPerElement); int di = 0; int eincr = nBands * nBytesPerElement; for (int y = 0; y < nLines; ++y) { @@ -243,7 +245,6 @@ public class McidasSatelliteDecoder { rec.setTraceId(traceId); rec.setPersistenceTime(TimeTools.getSystemCalendar().getTime()); - rec.setPluginName("satellite"); rec.constructDataURI(); // Set the data into the IDataRecord @@ -303,22 +304,22 @@ public class McidasSatelliteDecoder { double dy = spacingAtStdLatInMeters * yImgRes; double phi0r = clat * DTR; - double rxp = ((double) (elementOfEquator - ulX) / xImgRes + 1.); - double ryp = (ny - (double) (lineOfEquator - ulY) / yImgRes); + double rxp = (((double) (elementOfEquator - ulX) / xImgRes) + 1.); + double ryp = (ny - ((double) (lineOfEquator - ulY) / yImgRes)); double dxp = 1. - rxp; double dyp = 1. - ryp; double rm = dx * dyp; double rcos = radiusInMeters * Math.cos(phi0r); double arg = Math.exp(rm / rcos); - la1 = (float) ((2. * Math.atan(arg) - HALFPI) * RTD); - lo1 = (float) prnlon((clon + ((dx * dxp) / rcos) * RTD)); + la1 = (float) (((2. * Math.atan(arg)) - HALFPI) * RTD); + lo1 = (float) prnlon((clon + (((dx * dxp) / rcos) * RTD))); dxp = nx - rxp; dyp = ny - ryp; rm = dx * dyp; arg = Math.exp(rm / rcos); - la2 = (float) ((2. * Math.atan(arg) - HALFPI) * RTD); - lo2 = (float) prnlon((clon + ((dx * dxp) / rcos) * RTD)); + la2 = (float) (((2. * Math.atan(arg)) - HALFPI) * RTD); + lo2 = (float) prnlon((clon + (((dx * dxp) / rcos) * RTD))); lo2 = (float) prnlon(lo2); result = SatSpatialFactory.getInstance().getMapCoverage( @@ -332,11 +333,11 @@ public class McidasSatelliteDecoder { } private static double prnlon(double lon) { - double dlon = lon - (int) (lon / 360.f) * 360.f; + double dlon = lon - ((int) (lon / 360.f) * 360.f); if (lon < -180.) { dlon = lon + 360.f; } else if (lon > 180.) { - dlon = (double) (lon - 360.); + dlon = lon - 360.; } return dlon; } @@ -345,12 +346,12 @@ public class McidasSatelliteDecoder { Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); cal.setTimeInMillis(0); - cal.set(Calendar.YEAR, +1900 + yyyddd / 1000); + cal.set(Calendar.YEAR, +1900 + (yyyddd / 1000)); cal.set(Calendar.DAY_OF_YEAR, yyyddd % 1000); int hh = hhmmss / 10000; cal.set(Calendar.HOUR_OF_DAY, hh); - cal.set(Calendar.MINUTE, (hhmmss - hh * 10000) / 100); + cal.set(Calendar.MINUTE, (hhmmss - (hh * 10000)) / 100); cal.set(Calendar.SECOND, hhmmss % 100); return cal; @@ -358,9 +359,9 @@ public class McidasSatelliteDecoder { private static double unpackDdmmss(int ddmmss) { int dd = ddmmss / 10000; - int mm = (ddmmss - dd * 10000) / 100; + int mm = (ddmmss - (dd * 10000)) / 100; int ss = ddmmss % 100; - return dd + mm / 60.0 + ss / 3600.0; + return dd + (mm / 60.0) + (ss / 3600.0); } private static double flipLon(double lon, boolean flip) { diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/ScanGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/ScanGenerator.java index cd58a1715c..512f6c3326 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/ScanGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.scan/src/com/raytheon/uf/edex/plugin/scan/ScanGenerator.java @@ -55,7 +55,8 @@ import com.raytheon.uf.edex.dat.utils.ScanDataCache; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 02/25/13 1660 D. Hladky Fixed SCAN configuration bug. + * Feb 25, 2013 1660 D. Hladky Fixed SCAN configuration bug. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -101,13 +102,14 @@ public class ScanGenerator extends CompositeProductGenerator implements try { getRunConfig().readConfigXml(); } catch (SerializationException e) { - statusHandler.handle(Priority.ERROR, "Couldn't read scan configuration!!!", e); + statusHandler.handle(Priority.ERROR, + "Couldn't read scan configuration!!!", e); } boolean configValid = getRunConfig().isPopulated(); if (!configValid) { statusHandler.handle(Priority.WARN, - "Configuration for SCAN is invalid!!!"); + "Configuration for SCAN is invalid!!!"); return; } @@ -202,7 +204,6 @@ public class ScanGenerator extends CompositeProductGenerator implements ScanRecord scanRec = new ScanRecord(); scanRec.setType(type); scanRec.setTilt(sfilter.getTilt(table)); - scanRec.setPluginName(this.getCompositeProductType()); scanRec.setIcao(sfilter.getIcao()); scanRec.setLastElevationAngle(tables.get(table) .getLastElevationAngle()); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/src/com/raytheon/uf/edex/plugin/svrwx/decoder/SvrWxParser.java b/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/src/com/raytheon/uf/edex/plugin/svrwx/decoder/SvrWxParser.java index 6615047df4..5497f0825c 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/src/com/raytheon/uf/edex/plugin/svrwx/decoder/SvrWxParser.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.svrwx/src/com/raytheon/uf/edex/plugin/svrwx/decoder/SvrWxParser.java @@ -51,7 +51,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 04, 2010 jsanchez Initial creation + * Jan 04, 2010 jsanchez Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -61,23 +62,23 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; public class SvrWxParser { /** The logger */ - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); private final PointDataDescription pointDataDescription; private final SvrWxRecordDao svrWxDao; - private Map containerMap; + private final Map containerMap; private WMOHeader wmoHeader; - private String pluginName; + private final String pluginName; private String traceId; int currentReport = -1; - private HashMap URI_MAP = new HashMap(); + private final HashMap URI_MAP = new HashMap(); private List reports; @@ -260,13 +261,12 @@ public class SvrWxParser { parseTimeRangeLine(rpt.getReportLine()); break; case REPORT_TYPE: - if (reportType != null && eventKey != null) { + if ((reportType != null) && (eventKey != null)) { SurfaceObsLocation location = new SurfaceObsLocation( stationId); location.setLongitude(longitude.doubleValue()); location.setLatitude(latitude.doubleValue()); svrWxRecord = new SvrWxRecord(); - svrWxRecord.setPluginName(pluginName); svrWxRecord.setReportType(reportType); svrWxRecord.setGreenTime(greenTime); svrWxRecord.setLocation(location); @@ -278,13 +278,12 @@ public class SvrWxParser { clearData(); break; case EVENT_LN: - if (reportType != null && eventKey != null) { + if ((reportType != null) && (eventKey != null)) { SurfaceObsLocation location = new SurfaceObsLocation( stationId); location.setLongitude(longitude.doubleValue()); location.setLatitude(latitude.doubleValue()); svrWxRecord = new SvrWxRecord(); - svrWxRecord.setPluginName(pluginName); svrWxRecord.setReportType(reportType); svrWxRecord.setGreenTime(greenTime); svrWxRecord.setLocation(location); @@ -301,19 +300,18 @@ public class SvrWxParser { break; case EXTRA: String s = rpt.getReportLine().trim(); - if (s.length() != 0 && remarks != null) { + if ((s.length() != 0) && (remarks != null)) { remarks += " " + s; } break; case END: - if (reportType != null && eventKey != null) { + if ((reportType != null) && (eventKey != null)) { SurfaceObsLocation location = new SurfaceObsLocation( stationId); location.setLongitude(longitude.doubleValue()); location.setLatitude(latitude.doubleValue()); svrWxRecord = new SvrWxRecord(); svrWxRecord.setReportType(reportType); - svrWxRecord.setPluginName(pluginName); svrWxRecord.setGreenTime(greenTime); svrWxRecord.setLocation(location); svrWxRecord.setDataTime(refTime); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/HURData.java b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/HURData.java index 16a6de95f4..030401f393 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/HURData.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/HURData.java @@ -39,173 +39,190 @@ import com.vividsolutions.jts.geom.Coordinate; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Oct 26, 2009            jsanchez     Initial creation
- *
+ * Oct 26, 2009            jsanchez    Initial creation
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ -public class HURData extends TCGDataAdapter{ - - private List forecastTimes = new ArrayList(); - - private HashMap> coordinates = new HashMap>(); - - public HURData(PointDataDescription pdd, TropicalCycloneGuidanceDao dao, String pluginName) { - super(pdd,dao,pluginName); +public class HURData extends TCGDataAdapter { + + private final List forecastTimes = new ArrayList(); + + private final HashMap> coordinates = new HashMap>(); + + public HURData(PointDataDescription pdd, TropicalCycloneGuidanceDao dao, + String pluginName) { + super(pdd, dao, pluginName); } - - public List findReports(byte [] message) { - + + @Override + public List findReports(byte[] message) { + List reports = new ArrayList(); List parts = InternalReport.identifyMessage(message); - - if(parts != null) { + + if (parts != null) { clearData(); - for(InternalReport iRpt : parts) { + for (InternalReport iRpt : parts) { InternalType t = iRpt.getLineType(); String s = iRpt.getReportLine(); - if (InternalType.PRODUCT.equals(t)) { + if (InternalType.PRODUCT.equals(t)) { productType = s; } else if (InternalType.DATA_INFO.equals(t)) { parseDataInfo(s); } else if (InternalType.DATETIME_INFO.equals(t)) { parseDateTimeInfo(s); - } else if(InternalType.MODEL_INFO.equals(t)) { + } else if (InternalType.MODEL_INFO.equals(t)) { parseModelInfo(s); - } else if(InternalType.END.equals(t)) { - for(String model : coordinates.keySet()) { + } else if (InternalType.END.equals(t)) { + for (String model : coordinates.keySet()) { List list = coordinates.get(model); - if(list.size() == forecastTimes.size()) { + if (list.size() == forecastTimes.size()) { for (int i = 0; i < list.size(); i++) { TropicalCycloneGuidance rpt = new TropicalCycloneGuidance(); - SurfaceObsLocation location = new SurfaceObsLocation(stationId); + SurfaceObsLocation location = new SurfaceObsLocation( + stationId); location.setLongitude(list.get(i).x); location.setLatitude(list.get(i).y); - + rpt.setWmoHeader(wmoHeader.getWmoHeader()); rpt.setTraceId(traceId); - rpt.setPluginName(pluginName); rpt.setStormName(stormName); rpt.setType(stormType); rpt.setProductType(productType); - rpt.setModelName(model); + rpt.setModelName(model); rpt.setLocation(location); - rpt.setInsertTime(Calendar.getInstance(TimeZone.getTimeZone("GMT"))); + rpt.setInsertTime(Calendar.getInstance(TimeZone + .getTimeZone("GMT"))); DataTime dt; - if(i != 0){ + if (i != 0) { int fcstTime = new Double( - (forecastTimes.get(i).getValidTime().getTimeInMillis() - - refTime.getValidTime().getTimeInMillis())/1000L).intValue(); - dt = new DataTime(refTime.getRefTimeAsCalendar(),fcstTime); + (forecastTimes.get(i) + .getValidTime() + .getTimeInMillis() - refTime + .getValidTime() + .getTimeInMillis()) / 1000L) + .intValue(); + dt = new DataTime( + refTime.getRefTimeAsCalendar(), + fcstTime); } else { - dt = new DataTime(refTime.getRefTimeAsCalendar()); + dt = new DataTime( + refTime.getRefTimeAsCalendar()); } rpt.setDataTime(dt); reports.add(rpt); } - } + } } clearData(); - } + } } } return reports; } - + private void parseModelInfo(String modelInfo) { Pattern modelPtrn = Pattern.compile(InternalReport.MODEL_PTRN); Pattern latlonPtrn = Pattern.compile(InternalReport.LATLON_PTRN); Matcher m = modelPtrn.matcher(modelInfo); - if(m.find()) { + if (m.find()) { String model = m.group(); List coordinate = coordinates.get(model); if (coordinate == null) { coordinate = new ArrayList(); } m = latlonPtrn.matcher(modelInfo); - while(m.find()){ + while (m.find()) { String latlon[] = m.group().split(" "); int n = latlon.length - 1; - - double lon = Double.valueOf(latlon[n].trim().substring(0, latlon[n].length() - 1)); - double lat = Double.valueOf(latlon[0].trim().substring(0, latlon[0].length() - 1)); - lon = latlon[n].charAt(latlon[n].length() - 1) == 'E'? lon : lon * -1; - lat = latlon[0].charAt(latlon[0].length() - 1) == 'N'? lat : lat * -1; - - Coordinate c = new Coordinate(lon,lat); + double lon = Double.valueOf(latlon[n].trim().substring(0, + latlon[n].length() - 1)); + double lat = Double.valueOf(latlon[0].trim().substring(0, + latlon[0].length() - 1)); + + lon = latlon[n].charAt(latlon[n].length() - 1) == 'E' ? lon + : lon * -1; + lat = latlon[0].charAt(latlon[0].length() - 1) == 'N' ? lat + : lat * -1; + + Coordinate c = new Coordinate(lon, lat); coordinate.add(c); } coordinates.put(model, coordinate); - + } } - + private void parseDateTimeInfo(String dateTimeInfo) { - Pattern dateTimePtrn = Pattern.compile(InternalReport.DATETIME); + Pattern dateTimePtrn = Pattern.compile(InternalReport.DATETIME); Matcher m = dateTimePtrn.matcher(dateTimeInfo); while (m.find()) { - //YYMMDD HHMM - String yy = m.group().substring(0,2); - if(Integer.valueOf(yy) < 70) { + // YYMMDD HHMM + String yy = m.group().substring(0, 2); + if (Integer.valueOf(yy) < 70) { yy = "20" + yy; } else { yy = "19" + yy; } int year = Integer.valueOf(yy); - int month = Integer.valueOf(m.group().substring(2,4)); - int day = Integer.valueOf(m.group().substring(4,6)); - int hour = Integer.valueOf(m.group().substring(8,10)); + int month = Integer.valueOf(m.group().substring(2, 4)); + int day = Integer.valueOf(m.group().substring(4, 6)); + int hour = Integer.valueOf(m.group().substring(8, 10)); int minute = Integer.valueOf(m.group().substring(10)); - forecastTimes.add(getDataTime(year, month, day, hour, minute, "GMT")); + forecastTimes + .add(getDataTime(year, month, day, hour, minute, "GMT")); } } - + private void parseDataInfo(String dataInfo) { Pattern stationIdPtrn = Pattern.compile(InternalReport.STATIONID_PTRN); Pattern refTimePtrn = Pattern.compile(InternalReport.REFTIME_PTRN); Matcher m = stationIdPtrn.matcher(dataInfo); - - if(m.find()) { - stationId = m.group().substring(1,m.group().length()-1); + + if (m.find()) { + stationId = m.group().substring(1, m.group().length() - 1); } - + m = refTimePtrn.matcher(dataInfo); - if(m.find()){ - //Reference Time - //YYYYMMDD HHMM + if (m.find()) { + // Reference Time + // YYYYMMDD HHMM int year = Integer.valueOf(m.group().substring(0, 4)); int month = Integer.valueOf(m.group().substring(4, 6)); int day = Integer.valueOf(m.group().substring(6, 8)); - int hour = Integer.valueOf(m.group().substring(9,11)); + int hour = Integer.valueOf(m.group().substring(9, 11)); int minute = Integer.valueOf(m.group().substring(11)); - refTime = getDataTime(year, month, day, hour, minute,"UTC"); + refTime = getDataTime(year, month, day, hour, minute, "UTC"); } else { refTime = new DataTime(); } - + int index = setStormType(dataInfo); - + if (index != -1) { - stormName = dataInfo.substring(index,dataInfo.indexOf("(")).trim(); + stormName = dataInfo.substring(index, dataInfo.indexOf("(")).trim(); } } - - private void refreshMaps(){ + + private void refreshMaps() { coordinates.put("BAMS", null); coordinates.put("BAMD", null); coordinates.put("BAMD", null); coordinates.put("LBAR", null); } - - public void clearData(){ + + @Override + public void clearData() { refreshMaps(); forecastTimes.clear(); stationId = null; @@ -213,5 +230,5 @@ public class HURData extends TCGDataAdapter{ stormName = null; refTime = null; } - + } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/QLMData.java b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/QLMData.java index ae8031bd0b..875d78261a 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/QLMData.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/QLMData.java @@ -40,11 +40,11 @@ import com.raytheon.uf.edex.plugin.tcg.TropicalCycloneGuidanceDao; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Oct 26, 2009 jsanchez Initial creation - * Jun 28, 2012 #826 dgilling Use wmoHeader headerDate to - * set refTime so times are set - * correctly when processing archive - * data. + * Oct 26, 2009 jsanchez Initial creation + * Jun 28, 2012 826 dgilling Use wmoHeader headerDate to set refTime + * so times are set correctly when + * processing archive data. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -67,7 +67,7 @@ public class QLMData extends TCGDataAdapter { } } - private List list = new ArrayList(); + private final List list = new ArrayList(); private static final int MAX_FORECASTS = 22; @@ -94,7 +94,7 @@ public class QLMData extends TCGDataAdapter { } else if (InternalType.FORECAST_POSITION_INFO.equals(t)) { parseForecastPositionInfo(s); } else if (InternalType.STORM_DISSIPATED.equals(t) - || list.size() == MAX_FORECASTS) { + || (list.size() == MAX_FORECASTS)) { boolean firstValue = true; for (ForecastPosition fp : list) { TropicalCycloneGuidance rpt = new TropicalCycloneGuidance(); @@ -105,7 +105,6 @@ public class QLMData extends TCGDataAdapter { rpt.setWmoHeader(wmoHeader.getWmoHeader()); rpt.setTraceId(traceId); - rpt.setPluginName(pluginName); rpt.setStormName(stormName); rpt.setType(stormType); rpt.setProductType(productType); diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/TCEData.java b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/TCEData.java index 4fe0296c2d..664e5e8614 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/TCEData.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.tcg/src/com/raytheon/uf/edex/plugin/tcg/decoder/TCEData.java @@ -37,76 +37,82 @@ import com.raytheon.uf.edex.plugin.tcg.TropicalCycloneGuidanceDao; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Nov 12, 2009            jsanchez     Initial creation
- *
+ * Nov 12, 2009            jsanchez    Initial creation
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ -public class TCEData extends TCGDataAdapter{ - +public class TCEData extends TCGDataAdapter { + private float latitude = -9999; - + private float longitude = -9999; - + private int month; - + private int year; - + private int day; - + private int hour; - + private int minute; - - public TCEData(PointDataDescription pdd, TropicalCycloneGuidanceDao dao, String pluginName) { - super(pdd,dao,pluginName); + + public TCEData(PointDataDescription pdd, TropicalCycloneGuidanceDao dao, + String pluginName) { + super(pdd, dao, pluginName); } - - public List findReports(byte [] message) { + + @Override + public List findReports(byte[] message) { List reports = new ArrayList(); List parts = InternalReport.identifyMessage(message); - if(parts != null) { + if (parts != null) { clearData(); - for(InternalReport iRpt : parts) { + for (InternalReport iRpt : parts) { InternalType t = iRpt.getLineType(); String s = iRpt.getReportLine(); if (InternalType.PRODUCT.equals(t)) { productType = s; - } else if(InternalType.STORM_TYPE_INFO.equals(t)){ + } else if (InternalType.STORM_TYPE_INFO.equals(t)) { parseStormTypeInfo(s); - } else if(InternalType.STATIONID.equals(t)){ + } else if (InternalType.STATIONID.equals(t)) { parseStationIdInfo(s); - } else if(InternalType.INIT_TIME_INFO.equals(t)){ + } else if (InternalType.INIT_TIME_INFO.equals(t)) { parseInitTimeInfo(s); - } else if(InternalType.TCE_REFHOUR.equals(t)){ + } else if (InternalType.TCE_REFHOUR.equals(t)) { parseRefhour(s); - } else if(InternalType.LATITUDE.equals(t)){ + } else if (InternalType.LATITUDE.equals(t)) { parseLatitude(s); - } else if(InternalType.LONGITUDE.equals(t)){ + } else if (InternalType.LONGITUDE.equals(t)) { parseLongitude(s); - } else if(InternalType.END.equals(t)){ - if(latitude != -9999 && longitude != -9999){ + } else if (InternalType.END.equals(t)) { + if ((latitude != -9999) && (longitude != -9999)) { TropicalCycloneGuidance rpt = new TropicalCycloneGuidance(); - SurfaceObsLocation location = new SurfaceObsLocation(stationId); - location.setLongitude((double)longitude); - location.setLatitude((double)latitude); + SurfaceObsLocation location = new SurfaceObsLocation( + stationId); + location.setLongitude((double) longitude); + location.setLatitude((double) latitude); rpt.setWmoHeader(wmoHeader.getWmoHeader()); rpt.setTraceId(traceId); - rpt.setPluginName(pluginName); rpt.setStormName(stormName); rpt.setType(stormType); - rpt.setProductType(productType); + rpt.setProductType(productType); rpt.setLocation(location); - rpt.setInsertTime(Calendar.getInstance(TimeZone.getTimeZone("GMT"))); - refTime = getDataTime(year, month, day, hour, minute, "GMT"); - DataTime dt = new DataTime(refTime.getRefTimeAsCalendar()); + rpt.setInsertTime(Calendar.getInstance(TimeZone + .getTimeZone("GMT"))); + refTime = getDataTime(year, month, day, hour, minute, + "GMT"); + DataTime dt = new DataTime( + refTime.getRefTimeAsCalendar()); rpt.setDataTime(dt); reports.add(rpt); } @@ -116,65 +122,66 @@ public class TCEData extends TCGDataAdapter{ } return reports; } - - private void parseStormTypeInfo(String stormTypeInfo){ + + private void parseStormTypeInfo(String stormTypeInfo) { int index = setStormType(stormTypeInfo); if (index != -1) { String temp[] = stormTypeInfo.substring(index).trim().split(" "); stormName = temp[0]; } } - - private void parseStationIdInfo(String stationIdInfo){ + + private void parseStationIdInfo(String stationIdInfo) { Pattern p = Pattern.compile("(\\w{2,2}\\d{6,6})"); Matcher m = p.matcher(stationIdInfo); - if(m.find()){ + if (m.find()) { stationId = m.group(); } } - - private void parseInitTimeInfo(String initTimeInfo){ + + private void parseInitTimeInfo(String initTimeInfo) { String parts[] = getParts(initTimeInfo, 7); month = MONTH_MAP.get(parts[4]); day = Integer.parseInt(parts[5]); year = Integer.parseInt(parts[6]); } - - private void parseRefhour(String refhourInfo){ + + private void parseRefhour(String refhourInfo) { Pattern p = Pattern.compile("(\\d{4,4})"); Matcher m = p.matcher(refhourInfo); - if(m.find()){ - hour = Integer.parseInt(m.group().substring(0,2)); + if (m.find()) { + hour = Integer.parseInt(m.group().substring(0, 2)); minute = Integer.parseInt(m.group().substring(2)); } } - - private void parseLatitude(String latitudeInfo){ + + private void parseLatitude(String latitudeInfo) { Pattern p = Pattern.compile(InternalReport.LAT_PTRN); Matcher m = p.matcher(latitudeInfo); - if(m.find()){ + if (m.find()) { latitude = Float.parseFloat(m.group().substring(8).trim()); - if (latitudeInfo.contains("SOUTH")){ + if (latitudeInfo.contains("SOUTH")) { latitude *= -1; } } - + } - - private void parseLongitude(String longitudeInfo){ + + private void parseLongitude(String longitudeInfo) { Pattern p = Pattern.compile(InternalReport.LON_PTRN); Matcher m = p.matcher(longitudeInfo); - if(m.find()){ + if (m.find()) { longitude = Float.parseFloat(m.group().substring(10).trim()); - if(longitudeInfo.contains("WEST")){ + if (longitudeInfo.contains("WEST")) { longitude *= -1; - } else if (longitudeInfo.contains("SOUTH") && latitude > 0){ + } else if (longitudeInfo.contains("SOUTH") && (latitude > 0)) { latitude *= -1; } } } - - public void clearData(){ + + @Override + public void clearData() { latitude = -9999; longitude = -9999; stationId = null; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.tcs/src/com/raytheon/uf/edex/plugin/tcs/decoder/TCMData.java b/edexOsgi/com.raytheon.uf.edex.plugin.tcs/src/com/raytheon/uf/edex/plugin/tcs/decoder/TCMData.java index 83c6aa883d..569e4853c8 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.tcs/src/com/raytheon/uf/edex/plugin/tcs/decoder/TCMData.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.tcs/src/com/raytheon/uf/edex/plugin/tcs/decoder/TCMData.java @@ -48,9 +48,10 @@ import com.raytheon.uf.edex.plugin.tcs.TropicalCycloneSummaryDao; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Oct 20, 2010 jsanchez Initial creation - * Apr 19, 2012 #457 dgilling Use TimeTools.findDataTime() - * to calculate times. + * Oct 20, 2010 jsanchez Initial creation + * Apr 19, 2012 457 dgilling Use TimeTools.findDataTime() to + * calculate times. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -144,7 +145,7 @@ public class TCMData extends TCSDataAdapter { } } - if (name == null || name.length() == 0) { + if ((name == null) || (name.length() == 0)) { m = stormNamePtrn.matcher(line); if (m.find()) { name = m.group(2); @@ -175,11 +176,11 @@ public class TCMData extends TCSDataAdapter { break; } // Searching for the press - if (pressure == 0 && line.contains(" PRESSURE ")) { + if ((pressure == 0) && line.contains(" PRESSURE ")) { m = pressurePtrn.matcher(line); if (m.find()) { pressure = Integer.parseInt(m.group(2)); - if (pressure < 800 || pressure > 1050) { + if ((pressure < 800) || (pressure > 1050)) { pressure = 0; } continue; @@ -192,7 +193,7 @@ public class TCMData extends TCSDataAdapter { m = windPtrn.matcher(line.replace("-", "")); if (m.find()) { int wind = Integer.parseInt(m.group(2)); - storm.setWindSpeed(wind > 0 && wind < 250 ? wind : 0); + storm.setWindSpeed((wind > 0) && (wind < 250) ? wind : 0); continue; } } @@ -208,9 +209,9 @@ public class TCMData extends TCSDataAdapter { String mask = line; // Searching for the wind radius if (Util.isWindRadius(type, mask, radius)) { - if (radius.getKFUnit() != 'x' && radius.getKT_FT() != -1 - && radius.getNE() != -1 && radius.getSE() != -1 - && radius.getSW() != -1 && radius.getNW() != -1) { + if ((radius.getKFUnit() != 'x') && (radius.getKT_FT() != -1) + && (radius.getNE() != -1) && (radius.getSE() != -1) + && (radius.getSW() != -1) && (radius.getNW() != -1)) { boolean exist = false; ArrayList radiusList = storm.getRadiusList(); @@ -234,12 +235,11 @@ public class TCMData extends TCSDataAdapter { } if (isLocation && !storm.getDisplayTime().equals("") - && storm.getWindSpeed() != 0) { + && (storm.getWindSpeed() != 0)) { storm.setTropical(!isExtraTropical); storm.setName(name); storm.setPressure(pressure); storm.setProductType(type.toString()); - storm.setPluginName(pluginName); stormList.add(storm); // Reset values @@ -272,7 +272,7 @@ public class TCMData extends TCSDataAdapter { break; } } - if (k < stormList.size() || storm.getDisplayTime().equals(time)) { + if ((k < stormList.size()) || storm.getDisplayTime().equals(time)) { continue; } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.vaa/src/com/raytheon/uf/edex/plugin/vaa/decoder/VAAParser.java b/edexOsgi/com.raytheon.uf.edex.plugin.vaa/src/com/raytheon/uf/edex/plugin/vaa/decoder/VAAParser.java index eebebc431f..43b20a9e02 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.vaa/src/com/raytheon/uf/edex/plugin/vaa/decoder/VAAParser.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.vaa/src/com/raytheon/uf/edex/plugin/vaa/decoder/VAAParser.java @@ -43,7 +43,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Nov 05, 2009 3267 jkorman Initial creation + * Nov 05, 2009 3267 jkorman Initial creation + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -69,13 +70,13 @@ public class VAAParser implements Iterable { public String shapeType; } - private String pluginName; + private final String pluginName; - private WMOHeader wmoHeader; + private final WMOHeader wmoHeader; - private String traceId; + private final String traceId; - private List records = new ArrayList(); + private final List records = new ArrayList(); private List reports; @@ -115,7 +116,6 @@ public class VAAParser implements Iterable { VAARecord vaa = new VAARecord(); vaa.setTraceId(traceId); - vaa.setPluginName(pluginName); vaa.setWmoHeader(wmoHeader.getWmoHeader()); String cor = wmoHeader.getBBBIndicator(); if (cor != null) { diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.vil/src/com/raytheon/uf/edex/plugin/vil/VILGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.vil/src/com/raytheon/uf/edex/plugin/vil/VILGenerator.java index d8b5e1be7b..ceebb4b754 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.vil/src/com/raytheon/uf/edex/plugin/vil/VILGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.vil/src/com/raytheon/uf/edex/plugin/vil/VILGenerator.java @@ -48,8 +48,9 @@ import com.raytheon.uf.edex.plugin.vil.common.VILConfig; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 02/07/2009 2037 dhladky Initial Creation. - * 02/25/13 1660 D. Hladky Fixed SCAN configuration bug. + * Feb 07, 2009 2037 dhladky Initial Creation. + * Feb 25, 2013 1660 D. Hladky Fixed SCAN configuration bug. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -68,7 +69,7 @@ public class VILGenerator extends CompositeProductGenerator implements /** Set of icaos to filter for */ private Set icaos = null; - + /** run configuration manager **/ public SCANRunSiteConfigurationManager srcm = null; @@ -118,7 +119,7 @@ public class VILGenerator extends CompositeProductGenerator implements if (!configValid) { statusHandler.handle(Priority.WARN, - "Configuration for vil(scan) is invalid!!!"); + "Configuration for vil(scan) is invalid!!!"); return; } @@ -156,7 +157,6 @@ public class VILGenerator extends CompositeProductGenerator implements vilRec.setDy(ScanUtils.SCAN_GRID_DIM_RESOLUTION / 2); } - vilRec.setPluginName(this.getCompositeProductType()); vilRec.setIcao(vil_config.getIcao()); vilRec.setDataTime(this.getProductTime()); vilRec.setSpatialInfo(vil_config.getSpatialInfo()); @@ -189,7 +189,7 @@ public class VILGenerator extends CompositeProductGenerator implements resetFilters(); } } - + /** * run config manager * diff --git a/edexOsgi/com.raytheon.uf.edex.python.decoder/src/com/raytheon/uf/edex/python/decoder/PythonDecoder.java b/edexOsgi/com.raytheon.uf.edex.python.decoder/src/com/raytheon/uf/edex/python/decoder/PythonDecoder.java index 73921b93f0..753979938d 100644 --- a/edexOsgi/com.raytheon.uf.edex.python.decoder/src/com/raytheon/uf/edex/python/decoder/PythonDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.python.decoder/src/com/raytheon/uf/edex/python/decoder/PythonDecoder.java @@ -49,6 +49,7 @@ import com.vividsolutions.jts.io.WKTReader; * ------------ ---------- ----------- -------------------------- * Sep 22, 2008 njensen Initial creation * Nov 24, 2008 chammack Camel Refactor + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author njensen @@ -79,12 +80,13 @@ public class PythonDecoder extends AbstractDecoder { public PluginDataObject[] decode(File file) throws Exception { - List decodedObjects = new ArrayList(0); + List decodedObjects = new ArrayList( + 0); PythonScript py = null; long id = Thread.currentThread().getId(); try { - if (!cache || cachedInterpreters.get(id) == null) { + if (!cache || (cachedInterpreters.get(id) == null)) { py = PythonDecoderFactory.makePythonDecoder(pluginFQN, moduleName); } else { @@ -130,7 +132,7 @@ public class PythonDecoder extends AbstractDecoder { public List asPluginDataObjects(List result) throws Exception { List decodedObjects = null; - if (result == null || result.isEmpty()) { + if ((result == null) || result.isEmpty()) { decodedObjects = new ArrayList(0); } else { if (result.get(0) instanceof Map) { @@ -142,11 +144,9 @@ public class PythonDecoder extends AbstractDecoder { ArrayList> resultList = (ArrayList>) result; PluginDataObject record = (PluginDataObject) recordClass .newInstance(); - record.setPluginName(pluginName); BeanMap bm = BeanMap.create(record); for (HashMap map : resultList) { record = (PluginDataObject) recordClass.newInstance(); - record.setPluginName(pluginName); bm.setBean(record); try { for (String key : map.keySet()) { @@ -167,17 +167,17 @@ public class PythonDecoder extends AbstractDecoder { private Object transformValue(String key, Object val, BeanMap bm) { Class type = bm.getPropertyType(key); if (type != null) { - if (type.equals(Calendar.class) && val instanceof Long) { + if (type.equals(Calendar.class) && (val instanceof Long)) { Calendar cal = Calendar.getInstance(TimeZone .getTimeZone("Zulu")); cal.setTimeInMillis((Long) val); val = cal; - } else if (type.equals(DataTime.class) && val instanceof Long) { + } else if (type.equals(DataTime.class) && (val instanceof Long)) { Calendar cal = Calendar.getInstance(TimeZone .getTimeZone("Zulu")); cal.setTimeInMillis((Long) val); val = new DataTime(cal); - } else if (type.equals(Geometry.class) && val instanceof String) { + } else if (type.equals(Geometry.class) && (val instanceof String)) { val = buildGeometry((String) val); } } @@ -206,10 +206,10 @@ public class PythonDecoder extends AbstractDecoder { for (String coord : coords) { counter++; if ((counter % 2) == 0) { - buf.append(Double.parseDouble(coord) / -100 + " " + buf.append((Double.parseDouble(coord) / -100) + " " + tempbuf.toString() + ", "); if (counter == 2) { - firstpt.append(Double.parseDouble(coord) / -100 + " " + firstpt.append((Double.parseDouble(coord) / -100) + " " + tempbuf.toString() + ", "); } tempbuf.delete(0, tempbuf.length()); diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java index 6f067b1de7..87501866f8 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java @@ -60,110 +60,103 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "airmet", - indexes = { - @Index(name = "airmet_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "airmet", indexes = { @Index(name = "airmet_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize +public class AirmetRecord extends PluginDataObject { - -public class AirmetRecord extends PluginDataObject{ - - /** + /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // reportType is AIRMET. - @Column(length=32) - @DataURI(position=4) - @DynamicSerializeElement - private String reportType; - - // reportName will be SIERRA, TANGO, or ZULU - @Column(length=32) - @DataURI(position=1) - @DynamicSerializeElement - private String reportName; - - // WMO header - @Column(length=32) - @DataURI(position=2) - @DynamicSerializeElement - private String wmoHeader; - - // The issue office where the report from - @Column(length=32) - @DynamicSerializeElement - private String issueOffice; - - // Update number as: 1, 2, 3, ... - @Column - @DataURI(position=3) - @DynamicSerializeElement - private Integer updateNumber; - - // Issue time of the report - @Column - @DynamicSerializeElement - private Calendar issueTime; - - // The designator - @Column(length=8) - @DynamicSerializeElement - private String designatorBBB; - - // CorrectionFlag is a flag: 0 for normal, 1 for COR or CC, 2 for AMD, and 3 for TEST - /* - * CorrectionFlag is a flag: - * 0 for normal, 1 for COR or CC, 2 for AMD, 3 for TEST, and 4 for NIL report - */ - @Column + // reportType is AIRMET. + @Column(length = 32) + @DataURI(position = 4) @DynamicSerializeElement - private Integer correctionFlag; - - // The entire report - @Column(length=15000) - @DynamicSerializeElement - private String bullMessage; + private String reportType; + // reportName will be SIERRA, TANGO, or ZULU + @Column(length = 32) + @DataURI(position = 1) + @DynamicSerializeElement + private String reportName; - /** - * Airmet report - */ - @DynamicSerializeElement - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + // WMO header + @Column(length = 32) + @DataURI(position = 2) + @DynamicSerializeElement + private String wmoHeader; + + // The issue office where the report from + @Column(length = 32) + @DynamicSerializeElement + private String issueOffice; + + // Update number as: 1, 2, 3, ... + @Column + @DataURI(position = 3) + @DynamicSerializeElement + private Integer updateNumber; + + // Issue time of the report + @Column + @DynamicSerializeElement + private Calendar issueTime; + + // The designator + @Column(length = 8) + @DynamicSerializeElement + private String designatorBBB; + + // CorrectionFlag is a flag: 0 for normal, 1 for COR or CC, 2 for AMD, and 3 + // for TEST + /* + * CorrectionFlag is a flag: 0 for normal, 1 for COR or CC, 2 for AMD, 3 for + * TEST, and 4 for NIL report + */ + @Column + @DynamicSerializeElement + private Integer correctionFlag; + + // The entire report + @Column(length = 15000) + @DynamicSerializeElement + private String bullMessage; + + /** + * Airmet report + */ + @DynamicSerializeElement + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "airmetReport_parentid_idex") - private Set airmetReport = new HashSet(); + private Set airmetReport = new HashSet(); - - /** + /** * Default Convstructor */ public AirmetRecord() { - this.issueOffice=""; - this.wmoHeader=""; - this.bullMessage=""; - this.designatorBBB=""; - this.updateNumber=0; - this.reportType=""; - this.reportName=null; - this.correctionFlag=0; + this.issueOffice = ""; + this.wmoHeader = ""; + this.bullMessage = ""; + this.designatorBBB = ""; + this.updateNumber = 0; + this.reportType = ""; + this.reportName = null; + this.correctionFlag = 0; } /** * Convstructs an airmet record from a dataURI * - * @param uri The dataURI + * @param uri + * The dataURI */ public AirmetRecord(String uri) { super(uri); } - @Override public IDecoderGettable getDecoderGettable() { // TODO Auto-generated method stub @@ -171,172 +164,180 @@ public class AirmetRecord extends PluginDataObject{ } /** - * @return the issueOffice - */ - public String getIssueOffice(){ - return issueOffice; - } + * @return the issueOffice + */ + public String getIssueOffice() { + return issueOffice; + } - /** - * @param issueOffice to set - */ - public void setIssueOffice(String issueOffice){ - this.issueOffice=issueOffice; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader(){ - return wmoHeader; - } + /** + * @param issueOffice + * to set + */ + public void setIssueOffice(String issueOffice) { + this.issueOffice = issueOffice; + } - /** - * @param wnoHeader to set - */ - public void setWmoHeader(String wmoHeader){ - this.wmoHeader=wmoHeader; - } - - /** - * @return the issueTime - */ - public Calendar getIssueTime(){ - return issueTime; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param issueTime to set - */ - public void setIssueTime(Calendar issueTime){ - this.issueTime=issueTime; - } - - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } + /** + * @param wnoHeader + * to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @param reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } + /** + * @return the issueTime + */ + public Calendar getIssueTime() { + return issueTime; + } - /** - * @return the designatorBBB - */ - public String getDesignatorBBB() { - return designatorBBB; - } + /** + * @param issueTime + * to set + */ + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } - /** - * @param designatorBBB to set - */ - public void setDesignatorBBB(String designatorBBB) { - this.designatorBBB = designatorBBB; - } + /** + * @return the reportType + */ + public String getReportType() { + return reportType; + } - /** - * @return the correctionFlag - */ - public Integer getCorrectionFlag() { - return correctionFlag; - } + /** + * @param reportType + * to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } - /** - * @param correctionFlag to set - */ - public void setCorrectionFlag(Integer correctionFlag) { - this.correctionFlag = correctionFlag; - } + /** + * @return the designatorBBB + */ + public String getDesignatorBBB() { + return designatorBBB; + } - /** - * @return the updateNumber - */ - public Integer getUpdateNumber() { - return updateNumber; - } + /** + * @param designatorBBB + * to set + */ + public void setDesignatorBBB(String designatorBBB) { + this.designatorBBB = designatorBBB; + } - /** - * @param updateNumber to set - */ - public void setUpdateNumber(Integer updateNumber) { - this.updateNumber = updateNumber; - } + /** + * @return the correctionFlag + */ + public Integer getCorrectionFlag() { + return correctionFlag; + } - /** - * @return the bullMessage - */ - public String getBullMessage() { - return bullMessage; - } + /** + * @param correctionFlag + * to set + */ + public void setCorrectionFlag(Integer correctionFlag) { + this.correctionFlag = correctionFlag; + } - /** - * @param bullMessage to set - */ - public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; - } - - /** - * @return the reportName - */ - public String getReportName() { - return reportName; - } + /** + * @return the updateNumber + */ + public Integer getUpdateNumber() { + return updateNumber; + } - /** - * @param reportName to set - */ - public void setReportName(String reportName) { - this.reportName = reportName; - } - - /** - * @return the set of AIRMET report - */ - public Set getAirmetReport() { - return airmetReport; - } + /** + * @param updateNumber + * to set + */ + public void setUpdateNumber(Integer updateNumber) { + this.updateNumber = updateNumber; + } - /** - * @param airmet the report to set - */ - public void setAirmetReport(Set curReport) { - this.airmetReport = curReport; - } + /** + * @return the bullMessage + */ + public String getBullMessage() { + return bullMessage; + } - /** - * @param add AirmetReport to set - */ - public void addAirmetReport(AirmetReport curReport){ - airmetReport.add(curReport); - //curReport.setParentID(this); - } - - /** - * Override existing set method to modify any - * classes that use the dataURI as a foreign key - */ - @Override - public void setIdentifier(Object dataURI) - { + /** + * @param bullMessage + * to set + */ + public void setBullMessage(String bullMessage) { + this.bullMessage = bullMessage; + } - this.identifier = dataURI; - /* - if(this.getAirmetReport() != null && this.getAirmetReport().size() > 0) - { - for (Iterator iter = this.getAirmetReport().iterator(); iter.hasNext();) { - AirmetReport cs = iter.next(); - cs.setParentID(this); - } - }*/ - - } + /** + * @return the reportName + */ + public String getReportName() { + return reportName; + } + + /** + * @param reportName + * to set + */ + public void setReportName(String reportName) { + this.reportName = reportName; + } + + /** + * @return the set of AIRMET report + */ + public Set getAirmetReport() { + return airmetReport; + } + + /** + * @param airmet + * the report to set + */ + public void setAirmetReport(Set curReport) { + this.airmetReport = curReport; + } + + /** + * @param add + * AirmetReport to set + */ + public void addAirmetReport(AirmetReport curReport) { + airmetReport.add(curReport); + // curReport.setParentID(this); + } + + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + + this.identifier = dataURI; + /* + * if(this.getAirmetReport() != null && this.getAirmetReport().size() > + * 0) { for (Iterator iter = + * this.getAirmetReport().iterator(); iter.hasNext();) { AirmetReport cs + * = iter.next(); cs.setParentID(this); } } + */ + + } @Override @Column @@ -344,4 +345,9 @@ public class AirmetRecord extends PluginDataObject{ public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "airmet"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java index 7707ba49d9..b646d7d64d 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java @@ -1,23 +1,3 @@ -/* - * - * AtcfRecord - * - * This class performs the mapping to the database tables for the Automated - * Tropical Cyclone Forecast (ATCF) Decoder Plug-In - * - * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ----------- -------------- ----------------------------------- - * 06/23/10 283 F. J. Yen Initial creation - * * - * This code has been developed by the SIB for use in the AWIPS2 system. - * - * - * @author F. J. Yen, SIB - * @version 1 - - */ - package gov.noaa.nws.ncep.common.dataplugin.atcf; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -55,13 +35,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 06/23/10 208 F. J. Yen Initial Coding. - * 03/10/12 606 G. Hull added reportType to URI - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Jun 23, 2010 208 F. J. Yen Initial Coding. + * Mar 10, 2012 606 G. Hull added reportType to URI + * 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 * * * @author F. J. Yen, SIB @@ -74,683 +55,681 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "atcf", - indexes = { - @Index(name = "atcf_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "atcf", indexes = { @Index(name = "atcf_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class AtcfRecord extends PluginDataObject { - private static final long serialVersionUID = 1L; - private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; - private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; - - /** Report type */ - @DataURI(position = 8) - @Column(length = 32) - @XmlElement - @DynamicSerializeElement - private String reportType; - - /** - * Basin, e.g. WP, IO, SH, CP, EP, AL, SL - */ - @DataURI(position = 1) - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String basin; - - /** - * Annual cyclone number; 1 through 99 - */ - @DataURI(position = 2) - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private int cycloneNum; - - /** - * Warning Date-Time - */ - @DataURI(position = 3) - @Column - @DynamicSerializeElement - @XmlElement - private Calendar warnTime; - - /** - * Objective technique sorting number/Minutes for best track: 00-99 - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private int techniqueNum; - - /** - * Objective Technique or CARQ or WRNG, BEST for best Track - */ - @DataURI(position = 4) - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String technique; - - /** - * TAU -- forecast Period: -24 through 120 hours, 0 for best-track, negative - * forecastHours used for CARQ and WRNG records. - */ - @DataURI(position = 5) - @Column - @DynamicSerializeElement - @XmlElement - private int fcstHour; - - /** - * Latitude (degrees) for the DTG: -900 through 900 - */ - @DynamicSerializeElement - @XmlElement - private float clat; - - /** - * Longitude (degrees) for the DTG: -1800 through 1800 - */ - @DynamicSerializeElement - @XmlElement - private float clon; - - /** - * Maximum sustained wind speed in knots: 0 through 300 - */ - @DynamicSerializeElement - @XmlElement - private float windMax; - - /** - * Minimum sea level pressure, 1 through 1100MB - */ - @DynamicSerializeElement - @XmlElement - private float mslp; - - /** - * Level of tropical cyclone development; such as DB, TD, TS, TY, ... - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String intensity; - - /** - * Wind intensity (kts) for the radii defined i this record: 34, 50, 64 - */ - @DataURI(position = 6) - @DynamicSerializeElement - @XmlElement - private float radWind; - - /** - * Radius Code for wind intensity: AAA = full circle; QQQ = quadrant (NNQ, - * NEQ, EEQ, SEQ, SSQ, SWQ, WWQ, NWQ) - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String radWindQuad; - - /** - * If full circle, radius of specified wind intensity. If semicircle or - * quadrant, radius of specified wind intensity of circle portion specified - * in radius code. 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad1WindRad; - - /** - * If full circle, this field not used. If semicircle, radius (nm) of - * specified wind intensity for semicircle not specified in radius code. If - * quadrant, radius (nm) of specified wind intensity for 2nd quadrant - * (counting clockwise from quadrant specified in radius code). 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad2WindRad; - - /** - * If full circle or semicircle this field not used. If quadrant, radius - * (nm) of specified wind intensity for 3rd quadrant (counting clockwise - * from quadrant specified in radius code). 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad3WindRad; - - /** - * If full circle or semicircle this field not used. If quadrant, radius - * (nm) of specified wind intensity for 4th quadrant (counting clockwise - * from quadrant specified in radius code). 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad4WindRad; - - /** - * Pressure in millibars of the last closed isobar. 900 - 1050 mb - */ - @DynamicSerializeElement - @XmlElement - private float closedP; - - /** - * Radius of the last closed isobar in nm. 0 - 9999 nm - */ - @DynamicSerializeElement - @XmlElement - private float radClosedP; - - /** - * Radius of max winds. 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float maxWindRad; - - /** - * Gusts. 0 - 995 kts. - */ - @DynamicSerializeElement - @XmlElement - private float gust; - - /** - * Eye diameter. 0 - 999nm - */ - @DynamicSerializeElement - @XmlElement - private float eyeSize; - - /** - * Subregion code: A, B, C, E, L, P, Q, S, W - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String subRegion; - - /** - * Max seas: 0 through 999 ft. - */ - @DynamicSerializeElement - @XmlElement - private float maxSeas; - - /** - * Forecaster's initials, used for forecastHour 0 WRNG, up to 3 chars - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String forecaster; - - /** - * Storm direction in compass coordinates, 0 - 359 degrees - */ - @DynamicSerializeElement - @XmlElement - private float stormDrct; - - /** - * Storm speed. 0 - 999 kts - */ - @DynamicSerializeElement - @XmlElement - private float stormSped; - - /** - * Literal storm name, NONAME, or INVEST - */ - @DataURI(position = 7) - @Column(length = 32) - @DynamicSerializeElement - @XmlElement - private String stormName; - - /** - * System depth, D=deep, M=medium, S=shallow, X=unknown - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String stormDepth; - - /** - * Wave height for radii defined in seas1 - seas4. 0 - 99 ft. - */ - @DynamicSerializeElement - @XmlElement - private float radWave; - - /** - * Radius code for seas wave height - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String radWaveQuad; - - /** - * First quadrant seas radius as defined by radWaveQuad, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad1WaveRad; - - /** - * Second quadrant seas radius as defined by radWaveQuad, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad2WaveRad; - - /** - * Third quadrant seas radius as defined by radWaveQuad, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad3WaveRad; - - /** - * Fourth quadrant seas radius as defined by radWaveQuad, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad4WaveRad; - - /* - * 20 character description of format to follow in userData - */ - @Column(length = 20) - @DynamicSerializeElement - @XmlElement - private String userDefined; - - /* - * User data section as indicated by userDefined parameter - */ - @Column(length = 30) - @DynamicSerializeElement - @XmlElement - private String userData; - - /** - * Default Constructor - */ - public AtcfRecord() { - this.reportType="ATCF"; - this.basin = " "; - this.cycloneNum = IMISSD; - this.warnTime = null; - this.techniqueNum = IMISSD; - this.technique = " "; - this.fcstHour = IMISSD; - this.clat = RMISSD; - this.clon = RMISSD; - this.windMax = RMISSD; - this.mslp = RMISSD; - this.intensity = " "; - this.radWind = RMISSD; - this.radWindQuad = " "; - this.quad1WindRad = RMISSD; - this.quad2WindRad = RMISSD; - this.quad3WindRad = RMISSD; - this.quad4WindRad = RMISSD; - this.closedP = RMISSD; - this.radClosedP = RMISSD; - this.maxWindRad = RMISSD; - this.gust = RMISSD; - this.eyeSize = RMISSD; - this.subRegion = " "; - this.maxSeas = RMISSD; - this.forecaster = " "; - this.stormDrct = RMISSD; - this.stormSped = RMISSD; - this.stormName = " "; - this.stormDepth = " "; - this.radWave = RMISSD; - this.radWaveQuad = " "; - this.quad1WaveRad = RMISSD; - this.quad2WaveRad = RMISSD; - this.quad3WaveRad = RMISSD; - this.quad4WaveRad = RMISSD; - this.userDefined = " "; - this.userData = " "; - } - - /** - * Constructs a atcf record from a dataURI - * - * @param uri - * The dataURI - */ - public AtcfRecord(String uri) { - super(uri); - } - - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } - - public String getReportType() { - return reportType; - } - - public void setReportType(String reportType) { - this.reportType = reportType; - } - - public String getBasin() { - return basin; - } - - public void setBasin(String basin) { - this.basin = basin; - } - - public int getCycloneNum() { - return cycloneNum; - } - - public void setCycloneNum(int cycloneNum) { - this.cycloneNum = cycloneNum; - } - - public Calendar getWarnTime() { - return warnTime; - } - - public void setWarnTime(Calendar warnTime) { - this.warnTime = warnTime; - } - - public int getTechniqueNum() { - return techniqueNum; - } - - public void setTechniqueNum(int techniqueNum) { - this.techniqueNum = techniqueNum; - } - - public String getTechnique() { - return technique; - } - - public void setTechnique(String technique) { - this.technique = technique; - } - - public int getFcstHour() { - return fcstHour; - } - - public void setFcstHour(int fcstHour) { - this.fcstHour = fcstHour; - } - - public float getClat() { - return clat; - } - - public void setClat(float clat) { - this.clat = clat; - } - - public float getClon() { - return clon; - } - - public void setClon(float clon) { - this.clon = clon; - } - - public float getWindMax() { - return windMax; - } - - public void setWindMax(float windMax) { - this.windMax = windMax; - } - - public float getMslp() { - return mslp; - } - - public void setMslp(float mslp) { - this.mslp = mslp; - } - - public String getIntensity() { - return intensity; - } + private static final long serialVersionUID = 1L; + + private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; + + private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; + + /** Report type */ + @DataURI(position = 8) + @Column(length = 32) + @XmlElement + @DynamicSerializeElement + private String reportType; + + /** + * Basin, e.g. WP, IO, SH, CP, EP, AL, SL + */ + @DataURI(position = 1) + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String basin; + + /** + * Annual cyclone number; 1 through 99 + */ + @DataURI(position = 2) + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private int cycloneNum; + + /** + * Warning Date-Time + */ + @DataURI(position = 3) + @Column + @DynamicSerializeElement + @XmlElement + private Calendar warnTime; + + /** + * Objective technique sorting number/Minutes for best track: 00-99 + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private int techniqueNum; + + /** + * Objective Technique or CARQ or WRNG, BEST for best Track + */ + @DataURI(position = 4) + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String technique; + + /** + * TAU -- forecast Period: -24 through 120 hours, 0 for best-track, negative + * forecastHours used for CARQ and WRNG records. + */ + @DataURI(position = 5) + @Column + @DynamicSerializeElement + @XmlElement + private int fcstHour; + + /** + * Latitude (degrees) for the DTG: -900 through 900 + */ + @DynamicSerializeElement + @XmlElement + private float clat; + + /** + * Longitude (degrees) for the DTG: -1800 through 1800 + */ + @DynamicSerializeElement + @XmlElement + private float clon; + + /** + * Maximum sustained wind speed in knots: 0 through 300 + */ + @DynamicSerializeElement + @XmlElement + private float windMax; + + /** + * Minimum sea level pressure, 1 through 1100MB + */ + @DynamicSerializeElement + @XmlElement + private float mslp; + + /** + * Level of tropical cyclone development; such as DB, TD, TS, TY, ... + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String intensity; + + /** + * Wind intensity (kts) for the radii defined i this record: 34, 50, 64 + */ + @DataURI(position = 6) + @DynamicSerializeElement + @XmlElement + private float radWind; + + /** + * Radius Code for wind intensity: AAA = full circle; QQQ = quadrant (NNQ, + * NEQ, EEQ, SEQ, SSQ, SWQ, WWQ, NWQ) + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String radWindQuad; + + /** + * If full circle, radius of specified wind intensity. If semicircle or + * quadrant, radius of specified wind intensity of circle portion specified + * in radius code. 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad1WindRad; + + /** + * If full circle, this field not used. If semicircle, radius (nm) of + * specified wind intensity for semicircle not specified in radius code. If + * quadrant, radius (nm) of specified wind intensity for 2nd quadrant + * (counting clockwise from quadrant specified in radius code). 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad2WindRad; + + /** + * If full circle or semicircle this field not used. If quadrant, radius + * (nm) of specified wind intensity for 3rd quadrant (counting clockwise + * from quadrant specified in radius code). 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad3WindRad; + + /** + * If full circle or semicircle this field not used. If quadrant, radius + * (nm) of specified wind intensity for 4th quadrant (counting clockwise + * from quadrant specified in radius code). 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad4WindRad; + + /** + * Pressure in millibars of the last closed isobar. 900 - 1050 mb + */ + @DynamicSerializeElement + @XmlElement + private float closedP; + + /** + * Radius of the last closed isobar in nm. 0 - 9999 nm + */ + @DynamicSerializeElement + @XmlElement + private float radClosedP; + + /** + * Radius of max winds. 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float maxWindRad; + + /** + * Gusts. 0 - 995 kts. + */ + @DynamicSerializeElement + @XmlElement + private float gust; + + /** + * Eye diameter. 0 - 999nm + */ + @DynamicSerializeElement + @XmlElement + private float eyeSize; + + /** + * Subregion code: A, B, C, E, L, P, Q, S, W + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String subRegion; + + /** + * Max seas: 0 through 999 ft. + */ + @DynamicSerializeElement + @XmlElement + private float maxSeas; + + /** + * Forecaster's initials, used for forecastHour 0 WRNG, up to 3 chars + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String forecaster; + + /** + * Storm direction in compass coordinates, 0 - 359 degrees + */ + @DynamicSerializeElement + @XmlElement + private float stormDrct; + + /** + * Storm speed. 0 - 999 kts + */ + @DynamicSerializeElement + @XmlElement + private float stormSped; + + /** + * Literal storm name, NONAME, or INVEST + */ + @DataURI(position = 7) + @Column(length = 32) + @DynamicSerializeElement + @XmlElement + private String stormName; + + /** + * System depth, D=deep, M=medium, S=shallow, X=unknown + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String stormDepth; + + /** + * Wave height for radii defined in seas1 - seas4. 0 - 99 ft. + */ + @DynamicSerializeElement + @XmlElement + private float radWave; + + /** + * Radius code for seas wave height + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String radWaveQuad; + + /** + * First quadrant seas radius as defined by radWaveQuad, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad1WaveRad; + + /** + * Second quadrant seas radius as defined by radWaveQuad, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad2WaveRad; + + /** + * Third quadrant seas radius as defined by radWaveQuad, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad3WaveRad; + + /** + * Fourth quadrant seas radius as defined by radWaveQuad, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad4WaveRad; + + /* + * 20 character description of format to follow in userData + */ + @Column(length = 20) + @DynamicSerializeElement + @XmlElement + private String userDefined; + + /* + * User data section as indicated by userDefined parameter + */ + @Column(length = 30) + @DynamicSerializeElement + @XmlElement + private String userData; + + /** + * Default Constructor + */ + public AtcfRecord() { + this.reportType = "ATCF"; + this.basin = " "; + this.cycloneNum = IMISSD; + this.warnTime = null; + this.techniqueNum = IMISSD; + this.technique = " "; + this.fcstHour = IMISSD; + this.clat = RMISSD; + this.clon = RMISSD; + this.windMax = RMISSD; + this.mslp = RMISSD; + this.intensity = " "; + this.radWind = RMISSD; + this.radWindQuad = " "; + this.quad1WindRad = RMISSD; + this.quad2WindRad = RMISSD; + this.quad3WindRad = RMISSD; + this.quad4WindRad = RMISSD; + this.closedP = RMISSD; + this.radClosedP = RMISSD; + this.maxWindRad = RMISSD; + this.gust = RMISSD; + this.eyeSize = RMISSD; + this.subRegion = " "; + this.maxSeas = RMISSD; + this.forecaster = " "; + this.stormDrct = RMISSD; + this.stormSped = RMISSD; + this.stormName = " "; + this.stormDepth = " "; + this.radWave = RMISSD; + this.radWaveQuad = " "; + this.quad1WaveRad = RMISSD; + this.quad2WaveRad = RMISSD; + this.quad3WaveRad = RMISSD; + this.quad4WaveRad = RMISSD; + this.userDefined = " "; + this.userData = " "; + } + + /** + * Constructs a atcf record from a dataURI + * + * @param uri + * The dataURI + */ + public AtcfRecord(String uri) { + super(uri); + } + + @Override + public IDecoderGettable getDecoderGettable() { + // TODO Auto-generated method stub + return null; + } + + public String getReportType() { + return reportType; + } + + public void setReportType(String reportType) { + this.reportType = reportType; + } + + public String getBasin() { + return basin; + } + + public void setBasin(String basin) { + this.basin = basin; + } + + public int getCycloneNum() { + return cycloneNum; + } + + public void setCycloneNum(int cycloneNum) { + this.cycloneNum = cycloneNum; + } + + public Calendar getWarnTime() { + return warnTime; + } + + public void setWarnTime(Calendar warnTime) { + this.warnTime = warnTime; + } + + public int getTechniqueNum() { + return techniqueNum; + } + + public void setTechniqueNum(int techniqueNum) { + this.techniqueNum = techniqueNum; + } + + public String getTechnique() { + return technique; + } + + public void setTechnique(String technique) { + this.technique = technique; + } + + public int getFcstHour() { + return fcstHour; + } + + public void setFcstHour(int fcstHour) { + this.fcstHour = fcstHour; + } + + public float getClat() { + return clat; + } + + public void setClat(float clat) { + this.clat = clat; + } + + public float getClon() { + return clon; + } + + public void setClon(float clon) { + this.clon = clon; + } + + public float getWindMax() { + return windMax; + } + + public void setWindMax(float windMax) { + this.windMax = windMax; + } + + public float getMslp() { + return mslp; + } + + public void setMslp(float mslp) { + this.mslp = mslp; + } + + public String getIntensity() { + return intensity; + } - public void setIntensity(String intensity) { - this.intensity = intensity; - } + public void setIntensity(String intensity) { + this.intensity = intensity; + } - public float getRadWind() { - return radWind; - } + public float getRadWind() { + return radWind; + } - public void setRadWind(float radWind) { - this.radWind = radWind; - } + public void setRadWind(float radWind) { + this.radWind = radWind; + } - public String getRadWindQuad() { - return radWindQuad; - } + public String getRadWindQuad() { + return radWindQuad; + } - public void setRadWindQuad(String radWindQuad) { - this.radWindQuad = radWindQuad; - } + public void setRadWindQuad(String radWindQuad) { + this.radWindQuad = radWindQuad; + } - public float getQuad1WindRad() { - return quad1WindRad; - } + public float getQuad1WindRad() { + return quad1WindRad; + } - public void setQuad1WindRad(float quad1WindRad) { - this.quad1WindRad = quad1WindRad; - } + public void setQuad1WindRad(float quad1WindRad) { + this.quad1WindRad = quad1WindRad; + } - public float getQuad2WindRad() { - return quad2WindRad; - } + public float getQuad2WindRad() { + return quad2WindRad; + } - public void setQuad2WindRad(float quad2WindRad) { - this.quad2WindRad = quad2WindRad; - } + public void setQuad2WindRad(float quad2WindRad) { + this.quad2WindRad = quad2WindRad; + } - public float getQuad3WindRad() { - return quad3WindRad; - } + public float getQuad3WindRad() { + return quad3WindRad; + } - public void setQuad3WindRad(float quad3WindRad) { - this.quad3WindRad = quad3WindRad; - } + public void setQuad3WindRad(float quad3WindRad) { + this.quad3WindRad = quad3WindRad; + } - public float getQuad4WindRad() { - return quad4WindRad; - } + public float getQuad4WindRad() { + return quad4WindRad; + } - public void setQuad4WindRad(float quad4WindRad) { - this.quad4WindRad = quad4WindRad; - } + public void setQuad4WindRad(float quad4WindRad) { + this.quad4WindRad = quad4WindRad; + } - public float getClosedP() { - return closedP; - } + public float getClosedP() { + return closedP; + } - public void setClosedP(float closedP) { - this.closedP = closedP; - } + public void setClosedP(float closedP) { + this.closedP = closedP; + } - public float getRadClosedP() { - return radClosedP; - } + public float getRadClosedP() { + return radClosedP; + } - public void setRadClosedP(float radClosedP) { - this.radClosedP = radClosedP; - } + public void setRadClosedP(float radClosedP) { + this.radClosedP = radClosedP; + } - public float getMaxWindRad() { - return maxWindRad; - } + public float getMaxWindRad() { + return maxWindRad; + } - public void setMaxWindRad(float maxWindRad) { - this.maxWindRad = maxWindRad; - } + public void setMaxWindRad(float maxWindRad) { + this.maxWindRad = maxWindRad; + } - public float getGust() { - return gust; - } + public float getGust() { + return gust; + } - public void setGust(float gust) { - this.gust = gust; - } + public void setGust(float gust) { + this.gust = gust; + } - public float getEyeSize() { - return eyeSize; - } + public float getEyeSize() { + return eyeSize; + } - public void setEyeSize(float eyeSize) { - this.eyeSize = eyeSize; - } + public void setEyeSize(float eyeSize) { + this.eyeSize = eyeSize; + } - public String getSubRegion() { - return subRegion; - } + public String getSubRegion() { + return subRegion; + } - public void setSubRegion(String subRegion) { - this.subRegion = subRegion; - } + public void setSubRegion(String subRegion) { + this.subRegion = subRegion; + } - public float getMaxSeas() { - return maxSeas; - } + public float getMaxSeas() { + return maxSeas; + } - public void setMaxSeas(float maxSeas) { - this.maxSeas = maxSeas; - } + public void setMaxSeas(float maxSeas) { + this.maxSeas = maxSeas; + } - public String getForecaster() { - return forecaster; - } + public String getForecaster() { + return forecaster; + } - public void setForecaster(String forecaster) { - this.forecaster = forecaster; - } + public void setForecaster(String forecaster) { + this.forecaster = forecaster; + } - public float getStormDrct() { - return stormDrct; - } + public float getStormDrct() { + return stormDrct; + } - public void setStormDrct(float stormDrct) { - this.stormDrct = stormDrct; - } + public void setStormDrct(float stormDrct) { + this.stormDrct = stormDrct; + } - public float getStormSped() { - return stormSped; - } + public float getStormSped() { + return stormSped; + } - public void setStormSped(float stormSped) { - this.stormSped = stormSped; - } + public void setStormSped(float stormSped) { + this.stormSped = stormSped; + } - public String getStormName() { - return stormName; - } + public String getStormName() { + return stormName; + } - public void setStormName(String stormName) { - this.stormName = stormName; - } + public void setStormName(String stormName) { + this.stormName = stormName; + } - public String getStormDepth() { - return stormDepth; - } + public String getStormDepth() { + return stormDepth; + } - public void setStormDepth(String stormDepth) { - this.stormDepth = stormDepth; - } + public void setStormDepth(String stormDepth) { + this.stormDepth = stormDepth; + } - public float getRadWave() { - return radWave; - } + public float getRadWave() { + return radWave; + } - public void setRadWave(float radWave) { - this.radWave = radWave; - } + public void setRadWave(float radWave) { + this.radWave = radWave; + } - public String getRadWaveQuad() { - return radWaveQuad; - } + public String getRadWaveQuad() { + return radWaveQuad; + } - public void setRadWaveQuad(String radWaveQuad) { - this.radWaveQuad = radWaveQuad; - } + public void setRadWaveQuad(String radWaveQuad) { + this.radWaveQuad = radWaveQuad; + } - public float getQuad1WaveRad() { - return quad1WaveRad; - } + public float getQuad1WaveRad() { + return quad1WaveRad; + } - public void setQuad1WaveRad(float quad1WaveRad) { - this.quad1WaveRad = quad1WaveRad; - } + public void setQuad1WaveRad(float quad1WaveRad) { + this.quad1WaveRad = quad1WaveRad; + } - public float getQuad2WaveRad() { - return quad2WaveRad; - } + public float getQuad2WaveRad() { + return quad2WaveRad; + } - public void setQuad2WaveRad(float quad2WaveRad) { - this.quad2WaveRad = quad2WaveRad; - } + public void setQuad2WaveRad(float quad2WaveRad) { + this.quad2WaveRad = quad2WaveRad; + } - public float getQuad3WaveRad() { - return quad3WaveRad; - } + public float getQuad3WaveRad() { + return quad3WaveRad; + } - public void setQuad3WaveRad(float quad3WaveRad) { - this.quad3WaveRad = quad3WaveRad; - } + public void setQuad3WaveRad(float quad3WaveRad) { + this.quad3WaveRad = quad3WaveRad; + } - public float getQuad4WaveRad() { - return quad4WaveRad; - } + public float getQuad4WaveRad() { + return quad4WaveRad; + } - public void setQuad4WaveRad(float quad4WaveRad) { - this.quad4WaveRad = quad4WaveRad; - } + public void setQuad4WaveRad(float quad4WaveRad) { + this.quad4WaveRad = quad4WaveRad; + } - public String getUserDefined() { - return userDefined; - } + public String getUserDefined() { + return userDefined; + } - public void setUserDefined(String userDefined) { - this.userDefined = userDefined; - } + public void setUserDefined(String userDefined) { + this.userDefined = userDefined; + } - public String getUserData() { - return userData; - } + public String getUserData() { + return userData; + } - public void setUserData(String userData) { - this.userData = userData; - } + public void setUserData(String userData) { + this.userData = userData; + } @Override @Column @@ -758,4 +737,9 @@ public class AtcfRecord extends PluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "atcf"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/src/gov/noaa/nws/ncep/common/dataplugin/aww/AwwRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/src/gov/noaa/nws/ncep/common/dataplugin/aww/AwwRecord.java index cf3741cef5..83ebb71681 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/src/gov/noaa/nws/ncep/common/dataplugin/aww/AwwRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/src/gov/noaa/nws/ncep/common/dataplugin/aww/AwwRecord.java @@ -66,135 +66,107 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "aww", - indexes = { - @Index(name = "aww_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "aww", indexes = { @Index(name = "aww_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize +public class AwwRecord extends PluginDataObject { -public class AwwRecord extends PluginDataObject{ - - private static final long serialVersionUID = 1L; - - /* - * There are many report types as follows: - * 1. SEVERE THUNDERSTORM WARNING - * 2. SEVERE THUNDERSTORM WATCH - * 3. TORNADO WARNING - * 4. TORNADO WATCH - * 5. SEVERE THUNDERSTORM OUTLINE UPDATE - * 6. TORNADO WATCH OUTLINE UPDATE - * 7. FLASH FLOOD WARNING - * 8. FLASH FLOOD WATCH - * 9. FLOOD WARNING - * 10. FLOOD WATCH - * 11. FLOOD STATEMENT - * 12. WINTER STORM WARNING - * 13. WINTER STORM WATCH - * 14. WATCH COUNTY NOTIFICATION - * 15. SEVERE WEATHER STATEMENT - * 16. WIND ADVISORY - * 17. FOG ADVISORY - * 18. HEAT ADVISORY - * 19. FROST ADVISORY - * 20. SMOKE ADVISORY - * 21. WEATHER ADVISORY - * 22. WINTER WEATHER ADVISORY - * 23. SIGNIGICANT WEATHER ADVISORY - * 24. SPECIAL WEATHER STATEMENT - * 25. RED FLAG WARNING - * 26. TORNADO REPORT - * 27. HIGH WIND WARNING - * 28. FREEZE WARNING - * 29. ADVERTENCIA DE INUNDACIONES - * 30. HYDROLOGIC STATEMENT - * 31. URGENT WEATHER MESSAGE - */ - @Column(length=40) - @DataURI(position=1) - @DynamicSerializeElement - private String reportType; - - // The issue office where the report from - @Column(length=32) - @DataURI(position=2) - @DynamicSerializeElement - private String issueOffice; - - // The collection of watch numbers in the report - @Column(length=160) - @DataURI(position=5) - @DynamicSerializeElement - private String watchNumber; - - // WMO header - @Column(length=32) - @DynamicSerializeElement - private String wmoHeader; - - // Issue time of the report - @Column - @DataURI(position=3) - @DynamicSerializeElement - private Calendar issueTime; - - // The designator - @Column(length=8) - @DataURI(position=4) - @DynamicSerializeElement - private String designatorBBB; - - // The designator - @Column(length=72) - @DataURI(position=6) - @DynamicSerializeElement - private String mndTime; - - // Attention WFO - @Column(length=72) - @DynamicSerializeElement - private String attentionWFO; - - // The entire report - @Column(length=40000) - @DynamicSerializeElement - private String bullMessage; - + private static final long serialVersionUID = 1L; - // AWW UGC Table - @DynamicSerializeElement - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + /* + * There are many report types as follows: 1. SEVERE THUNDERSTORM WARNING 2. + * SEVERE THUNDERSTORM WATCH 3. TORNADO WARNING 4. TORNADO WATCH 5. SEVERE + * THUNDERSTORM OUTLINE UPDATE 6. TORNADO WATCH OUTLINE UPDATE 7. FLASH + * FLOOD WARNING 8. FLASH FLOOD WATCH 9. FLOOD WARNING 10. FLOOD WATCH 11. + * FLOOD STATEMENT 12. WINTER STORM WARNING 13. WINTER STORM WATCH 14. WATCH + * COUNTY NOTIFICATION 15. SEVERE WEATHER STATEMENT 16. WIND ADVISORY 17. + * FOG ADVISORY 18. HEAT ADVISORY 19. FROST ADVISORY 20. SMOKE ADVISORY 21. + * WEATHER ADVISORY 22. WINTER WEATHER ADVISORY 23. SIGNIGICANT WEATHER + * ADVISORY 24. SPECIAL WEATHER STATEMENT 25. RED FLAG WARNING 26. TORNADO + * REPORT 27. HIGH WIND WARNING 28. FREEZE WARNING 29. ADVERTENCIA DE + * INUNDACIONES 30. HYDROLOGIC STATEMENT 31. URGENT WEATHER MESSAGE + */ + @Column(length = 40) + @DataURI(position = 1) + @DynamicSerializeElement + private String reportType; + + // The issue office where the report from + @Column(length = 32) + @DataURI(position = 2) + @DynamicSerializeElement + private String issueOffice; + + // The collection of watch numbers in the report + @Column(length = 160) + @DataURI(position = 5) + @DynamicSerializeElement + private String watchNumber; + + // WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; + + // Issue time of the report + @Column + @DataURI(position = 3) + @DynamicSerializeElement + private Calendar issueTime; + + // The designator + @Column(length = 8) + @DataURI(position = 4) + @DynamicSerializeElement + private String designatorBBB; + + // The designator + @Column(length = 72) + @DataURI(position = 6) + @DynamicSerializeElement + private String mndTime; + + // Attention WFO + @Column(length = 72) + @DynamicSerializeElement + private String attentionWFO; + + // The entire report + @Column(length = 40000) + @DynamicSerializeElement + private String bullMessage; + + // AWW UGC Table + @DynamicSerializeElement + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "awwUGC_parentid_idex") - private Set awwUGC = new HashSet(); + private Set awwUGC = new HashSet(); - - /** + /** * Default Convstructor */ public AwwRecord() { - this.issueOffice=null; - this.watchNumber="0000"; - this.issueTime=null; - this.attentionWFO=null; - this.wmoHeader=null; - this.designatorBBB=null; - this.bullMessage=null; - this.mndTime=null; + this.issueOffice = null; + this.watchNumber = "0000"; + this.issueTime = null; + this.attentionWFO = null; + this.wmoHeader = null; + this.designatorBBB = null; + this.bullMessage = null; + this.mndTime = null; } /** * Convstructs a consigmet record from a dataURI * - * @param uri The dataURI + * @param uri + * The dataURI */ public AwwRecord(String uri) { super(uri); } - - + @Override public IDecoderGettable getDecoderGettable() { // TODO Auto-generated method stub @@ -202,165 +174,173 @@ public class AwwRecord extends PluginDataObject{ } /** - * @return the reportType - */ + * @return the reportType + */ public String getReportType() { - return reportType; - } + return reportType; + } /** - * @return the reportType - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } + * @return the reportType + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } - /** - * @return the wmoHeader - */ - public String getWmoHeader(){ - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wnoHeader to set - */ - public void setWmoHeader(String wmoHeader){ - this.wmoHeader=wmoHeader; - } - - /** - * @return the issueTime - */ - public Calendar getIssueTime(){ - return issueTime; - } + /** + * @param wnoHeader + * to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @param issueTime to set - */ - public void setIssueTime(Calendar issueTime){ - this.issueTime=issueTime; - } + /** + * @return the issueTime + */ + public Calendar getIssueTime() { + return issueTime; + } - /** - * @return the set of UGC - */ - public Set getAwwUGC() { - return awwUGC; - } + /** + * @param issueTime + * to set + */ + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } - /** - * @param awwUgc the ugc to set - */ - public void setAwwUGC(Set awwUgc) { - this.awwUGC = awwUgc; - } + /** + * @return the set of UGC + */ + public Set getAwwUGC() { + return awwUGC; + } - /** - * @param add AWW UGC to set - */ - public void addAwwUGC(AwwUgc pugc){ - awwUGC.add(pugc); - //pugc.setParentID(this); - } + /** + * @param awwUgc + * the ugc to set + */ + public void setAwwUGC(Set awwUgc) { + this.awwUGC = awwUgc; + } - /** - * Override existing set method to modify any - * classes that use the dataURI as a foreign key - */ - public void setIdentifier(Object dataURI) - { + /** + * @param add + * AWW UGC to set + */ + public void addAwwUGC(AwwUgc pugc) { + awwUGC.add(pugc); + // pugc.setParentID(this); + } - this.identifier = dataURI; - - - - } + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { - /** - * @return the designator - */ - public String getDesignatorBBB() { - return designatorBBB; - } + this.identifier = dataURI; - /** - * @param designatorBBB to set - */ - public void setDesignatorBBB(String designatorBBB) { - this.designatorBBB = designatorBBB; - } + } - /** - * @return the attentionWFO - */ - public String getAttentionWFO() { - return attentionWFO; - } + /** + * @return the designator + */ + public String getDesignatorBBB() { + return designatorBBB; + } - /** - * @param attentionWFO to set - */ - public void setAttentionWFO(String attentionWFO) { - this.attentionWFO = attentionWFO; - } + /** + * @param designatorBBB + * to set + */ + public void setDesignatorBBB(String designatorBBB) { + this.designatorBBB = designatorBBB; + } - /** - * @return the watchNumber - */ - public String getWatchNumber() { - return watchNumber; - } + /** + * @return the attentionWFO + */ + public String getAttentionWFO() { + return attentionWFO; + } - /** - * @param watchNumber to set - */ - public void setWatchNumber(String watchNumber) { - this.watchNumber = watchNumber; - } + /** + * @param attentionWFO + * to set + */ + public void setAttentionWFO(String attentionWFO) { + this.attentionWFO = attentionWFO; + } - /** - * @return the bullMessage - */ - public String getBullMessage() { - return bullMessage; - } + /** + * @return the watchNumber + */ + public String getWatchNumber() { + return watchNumber; + } - /** - * @param bullMessage to set - */ - public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; - } + /** + * @param watchNumber + * to set + */ + public void setWatchNumber(String watchNumber) { + this.watchNumber = watchNumber; + } - /** - * @return the issueOffice - */ - public String getIssueOffice() { - return issueOffice; - } + /** + * @return the bullMessage + */ + public String getBullMessage() { + return bullMessage; + } - /** - * @param issueOffice to set - */ - public void setIssueOffice(String issueOffice) { - this.issueOffice = issueOffice; - } + /** + * @param bullMessage + * to set + */ + public void setBullMessage(String bullMessage) { + this.bullMessage = bullMessage; + } - /** - * @return the mndTime - */ - public String getMndTime() { - return mndTime; - } + /** + * @return the issueOffice + */ + public String getIssueOffice() { + return issueOffice; + } - /** - * @param mndTime to set - */ - public void setMndTime(String mndTime) { - this.mndTime = mndTime; - } + /** + * @param issueOffice + * to set + */ + public void setIssueOffice(String issueOffice) { + this.issueOffice = issueOffice; + } + + /** + * @return the mndTime + */ + public String getMndTime() { + return mndTime; + } + + /** + * @param mndTime + * to set + */ + public void setMndTime(String mndTime) { + this.mndTime = mndTime; + } @Override @Column @@ -368,4 +348,9 @@ public class AwwRecord extends PluginDataObject{ public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "aww"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/src/gov/noaa/nws/ncep/common/dataplugin/convsigmet/ConvSigmetRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/src/gov/noaa/nws/ncep/common/dataplugin/convsigmet/ConvSigmetRecord.java index c5b4beda65..6799bf4f97 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/src/gov/noaa/nws/ncep/common/dataplugin/convsigmet/ConvSigmetRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/src/gov/noaa/nws/ncep/common/dataplugin/convsigmet/ConvSigmetRecord.java @@ -56,97 +56,91 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "convsigmet", - indexes = { - @Index(name = "convsigmet_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "convsigmet", indexes = { @Index(name = "convsigmet_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize -public class ConvSigmetRecord extends PluginDataObject{ +public class ConvSigmetRecord extends PluginDataObject { - /** + /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // reportType is "convective sigmet". - @Column(length=32) - @DataURI(position=1) - @DynamicSerializeElement - private String reportType; - - // WMO header - @Column(length=32) - @DataURI(position=2) - @DynamicSerializeElement - private String wmoHeader; - - // forecastRegion as: SIGW, SIGC, or SIGE - @Column(length=8) - @DataURI(position=3) - @DynamicSerializeElement - private String forecastRegion; - - // The issue office where the report from - @Column(length=32) - @DynamicSerializeElement - private String issueOffice; - - // Issue time of the report - @Column - @DynamicSerializeElement - private Calendar issueTime; - - // The designator - @Column(length=8) - @DynamicSerializeElement - private String designatorBBB; - - // CorrectionFlag is a flag indicating a cancellation (0 or 1) - @Column + // reportType is "convective sigmet". + @Column(length = 32) + @DataURI(position = 1) @DynamicSerializeElement - private Integer correctionFlag; - - // The entire report - @Column(length=15000) - @DynamicSerializeElement - private String bullMessage; + private String reportType; + // WMO header + @Column(length = 32) + @DataURI(position = 2) + @DynamicSerializeElement + private String wmoHeader; - /** - * Convsigmet section - */ - @DynamicSerializeElement - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + // forecastRegion as: SIGW, SIGC, or SIGE + @Column(length = 8) + @DataURI(position = 3) + @DynamicSerializeElement + private String forecastRegion; + + // The issue office where the report from + @Column(length = 32) + @DynamicSerializeElement + private String issueOffice; + + // Issue time of the report + @Column + @DynamicSerializeElement + private Calendar issueTime; + + // The designator + @Column(length = 8) + @DynamicSerializeElement + private String designatorBBB; + + // CorrectionFlag is a flag indicating a cancellation (0 or 1) + @Column + @DynamicSerializeElement + private Integer correctionFlag; + + // The entire report + @Column(length = 15000) + @DynamicSerializeElement + private String bullMessage; + + /** + * Convsigmet section + */ + @DynamicSerializeElement + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "convSigmetSection_parentid_idex") - private Set convSigmetSection = new HashSet(); + private Set convSigmetSection = new HashSet(); - - /** + /** * Default Convstructor */ public ConvSigmetRecord() { - this.issueOffice=""; - this.wmoHeader=""; - this.bullMessage=""; - this.designatorBBB=""; - this.forecastRegion=""; - this.reportType=""; - this.correctionFlag=IDecoderConstantsN.INTEGER_MISSING; + this.issueOffice = ""; + this.wmoHeader = ""; + this.bullMessage = ""; + this.designatorBBB = ""; + this.forecastRegion = ""; + this.reportType = ""; + this.correctionFlag = IDecoderConstantsN.INTEGER_MISSING; } /** * Convstructs a consigmet record from a dataURI * - * @param uri The dataURI + * @param uri + * The dataURI */ public ConvSigmetRecord(String uri) { super(uri); } - @Override public IDecoderGettable getDecoderGettable() { // TODO Auto-generated method stub @@ -154,151 +148,159 @@ public class ConvSigmetRecord extends PluginDataObject{ } /** - * @return the issueOffice - */ - public String getIssueOffice(){ - return issueOffice; - } + * @return the issueOffice + */ + public String getIssueOffice() { + return issueOffice; + } - /** - * @param issueOffice to set - */ - public void setIssueOffice(String issueOffice){ - this.issueOffice=issueOffice; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader(){ - return wmoHeader; - } + /** + * @param issueOffice + * to set + */ + public void setIssueOffice(String issueOffice) { + this.issueOffice = issueOffice; + } - /** - * @param wnoHeader to set - */ - public void setWmoHeader(String wmoHeader){ - this.wmoHeader=wmoHeader; - } - - /** - * @return the issueTime - */ - public Calendar getIssueTime(){ - return issueTime; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param issueTime to set - */ - public void setIssueTime(Calendar issueTime){ - this.issueTime=issueTime; - } - - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } + /** + * @param wnoHeader + * to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @param reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } + /** + * @return the issueTime + */ + public Calendar getIssueTime() { + return issueTime; + } - /** - * @return the designatorBBB - */ - public String getDesignatorBBB() { - return designatorBBB; - } + /** + * @param issueTime + * to set + */ + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } - /** - * @param designatorBBB to set - */ - public void setDesignatorBBB(String designatorBBB) { - this.designatorBBB = designatorBBB; - } + /** + * @return the reportType + */ + public String getReportType() { + return reportType; + } - /** - * @return the correctionFlag - */ - public Integer getCorrectionFlag() { - return correctionFlag; - } + /** + * @param reportType + * to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } - /** - * @param correctionFlag to set - */ - public void setCorrectionFlag(Integer correctionFlag) { - this.correctionFlag = correctionFlag; - } + /** + * @return the designatorBBB + */ + public String getDesignatorBBB() { + return designatorBBB; + } - /** - * @return the forecastRegion - */ - public String getForecastRegion() { - return forecastRegion; - } + /** + * @param designatorBBB + * to set + */ + public void setDesignatorBBB(String designatorBBB) { + this.designatorBBB = designatorBBB; + } - /** - * @param forecastRegion to set - */ - public void setForecastRegion(String forecastRegion) { - this.forecastRegion = forecastRegion; - } - - /** - * @return the bullMessage - */ - public String getBullMessage() { - return bullMessage; - } + /** + * @return the correctionFlag + */ + public Integer getCorrectionFlag() { + return correctionFlag; + } - /** - * @param bullMessage to set - */ - public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; - } - - - /** - * @return the set of convective Sigmet section - */ - public Set getConvSigmetSection() { - return convSigmetSection; - } + /** + * @param correctionFlag + * to set + */ + public void setCorrectionFlag(Integer correctionFlag) { + this.correctionFlag = correctionFlag; + } - /** - * @param convsigmet the section to set - */ - public void setConvSigmetSection(Set convSection) { - this.convSigmetSection = convSection; - } + /** + * @return the forecastRegion + */ + public String getForecastRegion() { + return forecastRegion; + } - /** - * @param add convective Sigmet Section to set - */ - public void addConvSigmetSection(ConvSigmetSection psection){ - convSigmetSection.add(psection); - - } - - /** - * Override existing set method to modify any - * classes that use the dataURI as a foreign key - */ - @Override - public void setIdentifier(Object dataURI) - { + /** + * @param forecastRegion + * to set + */ + public void setForecastRegion(String forecastRegion) { + this.forecastRegion = forecastRegion; + } - this.identifier = dataURI; - - } + /** + * @return the bullMessage + */ + public String getBullMessage() { + return bullMessage; + } + + /** + * @param bullMessage + * to set + */ + public void setBullMessage(String bullMessage) { + this.bullMessage = bullMessage; + } + + /** + * @return the set of convective Sigmet section + */ + public Set getConvSigmetSection() { + return convSigmetSection; + } + + /** + * @param convsigmet + * the section to set + */ + public void setConvSigmetSection(Set convSection) { + this.convSigmetSection = convSection; + } + + /** + * @param add + * convective Sigmet Section to set + */ + public void addConvSigmetSection(ConvSigmetSection psection) { + convSigmetSection.add(psection); + + } + + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + + this.identifier = dataURI; + + } @Override @Column @@ -306,4 +308,9 @@ public class ConvSigmetRecord extends PluginDataObject{ public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "convsigmet"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java index f956a86c9e..bf9c24bf61 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java @@ -7,18 +7,21 @@ *
  * SOFTWARE HISTORY
  *
- * Date         Ticket#         Engineer    Description
- * ------------ ----------      ----------- --------------------------
- * 08/2008      14				T. Lee     	Initial coding
- * 12/2008		14				T. Lee		Initialized variable
- * 03/2009		14				T. Lee		Migration to TO10
- * 07/2009		14				T. Lee		Migration to TO11
- * 09/2011      				Chin Chen   changed to improve purge performance and
- * 										    removed xml serialization as well
- * Apr 4, 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.
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * 08/2008      14         T. Lee      Initial coding
+ * 12/2008      14         T. Lee      Initialized variable
+ * 03/2009      14         T. Lee      Migration to TO10
+ * 07/2009      14         T. Lee      Migration to TO11
+ * 09/2011                 Chin Chen   changed to improve purge performance
+ *                                     and  removed xml serialization as
+ *                                     well
+ * 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
  *
  * 
* @@ -59,240 +62,246 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ffg", - indexes = { - @Index(name = "ffg_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ffg", indexes = { @Index(name = "ffg_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class FfgRecord extends PluginDataObject { private static final long serialVersionUID = 1L; - + /** Report type */ - @Column(length=32) - @DynamicSerializeElement - @DataURI(position=2) + @Column(length = 32) + @DynamicSerializeElement + @DataURI(position = 2) private String reportType; /** FFG AWIPS identifier */ - @Column(length=32) - @DataURI(position=1) + @Column(length = 32) + @DataURI(position = 1) @DynamicSerializeElement private String awipsID; - + /** Bulletin insurance time */ - @Column + @Column @DynamicSerializeElement private Calendar issueTime; /** Station ID */ - @Column(length=32) + @Column(length = 32) @DynamicSerializeElement private String issueOffice; /** Designator BBB */ - @Column(length=8) + @Column(length = 8) @DynamicSerializeElement private String designatorBBB; /** Bulletin messages */ - @Column(length=10000) + @Column(length = 10000) @DynamicSerializeElement private String bullMessage; - + /** Mass News Disseminator (MND) */ - @Column(length=72) + @Column(length = 72) @DynamicSerializeElement private String mndTime; /** WMO header */ - @Column(length=32) + @Column(length = 32) @DynamicSerializeElement private String wmoHeader; - + /** FFG precipitation */ - @DynamicSerializeElement + @DynamicSerializeElement @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "ffgP_parentid_idex") - private Set ffgP = new HashSet(); - + private Set ffgP = new HashSet(); + /** * Default Constructor */ public FfgRecord() { - awipsID = ""; - issueTime = null; - issueOffice = ""; - wmoHeader = ""; - mndTime = ""; - bullMessage = ""; + awipsID = ""; + issueTime = null; + issueOffice = ""; + wmoHeader = ""; + mndTime = ""; + bullMessage = ""; } /** * Constructs a FFG record from a dataURI * - * @param uri: The dataURI + * @param uri + * : The dataURI */ public FfgRecord(String uri) { - super(uri); + super(uri); } - + @Override public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; + // TODO Auto-generated method stub + return null; } - - /** - * Return the reportType + + /** + * Return the reportType */ public String getReportType() { return reportType; } /** - * @param reportType the report type to set + * @param reportType + * the report type to set */ public void setReportType(String reportType) { this.reportType = reportType; } - + /** * @return the awipsID */ public String getAwipsID() { - return awipsID; + return awipsID; } /** - * @param awipsID the AWIPS identifier to set + * @param awipsID + * the AWIPS identifier to set */ public void setAwipsID(String awipsID) { - this.awipsID = awipsID; + this.awipsID = awipsID; } /** * @return the issueTime */ public Calendar getIssueTime() { - return issueTime; + return issueTime; } /** - * @param issueTime the issueTime to set + * @param issueTime + * the issueTime to set */ public void setIssueTime(Calendar issueTime) { - this.issueTime = issueTime; + this.issueTime = issueTime; } /** * @return the issueOffice */ public String getIssueOffice() { - return issueOffice; + return issueOffice; } /** - * @param issueOffice the issueOffice to set + * @param issueOffice + * the issueOffice to set */ public void setIssueOffice(String issueOffice) { - this.issueOffice = issueOffice; + this.issueOffice = issueOffice; } /** * @return the wmoHeader */ public String getWmoHeader() { - return wmoHeader; + return wmoHeader; } /** - * @param wmoHeader the wmoHeader to set + * @param wmoHeader + * the wmoHeader to set */ public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; + this.wmoHeader = wmoHeader; } /** * @return designatorBBB */ public String getDesignatorBBB() { - return designatorBBB; + return designatorBBB; } /** - * @param designatorBBB the designatorBBB to set + * @param designatorBBB + * the designatorBBB to set */ public void setDesignatorBBB(String designatorBBB) { - this.designatorBBB = designatorBBB; + this.designatorBBB = designatorBBB; } - + /** * @return the bullMessage */ public String getBullMessage() { - return bullMessage; - } - + return bullMessage; + } + /** - * @param bullMessage the bullMessage to set + * @param bullMessage + * the bullMessage to set */ public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; + this.bullMessage = bullMessage; } - + /** * @return the MndTime */ public String getMndTime() { - return mndTime; + return mndTime; } /** - * @param mndTime the mndTime to set + * @param mndTime + * the mndTime to set */ public void setMndTime(String mndTime) { - this.mndTime = mndTime; + this.mndTime = mndTime; } - + /** * @return the set of precipitation (ffgP) */ public Set getFfgP() { - return ffgP; + return ffgP; } /** - * @param ffgP the set of precipitation to set + * @param ffgP + * the set of precipitation to set */ - public void setFfgP(Set ffgP ) { - this.ffgP = ffgP; + public void setFfgP(Set ffgP) { + this.ffgP = ffgP; } /** * Add FfgPrecip to set */ - public void addPrecip(FfgPrecip precip){ - ffgP.add(precip); - //precip.setParentID (this); - } + public void addPrecip(FfgPrecip precip) { + ffgP.add(precip); + // precip.setParentID (this); + } /** - * Override existing set method to modify any - * classes that use the dataURI as a foreign key + * Override existing set method to modify any classes that use the dataURI + * as a foreign key */ @Override public void setIdentifier(Object dataURI) { - - this.identifier = dataURI; - /*if (this.getFfgP() != null && this.getFfgP().size() > 0) { - for (Iterator iter = this.getFfgP().iterator(); iter.hasNext();) { - FfgPrecip fp = iter.next(); - //fp.setParentID(this); - } - }*/ + + this.identifier = dataURI; + /* + * if (this.getFfgP() != null && this.getFfgP().size() > 0) { for + * (Iterator iter = this.getFfgP().iterator(); + * iter.hasNext();) { FfgPrecip fp = iter.next(); + * //fp.setParentID(this); } } + */ } @Override @@ -301,4 +310,9 @@ public class FfgRecord extends PluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ffg"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.geomag/src/gov/noaa/nws/ncep/common/dataplugin/geomag/GeoMagRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.geomag/src/gov/noaa/nws/ncep/common/dataplugin/geomag/GeoMagRecord.java index 631085f11a..a99a0e7d4b 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.geomag/src/gov/noaa/nws/ncep/common/dataplugin/geomag/GeoMagRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.geomag/src/gov/noaa/nws/ncep/common/dataplugin/geomag/GeoMagRecord.java @@ -31,9 +31,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ---------------- -------------------------- - * 03/27/2013 975 sgurung Initial creation. - * 05/26/2013 bhebbard Added SequenceGenerator annotation. - * 07/22/2013 1977 rjpeter Added getDataURI and annotations. + * Mar 27, 2013 975 sgurung Initial creation. + * May 26, 2013 bhebbard Added SequenceGenerator + * annotation. + * Jul 22, 2013 1977 rjpeter Added getDataURI and annotations. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author sgurung @@ -303,4 +305,9 @@ public class GeoMagRecord extends PersistablePluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "geomag"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/src/gov/noaa/nws/ncep/common/dataplugin/idft/IdftRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/src/gov/noaa/nws/ncep/common/dataplugin/idft/IdftRecord.java index 6a98caea32..bf9462fd61 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/src/gov/noaa/nws/ncep/common/dataplugin/idft/IdftRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/src/gov/noaa/nws/ncep/common/dataplugin/idft/IdftRecord.java @@ -1,30 +1,3 @@ -/** - * - * IdftRecord.java - * - * This java class performs the mapping to the database tables for the Ice Drift - * (IDFT) Decoder Plug-In. - * - *
- * 
- * SOFTWARE HISTORY
- * Date			Ticket#		Engineer		Description
- * ------------	----------- --------------	-----------------------------------
- * 05/21/09		   100		F. J. Yen		Initial creation
- * 12/08/09		   100		F. J. Yen		Modified for to11d6 from to11d3
- * 05/27/10		   100		F. J. Yen		Refactored from to11dr3 for tolldr11
- * Apr 4, 2013        1846 bkowal      Added an index on refTime and forecastTime
- * Apr 12, 2013    1857     bgonzale        Added SequenceGenerator annotation.
- * 03/07/13        982      Archana         Updated getPointNum() to return an Integer
- * 
- * *
- * This code has been developed by the SIB for use in the AWIPS2 system.
- * 
- * - * @author F. J. Yen, SIB - * @version 1 - */ - package gov.noaa.nws.ncep.common.dataplugin.idft; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -52,19 +25,29 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; /** + * This java class performs the mapping to the database tables for the Ice Drift + * (IDFT) Decoder Plug-In. * - * + * This code has been developed by the SIB for use in the AWIPS2 system. + * *
  * 
  * SOFTWARE HISTORY
  * 
  * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 07/22/2013   1977       rjpeter     Added getDataURI and annotations.
- * 
+ * ------------ --------- ----------- --------------------------
+ * May 21, 2009 100       F. J. Yen   Initial creation
+ * Dec 08, 2009 100       F. J. Yen   Modified for to11d6 from to11d3
+ * May 27, 2010 100       F. J. Yen   Refactored from to11dr3 for tolldr11
+ * Apr 04, 2013 1846      bkowal      Added an index on refTime and forecastTime
+ * Apr 12, 2013 1857      bgonzale    Added SequenceGenerator annotation.
+ * Mar 07, 2013 982       Archana     Updated getPointNum() to return an Integer
+ * Jul 22, 2013 1977      rjpeter     Added getDataURI and annotations.
+ * Aug 30, 2013 2298      rjpeter     Make getPluginName abstract
  * 
+ * * - * @author rjpeter + * @author F. J. Yen, SIB * @version 1.0 */ @Entity @@ -222,4 +205,9 @@ public class IdftRecord extends PluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "idft"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/src/gov/noaa/nws/ncep/common/dataplugin/intlsigmet/IntlSigmetRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/src/gov/noaa/nws/ncep/common/dataplugin/intlsigmet/IntlSigmetRecord.java index 4c622b792b..60b09f4e49 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/src/gov/noaa/nws/ncep/common/dataplugin/intlsigmet/IntlSigmetRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/src/gov/noaa/nws/ncep/common/dataplugin/intlsigmet/IntlSigmetRecord.java @@ -58,183 +58,174 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "intlsigmet", - indexes = { - @Index(name = "intlsigmet_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "intlsigmet", indexes = { @Index(name = "intlsigmet_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize +public class IntlSigmetRecord extends PluginDataObject { - -public class IntlSigmetRecord extends PluginDataObject{ - - /** + /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // reportType is "international sigmet". - @Column(length=32) - @DataURI(position=1) - @DynamicSerializeElement - private String reportType; - - // hazardType is weather phenomena. - @Column(length=48) - @DataURI(position=2) - @DynamicSerializeElement - private String hazardType; - - // WMO header - @Column(length=32) - @DynamicSerializeElement - private String wmoHeader; - - // The issue office where the report from - @Column(length=32) - @DynamicSerializeElement - private String issueOffice; - - // Issue time of the report - @Column - @DynamicSerializeElement - private Calendar issueTime; - - // Start time of the report - @Column - @DynamicSerializeElement - private Calendar startTime; - - // End time of the report - @Column - @DynamicSerializeElement - private Calendar endTime; - - // The message ID - @Column(length=16) - @DataURI(position=3) - @DynamicSerializeElement - private String messageID; - - // The sequence number - @Column(length=8) - @DataURI(position=4) - @DynamicSerializeElement - private String sequenceNumber; - - // The air traffic services unit - @Column(length=16) - @DynamicSerializeElement - private String atsu; - - // The location indicator of the meteorological watch office originator - @Column(length=16) - @DynamicSerializeElement - private String omwo; - - // Flight level 1 - @Column - @DynamicSerializeElement - private Integer flightlevel1; - - // Flight level 2 - @Column - @DynamicSerializeElement - private Integer flightlevel2; - - // Distance - @Column - @DynamicSerializeElement - private Integer distance; - - // Direction - @Column(length=16) - @DynamicSerializeElement - private String direction; - - // Speed - @Column - @DynamicSerializeElement - private Integer speed; - - /* - * the name of the storm, where applicable, or location of the - * volcano, where applicable, or the word, OTHER, for reports - * not from CONUS, Hawaii, Guam, Japan, UK, Tahiti, and Cuba - - */ - @Column(length=48) - @DynamicSerializeElement - private String nameLocation; - - /* - * remarks such as: correction, remarks, ...etc. - */ - @Column(length=32) + // reportType is "international sigmet". + @Column(length = 32) + @DataURI(position = 1) @DynamicSerializeElement - private String remarks; - - // The changes in intensity; using as "INTSF", "WKN", or "NC". - @Column(length=16) - @DynamicSerializeElement - private String intensity; - - // The polygon indicator as "WI", "WTN", "EITHER SIDE", or "E OF". - @Column(length=16) - @DynamicSerializeElement - private String polygonExtent; - - // The entire report - @Column(length=5000) - @DynamicSerializeElement - private String bullMessage; + private String reportType; + // hazardType is weather phenomena. + @Column(length = 48) + @DataURI(position = 2) + @DynamicSerializeElement + private String hazardType; - /** - * Intlsigmet location - */ - @DynamicSerializeElement - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + // WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; + + // The issue office where the report from + @Column(length = 32) + @DynamicSerializeElement + private String issueOffice; + + // Issue time of the report + @Column + @DynamicSerializeElement + private Calendar issueTime; + + // Start time of the report + @Column + @DynamicSerializeElement + private Calendar startTime; + + // End time of the report + @Column + @DynamicSerializeElement + private Calendar endTime; + + // The message ID + @Column(length = 16) + @DataURI(position = 3) + @DynamicSerializeElement + private String messageID; + + // The sequence number + @Column(length = 8) + @DataURI(position = 4) + @DynamicSerializeElement + private String sequenceNumber; + + // The air traffic services unit + @Column(length = 16) + @DynamicSerializeElement + private String atsu; + + // The location indicator of the meteorological watch office originator + @Column(length = 16) + @DynamicSerializeElement + private String omwo; + + // Flight level 1 + @Column + @DynamicSerializeElement + private Integer flightlevel1; + + // Flight level 2 + @Column + @DynamicSerializeElement + private Integer flightlevel2; + + // Distance + @Column + @DynamicSerializeElement + private Integer distance; + + // Direction + @Column(length = 16) + @DynamicSerializeElement + private String direction; + + // Speed + @Column + @DynamicSerializeElement + private Integer speed; + + /* + * the name of the storm, where applicable, or location of the volcano, + * where applicable, or the word, OTHER, for reports not from CONUS, Hawaii, + * Guam, Japan, UK, Tahiti, and Cuba + */ + @Column(length = 48) + @DynamicSerializeElement + private String nameLocation; + + /* + * remarks such as: correction, remarks, ...etc. + */ + @Column(length = 32) + @DynamicSerializeElement + private String remarks; + + // The changes in intensity; using as "INTSF", "WKN", or "NC". + @Column(length = 16) + @DynamicSerializeElement + private String intensity; + + // The polygon indicator as "WI", "WTN", "EITHER SIDE", or "E OF". + @Column(length = 16) + @DynamicSerializeElement + private String polygonExtent; + + // The entire report + @Column(length = 5000) + @DynamicSerializeElement + private String bullMessage; + + /** + * Intlsigmet location + */ + @DynamicSerializeElement + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "intlSigmetLocation_parentid_idex") - private Set intlSigmetLocation = new HashSet(); + private Set intlSigmetLocation = new HashSet(); - - /** + /** * Default Convstructor */ public IntlSigmetRecord() { - this.issueOffice=null; - this.wmoHeader=null; - this.bullMessage=null; - this.hazardType=null; - this.messageID=null; - this.reportType="INTLSIGMET"; - this.sequenceNumber=null; - this.atsu=null; - this.omwo=null; - this.nameLocation=null; - this.intensity=null; - this.remarks=null; - this.flightlevel1=IDecoderConstantsN.INTEGER_MISSING; - this.flightlevel2=IDecoderConstantsN.INTEGER_MISSING; - this.direction=null; - this.distance=IDecoderConstantsN.INTEGER_MISSING; - this.speed=IDecoderConstantsN.INTEGER_MISSING; - this.polygonExtent=null; + this.issueOffice = null; + this.wmoHeader = null; + this.bullMessage = null; + this.hazardType = null; + this.messageID = null; + this.reportType = "INTLSIGMET"; + this.sequenceNumber = null; + this.atsu = null; + this.omwo = null; + this.nameLocation = null; + this.intensity = null; + this.remarks = null; + this.flightlevel1 = IDecoderConstantsN.INTEGER_MISSING; + this.flightlevel2 = IDecoderConstantsN.INTEGER_MISSING; + this.direction = null; + this.distance = IDecoderConstantsN.INTEGER_MISSING; + this.speed = IDecoderConstantsN.INTEGER_MISSING; + this.polygonExtent = null; } /** * Convstructs a consigmet record from a dataURI * - * @param uri The dataURI + * @param uri + * The dataURI */ public IntlSigmetRecord(String uri) { super(uri); } - @Override public IDecoderGettable getDecoderGettable() { // TODO Auto-generated method stub @@ -242,338 +233,356 @@ public class IntlSigmetRecord extends PluginDataObject{ } /** - * @return the issueOffice - */ - public String getIssueOffice(){ - return issueOffice; - } + * @return the issueOffice + */ + public String getIssueOffice() { + return issueOffice; + } - /** - * @param issueOffice to set - */ - public void setIssueOffice(String issueOffice){ - this.issueOffice=issueOffice; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader(){ - return wmoHeader; - } + /** + * @param issueOffice + * to set + */ + public void setIssueOffice(String issueOffice) { + this.issueOffice = issueOffice; + } - /** - * @param wnoHeader to set - */ - public void setWmoHeader(String wmoHeader){ - this.wmoHeader=wmoHeader; - } - - /** - * @return the issueTime - */ - public Calendar getIssueTime(){ - return issueTime; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param issueTime to set - */ - public void setIssueTime(Calendar issueTime){ - this.issueTime=issueTime; - } - - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } + /** + * @param wnoHeader + * to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * @param reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } + /** + * @return the issueTime + */ + public Calendar getIssueTime() { + return issueTime; + } - /** - * @return the bullMessage - */ - public String getBullMessage() { - return bullMessage; - } + /** + * @param issueTime + * to set + */ + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } - /** - * @param bullMessage to set - */ - public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; - } + /** + * @return the reportType + */ + public String getReportType() { + return reportType; + } - /** - * @return the set of hazard - */ - public String getHazardType() { - return hazardType; - } + /** + * @param reportType + * to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } - /** - * @param hazardType to set - */ - public void setHazardType(String hazardType) { - this.hazardType = hazardType; - } + /** + * @return the bullMessage + */ + public String getBullMessage() { + return bullMessage; + } - /** - * @return the startTime - */ - public Calendar getStartTime() { - return startTime; - } + /** + * @param bullMessage + * to set + */ + public void setBullMessage(String bullMessage) { + this.bullMessage = bullMessage; + } - /** - * @param startTime to set - */ - public void setStartTime(Calendar startTime) { - this.startTime = startTime; - } + /** + * @return the set of hazard + */ + public String getHazardType() { + return hazardType; + } - /** - * @return the endTime - */ - public Calendar getEndTime() { - return endTime; - } + /** + * @param hazardType + * to set + */ + public void setHazardType(String hazardType) { + this.hazardType = hazardType; + } - /** - * @param endTime to set - */ - public void setEndTime(Calendar endTime) { - this.endTime = endTime; - } + /** + * @return the startTime + */ + public Calendar getStartTime() { + return startTime; + } - public String getMessageID() { - return messageID; - } + /** + * @param startTime + * to set + */ + public void setStartTime(Calendar startTime) { + this.startTime = startTime; + } - /** - * @param messageID to set - */ - public void setMessageID(String messageID) { - this.messageID = messageID; - } + /** + * @return the endTime + */ + public Calendar getEndTime() { + return endTime; + } - /** - * @return the sequenceNumber - */ - public String getSequenceNumber() { - return sequenceNumber; - } + /** + * @param endTime + * to set + */ + public void setEndTime(Calendar endTime) { + this.endTime = endTime; + } - /** - * @param sequenceNumber to set - */ - public void setSequenceNumber(String sequenceNumber) { - this.sequenceNumber = sequenceNumber; - } + public String getMessageID() { + return messageID; + } - /** - * @return the atsu - */ - public String getAtsu() { - return atsu; - } + /** + * @param messageID + * to set + */ + public void setMessageID(String messageID) { + this.messageID = messageID; + } - /** - * @param atsu to set - */ - public void setAtsu(String atsu) { - this.atsu = atsu; - } + /** + * @return the sequenceNumber + */ + public String getSequenceNumber() { + return sequenceNumber; + } - /** - * @return the omwo - */ - public String getOmwo() { - return omwo; - } + /** + * @param sequenceNumber + * to set + */ + public void setSequenceNumber(String sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } - /** - * @param omwo to set - */ - public void setOmwo(String omwo) { - this.omwo = omwo; - } + /** + * @return the atsu + */ + public String getAtsu() { + return atsu; + } - /** - * @return the flightLevel1 - */ - public Integer getFlightlevel1() { - return flightlevel1; - } + /** + * @param atsu + * to set + */ + public void setAtsu(String atsu) { + this.atsu = atsu; + } - /** - * @param flightLevel1 to set - */ - public void setFlightlevel1(Integer flightlevel1) { - this.flightlevel1 = flightlevel1; - } + /** + * @return the omwo + */ + public String getOmwo() { + return omwo; + } - /** - * @return flightLevel2 - */ - public Integer getFlightlevel2() { - return flightlevel2; - } + /** + * @param omwo + * to set + */ + public void setOmwo(String omwo) { + this.omwo = omwo; + } - /** - * @param flightLevel2 to set - */ - public void setFlightlevel2(Integer flightlevel2) { - this.flightlevel2 = flightlevel2; - } - - /** - * @return distacne - */ - public Integer getDistance() { - return distance; - } + /** + * @return the flightLevel1 + */ + public Integer getFlightlevel1() { + return flightlevel1; + } - /** - * @param distance to set - */ - public void setDistance(Integer distance) { - this.distance = distance; - } + /** + * @param flightLevel1 + * to set + */ + public void setFlightlevel1(Integer flightlevel1) { + this.flightlevel1 = flightlevel1; + } - /** - * @return direction - */ - public String getDirection() { - return direction; - } + /** + * @return flightLevel2 + */ + public Integer getFlightlevel2() { + return flightlevel2; + } - /** - * @param direction to set - */ - public void setDirection(String direction) { - this.direction = direction; - } + /** + * @param flightLevel2 + * to set + */ + public void setFlightlevel2(Integer flightlevel2) { + this.flightlevel2 = flightlevel2; + } - /** - * @return the speed - */ - public Integer getSpeed() { - return speed; - } + /** + * @return distacne + */ + public Integer getDistance() { + return distance; + } - /** - * @param speed to set - */ - public void setSpeed(Integer speed) { - this.speed = speed; - } + /** + * @param distance + * to set + */ + public void setDistance(Integer distance) { + this.distance = distance; + } - /** - * @return the nameLocation - */ - public String getNameLocation() { - return nameLocation; - } + /** + * @return direction + */ + public String getDirection() { + return direction; + } - /** - * @param nameLocation to set - */ - public void setNameLocation(String nameLocation) { - this.nameLocation = nameLocation; - } + /** + * @param direction + * to set + */ + public void setDirection(String direction) { + this.direction = direction; + } - /** - * @return the remarks - */ - public String getRemarks() { - return remarks; - } + /** + * @return the speed + */ + public Integer getSpeed() { + return speed; + } - /** - * @param remarks to set - */ - public void setRemarks(String remarks) { - this.remarks = remarks; - } + /** + * @param speed + * to set + */ + public void setSpeed(Integer speed) { + this.speed = speed; + } - /** - * @return the intensity - */ - public String getIntensity() { - return intensity; - } - - /** - * @param intensity to set - */ - public void setIntensity(String intensity) { - this.intensity = intensity; - } - - /** - * @return the polygonExtent - */ - public String getPolygonExtent() { - return polygonExtent; - } - - /** - * @param polygonExtent to set - */ - public void setPolygonExtent(String polygonExtent) { - this.polygonExtent = polygonExtent; - } + /** + * @return the nameLocation + */ + public String getNameLocation() { + return nameLocation; + } - /** - * @return the intlSigmetLocation - */ - public Set getIntlSigmetLocation() { - return intlSigmetLocation; - } + /** + * @param nameLocation + * to set + */ + public void setNameLocation(String nameLocation) { + this.nameLocation = nameLocation; + } - /** - * @param intlSigmetLocation to set - */ - public void setIntlSigmetLocation(Set intlSigmetLocation) { - this.intlSigmetLocation = intlSigmetLocation; - } + /** + * @return the remarks + */ + public String getRemarks() { + return remarks; + } - /** - * @return the serialVersionUID - */ - public static long getSerialVersionUID() { - return serialVersionUID; - } - - /** - * @param add international sigmet Location to set - */ - public void addIntlSigmetLocation(IntlSigmetLocation psection){ - intlSigmetLocation.add(psection); - - } - - /** - * Override existing set method to modify any - * classes that use the dataURI as a foreign key - */ - @Override - public void setIdentifier(Object dataURI) - { + /** + * @param remarks + * to set + */ + public void setRemarks(String remarks) { + this.remarks = remarks; + } - this.identifier = dataURI; - - - - } + /** + * @return the intensity + */ + public String getIntensity() { + return intensity; + } + + /** + * @param intensity + * to set + */ + public void setIntensity(String intensity) { + this.intensity = intensity; + } + + /** + * @return the polygonExtent + */ + public String getPolygonExtent() { + return polygonExtent; + } + + /** + * @param polygonExtent + * to set + */ + public void setPolygonExtent(String polygonExtent) { + this.polygonExtent = polygonExtent; + } + + /** + * @return the intlSigmetLocation + */ + public Set getIntlSigmetLocation() { + return intlSigmetLocation; + } + + /** + * @param intlSigmetLocation + * to set + */ + public void setIntlSigmetLocation(Set intlSigmetLocation) { + this.intlSigmetLocation = intlSigmetLocation; + } + + /** + * @return the serialVersionUID + */ + public static long getSerialVersionUID() { + return serialVersionUID; + } + + /** + * @param add + * international sigmet Location to set + */ + public void addIntlSigmetLocation(IntlSigmetLocation psection) { + intlSigmetLocation.add(psection); + + } + + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + this.identifier = dataURI; + } @Override @Column @@ -581,4 +590,9 @@ public class IntlSigmetRecord extends PluginDataObject{ public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "intlsigmet"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java index d5f3316c16..8395e52c8d 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java @@ -8,16 +8,18 @@ * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 08/2009 144 T. Lee Created - * 11/2009 144 T. Lee Implemented area name and - * added file name - * 12/2009 144 T. Lee Added calType, satelliteId - * and imageTypeNumber - * 05/2010 144 L. Lin Migration to TO11DR11. - * 09/2012 B. Hebbard Merge out RTS changes from OB12.9.1 - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime + * 11/2009 144 T. Lee Implemented area name and added file + * name + * 12/2009 144 T. Lee Added calType, satelliteId and + * imageTypeNumber + * 05/2010 144 L. Lin Migration to TO11DR11. + * 09/2012 B. Hebbard Merge out RTS changes from OB12.9.1 + * 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 * * * @@ -65,12 +67,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "mcidas", - indexes = { - @Index(name = "mcidas_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "mcidas", indexes = { @Index(name = "mcidas_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @@ -223,7 +221,6 @@ public class McidasRecord extends PersistablePluginDataObject implements super(uri); } - /** * Set the time to be used for the persistence time for this object. * @@ -379,4 +376,9 @@ public class McidasRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "mcidas"; + } } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepPointDataTransform.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepPointDataTransform.java index 41841d241f..1fcac9a8d6 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepPointDataTransform.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepPointDataTransform.java @@ -20,6 +20,8 @@ package gov.noaa.nws.ncep.common.dataplugin.ncairep; * further licensing information. **/ +import gov.noaa.nws.ncep.common.dataplugin.ncairep.dao.NcAirepDao; + import java.io.File; import java.util.ArrayList; import java.util.Date; @@ -27,7 +29,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import gov.noaa.nws.ncep.common.dataplugin.ncairep.dao.NcAirepDao; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataDescription; @@ -36,17 +37,21 @@ import com.raytheon.uf.common.pointdata.spatial.AircraftObsLocation; import com.raytheon.uf.common.time.DataTime; /** - * Provides a transform from NcAirepRecords to PointDataContainer and vice versa. + * Provides a transform from NcAirepRecords to PointDataContainer and vice + * versa. * *
  * 
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * 04/27/2011				F. J. Yen	Initial creation from MetarPointDataTransform
- * 06/28/2011				F. J. Yen	Updated for OB11.5
- * 09/19/2011    286       Q.Zhou      Modified populateRecord to add 8 new fields for TB, IC and SK.
- * 10/18/2011    286       Q.Zhou      Fixed datarui in db
+ * Apr 27, 2011            F. J. Yen   Initial creation from
+ *                                     MetarPointDataTransform
+ * Jun 28, 2011            F. J. Yen   Updated for OB11.5
+ * Sep 19, 2011 286        Q.Zhou      Modified populateRecord to add 8 new
+ *                                     fields for TB, IC and SK.
+ * Oct 18, 2011 286        Q.Zhou      Fixed datarui in db
+ * Aug 30, 2013 2298       rjpeter     Make getPluginName abstract
  * 
* * @author f j yen @@ -68,9 +73,9 @@ public class NcAirepPointDataTransform { private static final String FLIGHT_HAZARD = "flightHazard"; private static final String FLIGHT_WEATHER = "flightWeather"; - + private static final String FLIGHT_CONDITIONS = "flightConditions"; - + // FLIGHT_HAZARD, FLIGHT_WEATHER, FLIGHT_CONDITIONS // ------------------ private static final String WMO_HEADER = "wmoHeader"; @@ -80,7 +85,7 @@ public class NcAirepPointDataTransform { private static final String REPORT_TYPE = "reportType"; private static final String TIME_OBS = "timeObs"; - + private static final String OBS_ID = "obsId"; // WMO_HEADER, STATION_ID, REPORT_TYPE, TIME_OBS, OBS_ID @@ -88,9 +93,9 @@ public class NcAirepPointDataTransform { private static final String LONGITUDE = "longitude"; private static final String LATITUDE = "latitude"; - + private static final String FLIGHT_LEVEL = "flightLevel"; - + // LONGITUDE, LATITUDE, FLIGHT_LEVEL // ------------------ private static final String CORRECTION_CODE = "correctionCode"; @@ -98,14 +103,23 @@ public class NcAirepPointDataTransform { private static final String DATAURI = "dataURI"; private static final String TURB_INTEN = "turbInten"; + private static final String TURB_TYPE = "turbType"; + private static final String TURB_FREQ = "turbFreq"; + private static final String ICE_INTEN = "iceInten"; + private static final String ICE_TYPE = "iceType"; + private static final String SKY_COVER = "skyCover"; + private static final String SKY_BASE_HEIGHT = "skyBaseHeight"; + private static final String SKY_TOP_HEIGHT = "skyTopHeight"; + private static final String SUSPECT_TIME_FLAG = "suspectTimeFlag"; + // CORRECTION_CODE, DATAURI, // ------------------ @@ -113,12 +127,12 @@ public class NcAirepPointDataTransform { * It is important to keep this up to date or risk breaking backwards * compatibility */ - private static final String[] ALL_PARAMS = { DATAURI, TIME_OBS, OBS_ID, REPORT_TYPE, - STATION_ID, WMO_HEADER, FLIGHT_HAZARD, FLIGHT_WEATHER, + private static final String[] ALL_PARAMS = { DATAURI, TIME_OBS, OBS_ID, + REPORT_TYPE, STATION_ID, WMO_HEADER, FLIGHT_HAZARD, FLIGHT_WEATHER, FLIGHT_CONDITIONS, LONGITUDE, LATITUDE, FLIGHT_LEVEL, - CORRECTION_CODE, TEMPERATURE, WIND_SPEED, WIND_DIR, - TURB_INTEN, TURB_TYPE, TURB_FREQ, ICE_INTEN, ICE_TYPE, SKY_COVER, - SKY_BASE_HEIGHT, SKY_TOP_HEIGHT, SUSPECT_TIME_FLAG}; + CORRECTION_CODE, TEMPERATURE, WIND_SPEED, WIND_DIR, TURB_INTEN, + TURB_TYPE, TURB_FREQ, ICE_INTEN, ICE_TYPE, SKY_COVER, + SKY_BASE_HEIGHT, SKY_TOP_HEIGHT, SUSPECT_TIME_FLAG }; public static final String ALL_PARAMS_LIST; static { @@ -150,60 +164,62 @@ public class NcAirepPointDataTransform { } public PluginDataObject[] toPointData(PluginDataObject[] pdo) { - - long t0 =System.currentTimeMillis(); - System.out.println("===============>toPointData"); // in NcAirepPointDataTransform t0=" + t0); + + long t0 = System.currentTimeMillis(); + System.out.println("===============>toPointData"); // in + // NcAirepPointDataTransform + // t0=" + t0); /* 999 */ - + if (pdo.length > 0) { Map pointMap = new HashMap(); - + for (PluginDataObject p : pdo) { - - if (!(p instanceof NcAirepRecord)) + + if (!(p instanceof NcAirepRecord)) { continue; - + } + File f = this.dao.getFullFilePath(p); - + PointDataContainer pdc = pointMap.get(f); if (pdc == null) { pdc = PointDataContainer.build(this.description); pointMap.put(f, pdc); - + } - - NcAirepRecord nar = (NcAirepRecord) p; - PointDataView pdv = buildView(pdc, nar); + + NcAirepRecord nar = (NcAirepRecord) p; + PointDataView pdv = buildView(pdc, nar); nar.setPointDataView(pdv); - + } } - - long t1 =System.currentTimeMillis(); - + + long t1 = System.currentTimeMillis(); + return pdo; } private PointDataView buildView(PointDataContainer container, NcAirepRecord record) { PointDataView pdv = container.append(); -// pdv.setString(STATION_ID, record.getStationId()); if (record.getCorIndicator() != null) { - pdv.setString(CORRECTION_CODE, record.getCorIndicator()); - }else{ - pdv.setString(CORRECTION_CODE," "); + pdv.setString(CORRECTION_CODE, record.getCorIndicator()); + } else { + pdv.setString(CORRECTION_CODE, " "); } - -// pdv.setFloat(LATITUDE, (float) record.getLatitude()); -// pdv.setFloat(LONGITUDE, (float) record.getLongitude()); + + // pdv.setFloat(LATITUDE, (float) record.getLatitude()); + // pdv.setFloat(LONGITUDE, (float) record.getLongitude()); pdv.setFloat(FLIGHT_LEVEL, record.getFlightLevel()); pdv.setLong(TIME_OBS, record.getDataTime().getRefTime().getTime()); -// pdv.setString(DATAURI, record.getDataURI()); -// pdv.setString(REPORT_TYPE, record.getReportType()); - pdv.setFloat(TEMPERATURE,(float) record.getTemp()); - pdv.setFloat(WIND_DIR, (float) record.getWindDirection()); - pdv.setFloat(WIND_SPEED, (float) record.getWindSpeed()); - + // pdv.setString(DATAURI, record.getDataURI()); + // pdv.setString(REPORT_TYPE, record.getReportType()); + pdv.setFloat(TEMPERATURE, record.getTemp()); + pdv.setFloat(WIND_DIR, record.getWindDirection()); + pdv.setFloat(WIND_SPEED, record.getWindSpeed()); + pdv.setString(TURB_INTEN, record.getTurbInten()); pdv.setString(TURB_TYPE, record.getTurbType()); pdv.setString(TURB_FREQ, record.getTurbFreq()); @@ -213,7 +229,7 @@ public class NcAirepPointDataTransform { pdv.setInt(SKY_BASE_HEIGHT, record.getSkyBaseHeight()); pdv.setInt(SKY_TOP_HEIGHT, record.getSkyTopHeight()); pdv.setString(SUSPECT_TIME_FLAG, record.getSuspectTimeFlag()); - + return pdv; } @@ -237,7 +253,6 @@ public class NcAirepPointDataTransform { nar.setTemp(pdv.getNumber(TEMPERATURE).floatValue()); - nar.setPluginName("ncairep"); nar.setFlightHazard(pdv.getInt(FLIGHT_HAZARD)); nar.setFlightWeather(pdv.getInt(FLIGHT_WEATHER)); nar.setFlightConditions(pdv.getInt(FLIGHT_CONDITIONS)); @@ -245,8 +260,8 @@ public class NcAirepPointDataTransform { // AIREP Wind data nar.setWindDirection(pdv.getNumber(WIND_DIR).floatValue()); nar.setWindSpeed(pdv.getNumber(WIND_SPEED).floatValue()); - //nar.setSuspectTimeFlag(pdv.getString(SUSPECT_TIME_FLAG)); - + // nar.setSuspectTimeFlag(pdv.getString(SUSPECT_TIME_FLAG)); + return nar; } @@ -260,4 +275,3 @@ public class NcAirepPointDataTransform { return records.toArray(new NcAirepRecord[records.size()]); } } - diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepRecord.java index 3410c76c85..c35159c23b 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/src/gov/noaa/nws/ncep/common/dataplugin/ncairep/NcAirepRecord.java @@ -60,19 +60,23 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20110421 F. J. Yen Initial creation from Raytheon's pirep. - * Change temp, windSpeed from Double to Float. - * Change windDirection from Integer to Float - * 08/30/2011 286 qzhou Use IDecoderConstantsN.INTEGER_MISSING instead -9999 in visibility. - * 08/31/2011 286 qzhou Moved this from ~edex.plugin.airep - * 9/20/2011 286 qzhou Change reportType to String - * 04/05/2012 420 dgilling Prevent NullPointerExceptions in + * Apr 21, 2011 F. J. Yen Initial creation from Raytheon's pirep. + * Change temp, windSpeed from Double to + * Float. Change windDirection from Integer + * to Float + * Aug 30, 2011 286 qzhou Use IDecoderConstantsN.INTEGER_MISSING + * instead -9999 in visibility. + * Aug 31, 2011 286 qzhou Moved this from ~edex.plugin.airep + * Sep 20, 2011 286 qzhou Change reportType to String + * Apr 05, 2012 420 dgilling Prevent NullPointerExceptions in * buildMessageData(). - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * 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 * * * @@ -87,812 +91,804 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncairep", - indexes = { - @Index(name = "ncairep_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncairep", indexes = { @Index(name = "ncairep_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class NcAirepRecord extends PluginDataObject implements ISpatialEnabled, - IDecoderGettable, IPointData, IPersistable { + IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // public static final String PLUGIN_NAME = "ncairep"; - // - // public static final String STATION_ID = "stationId"; + public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; - public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; + public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; - public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit ALTITUDE_UNIT = NonSI.FOOT; - public static final Unit ALTITUDE_UNIT = NonSI.FOOT; + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + private static UnitConverter ftToHft = NonSI.FOOT.getConverterTo(SI + .HECTO(NonSI.FOOT)); - private static UnitConverter ftToHft = NonSI.FOOT.getConverterTo(SI - .HECTO(NonSI.FOOT)); + private static final HashMap PARM_MAP = new HashMap(); - private static final HashMap PARM_MAP = new HashMap(); + // private static final HashMap WX_MAP = new + // HashMap(); - // private static final HashMap WX_MAP = new - // HashMap(); + static { + PARM_MAP.put("T", SFC_TEMP); + PARM_MAP.put("WS", SFC_WNDSPD); + PARM_MAP.put("WD", SFC_WNDDIR); + PARM_MAP.put("NLAT", STA_LAT); + PARM_MAP.put("NLON", STA_LON); + PARM_MAP.put("FLT_LVL", UA_FLTLVL); - static { - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("FLT_LVL", UA_FLTLVL); + // WX_MAP.put(0, "CLR"); + // WX_MAP.put(1, "SCT"); + // WX_MAP.put(2, "BKN"); + // WX_MAP.put(3, "CONT"); + // WX_MAP.put(4, "LIGHTNING"); + // WX_MAP.put(5, "DZRA"); + // WX_MAP.put(6, "CONT RA"); + // WX_MAP.put(7, "CONT SN"); + // WX_MAP.put(8, "SH"); + // WX_MAP.put(9, "TSRA"); + } - // WX_MAP.put(0, "CLR"); - // WX_MAP.put(1, "SCT"); - // WX_MAP.put(2, "BKN"); - // WX_MAP.put(3, "CONT"); - // WX_MAP.put(4, "LIGHTNING"); - // WX_MAP.put(5, "DZRA"); - // WX_MAP.put(6, "CONT RA"); - // WX_MAP.put(7, "CONT SN"); - // WX_MAP.put(8, "SH"); - // WX_MAP.put(9, "TSRA"); - } + @Transient + @DynamicSerializeElement + @XmlAttribute + private Integer obsId; - @Transient - @DynamicSerializeElement - @XmlAttribute - private Integer obsId; + // Time of the observation. + @Transient + @DynamicSerializeElement + @XmlAttribute + private Calendar timeObs; - // Time of the observation. - @Transient - @DynamicSerializeElement - @XmlAttribute - private Calendar timeObs; + // Time of the observation to the nearest hour. + @Column + @DynamicSerializeElement + @XmlAttribute + private Calendar refHour; - // Time of the observation to the nearest hour. - @Column - @DynamicSerializeElement - @XmlAttribute - private Calendar refHour; + // + @DataURI(position = 1) + @Column(length = 8) + @DynamicSerializeElement + @XmlAttribute + private String reportType; - // - @DataURI(position = 1) - @Column(length = 8) - @DynamicSerializeElement - @XmlAttribute - private String reportType; + // Text of the WMO header + @Transient + @DynamicSerializeElement + @XmlElement + private String wmoHeader; - // Text of the WMO header - @Transient - @DynamicSerializeElement - @XmlElement - private String wmoHeader; + // Correction indicator from wmo header + @DataURI(position = 2) + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String corIndicator; - // Correction indicator from wmo header - @DataURI(position = 2) - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String corIndicator; + // Observation air temperature in degrees Celsius. + // Decimal(5,2) + @Transient + @DynamicSerializeElement + @XmlElement + private Float temp; - // Observation air temperature in degrees Celsius. - // Decimal(5,2) - @Transient - @DynamicSerializeElement - @XmlElement - private Float temp; + // Observation wind direction in angular degrees. Integer + @Transient + @DynamicSerializeElement + @XmlElement + private Float windDirection; - // Observation wind direction in angular degrees. Integer - @Transient - @DynamicSerializeElement - @XmlElement - private Float windDirection; + // Observation wind speed in knots. + // Decimal(5,2) + @Transient + // @Column + @DynamicSerializeElement + @XmlElement + private Float windSpeed; - // Observation wind speed in knots. - // Decimal(5,2) - @Transient - // @Column - @DynamicSerializeElement - @XmlElement - private Float windSpeed; + @Transient + @DynamicSerializeElement + @XmlElement + private Integer flightHazard; - @Transient - @DynamicSerializeElement - @XmlElement - private Integer flightHazard; + @Transient + @DynamicSerializeElement + @XmlElement + private Integer flightWeather; - @Transient - @DynamicSerializeElement - @XmlElement - private Integer flightWeather; + @Transient + @DynamicSerializeElement + @XmlElement + private Integer flightConditions; - @Transient - @DynamicSerializeElement - @XmlElement - private Integer flightConditions; + // @Transient + // @DynamicSerializeElement + // @XmlElement + // private Float latitude; + // + // @Transient + // @DynamicSerializeElement + // @XmlElement + // private Float longitude; + // + // @Transient + // @DynamicSerializeElement + // @XmlElement + // private String stationId; - // @Transient - // @DynamicSerializeElement - // @XmlElement - // private Float latitude; - // - // @Transient - // @DynamicSerializeElement - // @XmlElement - // private Float longitude; - // - // @Transient - // @DynamicSerializeElement - // @XmlElement - // private String stationId; + // @Transient + // @DynamicSerializeElement + // @XmlElement + // private String dataURI; - // @Transient - // @DynamicSerializeElement - // @XmlElement - // private String dataURI; + @Transient + @DynamicSerializeElement + // @XmlElement + @XmlAttribute + private String turbInten; - @Transient - @DynamicSerializeElement - // @XmlElement - @XmlAttribute - private String turbInten; + @Transient + @DynamicSerializeElement + @XmlElement + private String iceInten; - @Transient - @DynamicSerializeElement - @XmlElement - private String iceInten; + @Transient + @DynamicSerializeElement + @XmlElement + private String skyCover; - @Transient - @DynamicSerializeElement - @XmlElement - private String skyCover; + @Transient + @DynamicSerializeElement + @XmlElement + private String turbType; - @Transient - @DynamicSerializeElement - @XmlElement - private String turbType; + @Transient + @DynamicSerializeElement + @XmlElement + private String iceType; - @Transient - @DynamicSerializeElement - @XmlElement - private String iceType; + @Transient + @DynamicSerializeElement + @XmlElement + private String turbFreq; - @Transient - @DynamicSerializeElement - @XmlElement - private String turbFreq; + @Transient + @DynamicSerializeElement + @XmlElement + private int skyBaseHeight; - @Transient - @DynamicSerializeElement - @XmlElement - private int skyBaseHeight; + @Transient + @DynamicSerializeElement + @XmlElement + private int skyTopHeight; - @Transient - @DynamicSerializeElement - @XmlElement - private int skyTopHeight; + @Transient + @DynamicSerializeElement + @XmlElement + private String suspectTimeFlag; - @Transient - @DynamicSerializeElement - @XmlElement - private String suspectTimeFlag; + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private AircraftObsLocation location; - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private AircraftObsLocation location; + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - /** + /** * */ - public NcAirepRecord() { - } - - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public NcAirepRecord(String uri) { - super(uri); - } - - public Integer getObsId() { - return obsId; - } - - public void setObsId(Integer obsId) { - this.obsId = obsId; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * Get the report correction indicator. - * - * @return The corIndicator - */ - public String getCorIndicator() { - return corIndicator; - } - - /** - * Set the report correction indicator. - * - * @param corIndicator - * The corIndicator. - */ - public void setCorIndicator(String corIndicator) { - this.corIndicator = corIndicator; - } - - /** - * Get the report data for this observation. - * - * @return The Report data. - */ - public String getReportData() { - String s = null; - if (messageData != null && messageData instanceof String) { - s = (String) messageData; - } else { - s = buildMessageData(); - } - return s; - } - - /** - * Set the report data for this observation. - * - * @param reportData - * The Report data. - */ - public void setReportData(String reportData) { - messageData = reportData; - } - - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } - - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } - - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } - - /** - * Boolean for whether location is defined in the spatial tables. - * - * @return true or false (Is location defined in the spatial tables?) - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } - - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } - - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getFlightLevel() { - return location.getFlightLevel(); - } - - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * @return the timeObs - */ - public Calendar getTimeObs() { - if (this.dataTime == null) { - return null; - } - return this.dataTime.getRefTimeAsCalendar(); - } - - /** - * @param timeObs - * the timeObs to set - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } - - /** - * @return the refHour - */ - public Calendar getRefHour() { - return refHour; - } - - /** - * @param refHour - * the refHour to set - */ - public void setRefHour(Calendar refHour) { - this.refHour = refHour; - } - - /** - * @return the temp - */ - public float getTemp() { - return temp; - } - - /** - * @param temp - * the temp to set - */ - public void setTemp(float temp) { - this.temp = temp; - } - - /** - * @return the windDirection - */ - public float getWindDirection() { - return windDirection; - } - - /** - * @param windDirection - * the windDirection to set - */ - public void setWindDirection(float windDirection) { - this.windDirection = windDirection; - } - - /** - * @return the windspeed - */ - public float getWindSpeed() { - return windSpeed; - } - - /** - * @param windspeed - * the windspeed to set - */ - public void setWindSpeed(float windSpeed) { - this.windSpeed = windSpeed; - } - - /** - * @return the flightHazard - */ - public Integer getFlightHazard() { - return flightHazard; - } - - /** - * @param flightHazard - * the wx_past_1 to set - */ - public void setFlightHazard(Integer flightHazard) { - this.flightHazard = flightHazard; - } - - /** - * @return the flightWeather - */ - public Integer getFlightWeather() { - return flightWeather; - } - - /** - * @param flightWeather - * the getFlightWeather to set - */ - public void setFlightWeather(Integer flightWeather) { - this.flightWeather = flightWeather; - } - - /** - * @return the flightConditions - */ - public Integer getFlightConditions() { - return flightConditions; - } - - /** - * @param flightConditions - * the flightConditions to set - */ - public void setFlightConditions(Integer flightConditions) { - this.flightConditions = flightConditions; - } - - /** - * @return the wmoHeader - */ - public String getTurbInten() { - return turbInten; - } - - public void setTurbInten(String turbInten) { - this.turbInten = turbInten; - } - - public String getIceInten() { - return iceInten; - } - - public void setIceInten(String iceInten) { - this.iceInten = iceInten; - } - - public String getSkyCover() { - return skyCover; - } - - public void setSkyCover(String skyCover) { - this.skyCover = skyCover; - } - - public String getTurbType() { - return turbType; - } - - public void setTurbType(String turbType) { - this.turbType = turbType; - } - - public String getIceType() { - return iceType; - } - - public void setIceType(String iceType) { - this.iceType = iceType; - } - - public String getTurbFreq() { - return turbFreq; - } - - public void setTurbFreq(String turbFreq) { - this.turbFreq = turbFreq; - } - - public int getSkyBaseHeight() { - return skyBaseHeight; - } - - public void setSkyBaseHeight(int skyBaseHeight) { - this.skyBaseHeight = skyBaseHeight; - } - - public int getSkyTopHeight() { - return skyTopHeight; - } - - public void setSkyTopHeight(int skyTopHeight) { - this.skyTopHeight = skyTopHeight; - } - - public String getSuspectTimeFlag() { - return suspectTimeFlag; - } - - public void setSuspectTimeFlag(String suspectTimeFlag) { - this.suspectTimeFlag = suspectTimeFlag; - } - - @Override - public void setDataURI(String dataURI) { - identifier = dataURI; - } - - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - if ("STA".matches(paramName)) { - return this.getStationId(); - } - return null; - } - - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; - - String pName = PARM_MAP.get(paramName); - - if (SFC_TEMP.equals(pName) && (temp != null)) { - a = new Amount(temp, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { - a = new Amount(windDirection, WIND_DIR_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) { - a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT); - - } - return a; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } - - @Override - public String[] getStrings(String paramName) { - if ("FLT_HZD".matches(paramName) && flightHazard != null) { - String[] flightHazards = { flightHazard.toString() }; - return flightHazards; - } - return null; - } - - @Override - public AircraftObsLocation getSpatialObject() { - return location; - } - - public AircraftObsLocation getLocation() { - return location; - } - - public void setLocation(AircraftObsLocation location) { - this.location = location; - } - - @Override - public String getMessageData() { - return getReportData(); - } - - private String buildMessageData() { - boolean validLocation = (location != null); - - StringBuilder messageData = new StringBuilder("ARP "); - if (validLocation && getStationId() != null) { - messageData.append(getStationId()); - } - messageData.append(' '); - - if ((validLocation) && (!Double.isNaN(getLatitude())) - && (!Double.isNaN(getLongitude()))) { - messageData.append(formatLatLon(getLatitude(), true)); - messageData.append(' '); - messageData.append(formatLatLon(getLongitude(), false)); - messageData.append(' '); - } - - if (timeObs != null) { - DateFormat df = new SimpleDateFormat("HHmm"); - messageData.append(df.format(timeObs.getTime())); - } - messageData.append(" F"); - - if (validLocation && getFlightLevel() != null) { - int flightLevel = (int) ftToHft.convert(getFlightLevel()); - messageData.append(flightLevel); - } - messageData.append(' '); - - if (temp != null) { - if (temp > 0) { - messageData.append('P'); - } else { - messageData.append('M'); - } - messageData.append(Math.abs(temp.intValue())); - } - messageData.append(' '); - - if ((windDirection != null) && (windSpeed != null)) { - messageData.append(windDirection.intValue()); - messageData.append('/'); - messageData.append(windSpeed.intValue()); - messageData.append("KT"); - } - messageData.append("TB"); - - return messageData.toString(); - } - - private String formatLatLon(double value, boolean isLatitude) { - char dir; - if (isLatitude) { - if (value > 0) { - dir = 'N'; - } else { - dir = 'S'; - } - } else { - if (value > 0) { - dir = 'E'; - } else { - dir = 'W'; - } - } - - DecimalFormat df = new DecimalFormat("###.000"); - df.setRoundingMode(RoundingMode.DOWN); - - return df.format(Math.abs(value)) + dir; - } - - /** - * Returns the hashCode for this object. This implementation returns the - * hashCode of the generated dataURI. - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); - return result; - } - - /** - * Checks if this record is equal to another by checking the generated - * dataURI. - * - * @param obj - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - NcAirepRecord other = (NcAirepRecord) obj; - if (getDataURI() == null) { - if (other.getDataURI() != null) { - return false; - } - } else if (!getDataURI().equals(other.getDataURI())) { - return false; - } - return true; - } - - @Override - public Date getPersistenceTime() { - return this.dataTime.getRefTime(); - } - - @Override - public void setPersistenceTime(Date persistTime) { - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon - * .uf.common.pointdata.PointDataView) - */ - @Override - public void setPointDataView(PointDataView pdv) { - this.pointDataView = pdv; - } + public NcAirepRecord() { + } + + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public NcAirepRecord(String uri) { + super(uri); + } + + public Integer getObsId() { + return obsId; + } + + public void setObsId(Integer obsId) { + this.obsId = obsId; + } + + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * Get the report correction indicator. + * + * @return The corIndicator + */ + public String getCorIndicator() { + return corIndicator; + } + + /** + * Set the report correction indicator. + * + * @param corIndicator + * The corIndicator. + */ + public void setCorIndicator(String corIndicator) { + this.corIndicator = corIndicator; + } + + /** + * Get the report data for this observation. + * + * @return The Report data. + */ + public String getReportData() { + String s = null; + if ((messageData != null) && (messageData instanceof String)) { + s = (String) messageData; + } else { + s = buildMessageData(); + } + return s; + } + + /** + * Set the report data for this observation. + * + * @param reportData + * The Report data. + */ + public void setReportData(String reportData) { + messageData = reportData; + } + + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } + + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } + + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } + + /** + * Boolean for whether location is defined in the spatial tables. + * + * @return true or false (Is location defined in the spatial tables?) + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } + + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } + + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getFlightLevel() { + return location.getFlightLevel(); + } + + /** + * @return the reportType + */ + public String getReportType() { + return reportType; + } + + /** + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * @return the timeObs + */ + public Calendar getTimeObs() { + if (this.dataTime == null) { + return null; + } + return this.dataTime.getRefTimeAsCalendar(); + } + + /** + * @param timeObs + * the timeObs to set + */ + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } + + /** + * @return the refHour + */ + public Calendar getRefHour() { + return refHour; + } + + /** + * @param refHour + * the refHour to set + */ + public void setRefHour(Calendar refHour) { + this.refHour = refHour; + } + + /** + * @return the temp + */ + public float getTemp() { + return temp; + } + + /** + * @param temp + * the temp to set + */ + public void setTemp(float temp) { + this.temp = temp; + } + + /** + * @return the windDirection + */ + public float getWindDirection() { + return windDirection; + } + + /** + * @param windDirection + * the windDirection to set + */ + public void setWindDirection(float windDirection) { + this.windDirection = windDirection; + } + + /** + * @return the windspeed + */ + public float getWindSpeed() { + return windSpeed; + } + + /** + * @param windspeed + * the windspeed to set + */ + public void setWindSpeed(float windSpeed) { + this.windSpeed = windSpeed; + } + + /** + * @return the flightHazard + */ + public Integer getFlightHazard() { + return flightHazard; + } + + /** + * @param flightHazard + * the wx_past_1 to set + */ + public void setFlightHazard(Integer flightHazard) { + this.flightHazard = flightHazard; + } + + /** + * @return the flightWeather + */ + public Integer getFlightWeather() { + return flightWeather; + } + + /** + * @param flightWeather + * the getFlightWeather to set + */ + public void setFlightWeather(Integer flightWeather) { + this.flightWeather = flightWeather; + } + + /** + * @return the flightConditions + */ + public Integer getFlightConditions() { + return flightConditions; + } + + /** + * @param flightConditions + * the flightConditions to set + */ + public void setFlightConditions(Integer flightConditions) { + this.flightConditions = flightConditions; + } + + /** + * @return the wmoHeader + */ + public String getTurbInten() { + return turbInten; + } + + public void setTurbInten(String turbInten) { + this.turbInten = turbInten; + } + + public String getIceInten() { + return iceInten; + } + + public void setIceInten(String iceInten) { + this.iceInten = iceInten; + } + + public String getSkyCover() { + return skyCover; + } + + public void setSkyCover(String skyCover) { + this.skyCover = skyCover; + } + + public String getTurbType() { + return turbType; + } + + public void setTurbType(String turbType) { + this.turbType = turbType; + } + + public String getIceType() { + return iceType; + } + + public void setIceType(String iceType) { + this.iceType = iceType; + } + + public String getTurbFreq() { + return turbFreq; + } + + public void setTurbFreq(String turbFreq) { + this.turbFreq = turbFreq; + } + + public int getSkyBaseHeight() { + return skyBaseHeight; + } + + public void setSkyBaseHeight(int skyBaseHeight) { + this.skyBaseHeight = skyBaseHeight; + } + + public int getSkyTopHeight() { + return skyTopHeight; + } + + public void setSkyTopHeight(int skyTopHeight) { + this.skyTopHeight = skyTopHeight; + } + + public String getSuspectTimeFlag() { + return suspectTimeFlag; + } + + public void setSuspectTimeFlag(String suspectTimeFlag) { + this.suspectTimeFlag = suspectTimeFlag; + } + + @Override + public void setDataURI(String dataURI) { + identifier = dataURI; + } + + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } + + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public String getString(String paramName) { + if ("STA".matches(paramName)) { + return this.getStationId(); + } + return null; + } + + /** + * Get the value and units of a named parameter within this observation. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Amount getValue(String paramName) { + Amount a = null; + + String pName = PARM_MAP.get(paramName); + + if (SFC_TEMP.equals(pName) && (temp != null)) { + a = new Amount(temp, TEMPERATURE_UNIT); + } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { + a = new Amount(windSpeed, WIND_SPEED_UNIT); + } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { + a = new Amount(windDirection, WIND_DIR_UNIT); + } else if (STA_LAT.equals(pName)) { + a = new Amount(this.getLatitude(), LOCATION_UNIT); + } else if (STA_LON.equals(pName)) { + a = new Amount(this.getLongitude(), LOCATION_UNIT); + } else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) { + a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT); + + } + return a; + } + + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Collection getValues(String paramName) { + return null; + } + + @Override + public String[] getStrings(String paramName) { + if ("FLT_HZD".matches(paramName) && (flightHazard != null)) { + String[] flightHazards = { flightHazard.toString() }; + return flightHazards; + } + return null; + } + + @Override + public AircraftObsLocation getSpatialObject() { + return location; + } + + public AircraftObsLocation getLocation() { + return location; + } + + public void setLocation(AircraftObsLocation location) { + this.location = location; + } + + @Override + public String getMessageData() { + return getReportData(); + } + + private String buildMessageData() { + boolean validLocation = (location != null); + + StringBuilder messageData = new StringBuilder("ARP "); + if (validLocation && (getStationId() != null)) { + messageData.append(getStationId()); + } + messageData.append(' '); + + if ((validLocation) && (!Double.isNaN(getLatitude())) + && (!Double.isNaN(getLongitude()))) { + messageData.append(formatLatLon(getLatitude(), true)); + messageData.append(' '); + messageData.append(formatLatLon(getLongitude(), false)); + messageData.append(' '); + } + + if (timeObs != null) { + DateFormat df = new SimpleDateFormat("HHmm"); + messageData.append(df.format(timeObs.getTime())); + } + messageData.append(" F"); + + if (validLocation && (getFlightLevel() != null)) { + int flightLevel = (int) ftToHft.convert(getFlightLevel()); + messageData.append(flightLevel); + } + messageData.append(' '); + + if (temp != null) { + if (temp > 0) { + messageData.append('P'); + } else { + messageData.append('M'); + } + messageData.append(Math.abs(temp.intValue())); + } + messageData.append(' '); + + if ((windDirection != null) && (windSpeed != null)) { + messageData.append(windDirection.intValue()); + messageData.append('/'); + messageData.append(windSpeed.intValue()); + messageData.append("KT"); + } + messageData.append("TB"); + + return messageData.toString(); + } + + private String formatLatLon(double value, boolean isLatitude) { + char dir; + if (isLatitude) { + if (value > 0) { + dir = 'N'; + } else { + dir = 'S'; + } + } else { + if (value > 0) { + dir = 'E'; + } else { + dir = 'W'; + } + } + + DecimalFormat df = new DecimalFormat("###.000"); + df.setRoundingMode(RoundingMode.DOWN); + + return df.format(Math.abs(value)) + dir; + } + + /** + * Returns the hashCode for this object. This implementation returns the + * hashCode of the generated dataURI. + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); + return result; + } + + /** + * Checks if this record is equal to another by checking the generated + * dataURI. + * + * @param obj + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + NcAirepRecord other = (NcAirepRecord) obj; + if (getDataURI() == null) { + if (other.getDataURI() != null) { + return false; + } + } else if (!getDataURI().equals(other.getDataURI())) { + return false; + } + return true; + } + + @Override + public Date getPersistenceTime() { + return this.dataTime.getRefTime(); + } + + @Override + public void setPersistenceTime(Date persistTime) { + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon + * .uf.common.pointdata.PointDataView) + */ + @Override + public void setPointDataView(PointDataView pdv) { + this.pointDataView = pdv; + } @Override @Column @@ -900,4 +896,9 @@ public class NcAirepRecord extends PluginDataObject implements ISpatialEnabled, public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ncairep"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/src/gov/noaa/nws/ncep/common/dataplugin/ncccfp/NcccfpRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/src/gov/noaa/nws/ncep/common/dataplugin/ncccfp/NcccfpRecord.java index 8c01720dbd..b1d0dc5817 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/src/gov/noaa/nws/ncep/common/dataplugin/ncccfp/NcccfpRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/src/gov/noaa/nws/ncep/common/dataplugin/ncccfp/NcccfpRecord.java @@ -1,4 +1,3 @@ - package gov.noaa.nws.ncep.common.dataplugin.ncccfp; import java.util.Calendar; @@ -31,15 +30,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * *
  * SOFTWARE HISTORY
- * Date         Ticket#     Engineer    Description
- * --------- ----------  ----------- --------------------------
- * 10/05/2009   155         F. J. Yen   From Raytheon's CCFP; mod for NC_CCFP
- * 26/05/2010	155			F. J. Yen	Refactored to dataplugin for migration to to11dr11
- * Apr 4, 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
+ * Date         Ticket#  Engineer    Description
+ * ------------ -------- ----------- --------------------------
+ * Oct 05, 2009 155      F. J. Yen   From Raytheon's CCFP; mod for NC_CCFP
+ * May 26, 2010 155      F. J. Yen   Refactored to dataplugin for
+ *                                   migration to to11dr11
+ * 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
  * 
* * @author F. J. Yen @@ -52,12 +52,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncccfp", - indexes = { - @Index(name = "ncccfp_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncccfp", indexes = { @Index(name = "ncccfp_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -76,7 +72,7 @@ public class NcccfpRecord extends PluginDataObject implements ISpatialEnabled { @XmlAttribute @DynamicSerializeElement private Calendar validtime; - + @Column(length = 8) @XmlAttribute @DynamicSerializeElement @@ -117,26 +113,26 @@ public class NcccfpRecord extends PluginDataObject implements ISpatialEnabled { @XmlAttribute @DynamicSerializeElement private Integer numPts; - + @Column @DynamicSerializeElement @XmlElement private Boolean canadaflag; /* - * locationUri contains up to the first seven coordinates. This is for making the dataURI - * unique. (It was suggested that it was highly unlikely that 7 coordinates would not - * be unique enough. The number of coordinates was reduced due to the limited length of - * the string dataURI) + * locationUri contains up to the first seven coordinates. This is for + * making the dataURI unique. (It was suggested that it was highly unlikely + * that 7 coordinates would not be unique enough. The number of coordinates + * was reduced due to the limited length of the string dataURI) */ @DataURI(position = 4) - @Column(length=150) + @Column(length = 150) @XmlElement @DynamicSerializeElement private String locationUri; - + private NcccfpLocation location; - + /** * Default Constructor */ @@ -299,8 +295,8 @@ public class NcccfpRecord extends PluginDataObject implements ISpatialEnabled { */ public void setDirection(Integer direction) { this.direction = direction; - } - + } + /** * @return the number of points */ @@ -315,6 +311,7 @@ public class NcccfpRecord extends PluginDataObject implements ISpatialEnabled { public void setNumPts(Integer numPts) { this.numPts = numPts; } + @Override public NcccfpLocation getSpatialObject() { return location; @@ -332,9 +329,9 @@ public class NcccfpRecord extends PluginDataObject implements ISpatialEnabled { return location; } - public void setLocation (NcccfpLocation location) { + public void setLocation(NcccfpLocation location) { this.location = location; - } + } @Override @Column @@ -343,4 +340,8 @@ public class NcccfpRecord extends PluginDataObject implements ISpatialEnabled { return super.getDataURI(); } + @Override + public String getPluginName() { + return "ncccfp"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribRecord.java index c570367cfe..963efe9174 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/src/gov/noaa/nws/ncep/common/dataplugin/ncgrib/NcgribRecord.java @@ -64,14 +64,17 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 4/7/09 1994 bphillip Initial Creation - * 10/13/10 276 llin Modified for NC GRIB. - * 03/07/12 606 ghull Added eventName to URI for NcInventory updating. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/13 1293 bkowal Removed references to hdffileid. + * Apr 07, 2009 1994 bphillip Initial Creation + * Oct 13, 2010 276 llin Modified for NC GRIB. + * Mar 07, 2012 606 ghull Added eventName to URI for NcInventory + * updating. + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @@ -85,12 +88,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncgrib", - indexes = { - @Index(name = "ncgrib_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncgrib", indexes = { @Index(name = "ncgrib_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -105,36 +104,36 @@ public class NcgribRecord extends PersistablePluginDataObject implements @DynamicSerializeElement private int masterTableVersion; - /** + /** * Version number of GRIB local tables used to augment Master Tables (See * Table 1.1) 0 - local tables not used, only table entries and templates - * the current master table are valid. (Currently 1) + * the current master table are valid. (Currently 1) */ @Column @XmlAttribute @DynamicSerializeElement private int localTableVersion; - /** Significance of reference time (See Table 1.2) - * 0 for analysis, 1 for forecast, 2 for verifying time, - * and 3 for observation time + /** + * Significance of reference time (See Table 1.2) 0 for analysis, 1 for + * forecast, 2 for verifying time, and 3 for observation time */ @Column @XmlAttribute @DynamicSerializeElement private int refTimeSignificance; - /** Processed data type in this GRIB message (See Table 1.4) - * 0 for analysis, 1 for forecast, 2 for both, .... - * or PDT in table 4.3 - * This refers to PDT# in GEMPAK output + /** + * Processed data type in this GRIB message (See Table 1.4) 0 for analysis, + * 1 for forecast, 2 for both, .... or PDT in table 4.3 This refers to PDT# + * in GEMPAK output */ @Column @XmlAttribute @DynamicSerializeElement private int processedDataType; - - /** Denotes if local section is present (currently false)*/ + + /** Denotes if local section is present (currently false) */ @Column @XmlAttribute @DynamicSerializeElement @@ -179,7 +178,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements @DynamicSerializeElement private float[] hybridCoordList; - /** The model information in ncgrib_models child table*/ + /** The model information in ncgrib_models child table */ @ManyToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER) @PrimaryKeyJoinColumn @Fetch(FetchMode.SELECT) @@ -190,13 +189,12 @@ public class NcgribRecord extends PersistablePluginDataObject implements private boolean isVector = false; - /** The short model name (i.e.NAM80) This should be interpreted from - * the generating process number and grid id : 96 for gfs, - * 114 for NAEFS, 84 for meso NAM 12KM, 86 for RUC, 81 for GFS analysis, - * 82 for analysis GDAS, etc... - * information form ON388 - table A - * Generating Process or Model from originating center 7 - * which is NCEP + /** + * The short model name (i.e.NAM80) This should be interpreted from the + * generating process number and grid id : 96 for gfs, 114 for NAEFS, 84 for + * meso NAM 12KM, 86 for RUC, 81 for GFS analysis, 82 for analysis GDAS, + * etc... information form ON388 - table A Generating Process or Model from + * originating center 7 which is NCEP */ @Column @XmlAttribute @@ -210,33 +208,35 @@ public class NcgribRecord extends PersistablePluginDataObject implements @DataURI(position = 3) private int gridVersion = 0; - /** The name of ingested file + /** + * The name of ingested file */ @Column @XmlAttribute @DynamicSerializeElement @DataURI(position = 4) private String fileName; - - /** The name of event such as Hurricane or - * Volcano + + /** + * The name of event such as Hurricane or Volcano */ @Column @XmlAttribute @DynamicSerializeElement @DataURI(position = 8) private String eventName; - - /** Type of Generating Process + + /** + * Type of Generating Process */ @Column @XmlAttribute @DynamicSerializeElement @DataURI(position = 7) private int processType; - - /** Resolution and componet flags - * (See Table 3.3) + + /** + * Resolution and componet flags (See Table 3.3) */ @Column @XmlAttribute @@ -244,10 +244,9 @@ public class NcgribRecord extends PersistablePluginDataObject implements private Integer resCompFlags; /** - * Indicate the discipline of the processed - * data contained within a GRIB message - - * 0 for Meteorological products in table 0.0 - * This refers to DIS# in GEMPAK output + * Indicate the discipline of the processed data contained within a GRIB + * message - 0 for Meteorological products in table 0.0 This refers to DIS# + * in GEMPAK output */ @Column @XmlAttribute @@ -255,8 +254,8 @@ public class NcgribRecord extends PersistablePluginDataObject implements private int discipline; /** - * Parameter category by product discipline - * 0 for temperature in table 4.1 by discipline 0 + * Parameter category by product discipline 0 for temperature in table 4.1 + * by discipline 0 */ @Column @XmlAttribute @@ -264,29 +263,27 @@ public class NcgribRecord extends PersistablePluginDataObject implements private int category; /** - * Parameter number by product discipline and parameter category - * 9 for temperature anomaly in table 4.2-0-0 for discipline 0 - * and category 0 - * This refers to ID# in GEMPAK output + * Parameter number by product discipline and parameter category 9 for + * temperature anomaly in table 4.2-0-0 for discipline 0 and category 0 This + * refers to ID# in GEMPAK output */ @Column @XmlAttribute @DynamicSerializeElement private int parameterId; - - /** pdt - Product definition template number. + + /** + * pdt - Product definition template number. */ @Column @XmlAttribute @DynamicSerializeElement private int pdt; - + /** - * Fixed surface types or vertical coordinate ID 1 - * 2 for cloud base level and 100 for isobaric surface - * in table 4.5 or VCRDGRID1.TBL for NCEP - * This refers to VCD# in GEMPAK output - * The location in pds[9] + * Fixed surface types or vertical coordinate ID 1 2 for cloud base level + * and 100 for isobaric surface in table 4.5 or VCRDGRID1.TBL for NCEP This + * refers to VCD# in GEMPAK output The location in pds[9] */ @Column @XmlAttribute @@ -294,11 +291,9 @@ public class NcgribRecord extends PersistablePluginDataObject implements private int vcrdId1; /** - * Fixed surface types or vertical coordinate ID 2 - * 2 for cloud base level and 100 for isobaric surface - * in table 4.5 or VCRDGRID1.TBL for NCEP - * This refers to VCD# in GEMPAK output - * The location in pds[12] + * Fixed surface types or vertical coordinate ID 2 2 for cloud base level + * and 100 for isobaric surface in table 4.5 or VCRDGRID1.TBL for NCEP This + * refers to VCD# in GEMPAK output The location in pds[12] */ @Column @XmlAttribute @@ -306,19 +301,19 @@ public class NcgribRecord extends PersistablePluginDataObject implements private int vcrdId2; /** - * Scaled value of first fixed surface in GRIB2- TEMPLATE 4.1 - * This refers to LEVEL1 in GEMPAK output + * Scaled value of first fixed surface in GRIB2- TEMPLATE 4.1 This refers to + * LEVEL1 in GEMPAK output */ @Column @XmlAttribute @DynamicSerializeElement private int glevel1; - + private float decodedLevel1; /** - * Scaled value of second fixed surface in GRIB2- TEMPLATE 4.1 - * This refers to LEVEL2 in GEMPAK output + * Scaled value of second fixed surface in GRIB2- TEMPLATE 4.1 This refers + * to LEVEL2 in GEMPAK output */ @Column @XmlAttribute @@ -335,7 +330,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements @DynamicSerializeElement @DataURI(position = 6) private String vcord; - + /** * The gempak abbreviation grid name */ @@ -344,7 +339,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements @DynamicSerializeElement @DataURI(position = 5) private String parm; - + /** * The gempak scale for decoding the grid field */ @@ -352,7 +347,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements @XmlAttribute @DynamicSerializeElement private String scale; - + /** * The forecast interval */ @@ -360,7 +355,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements @XmlAttribute @DynamicSerializeElement private int interval; - + /** * Creates an empty NcgribRecord */ @@ -392,7 +387,6 @@ public class NcgribRecord extends PersistablePluginDataObject implements this.insertTime = (Calendar) recordToCopy.insertTime.clone(); } this.messageData = recordToCopy.messageData; - this.pluginName = recordToCopy.pluginName; this.gridVersion = recordToCopy.gridVersion; if (recordToCopy.hybridCoordList != null) { this.hybridCoordList = Arrays.copyOf(recordToCopy.hybridCoordList, @@ -449,10 +443,10 @@ public class NcgribRecord extends PersistablePluginDataObject implements } /** - public void setSpatialObject(NcgridCoverage location) { - modelInfo.setLocation(location); - }*/ - + * public void setSpatialObject(NcgridCoverage location) { + * modelInfo.setLocation(location); } + */ + /** * Gets the model information * @@ -656,7 +650,7 @@ public class NcgribRecord extends PersistablePluginDataObject implements this.gridVersion = gridVersion; } - public Integer getResCompFlags() { + public Integer getResCompFlags() { return resCompFlags; } @@ -665,160 +659,162 @@ public class NcgribRecord extends PersistablePluginDataObject implements } public String getModelName() { - return modelName; - } + return modelName; + } - public void setModelName(String modelName) { - this.modelName = modelName; - } + public void setModelName(String modelName) { + this.modelName = modelName; + } - public int getDiscipline() { - return discipline; - } + public int getDiscipline() { + return discipline; + } - public void setDiscipline(int discipline) { - this.discipline = discipline; - } + public void setDiscipline(int discipline) { + this.discipline = discipline; + } - public int getCategory() { - return category; - } + public int getCategory() { + return category; + } - public void setCategory(int category) { - this.category = category; - } + public void setCategory(int category) { + this.category = category; + } - public int getParameterId() { - return parameterId; - } + public int getParameterId() { + return parameterId; + } - public void setParameterId(int parameterId) { - this.parameterId = parameterId; - } + public void setParameterId(int parameterId) { + this.parameterId = parameterId; + } - public int getPdt() { - return pdt; - } + public int getPdt() { + return pdt; + } - public void setPdt(int pdt) { - this.pdt = pdt; - } + public void setPdt(int pdt) { + this.pdt = pdt; + } - public String getFileName() { - return fileName; - } + public String getFileName() { + return fileName; + } - public void setFileName(String fileName) { - this.fileName = fileName; - } - - public String getEventName() { - return eventName; - } + public void setFileName(String fileName) { + this.fileName = fileName; + } - public void setEventName(String eventName) { - this.eventName = eventName; - } + public String getEventName() { + return eventName; + } - public int getProcessType() { - return processType; - } + public void setEventName(String eventName) { + this.eventName = eventName; + } - public void setProcessType(int processType) { - this.processType = processType; - } - - public int getVcrdId1() { - return vcrdId1; - } + public int getProcessType() { + return processType; + } - public void setVcrdId1(int vcrdId1) { - this.vcrdId1 = vcrdId1; - } + public void setProcessType(int processType) { + this.processType = processType; + } - public int getVcrdId2() { - return vcrdId2; - } + public int getVcrdId1() { + return vcrdId1; + } - public void setVcrdId2(int vcrdId2) { - this.vcrdId2 = vcrdId2; - } + public void setVcrdId1(int vcrdId1) { + this.vcrdId1 = vcrdId1; + } - public int getGlevel1() { - return glevel1; - } + public int getVcrdId2() { + return vcrdId2; + } - public void setGlevel1(int glevel1) { - this.glevel1 = glevel1; - } + public void setVcrdId2(int vcrdId2) { + this.vcrdId2 = vcrdId2; + } - public int getGlevel2() { - return glevel2; - } + public int getGlevel1() { + return glevel1; + } - public void setGlevel2(int glevel2) { - this.glevel2 = glevel2; - } + public void setGlevel1(int glevel1) { + this.glevel1 = glevel1; + } - public String getVcord() { - return vcord; - } + public int getGlevel2() { + return glevel2; + } - public void setVcord(String vcord) { - this.vcord = vcord; - } + public void setGlevel2(int glevel2) { + this.glevel2 = glevel2; + } - public String getParm() { - return parm; - } + public String getVcord() { + return vcord; + } - public void setParm(String parm) { - this.parm = parm; - } + public void setVcord(String vcord) { + this.vcord = vcord; + } - public String getScale() { - return scale; - } + public String getParm() { + return parm; + } - public void setScale(String scale) { - this.scale = scale; - } + public void setParm(String parm) { + this.parm = parm; + } - public int getInterval() { - return interval; - } + public String getScale() { + return scale; + } - public void setInterval(int interval) { - this.interval = interval; - } + public void setScale(String scale) { + this.scale = scale; + } - /** - * @return the decodedLevel1 - */ - public float getDecodedLevel1() { - return decodedLevel1; - } + public int getInterval() { + return interval; + } - /** - * @param decodedLevel1 the decodedLevel1 to set - */ - public void setDecodedLevel1(float decodedLevel1) { - this.decodedLevel1 = decodedLevel1; - } + public void setInterval(int interval) { + this.interval = interval; + } - /** - * @return the decodedLevel2 - */ - public float getDecodedLevel2() { - return decodedLevel2; - } + /** + * @return the decodedLevel1 + */ + public float getDecodedLevel1() { + return decodedLevel1; + } - /** - * @param decodedLevel2 the decodedLevel2 to set - */ - public void setDecodedLevel2(float decodedLevel2) { - this.decodedLevel2 = decodedLevel2; - } + /** + * @param decodedLevel1 + * the decodedLevel1 to set + */ + public void setDecodedLevel1(float decodedLevel1) { + this.decodedLevel1 = decodedLevel1; + } + + /** + * @return the decodedLevel2 + */ + public float getDecodedLevel2() { + return decodedLevel2; + } + + /** + * @param decodedLevel2 + * the decodedLevel2 to set + */ + public void setDecodedLevel2(float decodedLevel2) { + this.decodedLevel2 = decodedLevel2; + } @Override @Column @@ -827,4 +823,8 @@ public class NcgribRecord extends PersistablePluginDataObject implements return super.getDataURI(); } + @Override + public String getPluginName() { + return "ncgrib"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/src/gov/noaa/nws/ncep/common/dataplugin/ncpafm/NcPafmRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/src/gov/noaa/nws/ncep/common/dataplugin/ncpafm/NcPafmRecord.java index 5bcb47b33f..1063ca2c1b 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/src/gov/noaa/nws/ncep/common/dataplugin/ncpafm/NcPafmRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/src/gov/noaa/nws/ncep/common/dataplugin/ncpafm/NcPafmRecord.java @@ -1,24 +1,3 @@ -/* - * - * NcPafmRecord - * - * This class performs the mapping to the database tables for the Point/Area - * Forecast Matrices (PAFM) Decoder Plug-In - * - * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ----------- -------------- ----------------------------------- - * 08/05/2009 126 F. J. Yen Initial creation - * 01/06/2010 126 F. J. Yen Migrated and refactored from to11dr3 to to11dr11 - * * - * This code has been developed by the SIB for use in the AWIPS2 system. - * - * - * @author F. J. Yen, SIB - * @version 1 - - */ - package gov.noaa.nws.ncep.common.dataplugin.ncpafm; import java.util.Calendar; @@ -61,25 +40,33 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description + * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 30 Sep 2011 126 B. Hebbard Initial version in refactored NcPafm decoder. - * This new (fine-grain) PDO contains data associated - * with one location / forecast hour pair only, for - * efficiency of retrieval. It also implements - * IPointData -- that is, presents a PointDataView - * object suitable for HDF5 persistence. - * 10 Oct 2011 126 G. Hull replace stnid,lat&lon with the SurfaceObsLocation. - * 03 Feb 2012 606 G. Hull added reportType to the URI for inventory updating - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 08 Apr 2013 1293 bkowal Removed references to hdffileid. + * Aug 05, 2009 126 F. J. Yen Initial creation + * Jan 06, 2010 126 F. J. Yen Migrated and refactored from to11dr3 to + * to11dr11 + * 30 Sep 2011 126 B. Hebbard Initial version in refactored NcPafm + * decoder. This new (fine-grain) PDO + * contains data associated with one + * location / forecast hour pair only, for + * efficiency of retrieval. It also + * implements IPointData -- that is, + * presents a PointDataView object suitable + * for HDF5 persistence. + * 10 Oct 2011 126 G. Hull replace stnid,lat&lon with the + * SurfaceObsLocation. + * 03 Feb 2012 606 G. Hull added reportType to the URI for inventory + * updating + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * 08 Apr 2013 1293 bkowal Removed references to hdffileid. * 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 * * - * @author B. Hebbard, SIB + * @author F. J. Yen, SIB * @version 1.0 */ @Entity @@ -89,326 +76,323 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncpafm", - indexes = { - @Index(name = "ncpafm_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncpafm", indexes = { @Index(name = "ncpafm_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class NcPafmRecord extends PersistablePluginDataObject implements // TODO: Make absolutely sure these are NO LONGER required... ISpatialEnabled, // IDecoderGettable, - IPointData, IPersistable { + IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /** Report type */ - @Column(length = 32) - @DataURI(position=6) - @XmlElement - @DynamicSerializeElement - private String reportType; + /** Report type */ + @Column(length = 32) + @DataURI(position = 6) + @XmlElement + @DynamicSerializeElement + private String reportType; - // WMO header - @DataURI(position = 4) - @Column(length = 32) - @XmlElement - @DynamicSerializeElement - private String wmoHeader; + // WMO header + @DataURI(position = 4) + @Column(length = 32) + @XmlElement + @DynamicSerializeElement + private String wmoHeader; - // The issue office where the report from - @Column(length = 32) - @DataURI(position = 1) - @XmlElement - @DynamicSerializeElement - private String issueOffice; + // The issue office where the report from + @Column(length = 32) + @DataURI(position = 1) + @XmlElement + @DynamicSerializeElement + private String issueOffice; - @Column - @DataURI(position = 2) - @DynamicSerializeElement - @XmlElement - private Calendar issueTime; + @Column + @DataURI(position = 2) + @DynamicSerializeElement + @XmlElement + private Calendar issueTime; - // The stationId here is the FIPS code and not the issuing office - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; + // The stationId here is the FIPS code and not the issuing office + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String designatorBBB; + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String designatorBBB; - // The mndTime - @Column(length = 72) - @XmlElement - @DynamicSerializeElement - private String mndTime; + // The mndTime + @Column(length = 72) + @XmlElement + @DynamicSerializeElement + private String mndTime; - /** Matrix type */ - @DataURI(position = 5) - @Column(length = 32) - @XmlElement - @DynamicSerializeElement - private String matrixType; + /** Matrix type */ + @DataURI(position = 5) + @Column(length = 32) + @XmlElement + @DynamicSerializeElement + private String matrixType; - // The universal geographic code - @Column(length = 640) - @XmlElement - @DynamicSerializeElement - private String ugc; + // The universal geographic code + @Column(length = 640) + @XmlElement + @DynamicSerializeElement + private String ugc; - // The product purge time - @XmlElement - @DynamicSerializeElement - private Calendar prodPurgeTime; + // The product purge time + @XmlElement + @DynamicSerializeElement + private Calendar prodPurgeTime; - // Text information for this segment - // @Column(length=12000) - // @XmlElement - // @DynamicSerializeElement - private String segment; + // Text information for this segment + // @Column(length=12000) + // @XmlElement + // @DynamicSerializeElement + private String segment; - // // The county FIPS : this is the stationId in the SurfaceObsLocation - // @Column(length=16) - // @XmlElement - // @DynamicSerializeElement - // private String fips; + // // The county FIPS : this is the stationId in the SurfaceObsLocation + // @Column(length=16) + // @XmlElement + // @DynamicSerializeElement + // private String fips; - // The group of parameter values associated with the above combination. - @Transient - private NcPafmParameters pafmParms; + // The group of parameter values associated with the above combination. + @Transient + private NcPafmParameters pafmParms; - // The PointDataView representation of data associated with this PDO - // to be persisted as HDF5 - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + // The PointDataView representation of data associated with this PDO + // to be persisted as HDF5 + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - /** - * Default Constructor - */ - public NcPafmRecord() { - this.location = null; - this.issueOffice = null; - this.reportType = "PAFM"; - this.matrixType = " "; - this.issueTime = null; - this.wmoHeader = null; - this.designatorBBB = " "; - this.mndTime = null; - } + /** + * Default Constructor + */ + public NcPafmRecord() { + this.location = null; + this.issueOffice = null; + this.reportType = "PAFM"; + this.matrixType = " "; + this.issueTime = null; + this.wmoHeader = null; + this.designatorBBB = " "; + this.mndTime = null; + } - /** - * Constructs a pafm record from a dataURI - * - * @param uri - * The dataURI - */ - public NcPafmRecord(String uri) { - super(uri); - } + /** + * Constructs a pafm record from a dataURI + * + * @param uri + * The dataURI + */ + public NcPafmRecord(String uri) { + super(uri); + } - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } + @Override + public IDecoderGettable getDecoderGettable() { + // TODO Auto-generated method stub + return null; + } - public String getReportType() { - return reportType; - } + public String getReportType() { + return reportType; + } - public void setReportType(String reportType) { - this.reportType = reportType; - } + public void setReportType(String reportType) { + this.reportType = reportType; + } - public String getMatrixType() { - return matrixType; - } + public String getMatrixType() { + return matrixType; + } - public void setMatrixType(String matrixType) { - this.matrixType = matrixType; - } + public void setMatrixType(String matrixType) { + this.matrixType = matrixType; + } - public String getWmoHeader() { - return wmoHeader; - } + public String getWmoHeader() { + return wmoHeader; + } - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - public String getIssueOffice() { - return issueOffice; - } + public String getIssueOffice() { + return issueOffice; + } - public void setIssueOffice(String issueOffice) { - this.issueOffice = issueOffice; - } + public void setIssueOffice(String issueOffice) { + this.issueOffice = issueOffice; + } - public Calendar getIssueTime() { - return issueTime; - } + public Calendar getIssueTime() { + return issueTime; + } - public void setIssueTime(Calendar issueTime) { - this.issueTime = issueTime; - } + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } - public String getDesignatorBBB() { - return designatorBBB; - } + public String getDesignatorBBB() { + return designatorBBB; + } - public void setDesignatorBBB(String designatorBBB) { - this.designatorBBB = designatorBBB; - } + public void setDesignatorBBB(String designatorBBB) { + this.designatorBBB = designatorBBB; + } - public String getMndTime() { - return mndTime; - } + public String getMndTime() { + return mndTime; + } - public void setMndTime(String mndTime) { - this.mndTime = mndTime; - } + public void setMndTime(String mndTime) { + this.mndTime = mndTime; + } - /** - * @return the ugc - */ - public String getUgc() { - return ugc; - } + /** + * @return the ugc + */ + public String getUgc() { + return ugc; + } - /** - * @param ugc - * to set - */ - public void setUgc(String ugc) { - this.ugc = ugc; - } + /** + * @param ugc + * to set + */ + public void setUgc(String ugc) { + this.ugc = ugc; + } - /** - * @return the prodPurgeTime - */ - public Calendar getProdPurgeTime() { - return prodPurgeTime; - } + /** + * @return the prodPurgeTime + */ + public Calendar getProdPurgeTime() { + return prodPurgeTime; + } - /** - * @param prodPurgeTime - * to set - */ - public void setProdPurgeTime(Calendar prodPurgeTime) { - this.prodPurgeTime = prodPurgeTime; - } + /** + * @param prodPurgeTime + * to set + */ + public void setProdPurgeTime(Calendar prodPurgeTime) { + this.prodPurgeTime = prodPurgeTime; + } - /** - * @return the segment - */ - public String getSegment() { - return segment; - } + /** + * @return the segment + */ + public String getSegment() { + return segment; + } - /** - * @param segment - * to set - */ - public void setSegment(String segment) { - this.segment = segment; - } + /** + * @param segment + * to set + */ + public void setSegment(String segment) { + this.segment = segment; + } - // public String getFips() { - // return fips; - // } + // public String getFips() { + // return fips; + // } - public String getStationId() { - return location.getStationId(); - } + public String getStationId() { + return location.getStationId(); + } - // if this needs to be an ISpatialObject - // @Override - // public SurfaceObsLocation getSpatialObject() { - // return location; - // } + // if this needs to be an ISpatialObject + // @Override + // public SurfaceObsLocation getSpatialObject() { + // return location; + // } - public SurfaceObsLocation getLocation() { - return location; - } + public SurfaceObsLocation getLocation() { + return location; + } - public void setLocation(SurfaceObsLocation obsLoc) { - this.location = obsLoc; - } + public void setLocation(SurfaceObsLocation obsLoc) { + this.location = obsLoc; + } - public double getLatitude() { - return location.getLatitude(); - } + public double getLatitude() { + return location.getLatitude(); + } - public double getLongitude() { - return location.getLongitude(); - } + public double getLongitude() { + return location.getLongitude(); + } - public Integer getElevation() { - return location.getElevation(); - } + public Integer getElevation() { + return location.getElevation(); + } - // public void setFips(String fips) { - // this.fips = fips; - // } + // public void setFips(String fips) { + // this.fips = fips; + // } - /** - * @return the set of Parameters - */ - public NcPafmParameters getPafmParms() { - return pafmParms; - } + /** + * @return the set of Parameters + */ + public NcPafmParameters getPafmParms() { + return pafmParms; + } - /** - * @param pafmParameters - * -the set of Parmameters to set - */ - public void setPafmParms(NcPafmParameters pafmParams) { - this.pafmParms = pafmParams; - } + /** + * @param pafmParameters + * -the set of Parmameters to set + */ + public void setPafmParms(NcPafmParameters pafmParams) { + this.pafmParms = pafmParams; + } - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon - * .uf.common.pointdata.PointDataView) - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon + * .uf.common.pointdata.PointDataView) + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } - @Override - public Date getPersistenceTime() { - // return this.dataTime.getRefTime(); - return null; - } + @Override + public Date getPersistenceTime() { + // return this.dataTime.getRefTime(); + return null; + } - /** - * Override existing set method to modify any classes that use the dataURI - * as a foreign key - */ - public void setIdentifier(Object dataURI) { - this.identifier = dataURI; - } + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + this.identifier = dataURI; + } @Override @Column @@ -417,4 +401,8 @@ public class NcPafmRecord extends PersistablePluginDataObject implements return super.getDataURI(); } + @Override + public String getPluginName() { + return "ncpafm"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/src/gov/noaa/nws/ncep/common/dataplugin/ncpirep/NcPirepRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/src/gov/noaa/nws/ncep/common/dataplugin/ncpirep/NcPirepRecord.java index 26d211133e..606409d6b6 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/src/gov/noaa/nws/ncep/common/dataplugin/ncpirep/NcPirepRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/src/gov/noaa/nws/ncep/common/dataplugin/ncpirep/NcPirepRecord.java @@ -60,17 +60,22 @@ import com.vividsolutions.jts.geom.Geometry; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 20110421 F. J. Yen Initial creation from Raytheon's pirep. - * Change temp, windSpeed from Double to Float. - * Change windDirection from Integer to Float - * 08/30/2011 286 qzhou Use IDecoderConstantsN.INTEGER_MISSING instead -9999 in visibility. - * 08/31/2011 286 qzhou Created project and moved this from ~edex.plugin.pirep - * 09/19/2011 286 Q.Zhou Changed reportType to string, - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/2013 1293 bkowal Removed references to hdffileid. - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Apr 21, 2011 F. J. Yen Initial creation from Raytheon's pirep. + * Change temp, windSpeed from Double to + * Float. Change windDirection from Integer + * to Float + * Aug 30, 2011 286 qzhou Use IDecoderConstantsN.INTEGER_MISSING + * instead -9999 in visibility. + * Aug 31, 2011 286 qzhou Created project and moved this from + * ~edex.plugin.pirep + * Sep 19, 2011 286 Q.Zhou Changed reportType to string, + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. + * 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 * * * @@ -84,764 +89,764 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncpirep", - indexes = { - @Index(name = "ncpirep_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncpirep", indexes = { @Index(name = "ncpirep_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class NcPirepRecord extends PluginDataObject implements ISpatialEnabled, - IDecoderGettable, IPointData, IPersistable { + IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; + public static final Unit TEMPERATURE_UNIT = SI.CELSIUS; - public static final Unit ALTITUDE_UNIT = NonSI.FOOT; + public static final Unit ALTITUDE_UNIT = NonSI.FOOT; - public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; + public static final Unit WIND_SPEED_UNIT = NonSI.KNOT; - public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit WIND_DIR_UNIT = NonSI.DEGREE_ANGLE; - public static final Unit PRESSURE_UNIT = SI.PASCAL; + public static final Unit PRESSURE_UNIT = SI.PASCAL; - public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; + public static final Unit LOCATION_UNIT = NonSI.DEGREE_ANGLE; - private static final HashMap PARM_MAP = new HashMap(); - private static final HashMap ICING_MAP = new HashMap(); - private static final HashMap TURB_MAP = new HashMap(); - static { - PARM_MAP.put("T", SFC_TEMP); - PARM_MAP.put("WS", SFC_WNDSPD); - PARM_MAP.put("WD", SFC_WNDDIR); - PARM_MAP.put("NLAT", STA_LAT); - PARM_MAP.put("NLON", STA_LON); - PARM_MAP.put("FLT_LVL", UA_FLTLVL); - PARM_MAP.put("ICT", UA_ICETYPE); - PARM_MAP.put("ICI", UA_ICEINTENSE); - PARM_MAP.put("TBF", UA_TURBFREQ); - PARM_MAP.put("TBI", UA_TURBINTENSE); - PARM_MAP.put("TOP_HGT", UA_TOPHGT); - PARM_MAP.put("BOT_HGT", UA_BOTHGT); + private static final HashMap PARM_MAP = new HashMap(); - ICING_MAP.put("", new Integer(0)); - ICING_MAP.put("NEG", new Integer(1)); - ICING_MAP.put("TRACE", new Integer(2)); - ICING_MAP.put("TRACELGT", new Integer(3)); - ICING_MAP.put("LGT", new Integer(4)); - ICING_MAP.put("LGTMOD", new Integer(5)); - ICING_MAP.put("MOD", new Integer(6)); - ICING_MAP.put("MODSEV", new Integer(7)); - ICING_MAP.put("SEV", new Integer(8)); + private static final HashMap ICING_MAP = new HashMap(); - TURB_MAP.put("", new Integer(0)); - TURB_MAP.put("NEG", new Integer(1)); - TURB_MAP.put("SMOOTHLGT", new Integer(2)); - TURB_MAP.put("LGT", new Integer(3)); - TURB_MAP.put("LGTMOD", new Integer(4)); - TURB_MAP.put("MOD", new Integer(5)); - TURB_MAP.put("MODSEV", new Integer(6)); - TURB_MAP.put("SEV", new Integer(7)); - TURB_MAP.put("EXTRM", new Integer(8)); - } + private static final HashMap TURB_MAP = new HashMap(); + static { + PARM_MAP.put("T", SFC_TEMP); + PARM_MAP.put("WS", SFC_WNDSPD); + PARM_MAP.put("WD", SFC_WNDDIR); + PARM_MAP.put("NLAT", STA_LAT); + PARM_MAP.put("NLON", STA_LON); + PARM_MAP.put("FLT_LVL", UA_FLTLVL); + PARM_MAP.put("ICT", UA_ICETYPE); + PARM_MAP.put("ICI", UA_ICEINTENSE); + PARM_MAP.put("TBF", UA_TURBFREQ); + PARM_MAP.put("TBI", UA_TURBINTENSE); + PARM_MAP.put("TOP_HGT", UA_TOPHGT); + PARM_MAP.put("BOT_HGT", UA_BOTHGT); - @Transient - private NcPirepLayerData maxPirepLayerData = null; + ICING_MAP.put("", new Integer(0)); + ICING_MAP.put("NEG", new Integer(1)); + ICING_MAP.put("TRACE", new Integer(2)); + ICING_MAP.put("TRACELGT", new Integer(3)); + ICING_MAP.put("LGT", new Integer(4)); + ICING_MAP.put("LGTMOD", new Integer(5)); + ICING_MAP.put("MOD", new Integer(6)); + ICING_MAP.put("MODSEV", new Integer(7)); + ICING_MAP.put("SEV", new Integer(8)); - @Transient - private boolean display = true; + TURB_MAP.put("", new Integer(0)); + TURB_MAP.put("NEG", new Integer(1)); + TURB_MAP.put("SMOOTHLGT", new Integer(2)); + TURB_MAP.put("LGT", new Integer(3)); + TURB_MAP.put("LGTMOD", new Integer(4)); + TURB_MAP.put("MOD", new Integer(5)); + TURB_MAP.put("MODSEV", new Integer(6)); + TURB_MAP.put("SEV", new Integer(7)); + TURB_MAP.put("EXTRM", new Integer(8)); + } - @Transient - @XmlAttribute - @DynamicSerializeElement - private Integer obsId; + @Transient + private NcPirepLayerData maxPirepLayerData = null; - // Time of the observation. - @Transient - @XmlAttribute - @DynamicSerializeElement - private Calendar timeObs; + @Transient + private boolean display = true; - // Time of the observation to the nearest hour. - @Column - @XmlElement - @DynamicSerializeElement - private Calendar refHour; + @Transient + @XmlAttribute + @DynamicSerializeElement + private Integer obsId; - // - @Column(length = 8) - @DataURI(position = 1) - @XmlAttribute - @DynamicSerializeElement - private String reportType; + // Time of the observation. + @Transient + @XmlAttribute + @DynamicSerializeElement + private Calendar timeObs; - // Text of the WMO header - @Transient - @XmlElement - @DynamicSerializeElement - private String wmoHeader; + // Time of the observation to the nearest hour. + @Column + @XmlElement + @DynamicSerializeElement + private Calendar refHour; - @Transient - @DynamicSerializeElement - @XmlElement - private String suspectTimeFlag; + // + @Column(length = 8) + @DataURI(position = 1) + @XmlAttribute + @DynamicSerializeElement + private String reportType; - // Correction indicator from wmo header - @Column(length = 8) - @DataURI(position = 2) - @XmlElement - @DynamicSerializeElement - private String corIndicator; + // Text of the WMO header + @Transient + @XmlElement + @DynamicSerializeElement + private String wmoHeader; - @Transient - @XmlElement - @DynamicSerializeElement - private String aircraftType; + @Transient + @DynamicSerializeElement + @XmlElement + private String suspectTimeFlag; - // Observation air temperature in degrees Celsius, if not converted. - // Observation air temperature in degrees Kelvin. - // Decimal(5,2) - @Transient - @XmlElement - @DynamicSerializeElement - // private Double temp; - private Float temp; + // Correction indicator from wmo header + @Column(length = 8) + @DataURI(position = 2) + @XmlElement + @DynamicSerializeElement + private String corIndicator; - // Observation wind direction in angular degrees. Integer - @Transient - @XmlElement - @DynamicSerializeElement - // private Integer windDirection; - private Float windDirection; + @Transient + @XmlElement + @DynamicSerializeElement + private String aircraftType; - // Observation wind speed in knots, if not converted. - // Observation wind speed in meters per second. - // Decimal(5,2) - @Transient - @XmlElement - @DynamicSerializeElement - // private Double windSpeed; - private Float windSpeed; + // Observation air temperature in degrees Celsius, if not converted. + // Observation air temperature in degrees Kelvin. + // Decimal(5,2) + @Transient + @XmlElement + @DynamicSerializeElement + // private Double temp; + private Float temp; - @Transient - @XmlElement - @DynamicSerializeElement - // private Integer horzVisibility; - private Integer horzVisibility = IDecoderConstantsN.INTEGER_MISSING; // -9999 + // Observation wind direction in angular degrees. Integer + @Transient + @XmlElement + @DynamicSerializeElement + // private Integer windDirection; + private Float windDirection; - @Transient - @XmlElement - @DynamicSerializeElement - private String obsText; + // Observation wind speed in knots, if not converted. + // Observation wind speed in meters per second. + // Decimal(5,2) + @Transient + @XmlElement + @DynamicSerializeElement + // private Double windSpeed; + private Float windSpeed; - // @Column(length = 16) - @Transient - @XmlElement - @DynamicSerializeElement - private String weatherGroup; + @Transient + @XmlElement + @DynamicSerializeElement + // private Integer horzVisibility; + private Integer horzVisibility = IDecoderConstantsN.INTEGER_MISSING; // -9999 - @DynamicSerializeElement - @XmlElement - // @OneToMany(cascade = CascadeType.ALL, mappedBy = "parent", fetch = - // FetchType.EAGER) - // private Set ancPirepData; - @Transient - private Set ancPirepData = new HashSet(); + @Transient + @XmlElement + @DynamicSerializeElement + private String obsText; - @Embedded - @DataURI(position = 3, embedded = true) - @XmlElement - @DynamicSerializeElement - private AircraftObsLocation location; + // @Column(length = 16) + @Transient + @XmlElement + @DynamicSerializeElement + private String weatherGroup; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + @DynamicSerializeElement + @XmlElement + // @OneToMany(cascade = CascadeType.ALL, mappedBy = "parent", fetch = + // FetchType.EAGER) + // private Set ancPirepData; + @Transient + private Set ancPirepData = new HashSet(); - /** + @Embedded + @DataURI(position = 3, embedded = true) + @XmlElement + @DynamicSerializeElement + private AircraftObsLocation location; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + /** * */ - public NcPirepRecord() { - } + public NcPirepRecord() { + } - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public NcPirepRecord(String uri) { - super(uri); - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public NcPirepRecord(String uri) { + super(uri); + } - public Integer getObsId() { - return obsId; - } + public Integer getObsId() { + return obsId; + } - public void setObsId(Integer obsId) { - this.obsId = obsId; - } + public void setObsId(Integer obsId) { + this.obsId = obsId; + } - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } - /** - * Get the report correction indicator. - * - * @return The corIndicator - */ - public String getCorIndicator() { - return corIndicator; - } + /** + * Get the report correction indicator. + * + * @return The corIndicator + */ + public String getCorIndicator() { + return corIndicator; + } - /** - * Set the report correction indicator. - * - * @param corIndicator - * The corIndicator. - */ - public void setCorIndicator(String corIndicator) { - this.corIndicator = corIndicator; - } + /** + * Set the report correction indicator. + * + * @param corIndicator + * The corIndicator. + */ + public void setCorIndicator(String corIndicator) { + this.corIndicator = corIndicator; + } - /** - * Get the report data for this observation. - * - * @return The Report data. - */ - public String getReportData() { - String s = null; - if (messageData instanceof String) { - s = (String) messageData; - } - return s; - } + /** + * Get the report data for this observation. + * + * @return The Report data. + */ + public String getReportData() { + String s = null; + if (messageData instanceof String) { + s = (String) messageData; + } + return s; + } - /** - * Set the report data for this observation. - * - * @param reportData - * The Report data. - */ - public void setReportData(String reportData) { - messageData = reportData; - } + /** + * Set the report data for this observation. + * + * @param reportData + * The Report data. + */ + public void setReportData(String reportData) { + messageData = reportData; + } - /** - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } + /** + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } - /** - * Is the location defined in the spatial tables. - * - * @return Is the location defined in the spatial tables. - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } + /** + * Is the location defined in the spatial tables. + * + * @return Is the location defined in the spatial tables. + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } - /** - * // * Get the elevation, in meters, of the observing platform or location. - * Get the elevation, in feet, of the observing platform or location. - * - * // * @return The observation elevation, in meters. - * - * @return The observation elevation, in feet. - */ - public Integer getFlightLevel() { - return location.getFlightLevel(); - } + /** + * Get the elevation, in feet, of the observing platform or location. + * + * @return The observation elevation, in feet. + */ + public Integer getFlightLevel() { + return location.getFlightLevel(); + } - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } + /** + * @return the reportType + */ + public String getReportType() { + return reportType; + } - /** - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } + /** + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } - /** - * @return the timeObs - */ - public Calendar getTimeObs() { - if (this.dataTime == null) - return null; - return this.dataTime.getRefTimeAsCalendar(); - } + /** + * @return the timeObs + */ + public Calendar getTimeObs() { + if (this.dataTime == null) { + return null; + } + return this.dataTime.getRefTimeAsCalendar(); + } - /** - * @param timeObs - * the timeObs to set - */ - public void setTimeObs(Calendar timeObs) { - this.timeObs = timeObs; - } + /** + * @param timeObs + * the timeObs to set + */ + public void setTimeObs(Calendar timeObs) { + this.timeObs = timeObs; + } - /** - * @return the refHour - */ - public Calendar getRefHour() { - return refHour; - } + /** + * @return the refHour + */ + public Calendar getRefHour() { + return refHour; + } - /** - * @param refHour - * the refHour to set - */ - public void setRefHour(Calendar refHour) { - this.refHour = refHour; - } + /** + * @param refHour + * the refHour to set + */ + public void setRefHour(Calendar refHour) { + this.refHour = refHour; + } - public String getSuspectTimeFlag() { - return suspectTimeFlag; - } + public String getSuspectTimeFlag() { + return suspectTimeFlag; + } - public void setSuspectTimeFlag(String suspectTimeFlag) { - this.suspectTimeFlag = suspectTimeFlag; - } + public void setSuspectTimeFlag(String suspectTimeFlag) { + this.suspectTimeFlag = suspectTimeFlag; + } - /** - * @param aircraftType - * the aircraftType to set - */ - public void setAircraftType(String aircraftType) { - this.aircraftType = aircraftType; - } + /** + * @param aircraftType + * the aircraftType to set + */ + public void setAircraftType(String aircraftType) { + this.aircraftType = aircraftType; + } - /** - * @return the aircraftType - */ - public String getAircraftType() { - return aircraftType; - } + /** + * @return the aircraftType + */ + public String getAircraftType() { + return aircraftType; + } - /** - * @return the temp - */ - // public Double getTemp() { - public float getTemp() { - return temp; - } + /** + * @return the temp + */ + // public Double getTemp() { + public float getTemp() { + return temp; + } - /** - * @param temp - * the temp to set - */ - // public void setTemp(Double temp) { - public void setTemp(float temp) { - this.temp = temp; - } + /** + * @param temp + * the temp to set + */ + // public void setTemp(Double temp) { + public void setTemp(float temp) { + this.temp = temp; + } - /** - * @return the windDirection - */ - // public Integer getWindDirection() { - public float getWindDirection() { - return windDirection; - } + /** + * @return the windDirection + */ + // public Integer getWindDirection() { + public float getWindDirection() { + return windDirection; + } - /** - * @param windDirection - * the windDirection to set - */ - // public void setWindDirection(Integer windDirection) { - public void setWindDirection(float windDirection) { - this.windDirection = windDirection; - } + /** + * @param windDirection + * the windDirection to set + */ + // public void setWindDirection(Integer windDirection) { + public void setWindDirection(float windDirection) { + this.windDirection = windDirection; + } - /** - * @return the windspeed - */ - // public Double getWindSpeed() { - public float getWindSpeed() { - return windSpeed; - } + /** + * @return the windspeed + */ + // public Double getWindSpeed() { + public float getWindSpeed() { + return windSpeed; + } - /** - * @param windspeed - * the windspeed to set - */ - // public void setWindSpeed(Double windSpeed) { - public void setWindSpeed(float windSpeed) { - this.windSpeed = windSpeed; - } + /** + * @param windspeed + * the windspeed to set + */ + // public void setWindSpeed(Double windSpeed) { + public void setWindSpeed(float windSpeed) { + this.windSpeed = windSpeed; + } - /** - * @return the horzVisibility - */ - public Integer getHorzVisibility() { - return horzVisibility; - } + /** + * @return the horzVisibility + */ + public Integer getHorzVisibility() { + return horzVisibility; + } - /** - * @param horzVisibility - * the horzVisibility to set - */ - public void setHorzVisibility(Integer horzVisibility) { - this.horzVisibility = horzVisibility; - } + /** + * @param horzVisibility + * the horzVisibility to set + */ + public void setHorzVisibility(Integer horzVisibility) { + this.horzVisibility = horzVisibility; + } - /** - * @return the obsText - */ - public String getObsText() { - return obsText; - } + /** + * @return the obsText + */ + public String getObsText() { + return obsText; + } - /** - * @param obsText - * the obsText to set - */ - public void setObsText(String obsText) { - this.obsText = obsText; - } + /** + * @param obsText + * the obsText to set + */ + public void setObsText(String obsText) { + this.obsText = obsText; + } - /** - * @return the weatherGroup - */ - public String getWeatherGroup() { - return weatherGroup; - } + /** + * @return the weatherGroup + */ + public String getWeatherGroup() { + return weatherGroup; + } - /** - * @param weatherGroup - * the weatherGroup to set - */ - public void setWeatherGroup(String weatherGroup) { - this.weatherGroup = weatherGroup; - } + /** + * @param weatherGroup + * the weatherGroup to set + */ + public void setWeatherGroup(String weatherGroup) { + this.weatherGroup = weatherGroup; + } - /** - * @return the ancPirepData - */ - public Set getAncPirepData() { - return ancPirepData; - } + /** + * @return the ancPirepData + */ + public Set getAncPirepData() { + return ancPirepData; + } - /** - * @param ancPirepData - * the ancPirepData to set - */ - public void setAncPirepData(Set ancPirepData) { - this.ancPirepData = ancPirepData; - } + /** + * @param ancPirepData + * the ancPirepData to set + */ + public void setAncPirepData(Set ancPirepData) { + this.ancPirepData = ancPirepData; + } - /** - * - * @param cloud - */ - public void addLayer(NcPirepLayerData layer) { - layer.setParent(this); - if (ancPirepData == null) { - ancPirepData = new HashSet(); - } - ancPirepData.add(layer); - } + /** + * + * @param cloud + */ + public void addLayer(NcPirepLayerData layer) { + layer.setParent(this); + if (ancPirepData == null) { + ancPirepData = new HashSet(); + } + ancPirepData.add(layer); + } - @Override - public void setDataURI(String dataURI) { - identifier = dataURI; - } + @Override + public void setDataURI(String dataURI) { + identifier = dataURI; + } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - String retData = null; - if ("STA".matches(paramName)) { - retData = getStationId(); - } else if ("TEXT".equals(paramName)) { - retData = obsText; - } - return retData; - } + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public String getString(String paramName) { + String retData = null; + if ("STA".matches(paramName)) { + retData = getStationId(); + } else if ("TEXT".equals(paramName)) { + retData = obsText; + } + return retData; + } - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - Amount a = null; + /** + * Get the value and units of a named parameter within this observation. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Amount getValue(String paramName) { + Amount a = null; - String pName = PARM_MAP.get(paramName); - if (display) { - if (SFC_TEMP.equals(pName) && (temp != null)) { - a = new Amount(temp, TEMPERATURE_UNIT); - } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { - a = new Amount(windSpeed, WIND_SPEED_UNIT); - } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { - a = new Amount(windDirection, WIND_DIR_UNIT); - } else if (STA_LAT.equals(pName)) { - a = new Amount(this.getLatitude(), LOCATION_UNIT); - } else if (STA_LON.equals(pName)) { - a = new Amount(this.getLongitude(), LOCATION_UNIT); - } else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) { - a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT); - // if used, need to modify raytheon code - // } else if (UA_TOPHGT.equals(pName) && maxPirepLayerData != - // null - // && maxPirepLayerData.getTopLayerHeight() != null) { - // a = new - // Amount(maxPirepLayerData.getTopLayerHeight().intValue(), - // ALTITUDE_UNIT); - // } else if (UA_BOTHGT.equals(pName) && maxPirepLayerData != - // null - // && maxPirepLayerData.getBaseLayerHeight() != null) { - // a = new - // Amount(maxPirepLayerData.getBaseLayerHeight().intValue(), - // ALTITUDE_UNIT); - } - } - return a; - } + String pName = PARM_MAP.get(paramName); + if (display) { + if (SFC_TEMP.equals(pName) && (temp != null)) { + a = new Amount(temp, TEMPERATURE_UNIT); + } else if (SFC_WNDSPD.equals(pName) && (windSpeed != null)) { + a = new Amount(windSpeed, WIND_SPEED_UNIT); + } else if (SFC_WNDDIR.equals(pName) && (windDirection != null)) { + a = new Amount(windDirection, WIND_DIR_UNIT); + } else if (STA_LAT.equals(pName)) { + a = new Amount(this.getLatitude(), LOCATION_UNIT); + } else if (STA_LON.equals(pName)) { + a = new Amount(this.getLongitude(), LOCATION_UNIT); + } else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) { + a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT); + // if used, need to modify raytheon code + // } else if (UA_TOPHGT.equals(pName) && maxPirepLayerData != + // null + // && maxPirepLayerData.getTopLayerHeight() != null) { + // a = new + // Amount(maxPirepLayerData.getTopLayerHeight().intValue(), + // ALTITUDE_UNIT); + // } else if (UA_BOTHGT.equals(pName) && maxPirepLayerData != + // null + // && maxPirepLayerData.getBaseLayerHeight() != null) { + // a = new + // Amount(maxPirepLayerData.getBaseLayerHeight().intValue(), + // ALTITUDE_UNIT); + } + } + return a; + } - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Collection getValues(String paramName) { + return null; + } - @Override - public String[] getStrings(String paramName) { - if ("ICI".matches(paramName)) { - int rank = -1; - String iceIntensity = null; - for (NcPirepLayerData layer : this.ancPirepData) { - String intensity = ""; - if (layer.getLayerType().equals( - NcPirepLayerData.LAYER_TYP_ICING)) { - if (layer.getIceInten() != null) { - intensity = layer.getIceInten(); - } - // if (layer.getSecondValue() != null) { - // intensity += layer.getSecondValue(); - // } + @Override + public String[] getStrings(String paramName) { + if ("ICI".matches(paramName)) { + int rank = -1; + String iceIntensity = null; + for (NcPirepLayerData layer : this.ancPirepData) { + String intensity = ""; + if (layer.getLayerType().equals( + NcPirepLayerData.LAYER_TYP_ICING)) { + if (layer.getIceInten() != null) { + intensity = layer.getIceInten(); + } + // if (layer.getSecondValue() != null) { + // intensity += layer.getSecondValue(); + // } - if (ICING_MAP.get(intensity).intValue() > rank) { - rank = ICING_MAP.get(intensity).intValue(); - iceIntensity = intensity; - maxPirepLayerData = layer; - } - } - } - if (iceIntensity != null) { - String[] maxIntensity = { iceIntensity }; - return maxIntensity; - } else { - display = false; - } - } else if ("ICT".matches(paramName) && maxPirepLayerData != null) { - String[] maxType = { maxPirepLayerData.getIceType() }; - return maxType; - } else if ("TBI".matches(paramName)) { - int rank = -1; - String turbIntensity = null; - for (NcPirepLayerData layer : this.ancPirepData) { - String intensity = ""; - if (layer.getLayerType().equals( - NcPirepLayerData.LAYER_TYP_TURBC)) { - if (layer.getTurbInten() != null) { - intensity = layer.getTurbInten(); - } - // if (layer.getSecondValue() != null) { - // intensity += layer.getSecondValue(); - // } + if (ICING_MAP.get(intensity).intValue() > rank) { + rank = ICING_MAP.get(intensity).intValue(); + iceIntensity = intensity; + maxPirepLayerData = layer; + } + } + } + if (iceIntensity != null) { + String[] maxIntensity = { iceIntensity }; + return maxIntensity; + } else { + display = false; + } + } else if ("ICT".matches(paramName) && (maxPirepLayerData != null)) { + String[] maxType = { maxPirepLayerData.getIceType() }; + return maxType; + } else if ("TBI".matches(paramName)) { + int rank = -1; + String turbIntensity = null; + for (NcPirepLayerData layer : this.ancPirepData) { + String intensity = ""; + if (layer.getLayerType().equals( + NcPirepLayerData.LAYER_TYP_TURBC)) { + if (layer.getTurbInten() != null) { + intensity = layer.getTurbInten(); + } + // if (layer.getSecondValue() != null) { + // intensity += layer.getSecondValue(); + // } - if (TURB_MAP.get(intensity).intValue() > rank) { - rank = TURB_MAP.get(intensity).intValue(); - turbIntensity = intensity; - maxPirepLayerData = layer; - } - } - } - if (turbIntensity != null) { - String[] maxIntensity = { turbIntensity }; - return maxIntensity; - } else { - display = false; - } - } else if ("TBT".matches(paramName) && maxPirepLayerData != null) { - String[] maxType = { maxPirepLayerData.getTurbType() }; - return maxType; - } else if ("TBF".matches(paramName) && maxPirepLayerData != null) { - // Turbulence Frequency Types do not get stored. - } - return null; - } + if (TURB_MAP.get(intensity).intValue() > rank) { + rank = TURB_MAP.get(intensity).intValue(); + turbIntensity = intensity; + maxPirepLayerData = layer; + } + } + } + if (turbIntensity != null) { + String[] maxIntensity = { turbIntensity }; + return maxIntensity; + } else { + display = false; + } + } else if ("TBT".matches(paramName) && (maxPirepLayerData != null)) { + String[] maxType = { maxPirepLayerData.getTurbType() }; + return maxType; + } else if ("TBF".matches(paramName) && (maxPirepLayerData != null)) { + // Turbulence Frequency Types do not get stored. + } + return null; + } - @Override - public AircraftObsLocation getSpatialObject() { - return location; - } + @Override + public AircraftObsLocation getSpatialObject() { + return location; + } - public AircraftObsLocation getLocation() { - return location; - } + public AircraftObsLocation getLocation() { + return location; + } - public void setLocation(AircraftObsLocation location) { - this.location = location; - } + public void setLocation(AircraftObsLocation location) { + this.location = location; + } - @Override - public String getMessageData() { - return getObsText(); - } + @Override + public String getMessageData() { + return getObsText(); + } - /** - * Returns the hashCode for this object. This implementation returns the - * hashCode of the generated dataURI. - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); - return result; - } + /** + * Returns the hashCode for this object. This implementation returns the + * hashCode of the generated dataURI. + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); + return result; + } - /** - * Checks if this record is equal to another by checking the generated - * dataURI. - * - * @param obj - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - NcPirepRecord other = (NcPirepRecord) obj; - if (getDataURI() == null) { - if (other.getDataURI() != null) { - return false; - } - } else if (!getDataURI().equals(other.getDataURI())) - return false; - return true; - } + /** + * Checks if this record is equal to another by checking the generated + * dataURI. + * + * @param obj + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + NcPirepRecord other = (NcPirepRecord) obj; + if (getDataURI() == null) { + if (other.getDataURI() != null) { + return false; + } + } else if (!getDataURI().equals(other.getDataURI())) { + return false; + } + return true; + } - @Override - public Date getPersistenceTime() { - return this.dataTime.getRefTime(); - } + @Override + public Date getPersistenceTime() { + return this.dataTime.getRefTime(); + } - @Override - public void setPersistenceTime(Date persistTime) { - } + @Override + public void setPersistenceTime(Date persistTime) { + } - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon - * .uf.common.pointdata.PointDataView) - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon + * .uf.common.pointdata.PointDataView) + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } @Override @Column @@ -849,4 +854,9 @@ public class NcPirepRecord extends PluginDataObject implements ISpatialEnabled, public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ncpirep"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/src/gov/noaa/nws/ncep/common/dataplugin/ncscat/NcscatRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/src/gov/noaa/nws/ncep/common/dataplugin/ncscat/NcscatRecord.java index 3521a2192d..031199a14b 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/src/gov/noaa/nws/ncep/common/dataplugin/ncscat/NcscatRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/src/gov/noaa/nws/ncep/common/dataplugin/ncscat/NcscatRecord.java @@ -50,12 +50,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncscat", - indexes = { - @Index(name = "ncscat_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncscat", indexes = { @Index(name = "ncscat_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @@ -168,4 +164,9 @@ public class NcscatRecord extends PersistablePluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ncsat"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/NcScdRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/NcScdRecord.java index 826c596eb1..8b7473c804 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/NcScdRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/NcScdRecord.java @@ -1,34 +1,3 @@ -/** - * - * NcScdRecord - * - * This java class performs the mapping to the database tables for SCD. - * - *
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    	Engineer    Description
- * -------		-------	 	--------	-----------
- * 12/2008		41			T. Lee		Created
- * 04/2009		41			T. Lee		Migrated to TO10
- * 07/2009		41			T. Lee		Migrated to TO11
- * 11/2009		41			T. Lee		Migrated to TO11D6
- * 06/2011		41			F. J. Yen	Convert SCD to HDF5 (OB11.5).  Changed type
- * 										of suspectTimeFlag from Boolean to String
- * 										since undefined in PointDataDescription.
- * 09/2011      457         S. Gurung   Renamed H5 to Nc and h5 to nc
- * Apr 4, 2013        1846 bkowal      Added an index on refTime and forecastTime
- * 04/2013      1293        bkowal      Removed references to hdffileid.
- * Apr 12, 2013 1857        bgonzale    Added SequenceGenerator annotation.
- * May 07, 2013 1869        bsteffen	Remove dataURI column from PluginDataObject.
- *
- * 
- * - * @author T.Lee - * @version 1.0 - * - */ - package gov.noaa.nws.ncep.common.dataplugin.ncscd; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -70,6 +39,36 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; +/** + * + * NcScdRecord + * + * This java class performs the mapping to the database tables for SCD. + * + *
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#  Engineer  Description
+ * ------------ -------- --------- ----------------------------------
+ * 12/2008      41       T. Lee    Created
+ * 04/2009      41       T. Lee    Migrated to TO10
+ * 07/2009      41       T. Lee    Migrated to TO11
+ * 11/2009      41       T. Lee    Migrated to TO11D6
+ * 06/2011      41       F. J. Yen Convert SCD to HDF5 (OB11.5).  Changed type
+ *                                 of suspectTimeFlag from Boolean to String
+ *                                 since undefined in PointDataDescription.
+ * 09/2011      457      S. Gurung Renamed H5 to Nc and h5 to nc
+ * Apr 04, 2013 1846     bkowal    Added an index on refTime and forecastTime
+ * Apr 04, 2013 1293     bkowal    Removed references to hdffileid.
+ * 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
+ * 
+ * + * @author T.Lee + * @version 1.0 + * + */ @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "ncscdseq") @Table(name = "ncscd", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -77,483 +76,479 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncscd", - indexes = { - @Index(name = "ncscd_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncscd", indexes = { @Index(name = "ncscd_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class NcScdRecord extends PluginDataObject implements ISpatialEnabled, - IDecoderGettable, IPointData, IPersistable { - - private static final long serialVersionUID = 1L; - - public static final Unit TDXC_UNIT = SI.CELSIUS; - - public static final Unit PRECIP_UNIT = NonSI.INCH; - - /** Report type */ - @XmlElement - @DynamicSerializeElement - @Column - @DataURI(position = 1) - private String reportType; - - @Embedded - @DataURI(position = 2, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; - - /** Bulletin correction */ - @Column(length = 8) - @DataURI(position = 3) - @XmlElement - @DynamicSerializeElement - private String corIndicator; - - /** Bulletin observation time */ - @Transient - @XmlAttribute - @DynamicSerializeElement - private Calendar obsTime; - - /** Bulletin issuance time */ - @Column - @DataURI(position = 4) - @XmlElement - @DynamicSerializeElement - private Calendar issueTime; - - /** Maximum 24h temperature in Celsius */ - @Transient - @XmlElement - @DynamicSerializeElement - private float TDXC; - - /** Minimum 24h temperature in Celsius */ - @Transient - @XmlElement - @DynamicSerializeElement - private float TDNC; - - /** Six hour accumulated precipitation in inches */ - @Transient - @XmlElement - @DynamicSerializeElement - private float P06I; - - /** Twenty-four hour accumulated precipitation in inches */ - @Transient - @XmlElement - @DynamicSerializeElement - private float P24I; - - /** Character weather phenomenon */ - @Transient - @XmlElement - @DynamicSerializeElement - private String WTHR; - - /** Snow depth */ - @Transient - @XmlElement - @DynamicSerializeElement - private float SNOW; - - /** New snow depth on the ground */ - @Transient - @XmlElement - @DynamicSerializeElement - private float SNEW; - - /** Total snow depth in a Calendar day */ - @Transient - @XmlElement - @DynamicSerializeElement - private float S24I; - - /** Water equivalent of snow */ - @Transient - @XmlElement - @DynamicSerializeElement - private float WEQS; - - /** Duration of sunshine */ - @Transient - @XmlElement - @DynamicSerializeElement - private int MSUN; - - /** Low-level cloud genera from WMO Code 0513 */ - @Transient - @XmlElement - @DynamicSerializeElement - private int CTYL; - - /** Mid-level cloud genera from WMO Code 0513 */ - @Transient - @XmlElement - @DynamicSerializeElement - private int CTYM; - - /** High-level cloud genera from WMO Code 0513 */ - @Transient - @XmlElement - @DynamicSerializeElement - private int CTYH; - - /** Fraction of celestial dome covered by cloud from WMO Code 2700 */ - @Transient - @XmlElement - @DynamicSerializeElement - private int CFRT; - - /** - * Fraction of celestial dome covered by low or mid cloud from WMO Code 2700 - */ - @Transient - @XmlElement - @DynamicSerializeElement - private int CFRL; - - /** Cloud base height from WMO Code 1600 */ - @Transient - @XmlElement - @DynamicSerializeElement - private int CBAS; - - /** Suspect time flag */ - @Transient - @XmlElement - @DynamicSerializeElement - private String suspectTimeFlag; - - /** Raw report */ - @Transient - @XmlElement - @DynamicSerializeElement - private String report; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - /** - * Default constructor - * - */ - public NcScdRecord() { - this.location = null; - this.issueTime = null; - this.corIndicator = "REG"; - this.obsTime = null; - this.TDXC = IDecoderConstantsN.FLOAT_MISSING; - this.TDNC = IDecoderConstantsN.FLOAT_MISSING; - this.P06I = IDecoderConstantsN.FLOAT_MISSING; - this.P24I = IDecoderConstantsN.FLOAT_MISSING; - this.WTHR = ""; - this.SNOW = IDecoderConstantsN.FLOAT_MISSING; - this.SNEW = IDecoderConstantsN.FLOAT_MISSING; - this.S24I = IDecoderConstantsN.FLOAT_MISSING; - this.WEQS = IDecoderConstantsN.FLOAT_MISSING; - this.MSUN = IDecoderConstantsN.INTEGER_MISSING; - this.CTYL = IDecoderConstantsN.INTEGER_MISSING; - this.CTYM = IDecoderConstantsN.INTEGER_MISSING; - this.CTYH = IDecoderConstantsN.INTEGER_MISSING; - this.CFRT = IDecoderConstantsN.INTEGER_MISSING; - this.CFRL = IDecoderConstantsN.INTEGER_MISSING; - this.CBAS = IDecoderConstantsN.INTEGER_MISSING; - this.suspectTimeFlag = "false"; - this.report = ""; - } - - /** - * Constructs a SCD record from a dataURI - * - * @param uri - * The dataURI - */ - public NcScdRecord(String uri) { - super(uri); - } - - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - - public String getReportType() { - return reportType; - } - - public void setReportType(String reportType) { - this.reportType = reportType; - } - - public String getStationId() { - return location.getStationId(); - } - - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } - - public SurfaceObsLocation getLocation() { - return location; - } - - public void setLocation(SurfaceObsLocation obsLoc) { - this.location = obsLoc; - } - - public double getLatitude() { - return location.getLatitude(); - } - - public double getLongitude() { - return location.getLongitude(); - } - - public Integer getElevation() { - return location.getElevation(); - } - - public Calendar getIssueTime() { - return issueTime; - } - - public void setIssueTime(Calendar issueTime) { - this.issueTime = issueTime; - } - - public String getCorIndicator() { - return corIndicator; - } - - public void setCorIndicator(String corIndicator) { - this.corIndicator = corIndicator; - } - - public Calendar getObsTime() { - return obsTime; - } - - public void setObsTime(Calendar obsTime) { - this.obsTime = obsTime; - } - - public float getTDXC() { - return TDXC; - } - - public void setTDXC(float TDXC) { - this.TDXC = TDXC; - } - - public float getTDNC() { - return TDNC; - } - - public void setTDNC(float TDNC) { - this.TDNC = TDNC; - } - - public float getP06I() { - return P06I; - } - - public void setP06I(float P06I) { - this.P06I = P06I; - } - - public float getP24I() { - return P24I; - } - - public void setP24I(float P24I) { - this.P24I = P24I; - } + IDecoderGettable, IPointData, IPersistable { + + private static final long serialVersionUID = 1L; + + public static final Unit TDXC_UNIT = SI.CELSIUS; + + public static final Unit PRECIP_UNIT = NonSI.INCH; + + /** Report type */ + @XmlElement + @DynamicSerializeElement + @Column + @DataURI(position = 1) + private String reportType; + + @Embedded + @DataURI(position = 2, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; + + /** Bulletin correction */ + @Column(length = 8) + @DataURI(position = 3) + @XmlElement + @DynamicSerializeElement + private String corIndicator; + + /** Bulletin observation time */ + @Transient + @XmlAttribute + @DynamicSerializeElement + private Calendar obsTime; + + /** Bulletin issuance time */ + @Column + @DataURI(position = 4) + @XmlElement + @DynamicSerializeElement + private Calendar issueTime; + + /** Maximum 24h temperature in Celsius */ + @Transient + @XmlElement + @DynamicSerializeElement + private float TDXC; + + /** Minimum 24h temperature in Celsius */ + @Transient + @XmlElement + @DynamicSerializeElement + private float TDNC; + + /** Six hour accumulated precipitation in inches */ + @Transient + @XmlElement + @DynamicSerializeElement + private float P06I; + + /** Twenty-four hour accumulated precipitation in inches */ + @Transient + @XmlElement + @DynamicSerializeElement + private float P24I; + + /** Character weather phenomenon */ + @Transient + @XmlElement + @DynamicSerializeElement + private String WTHR; + + /** Snow depth */ + @Transient + @XmlElement + @DynamicSerializeElement + private float SNOW; + + /** New snow depth on the ground */ + @Transient + @XmlElement + @DynamicSerializeElement + private float SNEW; + + /** Total snow depth in a Calendar day */ + @Transient + @XmlElement + @DynamicSerializeElement + private float S24I; + + /** Water equivalent of snow */ + @Transient + @XmlElement + @DynamicSerializeElement + private float WEQS; + + /** Duration of sunshine */ + @Transient + @XmlElement + @DynamicSerializeElement + private int MSUN; + + /** Low-level cloud genera from WMO Code 0513 */ + @Transient + @XmlElement + @DynamicSerializeElement + private int CTYL; + + /** Mid-level cloud genera from WMO Code 0513 */ + @Transient + @XmlElement + @DynamicSerializeElement + private int CTYM; + + /** High-level cloud genera from WMO Code 0513 */ + @Transient + @XmlElement + @DynamicSerializeElement + private int CTYH; + + /** Fraction of celestial dome covered by cloud from WMO Code 2700 */ + @Transient + @XmlElement + @DynamicSerializeElement + private int CFRT; + + /** + * Fraction of celestial dome covered by low or mid cloud from WMO Code 2700 + */ + @Transient + @XmlElement + @DynamicSerializeElement + private int CFRL; + + /** Cloud base height from WMO Code 1600 */ + @Transient + @XmlElement + @DynamicSerializeElement + private int CBAS; + + /** Suspect time flag */ + @Transient + @XmlElement + @DynamicSerializeElement + private String suspectTimeFlag; + + /** Raw report */ + @Transient + @XmlElement + @DynamicSerializeElement + private String report; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + /** + * Default constructor + * + */ + public NcScdRecord() { + this.location = null; + this.issueTime = null; + this.corIndicator = "REG"; + this.obsTime = null; + this.TDXC = IDecoderConstantsN.FLOAT_MISSING; + this.TDNC = IDecoderConstantsN.FLOAT_MISSING; + this.P06I = IDecoderConstantsN.FLOAT_MISSING; + this.P24I = IDecoderConstantsN.FLOAT_MISSING; + this.WTHR = ""; + this.SNOW = IDecoderConstantsN.FLOAT_MISSING; + this.SNEW = IDecoderConstantsN.FLOAT_MISSING; + this.S24I = IDecoderConstantsN.FLOAT_MISSING; + this.WEQS = IDecoderConstantsN.FLOAT_MISSING; + this.MSUN = IDecoderConstantsN.INTEGER_MISSING; + this.CTYL = IDecoderConstantsN.INTEGER_MISSING; + this.CTYM = IDecoderConstantsN.INTEGER_MISSING; + this.CTYH = IDecoderConstantsN.INTEGER_MISSING; + this.CFRT = IDecoderConstantsN.INTEGER_MISSING; + this.CFRL = IDecoderConstantsN.INTEGER_MISSING; + this.CBAS = IDecoderConstantsN.INTEGER_MISSING; + this.suspectTimeFlag = "false"; + this.report = ""; + } + + /** + * Constructs a SCD record from a dataURI + * + * @param uri + * The dataURI + */ + public NcScdRecord(String uri) { + super(uri); + } + + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } + + public String getReportType() { + return reportType; + } + + public void setReportType(String reportType) { + this.reportType = reportType; + } + + public String getStationId() { + return location.getStationId(); + } + + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } + + public SurfaceObsLocation getLocation() { + return location; + } + + public void setLocation(SurfaceObsLocation obsLoc) { + this.location = obsLoc; + } + + public double getLatitude() { + return location.getLatitude(); + } + + public double getLongitude() { + return location.getLongitude(); + } + + public Integer getElevation() { + return location.getElevation(); + } + + public Calendar getIssueTime() { + return issueTime; + } + + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } + + public String getCorIndicator() { + return corIndicator; + } + + public void setCorIndicator(String corIndicator) { + this.corIndicator = corIndicator; + } + + public Calendar getObsTime() { + return obsTime; + } + + public void setObsTime(Calendar obsTime) { + this.obsTime = obsTime; + } + + public float getTDXC() { + return TDXC; + } + + public void setTDXC(float TDXC) { + this.TDXC = TDXC; + } + + public float getTDNC() { + return TDNC; + } + + public void setTDNC(float TDNC) { + this.TDNC = TDNC; + } + + public float getP06I() { + return P06I; + } + + public void setP06I(float P06I) { + this.P06I = P06I; + } + + public float getP24I() { + return P24I; + } + + public void setP24I(float P24I) { + this.P24I = P24I; + } - public String getWTHR() { - return WTHR; - } + public String getWTHR() { + return WTHR; + } - public void setWTHR(String WTHR) { - this.WTHR = WTHR; - } + public void setWTHR(String WTHR) { + this.WTHR = WTHR; + } - public float getSNOW() { - return SNOW; - } + public float getSNOW() { + return SNOW; + } - public void setSNOW(float SNOW) { - this.SNOW = SNOW; - } - - public float getSNEW() { - return SNEW; - } - - public void setSNEW(float SNEW) { - this.SNEW = SNEW; - } - - public float getS24I() { - return S24I; - } - - public void setS24I(float S24I) { - this.S24I = S24I; - } - - public float getWEQS() { - return WEQS; - } - - public void setWEQS(float WEQS) { - this.WEQS = WEQS; - } - - public int getMSUN() { - return MSUN; - } - - public void setMSUN(int MSUN) { - this.MSUN = MSUN; - } - - public int getCTYL() { - return CTYL; - } - - public void setCTYL(int CTYL) { - this.CTYL = CTYL; - } - - public int getCTYM() { - return CTYM; - } - - public void setCTYM(int CTYM) { - this.CTYM = CTYM; - } - - public int getCTYH() { - return CTYH; - } - - public void setCTYH(int CTYH) { - this.CTYH = CTYH; - } - - public int getCFRT() { - return CFRT; - } - - public void setCFRT(int CFRT) { - this.CFRT = CFRT; - } - - public int getCFRL() { - return CFRL; - } - - public void setCFRL(int CFRL) { - this.CFRL = CFRL; - } - - public int getCBAS() { - return CBAS; - } - - public void setCBAS(int CBAS) { - this.CBAS = CBAS; - } - - public String getReport() { - return report; - } - - public void setReport(String report) { - this.report = report; - } - - public String getSuspectTimeFlag() { - return suspectTimeFlag; - } - - public void setSuspectTimeFlag(String suspectTimeFlag) { - this.suspectTimeFlag = suspectTimeFlag; - } - - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - - @Override - public Date getPersistenceTime() { - return this.dataTime.getRefTime(); - } - - @Override - public void setPersistenceTime(Date persistTime) { - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon - * .uf.common.pointdata.PointDataView) - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } - - @Override - public Amount getValue(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Collection getValues(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getString(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String[] getStrings(String paramName) { - // TODO Auto-generated method stub - return null; - } + public void setSNOW(float SNOW) { + this.SNOW = SNOW; + } + + public float getSNEW() { + return SNEW; + } + + public void setSNEW(float SNEW) { + this.SNEW = SNEW; + } + + public float getS24I() { + return S24I; + } + + public void setS24I(float S24I) { + this.S24I = S24I; + } + + public float getWEQS() { + return WEQS; + } + + public void setWEQS(float WEQS) { + this.WEQS = WEQS; + } + + public int getMSUN() { + return MSUN; + } + + public void setMSUN(int MSUN) { + this.MSUN = MSUN; + } + + public int getCTYL() { + return CTYL; + } + + public void setCTYL(int CTYL) { + this.CTYL = CTYL; + } + + public int getCTYM() { + return CTYM; + } + + public void setCTYM(int CTYM) { + this.CTYM = CTYM; + } + + public int getCTYH() { + return CTYH; + } + + public void setCTYH(int CTYH) { + this.CTYH = CTYH; + } + + public int getCFRT() { + return CFRT; + } + + public void setCFRT(int CFRT) { + this.CFRT = CFRT; + } + + public int getCFRL() { + return CFRL; + } + + public void setCFRL(int CFRL) { + this.CFRL = CFRL; + } + + public int getCBAS() { + return CBAS; + } + + public void setCBAS(int CBAS) { + this.CBAS = CBAS; + } + + public String getReport() { + return report; + } + + public void setReport(String report) { + this.report = report; + } + + public String getSuspectTimeFlag() { + return suspectTimeFlag; + } + + public void setSuspectTimeFlag(String suspectTimeFlag) { + this.suspectTimeFlag = suspectTimeFlag; + } + + /** + * Get the value and units of a named parameter within this observation. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + + @Override + public Date getPersistenceTime() { + return this.dataTime.getRefTime(); + } + + @Override + public void setPersistenceTime(Date persistTime) { + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon + * .uf.common.pointdata.PointDataView) + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + @Override + public Amount getValue(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Collection getValues(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getString(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String[] getStrings(String paramName) { + // TODO Auto-generated method stub + return null; + } @Override @Column @@ -561,4 +556,9 @@ public class NcScdRecord extends PluginDataObject implements ISpatialEnabled, public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ncscd"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/dao/NcScdPointDataTransform.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/dao/NcScdPointDataTransform.java index 534cf3c6f8..b47f03347b 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/dao/NcScdPointDataTransform.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/src/gov/noaa/nws/ncep/common/dataplugin/ncscd/dao/NcScdPointDataTransform.java @@ -4,6 +4,8 @@ **/ package gov.noaa.nws.ncep.common.dataplugin.ncscd.dao; +import gov.noaa.nws.ncep.common.dataplugin.ncscd.NcScdRecord; + import java.io.File; import java.util.ArrayList; import java.util.Date; @@ -11,9 +13,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import gov.noaa.nws.ncep.common.dataplugin.ncscd.NcScdRecord; -import gov.noaa.nws.ncep.common.dataplugin.ncscd.dao.NcScdDao; - import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataDescription; @@ -30,9 +29,10 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 06/29/2011 F. J. Yen Initial creation - * 09/08/2011 294 G. Hull Use SurfaceObsLocation to set lat/lon - * 09/13/2011 457 S. Gurung Renamed H5 to Nc and h5 to nc + * Jun 29, 2011 F. J. Yen Initial creation + * Sep 08, 2011 294 G. Hull Use SurfaceObsLocation to set lat/lon + * Sep 13, 2011 457 S. Gurung Renamed H5 to Nc and h5 to nc + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @@ -55,70 +55,69 @@ public class NcScdPointDataTransform { private static final String LATITUDE = "latitude"; private static final String ELEVATION = "elevation"; - + private static final String ISSUE_TIME = "issueTime"; - + private static final String OBS_TIME = "obsTime"; // STATION_ID, REPORT_TYPE, ISSUE_TIME, OBS_TIME // ------------------ - + private static final String CORRECTION_CODE = "correctionCode"; private static final String DATAURI = "dataURI"; - + private static final String REPORT = "report"; // CORRECTION_CODE, DATAURI, REPORT // ------------------ - + private static final String TDXC = "TDXC"; private static final String TDNC = "TDNC"; - + private static final String P06I = "P06I"; - + private static final String P24I = "P24I"; private static final String WTHR = "WTHR"; - + private static final String SNOW = "SNOW"; - + private static final String SNEW = "SNEW"; - + private static final String S24I = "S24I"; private static final String WEQS = "WEQS"; - + private static final String MSUN = "MSUN"; - + private static final String CTYL = "CTYL"; private static final String CTYM = "CTYM"; - + private static final String CTYH = "CTYH"; - + private static final String CFRT = "CFRT"; private static final String CFRL = "CFRL"; - - private static final String CBAS = "CBAS"; - - private static final String SUSPECT_TIME_FLAG = "suspectTimeFlag"; - - // TDXC, TDNC, P06I, P24I, WTHR, SNOW, SNEW, S24I, WEQS, MSUN, - // CTYL, CTYM, CTYH, CFRT, CFRL, CBAS, SUSPECT_TIME_FLAG - // ------------------ + private static final String CBAS = "CBAS"; + + private static final String SUSPECT_TIME_FLAG = "suspectTimeFlag"; + + // TDXC, TDNC, P06I, P24I, WTHR, SNOW, SNEW, S24I, WEQS, MSUN, + // CTYL, CTYM, CTYH, CFRT, CFRL, CBAS, SUSPECT_TIME_FLAG + // ------------------ /** * It is important to keep this up to date or risk breaking backwards * compatibility */ - private static final String[] ALL_PARAMS = { STATION_ID, REPORT_TYPE, - ISSUE_TIME, OBS_TIME, CORRECTION_CODE, REPORT, DATAURI, TDXC, - TDNC, P06I, P24I, WTHR, SNOW, SNEW, S24I, WEQS, MSUN, CTYL, - CTYM, CTYH, CFRT, CFRL, CBAS, SUSPECT_TIME_FLAG,}; + private static final String[] ALL_PARAMS = { STATION_ID, REPORT_TYPE, + ISSUE_TIME, OBS_TIME, CORRECTION_CODE, REPORT, DATAURI, TDXC, TDNC, + P06I, P24I, WTHR, SNOW, SNEW, S24I, WEQS, MSUN, CTYL, CTYM, CTYH, + CFRT, CFRL, CBAS, SUSPECT_TIME_FLAG, }; public static final String ALL_PARAMS_LIST; static { @@ -154,8 +153,9 @@ public class NcScdPointDataTransform { if (pdo.length > 0) { Map pointMap = new HashMap(); for (PluginDataObject p : pdo) { - if (!(p instanceof NcScdRecord)) + if (!(p instanceof NcScdRecord)) { continue; + } File f = this.dao.getFullFilePath(p); PointDataContainer pdc = pointMap.get(f); if (pdc == null) { @@ -206,21 +206,19 @@ public class NcScdPointDataTransform { nar.setDataURI(pdv.getString(DATAURI)); nar.setReport(pdv.getString(REPORT)); nar.setReportType(pdv.getString(REPORT_TYPE)); - + SurfaceObsLocation loc = new SurfaceObsLocation( pdv.getString(STATION_NAME)); Double lat = pdv.getNumber(LATITUDE).doubleValue(); Double lon = pdv.getNumber(LONGITUDE).doubleValue(); loc.assignLocation(lat, lon); loc.setElevation(pdv.getNumber(ELEVATION).intValue()); - + long tmptime = pdv.getNumber(ISSUE_TIME).longValue(); nar.setIssueTime(TimeTools.newCalendar(tmptime)); tmptime = pdv.getNumber(OBS_TIME).longValue(); nar.setObsTime(TimeTools.newCalendar(tmptime)); - nar.setPluginName("ncscd"); - nar.setTDXC(pdv.getNumber(TDXC).floatValue()); nar.setTDNC(pdv.getNumber(TDNC).floatValue()); nar.setP06I(pdv.getNumber(P06I).floatValue()); @@ -230,11 +228,11 @@ public class NcScdPointDataTransform { nar.setSNEW(pdv.getNumber(SNEW).floatValue()); nar.setS24I(pdv.getNumber(S24I).floatValue()); nar.setWEQS(pdv.getNumber(WEQS).floatValue()); - + nar.setMSUN(pdv.getInt(MSUN)); nar.setCTYL(pdv.getInt(CTYL)); nar.setCTYM(pdv.getInt(CTYM)); - nar.setCTYH(pdv.getInt(CTYH)); + nar.setCTYH(pdv.getInt(CTYH)); nar.setCFRT(pdv.getInt(CFRT)); nar.setCFRL(pdv.getInt(CFRL)); nar.setCBAS(pdv.getInt(CBAS)); diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/src/gov/noaa/nws/ncep/common/dataplugin/nctaf/NcTafRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/src/gov/noaa/nws/ncep/common/dataplugin/nctaf/NcTafRecord.java index 50f2d9eabb..b26e3018a8 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/src/gov/noaa/nws/ncep/common/dataplugin/nctaf/NcTafRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/src/gov/noaa/nws/ncep/common/dataplugin/nctaf/NcTafRecord.java @@ -59,20 +59,25 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 09/20/2011 458 sgurung Main pdo class - * 09/23/2011 458 sgurung Converted to HDF5 - * 09/29/2011 sgurung Added reportType - * 10/19/2011 sgurung Set dataTime with correct valid period - * 10/26/2011 sgurung Added probable parameters (for TEMPO/PROB groups). - * Split change groups into hourly records. - * 11/03/2011 sgurung Added probable weather and method to calculate ceiling. - * 11/04/2011 sgurung Sort sky_cover before calculating ceiling. - * Change startRefTime to nearest hour to get hourly refTimes - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * 04/08/2013 1293 bkowal Removed references to hdffileid. + * Sep 20, 2011 458 sgurung Main pdo class + * Sep 23, 2011 458 sgurung Converted to HDF5 + * Sep 29, 2011 sgurung Added reportType + * Oct 19, 2011 sgurung Set dataTime with correct valid period + * Oct 26, 2011 sgurung Added probable parameters (for + * TEMPO/PROB groups). Split change groups + * into hourly records. + * Nov 03, 2011 sgurung Added probable weather and method to + * calculate ceiling. + * Nov 04, 2011 sgurung Sort sky_cover before calculating + * ceiling. Change startRefTime to nearest + * hour to get hourly refTimes + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 08, 2013 1293 bkowal Removed references to hdffileid. * 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 * * * @@ -86,1531 +91,1552 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "nctaf", - indexes = { - @Index(name = "nctaf_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "nctaf", indexes = { @Index(name = "nctaf_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement public class NcTafRecord extends PluginDataObject implements ISpatialEnabled, - IDecoderGettable, IPointData, IPersistable { - - private static final long serialVersionUID = 1L; - - @DynamicSerializeElement - @XmlElement - @Column - private String wmoHeader; - - @DynamicSerializeElement - @XmlElement - // @Column(length = 1024) - @Transient - private String tafText; - - // The observation report type. - @DataURI(position = 1) - @Column - @XmlElement - @DynamicSerializeElement - private String reportType; - - @Embedded - @DataURI(position = 2, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; - - // Station Identifier for the data - @DynamicSerializeElement - @XmlElement - @Transient - // @Index(name = "nctaf_stationIndex") - private String stationId; - - @DynamicSerializeElement - @XmlElement - @Column - @DataURI(position = 3) - private String corIndicator; - - @DynamicSerializeElement - @XmlElement - @Column - @DataURI(position = 4) - private String amdIndicator; - - /** Issue date */ - @DynamicSerializeElement - @XmlElement - @Column - // @DataURI(position = 4) - private Date issue_time; - - /** Issue date string */ - @DynamicSerializeElement - @XmlElement - @Column - @DataURI(position = 5) - private String issue_timeString; - - /** Bulletin issuance time */ - @DynamicSerializeElement - @XmlElement - @Transient - private Date bulletin_time; - - /** Any remarks contained in the TAF record */ - @DynamicSerializeElement - @XmlElement - @Transient - private String remarks; - - /** A String containing the change group */ - @DynamicSerializeElement - @XmlElement - // @Column - @Transient - private String changeGroup; - - /** The period for which the TAF is valid */ - @DynamicSerializeElement - @XmlElement - @Embedded - @Transient - private NcTafPeriod tafChangePeriod; - - /** - * The forecast valid starting date - */ - @DynamicSerializeElement - @XmlElement - @Transient - private Calendar startDate; - - // This time is only used for BECMG groups. It marks the end time of the - // BECMG transition period. - @DynamicSerializeElement - @XmlElement - @Transient - private Calendar transitionEndDate; - - /** - * The forecast valid ending date - */ - @DynamicSerializeElement - @XmlElement - @Transient - private Calendar endDate; - - /** - * The sequence id is used to physically order a collection of ChangeGroups. - * This is required because the start times may be ambiguous i.e. A BECMG - * and TEMPO change group could share the same start time. - */ - @DynamicSerializeElement - @XmlElement - @Column - @DataURI(position = 6) - private Integer sequenceId; - - /** - * The change group indicator i.e. BECMG, FM, TEMPO, etc - */ - @DynamicSerializeElement - @XmlElement - @Column - @DataURI(position = 7) - private String change_indicator; - - /** - * The probability percentage for PROB and PROB TEMPO change groups. - */ - @DynamicSerializeElement - @XmlElement - @Transient - private Integer probability; - - /** Wind direction in degrees */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float wind_dir_degrees; - - /** Wind speed in knots */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float wind_speed_kt; - - /** Wind gust in knots */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float wind_gust_kt; - - /** Wind shear height above ground level */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float wind_shear_hgt_ft_agl; - - /** Wind shear direction in degrees */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float wind_shear_dir_degrees; - - /** Wind shear speed in knots */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float wind_shear_speed_kt; - - /** Visibility (horizontal) in miles */ - @DynamicSerializeElement - @XmlElement - @Column - private Float visibility_mi; - - /** Altimeter reading in inches of mercury */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float altim_in_hg; - - /** Vertical visibility */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float vert_vis_ft; - - /** Maximum temperature */ - @DynamicSerializeElement - @XmlElement - @Transient - private Integer max_temp_c; - - /** Minimum temperature */ - @DynamicSerializeElement - @XmlElement - @Transient - private Integer min_temp_c; - - /** Wind direction in degrees (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_wind_dir_degrees; - - /** Wind speed in knots (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_wind_speed_kt; - - /** Wind gust in knots (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_wind_gust_kt; - - /** Wind shear height above ground level (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_wind_shear_hgt_ft_agl; - - /** Wind shear direction in degrees (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_wind_shear_dir_degrees; - - /** Wind shear speed in knots (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_wind_shear_speed_kt; - - /** Visibility (horizontal) in miles (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_visibility_mi; - - /** Vertical visibility (TEMPO/PROB) */ - @DynamicSerializeElement - @XmlElement - @Transient - private Float probable_vert_vis_ft; - - /** - * The valid period for the TAF record. - */ - @DynamicSerializeElement - @XmlElement - private NcTafPeriod tafValidPeriod; - - /** - * Weather and obscurations - */ - @DynamicSerializeElement - @XmlElement - @Transient - private Set weather; - - /** - * (TEMPO/PROB) Weather and obscurations - */ - @DynamicSerializeElement - @XmlElement - @Transient - private Set probable_weather; - - /** Sky coverage */ - @DynamicSerializeElement - @XmlElement - @Transient - private Set sky_cover; - - /** (TEMPO/PROB) Sky coverage */ - @DynamicSerializeElement - @XmlElement - @Transient - private Set probable_sky_cover; - - /** The turbulence layers */ - @DynamicSerializeElement - @XmlElement - @Transient - private Set turbulence_layers; - - /** The icing layers */ - @DynamicSerializeElement - @XmlElement - @Transient - private Set icing_layers; - - /** The temperature forecasts */ - @DynamicSerializeElement - @XmlElement - @Transient - private Set temp_forecasts; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - // private Integer hdfFileId; - - public NcTafRecord() { - wmoHeader = " "; - tafText = " "; - reportType = "TAF"; - stationId = " "; - bulletin_time = null; - corIndicator = " "; - amdIndicator = " "; - issue_timeString = " "; - remarks = " "; - changeGroup = " "; - altim_in_hg = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - change_indicator = " "; - max_temp_c = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; - min_temp_c = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; - probability = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; - remarks = " "; - sequenceId = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; - vert_vis_ft = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - visibility_mi = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - wind_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - wind_gust_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - wind_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - wind_shear_hgt_ft_agl = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - wind_shear_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - wind_shear_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - startDate = null; - endDate = null; - transitionEndDate = null; - location = null; - probable_vert_vis_ft = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - probable_visibility_mi = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - probable_wind_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - probable_wind_gust_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - probable_wind_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - probable_wind_shear_hgt_ft_agl = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - probable_wind_shear_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - probable_wind_shear_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - } - - /** - * Constructs a taf record from a dataURI - * - * @param uri - * The dataURI - * @param tableDef - * The table definition associated with this class - */ - public NcTafRecord(String uri) { - super(uri); - } - - /** - * Get the WMO header for the enclosing WMO message. - * - * @return The wmoHeader. - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * Set the WMO header for the enclosing WMO message. - * - * @param wmoHeader - * The WMOHeader to set. - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * Get the text of this terminal forecast. - * - * @return The terminal forecast text. - */ - public String getTafText() { - return tafText; - } - - /** - * Set the text of this terminal forecast. - * - * @param tafText - * The terminal forecast text. - */ - public void setTafText(String tafText) { - this.tafText = tafText; - } - - /** - * Get the observation report type. - * - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * Set the observation report type. - * - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * - * @return - */ - public String getStationId() { - return stationId; - } - - /** - * - * @param stationID - */ - public void setStationId(String stationID) { - stationId = stationID; - } - - /** - * - * @return the corIndicator - */ - public String getCorIndicator() { - return corIndicator; - } - - /** - * - * @param corIndicator - * the corIndicator to set - */ - public void setCorIndicator(String corIndicator) { - this.corIndicator = corIndicator; - } - - /** - * - * @return the amdIndicator - */ - public String getAmdIndicator() { - return amdIndicator; - } - - /** - * - * @param amdIndicator - * the amdIndicator to set - */ - public void setAmdIndicator(String amdIndicator) { - this.amdIndicator = amdIndicator; - } - - /** - * - * @return the bulletin_time - */ - public Date getBulletin_time() { - return bulletin_time; - } - - /** - * - * @param bulletin_time - * the bulletin_time to set - */ - public void setBulletin_time(Date bulletin_time) { - this.bulletin_time = bulletin_time; - } - - /** - * @return the issue_time - */ - public Date getIssue_time() { - return issue_time; - } - - /** - * @param issue_time - * the issue_time to set - */ - public void setIssue_time(Date issue_time) { - this.issue_time = issue_time; - } - - /** - * @return the issue_timeString - */ - public String getIssue_timeString() { - return issue_timeString; - } - - /** - * @param issue_timeString - * the issue_time to set - */ - public void setIssue_timeString(String issue_timeString) { - this.issue_timeString = issue_timeString; - } - - @Override - public void setIdentifier(Object dataURI) { - - this.identifier = dataURI; - - } - - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. Null for this - * class. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } - - public SurfaceObsLocation getLocation() { - return location; - } - - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - public double getLatitude() { - return location.getLatitude(); - } - - public double getLongitude() { - return location.getLongitude(); - } - - public Integer getElevation() { - return location.getElevation(); - } - - /** - * Returns the hashCode for this object. This implementation returns the - * hashCode of the generated dataURI. - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); - return result; - } - - /** - * Checks if this record is equal to another by checking the generated - * dataURI. - * - * @param obj - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - NcTafRecord other = (NcTafRecord) obj; - if (getDataURI() == null) { - if (other.getDataURI() != null) { - return false; - } - } else if (!getDataURI().equals(other.getDataURI())) - return false; - return true; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon - * .uf.common.pointdata.PointDataView) - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } - - /** - * Get the time to use for persisting this data. - * - * @return The persistence time for this data. - */ - @Override - public Date getPersistenceTime() { - if (getInsertTime() == null) - return null; - else - return getInsertTime().getTime(); - } - - /** - * Set the time to be used for the persistence time for this object. - * - * @param persistTime - * The persistence time to be used. - */ - @Override - public void setPersistenceTime(Date persistTime) { - Calendar insertTime = Calendar.getInstance(); - insertTime.setTime(persistTime); - setInsertTime(insertTime); - } - - @Override - public Amount getValue(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Collection getValues(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getString(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String[] getStrings(String paramName) { - // TODO Auto-generated method stub - return null; - } - - /** - * - * @return The string containing the change group text - */ - public String getChangeGroup() { - return this.changeGroup; - } - - public void setChangeGroup(String changeGroup) { - this.changeGroup = changeGroup; - } - - public NcTafPeriod getTafChangePeriod() { - return tafChangePeriod; - } - - public void setTafChangePeriod(NcTafPeriod tafChangePeriod) { - this.tafChangePeriod = tafChangePeriod; - } - - public Float getWind_dir_degrees() { - return wind_dir_degrees; - } - - public void setWind_dir_degrees(Float wind_dir_degrees) { - this.wind_dir_degrees = wind_dir_degrees; - } - - public Float getWind_speed_kt() { - return wind_speed_kt; - } - - public void setWind_speed_kt(Float wind_speed_kt) { - this.wind_speed_kt = wind_speed_kt; - } - - public Float getWind_gust_kt() { - return wind_gust_kt; - } - - public void setWind_gust_kt(Float wind_gust_kt) { - this.wind_gust_kt = wind_gust_kt; - } - - public Float getWind_shear_hgt_ft_agl() { - return wind_shear_hgt_ft_agl; - } - - public void setWind_shear_hgt_ft_agl(Float wind_shear_hgt_ft_agl) { - this.wind_shear_hgt_ft_agl = wind_shear_hgt_ft_agl; - } - - public Float getWind_shear_dir_degrees() { - return wind_shear_dir_degrees; - } - - public void setWind_shear_dir_degrees(Float wind_shear_dir_degrees) { - this.wind_shear_dir_degrees = wind_shear_dir_degrees; - } - - public Float getWind_shear_speed_kt() { - return wind_shear_speed_kt; - } - - public void setWind_shear_speed_kt(Float wind_shear_speed_kt) { - this.wind_shear_speed_kt = wind_shear_speed_kt; - } - - public Float getVisibility_mi() { - return visibility_mi; - } - - public void setVisibility_mi(Float visibility_mi) { - this.visibility_mi = visibility_mi; - } - - public float getAltim_in_hg() { - return altim_in_hg; - } - - public void setAltim_in_hg(float altim_in_hg) { - this.altim_in_hg = altim_in_hg; - } - - public float getVert_vis_ft() { - return probable_vert_vis_ft; - } - - public void setVert_vis_ft(float vert_vis_ft) { - this.probable_vert_vis_ft = vert_vis_ft; - } - - public float getProbable_wind_dir_degrees() { - return probable_wind_dir_degrees; - } - - public void setProbable_wind_dir_degrees(float wind_dir_degrees) { - this.probable_wind_dir_degrees = wind_dir_degrees; - } - - public float getProbable_wind_speed_kt() { - return probable_wind_speed_kt; - } - - public void setProbable_wind_speed_kt(float wind_speed_kt) { - this.probable_wind_speed_kt = wind_speed_kt; - } - - public float getProbable_wind_gust_kt() { - return probable_wind_gust_kt; - } - - public void setProbable_wind_gust_kt(float wind_gust_kt) { - this.probable_wind_gust_kt = wind_gust_kt; - } - - public float getProbable_wind_shear_hgt_ft_agl() { - return probable_wind_shear_hgt_ft_agl; - } - - public void setProbable_wind_shear_hgt_ft_agl(float wind_shear_hgt_ft_agl) { - this.probable_wind_shear_hgt_ft_agl = wind_shear_hgt_ft_agl; - } - - public float getProbable_wind_shear_dir_degrees() { - return probable_wind_shear_dir_degrees; - } - - public void setProbable_wind_shear_dir_degrees(float wind_shear_dir_degrees) { - this.probable_wind_shear_dir_degrees = wind_shear_dir_degrees; - } - - public float getProbable_wind_shear_speed_kt() { - return probable_wind_shear_speed_kt; - } - - public void setProbable_wind_shear_speed_kt(float wind_shear_speed_kt) { - this.probable_wind_shear_speed_kt = wind_shear_speed_kt; - } - - public float getProbable_visibility_mi() { - return probable_visibility_mi; - } - - public void setProbable_visibility_mi(float visibility_mi) { - this.probable_visibility_mi = visibility_mi; - } - - public float getProbable_vert_vis_ft() { - return probable_vert_vis_ft; - } - - public void setProbable_vert_vis_ft(float vert_vis_ft) { - this.probable_vert_vis_ft = vert_vis_ft; - } - - public Integer getMax_temp_c() { - return max_temp_c; - } - - public void setMax_temp_c(Integer max_temp_c) { - this.max_temp_c = max_temp_c; - } - - public Integer getMin_temp_c() { - return min_temp_c; - } - - public void setMin_temp_c(Integer min_temp_c) { - this.min_temp_c = min_temp_c; - } - - public Integer getProbability() { - return probability; - } - - public void setProbability(Integer probability) { - this.probability = probability; - } - - /** - * @return the sequenceId - */ - public Integer getSequenceId() { - return sequenceId; - } - - /** - * @param sequenceId - * the sequenceId to set - */ - public void setSequenceId(Integer sequenceId) { - this.sequenceId = sequenceId; - } - - /** - * @return the remarks - */ - public String getRemarks() { - return remarks; - } - - /** - * @param remarks - * the remarks to set - */ - public void setRemarks(String remarks) { - this.remarks = remarks; - } - - public String getChange_indicator() { - return change_indicator; - } - - public void setChange_indicator(String change_indicator) { - this.change_indicator = change_indicator; - } - - public NcTafPeriod getTafValidPeriod() { - return tafValidPeriod; - } - - public void setTafValidPeriod(NcTafPeriod tafValidPeriod) { - this.tafValidPeriod = tafValidPeriod; - } - - public Set getTurbulence_layers() { - return turbulence_layers; - } - - public void setTurbulence_layers(Set turbulence_layers) { - this.turbulence_layers = turbulence_layers; - } - - /** - * @param add - * taf turbulence layer to set - */ - public void addTurbulence_layer(NcTafTurbulenceLayer turb) { - turbulence_layers.add(turb); - } - - public Set getIcing_layers() { - return icing_layers; - } - - public void setIcing_layers(Set icing_layers) { - this.icing_layers = icing_layers; - } - - /** - * @param add - * taf icing layer to set - */ - public void addIcing_layer(NcTafIcingLayer icng) { - icing_layers.add(icng); - } - - public Set getTemp_forecasts() { - return temp_forecasts; - } - - public void setTemp_forecasts(Set temp_forecasts) { - this.temp_forecasts = temp_forecasts; - } - - /** - * @param add - * taf temp forecast to set - */ - public void addTemp_forecast(NcTafTemperatureForecast tempFcst) { - temp_forecasts.add(tempFcst); - } - - public Set getWeather() { - return weather; - } - - public void setWeather(Set weather) { - this.weather = weather; - } - - /** - * @param add - * taf weather condition to set - */ - public void addWeather(NcTafWeatherCondition wthrCond) { - weather.add(wthrCond); - } - - public Set getProbable_weather() { - return probable_weather; - } - - public void setProbable_weather(Set weather) { - this.probable_weather = weather; - } - - /** - * @param add - * probable taf weather condition to set - */ - public void addProbable_weather(NcTafWeatherCondition wthrCond) { - probable_weather.add(wthrCond); - } - - public Set getSky_cover() { - return sky_cover; - } - - public void setSky_cover(Set sky_cover) { - this.sky_cover = sky_cover; - } - - /** - * @param add - * taf sky cover to set - */ - public void addSky_cover(NcTafSkyCover skyCvr) { - sky_cover.add(skyCvr); - } - - /** - * @param add - * probable taf sky cover to set - */ - public void addProbable_sky_cover(NcTafSkyCover skyCvr) { - probable_sky_cover.add(skyCvr); - } - - public Set getProbable_sky_cover() { - return probable_sky_cover; - } - - public void setProbable_sky_cover(Set sky_cover) { - this.probable_sky_cover = sky_cover; - } - - /** - * @return the theStartDate - */ - public Calendar getStartDate() { - return startDate; - } - - /** - * @param theStartDate - * the theStartDate to set - */ - public void setStartDate(Calendar start) { - startDate = start; - } - - /** - * @return the transitionEndDate - */ - public Calendar getTransitionEndDate() { - return transitionEndDate; - } - - /** - * @param transitionEndDate - * the transitionEndDate to set - */ - public void setTransitionEndDate(Calendar transitionEndDate) { - this.transitionEndDate = transitionEndDate; - } - - /** - * @return the theEndDate - */ - public Calendar getEndDate() { - return endDate; - } - - /** - * @param theEndDate - * the theEndDate to set - */ - public void setEndDate(Calendar end) { - endDate = end; - } - - public static String formatDate(Calendar dateTime) { - return String.format("%1$tY%1$tm%1$td%1$tH%1$tM%1$tS", dateTime); - } - - /** - * This method determines the ceiling value of a TAF. - */ - public static float getCeiling(Set skyCov, float vertVis) { - - // If a vertical visibility has been reported, the sky is obscured - // and the vertical visibility becomes the ceiling. - if (vertVis >= 0 && vertVis < 1e20f) { - return vertVis; - } else { - // Otherwise, determine the ceiling value. - return findTafCeilingFromLayers(sortSkyCover(skyCov)); - } - } - - public static Set sortSkyCover(Set skySet) { - if (skySet != null) { - SortedSet skSet = new TreeSet(); - for (NcTafSkyCover sc : skySet) { - skSet.add(sc); - } - return skSet; - } else { - return new HashSet(); - } - } - - /** - * This method calculates a floating point number representing the ceiling. - * By definition, the ceiling is the lowest overcast or broken cloud layer, - * so the method looks for the lowest layer that matches a BKN or OVC - * condition, and returns that layer. - * - * @param skyCov - * -- the set of sky coverage data - * @return -- the ceiling - */ - public static float findTafCeilingFromLayers(Set skyCov) { - float ceiling = 1e20f; - // Find a ceiling in a TAF report. - try { - for (NcTafSkyCover sc : skyCov) { - if (sc.getType().equals("CLR") || sc.getType().equals("SKC")) { - ceiling = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; - break; - } else if ((sc.getType().equals("BKN")) - || (sc.getType().equals("OVC"))) { - if (sc.getHeight() != null) { - ceiling = sc.getHeight(); - break; - } - } - - } - } catch (RuntimeException e) { - // ignore cloud cover that is null - } - return ceiling >= 1e20f ? IDecoderConstantsN.NEGATIVE_FLOAT_MISSING - : ceiling; - } - - /** - * Constructs an array of NcTafRecord PDOs given one or more bulletin - * records. (The bulletin records each contain data from a whole bulletin, - * while each NcTafRecord is more fine-grained -- representing the values - * for a single NcTafChangeGroup of the entire bulletin [NcTafBulletin]). We - * do this "reshuffle" because the - * NcTafBulletin/NcTafChangeGroup/NcTafSkyCover (same for - * NcTafTemperatureForecase, NcTafTurbulenceLayer, NcTafSkyCover, - * NcTafWeatherCondition) hierarchy efficiently represents the original - * structure as parsed from the text, but we want the persistent PDO - * (NcTafRecord) to be optimized for efficient access. - * - * @param bulletin - * the bulletin record to split - * @return NcTafRecord[] the array of NcTafRecord PDOs - */ - public static NcTafRecord[] split(NcTafBulletinRecord bulletin) { - List records = new ArrayList(); - if (bulletin.getChangeGroups() != null) { - Iterator chgGrps = bulletin.getChangeGroups() - .iterator(); - if (chgGrps != null) { - while (chgGrps.hasNext()) { - - NcTafRecord tfr = new NcTafRecord(); - - NcTafChangeGroup chgGrp = chgGrps.next(); - - tfr.setPersistenceTime(new Date()); - - NcTafPeriod validPeriod = chgGrp.getTafChangePeriod(); - Calendar cStart = TimeTools - .copy(validPeriod.getStartDate()); - - TimeRange range = new TimeRange(cStart, - validPeriod.getEndDate()); - DataTime tafPeriod = new DataTime(cStart, range); - - tfr.setDataTime(tafPeriod); - - if (bulletin.getTafValidPeriod() != null) - tfr.setTafValidPeriod(bulletin.getTafValidPeriod()); - - if (chgGrp.getTafChangePeriod() != null) - tfr.setTafChangePeriod(chgGrp.getTafChangePeriod()); - - if (chgGrp.getTafChangePeriod().getEndDate() != null) - tfr.setEndDate(chgGrp.getTafChangePeriod().getEndDate()); - - if (chgGrp.getTafChangePeriod().getStartDate() != null) - tfr.setStartDate(chgGrp.getTafChangePeriod() - .getStartDate()); - - if (chgGrp.getTafChangePeriod().getTransitionEndDate() != null) - tfr.setTransitionEndDate(chgGrp.getTafChangePeriod() - .getTransitionEndDate()); - - if (bulletin.getWmoHeader() != null) - tfr.setWmoHeader(bulletin.getWmoHeader()); - - if (bulletin.getTafText() != null) - tfr.setTafText(bulletin.getTafText()); - - if (bulletin.getReportType() != null) - tfr.setReportType(bulletin.getReportType()); - - if (bulletin.getStationId() != null) - tfr.setStationId(bulletin.getStationId()); - - if (bulletin.getCorIndicator() != null) { - tfr.setCorIndicator(bulletin.getCorIndicator()); - } else { - tfr.setCorIndicator(""); - } - - if (bulletin.getAmdIndicator() != null) { - tfr.setAmdIndicator(bulletin.getAmdIndicator()); - } else { - tfr.setAmdIndicator(""); - } - - if (bulletin.getIssue_time() != null) - tfr.setIssue_time(bulletin.getIssue_time()); - - if (bulletin.getIssue_timeString() != null) - tfr.setIssue_timeString(bulletin.getIssue_timeString()); - - if (bulletin.getBulletin_time() != null) - tfr.setBulletin_time(bulletin.getBulletin_time()); - - if (bulletin.getLocation() != null) - tfr.setLocation(bulletin.getLocation()); - - if (chgGrp.getChange_indicator() != null) - tfr.setChange_indicator(chgGrp.getChange_indicator()); - - if (chgGrp.getChangeGroup() != null) - tfr.setChangeGroup(chgGrp.getChangeGroup()); - - if (chgGrp.getProbability() != null) - tfr.setProbability(chgGrp.getProbability()); - - if (chgGrp.getMax_temp_c() != null) - tfr.setMax_temp_c(chgGrp.getMax_temp_c()); - - if (chgGrp.getMin_temp_c() != null) - tfr.setMin_temp_c(chgGrp.getMin_temp_c()); - - if (chgGrp.getAltim_in_hg() != null - && (chgGrp.getAltim_in_hg().trim().length() > 0)) { - tfr.setAltim_in_hg(Float.parseFloat(chgGrp - .getAltim_in_hg())); - } else { - tfr.setAltim_in_hg(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getRemarks() != null) - tfr.setRemarks(chgGrp.getRemarks()); - - if (chgGrp.getSequenceId() != null) - tfr.setSequenceId(chgGrp.getSequenceId()); - - VisibilityParser parser = new VisibilityParser(); - if (chgGrp.getVisibility_mi() != null - && parser.decode(chgGrp.getVisibility_mi() + "SM")) { - float val = (float) parser.getPrevail_vsbySM(); - tfr.setVisibility_mi(val); - } else { - tfr.setVisibility_mi(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getVert_vis_ft() != null - && (chgGrp.getVert_vis_ft().trim().length() > 0)) { - tfr.setVert_vis_ft(Float.parseFloat(chgGrp - .getVert_vis_ft())); - } else { - tfr.setVert_vis_ft(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getWind_dir_degrees() != null - && !chgGrp.getWind_dir_degrees().equalsIgnoreCase( - "VRB")) { - tfr.setWind_dir_degrees(Float.parseFloat(chgGrp - .getWind_dir_degrees())); - } else { - tfr.setWind_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getWind_gust_kt() != null) { - tfr.setWind_gust_kt(new Float(chgGrp.getWind_gust_kt())); - } else { - tfr.setWind_gust_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getWind_speed_kt() != null) { - tfr.setWind_speed_kt(new Float(chgGrp - .getWind_speed_kt())); - } else { - tfr.setWind_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getWind_shear_dir_degrees() != null) { - tfr.setWind_shear_dir_degrees(new Float(chgGrp - .getWind_shear_dir_degrees())); - } else { - tfr.setWind_shear_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getWind_shear_speed_kt() != null) { - tfr.setWind_shear_speed_kt(new Float(chgGrp - .getWind_shear_speed_kt())); - } else { - tfr.setWind_shear_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getWind_shear_hgt_ft_agl() != null) { - tfr.setWind_shear_hgt_ft_agl(new Float(chgGrp - .getWind_shear_hgt_ft_agl())); - } else { - tfr.setWind_shear_hgt_ft_agl(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_visibility_mi() != null - && parser.decode(chgGrp.getProbable_visibility_mi() - + "SM")) { - float val = (float) parser.getPrevail_vsbySM(); - tfr.setProbable_visibility_mi(val); - } else { - tfr.setProbable_visibility_mi(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_vert_vis_ft() != null - && (chgGrp.getProbable_vert_vis_ft().trim() - .length() > 0)) { - tfr.setProbable_vert_vis_ft(Float.parseFloat(chgGrp - .getProbable_vert_vis_ft())); - } else { - tfr.setProbable_vert_vis_ft(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_wind_dir_degrees() != null - && !chgGrp.getProbable_wind_dir_degrees() - .equalsIgnoreCase("VRB")) { - tfr.setProbable_wind_dir_degrees(Float - .parseFloat(chgGrp - .getProbable_wind_dir_degrees())); - } else { - tfr.setProbable_wind_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_wind_gust_kt() != null) { - tfr.setProbable_wind_gust_kt(new Float(chgGrp - .getProbable_wind_gust_kt())); - } else { - tfr.setProbable_wind_gust_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_wind_speed_kt() != null) { - tfr.setProbable_wind_speed_kt(new Float(chgGrp - .getProbable_wind_speed_kt())); - } else { - tfr.setProbable_wind_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_wind_shear_dir_degrees() != null) { - tfr.setProbable_wind_speed_kt(new Float(chgGrp - .getProbable_wind_shear_dir_degrees())); - } else { - tfr.setWind_shear_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_wind_shear_speed_kt() != null) { - tfr.setWind_shear_speed_kt(new Float(chgGrp - .getProbable_wind_shear_speed_kt())); - } else { - tfr.setWind_shear_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getProbable_wind_shear_hgt_ft_agl() != null) { - tfr.setProbable_wind_shear_hgt_ft_agl(new Float(chgGrp - .getProbable_wind_shear_hgt_ft_agl())); - } else { - tfr.setProbable_wind_shear_hgt_ft_agl(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); - } - - if (chgGrp.getIcing_layers() != null) { - tfr.setIcing_layers(chgGrp.getIcing_layers()); - } - - if (chgGrp.getSky_cover() != null) { - tfr.setSky_cover(chgGrp.getSky_cover()); - } - - if (chgGrp.getProbable_sky_cover() != null) { - tfr.setProbable_sky_cover(chgGrp - .getProbable_sky_cover()); - } - - if (chgGrp.getTemp_forecasts() != null) { - tfr.setTemp_forecasts(chgGrp.getTemp_forecasts()); - } - - if (chgGrp.getTurbulence_layers() != null) { - tfr.setTurbulence_layers(chgGrp.getTurbulence_layers()); - } - - if (chgGrp.getWeather() != null) { - tfr.setWeather(chgGrp.getWeather()); - } - - records.add(tfr); - } - - } - } - - List hourlyRecords = splitToHourlyRecords(records); - - return hourlyRecords.toArray(new NcTafRecord[0]); - } - - public static List splitToHourlyRecords( - List records) { - List newRecords = new ArrayList(); - int recordsSize = (records != null) ? records.size() : 0; - - if (recordsSize > 0) { - - for (int i = 0; i < recordsSize; i++) { - - NcTafRecord record = records.get(i); - - Calendar startRefTime = record.getStartDate(); - Calendar endRefTime = record.getEndDate(); - - // add 1 minute so that 12:30 becomes 12:31 and hence is rounded - // to 13:00 and not 12:00 - startRefTime.add(Calendar.MINUTE, 1); - Date nearestHour = DateUtils.round(startRefTime.getTime(), - Calendar.HOUR); - startRefTime.setTime(nearestHour); - - nearestHour = DateUtils.round(endRefTime.getTime(), - Calendar.HOUR); - endRefTime.setTime(nearestHour); - - long milliseconds1 = startRefTime.getTimeInMillis(); - long milliseconds2 = endRefTime.getTimeInMillis(); - long diff = milliseconds2 - milliseconds1; - long diffHours = diff / (60 * 60 * 1000); - - for (int hour = 0; hour < diffHours; hour++) { - - NcTafRecord tfr = new NcTafRecord(); - - tfr.setPersistenceTime(new Date()); - tfr.setDataTime(new DataTime(startRefTime)); - tfr.setTafValidPeriod(record.getTafValidPeriod()); - tfr.setTafChangePeriod(record.getTafChangePeriod()); - tfr.setEndDate(record.getTafChangePeriod().getEndDate()); - tfr.setStartDate(record.getTafChangePeriod().getStartDate()); - tfr.setTransitionEndDate(record.getTafChangePeriod() - .getTransitionEndDate()); - tfr.setWmoHeader(record.getWmoHeader()); - if (record.getTafText() != null - && record.getTafText().length() > 1024) { - tfr.setTafText(record.getTafText().substring(0, 1024)); - } else { - tfr.setTafText(record.getTafText()); - } - tfr.setTafText(record.getTafText()); - tfr.setReportType(record.getReportType()); - tfr.setStationId(record.getStationId()); - tfr.setCorIndicator(record.getCorIndicator()); - tfr.setAmdIndicator(record.getAmdIndicator()); - tfr.setIssue_time(record.getIssue_time()); - tfr.setIssue_timeString(record.getIssue_timeString()); - tfr.setBulletin_time(record.getBulletin_time()); - tfr.setLocation(record.getLocation()); - tfr.setChange_indicator(record.getChange_indicator()); - if (record.getChangeGroup() != null - && record.getChangeGroup().length() > 128) { - tfr.setChangeGroup(record.getChangeGroup().substring(0, - 128)); - } else { - tfr.setChangeGroup(record.getChangeGroup()); - } - tfr.setChangeGroup(record.getChangeGroup()); - tfr.setProbability(record.getProbability()); - tfr.setMax_temp_c(record.getMax_temp_c()); - tfr.setMin_temp_c(record.getMin_temp_c()); - tfr.setAltim_in_hg(record.getAltim_in_hg()); - tfr.setRemarks(record.getRemarks()); - tfr.setSequenceId(record.getSequenceId()); - tfr.setVisibility_mi(record.getVisibility_mi()); - tfr.setVert_vis_ft(record.getVert_vis_ft()); - tfr.setWind_dir_degrees(record.getWind_dir_degrees()); - tfr.setWind_gust_kt(record.getWind_gust_kt()); - tfr.setWind_speed_kt(record.getWind_speed_kt()); - tfr.setWind_shear_dir_degrees(record - .getWind_shear_dir_degrees()); - tfr.setWind_shear_speed_kt(record.getWind_shear_speed_kt()); - tfr.setWind_shear_hgt_ft_agl(record - .getWind_shear_hgt_ft_agl()); - tfr.setProbable_visibility_mi(record - .getProbable_visibility_mi()); - tfr.setProbable_vert_vis_ft(record - .getProbable_vert_vis_ft()); - tfr.setProbable_wind_dir_degrees(record - .getProbable_wind_dir_degrees()); - tfr.setProbable_wind_gust_kt(record - .getProbable_wind_gust_kt()); - tfr.setProbable_wind_speed_kt(record - .getProbable_wind_speed_kt()); - tfr.setWind_shear_dir_degrees(record - .getProbable_wind_shear_dir_degrees()); - tfr.setWind_shear_speed_kt(record - .getProbable_wind_shear_speed_kt()); - tfr.setProbable_wind_shear_hgt_ft_agl(record - .getProbable_wind_shear_hgt_ft_agl()); - tfr.setIcing_layers(record.getIcing_layers()); - tfr.setSky_cover(record.getSky_cover()); - tfr.setProbable_sky_cover(record.getProbable_sky_cover()); - tfr.setTemp_forecasts(record.getTemp_forecasts()); - tfr.setTurbulence_layers(record.getTurbulence_layers()); - tfr.setWeather(record.getWeather()); - tfr.setProbable_weather(record.getWeather()); - newRecords.add(tfr); - startRefTime.add(Calendar.HOUR_OF_DAY, 1); - } - } - } - - return newRecords; - } + IDecoderGettable, IPointData, IPersistable { + + private static final long serialVersionUID = 1L; + + @DynamicSerializeElement + @XmlElement + @Column + private String wmoHeader; + + @DynamicSerializeElement + @XmlElement + // @Column(length = 1024) + @Transient + private String tafText; + + // The observation report type. + @DataURI(position = 1) + @Column + @XmlElement + @DynamicSerializeElement + private String reportType; + + @Embedded + @DataURI(position = 2, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; + + // Station Identifier for the data + @DynamicSerializeElement + @XmlElement + @Transient + // @Index(name = "nctaf_stationIndex") + private String stationId; + + @DynamicSerializeElement + @XmlElement + @Column + @DataURI(position = 3) + private String corIndicator; + + @DynamicSerializeElement + @XmlElement + @Column + @DataURI(position = 4) + private String amdIndicator; + + /** Issue date */ + @DynamicSerializeElement + @XmlElement + @Column + // @DataURI(position = 4) + private Date issue_time; + + /** Issue date string */ + @DynamicSerializeElement + @XmlElement + @Column + @DataURI(position = 5) + private String issue_timeString; + + /** Bulletin issuance time */ + @DynamicSerializeElement + @XmlElement + @Transient + private Date bulletin_time; + + /** Any remarks contained in the TAF record */ + @DynamicSerializeElement + @XmlElement + @Transient + private String remarks; + + /** A String containing the change group */ + @DynamicSerializeElement + @XmlElement + // @Column + @Transient + private String changeGroup; + + /** The period for which the TAF is valid */ + @DynamicSerializeElement + @XmlElement + @Embedded + @Transient + private NcTafPeriod tafChangePeriod; + + /** + * The forecast valid starting date + */ + @DynamicSerializeElement + @XmlElement + @Transient + private Calendar startDate; + + // This time is only used for BECMG groups. It marks the end time of the + // BECMG transition period. + @DynamicSerializeElement + @XmlElement + @Transient + private Calendar transitionEndDate; + + /** + * The forecast valid ending date + */ + @DynamicSerializeElement + @XmlElement + @Transient + private Calendar endDate; + + /** + * The sequence id is used to physically order a collection of ChangeGroups. + * This is required because the start times may be ambiguous i.e. A BECMG + * and TEMPO change group could share the same start time. + */ + @DynamicSerializeElement + @XmlElement + @Column + @DataURI(position = 6) + private Integer sequenceId; + + /** + * The change group indicator i.e. BECMG, FM, TEMPO, etc + */ + @DynamicSerializeElement + @XmlElement + @Column + @DataURI(position = 7) + private String change_indicator; + + /** + * The probability percentage for PROB and PROB TEMPO change groups. + */ + @DynamicSerializeElement + @XmlElement + @Transient + private Integer probability; + + /** Wind direction in degrees */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float wind_dir_degrees; + + /** Wind speed in knots */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float wind_speed_kt; + + /** Wind gust in knots */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float wind_gust_kt; + + /** Wind shear height above ground level */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float wind_shear_hgt_ft_agl; + + /** Wind shear direction in degrees */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float wind_shear_dir_degrees; + + /** Wind shear speed in knots */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float wind_shear_speed_kt; + + /** Visibility (horizontal) in miles */ + @DynamicSerializeElement + @XmlElement + @Column + private Float visibility_mi; + + /** Altimeter reading in inches of mercury */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float altim_in_hg; + + /** Vertical visibility */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float vert_vis_ft; + + /** Maximum temperature */ + @DynamicSerializeElement + @XmlElement + @Transient + private Integer max_temp_c; + + /** Minimum temperature */ + @DynamicSerializeElement + @XmlElement + @Transient + private Integer min_temp_c; + + /** Wind direction in degrees (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_wind_dir_degrees; + + /** Wind speed in knots (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_wind_speed_kt; + + /** Wind gust in knots (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_wind_gust_kt; + + /** Wind shear height above ground level (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_wind_shear_hgt_ft_agl; + + /** Wind shear direction in degrees (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_wind_shear_dir_degrees; + + /** Wind shear speed in knots (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_wind_shear_speed_kt; + + /** Visibility (horizontal) in miles (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_visibility_mi; + + /** Vertical visibility (TEMPO/PROB) */ + @DynamicSerializeElement + @XmlElement + @Transient + private Float probable_vert_vis_ft; + + /** + * The valid period for the TAF record. + */ + @DynamicSerializeElement + @XmlElement + private NcTafPeriod tafValidPeriod; + + /** + * Weather and obscurations + */ + @DynamicSerializeElement + @XmlElement + @Transient + private Set weather; + + /** + * (TEMPO/PROB) Weather and obscurations + */ + @DynamicSerializeElement + @XmlElement + @Transient + private Set probable_weather; + + /** Sky coverage */ + @DynamicSerializeElement + @XmlElement + @Transient + private Set sky_cover; + + /** (TEMPO/PROB) Sky coverage */ + @DynamicSerializeElement + @XmlElement + @Transient + private Set probable_sky_cover; + + /** The turbulence layers */ + @DynamicSerializeElement + @XmlElement + @Transient + private Set turbulence_layers; + + /** The icing layers */ + @DynamicSerializeElement + @XmlElement + @Transient + private Set icing_layers; + + /** The temperature forecasts */ + @DynamicSerializeElement + @XmlElement + @Transient + private Set temp_forecasts; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + // private Integer hdfFileId; + + public NcTafRecord() { + wmoHeader = " "; + tafText = " "; + reportType = "TAF"; + stationId = " "; + bulletin_time = null; + corIndicator = " "; + amdIndicator = " "; + issue_timeString = " "; + remarks = " "; + changeGroup = " "; + altim_in_hg = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + change_indicator = " "; + max_temp_c = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; + min_temp_c = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; + probability = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; + remarks = " "; + sequenceId = IDecoderConstantsN.NEGATIVE_INTEGER_MISSING; + vert_vis_ft = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + visibility_mi = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + wind_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + wind_gust_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + wind_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + wind_shear_hgt_ft_agl = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + wind_shear_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + wind_shear_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + startDate = null; + endDate = null; + transitionEndDate = null; + location = null; + probable_vert_vis_ft = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + probable_visibility_mi = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + probable_wind_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + probable_wind_gust_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + probable_wind_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + probable_wind_shear_hgt_ft_agl = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + probable_wind_shear_dir_degrees = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + probable_wind_shear_speed_kt = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + } + + /** + * Constructs a taf record from a dataURI + * + * @param uri + * The dataURI + * @param tableDef + * The table definition associated with this class + */ + public NcTafRecord(String uri) { + super(uri); + } + + /** + * Get the WMO header for the enclosing WMO message. + * + * @return The wmoHeader. + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * Set the WMO header for the enclosing WMO message. + * + * @param wmoHeader + * The WMOHeader to set. + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * Get the text of this terminal forecast. + * + * @return The terminal forecast text. + */ + public String getTafText() { + return tafText; + } + + /** + * Set the text of this terminal forecast. + * + * @param tafText + * The terminal forecast text. + */ + public void setTafText(String tafText) { + this.tafText = tafText; + } + + /** + * Get the observation report type. + * + * @return the reportType + */ + public String getReportType() { + return reportType; + } + + /** + * Set the observation report type. + * + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * + * @return + */ + public String getStationId() { + return stationId; + } + + /** + * + * @param stationID + */ + public void setStationId(String stationID) { + stationId = stationID; + } + + /** + * + * @return the corIndicator + */ + public String getCorIndicator() { + return corIndicator; + } + + /** + * + * @param corIndicator + * the corIndicator to set + */ + public void setCorIndicator(String corIndicator) { + this.corIndicator = corIndicator; + } + + /** + * + * @return the amdIndicator + */ + public String getAmdIndicator() { + return amdIndicator; + } + + /** + * + * @param amdIndicator + * the amdIndicator to set + */ + public void setAmdIndicator(String amdIndicator) { + this.amdIndicator = amdIndicator; + } + + /** + * + * @return the bulletin_time + */ + public Date getBulletin_time() { + return bulletin_time; + } + + /** + * + * @param bulletin_time + * the bulletin_time to set + */ + public void setBulletin_time(Date bulletin_time) { + this.bulletin_time = bulletin_time; + } + + /** + * @return the issue_time + */ + public Date getIssue_time() { + return issue_time; + } + + /** + * @param issue_time + * the issue_time to set + */ + public void setIssue_time(Date issue_time) { + this.issue_time = issue_time; + } + + /** + * @return the issue_timeString + */ + public String getIssue_timeString() { + return issue_timeString; + } + + /** + * @param issue_timeString + * the issue_time to set + */ + public void setIssue_timeString(String issue_timeString) { + this.issue_timeString = issue_timeString; + } + + @Override + public void setIdentifier(Object dataURI) { + + this.identifier = dataURI; + + } + + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. Null for this + * class. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return null; + } + + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } + + public SurfaceObsLocation getLocation() { + return location; + } + + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + public double getLatitude() { + return location.getLatitude(); + } + + public double getLongitude() { + return location.getLongitude(); + } + + public Integer getElevation() { + return location.getElevation(); + } + + /** + * Returns the hashCode for this object. This implementation returns the + * hashCode of the generated dataURI. + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = (prime * result) + + ((getDataURI() == null) ? 0 : getDataURI().hashCode()); + return result; + } + + /** + * Checks if this record is equal to another by checking the generated + * dataURI. + * + * @param obj + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + NcTafRecord other = (NcTafRecord) obj; + if (getDataURI() == null) { + if (other.getDataURI() != null) { + return false; + } + } else if (!getDataURI().equals(other.getDataURI())) { + return false; + } + return true; + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon + * .uf.common.pointdata.PointDataView) + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + /** + * Get the time to use for persisting this data. + * + * @return The persistence time for this data. + */ + @Override + public Date getPersistenceTime() { + if (getInsertTime() == null) { + return null; + } else { + return getInsertTime().getTime(); + } + } + + /** + * Set the time to be used for the persistence time for this object. + * + * @param persistTime + * The persistence time to be used. + */ + @Override + public void setPersistenceTime(Date persistTime) { + Calendar insertTime = Calendar.getInstance(); + insertTime.setTime(persistTime); + setInsertTime(insertTime); + } + + @Override + public Amount getValue(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Collection getValues(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getString(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String[] getStrings(String paramName) { + // TODO Auto-generated method stub + return null; + } + + /** + * + * @return The string containing the change group text + */ + public String getChangeGroup() { + return this.changeGroup; + } + + public void setChangeGroup(String changeGroup) { + this.changeGroup = changeGroup; + } + + public NcTafPeriod getTafChangePeriod() { + return tafChangePeriod; + } + + public void setTafChangePeriod(NcTafPeriod tafChangePeriod) { + this.tafChangePeriod = tafChangePeriod; + } + + public Float getWind_dir_degrees() { + return wind_dir_degrees; + } + + public void setWind_dir_degrees(Float wind_dir_degrees) { + this.wind_dir_degrees = wind_dir_degrees; + } + + public Float getWind_speed_kt() { + return wind_speed_kt; + } + + public void setWind_speed_kt(Float wind_speed_kt) { + this.wind_speed_kt = wind_speed_kt; + } + + public Float getWind_gust_kt() { + return wind_gust_kt; + } + + public void setWind_gust_kt(Float wind_gust_kt) { + this.wind_gust_kt = wind_gust_kt; + } + + public Float getWind_shear_hgt_ft_agl() { + return wind_shear_hgt_ft_agl; + } + + public void setWind_shear_hgt_ft_agl(Float wind_shear_hgt_ft_agl) { + this.wind_shear_hgt_ft_agl = wind_shear_hgt_ft_agl; + } + + public Float getWind_shear_dir_degrees() { + return wind_shear_dir_degrees; + } + + public void setWind_shear_dir_degrees(Float wind_shear_dir_degrees) { + this.wind_shear_dir_degrees = wind_shear_dir_degrees; + } + + public Float getWind_shear_speed_kt() { + return wind_shear_speed_kt; + } + + public void setWind_shear_speed_kt(Float wind_shear_speed_kt) { + this.wind_shear_speed_kt = wind_shear_speed_kt; + } + + public Float getVisibility_mi() { + return visibility_mi; + } + + public void setVisibility_mi(Float visibility_mi) { + this.visibility_mi = visibility_mi; + } + + public float getAltim_in_hg() { + return altim_in_hg; + } + + public void setAltim_in_hg(float altim_in_hg) { + this.altim_in_hg = altim_in_hg; + } + + public float getVert_vis_ft() { + return probable_vert_vis_ft; + } + + public void setVert_vis_ft(float vert_vis_ft) { + this.probable_vert_vis_ft = vert_vis_ft; + } + + public float getProbable_wind_dir_degrees() { + return probable_wind_dir_degrees; + } + + public void setProbable_wind_dir_degrees(float wind_dir_degrees) { + this.probable_wind_dir_degrees = wind_dir_degrees; + } + + public float getProbable_wind_speed_kt() { + return probable_wind_speed_kt; + } + + public void setProbable_wind_speed_kt(float wind_speed_kt) { + this.probable_wind_speed_kt = wind_speed_kt; + } + + public float getProbable_wind_gust_kt() { + return probable_wind_gust_kt; + } + + public void setProbable_wind_gust_kt(float wind_gust_kt) { + this.probable_wind_gust_kt = wind_gust_kt; + } + + public float getProbable_wind_shear_hgt_ft_agl() { + return probable_wind_shear_hgt_ft_agl; + } + + public void setProbable_wind_shear_hgt_ft_agl(float wind_shear_hgt_ft_agl) { + this.probable_wind_shear_hgt_ft_agl = wind_shear_hgt_ft_agl; + } + + public float getProbable_wind_shear_dir_degrees() { + return probable_wind_shear_dir_degrees; + } + + public void setProbable_wind_shear_dir_degrees(float wind_shear_dir_degrees) { + this.probable_wind_shear_dir_degrees = wind_shear_dir_degrees; + } + + public float getProbable_wind_shear_speed_kt() { + return probable_wind_shear_speed_kt; + } + + public void setProbable_wind_shear_speed_kt(float wind_shear_speed_kt) { + this.probable_wind_shear_speed_kt = wind_shear_speed_kt; + } + + public float getProbable_visibility_mi() { + return probable_visibility_mi; + } + + public void setProbable_visibility_mi(float visibility_mi) { + this.probable_visibility_mi = visibility_mi; + } + + public float getProbable_vert_vis_ft() { + return probable_vert_vis_ft; + } + + public void setProbable_vert_vis_ft(float vert_vis_ft) { + this.probable_vert_vis_ft = vert_vis_ft; + } + + public Integer getMax_temp_c() { + return max_temp_c; + } + + public void setMax_temp_c(Integer max_temp_c) { + this.max_temp_c = max_temp_c; + } + + public Integer getMin_temp_c() { + return min_temp_c; + } + + public void setMin_temp_c(Integer min_temp_c) { + this.min_temp_c = min_temp_c; + } + + public Integer getProbability() { + return probability; + } + + public void setProbability(Integer probability) { + this.probability = probability; + } + + /** + * @return the sequenceId + */ + public Integer getSequenceId() { + return sequenceId; + } + + /** + * @param sequenceId + * the sequenceId to set + */ + public void setSequenceId(Integer sequenceId) { + this.sequenceId = sequenceId; + } + + /** + * @return the remarks + */ + public String getRemarks() { + return remarks; + } + + /** + * @param remarks + * the remarks to set + */ + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getChange_indicator() { + return change_indicator; + } + + public void setChange_indicator(String change_indicator) { + this.change_indicator = change_indicator; + } + + public NcTafPeriod getTafValidPeriod() { + return tafValidPeriod; + } + + public void setTafValidPeriod(NcTafPeriod tafValidPeriod) { + this.tafValidPeriod = tafValidPeriod; + } + + public Set getTurbulence_layers() { + return turbulence_layers; + } + + public void setTurbulence_layers(Set turbulence_layers) { + this.turbulence_layers = turbulence_layers; + } + + /** + * @param add + * taf turbulence layer to set + */ + public void addTurbulence_layer(NcTafTurbulenceLayer turb) { + turbulence_layers.add(turb); + } + + public Set getIcing_layers() { + return icing_layers; + } + + public void setIcing_layers(Set icing_layers) { + this.icing_layers = icing_layers; + } + + /** + * @param add + * taf icing layer to set + */ + public void addIcing_layer(NcTafIcingLayer icng) { + icing_layers.add(icng); + } + + public Set getTemp_forecasts() { + return temp_forecasts; + } + + public void setTemp_forecasts(Set temp_forecasts) { + this.temp_forecasts = temp_forecasts; + } + + /** + * @param add + * taf temp forecast to set + */ + public void addTemp_forecast(NcTafTemperatureForecast tempFcst) { + temp_forecasts.add(tempFcst); + } + + public Set getWeather() { + return weather; + } + + public void setWeather(Set weather) { + this.weather = weather; + } + + /** + * @param add + * taf weather condition to set + */ + public void addWeather(NcTafWeatherCondition wthrCond) { + weather.add(wthrCond); + } + + public Set getProbable_weather() { + return probable_weather; + } + + public void setProbable_weather(Set weather) { + this.probable_weather = weather; + } + + /** + * @param add + * probable taf weather condition to set + */ + public void addProbable_weather(NcTafWeatherCondition wthrCond) { + probable_weather.add(wthrCond); + } + + public Set getSky_cover() { + return sky_cover; + } + + public void setSky_cover(Set sky_cover) { + this.sky_cover = sky_cover; + } + + /** + * @param add + * taf sky cover to set + */ + public void addSky_cover(NcTafSkyCover skyCvr) { + sky_cover.add(skyCvr); + } + + /** + * @param add + * probable taf sky cover to set + */ + public void addProbable_sky_cover(NcTafSkyCover skyCvr) { + probable_sky_cover.add(skyCvr); + } + + public Set getProbable_sky_cover() { + return probable_sky_cover; + } + + public void setProbable_sky_cover(Set sky_cover) { + this.probable_sky_cover = sky_cover; + } + + /** + * @return the theStartDate + */ + public Calendar getStartDate() { + return startDate; + } + + /** + * @param theStartDate + * the theStartDate to set + */ + public void setStartDate(Calendar start) { + startDate = start; + } + + /** + * @return the transitionEndDate + */ + public Calendar getTransitionEndDate() { + return transitionEndDate; + } + + /** + * @param transitionEndDate + * the transitionEndDate to set + */ + public void setTransitionEndDate(Calendar transitionEndDate) { + this.transitionEndDate = transitionEndDate; + } + + /** + * @return the theEndDate + */ + public Calendar getEndDate() { + return endDate; + } + + /** + * @param theEndDate + * the theEndDate to set + */ + public void setEndDate(Calendar end) { + endDate = end; + } + + public static String formatDate(Calendar dateTime) { + return String.format("%1$tY%1$tm%1$td%1$tH%1$tM%1$tS", dateTime); + } + + /** + * This method determines the ceiling value of a TAF. + */ + public static float getCeiling(Set skyCov, float vertVis) { + + // If a vertical visibility has been reported, the sky is obscured + // and the vertical visibility becomes the ceiling. + if ((vertVis >= 0) && (vertVis < 1e20f)) { + return vertVis; + } else { + // Otherwise, determine the ceiling value. + return findTafCeilingFromLayers(sortSkyCover(skyCov)); + } + } + + public static Set sortSkyCover(Set skySet) { + if (skySet != null) { + SortedSet skSet = new TreeSet(); + for (NcTafSkyCover sc : skySet) { + skSet.add(sc); + } + return skSet; + } else { + return new HashSet(); + } + } + + /** + * This method calculates a floating point number representing the ceiling. + * By definition, the ceiling is the lowest overcast or broken cloud layer, + * so the method looks for the lowest layer that matches a BKN or OVC + * condition, and returns that layer. + * + * @param skyCov + * -- the set of sky coverage data + * @return -- the ceiling + */ + public static float findTafCeilingFromLayers(Set skyCov) { + float ceiling = 1e20f; + // Find a ceiling in a TAF report. + try { + for (NcTafSkyCover sc : skyCov) { + if (sc.getType().equals("CLR") || sc.getType().equals("SKC")) { + ceiling = IDecoderConstantsN.NEGATIVE_FLOAT_MISSING; + break; + } else if ((sc.getType().equals("BKN")) + || (sc.getType().equals("OVC"))) { + if (sc.getHeight() != null) { + ceiling = sc.getHeight(); + break; + } + } + + } + } catch (RuntimeException e) { + // ignore cloud cover that is null + } + return ceiling >= 1e20f ? IDecoderConstantsN.NEGATIVE_FLOAT_MISSING + : ceiling; + } + + /** + * Constructs an array of NcTafRecord PDOs given one or more bulletin + * records. (The bulletin records each contain data from a whole bulletin, + * while each NcTafRecord is more fine-grained -- representing the values + * for a single NcTafChangeGroup of the entire bulletin [NcTafBulletin]). We + * do this "reshuffle" because the + * NcTafBulletin/NcTafChangeGroup/NcTafSkyCover (same for + * NcTafTemperatureForecase, NcTafTurbulenceLayer, NcTafSkyCover, + * NcTafWeatherCondition) hierarchy efficiently represents the original + * structure as parsed from the text, but we want the persistent PDO + * (NcTafRecord) to be optimized for efficient access. + * + * @param bulletin + * the bulletin record to split + * @return NcTafRecord[] the array of NcTafRecord PDOs + */ + public static NcTafRecord[] split(NcTafBulletinRecord bulletin) { + List records = new ArrayList(); + if (bulletin.getChangeGroups() != null) { + Iterator chgGrps = bulletin.getChangeGroups() + .iterator(); + if (chgGrps != null) { + while (chgGrps.hasNext()) { + + NcTafRecord tfr = new NcTafRecord(); + + NcTafChangeGroup chgGrp = chgGrps.next(); + + tfr.setPersistenceTime(new Date()); + + NcTafPeriod validPeriod = chgGrp.getTafChangePeriod(); + Calendar cStart = TimeTools + .copy(validPeriod.getStartDate()); + + TimeRange range = new TimeRange(cStart, + validPeriod.getEndDate()); + DataTime tafPeriod = new DataTime(cStart, range); + + tfr.setDataTime(tafPeriod); + + if (bulletin.getTafValidPeriod() != null) { + tfr.setTafValidPeriod(bulletin.getTafValidPeriod()); + } + + if (chgGrp.getTafChangePeriod() != null) { + tfr.setTafChangePeriod(chgGrp.getTafChangePeriod()); + } + + if (chgGrp.getTafChangePeriod().getEndDate() != null) { + tfr.setEndDate(chgGrp.getTafChangePeriod().getEndDate()); + } + + if (chgGrp.getTafChangePeriod().getStartDate() != null) { + tfr.setStartDate(chgGrp.getTafChangePeriod() + .getStartDate()); + } + + if (chgGrp.getTafChangePeriod().getTransitionEndDate() != null) { + tfr.setTransitionEndDate(chgGrp.getTafChangePeriod() + .getTransitionEndDate()); + } + + if (bulletin.getWmoHeader() != null) { + tfr.setWmoHeader(bulletin.getWmoHeader()); + } + + if (bulletin.getTafText() != null) { + tfr.setTafText(bulletin.getTafText()); + } + + if (bulletin.getReportType() != null) { + tfr.setReportType(bulletin.getReportType()); + } + + if (bulletin.getStationId() != null) { + tfr.setStationId(bulletin.getStationId()); + } + + if (bulletin.getCorIndicator() != null) { + tfr.setCorIndicator(bulletin.getCorIndicator()); + } else { + tfr.setCorIndicator(""); + } + + if (bulletin.getAmdIndicator() != null) { + tfr.setAmdIndicator(bulletin.getAmdIndicator()); + } else { + tfr.setAmdIndicator(""); + } + + if (bulletin.getIssue_time() != null) { + tfr.setIssue_time(bulletin.getIssue_time()); + } + + if (bulletin.getIssue_timeString() != null) { + tfr.setIssue_timeString(bulletin.getIssue_timeString()); + } + + if (bulletin.getBulletin_time() != null) { + tfr.setBulletin_time(bulletin.getBulletin_time()); + } + + if (bulletin.getLocation() != null) { + tfr.setLocation(bulletin.getLocation()); + } + + if (chgGrp.getChange_indicator() != null) { + tfr.setChange_indicator(chgGrp.getChange_indicator()); + } + + if (chgGrp.getChangeGroup() != null) { + tfr.setChangeGroup(chgGrp.getChangeGroup()); + } + + if (chgGrp.getProbability() != null) { + tfr.setProbability(chgGrp.getProbability()); + } + + if (chgGrp.getMax_temp_c() != null) { + tfr.setMax_temp_c(chgGrp.getMax_temp_c()); + } + + if (chgGrp.getMin_temp_c() != null) { + tfr.setMin_temp_c(chgGrp.getMin_temp_c()); + } + + if ((chgGrp.getAltim_in_hg() != null) + && (chgGrp.getAltim_in_hg().trim().length() > 0)) { + tfr.setAltim_in_hg(Float.parseFloat(chgGrp + .getAltim_in_hg())); + } else { + tfr.setAltim_in_hg(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getRemarks() != null) { + tfr.setRemarks(chgGrp.getRemarks()); + } + + if (chgGrp.getSequenceId() != null) { + tfr.setSequenceId(chgGrp.getSequenceId()); + } + + VisibilityParser parser = new VisibilityParser(); + if ((chgGrp.getVisibility_mi() != null) + && parser.decode(chgGrp.getVisibility_mi() + "SM")) { + float val = (float) parser.getPrevail_vsbySM(); + tfr.setVisibility_mi(val); + } else { + tfr.setVisibility_mi(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if ((chgGrp.getVert_vis_ft() != null) + && (chgGrp.getVert_vis_ft().trim().length() > 0)) { + tfr.setVert_vis_ft(Float.parseFloat(chgGrp + .getVert_vis_ft())); + } else { + tfr.setVert_vis_ft(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if ((chgGrp.getWind_dir_degrees() != null) + && !chgGrp.getWind_dir_degrees().equalsIgnoreCase( + "VRB")) { + tfr.setWind_dir_degrees(Float.parseFloat(chgGrp + .getWind_dir_degrees())); + } else { + tfr.setWind_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getWind_gust_kt() != null) { + tfr.setWind_gust_kt(new Float(chgGrp.getWind_gust_kt())); + } else { + tfr.setWind_gust_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getWind_speed_kt() != null) { + tfr.setWind_speed_kt(new Float(chgGrp + .getWind_speed_kt())); + } else { + tfr.setWind_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getWind_shear_dir_degrees() != null) { + tfr.setWind_shear_dir_degrees(new Float(chgGrp + .getWind_shear_dir_degrees())); + } else { + tfr.setWind_shear_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getWind_shear_speed_kt() != null) { + tfr.setWind_shear_speed_kt(new Float(chgGrp + .getWind_shear_speed_kt())); + } else { + tfr.setWind_shear_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getWind_shear_hgt_ft_agl() != null) { + tfr.setWind_shear_hgt_ft_agl(new Float(chgGrp + .getWind_shear_hgt_ft_agl())); + } else { + tfr.setWind_shear_hgt_ft_agl(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if ((chgGrp.getProbable_visibility_mi() != null) + && parser.decode(chgGrp.getProbable_visibility_mi() + + "SM")) { + float val = (float) parser.getPrevail_vsbySM(); + tfr.setProbable_visibility_mi(val); + } else { + tfr.setProbable_visibility_mi(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if ((chgGrp.getProbable_vert_vis_ft() != null) + && (chgGrp.getProbable_vert_vis_ft().trim() + .length() > 0)) { + tfr.setProbable_vert_vis_ft(Float.parseFloat(chgGrp + .getProbable_vert_vis_ft())); + } else { + tfr.setProbable_vert_vis_ft(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if ((chgGrp.getProbable_wind_dir_degrees() != null) + && !chgGrp.getProbable_wind_dir_degrees() + .equalsIgnoreCase("VRB")) { + tfr.setProbable_wind_dir_degrees(Float + .parseFloat(chgGrp + .getProbable_wind_dir_degrees())); + } else { + tfr.setProbable_wind_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getProbable_wind_gust_kt() != null) { + tfr.setProbable_wind_gust_kt(new Float(chgGrp + .getProbable_wind_gust_kt())); + } else { + tfr.setProbable_wind_gust_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getProbable_wind_speed_kt() != null) { + tfr.setProbable_wind_speed_kt(new Float(chgGrp + .getProbable_wind_speed_kt())); + } else { + tfr.setProbable_wind_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getProbable_wind_shear_dir_degrees() != null) { + tfr.setProbable_wind_speed_kt(new Float(chgGrp + .getProbable_wind_shear_dir_degrees())); + } else { + tfr.setWind_shear_dir_degrees(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getProbable_wind_shear_speed_kt() != null) { + tfr.setWind_shear_speed_kt(new Float(chgGrp + .getProbable_wind_shear_speed_kt())); + } else { + tfr.setWind_shear_speed_kt(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getProbable_wind_shear_hgt_ft_agl() != null) { + tfr.setProbable_wind_shear_hgt_ft_agl(new Float(chgGrp + .getProbable_wind_shear_hgt_ft_agl())); + } else { + tfr.setProbable_wind_shear_hgt_ft_agl(IDecoderConstantsN.NEGATIVE_FLOAT_MISSING); + } + + if (chgGrp.getIcing_layers() != null) { + tfr.setIcing_layers(chgGrp.getIcing_layers()); + } + + if (chgGrp.getSky_cover() != null) { + tfr.setSky_cover(chgGrp.getSky_cover()); + } + + if (chgGrp.getProbable_sky_cover() != null) { + tfr.setProbable_sky_cover(chgGrp + .getProbable_sky_cover()); + } + + if (chgGrp.getTemp_forecasts() != null) { + tfr.setTemp_forecasts(chgGrp.getTemp_forecasts()); + } + + if (chgGrp.getTurbulence_layers() != null) { + tfr.setTurbulence_layers(chgGrp.getTurbulence_layers()); + } + + if (chgGrp.getWeather() != null) { + tfr.setWeather(chgGrp.getWeather()); + } + + records.add(tfr); + } + + } + } + + List hourlyRecords = splitToHourlyRecords(records); + + return hourlyRecords.toArray(new NcTafRecord[0]); + } + + public static List splitToHourlyRecords( + List records) { + List newRecords = new ArrayList(); + int recordsSize = (records != null) ? records.size() : 0; + + if (recordsSize > 0) { + + for (int i = 0; i < recordsSize; i++) { + + NcTafRecord record = records.get(i); + + Calendar startRefTime = record.getStartDate(); + Calendar endRefTime = record.getEndDate(); + + // add 1 minute so that 12:30 becomes 12:31 and hence is rounded + // to 13:00 and not 12:00 + startRefTime.add(Calendar.MINUTE, 1); + Date nearestHour = DateUtils.round(startRefTime.getTime(), + Calendar.HOUR); + startRefTime.setTime(nearestHour); + + nearestHour = DateUtils.round(endRefTime.getTime(), + Calendar.HOUR); + endRefTime.setTime(nearestHour); + + long milliseconds1 = startRefTime.getTimeInMillis(); + long milliseconds2 = endRefTime.getTimeInMillis(); + long diff = milliseconds2 - milliseconds1; + long diffHours = diff / (60 * 60 * 1000); + + for (int hour = 0; hour < diffHours; hour++) { + + NcTafRecord tfr = new NcTafRecord(); + + tfr.setPersistenceTime(new Date()); + tfr.setDataTime(new DataTime(startRefTime)); + tfr.setTafValidPeriod(record.getTafValidPeriod()); + tfr.setTafChangePeriod(record.getTafChangePeriod()); + tfr.setEndDate(record.getTafChangePeriod().getEndDate()); + tfr.setStartDate(record.getTafChangePeriod().getStartDate()); + tfr.setTransitionEndDate(record.getTafChangePeriod() + .getTransitionEndDate()); + tfr.setWmoHeader(record.getWmoHeader()); + if ((record.getTafText() != null) + && (record.getTafText().length() > 1024)) { + tfr.setTafText(record.getTafText().substring(0, 1024)); + } else { + tfr.setTafText(record.getTafText()); + } + tfr.setTafText(record.getTafText()); + tfr.setReportType(record.getReportType()); + tfr.setStationId(record.getStationId()); + tfr.setCorIndicator(record.getCorIndicator()); + tfr.setAmdIndicator(record.getAmdIndicator()); + tfr.setIssue_time(record.getIssue_time()); + tfr.setIssue_timeString(record.getIssue_timeString()); + tfr.setBulletin_time(record.getBulletin_time()); + tfr.setLocation(record.getLocation()); + tfr.setChange_indicator(record.getChange_indicator()); + if ((record.getChangeGroup() != null) + && (record.getChangeGroup().length() > 128)) { + tfr.setChangeGroup(record.getChangeGroup().substring(0, + 128)); + } else { + tfr.setChangeGroup(record.getChangeGroup()); + } + tfr.setChangeGroup(record.getChangeGroup()); + tfr.setProbability(record.getProbability()); + tfr.setMax_temp_c(record.getMax_temp_c()); + tfr.setMin_temp_c(record.getMin_temp_c()); + tfr.setAltim_in_hg(record.getAltim_in_hg()); + tfr.setRemarks(record.getRemarks()); + tfr.setSequenceId(record.getSequenceId()); + tfr.setVisibility_mi(record.getVisibility_mi()); + tfr.setVert_vis_ft(record.getVert_vis_ft()); + tfr.setWind_dir_degrees(record.getWind_dir_degrees()); + tfr.setWind_gust_kt(record.getWind_gust_kt()); + tfr.setWind_speed_kt(record.getWind_speed_kt()); + tfr.setWind_shear_dir_degrees(record + .getWind_shear_dir_degrees()); + tfr.setWind_shear_speed_kt(record.getWind_shear_speed_kt()); + tfr.setWind_shear_hgt_ft_agl(record + .getWind_shear_hgt_ft_agl()); + tfr.setProbable_visibility_mi(record + .getProbable_visibility_mi()); + tfr.setProbable_vert_vis_ft(record + .getProbable_vert_vis_ft()); + tfr.setProbable_wind_dir_degrees(record + .getProbable_wind_dir_degrees()); + tfr.setProbable_wind_gust_kt(record + .getProbable_wind_gust_kt()); + tfr.setProbable_wind_speed_kt(record + .getProbable_wind_speed_kt()); + tfr.setWind_shear_dir_degrees(record + .getProbable_wind_shear_dir_degrees()); + tfr.setWind_shear_speed_kt(record + .getProbable_wind_shear_speed_kt()); + tfr.setProbable_wind_shear_hgt_ft_agl(record + .getProbable_wind_shear_hgt_ft_agl()); + tfr.setIcing_layers(record.getIcing_layers()); + tfr.setSky_cover(record.getSky_cover()); + tfr.setProbable_sky_cover(record.getProbable_sky_cover()); + tfr.setTemp_forecasts(record.getTemp_forecasts()); + tfr.setTurbulence_layers(record.getTurbulence_layers()); + tfr.setWeather(record.getWeather()); + tfr.setProbable_weather(record.getWeather()); + newRecords.add(tfr); + startRefTime.add(Calendar.HOUR_OF_DAY, 1); + } + } + } + + return newRecords; + } @Override @Column @@ -1619,65 +1645,69 @@ public class NcTafRecord extends PluginDataObject implements ISpatialEnabled, return super.getDataURI(); } - /** - * - * @param args - */ - public static final void main(String[] args) { + /** + * + * @param args + */ + public static final void main(String[] args) { - Set skyCovers = new HashSet(); + Set skyCovers = new HashSet(); - NcTafSkyCover cover = new NcTafSkyCover(); - cover.setGenus(""); - cover.setType("OVC"); - cover.setHeight(1800); - skyCovers.add(cover); + NcTafSkyCover cover = new NcTafSkyCover(); + cover.setGenus(""); + cover.setType("OVC"); + cover.setHeight(1800); + skyCovers.add(cover); - cover = new NcTafSkyCover(); - cover.setGenus(""); - cover.setType("BKN"); - cover.setHeight(1000); - skyCovers.add(cover); + cover = new NcTafSkyCover(); + cover.setGenus(""); + cover.setType("BKN"); + cover.setHeight(1000); + skyCovers.add(cover); - cover = new NcTafSkyCover(); - cover.setGenus(""); - cover.setType("SCT"); - cover.setHeight(800); - skyCovers.add(cover); + cover = new NcTafSkyCover(); + cover.setGenus(""); + cover.setType("SCT"); + cover.setHeight(800); + skyCovers.add(cover); - for (NcTafSkyCover s : skyCovers) { - System.out.println(s); - } + for (NcTafSkyCover s : skyCovers) { + System.out.println(s); + } - System.out.println(getCeiling(skyCovers, 8)); + System.out.println(getCeiling(skyCovers, 8)); - System.out.println(getCeiling(skyCovers, -1)); + System.out.println(getCeiling(skyCovers, -1)); - Calendar startRefTime = Calendar.getInstance(); - startRefTime.set(2011, 11, 04, 12, 30); - startRefTime.add(Calendar.MINUTE, 1); - Calendar endRefTime = Calendar.getInstance(); - endRefTime.set(2011, 11, 04, 14, 30); + Calendar startRefTime = Calendar.getInstance(); + startRefTime.set(2011, 11, 04, 12, 30); + startRefTime.add(Calendar.MINUTE, 1); + Calendar endRefTime = Calendar.getInstance(); + endRefTime.set(2011, 11, 04, 14, 30); - Date nearestHour = DateUtils.round(startRefTime.getTime(), - Calendar.HOUR); - startRefTime.setTime(nearestHour); + Date nearestHour = DateUtils.round(startRefTime.getTime(), + Calendar.HOUR); + startRefTime.setTime(nearestHour); - nearestHour = DateUtils.round(endRefTime.getTime(), Calendar.HOUR); - endRefTime.setTime(nearestHour); + nearestHour = DateUtils.round(endRefTime.getTime(), Calendar.HOUR); + endRefTime.setTime(nearestHour); - long milliseconds1 = startRefTime.getTimeInMillis(); - long milliseconds2 = endRefTime.getTimeInMillis(); - long diff = milliseconds2 - milliseconds1; - long diffHours = diff / (60 * 60 * 1000); + long milliseconds1 = startRefTime.getTimeInMillis(); + long milliseconds2 = endRefTime.getTimeInMillis(); + long diff = milliseconds2 - milliseconds1; + long diffHours = diff / (60 * 60 * 1000); - System.out.println(" diffHours = " + diffHours); + System.out.println(" diffHours = " + diffHours); - for (int hour = 0; hour < diffHours; hour++) { - System.out.println(" startRefTime = " - + startRefTime.getTime().toString()); - startRefTime.add(Calendar.HOUR_OF_DAY, 1); - } - } + for (int hour = 0; hour < diffHours; hour++) { + System.out.println(" startRefTime = " + + startRefTime.getTime().toString()); + startRefTime.add(Calendar.HOUR_OF_DAY, 1); + } + } + @Override + public String getPluginName() { + return "nctaf"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/src/gov/noaa/nws/ncep/common/dataplugin/ncuair/NcUairRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/src/gov/noaa/nws/ncep/common/dataplugin/ncuair/NcUairRecord.java index 27ba1eddb6..6a023c45eb 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/src/gov/noaa/nws/ncep/common/dataplugin/ncuair/NcUairRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/src/gov/noaa/nws/ncep/common/dataplugin/ncuair/NcUairRecord.java @@ -67,504 +67,501 @@ import com.vividsolutions.jts.geom.Geometry; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ncuair", - indexes = { - @Index(name = "ncuair_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ncuair", indexes = { @Index(name = "ncuair_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class NcUairRecord extends PersistablePluginDataObject implements - ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { - - private static final long serialVersionUID = 1L; - public static final String PLUGIN_NAME = "ncuair"; - - // Time of the UTC - @DataURI(position = 4) - @Column - @DynamicSerializeElement - private int UTC; - - // The observation report type. - @DataURI(position = 1) - @Column - @DynamicSerializeElement - private String reportType; - - // Issue time for the bulletin - @Column - @DynamicSerializeElement - private Calendar issueTime; - - // Observation time for the bulletin - @Column - @DynamicSerializeElement - private Calendar obsTime; - - // Synoptic time for the bulletin - // Time of the observation to the nearest hour. - @Column - @DynamicSerializeElement - private Calendar synopticTime; - - // Type of data such as TTAA/BB/CC/DD or PP... - @DataURI(position = 3) - @Column - @DynamicSerializeElement - private String dataType; - - // Correction indicator from wmo header - @DataURI(position = 5) - @Column - @DynamicSerializeElement - private String corr; - - // Text of the WMO header - @Column - @DynamicSerializeElement - private String wmoHeader; - - // Station number - // @DataURI(position = 2) - @Column - @DynamicSerializeElement - private String stnum; - - @Embedded - @DataURI(position = 2, embedded = true) - @XmlElement - @DynamicSerializeElement - private SurfaceObsLocation location; - - // Yes if report is a NIL. - @Column - @DynamicSerializeElement - private Boolean nil; - - // bulletin message - @Transient - @DynamicSerializeElement - private String bullMessage; - - /** - * Uair observation levels - */ - @DynamicSerializeElement - @Transient - private Set obsLevels = new HashSet(); - - /** - * Uair tropopause data - */ - @DynamicSerializeElement - @Transient - private Set tropopause = new HashSet(); - - /** - * Uair maxwind data - */ - @DynamicSerializeElement - @Transient - private Set maxwind = new HashSet(); - - /** - * Uair lifted index data - */ - @DynamicSerializeElement - @Transient - private Set liftedindex = new HashSet(); - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - /** - * Empty constructor. - */ - public NcUairRecord() { - this.nil = false; - this.stnum = ""; - this.wmoHeader = ""; - // this.stid=""; - this.corr = ""; - this.dataType = ""; - } - - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - * @param tableDef - * The table definitions for this class. - */ - public NcUairRecord(String uri) { - super(uri); - if (location != null) { - String staId = location.getStationId(); - location.setStationId("null".equals(staId) ? null : staId); - } - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * Get the report correction indicator. - * - * @return The corr - */ - public String getCorr() { - return corr; - } - - /** - * Set the report correction indicator. - * - * @param corr - * The corr. - */ - public void setCorr(String corr) { - this.corr = corr; - } - - /** - * Get the observation report type. - * - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * Set the observation report type. - * - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - public String getStnum() { - return stnum; - } - - public void setStnum(String stnum) { - this.stnum = stnum; - } - - /* - * Get this observation's geometry. - * - * @return The geometry for this observation. - */ - public Geometry getGeometry() { - return location.getGeometry(); - } - - /** - * Get the geometry latitude. - * - * @return The geometry latitude. - */ - public double getLatitude() { - return location.getLatitude(); - } - - /** - * Get the geometry longitude. - * - * @return The geometry longitude. - */ - public double getLongitude() { - return location.getLongitude(); - } - - /** - * Get the station identifier for this observation. - * - * @return the stationId - */ - public String getStationId() { - return location.getStationId(); - } - - /** - * Get the elevation, in meters, of the observing platform or location. - * - * @return The observation elevation, in meters. - */ - public Integer getElevation() { - return location.getElevation(); - } - - /** - * Get whether the location for this observation is defined. - * - * @return Is this location defined. - */ - public Boolean getLocationDefined() { - return location.getLocationDefined(); - } - - public Calendar getObsTime() { - return obsTime; - } - - public void setObsTime(Calendar obsTime) { - this.obsTime = obsTime; - } - - public Calendar getSynopticTime() { - return synopticTime; - } - - public void setSynopticTime(Calendar synopticTime) { - this.synopticTime = synopticTime; - } - - public String getBullMessage() { - return bullMessage; - } - - public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; - } - - public Calendar getIssueTime() { - return issueTime; - } - - public void setIssueTime(Calendar issueTime) { - this.issueTime = issueTime; - } - - public String getDataType() { - return dataType; - } - - public void setDataType(String dataType) { - this.dataType = dataType; - } - - public int getUTC() { - return UTC; - } - - public void setUTC(int utc) { - UTC = utc; - } - - public Boolean getNil() { - return nil; - } - - public void setNil(Boolean nil) { - this.nil = nil; - } - - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } - - /** - * @return the set of uair observation levels - */ - public Set getObsLevels() { - return obsLevels; - } - - /** - * @param uair - * observation levels to set - */ - public void setObsLevels(Set uairLevel) { - this.obsLevels = uairLevel; - } - - /** - * @param add - * uair observation levels to set - */ - public void addObsLevels(NcUairObsLevels plevel) { - obsLevels.add(plevel); - // plevel.setParentID(this); - } - - /** - * @return the set of uair observation levels - */ - public Set getTropopause() { - return tropopause; - } - - /** - * @param uair - * observation levels to set - */ - public void setTropopause(Set trop) { - this.tropopause = trop; - } - - /** - * @param add - * uair observation levels to set - */ - public void addTropopause(NcUairTropopause trop) { - tropopause.add(trop); - // trop.setParentID(this); - } - - /** - * @return the set of uair maximum wind - */ - public Set getMaxWind() { - return maxwind; - } - - /** - * @param uair - * maximum wind to set - */ - public void setMaxWind(Set mwind) { - this.maxwind = mwind; - } - - /** - * @param add - * uair maximum wind to set - */ - public void addMaxWind(NcUairMaxWind mwind) { - maxwind.add(mwind); - // mwind.setParentID(this); - } - - /** - * @return the set of uair lifted index - */ - public Set getLiftedIndex() { - return liftedindex; - } - - /** - * @param uair - * lifted index to set - */ - public void setLiftedIndex(Set li) { - this.liftedindex = li; - } - - /** - * @param add - * uair lifted index to set - */ - public void addLiftedIndex(NcUairLiftedIndex li) { - liftedindex.add(li); - // li.setParentID(this); - } - - /** - * Override existing set method to modify any classes that use the dataURI - * as a foreign key - */ - @Override - public void setIdentifier(Object dataURI) { - - this.identifier = dataURI; - - } - - @Override - public SurfaceObsLocation getSpatialObject() { - return location; - } - - public SurfaceObsLocation getLocation() { - if (location == null) { - location = new SurfaceObsLocation(); - } - return location; - } - - public void setLocation(SurfaceObsLocation location) { - this.location = location; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() - */ - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon - * .uf.common.pointdata.PointDataView) - */ - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } - - @Override - public Date getPersistenceTime() { - // return this.dataTime.getRefTime(); - return null; - } - - @Override - public void setPersistenceTime(Date persistTime) { - // TODO Auto-generated method stub - - } - - @Override - public Amount getValue(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Collection getValues(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String getString(String paramName) { - // TODO Auto-generated method stub - return null; - } - - @Override - public String[] getStrings(String paramName) { - // TODO Auto-generated method stub - return null; - } + ISpatialEnabled, IDecoderGettable, IPointData, IPersistable { + + private static final long serialVersionUID = 1L; + + public static final String PLUGIN_NAME = "ncuair"; + + // Time of the UTC + @DataURI(position = 4) + @Column + @DynamicSerializeElement + private int UTC; + + // The observation report type. + @DataURI(position = 1) + @Column + @DynamicSerializeElement + private String reportType; + + // Issue time for the bulletin + @Column + @DynamicSerializeElement + private Calendar issueTime; + + // Observation time for the bulletin + @Column + @DynamicSerializeElement + private Calendar obsTime; + + // Synoptic time for the bulletin + // Time of the observation to the nearest hour. + @Column + @DynamicSerializeElement + private Calendar synopticTime; + + // Type of data such as TTAA/BB/CC/DD or PP... + @DataURI(position = 3) + @Column + @DynamicSerializeElement + private String dataType; + + // Correction indicator from wmo header + @DataURI(position = 5) + @Column + @DynamicSerializeElement + private String corr; + + // Text of the WMO header + @Column + @DynamicSerializeElement + private String wmoHeader; + + // Station number + // @DataURI(position = 2) + @Column + @DynamicSerializeElement + private String stnum; + + @Embedded + @DataURI(position = 2, embedded = true) + @XmlElement + @DynamicSerializeElement + private SurfaceObsLocation location; + + // Yes if report is a NIL. + @Column + @DynamicSerializeElement + private Boolean nil; + + // bulletin message + @Transient + @DynamicSerializeElement + private String bullMessage; + + /** + * Uair observation levels + */ + @DynamicSerializeElement + @Transient + private Set obsLevels = new HashSet(); + + /** + * Uair tropopause data + */ + @DynamicSerializeElement + @Transient + private Set tropopause = new HashSet(); + + /** + * Uair maxwind data + */ + @DynamicSerializeElement + @Transient + private Set maxwind = new HashSet(); + + /** + * Uair lifted index data + */ + @DynamicSerializeElement + @Transient + private Set liftedindex = new HashSet(); + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + /** + * Empty constructor. + */ + public NcUairRecord() { + this.nil = false; + this.stnum = ""; + this.wmoHeader = ""; + // this.stid=""; + this.corr = ""; + this.dataType = ""; + } + + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + * @param tableDef + * The table definitions for this class. + */ + public NcUairRecord(String uri) { + super(uri); + if (location != null) { + String staId = location.getStationId(); + location.setStationId("null".equals(staId) ? null : staId); + } + } + + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * Get the report correction indicator. + * + * @return The corr + */ + public String getCorr() { + return corr; + } + + /** + * Set the report correction indicator. + * + * @param corr + * The corr. + */ + public void setCorr(String corr) { + this.corr = corr; + } + + /** + * Get the observation report type. + * + * @return the reportType + */ + public String getReportType() { + return reportType; + } + + /** + * Set the observation report type. + * + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + public String getStnum() { + return stnum; + } + + public void setStnum(String stnum) { + this.stnum = stnum; + } + + /* + * Get this observation's geometry. + * + * @return The geometry for this observation. + */ + public Geometry getGeometry() { + return location.getGeometry(); + } + + /** + * Get the geometry latitude. + * + * @return The geometry latitude. + */ + public double getLatitude() { + return location.getLatitude(); + } + + /** + * Get the geometry longitude. + * + * @return The geometry longitude. + */ + public double getLongitude() { + return location.getLongitude(); + } + + /** + * Get the station identifier for this observation. + * + * @return the stationId + */ + public String getStationId() { + return location.getStationId(); + } + + /** + * Get the elevation, in meters, of the observing platform or location. + * + * @return The observation elevation, in meters. + */ + public Integer getElevation() { + return location.getElevation(); + } + + /** + * Get whether the location for this observation is defined. + * + * @return Is this location defined. + */ + public Boolean getLocationDefined() { + return location.getLocationDefined(); + } + + public Calendar getObsTime() { + return obsTime; + } + + public void setObsTime(Calendar obsTime) { + this.obsTime = obsTime; + } + + public Calendar getSynopticTime() { + return synopticTime; + } + + public void setSynopticTime(Calendar synopticTime) { + this.synopticTime = synopticTime; + } + + public String getBullMessage() { + return bullMessage; + } + + public void setBullMessage(String bullMessage) { + this.bullMessage = bullMessage; + } + + public Calendar getIssueTime() { + return issueTime; + } + + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public int getUTC() { + return UTC; + } + + public void setUTC(int utc) { + UTC = utc; + } + + public Boolean getNil() { + return nil; + } + + public void setNil(Boolean nil) { + this.nil = nil; + } + + @Override + public IDecoderGettable getDecoderGettable() { + // TODO Auto-generated method stub + return null; + } + + /** + * @return the set of uair observation levels + */ + public Set getObsLevels() { + return obsLevels; + } + + /** + * @param uair + * observation levels to set + */ + public void setObsLevels(Set uairLevel) { + this.obsLevels = uairLevel; + } + + /** + * @param add + * uair observation levels to set + */ + public void addObsLevels(NcUairObsLevels plevel) { + obsLevels.add(plevel); + // plevel.setParentID(this); + } + + /** + * @return the set of uair observation levels + */ + public Set getTropopause() { + return tropopause; + } + + /** + * @param uair + * observation levels to set + */ + public void setTropopause(Set trop) { + this.tropopause = trop; + } + + /** + * @param add + * uair observation levels to set + */ + public void addTropopause(NcUairTropopause trop) { + tropopause.add(trop); + // trop.setParentID(this); + } + + /** + * @return the set of uair maximum wind + */ + public Set getMaxWind() { + return maxwind; + } + + /** + * @param uair + * maximum wind to set + */ + public void setMaxWind(Set mwind) { + this.maxwind = mwind; + } + + /** + * @param add + * uair maximum wind to set + */ + public void addMaxWind(NcUairMaxWind mwind) { + maxwind.add(mwind); + // mwind.setParentID(this); + } + + /** + * @return the set of uair lifted index + */ + public Set getLiftedIndex() { + return liftedindex; + } + + /** + * @param uair + * lifted index to set + */ + public void setLiftedIndex(Set li) { + this.liftedindex = li; + } + + /** + * @param add + * uair lifted index to set + */ + public void addLiftedIndex(NcUairLiftedIndex li) { + liftedindex.add(li); + // li.setParentID(this); + } + + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + + this.identifier = dataURI; + + } + + @Override + public SurfaceObsLocation getSpatialObject() { + return location; + } + + public SurfaceObsLocation getLocation() { + if (location == null) { + location = new SurfaceObsLocation(); + } + return location; + } + + public void setLocation(SurfaceObsLocation location) { + this.location = location; + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.common.pointdata.IPointData#getPointDataView() + */ + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.common.pointdata.IPointData#setPointDataView(com.raytheon + * .uf.common.pointdata.PointDataView) + */ + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } + + @Override + public Date getPersistenceTime() { + // return this.dataTime.getRefTime(); + return null; + } + + @Override + public void setPersistenceTime(Date persistTime) { + // TODO Auto-generated method stub + + } + + @Override + public Amount getValue(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Collection getValues(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getString(String paramName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String[] getStrings(String paramName) { + // TODO Auto-generated method stub + return null; + } @Override @Column @@ -573,4 +570,8 @@ public class NcUairRecord extends PersistablePluginDataObject implements return super.getDataURI(); } + @Override + public String getPluginName() { + return "ncuair"; + } } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java index c08cd7a97d..ffd2bd171c 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java @@ -52,512 +52,484 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "nonconvsigmet", - indexes = { - @Index(name = "nonconvsigmet_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "nonconvsigmet", indexes = { @Index(name = "nonconvsigmet_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize +public class NonConvSigmetRecord extends PluginDataObject { - -public class NonConvSigmetRecord extends PluginDataObject{ - - /** + /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - // reportType is "non-convective sigmet". - @Column(length=32) - @DataURI(position=5) - @DynamicSerializeElement - private String reportType; - - // WMO header - @Column(length=32) - @DynamicSerializeElement - private String wmoHeader; - - // forecastRegion as: SL - @Column(length=8) - @DataURI(position=2) - @DynamicSerializeElement - private String forecastRegion; - - // The issue office where the report from - @Column(length=32) - @DataURI(position=1) - @DynamicSerializeElement - private String issueOffice; - - // Issue time of the report - @Column - @DataURI(position=3) - @DynamicSerializeElement - private Calendar issueTime; - - // The designator - @Column(length=8) - @DynamicSerializeElement - private String designatorBBB; - - // CorrectionFlag is a flag with values (1 or 2 or 3) - @Column(length=8) + // reportType is "non-convective sigmet". + @Column(length = 32) + @DataURI(position = 5) @DynamicSerializeElement - private String correctionRemarks; - - // The awipsId from the report - @Column(length=32) - @DataURI(position=4) - @DynamicSerializeElement - private String awipsId; - - // The state list from the report - @Column(length=256) - @DynamicSerializeElement - private String stateList; - - // Start time of the report - @Column - @DynamicSerializeElement - private Calendar startTime; - - // End time of the report - @Column - @DynamicSerializeElement - private Calendar endTime; - - // The type of the hazard from the report - @Column(length=16) - @DynamicSerializeElement - private String hazardType; - - // The intensity of the hazard from the report - @Column(length=64) - @DynamicSerializeElement - private String hazardIntensity; - - // The cause for the hazard from the report - @Column(length=128) - @DynamicSerializeElement - private String hazardCause; - - // The conditions stated about the hazard from the report - @Column(length=128) - @DynamicSerializeElement - private String hazardCondition; - - // The lower flight level from the report - @Column - @DynamicSerializeElement - private int flightLevel1; - - // The upper flight level from the report - @Column - @DynamicSerializeElement - private int flightLevel2; - - // The sigmet Identifier from the report - @Column(length=32) - @DynamicSerializeElement - private String sigmetId; - - // The entire report - @Column(length=3000) - @DynamicSerializeElement - private String bullMessage; + private String reportType; - - /** - * Convsigmet location - */ - @DynamicSerializeElement - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + // WMO header + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; + + // forecastRegion as: SL + @Column(length = 8) + @DataURI(position = 2) + @DynamicSerializeElement + private String forecastRegion; + + // The issue office where the report from + @Column(length = 32) + @DataURI(position = 1) + @DynamicSerializeElement + private String issueOffice; + + // Issue time of the report + @Column + @DataURI(position = 3) + @DynamicSerializeElement + private Calendar issueTime; + + // The designator + @Column(length = 8) + @DynamicSerializeElement + private String designatorBBB; + + // CorrectionFlag is a flag with values (1 or 2 or 3) + @Column(length = 8) + @DynamicSerializeElement + private String correctionRemarks; + + // The awipsId from the report + @Column(length = 32) + @DataURI(position = 4) + @DynamicSerializeElement + private String awipsId; + + // The state list from the report + @Column(length = 256) + @DynamicSerializeElement + private String stateList; + + // Start time of the report + @Column + @DynamicSerializeElement + private Calendar startTime; + + // End time of the report + @Column + @DynamicSerializeElement + private Calendar endTime; + + // The type of the hazard from the report + @Column(length = 16) + @DynamicSerializeElement + private String hazardType; + + // The intensity of the hazard from the report + @Column(length = 64) + @DynamicSerializeElement + private String hazardIntensity; + + // The cause for the hazard from the report + @Column(length = 128) + @DynamicSerializeElement + private String hazardCause; + + // The conditions stated about the hazard from the report + @Column(length = 128) + @DynamicSerializeElement + private String hazardCondition; + + // The lower flight level from the report + @Column + @DynamicSerializeElement + private int flightLevel1; + + // The upper flight level from the report + @Column + @DynamicSerializeElement + private int flightLevel2; + + // The sigmet Identifier from the report + @Column(length = 32) + @DynamicSerializeElement + private String sigmetId; + + // The entire report + @Column(length = 3000) + @DynamicSerializeElement + private String bullMessage; + + /** + * Convsigmet location + */ + @DynamicSerializeElement + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "nonConvSigmetLocation_parentid_idex") - private Set nonConvSigmetLocation = new HashSet(); + private Set nonConvSigmetLocation = new HashSet(); - - /** + /** * Default Constructor */ public NonConvSigmetRecord() { - this.issueOffice =""; - this.wmoHeader =""; - this.bullMessage =""; - this.designatorBBB =""; - this.forecastRegion =""; - this.reportType =""; - this.correctionRemarks =""; - this.awipsId =""; - this.flightLevel1 =IDecoderConstantsN.INTEGER_MISSING; - this.flightLevel2 =IDecoderConstantsN.INTEGER_MISSING; - this.hazardCause =""; - this.hazardCondition =""; - this.hazardIntensity =""; - this.hazardType ="UNKNOWN"; - this.stateList =""; - this.sigmetId =""; + this.issueOffice = ""; + this.wmoHeader = ""; + this.bullMessage = ""; + this.designatorBBB = ""; + this.forecastRegion = ""; + this.reportType = ""; + this.correctionRemarks = ""; + this.awipsId = ""; + this.flightLevel1 = IDecoderConstantsN.INTEGER_MISSING; + this.flightLevel2 = IDecoderConstantsN.INTEGER_MISSING; + this.hazardCause = ""; + this.hazardCondition = ""; + this.hazardIntensity = ""; + this.hazardType = "UNKNOWN"; + this.stateList = ""; + this.sigmetId = ""; } /** * Convstructs a non-consigmet record from a dataURI * - * @param uri The dataURI + * @param uri + * The dataURI */ public NonConvSigmetRecord(String uri) { super(uri); } - - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } - - - /** - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - - /** - * @param reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - - /** - * @param wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - - /** - * @return the forecastRegion - */ - public String getForecastRegion() { - return forecastRegion; - } - - - /** - * @param forecastRegion to set - */ - public void setForecastRegion(String forecastRegion) { - this.forecastRegion = forecastRegion; - } - - - /** - * @return the issueOffice - */ - public String getIssueOffice() { - return issueOffice; - } - - - /** - * @param issueOffice to set - */ - public void setIssueOffice(String issueOffice) { - this.issueOffice = issueOffice; - } - - - /** - * @return the issueTime - */ - public Calendar getIssueTime() { - return issueTime; - } - - - /** - * @param issueTime to set - */ - public void setIssueTime(Calendar issueTime) { - this.issueTime = issueTime; - } - - - /** - * @return the designatorBBB - */ - public String getDesignatorBBB() { - return designatorBBB; - } - - - /** - * @param designatorBBB to set - */ - public void setDesignatorBBB(String designatorBBB) { - this.designatorBBB = designatorBBB; - } - - - /** - * @return the correctionFlag - */ - public String getCorrectionRemarks() { - return correctionRemarks; - } - - - /** - * @param correctionFlag to set - */ - public void setCorrectionRemarks(String correctionRemarks) { - this.correctionRemarks = correctionRemarks; - } - - - /** - * @return the awipsId - */ - public String getAwipsId() { - return awipsId; - } - - - /** - * @param awipsId to set - */ - public void setAwipsId(String awipsId) { - this.awipsId = awipsId; - } - - - /** - * @return the stateList - */ - public String getStateList() { - return stateList; - } - - - /** - * @param stateList to set - */ - public void setStateList(String stateList) { - this.stateList = stateList; - } - - - /** - * @return the startTime - */ - public Calendar getStartTime() { - return startTime; - } - - - /** - * @param startTime to set - */ - public void setStartTime(Calendar startTime) { - this.startTime = startTime; - } - - - /** - * @return the endTime - */ - public Calendar getEndTime() { - return endTime; - } - - - /** - * @param endTime to set - */ - public void setEndTime(Calendar endTime) { - this.endTime = endTime; - } - - - /** - * @return the hazardType - */ - public String getHazardType() { - return hazardType; - } - - - /** - * @param hazardType to set - */ - public void setHazardType(String hazardType) { - this.hazardType = hazardType; - } - - - /** - * @return the hazardIntensity - */ - public String getHazardIntensity() { - return hazardIntensity; - } - - - /** - * @param hazardIntensity to set - */ - public void setHazardIntensity(String hazardIntensity) { - this.hazardIntensity = hazardIntensity; - } + @Override + public IDecoderGettable getDecoderGettable() { + // TODO Auto-generated method stub + return null; + } /** - * @return the hazardCause - */ - public String getHazardCause() { - return hazardCause; - } - - - /** - * @param hazardCause to set - */ - public void setHazardCause(String hazardCause) { - this.hazardCause = hazardCause; - } - + * @return the reportType + */ + public String getReportType() { + return reportType; + } /** - * @return the hazardCondition - */ - public String getHazardCondition() { - return hazardCondition; - } - - - /** - * @param hazardCondition to set - */ - public void setHazardCondition(String hazardCondition) { - this.hazardCondition = hazardCondition; - } - + * @param reportType + * to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } /** - * @return the flightLevel1 - */ - public int getFlightLevel1() { - return flightLevel1; - } - - - /** - * @param flightLevel1 to set - */ - public void setFlightLevel1(int flightLevel1) { - this.flightLevel1 = flightLevel1; - } - + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } /** - * @return the flightLevel2 - */ - public int getFlightLevel2() { - return flightLevel2; - } - - - /** - * @param flightLevel2 to set - */ - public void setFlightLevel2(int flightLevel2) { - this.flightLevel2 = flightLevel2; - } - + * @param wmoHeader + * to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } /** - * @return the sigmetId - */ - public String getSigmetId() { - return sigmetId; - } - - - /** - * @param sigmetId to set - */ - public void setSigmetId(String sigmetId) { - this.sigmetId = sigmetId; - } - + * @return the forecastRegion + */ + public String getForecastRegion() { + return forecastRegion; + } /** - * @return the bullMessage - */ - public String getBullMessage() { - return bullMessage; - } + * @param forecastRegion + * to set + */ + public void setForecastRegion(String forecastRegion) { + this.forecastRegion = forecastRegion; + } + /** + * @return the issueOffice + */ + public String getIssueOffice() { + return issueOffice; + } - /** - * @param bullMessage to set - */ - public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; - } + /** + * @param issueOffice + * to set + */ + public void setIssueOffice(String issueOffice) { + this.issueOffice = issueOffice; + } + /** + * @return the issueTime + */ + public Calendar getIssueTime() { + return issueTime; + } - /** - * @return the set of nonconvective sigmet location - */ - public Set getNonConvSigmetLocation() { - return nonConvSigmetLocation; - } + /** + * @param issueTime + * to set + */ + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } - /** - * @param nonconvsigmet the location to set - */ - public void setNonConvSigmetLocation(Set nonConvLocation) { - this.nonConvSigmetLocation = nonConvLocation; - } + /** + * @return the designatorBBB + */ + public String getDesignatorBBB() { + return designatorBBB; + } - /** - * @param add conv Sigmet location to set - */ - public void addNonConvSigmetLocation(NonConvSigmetLocation pLocation){ - nonConvSigmetLocation.add(pLocation); - - } - - - /** - * Override existing set method to modify any - * classes that use the dataURI as a foreign key - */ - @Override - public void setIdentifier(Object dataURI) - { + /** + * @param designatorBBB + * to set + */ + public void setDesignatorBBB(String designatorBBB) { + this.designatorBBB = designatorBBB; + } + + /** + * @return the correctionFlag + */ + public String getCorrectionRemarks() { + return correctionRemarks; + } + + /** + * @param correctionFlag + * to set + */ + public void setCorrectionRemarks(String correctionRemarks) { + this.correctionRemarks = correctionRemarks; + } + + /** + * @return the awipsId + */ + public String getAwipsId() { + return awipsId; + } + + /** + * @param awipsId + * to set + */ + public void setAwipsId(String awipsId) { + this.awipsId = awipsId; + } + + /** + * @return the stateList + */ + public String getStateList() { + return stateList; + } + + /** + * @param stateList + * to set + */ + public void setStateList(String stateList) { + this.stateList = stateList; + } + + /** + * @return the startTime + */ + public Calendar getStartTime() { + return startTime; + } + + /** + * @param startTime + * to set + */ + public void setStartTime(Calendar startTime) { + this.startTime = startTime; + } + + /** + * @return the endTime + */ + public Calendar getEndTime() { + return endTime; + } + + /** + * @param endTime + * to set + */ + public void setEndTime(Calendar endTime) { + this.endTime = endTime; + } + + /** + * @return the hazardType + */ + public String getHazardType() { + return hazardType; + } + + /** + * @param hazardType + * to set + */ + public void setHazardType(String hazardType) { + this.hazardType = hazardType; + } + + /** + * @return the hazardIntensity + */ + public String getHazardIntensity() { + return hazardIntensity; + } + + /** + * @param hazardIntensity + * to set + */ + public void setHazardIntensity(String hazardIntensity) { + this.hazardIntensity = hazardIntensity; + } + + /** + * @return the hazardCause + */ + public String getHazardCause() { + return hazardCause; + } + + /** + * @param hazardCause + * to set + */ + public void setHazardCause(String hazardCause) { + this.hazardCause = hazardCause; + } + + /** + * @return the hazardCondition + */ + public String getHazardCondition() { + return hazardCondition; + } + + /** + * @param hazardCondition + * to set + */ + public void setHazardCondition(String hazardCondition) { + this.hazardCondition = hazardCondition; + } + + /** + * @return the flightLevel1 + */ + public int getFlightLevel1() { + return flightLevel1; + } + + /** + * @param flightLevel1 + * to set + */ + public void setFlightLevel1(int flightLevel1) { + this.flightLevel1 = flightLevel1; + } + + /** + * @return the flightLevel2 + */ + public int getFlightLevel2() { + return flightLevel2; + } + + /** + * @param flightLevel2 + * to set + */ + public void setFlightLevel2(int flightLevel2) { + this.flightLevel2 = flightLevel2; + } + + /** + * @return the sigmetId + */ + public String getSigmetId() { + return sigmetId; + } + + /** + * @param sigmetId + * to set + */ + public void setSigmetId(String sigmetId) { + this.sigmetId = sigmetId; + } + + /** + * @return the bullMessage + */ + public String getBullMessage() { + return bullMessage; + } + + /** + * @param bullMessage + * to set + */ + public void setBullMessage(String bullMessage) { + this.bullMessage = bullMessage; + } + + /** + * @return the set of nonconvective sigmet location + */ + public Set getNonConvSigmetLocation() { + return nonConvSigmetLocation; + } + + /** + * @param nonconvsigmet + * the location to set + */ + public void setNonConvSigmetLocation( + Set nonConvLocation) { + this.nonConvSigmetLocation = nonConvLocation; + } + + /** + * @param add + * conv Sigmet location to set + */ + public void addNonConvSigmetLocation(NonConvSigmetLocation pLocation) { + nonConvSigmetLocation.add(pLocation); + + } + + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + + this.identifier = dataURI; + + } - this.identifier = dataURI; - - - - } - @Override @Column @Access(AccessType.PROPERTY) @@ -565,4 +537,8 @@ public class NonConvSigmetRecord extends PluginDataObject{ return super.getDataURI(); } + @Override + public String getPluginName() { + return "nonconvsigmet"; + } } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ntrans/src/gov/noaa/nws/ncep/common/dataplugin/ntrans/NtransRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ntrans/src/gov/noaa/nws/ncep/common/dataplugin/ntrans/NtransRecord.java index cc9f7d5f39..179a35f666 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ntrans/src/gov/noaa/nws/ncep/common/dataplugin/ntrans/NtransRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ntrans/src/gov/noaa/nws/ncep/common/dataplugin/ntrans/NtransRecord.java @@ -18,8 +18,6 @@ package gov.noaa.nws.ncep.common.dataplugin.ntrans; -import java.util.Calendar; - import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Column; @@ -52,50 +50,46 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ntrans", - indexes = { - @Index(name = "ntrans_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ntrans", indexes = { @Index(name = "ntrans_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class NtransRecord extends PersistablePluginDataObject { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; @Column - @DataURI(position=1) + @DataURI(position = 1) @XmlElement @DynamicSerializeElement private String modelName; @Column - @DataURI(position=2) + @DataURI(position = 2) @XmlElement @DynamicSerializeElement - private String metafileName ; + private String metafileName; @Column - @DataURI(position=3) + @DataURI(position = 3) @XmlElement @DynamicSerializeElement private String productName; - @Column + @Column @XmlElement @DynamicSerializeElement private String validTimeString; - - @Column - @XmlElement - @DynamicSerializeElement - private String reportType; - - @Transient - private byte[] imageData; + + @Column + @XmlElement + @DynamicSerializeElement + private String reportType; + + @Transient + private byte[] imageData; @Column @XmlElement @@ -121,131 +115,130 @@ public class NtransRecord extends PersistablePluginDataObject { @XmlElement @DynamicSerializeElement private int totalFramesInFile; - - /** - * Default Constructor - */ - public NtransRecord() { - } - /** - * Constructs an NTRANS record from a dataURI - * + /** + * Default Constructor + */ + public NtransRecord() { + } + + /** + * Constructs an NTRANS record from a dataURI + * * @param uri * The dataURI - */ - public NtransRecord(String uri) { - super(uri); - } + */ + public NtransRecord(String uri) { + super(uri); + } - public String getModelName() { - return modelName; - } + public String getModelName() { + return modelName; + } - public void setModelName(String model) { - this.modelName = model; - } + public void setModelName(String model) { + this.modelName = model; + } - public String getMetafileName() { - return metafileName; - } + public String getMetafileName() { + return metafileName; + } - public void setMetafileName(String inputMetaFileName) { - this.metafileName = inputMetaFileName; - } + public void setMetafileName(String inputMetaFileName) { + this.metafileName = inputMetaFileName; + } - public String getValidTimeString() { - return validTimeString; - } + public String getValidTimeString() { + return validTimeString; + } - public void setValidTimeString(String validTimeString) { - this.validTimeString = validTimeString; - } + public void setValidTimeString(String validTimeString) { + this.validTimeString = validTimeString; + } - public String getProductName() { - return productName; - } + public String getProductName() { + return productName; + } - public void setProductName(String productNameString) { - this.productName = productNameString; - } + public void setProductName(String productNameString) { + this.productName = productNameString; + } - public String getReportType() { - return reportType; - } + public String getReportType() { + return reportType; + } - public void setReportType(String reportType) { - this.reportType = reportType; - } + public void setReportType(String reportType) { + this.reportType = reportType; + } - public byte[] getImageData() { - return imageData; - } + public byte[] getImageData() { + return imageData; + } - public void setImageData(byte[] imageData) { - this.imageData = imageData; - } + public void setImageData(byte[] imageData) { + this.imageData = imageData; + } - public int getImageSizeX() { - return imageSizeX; - } + public int getImageSizeX() { + return imageSizeX; + } - public void setImageSizeX(int imageSizeX) { - this.imageSizeX = imageSizeX; - } + public void setImageSizeX(int imageSizeX) { + this.imageSizeX = imageSizeX; + } - public int getImageSizeY() { - return imageSizeY; - } + public int getImageSizeY() { + return imageSizeY; + } - public void setImageSizeY(int imageSizeY) { - this.imageSizeY = imageSizeY; - } + public void setImageSizeY(int imageSizeY) { + this.imageSizeY = imageSizeY; + } - public int getImageByteCount() { - return imageByteCount; - } + public int getImageByteCount() { + return imageByteCount; + } - public void setImageByteCount(int imageByteCount) { - this.imageByteCount = imageByteCount; - } + public void setImageByteCount(int imageByteCount) { + this.imageByteCount = imageByteCount; + } - public int getFrameNumberInFile() { - return frameNumberInFile; - } + public int getFrameNumberInFile() { + return frameNumberInFile; + } - public void setFrameNumberInFile(int frameNumberInFile) { - this.frameNumberInFile = frameNumberInFile; - } + public void setFrameNumberInFile(int frameNumberInFile) { + this.frameNumberInFile = frameNumberInFile; + } - public int getTotalFramesInFile() { - return totalFramesInFile; - } + public int getTotalFramesInFile() { + return totalFramesInFile; + } - public void setTotalFramesInFile(int totalFramesInFile) { - this.totalFramesInFile = totalFramesInFile; - } + public void setTotalFramesInFile(int totalFramesInFile) { + this.totalFramesInFile = totalFramesInFile; + } - - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } - - @Override + @Override + public IDecoderGettable getDecoderGettable() { + // TODO Auto-generated method stub + return null; + } + + @Override public IHDFFilePathProvider getHDFPathProvider() { return NtransPathProvider.getInstance(); } - public static long getSerialVersionUID() { - return serialVersionUID; - } + public static long getSerialVersionUID() { + return serialVersionUID; + } - @Override + @Override public void setIdentifier(Object dataURI) { - this.identifier = dataURI; - } + this.identifier = dataURI; + } @Override @Column @@ -253,4 +246,9 @@ public class NtransRecord extends PersistablePluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ntrans"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.pgen/src/gov/noaa/nws/ncep/common/dataplugin/pgen/PgenRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.pgen/src/gov/noaa/nws/ncep/common/dataplugin/pgen/PgenRecord.java index c7f1b9d8c4..be7d03d2dc 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.pgen/src/gov/noaa/nws/ncep/common/dataplugin/pgen/PgenRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.pgen/src/gov/noaa/nws/ncep/common/dataplugin/pgen/PgenRecord.java @@ -30,9 +30,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Apr 22, 2013 sgilbert Initial creation - * Jun 26, 2013 bhebbard Added SequenceGenerator annotation - * Jul 22, 2013 1977 rjpeter Added getDataURI and annotations. + * Apr 22, 2013 sgilbert Initial creation + * Jun 26, 2013 bhebbard Added SequenceGenerator annotation + * Jul 22, 2013 1977 rjpeter Added getDataURI and annotations. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * * * @author sgilbert @@ -270,4 +271,9 @@ public class PgenRecord extends PersistablePluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "pgen"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java index 59459131cb..90bf018bd1 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java @@ -1,26 +1,3 @@ -/** - * SgwhRecord - * This java class performs the mapping to the database for BUFR Sgwh. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date			Ticket#		Engineer	Description
- * ------------ -----------	----------- --------------------------
- * Aug17 2011	   		    Chin Chen	Initial Coding (Following BufrsgwhRecord to refactor for 
- * 										saving data to HDF5)
- * Apr 4, 2013        1846 bkowal      Added an index on refTime and forecastTime
- * Apr 8, 2013  1293        bkowal      Removed references to hdffileid.
- * Apr 12, 2013 1857        bgonzale    Added SequenceGenerator annotation.
- * May 07, 2013 1869       	bsteffen    Remove dataURI column from
- *                                      PluginDataObject.
- *
- * 
- * - * @author chin chen - * @version 1.0 - */ package gov.noaa.nws.ncep.common.dataplugin.sgwh; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -50,6 +27,30 @@ import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; +/** + * SgwhRecord This java class performs the mapping to the database for BUFR + * Sgwh. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#     Engineer    Description
+ * ------------ ----------- ----------- --------------------------
+ * Aug17 2011               Chin Chen   Initial Coding (Following BufrsgwhRecord
+ *                                      to refactor for  saving data to HDF5)
+ * Apr 04, 2013 1846        bkowal      Added an index on refTime and
+ *                                      forecastTime
+ * Apr 08, 2013 1293        bkowal      Removed references to hdffileid.
+ * 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
+ * 
+ * + * @author chin chen + * @version 1.0 + */ @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "sgwhseq") @Table(name = "sgwh", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -57,1674 +58,1613 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "sgwh", - indexes = { - @Index(name = "sgwh_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "sgwh", indexes = { @Index(name = "sgwh_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class SgwhRecord extends PluginDataObject implements IDecoderGettable, - IPointData, IPersistable { - private static final long serialVersionUID = 1L; - - /** Satellite Identification */ - @Column - @DataURI(position = 1) - @DynamicSerializeElement - private Long said; - - /** Software Identification */ - @Column - @DynamicSerializeElement - private Long swid; - - /** Identification of the originating/generating center */ - @Column - @DynamicSerializeElement - private Long ogce; - - /** Satellite sensor indicator, first occurrence */ - @Column - @DynamicSerializeElement - private Long ssin1; - - /** Satellite sensor indicator, second occurrence */ - @Column - @DynamicSerializeElement - private Long ssin2; - - /** Orbit Number */ - @Column - @DataURI(position = 2) - @DynamicSerializeElement - private Long orbn; - - /** Height of station in meters */ - @Column - @DynamicSerializeElement - private Double selv = IDecoderConstantsN.DOUBLE_MISSING; - - /** Height increment in meters */ - @Column - @DynamicSerializeElement - private Double hinc = IDecoderConstantsN.DOUBLE_MISSING; - - /** Observation time */ - @Column - @DataURI(position = 3) - @DynamicSerializeElement - private Calendar obsTime; - - /** Latitude */ - @Column - @DataURI(position = 4) - @DynamicSerializeElement - private Double clath = IDecoderConstantsN.DOUBLE_MISSING; - - /** Longitude */ - @Column - @DataURI(position = 5) - @DynamicSerializeElement - private Double clonh = IDecoderConstantsN.DOUBLE_MISSING; - - /** Remotely sensed surface type */ - @Transient - @DynamicSerializeElement - private Long rsst; - - /** Altimeter echo type */ - @Transient - @DynamicSerializeElement - private Long aetp; - - /** Land/Sea qualifier */ - @Transient - @DynamicSerializeElement - private Long lsql; - - /** Altimeter state flag */ - @Transient - @DynamicSerializeElement - private Long asfl; - - /** Radiometer state flag */ - @Transient - @DynamicSerializeElement - private Long rsfl; - - /** 3D error estimate of the navigator orbit */ - @Transient - @DynamicSerializeElement - private Long eeno; - - /** Associated field significance for sgwh */ - @Transient - @DynamicSerializeElement - private Long afssgwh; - - /** Significant wave height in meters */ - @Transient - @DynamicSerializeElement - private Double sgwh = IDecoderConstantsN.DOUBLE_MISSING; - - /** First order statistics */ - @Transient - @DynamicSerializeElement - private Long fostsgwh; - - /** Significant wave height (standard deviation) in meters */ - @Transient - @DynamicSerializeElement - private Double sgwhstd = IDecoderConstantsN.DOUBLE_MISSING; - - /** Number of valid points per second used to derive previous parameters */ - @Transient - @DynamicSerializeElement - private Long nvpp; - - /** Type of Band for 1st replication */ - @Transient - @DynamicSerializeElement - private Long tobdg1r1; - - /** Type of Band for 2nd replication */ - @Transient - @DynamicSerializeElement - private Long tobdg1r2; - - /** - * Associated field significance for group 1, replication 1, first - * occurrence - */ - @Transient - @DynamicSerializeElement - private Long afsbkstg1r1; - - /** - * Associated field significance for group 1, replication 2, first - * occurrence - */ - @Transient - @DynamicSerializeElement - private Long afsbkstg1r2; - - /** Backscatter in decibels for group 1 rep 1 */ - @Transient - @DynamicSerializeElement - private Double bkstg1r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Backscatter in decibels for group 1 rep 2 */ - @Transient - @DynamicSerializeElement - private Double bkstg1r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** fost for bkst for group 1, replication 1, first fost occurrence */ - @Transient - @DynamicSerializeElement - private Long fostbkstg1r1; - - /** fost for bkst for group 1, replication 2, first fost occurrence */ - @Transient - @DynamicSerializeElement - private Long fostbkstg1r2; - - /** Backscatter Standard Deviation in decibels for group 1 rep 1 */ - @Transient - @DynamicSerializeElement - private Double bkststdg1r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Backscatter Standard Deviation in decibels for group 1 rep 2 */ - @Transient - @DynamicSerializeElement - private Double bkststdg1r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Square of the off-nadir angle in degrees squared */ - @Transient - @DynamicSerializeElement - private Double sona; - - /** - * Associated Field Significance for Square of the off-nadir angle in - * degrees squared - */ - @Transient - @DynamicSerializeElement - private Long afssona; - - /** Radiometer water vapor content in kg per square meter */ - @Transient - @DynamicSerializeElement - private Double rwvc = IDecoderConstantsN.DOUBLE_MISSING; - - /** Radiometer liquid content in kg per square meter */ - @Transient - @DynamicSerializeElement - private Double rlqc = IDecoderConstantsN.DOUBLE_MISSING; - - /** - * Associated field significance for group 1, replication 1, second - * occurrence - */ - @Transient - @DynamicSerializeElement - private Long afsselvg1r1; - - /** - * Associated field significance for group 1, replication 2, second - * occurrence - */ - @Transient - @DynamicSerializeElement - private Long afsselvg1r2; - - /** Height of station for 1st replication */ - @Transient - @DynamicSerializeElement - private Double selvg1r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Height of station for 2nd replication */ - @Transient - @DynamicSerializeElement - private Double selvg1r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Height increment in meters for 1st replication */ - @Transient - @DynamicSerializeElement - private Double hincg1r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Height increment in meters for snd replication */ - @Transient - @DynamicSerializeElement - private Double hincg1r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** fost for selv for group 1, replication 1, second fost occurrence */ - @Transient - @DynamicSerializeElement - private Long fostselvg1r1; - - /** fost for selv for group 1, replication 2, second fost occurrence */ - @Transient - @DynamicSerializeElement - private Long fostselvg1r2; - - /** Std of Height of station for 1st replication */ - @Transient - @DynamicSerializeElement - private Double selvstdg1r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Std of Height of station for 2nd replication */ - @Transient - @DynamicSerializeElement - private Double selvstdg1r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** - * Number of valid points per second used to derive previous parameters for - * 1st replication - */ - @Transient - @DynamicSerializeElement - private Long nvppg1r1; - - /** - * Number of valid points per second used to derive previous parameters for - * 2nd replication - */ - @Transient - @DynamicSerializeElement - private Long nvppg1r2; - - /** MEFR Mean Frequency for group 2 for 1st replication */ - @Transient - @DynamicSerializeElement - private Double mefrg2r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** mefr Mean Frequency for group 2 for 2nd replication */ - @Transient - @DynamicSerializeElement - private Double mefrg2r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** mefr Mean Frequency for group 2 for 3rd replication */ - @Transient - @DynamicSerializeElement - private Double mefrg2r3 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Associated field significance for tmbr for group 2, replication 1 */ - @Transient - @DynamicSerializeElement - private Long afstmbrg2r1; - - /** Associated field significance for tmbr for group 2, replication 2 */ - @Transient - @DynamicSerializeElement - private Long afstmbrg2r2; - - /** Associated field significance for tmbr for group 2, replication 3 */ - @Transient - @DynamicSerializeElement - private Long afstmbrg2r3; - - /** Brightness temperature tmbrg2r1 in K for group 2, rep 1 */ - @Transient - @DynamicSerializeElement - private Double tmbrg2r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Brightness temperature tmbrg2r2 in K for group 2 rep 2 */ - @Transient - @DynamicSerializeElement - private Double tmbrg2r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Brightness temperature tmbrg2r3 in K for group 2 rep 3 */ - @Transient - @DynamicSerializeElement - private Double tmbrg2r3 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Satellite-derived wind computation method swcmg3r1 for group 3 rep 1 */ - @Transient - @DynamicSerializeElement - private Long swcmg3r1; - - /** Satellite-derived wind computation method swcmg3r1 for group 3 rep 2 */ - @Transient - @DynamicSerializeElement - private Long swcmg3r2; - - /** Wind speed at 10 m; in meters per second; for group 3 rep 1 */ - @Transient - @DynamicSerializeElement - private Double ws10g3r1 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Wind speed at 10 m; in meters per second; for group 3 rep 2 */ - @Transient - @DynamicSerializeElement - private Double ws10g3r2 = IDecoderConstantsN.DOUBLE_MISSING; - - /** Report type */ - // @Column(length=8) - @Transient - @DynamicSerializeElement - @DataURI(position=6) - private String reportType; - - /** Text of the WMO header */ - @Column(length = 32) - @DynamicSerializeElement - private String wmoHeader; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - /** - * Empty constructor. - */ - public SgwhRecord() { - } - - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - */ - public SgwhRecord(String uri) { - super(uri); - } - - /** - * Get the observation report type. - * - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * Set the observation report type. - * - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * Get the Satellite Identifier. - * - * @return the Satellite ID - */ - public Long getSaid() { - return said; - } - - /** - * Set the Satellite Identifier. - * - * @param said - * the Satellite ID to set - */ - public void setSaid(Long said) { - this.said = said; - } - - /** - * @param swid - * the Software Identification to get - */ - /** - * @return the swid - */ - public Long getSwid() { - return swid; - } - - /** - * @param swid - * the Software Identification to set - */ - public void setSwid(Long swid) { - this.swid = swid; - } - - /** - * @param ogce - * the Identification of originating/generating center to return - */ - /** - * @return the ogce - */ - public Long getOgce() { - return ogce; - } - - /** - * @param ogce - * the Identification of originating/generating center to set - */ - public void setOgce(Long ogce) { - this.ogce = ogce; - } - - /** - * @param ssin1 - * the Satellite Sensor Indicator 1 to return - */ - /** - * @return the ssin1 - */ - public Long getSsin1() { - return ssin1; - } - - /** - * @param ssin - * the Satellite Sensor Indicator 1 to set - */ - public void setSsin1(Long ssin1) { - this.ssin1 = ssin1; - } - - /** - * @param ssin - * the Satellite Sensor Indicator 2 to return - */ - /** - * @return the ssin2 - */ - public Long getSsin2() { - return ssin2; - } - - /** - * @param ssin2 - * the Satellite Sensor Indicator 2 to set - */ - public void setSsin2(Long ssin2) { - this.ssin2 = ssin2; - } - - /** - * @param orbn - * the Orbit number to return - */ - /** - * @return the orbn - */ - public Long getOrbn() { - return orbn; - } - - /** - * @param orbn - * the Orbit number to set - */ - public void setOrbn(Long orbn) { - this.orbn = orbn; - } - - /** - * @param selv - * height of station to return - */ - /** - * @return the selv - */ - public Double getSelv() { - return selv; - } - - /** - * @param selv - * the height of elevation to set - */ - public void setSelv(Double selv) { - this.selv = selv; - } - - /** - * @param hinc - * height increment to return - */ - /** - * @return the hinc - */ - public Double getHinc() { - return hinc; - } - - /** - * @param hinc - * the height increment to set - */ - public void setHinc(Double hinc) { - this.hinc = hinc; - } - - /** - * @return the clath - */ - public Double getClath() { - return clath; - } - - /** - * @param clath - * the clath to set - */ - public void setClath(Double clath) { - this.clath = clath; - } - - /** - * @return the clonh - */ - public Double getClonh() { - return clonh; - } - - /** - * @param clonh - * the clonh to set - */ - public void setClonh(Double clonh) { - this.clonh = clonh; - } - - /** - * @param rsst - * remotely sensed surface type to return - */ - /** - * @return the rsst - */ - public Long getRsst() { - return rsst; - } - - /** - * @param rsst - * the remotely sensed surface type to set - */ - public void setRsst(Long rsst) { - this.rsst = rsst; - } - - /** - * @param aetp - * remotely sensed surface type to return - */ - /** - * @return the aetp - */ - public Long getAetp() { - return aetp; - } - - /** - * @param aetp - * the remotely sensed surface type to set - */ - public void setAetp(Long aetp) { - this.aetp = aetp; - } - - /** - * @param lsql - * land/sea qualifier to return - */ - /** - * @return the lsql - */ - public Long getLsql() { - return lsql; - } - - /** - * @param lsql - * land/sea qualifer to set - */ - public void setLsql(Long lsql) { - this.lsql = lsql; - } - - /** - * @param asfl - * altimeter state flag to return - */ - /** - * @return the asfl - */ - public Long getAsfl() { - return asfl; - } - - /** - * @param asfl - * the altimeter state flag to set - */ - public void setAsfl(Long asfl) { - this.asfl = asfl; - } - - /** - * @param rsfl - * radiometer state flag to return - */ - /** - * @return the rsfl - */ - public Long getRsfl() { - return rsfl; - } - - /** - * @param rsfl - * the radiometer state flag to set - */ - public void setRsfl(Long rsfl) { - this.rsfl = rsfl; - } - - /** - * @param eeno - * three dimensional error estimate of the navigator orbit to - * return - */ - /** - * @return the eeno - */ - public Long getEeno() { - return eeno; - } - - /** - * @param eeno - * three dimensional error estimate of the navigator orbit to set - */ - public void setEeno(Long eeno) { - this.eeno = eeno; - } - - /** - * @param afssgwh - * associated field significance for sgwh to return - */ - /** - * @return the afssgwh - */ - public Long getAfssgwh() { - return afssgwh; - } - - /** - * @param afssgwh - * associated field significance for sgwh to set - */ - public void setAfssgwh(Long afssgwh) { - this.afssgwh = afssgwh; - } - - /** - * @param sgwh - * significant wave height to return - */ - /** - * @return the sgwh - */ - public Double getSgwh() { - return sgwh; - } - - /** - * @param sgwh - * significant wave height to set - */ - public void setSgwh(Double sgwh) { - this.sgwh = sgwh; - } - - /** - * @param sgwh - * significant wave height (standard deviation) to return - */ - /** - * @return the sgwhStd - */ - public Double getSgwhstd() { - return sgwhstd; - } - - /** - * @param sgwh - * significant wave height to set - */ - public void setSgwhstd(Double sgwhstd) { - this.sgwhstd = sgwhstd; - } - - /** - * @param fostsgwh - * first order statistics for sgwh to return - */ - /** - * @return the fostsgwh - */ - public Long getFostsgwh() { - return fostsgwh; - } - - /** - * @param fostsgwh - * first order statistics for sgwh to set - */ - public void setFostsgwh(Long fostsgwh) { - this.fostsgwh = fostsgwh; - } - - /** - * @param nvpp - * number of valid points per sec used to derive previous - * parameters to return - */ - /** - * @return the nvpp - */ - public Long getNvpp() { - return nvpp; - } - - /** - * @param nvpp - * number of valid points per sec used to derive previous - * parameters to set - */ - public void setNvpp(Long nvpp) { - this.nvpp = nvpp; - } - - /** - * @param tobdg1r1 - * type of band for 1st replication to return - */ - /** - * @return the tobdg1r1 - */ - public Long getTobdg1r1() { - return tobdg1r1; - } - - /** - * @param tbnd - * type of band for 1st replication to set - */ - public void setTobdg1r1(Long tobdg1r1) { - this.tobdg1r1 = tobdg1r1; - } - - /** - * @param tobdg1r2 - * type of band for 2nd replication to return - */ - /** - * @return the tobdg1r2 - */ - public Long getTobdg1r2() { - return tobdg1r2; - } - - /** - * @param tobdg1r2 - * type of band for 2nd replication to set - */ - public void setTobdg1r2(Long tobdg1r2) { - this.tobdg1r2 = tobdg1r2; - } - - /** - * @param afsbkstg1r1 - * associated field sig. bkst in group1, 1st replication to - * return - */ - /** - * @return the afsbkstg1r1 - */ - public Long getAfsbkstg1r1() { - return afsbkstg1r1; - } - - /** - * @param afsbkstg1r1 - * associated field sig. for bkst in group 1, 1st replication to - * set - */ - public void setAfsbkstg1r1(Long afsbkstg1r1) { - this.afsbkstg1r1 = afsbkstg1r1; - } - - /** - * @param afsbkstg1r2 - * associated field sig for bkst in group 1, 2nd replication to - * return - */ - /** - * @return the afsbkstg1r2 - */ - public Long getAfsbkstg1r2() { - return afsbkstg1r2; - } - - /** - * @param afsbkstg1r2 - * associated field sig for bkst in group 1, 2nd replication to - * set - */ - public void setAfsbkstg1r2(Long afsbkstg1r2) { - this.afsbkstg1r2 = afsbkstg1r2; - } - - /** - * @param afsselvg1r1 - * associated field sig for selv in group 1, 1st replication to - * return - */ - /** - * @return the afsselvg1r1 - */ - public Long getAfsselvg1r1() { - return afsselvg1r1; - } - - /** - * @param afsselvg1r1 - * associated field sig for selv in group 1, 1st replication to - * set - */ - public void setAfsselvg1r1(Long afsselvg1r1) { - this.afsselvg1r1 = afsselvg1r1; - } - - /** - * @param afsselvg1r2b - * associated field sig for selv in group 1, 2nd replication to - * return - */ - /** - * @return the afsselvg1r2 - */ - public Long getAfsselvg1r2() { - return afsselvg1r2; - } - - /** - * @param afsselvg1r2b - * associated field sig for selv in group 1 for 2nd replication - * to set - */ - public void setAfsselvg1r2(Long afsselvg1r2) { - this.afsselvg1r2 = afsselvg1r2; - } - - /** - * @param fostbkstg1r1 - * fost for bkst for group 1, 1st replication to return - */ - /** - * @return the fostbkstg1r1 - */ - public Long getFostbkstg1r1() { - return fostbkstg1r1; - } - - /** - * @param fostbkstg1r1 - * fost for bkst for group 1, 1st replication to set - */ - public void setFostbkstg1r1(Long fostbkstg1r1) { - this.fostbkstg1r1 = fostbkstg1r1; - } - - /** - * @param fostbkstg1r2 - * fost for bkst for group 1, 2nd replication to return - */ - /** - * @return the fostbkstg1r2 fost for bkst for group 1, 2nd replication to - * set - */ - public Long getFostbkstg1r2() { - return fostbkstg1r2; - } - - /** - * @param afsg1r2 - * associated field sig for 1st occurrence in group 1, 2nd - * replication to set - */ - public void setFostbkstg1r2(Long fostbkstg1r2) { - this.fostbkstg1r2 = fostbkstg1r2; - } - - /** - * @param bkstg1r1 - * backscatter to return - */ - /** - * @return the bkstg1r1 - */ - public Double getBkstg1r1() { - return bkstg1r1; - } - - /** - * @param bkst - * backscatter to set - */ - public void setBkstg1r1(Double bkstg1r1) { - this.bkstg1r1 = bkstg1r1; - } - - /** - * @param bkststdg1r1 - * backscatter standard deviation to return - */ - /** - * @return the bkststdg1r1 - */ - public Double getBkststdg1r1() { - return bkststdg1r1; - } - - /** - * @param bkststdg1r1 - * backscatter standard deviation to set - */ - public void setBkststdg1r1(Double bkststdg1r1) { - this.bkststdg1r1 = bkststdg1r1; - } - - /** - * @param bkstg1r2 - * backscatter to return - */ - /** - * @return the bkstg1r2 - */ - public Double getBkstg1r2() { - return bkstg1r2; - } - - /** - * @param bkstg1r2 - * backscatter to set - */ - public void setBkstg1r2(Double bkstg1r2) { - this.bkstg1r2 = bkstg1r2; - } - - /** - * @param bkststdg1r2 - * backscatter standard deviation to return - */ - /** - * @return the bkststdg1r2 - */ - public Double getBkststdg1r2() { - return bkststdg1r2; - } - - /** - * @param bkststdg1r - * backscatter standard deviation to set - */ - public void setBkststdg1r2(Double bkststdg1r2) { - this.bkststdg1r2 = bkststdg1r2; - } - - /** - * @param fostselvg1r1 - * fost for selv for group 1, 1st replication to return - */ - /** - * @return the fostselvg1r1 - */ - public Long getFostselvg1r1() { - return fostselvg1r1; - } - - /** - * @param fostselvg1r1 - * fost for selv for group 1, 1st replication to set - */ - public void setFostselvg1r1(Long fostselvg1r1) { - this.fostselvg1r1 = fostselvg1r1; - } - - /** - * @param fostselvg1r2 - * fost for selv for group 1, 2nd replication to return - */ - /** - * @return the fostselvg1r2 - */ - public Long getFostselvg1r2() { - return fostselvg1r2; - } - - /** - * @param fostselvg1r2 - * fost for selv for 1st occurrence in group 1, 2nd replication - * to set - */ - public void setFostselvg1r2(Long fostselvg1r2) { - this.fostselvg1r2 = fostselvg1r2; - } - - /** - * @param selvg1r1 - * elevation of satellite in group 1 replication 1 to return - */ - /** - * @return the selvg1r1 - */ - public Double getSelvg1r1() { - return selvg1r1; - } - - /** - * @param selv - * elevation of satellite in group 1 replication 1 to set - */ - public void setSelvg1r1(Double selvg1r1) { - this.selvg1r1 = selvg1r1; - } - - /** - * @param selvg1r2 - * elevation of satellite in group 1 replication 2 to return - */ - /** - * @return the selvg1r2 - */ - public Double getSelvg1r2() { - return selvg1r2; - } - - /** - * @param selvg1r2 - * elevation of satellite in group 1 replication 2 to set - */ - public void setSelvg1r2(Double selvg1r2) { - this.selvg1r2 = selvg1r2; - } - - /** - * @param hincg1r1 - * height increment in group 1 replication 1 to return - */ - /** - * @return the hincg1r1 - */ - public Double getHincg1r1() { - return hincg1r1; - } - - /** - * @param hincg1r1 - * height increment in group 1 replication 1 to set - */ - public void setHincg1r1(Double hincg1r1) { - this.hincg1r1 = hincg1r1; - } - - /** - * @param hincg1r2 - * height increment in group 1 replication 2 to return - */ - /** - * @return the hincg1r2 - */ - public Double getHincg1r2() { - return hincg1r2; - } - - /** - * @param hincg1r1 - * height increment in group 1 replication 2 to set - */ - public void setHincg1r2(Double hincg1r2) { - this.hincg1r2 = hincg1r2; - } - - /** - * @param selvstdg1r1 - * std of elevation of satellite in group 1 replication 1 to - * return - */ - /** - * @return the selvstdg1r1 - */ - public Double getSelvstdg1r1() { - return selvstdg1r1; - } - - /** - * @param selvstdg1r1 - * elevation of satellite in group 1 replication 2 to set - */ - public void setSelvstdg1r1(Double selvstdg1r1) { - this.selvstdg1r1 = selvstdg1r1; - } - - /** - * @param selvstdg1r2 - * std of elevation of satellite in group 1 replication 1 to - * return - */ - /** - * @return the selvstdg1r2 - */ - public Double getSelvstdg1r2() { - return selvstdg1r2; - } - - /** - * @param selvstdg1r2 - * elevation of satellite in group 1 replication 2 to set - */ - public void setSelvstdg1r2(Double selvstdg1r2) { - this.selvstdg1r2 = selvstdg1r2; - } - - /** - * @param nvppg1r1 - * number of valid points per sec used to derive previous - * parameters in group 1 replication 1 to return - */ - /** - * @return the nvppg1r1 - */ - public Long getNvppg1r1() { - return nvppg1r1; - } - - /** - * @param nvppg1r1 - * number of valid points per sec used to derive previous - * parameters in group 1 replication 1 to set - */ - public void setNvppg1r1(Long nvppg1r1) { - this.nvppg1r1 = nvppg1r1; - } - - /** - * @param nvppg1r2 - * number of valid points per sec used to derive previous - * parameters in group 1 replication 2 to return - */ - /** - * @return the nvppg1r1 - */ - public Long getNvppg1r2() { - return nvppg1r2; - } - - /** - * @param nvppg1r2 - * number of valid points per sec used to derive previous - * parameters in group 1 replication 2 to set - */ - public void setNvppg1r2(Long nvppg1r2) { - this.nvppg1r2 = nvppg1r2; - } - - /** - * @param afssona - * Associated Field Significance of Square of the off-nadir angle - * to return - */ - /** - * @return the afssona - */ - public Long getAfssona() { - return afssona; - } - - /** - * @param afssona - * Assocaited Field Significance of sona to set - */ - public void setAfssona(Long afssona) { - this.afssona = afssona; - } - - /** - * @param sona - * Square of the off-nadir angle to return - */ - /** - * @return the sona - */ - public Double getSona() { - return sona; - } - - /** - * @param sona - * Square of the off-nadir angle to set - */ - public void setSona(Double sona) { - this.sona = sona; - } - - /** - * @param mefrg2r1 - * mean frequency in hz for group 2 rep 1 to return - */ - /** - * @return the mefrg2r1 - */ - public Double getMefrg2r1() { - return mefrg2r1; - } - - /** - * @param mefrg2r1 - * mean frequency for group 2 rep 1 to set - */ - public void setMefrg2r1(Double mefrg2r1) { - this.mefrg2r1 = mefrg2r1; - } - - /** - * @param mefrg2r2 - * mean frequency in hz for group 2 rep 2 to return - */ - /** - * @return the mefrg2r2 - */ - public Double getMefrg2r2() { - return mefrg2r2; - } - - /** - * @param mefrg2r2 - * mean frequency for group 2 rep 2 to set - */ - public void setMefrg2r2(Double mefrg2r2) { - this.mefrg2r2 = mefrg2r2; - } - - /** - * @param mefrg2r3 - * mean frequency in hz for group 2 rep 3 to return - */ - /** - * @return the mefrg2r3 - */ - public Double getMefrg2r3() { - return mefrg2r3; - } - - /** - * @param mefrg2r3 - * mean frequency for group 2 rep 3 to set - */ - public void setMefrg2r3(Double mefrg2r3) { - this.mefrg2r3 = mefrg2r3; - } - - /** - * @param afstmbrg2r1 - * associated field sig for tmbr in group 2, 1st replication to - * return - */ - /** - * @return the afstmbrg2r1 - */ - public Long getAfstmbrg2r1() { - return afstmbrg2r1; - } - - /** - * @param afstmbrg2r1 - * associated field sig for tmbr in group 2, 1st replication to - * set - */ - public void setAfstmbrg2r1(Long afstmbrg2r1) { - this.afstmbrg2r1 = afstmbrg2r1; - } - - /** - * @param afstmbrg2r2b - * associated field sig for tmbr in group 2, 2nd replication to - * return - */ - /** - * @return the afstmbrg2r2 - */ - public Long getAfstmbrg2r2() { - return afstmbrg2r2; - } - - /** - * @param afstmbrg2r2b - * associated field sig for tmbr in group 2 for 2nd replication - * to set - */ - public void setAfstmbrg2r2(Long afstmbrg2r2) { - this.afstmbrg2r2 = afstmbrg2r2; - } - - /** - * @param afstmbrg2r3 - * associated field sig for tmbr in group 2, 3rd replication to - * return - */ - /** - * @return the afstmbrg2r3 - */ - public Long getAfstmbrg2r3() { - return afstmbrg2r3; - } - - /** - * @param afstmbrg2r3 - * associated field sig for tmbr in group 2, 3rd replication to - * set - */ - public void setAfstmbrg2r3(Long afstmbrg2r3) { - this.afstmbrg2r3 = afstmbrg2r3; - } - - /** - * @param tmbrg2r1 - * brightness temperature in K for group 2 rep 1 to return - */ - /** - * @return the tmbrg2r1 - */ - public Double getTmbrg2r1() { - return tmbrg2r1; - } - - /** - * @param tmbrg2r1 - * brightness temperaturefor group 2 rep 1 to set - */ - public void setTmbrg2r1(Double tmbrg2r1) { - this.tmbrg2r1 = tmbrg2r1; - } - - /** - * @param tmbrg2r2 - * brightness temperature in K for group 2 rep 2 to return - */ - /** - * @return the tmbrg2r2 - */ - public Double getTmbrg2r2() { - return tmbrg2r2; - } - - /** - * @param tmbrg2r2 - * brightness temperaturefor group 2 rep 2 to set - */ - public void setTmbrg2r2(Double tmbrg2r2) { - this.tmbrg2r2 = tmbrg2r2; - } - - /** - * @param tmbrg2r3 - * brightness temperature in K for group 2 rep 3 to return - */ - /** - * @return the tmbrg2r3 - */ - public Double getTmbrg2r3() { - return tmbrg2r3; - } - - /** - * @param tmbrg2r3 - * mean frequency for group 2 rep 3 to set - */ - public void setTmbrg2r3(Double tmbrg2r3) { - this.tmbrg2r3 = tmbrg2r3; - } - - /** - * @param swcmg3r1 - * satellite-derived wind computation method for group 3 rep 1 to - * return - */ - /** - * @return the swcmg3r1 - */ - public Long getSwcmg3r1() { - return swcmg3r1; - } - - /** - * @param swcmg3r1 - * satellite-derived wind computation method for group 3 rep 1 to - * set - */ - public void setSwcmg3r1(Long swcmg3r1) { - this.swcmg3r1 = swcmg3r1; - } - - /** - * @param swcmg3r2 - * satellite-derived wind computation method for group 3 rep 2 to - * return - */ - /** - * @return the swcmg3r2 - */ - public Long getSwcmg3r2() { - return swcmg3r2; - } - - /** - * @param swcmg3r2 - * satellite-derived wind computation method for group 3 rep 2 to - * set - */ - public void setSwcmg3r2(Long swcmg3r2) { - this.swcmg3r2 = swcmg3r2; - } - - /** - * @param ws10g3r1 - * wind speed at 10 m for group 3 rep 1 to return - */ - /** - * @return the ws10g3r1 - */ - public Double getWs10g3r1() { - return ws10g3r1; - } - - /** - * @param ws10g3r1 - * wind speed at 10 m to set - */ - public void setWs10g3r1(Double ws10g3r1) { - this.ws10g3r1 = ws10g3r1; - } - - /** - * @param ws10g3r1 - * wind speed at 10 m for group 3 rep 2 to return - */ - /** - * @return the ws10g3r2 - */ - public Double getWs10g3r2() { - return ws10g3r2; - } - - /** - * @param ws10g3r1 - * wind speed at 10 m to set - */ - public void setWs10g3r2(Double ws10g3r2) { - this.ws10g3r2 = ws10g3r2; - } - - /** - * @param rwvc - * radiometer liquid content to return - */ - /** - * @return the rwvc - */ - public Double getRwvc() { - return rwvc; - } - - /** - * @param rwvc - * radiometer liquid content to set - */ - public void setRwvc(Double rwvc) { - this.rwvc = rwvc; - } - - /** - * @param rlqc - * radiometer liquid content to return - */ - /** - * @return the rlqc - */ - public Double getRlqc() { - return rlqc; - } - - /** - * @param rlqc - * radiometer liquid content to set - */ - public void setRlqc(Double rlqc) { - this.rlqc = rlqc; - } - - /** - * @return the wmoHeader - */ - public String getWmoHeader() { - return wmoHeader; - } - - /** - * @param wmoHeader - * the wmoHeader to set - */ - public void setWmoHeader(String wmoHeader) { - this.wmoHeader = wmoHeader; - } - - /** - * @return the obsTime - */ - public Calendar getObsTime() { - return obsTime; - } - - /** - * @param obsTime - * the obsTime to set - */ - public void setObsTime(Calendar obsTime) { - this.obsTime = obsTime; - } - - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - return null; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - return null; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } - - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - - @Override - public void setDataURI(String dataURI) { - identifier = dataURI; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - @Override - public Date getPersistenceTime() { - return this.dataTime.getRefTime(); - - } - - @Override - public void setPersistenceTime(Date persistTime) { - // TODO Auto-generated method stub - - } - - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - - } + IPointData, IPersistable { + private static final long serialVersionUID = 1L; + + /** Satellite Identification */ + @Column + @DataURI(position = 1) + @DynamicSerializeElement + private Long said; + + /** Software Identification */ + @Column + @DynamicSerializeElement + private Long swid; + + /** Identification of the originating/generating center */ + @Column + @DynamicSerializeElement + private Long ogce; + + /** Satellite sensor indicator, first occurrence */ + @Column + @DynamicSerializeElement + private Long ssin1; + + /** Satellite sensor indicator, second occurrence */ + @Column + @DynamicSerializeElement + private Long ssin2; + + /** Orbit Number */ + @Column + @DataURI(position = 2) + @DynamicSerializeElement + private Long orbn; + + /** Height of station in meters */ + @Column + @DynamicSerializeElement + private Double selv = IDecoderConstantsN.DOUBLE_MISSING; + + /** Height increment in meters */ + @Column + @DynamicSerializeElement + private Double hinc = IDecoderConstantsN.DOUBLE_MISSING; + + /** Observation time */ + @Column + @DataURI(position = 3) + @DynamicSerializeElement + private Calendar obsTime; + + /** Latitude */ + @Column + @DataURI(position = 4) + @DynamicSerializeElement + private Double clath = IDecoderConstantsN.DOUBLE_MISSING; + + /** Longitude */ + @Column + @DataURI(position = 5) + @DynamicSerializeElement + private Double clonh = IDecoderConstantsN.DOUBLE_MISSING; + + /** Remotely sensed surface type */ + @Transient + @DynamicSerializeElement + private Long rsst; + + /** Altimeter echo type */ + @Transient + @DynamicSerializeElement + private Long aetp; + + /** Land/Sea qualifier */ + @Transient + @DynamicSerializeElement + private Long lsql; + + /** Altimeter state flag */ + @Transient + @DynamicSerializeElement + private Long asfl; + + /** Radiometer state flag */ + @Transient + @DynamicSerializeElement + private Long rsfl; + + /** 3D error estimate of the navigator orbit */ + @Transient + @DynamicSerializeElement + private Long eeno; + + /** Associated field significance for sgwh */ + @Transient + @DynamicSerializeElement + private Long afssgwh; + + /** Significant wave height in meters */ + @Transient + @DynamicSerializeElement + private Double sgwh = IDecoderConstantsN.DOUBLE_MISSING; + + /** First order statistics */ + @Transient + @DynamicSerializeElement + private Long fostsgwh; + + /** Significant wave height (standard deviation) in meters */ + @Transient + @DynamicSerializeElement + private Double sgwhstd = IDecoderConstantsN.DOUBLE_MISSING; + + /** Number of valid points per second used to derive previous parameters */ + @Transient + @DynamicSerializeElement + private Long nvpp; + + /** Type of Band for 1st replication */ + @Transient + @DynamicSerializeElement + private Long tobdg1r1; + + /** Type of Band for 2nd replication */ + @Transient + @DynamicSerializeElement + private Long tobdg1r2; + + /** + * Associated field significance for group 1, replication 1, first + * occurrence + */ + @Transient + @DynamicSerializeElement + private Long afsbkstg1r1; + + /** + * Associated field significance for group 1, replication 2, first + * occurrence + */ + @Transient + @DynamicSerializeElement + private Long afsbkstg1r2; + + /** Backscatter in decibels for group 1 rep 1 */ + @Transient + @DynamicSerializeElement + private Double bkstg1r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Backscatter in decibels for group 1 rep 2 */ + @Transient + @DynamicSerializeElement + private Double bkstg1r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** fost for bkst for group 1, replication 1, first fost occurrence */ + @Transient + @DynamicSerializeElement + private Long fostbkstg1r1; + + /** fost for bkst for group 1, replication 2, first fost occurrence */ + @Transient + @DynamicSerializeElement + private Long fostbkstg1r2; + + /** Backscatter Standard Deviation in decibels for group 1 rep 1 */ + @Transient + @DynamicSerializeElement + private Double bkststdg1r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Backscatter Standard Deviation in decibels for group 1 rep 2 */ + @Transient + @DynamicSerializeElement + private Double bkststdg1r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Square of the off-nadir angle in degrees squared */ + @Transient + @DynamicSerializeElement + private Double sona; + + /** + * Associated Field Significance for Square of the off-nadir angle in + * degrees squared + */ + @Transient + @DynamicSerializeElement + private Long afssona; + + /** Radiometer water vapor content in kg per square meter */ + @Transient + @DynamicSerializeElement + private Double rwvc = IDecoderConstantsN.DOUBLE_MISSING; + + /** Radiometer liquid content in kg per square meter */ + @Transient + @DynamicSerializeElement + private Double rlqc = IDecoderConstantsN.DOUBLE_MISSING; + + /** + * Associated field significance for group 1, replication 1, second + * occurrence + */ + @Transient + @DynamicSerializeElement + private Long afsselvg1r1; + + /** + * Associated field significance for group 1, replication 2, second + * occurrence + */ + @Transient + @DynamicSerializeElement + private Long afsselvg1r2; + + /** Height of station for 1st replication */ + @Transient + @DynamicSerializeElement + private Double selvg1r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Height of station for 2nd replication */ + @Transient + @DynamicSerializeElement + private Double selvg1r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Height increment in meters for 1st replication */ + @Transient + @DynamicSerializeElement + private Double hincg1r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Height increment in meters for snd replication */ + @Transient + @DynamicSerializeElement + private Double hincg1r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** fost for selv for group 1, replication 1, second fost occurrence */ + @Transient + @DynamicSerializeElement + private Long fostselvg1r1; + + /** fost for selv for group 1, replication 2, second fost occurrence */ + @Transient + @DynamicSerializeElement + private Long fostselvg1r2; + + /** Std of Height of station for 1st replication */ + @Transient + @DynamicSerializeElement + private Double selvstdg1r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Std of Height of station for 2nd replication */ + @Transient + @DynamicSerializeElement + private Double selvstdg1r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** + * Number of valid points per second used to derive previous parameters for + * 1st replication + */ + @Transient + @DynamicSerializeElement + private Long nvppg1r1; + + /** + * Number of valid points per second used to derive previous parameters for + * 2nd replication + */ + @Transient + @DynamicSerializeElement + private Long nvppg1r2; + + /** MEFR Mean Frequency for group 2 for 1st replication */ + @Transient + @DynamicSerializeElement + private Double mefrg2r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** mefr Mean Frequency for group 2 for 2nd replication */ + @Transient + @DynamicSerializeElement + private Double mefrg2r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** mefr Mean Frequency for group 2 for 3rd replication */ + @Transient + @DynamicSerializeElement + private Double mefrg2r3 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Associated field significance for tmbr for group 2, replication 1 */ + @Transient + @DynamicSerializeElement + private Long afstmbrg2r1; + + /** Associated field significance for tmbr for group 2, replication 2 */ + @Transient + @DynamicSerializeElement + private Long afstmbrg2r2; + + /** Associated field significance for tmbr for group 2, replication 3 */ + @Transient + @DynamicSerializeElement + private Long afstmbrg2r3; + + /** Brightness temperature tmbrg2r1 in K for group 2, rep 1 */ + @Transient + @DynamicSerializeElement + private Double tmbrg2r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Brightness temperature tmbrg2r2 in K for group 2 rep 2 */ + @Transient + @DynamicSerializeElement + private Double tmbrg2r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Brightness temperature tmbrg2r3 in K for group 2 rep 3 */ + @Transient + @DynamicSerializeElement + private Double tmbrg2r3 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Satellite-derived wind computation method swcmg3r1 for group 3 rep 1 */ + @Transient + @DynamicSerializeElement + private Long swcmg3r1; + + /** Satellite-derived wind computation method swcmg3r1 for group 3 rep 2 */ + @Transient + @DynamicSerializeElement + private Long swcmg3r2; + + /** Wind speed at 10 m; in meters per second; for group 3 rep 1 */ + @Transient + @DynamicSerializeElement + private Double ws10g3r1 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Wind speed at 10 m; in meters per second; for group 3 rep 2 */ + @Transient + @DynamicSerializeElement + private Double ws10g3r2 = IDecoderConstantsN.DOUBLE_MISSING; + + /** Report type */ + // @Column(length=8) + @Transient + @DynamicSerializeElement + @DataURI(position = 6) + private String reportType; + + /** Text of the WMO header */ + @Column(length = 32) + @DynamicSerializeElement + private String wmoHeader; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + /** + * Empty constructor. + */ + public SgwhRecord() { + } + + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + */ + public SgwhRecord(String uri) { + super(uri); + } + + /** + * Get the observation report type. + * + * @return the reportType + */ + public String getReportType() { + return reportType; + } + + /** + * Set the observation report type. + * + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * Get the Satellite Identifier. + * + * @return the Satellite ID + */ + public Long getSaid() { + return said; + } + + /** + * Set the Satellite Identifier. + * + * @param said + * the Satellite ID to set + */ + public void setSaid(Long said) { + this.said = said; + } + + /** + * @param swid + * the Software Identification to get + * + * @return the swid + */ + public Long getSwid() { + return swid; + } + + /** + * @param swid + * the Software Identification to set + */ + public void setSwid(Long swid) { + this.swid = swid; + } + + /** + * @param ogce + * the Identification of originating/generating center to return + * + * @return the ogce + */ + public Long getOgce() { + return ogce; + } + + /** + * @param ogce + * the Identification of originating/generating center to set + */ + public void setOgce(Long ogce) { + this.ogce = ogce; + } + + /** + * @param ssin1 + * the Satellite Sensor Indicator 1 to return + * + * @return the ssin1 + */ + public Long getSsin1() { + return ssin1; + } + + /** + * @param ssin + * the Satellite Sensor Indicator 1 to set + */ + public void setSsin1(Long ssin1) { + this.ssin1 = ssin1; + } + + /** + * @param ssin + * the Satellite Sensor Indicator 2 to return + * + * @return the ssin2 + */ + public Long getSsin2() { + return ssin2; + } + + /** + * @param ssin2 + * the Satellite Sensor Indicator 2 to set + */ + public void setSsin2(Long ssin2) { + this.ssin2 = ssin2; + } + + /** + * @param orbn + * the Orbit number to return + * + * @return the orbn + */ + public Long getOrbn() { + return orbn; + } + + /** + * @param orbn + * the Orbit number to set + */ + public void setOrbn(Long orbn) { + this.orbn = orbn; + } + + /** + * @param selv + * height of station to return + * + * @return the selv + */ + public Double getSelv() { + return selv; + } + + /** + * @param selv + * the height of elevation to set + */ + public void setSelv(Double selv) { + this.selv = selv; + } + + /** + * @param hinc + * height increment to return + * + * @return the hinc + */ + public Double getHinc() { + return hinc; + } + + /** + * @param hinc + * the height increment to set + */ + public void setHinc(Double hinc) { + this.hinc = hinc; + } + + /** + * @return the clath + */ + public Double getClath() { + return clath; + } + + /** + * @param clath + * the clath to set + */ + public void setClath(Double clath) { + this.clath = clath; + } + + /** + * @return the clonh + */ + public Double getClonh() { + return clonh; + } + + /** + * @param clonh + * the clonh to set + */ + public void setClonh(Double clonh) { + this.clonh = clonh; + } + + /** + * @param rsst + * remotely sensed surface type to return + * + * @return the rsst + */ + public Long getRsst() { + return rsst; + } + + /** + * @param rsst + * the remotely sensed surface type to set + */ + public void setRsst(Long rsst) { + this.rsst = rsst; + } + + /** + * @param aetp + * remotely sensed surface type to return + * + * @return the aetp + */ + public Long getAetp() { + return aetp; + } + + /** + * @param aetp + * the remotely sensed surface type to set + */ + public void setAetp(Long aetp) { + this.aetp = aetp; + } + + /** + * @param lsql + * land/sea qualifier to return + * + * @return the lsql + */ + public Long getLsql() { + return lsql; + } + + /** + * @param lsql + * land/sea qualifer to set + */ + public void setLsql(Long lsql) { + this.lsql = lsql; + } + + /** + * @param asfl + * altimeter state flag to return + * + * @return the asfl + */ + public Long getAsfl() { + return asfl; + } + + /** + * @param asfl + * the altimeter state flag to set + */ + public void setAsfl(Long asfl) { + this.asfl = asfl; + } + + /** + * @param rsfl + * radiometer state flag to return + * + * @return the rsfl + */ + public Long getRsfl() { + return rsfl; + } + + /** + * @param rsfl + * the radiometer state flag to set + */ + public void setRsfl(Long rsfl) { + this.rsfl = rsfl; + } + + /** + * @param eeno + * three dimensional error estimate of the navigator orbit to + * return + * + * @return the eeno + */ + public Long getEeno() { + return eeno; + } + + /** + * @param eeno + * three dimensional error estimate of the navigator orbit to set + */ + public void setEeno(Long eeno) { + this.eeno = eeno; + } + + /** + * @param afssgwh + * associated field significance for sgwh to return + * + * @return the afssgwh + */ + public Long getAfssgwh() { + return afssgwh; + } + + /** + * @param afssgwh + * associated field significance for sgwh to set + */ + public void setAfssgwh(Long afssgwh) { + this.afssgwh = afssgwh; + } + + /** + * @param sgwh + * significant wave height to return + * + * @return the sgwh + */ + public Double getSgwh() { + return sgwh; + } + + /** + * @param sgwh + * significant wave height to set + */ + public void setSgwh(Double sgwh) { + this.sgwh = sgwh; + } + + /** + * @param sgwh + * significant wave height (standard deviation) to return + * + * @return the sgwhStd + */ + public Double getSgwhstd() { + return sgwhstd; + } + + /** + * @param sgwh + * significant wave height to set + */ + public void setSgwhstd(Double sgwhstd) { + this.sgwhstd = sgwhstd; + } + + /** + * @param fostsgwh + * first order statistics for sgwh to return + * + * @return the fostsgwh + */ + public Long getFostsgwh() { + return fostsgwh; + } + + /** + * @param fostsgwh + * first order statistics for sgwh to set + */ + public void setFostsgwh(Long fostsgwh) { + this.fostsgwh = fostsgwh; + } + + /** + * @param nvpp + * number of valid points per sec used to derive previous + * parameters to return + * + * @return the nvpp + */ + public Long getNvpp() { + return nvpp; + } + + /** + * @param nvpp + * number of valid points per sec used to derive previous + * parameters to set + */ + public void setNvpp(Long nvpp) { + this.nvpp = nvpp; + } + + /** + * @param tobdg1r1 + * type of band for 1st replication to return + * + * @return the tobdg1r1 + */ + public Long getTobdg1r1() { + return tobdg1r1; + } + + /** + * @param tbnd + * type of band for 1st replication to set + */ + public void setTobdg1r1(Long tobdg1r1) { + this.tobdg1r1 = tobdg1r1; + } + + /** + * @param tobdg1r2 + * type of band for 2nd replication to return + * + * @return the tobdg1r2 + */ + public Long getTobdg1r2() { + return tobdg1r2; + } + + /** + * @param tobdg1r2 + * type of band for 2nd replication to set + */ + public void setTobdg1r2(Long tobdg1r2) { + this.tobdg1r2 = tobdg1r2; + } + + /** + * @param afsbkstg1r1 + * associated field sig. bkst in group1, 1st replication to + * return + * + * @return the afsbkstg1r1 + */ + public Long getAfsbkstg1r1() { + return afsbkstg1r1; + } + + /** + * @param afsbkstg1r1 + * associated field sig. for bkst in group 1, 1st replication to + * set + */ + public void setAfsbkstg1r1(Long afsbkstg1r1) { + this.afsbkstg1r1 = afsbkstg1r1; + } + + /** + * @param afsbkstg1r2 + * associated field sig for bkst in group 1, 2nd replication to + * return + * + * @return the afsbkstg1r2 + */ + public Long getAfsbkstg1r2() { + return afsbkstg1r2; + } + + /** + * @param afsbkstg1r2 + * associated field sig for bkst in group 1, 2nd replication to + * set + */ + public void setAfsbkstg1r2(Long afsbkstg1r2) { + this.afsbkstg1r2 = afsbkstg1r2; + } + + /** + * @param afsselvg1r1 + * associated field sig for selv in group 1, 1st replication to + * return + * + * @return the afsselvg1r1 + */ + public Long getAfsselvg1r1() { + return afsselvg1r1; + } + + /** + * @param afsselvg1r1 + * associated field sig for selv in group 1, 1st replication to + * set + */ + public void setAfsselvg1r1(Long afsselvg1r1) { + this.afsselvg1r1 = afsselvg1r1; + } + + /** + * @param afsselvg1r2b + * associated field sig for selv in group 1, 2nd replication to + * return + * + * @return the afsselvg1r2 + */ + public Long getAfsselvg1r2() { + return afsselvg1r2; + } + + /** + * @param afsselvg1r2b + * associated field sig for selv in group 1 for 2nd replication + * to set + */ + public void setAfsselvg1r2(Long afsselvg1r2) { + this.afsselvg1r2 = afsselvg1r2; + } + + /** + * @param fostbkstg1r1 + * fost for bkst for group 1, 1st replication to return + * + * @return the fostbkstg1r1 + */ + public Long getFostbkstg1r1() { + return fostbkstg1r1; + } + + /** + * @param fostbkstg1r1 + * fost for bkst for group 1, 1st replication to set + */ + public void setFostbkstg1r1(Long fostbkstg1r1) { + this.fostbkstg1r1 = fostbkstg1r1; + } + + /** + * @param fostbkstg1r2 + * fost for bkst for group 1, 2nd replication to return + * + * @return the fostbkstg1r2 fost for bkst for group 1, 2nd replication to + * set + */ + public Long getFostbkstg1r2() { + return fostbkstg1r2; + } + + /** + * @param afsg1r2 + * associated field sig for 1st occurrence in group 1, 2nd + * replication to set + */ + public void setFostbkstg1r2(Long fostbkstg1r2) { + this.fostbkstg1r2 = fostbkstg1r2; + } + + /** + * @param bkstg1r1 + * backscatter to return + * + * @return the bkstg1r1 + */ + public Double getBkstg1r1() { + return bkstg1r1; + } + + /** + * @param bkst + * backscatter to set + */ + public void setBkstg1r1(Double bkstg1r1) { + this.bkstg1r1 = bkstg1r1; + } + + /** + * @param bkststdg1r1 + * backscatter standard deviation to return + * + * @return the bkststdg1r1 + */ + public Double getBkststdg1r1() { + return bkststdg1r1; + } + + /** + * @param bkststdg1r1 + * backscatter standard deviation to set + */ + public void setBkststdg1r1(Double bkststdg1r1) { + this.bkststdg1r1 = bkststdg1r1; + } + + /** + * @param bkstg1r2 + * backscatter to return + * + * @return the bkstg1r2 + */ + public Double getBkstg1r2() { + return bkstg1r2; + } + + /** + * @param bkstg1r2 + * backscatter to set + */ + public void setBkstg1r2(Double bkstg1r2) { + this.bkstg1r2 = bkstg1r2; + } + + /** + * @param bkststdg1r2 + * backscatter standard deviation to return + * + * @return the bkststdg1r2 + */ + public Double getBkststdg1r2() { + return bkststdg1r2; + } + + /** + * @param bkststdg1r + * backscatter standard deviation to set + */ + public void setBkststdg1r2(Double bkststdg1r2) { + this.bkststdg1r2 = bkststdg1r2; + } + + /** + * @param fostselvg1r1 + * fost for selv for group 1, 1st replication to return + * + * @return the fostselvg1r1 + */ + public Long getFostselvg1r1() { + return fostselvg1r1; + } + + /** + * @param fostselvg1r1 + * fost for selv for group 1, 1st replication to set + */ + public void setFostselvg1r1(Long fostselvg1r1) { + this.fostselvg1r1 = fostselvg1r1; + } + + /** + * @param fostselvg1r2 + * fost for selv for group 1, 2nd replication to return + * + * @return the fostselvg1r2 + */ + public Long getFostselvg1r2() { + return fostselvg1r2; + } + + /** + * @param fostselvg1r2 + * fost for selv for 1st occurrence in group 1, 2nd replication + * to set + */ + public void setFostselvg1r2(Long fostselvg1r2) { + this.fostselvg1r2 = fostselvg1r2; + } + + /** + * @param selvg1r1 + * elevation of satellite in group 1 replication 1 to return + * + * @return the selvg1r1 + */ + public Double getSelvg1r1() { + return selvg1r1; + } + + /** + * @param selv + * elevation of satellite in group 1 replication 1 to set + */ + public void setSelvg1r1(Double selvg1r1) { + this.selvg1r1 = selvg1r1; + } + + /** + * @param selvg1r2 + * elevation of satellite in group 1 replication 2 to return + * + * @return the selvg1r2 + */ + public Double getSelvg1r2() { + return selvg1r2; + } + + /** + * @param selvg1r2 + * elevation of satellite in group 1 replication 2 to set + */ + public void setSelvg1r2(Double selvg1r2) { + this.selvg1r2 = selvg1r2; + } + + /** + * @param hincg1r1 + * height increment in group 1 replication 1 to return + * + * @return the hincg1r1 + */ + public Double getHincg1r1() { + return hincg1r1; + } + + /** + * @param hincg1r1 + * height increment in group 1 replication 1 to set + */ + public void setHincg1r1(Double hincg1r1) { + this.hincg1r1 = hincg1r1; + } + + /** + * @param hincg1r2 + * height increment in group 1 replication 2 to return + * + * @return the hincg1r2 + */ + public Double getHincg1r2() { + return hincg1r2; + } + + /** + * @param hincg1r1 + * height increment in group 1 replication 2 to set + */ + public void setHincg1r2(Double hincg1r2) { + this.hincg1r2 = hincg1r2; + } + + /** + * @param selvstdg1r1 + * std of elevation of satellite in group 1 replication 1 to + * return + * + * @return the selvstdg1r1 + */ + public Double getSelvstdg1r1() { + return selvstdg1r1; + } + + /** + * @param selvstdg1r1 + * elevation of satellite in group 1 replication 2 to set + */ + public void setSelvstdg1r1(Double selvstdg1r1) { + this.selvstdg1r1 = selvstdg1r1; + } + + /** + * @param selvstdg1r2 + * std of elevation of satellite in group 1 replication 1 to + * return + * + * @return the selvstdg1r2 + */ + public Double getSelvstdg1r2() { + return selvstdg1r2; + } + + /** + * @param selvstdg1r2 + * elevation of satellite in group 1 replication 2 to set + */ + public void setSelvstdg1r2(Double selvstdg1r2) { + this.selvstdg1r2 = selvstdg1r2; + } + + /** + * @param nvppg1r1 + * number of valid points per sec used to derive previous + * parameters in group 1 replication 1 to return + * + * @return the nvppg1r1 + */ + public Long getNvppg1r1() { + return nvppg1r1; + } + + /** + * @param nvppg1r1 + * number of valid points per sec used to derive previous + * parameters in group 1 replication 1 to set + */ + public void setNvppg1r1(Long nvppg1r1) { + this.nvppg1r1 = nvppg1r1; + } + + /** + * @param nvppg1r2 + * number of valid points per sec used to derive previous + * parameters in group 1 replication 2 to return + * + * @return the nvppg1r1 + */ + public Long getNvppg1r2() { + return nvppg1r2; + } + + /** + * @param nvppg1r2 + * number of valid points per sec used to derive previous + * parameters in group 1 replication 2 to set + */ + public void setNvppg1r2(Long nvppg1r2) { + this.nvppg1r2 = nvppg1r2; + } + + /** + * @param afssona + * Associated Field Significance of Square of the off-nadir angle + * to return + * + * @return the afssona + */ + public Long getAfssona() { + return afssona; + } + + /** + * @param afssona + * Assocaited Field Significance of sona to set + */ + public void setAfssona(Long afssona) { + this.afssona = afssona; + } + + /** + * @param sona + * Square of the off-nadir angle to return + * + * @return the sona + */ + public Double getSona() { + return sona; + } + + /** + * @param sona + * Square of the off-nadir angle to set + */ + public void setSona(Double sona) { + this.sona = sona; + } + + /** + * @param mefrg2r1 + * mean frequency in hz for group 2 rep 1 to return + * + * @return the mefrg2r1 + */ + public Double getMefrg2r1() { + return mefrg2r1; + } + + /** + * @param mefrg2r1 + * mean frequency for group 2 rep 1 to set + */ + public void setMefrg2r1(Double mefrg2r1) { + this.mefrg2r1 = mefrg2r1; + } + + /** + * @param mefrg2r2 + * mean frequency in hz for group 2 rep 2 to return + * + * @return the mefrg2r2 + */ + public Double getMefrg2r2() { + return mefrg2r2; + } + + /** + * @param mefrg2r2 + * mean frequency for group 2 rep 2 to set + */ + public void setMefrg2r2(Double mefrg2r2) { + this.mefrg2r2 = mefrg2r2; + } + + /** + * @param mefrg2r3 + * mean frequency in hz for group 2 rep 3 to return + * + * @return the mefrg2r3 + */ + public Double getMefrg2r3() { + return mefrg2r3; + } + + /** + * @param mefrg2r3 + * mean frequency for group 2 rep 3 to set + */ + public void setMefrg2r3(Double mefrg2r3) { + this.mefrg2r3 = mefrg2r3; + } + + /** + * @param afstmbrg2r1 + * associated field sig for tmbr in group 2, 1st replication to + * return + * + * @return the afstmbrg2r1 + */ + public Long getAfstmbrg2r1() { + return afstmbrg2r1; + } + + /** + * @param afstmbrg2r1 + * associated field sig for tmbr in group 2, 1st replication to + * set + */ + public void setAfstmbrg2r1(Long afstmbrg2r1) { + this.afstmbrg2r1 = afstmbrg2r1; + } + + /** + * @param afstmbrg2r2b + * associated field sig for tmbr in group 2, 2nd replication to + * return + * + * @return the afstmbrg2r2 + */ + public Long getAfstmbrg2r2() { + return afstmbrg2r2; + } + + /** + * @param afstmbrg2r2b + * associated field sig for tmbr in group 2 for 2nd replication + * to set + */ + public void setAfstmbrg2r2(Long afstmbrg2r2) { + this.afstmbrg2r2 = afstmbrg2r2; + } + + /** + * @param afstmbrg2r3 + * associated field sig for tmbr in group 2, 3rd replication to + * return + * + * @return the afstmbrg2r3 + */ + public Long getAfstmbrg2r3() { + return afstmbrg2r3; + } + + /** + * @param afstmbrg2r3 + * associated field sig for tmbr in group 2, 3rd replication to + * set + */ + public void setAfstmbrg2r3(Long afstmbrg2r3) { + this.afstmbrg2r3 = afstmbrg2r3; + } + + /** + * @param tmbrg2r1 + * brightness temperature in K for group 2 rep 1 to return + * + * @return the tmbrg2r1 + */ + public Double getTmbrg2r1() { + return tmbrg2r1; + } + + /** + * @param tmbrg2r1 + * brightness temperaturefor group 2 rep 1 to set + */ + public void setTmbrg2r1(Double tmbrg2r1) { + this.tmbrg2r1 = tmbrg2r1; + } + + /** + * @param tmbrg2r2 + * brightness temperature in K for group 2 rep 2 to return + * + * @return the tmbrg2r2 + */ + public Double getTmbrg2r2() { + return tmbrg2r2; + } + + /** + * @param tmbrg2r2 + * brightness temperaturefor group 2 rep 2 to set + */ + public void setTmbrg2r2(Double tmbrg2r2) { + this.tmbrg2r2 = tmbrg2r2; + } + + /** + * @param tmbrg2r3 + * brightness temperature in K for group 2 rep 3 to return + * + * @return the tmbrg2r3 + */ + public Double getTmbrg2r3() { + return tmbrg2r3; + } + + /** + * @param tmbrg2r3 + * mean frequency for group 2 rep 3 to set + */ + public void setTmbrg2r3(Double tmbrg2r3) { + this.tmbrg2r3 = tmbrg2r3; + } + + /** + * @param swcmg3r1 + * satellite-derived wind computation method for group 3 rep 1 to + * return + * + * @return the swcmg3r1 + */ + public Long getSwcmg3r1() { + return swcmg3r1; + } + + /** + * @param swcmg3r1 + * satellite-derived wind computation method for group 3 rep 1 to + * set + */ + public void setSwcmg3r1(Long swcmg3r1) { + this.swcmg3r1 = swcmg3r1; + } + + /** + * @param swcmg3r2 + * satellite-derived wind computation method for group 3 rep 2 to + * return + * + * @return the swcmg3r2 + */ + public Long getSwcmg3r2() { + return swcmg3r2; + } + + /** + * @param swcmg3r2 + * satellite-derived wind computation method for group 3 rep 2 to + * set + */ + public void setSwcmg3r2(Long swcmg3r2) { + this.swcmg3r2 = swcmg3r2; + } + + /** + * @param ws10g3r1 + * wind speed at 10 m for group 3 rep 1 to return + * + * @return the ws10g3r1 + */ + public Double getWs10g3r1() { + return ws10g3r1; + } + + /** + * @param ws10g3r1 + * wind speed at 10 m to set + */ + public void setWs10g3r1(Double ws10g3r1) { + this.ws10g3r1 = ws10g3r1; + } + + /** + * @param ws10g3r1 + * wind speed at 10 m for group 3 rep 2 to return + * + * @return the ws10g3r2 + */ + public Double getWs10g3r2() { + return ws10g3r2; + } + + /** + * @param ws10g3r1 + * wind speed at 10 m to set + */ + public void setWs10g3r2(Double ws10g3r2) { + this.ws10g3r2 = ws10g3r2; + } + + /** + * @param rwvc + * radiometer liquid content to return + * + * @return the rwvc + */ + public Double getRwvc() { + return rwvc; + } + + /** + * @param rwvc + * radiometer liquid content to set + */ + public void setRwvc(Double rwvc) { + this.rwvc = rwvc; + } + + /** + * @param rlqc + * radiometer liquid content to return + * + * @return the rlqc + */ + public Double getRlqc() { + return rlqc; + } + + /** + * @param rlqc + * radiometer liquid content to set + */ + public void setRlqc(Double rlqc) { + this.rlqc = rlqc; + } + + /** + * @return the wmoHeader + */ + public String getWmoHeader() { + return wmoHeader; + } + + /** + * @param wmoHeader + * the wmoHeader to set + */ + public void setWmoHeader(String wmoHeader) { + this.wmoHeader = wmoHeader; + } + + /** + * @return the obsTime + */ + public Calendar getObsTime() { + return obsTime; + } + + /** + * @param obsTime + * the obsTime to set + */ + public void setObsTime(Calendar obsTime) { + this.obsTime = obsTime; + } + + /** + * Get the value and units of a named parameter within this observation. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Amount getValue(String paramName) { + return null; + } + + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public String getString(String paramName) { + return null; + } + + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Collection getValues(String paramName) { + return null; + } + + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } + + @Override + public void setDataURI(String dataURI) { + identifier = dataURI; + } + + @Override + public String[] getStrings(String paramName) { + return null; + } + + @Override + public Date getPersistenceTime() { + return this.dataTime.getRefTime(); + + } + + @Override + public void setPersistenceTime(Date persistTime) { + // TODO Auto-generated method stub + + } + + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + + } @Override @Column @@ -1733,4 +1673,8 @@ public class SgwhRecord extends PluginDataObject implements IDecoderGettable, return super.getDataURI(); } + @Override + public String getPluginName() { + return "sgwh"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java index a85a13e802..9ff61d069f 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java @@ -1,26 +1,3 @@ -/** - * SgwhvRecord - * This java class performs the mapping to the database for BUFR Sgwhv. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date			Ticket#		Engineer	Description
- * ------------ -----------	----------- --------------------------
- * Aug23 2011	   		    Chin Chen	Initial Coding (Following BufrsgwhvRecord to refactor for 
- * 										saving data to HDF5)
- * Apr 4, 2013        1846 bkowal      Added an index on refTime and forecastTime
- * Apr 8, 2013   1293       bkowal      Removed references to hdffileid.
- * Apr 12, 2013 1857        bgonzale    Added SequenceGenerator annotation.
- * May 07, 2013 1869       	bsteffen    Remove dataURI column from
- *                                      PluginDataObject.
- *
- * 
- * - * @author chin chen - * @version 1.0 - */ package gov.noaa.nws.ncep.common.dataplugin.sgwhv; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -50,6 +27,31 @@ import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; +/** + * SgwhvRecord + * This java class performs the mapping to the database for BUFR Sgwhv. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#     Engineer    Description
+ * ------------ ----------- ----------- --------------------------
+ * Aug23 2011               Chin Chen   Initial Coding (Following
+ *                                      BufrsgwhvRecord to refactor for  saving
+ *                                      data to HDF5)
+ * Apr 04, 2013 1846        bkowal      Added an index on refTime and
+ *                                      forecastTime
+ * Apr 08, 2013 1293        bkowal      Removed references to hdffileid.
+ * 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
+ * 
+ * + * @author chin chen + * @version 1.0 + */ @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "sgwhvseq") @Table(name = "sgwhv", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -57,486 +59,484 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "sgwhv", - indexes = { - @Index(name = "sgwhv_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "sgwhv", indexes = { @Index(name = "sgwhv_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class SgwhvRecord extends PluginDataObject implements IDecoderGettable, - IPointData, IPersistable { - private static final long serialVersionUID = 1L; - private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; - private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; + IPointData, IPersistable { + private static final long serialVersionUID = 1L; - /** Satellite Identification */ - @Column - /* - * Height of waves are from blended TOPEX/Poseidon, Jason-1, ERS 1, ERS 2m - * GPO and Envisat ocean altimetry satellites, therefore satelliteId should - * be a primary key. Data is from Navoceano. SGWH is from Jason-1 and has - * satelliteID of 260. SGWH2 is from Jason-2 and has satelliteId of 261. - * SGWHE is from Envisat and has satelliteId of 60. - */ - @DataURI(position = 4) - @DynamicSerializeElement - private Long satelliteId; + private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; - /** Observation time */ - @Column - @DataURI(position = 1) - @DynamicSerializeElement - private Calendar obsTime; + private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; - /** Latitude */ - @Column - @DataURI(position = 2) - @DynamicSerializeElement - private Double lat; + /** Satellite Identification */ + @Column + /* + * Height of waves are from blended TOPEX/Poseidon, Jason-1, ERS 1, ERS 2m + * GPO and Envisat ocean altimetry satellites, therefore satelliteId should + * be a primary key. Data is from Navoceano. SGWH is from Jason-1 and has + * satelliteID of 260. SGWH2 is from Jason-2 and has satelliteId of 261. + * SGWHE is from Envisat and has satelliteId of 60. + */ + @DataURI(position = 4) + @DynamicSerializeElement + private Long satelliteId; - /** Longitude */ - @Column - @DataURI(position = 3) - @DynamicSerializeElement - private Double lon; + /** Observation time */ + @Column + @DataURI(position = 1) + @DynamicSerializeElement + private Calendar obsTime; - /** Wind speed at 10 m (m/s) */ - @Transient - @DynamicSerializeElement - private Double wspd10; + /** Latitude */ + @Column + @DataURI(position = 2) + @DynamicSerializeElement + private Double lat; - /** Height of waves (m) */ - @Transient - @DynamicSerializeElement - private Double htwaves; + /** Longitude */ + @Column + @DataURI(position = 3) + @DynamicSerializeElement + private Double lon; - /** Standard Deviation of significant wave height (m) */ - @Transient - @DynamicSerializeElement - private Double sgwhSd; + /** Wind speed at 10 m (m/s) */ + @Transient + @DynamicSerializeElement + private Double wspd10; - /** Altitude (Platform to ellipsoid) (m) */ - @Transient - @DynamicSerializeElement - private Double altitude; + /** Height of waves (m) */ + @Transient + @DynamicSerializeElement + private Double htwaves; - /** Number of valid points per second used to derive previous parameters */ - @Transient - @DynamicSerializeElement - private Long peak; + /** Standard Deviation of significant wave height (m) */ + @Transient + @DynamicSerializeElement + private Double sgwhSd; - /** Altitude correction (ionosphere) */ - @Transient - @DynamicSerializeElement - private Double altCorrI; + /** Altitude (Platform to ellipsoid) (m) */ + @Transient + @DynamicSerializeElement + private Double altitude; - /** Altitude correction (dry troposphere) */ - @Transient - @DynamicSerializeElement - private Double altCorrD; + /** Number of valid points per second used to derive previous parameters */ + @Transient + @DynamicSerializeElement + private Long peak; - /** Altitude correction (wet troposphere) */ - @Transient - @DynamicSerializeElement - private Double altCorrW; + /** Altitude correction (ionosphere) */ + @Transient + @DynamicSerializeElement + private Double altCorrI; - /** Open loop correction (auto gain control) in decibels for group 1 rep 2 */ - @Transient - @DynamicSerializeElement - private Double loopCorr; + /** Altitude correction (dry troposphere) */ + @Transient + @DynamicSerializeElement + private Double altCorrD; - /** Backscatter in decibels */ - @Transient - @DynamicSerializeElement - private Double bkst; + /** Altitude correction (wet troposphere) */ + @Transient + @DynamicSerializeElement + private Double altCorrW; - /** Report type */ - // @Column(length=8) - @Transient - @DynamicSerializeElement - @DataURI(position=5) - private String reportType; + /** Open loop correction (auto gain control) in decibels for group 1 rep 2 */ + @Transient + @DynamicSerializeElement + private Double loopCorr; - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; + /** Backscatter in decibels */ + @Transient + @DynamicSerializeElement + private Double bkst; - /** - * Default constructor. - */ - public SgwhvRecord() { - Double doubleRmissd = Double.parseDouble(String.valueOf(RMISSD)); - Long longImissd = Long.parseLong(String.valueOf(IMISSD)); - this.reportType = "BUFRSGWHV"; - this.satelliteId = longImissd; - this.lat = doubleRmissd; - this.lon = doubleRmissd; - this.altCorrD = doubleRmissd; - this.wspd10 = doubleRmissd; - this.htwaves = doubleRmissd; - this.sgwhSd = doubleRmissd; - this.altitude = doubleRmissd; - this.altCorrI = doubleRmissd; - this.altCorrD = doubleRmissd; - this.altCorrW = doubleRmissd; - this.loopCorr = doubleRmissd; - this.bkst = doubleRmissd; - this.peak = longImissd; - } + /** Report type */ + // @Column(length=8) + @Transient + @DynamicSerializeElement + @DataURI(position = 5) + private String reportType; - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - */ - public SgwhvRecord(String uri) { - super(uri); - } + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; - /** - * Get the observation report type. - * - * @return the reportType - */ - public String getReportType() { - return reportType; - } + /** + * Default constructor. + */ + public SgwhvRecord() { + Double doubleRmissd = Double.parseDouble(String.valueOf(RMISSD)); + Long longImissd = Long.parseLong(String.valueOf(IMISSD)); + this.reportType = "BUFRSGWHV"; + this.satelliteId = longImissd; + this.lat = doubleRmissd; + this.lon = doubleRmissd; + this.altCorrD = doubleRmissd; + this.wspd10 = doubleRmissd; + this.htwaves = doubleRmissd; + this.sgwhSd = doubleRmissd; + this.altitude = doubleRmissd; + this.altCorrI = doubleRmissd; + this.altCorrD = doubleRmissd; + this.altCorrW = doubleRmissd; + this.loopCorr = doubleRmissd; + this.bkst = doubleRmissd; + this.peak = longImissd; + } - /** - * Set the observation report type. - * - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + */ + public SgwhvRecord(String uri) { + super(uri); + } - /** - * Get the Satellite Identifier. - * - * @return the Satellite ID - */ - public Long getSatelliteId() { - return satelliteId; - } + /** + * Get the observation report type. + * + * @return the reportType + */ + public String getReportType() { + return reportType; + } - /** - * @param satelliteId - * the Satellite Identifier to set - */ - public void setSatelliteId(Long satelliteId) { - this.satelliteId = satelliteId; - } + /** + * Set the observation report type. + * + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } - /** - * @return the lat - */ - public Double getLat() { - return lat; - } + /** + * Get the Satellite Identifier. + * + * @return the Satellite ID + */ + public Long getSatelliteId() { + return satelliteId; + } - /** - * @param lat - * the latitude (coarse) to set - */ - public void setLat(Double lat) { - this.lat = lat; - } + /** + * @param satelliteId + * the Satellite Identifier to set + */ + public void setSatelliteId(Long satelliteId) { + this.satelliteId = satelliteId; + } - /** - * @return the lon - */ - public Double getLon() { - return lon; - } + /** + * @return the lat + */ + public Double getLat() { + return lat; + } - /** - * @param lon - * the longitude (coarse) to set - */ - public void setLon(Double lon) { - this.lon = lon; - } + /** + * @param lat + * the latitude (coarse) to set + */ + public void setLat(Double lat) { + this.lat = lat; + } - /** - * @param wspd10 - * wind speed at 10 m to return - */ - public Double getWspd10() { - return wspd10; - } + /** + * @return the lon + */ + public Double getLon() { + return lon; + } - /** - * @param wspd10 - * wind speed at 10 m to set - */ - public void setWspd10(Double wspd10) { - this.wspd10 = wspd10; - } + /** + * @param lon + * the longitude (coarse) to set + */ + public void setLon(Double lon) { + this.lon = lon; + } - /** - * @param htwaves - * height of waves to return - */ - public Double getHtwaves() { - return htwaves; - } + /** + * @param wspd10 + * wind speed at 10 m to return + */ + public Double getWspd10() { + return wspd10; + } - /** - * @param htwaves - * height of waves to set - */ - public void setHtwaves(Double htwaves) { - this.htwaves = htwaves; - } + /** + * @param wspd10 + * wind speed at 10 m to set + */ + public void setWspd10(Double wspd10) { + this.wspd10 = wspd10; + } - /** - * @param SgwhSd - * SGWH standard deviation to return - */ - /** - * @return the SgwhSd - */ - public Double getSgwhSd() { - return sgwhSd; - } + /** + * @param htwaves + * height of waves to return + */ + public Double getHtwaves() { + return htwaves; + } - /** - * @param SgwhSd - * SGWH standard deviation to set - */ - public void setSgwhSd(Double sgwhSd) { - this.sgwhSd = sgwhSd; - } + /** + * @param htwaves + * height of waves to set + */ + public void setHtwaves(Double htwaves) { + this.htwaves = htwaves; + } - /** - * @param altitude - * altitude (platform to ellipsoid) m - */ - public Double getAltitude() { - return altitude; - } + /** + * @param SgwhSd + * SGWH standard deviation to return + */ + /** + * @return the SgwhSd + */ + public Double getSgwhSd() { + return sgwhSd; + } - /** - * @param altitude - * altitude to set - */ - public void setAltitude(Double altitude) { - this.altitude = altitude; - } + /** + * @param SgwhSd + * SGWH standard deviation to set + */ + public void setSgwhSd(Double sgwhSd) { + this.sgwhSd = sgwhSd; + } - /** - * @param peak - * peakiness to return - */ - /** - * @return the peak - */ - public Long getPeak() { - return peak; - } + /** + * @param altitude + * altitude (platform to ellipsoid) m + */ + public Double getAltitude() { + return altitude; + } - /** - * @param peak - * peakiness to set - */ - public void setPeak(Long peak) { - this.peak = peak; - } + /** + * @param altitude + * altitude to set + */ + public void setAltitude(Double altitude) { + this.altitude = altitude; + } - /** - * @param altCorrI - * altitude correction (ionosphere) to return - */ - /** - * @return the altCorrI - */ - public Double getAltCorrI() { - return altCorrI; - } + /** + * @param peak + * peakiness to return + */ + /** + * @return the peak + */ + public Long getPeak() { + return peak; + } - /** - * @param altCorrI - * altitude correction (ionosphere) (m) to set - */ - public void setAltCorrI(Double altCorrI) { - this.altCorrI = altCorrI; - } + /** + * @param peak + * peakiness to set + */ + public void setPeak(Long peak) { + this.peak = peak; + } - /** - * @param altCorrD - * altitude correction (dry troposphere) to return - */ - /** - * @return the altCorrD - */ - public Double getAltCorrD() { - return altCorrD; - } + /** + * @param altCorrI + * altitude correction (ionosphere) to return + */ + /** + * @return the altCorrI + */ + public Double getAltCorrI() { + return altCorrI; + } - /** - * @param altCorrD - * altitude correction (dry troposphere) (m) to set - */ - public void setAltCorrD(Double altCorrD) { - this.altCorrD = altCorrD; - } + /** + * @param altCorrI + * altitude correction (ionosphere) (m) to set + */ + public void setAltCorrI(Double altCorrI) { + this.altCorrI = altCorrI; + } - /** - * @param altCorrW - * altitude correction (wet troposphere) to return - */ - /** - * @return the altCorrW - */ - public Double getAltCorrW() { - return altCorrW; - } + /** + * @param altCorrD + * altitude correction (dry troposphere) to return + */ + /** + * @return the altCorrD + */ + public Double getAltCorrD() { + return altCorrD; + } - /** - * @param altCorrI - * altitude correction (wet troposphere) (m) to set - */ - public void setAltCorrW(Double altCorrW) { - this.altCorrW = altCorrW; - } + /** + * @param altCorrD + * altitude correction (dry troposphere) (m) to set + */ + public void setAltCorrD(Double altCorrD) { + this.altCorrD = altCorrD; + } - /** - * @param loopCorr - * open loop correction (auto gain control) (db) to return - */ - /** - * @return the loopCorr - */ - public Double getLoopCorr() { - return loopCorr; - } + /** + * @param altCorrW + * altitude correction (wet troposphere) to return + */ + /** + * @return the altCorrW + */ + public Double getAltCorrW() { + return altCorrW; + } - /** - * @param loopCorr - * open loop correction (auto gain control) (db) to set - */ - public void setLoopCorr(Double loopCorr) { - this.loopCorr = loopCorr; - } + /** + * @param altCorrI + * altitude correction (wet troposphere) (m) to set + */ + public void setAltCorrW(Double altCorrW) { + this.altCorrW = altCorrW; + } - /** - * @param bkst - * backscatter to return - */ - /** - * @return the bkst - */ - public Double getBkst() { - return bkst; - } + /** + * @param loopCorr + * open loop correction (auto gain control) (db) to return + */ + /** + * @return the loopCorr + */ + public Double getLoopCorr() { + return loopCorr; + } - /** - * @param bkst - * backscatter to set - */ - public void setBkst(Double bkst) { - this.bkst = bkst; - } + /** + * @param loopCorr + * open loop correction (auto gain control) (db) to set + */ + public void setLoopCorr(Double loopCorr) { + this.loopCorr = loopCorr; + } - /** - * @return the obsTime - */ - public Calendar getObsTime() { - return obsTime; - } + /** + * @param bkst + * backscatter to return + */ + /** + * @return the bkst + */ + public Double getBkst() { + return bkst; + } - /** - * @param obsTime - * the obsTime to set - */ - public void setObsTime(Calendar obsTime) { - this.obsTime = obsTime; - } + /** + * @param bkst + * backscatter to set + */ + public void setBkst(Double bkst) { + this.bkst = bkst; + } - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - return null; - } + /** + * @return the obsTime + */ + public Calendar getObsTime() { + return obsTime; + } - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - return null; - } + /** + * @param obsTime + * the obsTime to set + */ + public void setObsTime(Calendar obsTime) { + this.obsTime = obsTime; + } - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } + /** + * Get the value and units of a named parameter within this observation. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Amount getValue(String paramName) { + return null; + } - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public String getString(String paramName) { + return null; + } - @Override - public void setDataURI(String dataURI) { - identifier = dataURI; - } + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Collection getValues(String paramName) { + return null; + } - @Override - public String[] getStrings(String paramName) { - return null; - } + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } - @Override - public Date getPersistenceTime() { - return this.dataTime.getRefTime(); - } + @Override + public void setDataURI(String dataURI) { + identifier = dataURI; + } - @Override - public void setPersistenceTime(Date persistTime) { - // TODO Auto-generated method stub + @Override + public String[] getStrings(String paramName) { + return null; + } - } + @Override + public Date getPersistenceTime() { + return this.dataTime.getRefTime(); + } - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } + @Override + public void setPersistenceTime(Date persistTime) { + // TODO Auto-generated method stub - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - } + } + + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + } @Override @Column @@ -544,4 +544,9 @@ public class SgwhvRecord extends PluginDataObject implements IDecoderGettable, public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "sgwhv"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.solarimage/src/gov/noaa/nws/ncep/common/dataplugin/solarimage/SolarImageRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.solarimage/src/gov/noaa/nws/ncep/common/dataplugin/solarimage/SolarImageRecord.java index 4f118d329d..95fe8e1e43 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.solarimage/src/gov/noaa/nws/ncep/common/dataplugin/solarimage/SolarImageRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.solarimage/src/gov/noaa/nws/ncep/common/dataplugin/solarimage/SolarImageRecord.java @@ -32,13 +32,17 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * SOFTWARE HISTORY * Date Ticket# Engineer Description * ------------ ---------- ---------------- -------------------------- - * 12/05/2012 865 sgurung, qzhou Initial creation. - * 01/07/2013 865 qzhou Added "Site" for Halpha. - * 01/28/2013 865 qzhou Changed float to double for intTime. - * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * Dec 05, 2012 865 sgurung, qzhou Initial creation. + * Jan 07, 2013 865 qzhou Added "Site" for Halpha. + * Jan 28, 2013 865 qzhou Changed float to double for + * intTime. + * 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 * * * @@ -53,12 +57,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "solarimage", - indexes = { - @Index(name = "solarimage_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "solarimage", indexes = { @Index(name = "solarimage_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize @@ -103,7 +103,7 @@ public class SolarImageRecord extends PersistablePluginDataObject { @DynamicSerializeElement @XmlAttribute private Double intTime; - + /** * Site */ @@ -112,7 +112,7 @@ public class SolarImageRecord extends PersistablePluginDataObject { @DynamicSerializeElement @XmlAttribute private String site; - + /** * hdu containing image data */ @@ -120,16 +120,16 @@ public class SolarImageRecord extends PersistablePluginDataObject { @DynamicSerializeElement @XmlAttribute private int imageHDUNum; - + /** * report type */ @DataURI(position = 6) - @Column + @Column @DynamicSerializeElement @XmlAttribute private String reportType; - + /** * raw data */ @@ -167,7 +167,6 @@ public class SolarImageRecord extends PersistablePluginDataObject { public void setInstrument(String instrument) { this.instrument = instrument; } - /** * @return the satellite @@ -198,7 +197,7 @@ public class SolarImageRecord extends PersistablePluginDataObject { public void setWavelength(String wavelength) { this.wavelength = wavelength; } - + /** * @return the intTime */ @@ -213,7 +212,7 @@ public class SolarImageRecord extends PersistablePluginDataObject { public void setIntTime(Double intTime) { this.intTime = intTime; } - + /** * @return the site */ @@ -228,7 +227,7 @@ public class SolarImageRecord extends PersistablePluginDataObject { public void setSite(String site) { this.site = site; } - + /** * @return the reportType */ @@ -250,20 +249,20 @@ public class SolarImageRecord extends PersistablePluginDataObject { public int getImageHDUNum() { return imageHDUNum; } - + /** * @param imageHDUNum * the hdu containing image data */ public void setImageHDUNum(int hduId) { this.imageHDUNum = hduId; - } - + } + @Override public IDecoderGettable getDecoderGettable() { return null; } - + /** * @return the raw_data */ @@ -280,24 +279,29 @@ public class SolarImageRecord extends PersistablePluginDataObject { } public void retrieveFromDataStore(IDataStore dataStore) { - + try { IDataRecord[] dataRec = dataStore.retrieve(getDataURI()); - for (int i = 0; i < dataRec.length; i++) { - if (dataRec[i].getName().equals(SolarImageRecord.RAW_DATA)) { - raw_data = (((ByteDataRecord) dataRec[i]).getByteData()); - } + for (IDataRecord element : dataRec) { + if (element.getName().equals(SolarImageRecord.RAW_DATA)) { + raw_data = (((ByteDataRecord) element).getByteData()); + } } } catch (Exception se) { se.printStackTrace(); } } - + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "solarimage"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java index 5ca4bcd6ae..c659918d9a 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java @@ -1,26 +1,3 @@ -/** - * - * SshaRecord - * - * This java class performs the mapping to the database for Ssha. - * - *
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    	Engineer    Description
- * ------- 		------- 	--------	-----------
- * Sep 2011	   		        Chin Chen	Initial Coding (Following BufrsshaRecord to refactor for 
- * 										saving data to HDF5)
- * Apr 4, 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.
- *
- * 
- * - * @author Chin Chen - * @version 1.0 - * - */ package gov.noaa.nws.ncep.common.dataplugin.ssha; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -51,6 +28,30 @@ import com.raytheon.uf.common.pointdata.PointDataView; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; +/** + * SshaRecord + * + * This java class performs the mapping to the database for Ssha. + * + *
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#     Engineer    Description
+ * ------------ --------    --------    ----------------------------------------------
+ * Sep 2011                 Chin Chen   Initial Coding (Following BufrsshaRecord
+ *                                      to refactor for  saving data to HDF5)
+ * 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
+ * 
+ * + * @author Chin Chen + * @version 1.0 + * + */ @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "sshaseq") @Table(name = "ssha", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -58,2511 +59,2509 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "ssha", - indexes = { - @Index(name = "ssha_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "ssha", indexes = { @Index(name = "ssha_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize public class SshaRecord extends PersistablePluginDataObject implements - IDecoderGettable, IPointData, IPersistable { - private static final long serialVersionUID = 1L; - private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; - private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; - - /** Satellite Identification */ - @Column - /* - * Sea surface height anomalies are from blended TOPEX/Poseidon, Jason-1, - * ERS 1, ERS 2m GPO and Envisat ocean altimetry satellites, therefore said - * should be a primary key. - */ - @DataURI(position = 4) - @DynamicSerializeElement - private Long said; - - /** Satellite Instruments */ - @Column - @DynamicSerializeElement - private Long siid; - - /** Station Acquisition */ - @Column(length = 20) - @DynamicSerializeElement - private String staq; - - /** Software Identification and Version Number */ - @Column(length = 12) - @DynamicSerializeElement - private String softv; - - /** Satellite Cycle Number */ - @Column - @DynamicSerializeElement - private Long sacyln; - - /** Orbit Number */ - @Column - @DataURI(position = 5) - @DynamicSerializeElement - private Long orbn; - - /** Numerical Model Identifier */ - @Column(length = 16) - @DynamicSerializeElement - private String numid; - - /** Observation time */ - @Column - @DataURI(position = 1) - @DynamicSerializeElement - private Calendar obsTime; - - /** Latitude */ - @Column - @DataURI(position = 2) - @DynamicSerializeElement - private Double clath; - - /** Longitude */ - @Column - @DataURI(position = 3) - @DynamicSerializeElement - private Double clonh; - - /** Remotely Sensed Surface Type */ - @Transient - @DynamicSerializeElement - private Long rsst; - - /** Altimeter Echo Type */ - @Transient - @DynamicSerializeElement - private Long aetp; - - /** Radiometer Sensed Surface Type */ - @Transient - @DynamicSerializeElement - private Long dsst; - - /** Interpolation Flag */ - @Transient - @DynamicSerializeElement - private Long intf; - - /** Three-dimensional Error Estimate of the Navigator Orbit */ - @Transient - @DynamicSerializeElement - private Long eeno; - - /** Altimeter State Flag */ - @Transient - @DynamicSerializeElement - private Long asfl; - - /** Altimeter Data Quality Flag */ - @Transient - @DynamicSerializeElement - private Long adqf; - - /** Altimeter Correction Quality Flag */ - @Transient - @DynamicSerializeElement - private Long arqf; - - /** Altimeter Rain Flag */ - @Transient - @DynamicSerializeElement - private Long alrf; - - /** Radioimeter State Flag */ - @Transient - @DynamicSerializeElement - private Long rsfl; - - /** Radioimeter Data Quality Flag */ - @Transient - @DynamicSerializeElement - private Long rdqf; - - /** Radioimeter Brightness Temperature Interpretation */ - @Transient - @DynamicSerializeElement - private Long rbif; - - /** Ice Presence Indicator */ - @Transient - @DynamicSerializeElement - private Long ipin; - - /** Auxilliary Altimeter State Flags */ - @Transient - @DynamicSerializeElement - private Long aasf; - - /** Meteorological Map Availability */ - @Transient - @DynamicSerializeElement - private Long mmap; - - /** Interpolation Flag For Mean Diurnal Tide */ - @Transient - @DynamicSerializeElement - private Long ifdt; - - /** Ku Band Ocean Range (m) */ - @Transient - @DynamicSerializeElement - private Double kbor; - - /** RMS of 20 Hz Ku Band Ocean Range (m) */ - @Transient - @DynamicSerializeElement - private Double rkbor; - - /** Number of 20 Hz valid points for Ku Band */ - @Transient - @DynamicSerializeElement - private Long nvpk2; - - /** Ku Band net instrumental Correction (m) */ - @Transient - @DynamicSerializeElement - private Double kbic; - - /** Sea State Bias Correction On Ku Band (m) */ - @Transient - @DynamicSerializeElement - private Double sbck; - - /** Ku Band Significant Wave Height (m) */ - @Transient - @DynamicSerializeElement - private Double kbsw; - - /** RMS 20 Hz Ku Band Significant Wave Height (m) */ - @Transient - @DynamicSerializeElement - private Double rksw; - - /** Number of 20 Hz valid points for Ku Band Significant Wave Height */ - @Transient - @DynamicSerializeElement - private Long nvksw; - - /** - * 20 Hz RMS Ku Band Net Instrumental Correction For Significant Wave Height - * (m) - */ - @Transient - @DynamicSerializeElement - private Double kncs; - - /** Ku Band Corrected Ocean Backscatter coefficient (kb) */ - @Transient - @DynamicSerializeElement - private Double kobc; - - /** STD Ku Band Corrected Ocean Backscatter coefficient (kb) */ - @Transient - @DynamicSerializeElement - private Double skobc; - - /** Number of valid points for Ku Band Backscatter */ - @Transient - @DynamicSerializeElement - private Long nvpkb; - - /** Ku band net instrumental correction for AGC (db) */ - @Transient - @DynamicSerializeElement - private Double knic; - - /** Attenuation Correction 1 On Sigma-0 (db) */ - @Transient - @DynamicSerializeElement - private Double acrs1; - - /** Attenuation Correction 2 On Sigma-0 (db) */ - @Transient - @DynamicSerializeElement - private Double acrs2; - - /** Ku Band Automatic Gain Control (db) */ - @Transient - @DynamicSerializeElement - private Double kagc; - - /** RMS Ku Band Automatic Gain Control (db) */ - @Transient - @DynamicSerializeElement - private Double rkagc; - - /** Number of valid points for Ku Band Automatic Gain Control */ - @Transient - @DynamicSerializeElement - private Long nvkg; - - /** C Band Ocean Range (m) */ - @Transient - @DynamicSerializeElement - private Double cbor; - - /** RMS of C Band Ocean Range (m) */ - @Transient - @DynamicSerializeElement - private Double rcbor; - - /** Number of 20 Hz valid points for C band */ - @Transient - @DynamicSerializeElement - private Long nvpc; - - /** C band net instrumental correction (m) */ - @Transient - @DynamicSerializeElement - private Double cbic; - - /** Sea state bias correction on C band (m) */ - @Transient - @DynamicSerializeElement - private Double sbcc; - - /** C band significant wave height (m) */ - @Transient - @DynamicSerializeElement - private Double cbsw; - - /** RMS 20 Hz C band significant wave height (m) */ - @Transient - @DynamicSerializeElement - private Double rcsw; - - /** Number of 20 Hz valid points for C band significance */ - @Transient - @DynamicSerializeElement - private Long nvcsw; - - /** C band net instrumental correction for significance (m) */ - @Transient - @DynamicSerializeElement - private Double cncs; - - /** C band corrected ocean backscatter coefficient (db) */ - @Transient - @DynamicSerializeElement - private Double ccob; - - /** RMS C band corrected ocean backscatter coefficient (db) */ - @Transient - @DynamicSerializeElement - private Double rccob; - - /** Number of valid points for C band backscatter */ - @Transient - @DynamicSerializeElement - private Long nvpcb; - - /** C band net instrumental correction for AGC (db) */ - @Transient - @DynamicSerializeElement - private Double cnia; - - /** C band automatic gain control (db) */ - @Transient - @DynamicSerializeElement - private Double cagc; - - /** RMS C band automatic gain control (db) */ - @Transient - @DynamicSerializeElement - private Double rcagc; - - /** Number of valid points for C band automatic gain */ - @Transient - @DynamicSerializeElement - private Long nvpca; - - /** Satellite channel center frequency 1 (hz) */ - @Transient - @DynamicSerializeElement - private Double sccf1; - - /** Satellite channel center frequency 2 (hz) */ - @Transient - @DynamicSerializeElement - private Double sccf2; - - /** Satellite channel center frequency 3 (hz) */ - @Transient - @DynamicSerializeElement - private Double sccf3; - - /** Brightness temperature 1 (k) */ - @Transient - @DynamicSerializeElement - private Double tmbrst1; - - /** Brightness temperature 2 (k) */ - @Transient - @DynamicSerializeElement - private Double tmbrst2; - - /** Brightness temperature 3 (k) */ - @Transient - @DynamicSerializeElement - private Double tmbrst3; - - /** Radiometer water vapor content (kg/m**2) */ - @Transient - @DynamicSerializeElement - private Double rwvc; - - /** Radiometer liquid content (kg/m**) */ - @Transient - @DynamicSerializeElement - private Double rlqc; - - /** Height or altitude 1 (m) */ - @Transient - @DynamicSerializeElement - private Double hmsl1; - - /** Height or altitude 2 (m) */ - @Transient - @DynamicSerializeElement - private Double hmsl2; - - /** Wind speed from altimeter (m/s) */ - @Transient - @DynamicSerializeElement - private Double wspa; - - /** Wind speed from radiometer (m/s) */ - @Transient - @DynamicSerializeElement - private Double wspr; - - /** u-component of the model wind vector (m/s) */ - @Transient - @DynamicSerializeElement - private Double umwv; - - /** v-component of the model wind vector (m/s) */ - @Transient - @DynamicSerializeElement - private Double vwmv; - - /** Mean dynamic topography (m) */ - @Transient - @DynamicSerializeElement - private Double mdyt; - - /** Altitude of COG above reference ellipsoid (m) */ - @Transient - @DynamicSerializeElement - private Double alre; - - /** Instantaneous altitude rate (m/s) */ - @Transient - @DynamicSerializeElement - private Double ialr; - - /** Squared off nadir angle of the satellite from platform data (degree**2) */ - @Transient - @DynamicSerializeElement - private Double onap; - - /** Squared off nadir angle of the satellite from waveform data (degree**2) */ - @Transient - @DynamicSerializeElement - private Double sonaw; - - /** Ionospheric correction from model on Ku band (m) */ - @Transient - @DynamicSerializeElement - private Double icmk; - - /** Altimeter ionospheric correction on Ku band (m) */ - @Transient - @DynamicSerializeElement - private Double aick; - - /** Model dry tropospheric correction (m) */ - @Transient - @DynamicSerializeElement - private Double mdtc; - - /** Model wet tropospheric correction (m) */ - @Transient - @DynamicSerializeElement - private Double mwtc; - - /** Radiometer wet tropospheric correction (m) */ - @Transient - @DynamicSerializeElement - private Double rwtc; - - /** Mean sea-surface height (m) */ - @Transient - @DynamicSerializeElement - private Double mssh; - - /** Mean sea surface height from altimeter only (m) */ - @Transient - @DynamicSerializeElement - private Double msha; - - /** Geoid's height (m) */ - @Transient - @DynamicSerializeElement - private Double geodh; - - /** Ocean depth/land elevation (m) */ - @Transient - @DynamicSerializeElement - private Double odle; - - /** Solid earth tide height (m) */ - @Transient - @DynamicSerializeElement - private Double seth; - - /** Total geocentric ocean tide height solution 1 (m) */ - @Transient - @DynamicSerializeElement - private Double tgoth1; - - /** Total geocentric ocean tide height solution 2 (m) */ - @Transient - @DynamicSerializeElement - private Double tgoth2; - - /** Loading tide height geocentric ocean tide solution 1 (m) */ - @Transient - @DynamicSerializeElement - private Double lths1; - - /** Loading tide height geocentric ocean tide solution 2 (m) */ - @Transient - @DynamicSerializeElement - private Double lths2; - - /** Long period tide height (m) */ - @Transient - @DynamicSerializeElement - private Double lpth; - - /** Non-equilibrium long period tide height (m) */ - @Transient - @DynamicSerializeElement - private Double nlth; - - /** Geocentric pole tide height (m) */ - @Transient - @DynamicSerializeElement - private Double gpth; - - /* Inverted barometer correction (m) */ - @Transient - @DynamicSerializeElement - private Double ibco; - - /* High frequency fluctuations of the sea surface topography correction (m) */ - @Transient - @DynamicSerializeElement - private Double hfstc; - - /** Sea Surface Height Anomoly (m) */ - @Transient - @DynamicSerializeElement - private Double ssha; - - /** Report type */ - @Transient - @DynamicSerializeElement - @DataURI(position=6) - private String reportType; - - @Embedded - @DynamicSerializeElement - private PointDataView pointDataView; - - /** - * Default constructor. - */ - public SshaRecord() { - Double doubleRmissd = Double.parseDouble(String.valueOf(RMISSD)); - Long longImissd = Long.parseLong(String.valueOf(IMISSD)); - this.reportType = "BUFRSSHA"; - this.said = longImissd; - this.siid = longImissd; - this.staq = " "; - this.softv = " "; - this.sacyln = longImissd; - this.orbn = longImissd; - this.numid = " "; - this.clath = doubleRmissd; - this.clonh = doubleRmissd; - this.rsst = longImissd; - this.aetp = longImissd; - this.dsst = longImissd; - this.intf = longImissd; - this.eeno = longImissd; - this.asfl = longImissd; - this.adqf = longImissd; - this.arqf = longImissd; - this.alrf = longImissd; - this.rsfl = longImissd; - this.rdqf = longImissd; - this.rbif = longImissd; - this.ipin = longImissd; - this.aasf = longImissd; - this.mmap = longImissd; - this.ifdt = longImissd; - this.kbor = doubleRmissd; - this.rkbor = doubleRmissd; - this.nvpk2 = longImissd; - this.kbic = doubleRmissd; - this.sbck = doubleRmissd; - this.kbsw = doubleRmissd; - this.rksw = doubleRmissd; - this.nvksw = longImissd; - this.kncs = doubleRmissd; - this.kobc = doubleRmissd; - this.skobc = doubleRmissd; - this.nvpkb = longImissd; - this.knic = doubleRmissd; - this.acrs1 = doubleRmissd; - this.acrs2 = doubleRmissd; - this.kagc = doubleRmissd; - this.rkagc = doubleRmissd; - this.nvkg = longImissd; - this.cbor = doubleRmissd; - this.rcbor = doubleRmissd; - this.nvpc = longImissd; - this.cbic = doubleRmissd; - this.sbcc = doubleRmissd; - this.cbsw = doubleRmissd; - this.rcsw = doubleRmissd; - this.nvcsw = longImissd; - this.cncs = doubleRmissd; - this.ccob = doubleRmissd; - this.rccob = doubleRmissd; - this.nvpcb = longImissd; - this.cnia = doubleRmissd; - this.cagc = doubleRmissd; - this.rcagc = doubleRmissd; - this.nvpca = longImissd; - this.sccf1 = doubleRmissd; - this.sccf2 = doubleRmissd; - this.sccf3 = doubleRmissd; - this.tmbrst1 = doubleRmissd; - this.tmbrst2 = doubleRmissd; - this.tmbrst3 = doubleRmissd; - this.rwvc = doubleRmissd; - this.rlqc = doubleRmissd; - this.hmsl1 = doubleRmissd; - this.hmsl2 = doubleRmissd; - this.wspa = doubleRmissd; - this.wspr = doubleRmissd; - this.umwv = doubleRmissd; - this.vwmv = doubleRmissd; - this.mdyt = doubleRmissd; - this.alre = doubleRmissd; - this.ialr = doubleRmissd; - this.onap = doubleRmissd; - this.sonaw = doubleRmissd; - this.icmk = doubleRmissd; - this.aick = doubleRmissd; - this.mdtc = doubleRmissd; - this.mwtc = doubleRmissd; - this.rwtc = doubleRmissd; - this.mssh = doubleRmissd; - this.msha = doubleRmissd; - this.geodh = doubleRmissd; - this.odle = doubleRmissd; - this.seth = doubleRmissd; - this.tgoth1 = doubleRmissd; - this.tgoth2 = doubleRmissd; - this.lths1 = doubleRmissd; - this.lths2 = doubleRmissd; - this.lpth = doubleRmissd; - this.nlth = doubleRmissd; - this.gpth = doubleRmissd; - this.ibco = doubleRmissd; - this.hfstc = doubleRmissd; - this.ssha = doubleRmissd; - } - - /** - * Constructor for DataURI construction through base class. This is used by - * the notification service. - * - * @param uri - * A data uri applicable to this class. - */ - public SshaRecord(String uri) { - super(uri); - } - - /** - * Get the observation report type. - * - * @return the reportType - */ - public String getReportType() { - return reportType; - } - - /** - * Set the observation report type. - * - * @param reportType - * the reportType to set - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * Get the Satellite Identifier. - * - * @return the Satellite ID - */ - public Long getSaid() { - return said; - } - - /** - * @param said - * the Satellite Identifier to set - */ - public void setSaid(Long said) { - this.said = said; - } - - /** - * Get the Satellite Instruments. - * - * @return the Satellite Instruments - */ - public Long getSiid() { - return siid; - } - - /** - * @param siid - * the Satellite Instruments to set - */ - public void setSiid(Long siid) { - this.siid = siid; - } - - /** - * Get the Station Acquisition. - * - * @return the Station Acquisition - */ - public String getStaq() { - return staq; - } - - /** - * @param staq - * the Station Acquisition to set - */ - public void setStaq(String staq) { - this.staq = staq; - } - - /** - * Get the Software Identification and Version. - * - * @return the Software Id and Version - */ - public String getSoftv() { - return softv; - } - - /** - * @param softv - * the Software Id and Version to set - */ - public void setSoftv(String softv) { - this.softv = softv; - } - - /** - * Get the Satellite Cycle Number. - * - * @return the Satellite Cycle Number - */ - public Long getSacyln() { - return sacyln; - } - - /** - * @param sacyln - * the Satellite Cycle Number to set - */ - public void setSacyln(Long sacyln) { - this.sacyln = sacyln; - } - - /** - * Get the Orbit Number. - * - * @return the Orbit Number - */ - public Long getOrbn() { - return orbn; - } - - /** - * @param orbn - * the Orbit Number to set - */ - public void setOrbn(Long orbn) { - this.orbn = orbn; - } - - /** - * Get the Numerical Model Identifier. - * - * @return the Numerical Model Identifier - */ - public String getNumid() { - return numid; - } - - /** - * @param numid - * the Numerical Model Identifier to set - */ - public void setNumid(String numid) { - this.numid = numid; - } - - /** - * @return the clath - */ - public Double getClath() { - return clath; - } - - /** - * @param clath - * the latitude to set - */ - public void setClath(Double clath) { - this.clath = clath; - } - - /** - * @return the clonh - */ - public Double getClonh() { - return clonh; - } - - /** - * @param clonh - * the longitude to set - */ - public void setClonh(Double clonh) { - this.clonh = clonh; - } - - /** - * Get the Remote Sensed Surface Type. - * - * @return the Remote Sensed Surface Type - */ - public Long getRsst() { - return rsst; - } - - /** - * @param rsst - * the Remote Sensed Surface Type to set - */ - public void setRsst(Long rsst) { - this.rsst = rsst; - } - - /** - * Get the Altimeter Echo Type. - * - * @return the Altimeter Echo Type - */ - public Long getAetp() { - return aetp; - } - - /** - * @param aetp - * the Altimeter Echo Type to set - */ - public void setAetp(Long aetp) { - this.aetp = aetp; - } - - /** - * Get the Radiometer Sensed Surface Type. - * - * @return the Remote Sensed Surface Type - */ - public Long getDsst() { - return dsst; - } - - /** - * @param dsst - * the Radiometer Sensed Surface Type to set - */ - public void setDsst(Long dsst) { - this.dsst = dsst; - } - - /** - * Get the Interpolation Flag. - * - * @return the Interpolation Flag - */ - public Long getIntf() { - return intf; - } - - /** - * @param intf - * the Interpolation Flag to set - */ - public void setIntf(Long intf) { - this.intf = intf; - } - - /** - * Get the Three-dimensional Error Estimate of the Navigator Orbit. - * - * @return the Three-dimensional Error Estimate of the Navigator Orbit - */ - public Long getEeno() { - return eeno; - } - - /** - * @param eeno - * the Three-dimensional Error Estimate of the Navigator Orbit to - * set - */ - public void setEeno(Long eeno) { - this.eeno = eeno; - } - - /** - * Get the Altimeter State Flag. - * - * @return the Altimeter State Flag - */ - public Long getAsfl() { - return asfl; - } - - /** - * @param asfl - * the Altimeter State Flag to set - */ - public void setAsfl(Long asfl) { - this.asfl = asfl; - } - - /** - * Get the Altimeter Data Quality Flag. - * - * @return the Altimeter Data Quality Flag - */ - public Long getAdqf() { - return adqf; - } - - /** - * @param adqf - * the Altimeter Data Quality Flag to set - */ - public void setAdqf(Long adqf) { - this.adqf = adqf; - } - - /** - * Get the Altimeter Correction Quality Flag. - * - * @return the Altimeter Correction Quality Flag - */ - public Long getArqf() { - return arqf; - } - - /** - * @param arqf - * the Altimeter Correction Quality Flag to set - */ - public void setArqf(Long arqf) { - this.arqf = arqf; - } - - /** - * Get the Altimeter Rain Flag. - * - * @return the Altimeter Rain Flag - */ - public Long getAlrf() { - return alrf; - } - - /** - * @param alrf - * the Altimeter Rain Flag to set - */ - public void setAlrf(Long alrf) { - this.alrf = alrf; - } - - /** - * Get the Radiometer State Flag. - * - * @return the Radiometer State Flag - */ - public Long getRsfl() { - return rsfl; - } - - /** - * @param rsfl - * the Radiometer State Flag to set - */ - public void setRsfl(Long rsfl) { - this.rsfl = rsfl; - } - - /** - * Get the Radiometer Data Quality Flag. - * - * @return the Radiometer Data Quality Flag - */ - public Long getRdqf() { - return rdqf; - } - - /** - * @param rdqf - * the Radiometer Data Quality Flag to set - */ - public void setRdqf(Long rdqf) { - this.rdqf = rdqf; - } - - /** - * Get the Radiometer Brightness Temperature Interpretation. - * - * @return the Radiometer Brightness Temperature Interpretation - */ - public Long getRbif() { - return rbif; - } - - /** - * @param rbif - * the Radiometer Brightness Temperature Interpretation to set - */ - public void setRbif(Long rbif) { - this.rbif = rbif; - } - - /** - * Get the Ice Presence Indicator. - * - * @return the Ice Presence Indicator - */ - public Long getIpin() { - return ipin; - } - - /** - * @param ipin - * the Ice Presence Indicator to set - */ - public void setIpin(Long ipin) { - this.ipin = ipin; - } - - /** - * Get the Auxillliary Altimeter State Flags. - * - * @return the Auxillliary Altimeter State Flags - */ - public Long getAasf() { - return aasf; - } - - /** - * @param aasf - * the Auxillliary Altimeter State Flags to set - */ - public void setAasf(Long aasf) { - this.aasf = aasf; - } - - /** - * Get the Meteorological Map Availablity. - * - * @return the Meteorological Map Availablity - */ - public Long getMmap() { - return mmap; - } - - /** - * @param mmap - * the Meteorological Map Availablity to set - */ - public void setMmap(Long mmap) { - this.mmap = mmap; - } - - /** - * Get the Interpolation Flag For Mean Diurnal Tide. - * - * @return the Interpolation Flag For Mean Diurnal Tide - */ - public Long getIfdt() { - return ifdt; - } - - /** - * @param ifdt - * the Interpolation Flag For Mean Diurnal Tide to set - */ - public void setIfdt(Long ifdt) { - this.ifdt = ifdt; - } - - /** - * Get the Ku Band Ocean Range - * - * @param kbor - * Ku Band Ocean Range to return - */ - public Double getKbor() { - return kbor; - } - - /** - * @param kbor - * Ku Band Ocean Range to set - */ - public void setKbor(Double kbor) { - this.kbor = kbor; - } - - /** - * Get the RMS of 20 Hz Ku Band Ocean Range - * - * @param rkbor - * RMS of 20 Hz Ku Band Ocean Range to return - */ - public Double getRkbor() { - return rkbor; - } - - /** - * @param rkbor - * RMS of 20 Hz Ku Band Ocean Range to set - */ - public void setRkbor(Double rkbor) { - this.rkbor = rkbor; - } - - /** - * Get the Number of 20 Hz valid points for Ku Band. - * - * @return the Number of 20 Hz valid points for Ku Band - */ - public Long getNvpk2() { - return nvpk2; - } - - /** - * @param nvpk2 - * the Number of 20 Hz valid points for Ku Band to set - */ - public void setNvpk2(Long nvpk2) { - this.nvpk2 = nvpk2; - } - - /** - * Get the Ku Band Net Instrumental Correction - * - * @param kbic - * Ku Band Net Instrumental Correction to return - */ - public Double getKbic() { - return kbic; - } - - /** - * @param kbic - * Ku Band Net Instrumental Correction to set - */ - public void setKbic(Double kbic) { - this.kbic = kbic; - } - - /** - * Get the Sea State Bias Correction On Ku Band - * - * @param sbck - * Sea State Bias Correction On Ku Band to return - */ - public Double getSbck() { - return sbck; - } - - /** - * @param sbck - * Sea State Bias Correction On Ku Band to set - */ - public void setSbck(Double sbck) { - this.sbck = sbck; - } - - /** - * Get Ku Band Significant Wave Height - * - * @param kbsw - * Ku Band Significant Wave Height to return - */ - public Double getKbsw() { - return kbsw; - } - - /** - * @param kbsw - * Ku Band Significant Wave Height to set - */ - public void setKbsw(Double kbsw) { - this.kbsw = kbsw; - } - - /** - * RMS 20 Hz Ku Band Significant Wave Height - * - * @param rksw - * RMS 20 Hz Ku Band Significant Wave Height - */ - public Double getRksw() { - return rksw; - } - - /** - * @param rksw - * 20 Hz RMS Ku Band Significant Wave Height to set - */ - public void setRksw(Double rksw) { - this.rksw = rksw; - } - - /** - * Get the Number of 20 Hz valid points for Ku Band Significant Wave Height. - * - * @return the Number of 20 Hz valid points for Ku Band Significant Wave - * Height - */ - public Long getNvksw() { - return nvksw; - } - - /** - * @param nvksw - * the Number of 20 Hz valid points for Ku Band Significant Wave - * Height to set - */ - public void setNvksw(Long nvksw) { - this.nvksw = nvksw; - } - - /** - * RMS 20 Hz Ku Band Net Instrumental Correction For Significant Wave Height - * - * @param kncs - * RMS 20 Hz Ku Band Net Instrumental Correction For Significant - * Wave Height - */ - public Double getKncs() { - return kncs; - } - - /** - * @param kncs - * 20 Hz RMS Ku Band Net Instrumental Correction For Significant - * Wave Height to set - */ - public void setKncs(Double kncs) { - this.kncs = kncs; - } - - /** - * Ku Band Corrected Ocean Backscatter coefficient - * - * @param kobc - * Ku Band Corrected Ocean Backscatter coefficient - */ - public Double getKobc() { - return kobc; - } - - /** - * @param kobc - * Ku Band Corrected Ocean Backscatter coefficient to set - */ - public void setKobc(Double kobc) { - this.kobc = kobc; - } - - /** - * STD Ku Band Corrected Ocean Backscatter coefficient - * - * @param kobc - * STD Ku Band Corrected Ocean Backscatter coefficient - */ - public Double getSkobc() { - return skobc; - } - - /** - * @param skobc - * STD Ku Band Corrected Ocean Backscatter coefficient to set - */ - public void setSkobc(Double skobc) { - this.skobc = skobc; - } - - /** - * Get the Number of valid points for Ku Band Backscatter. - * - * @return the Number of valid points for Ku Band Backscatter - */ - public Long getNvpkb() { - return nvpkb; - } - - /** - * @param nvpkb - * the Number of valid points for Ku Band Backscatter to set - */ - public void setNvpkb(Long nvpkb) { - this.nvpkb = nvpkb; - } - - /** - * Ku band net instrumental correction for AGC - * - * @param knic - * Ku band net instrumental correction for AGC - */ - public Double getKnic() { - return knic; - } - - /** - * @param knic - * Ku band net instrumental correction for AGC to set - */ - public void setKnic(Double knic) { - this.knic = knic; - } - - /** - * Attenuation Correction 1 On Sigma-0 - * - * @param acrs1 - * Attenuation 1 Correction On Sigma-0 - */ - public Double getAcrs1() { - return acrs1; - } - - /** - * @param acrs1 - * Attenuation Correction 1 On Sigma-0 - */ - public void setAcrs1(Double acrs1) { - this.acrs1 = acrs1; - } - - /** - * Attenuation Correction 2 On Sigma-0 - * - * @param acrs2 - * Attenuation Correction 2 On Sigma-0 - */ - public Double getAcrs2() { - return acrs2; - } - - /** - * @param acrs2 - * Attenuation Correction 2 On Sigma-0 - */ - public void setAcrs2(Double acrs2) { - this.acrs2 = acrs2; - } - - /** - * Ku Band Automatic Gain Control - * - * @param kagc - * Ku Band Automatic Gain Control - */ - public Double getKagc() { - return kagc; - } - - /** - * @param kagc - * Ku Band Automatic Gain Control - */ - public void setKagc(Double kagc) { - this.kagc = kagc; - } - - /** - * RMS Ku Band Automatic Gain Control - * - * @param rkagc - * RMS Ku Band Automatic Gain Control - */ - public Double getRkagc() { - return rkagc; - } - - /** - * @param rkagc - * RMS Ku Band Automatic Gain Control - */ - public void setRkagc(Double rkagc) { - this.rkagc = rkagc; - } - - /** - * Get the Number of valid points for Ku Band Automatic Gain Control. - * - * @return nvkg the Number of valid points for Ku Band Automatic Gain - * Control - */ - public Long getNvkg() { - return nvkg; - } - - /** - * @param nvkg - * the Number of valid points for Ku Band Automatic Gain Control - * to set - */ - public void setNvkg(Long nvkg) { - this.nvkg = nvkg; - } - - /** - * C Band Ocean Range - * - * @param cbor - * C Band Ocean Range to return - */ - public Double getCbor() { - return cbor; - } - - /** - * @param cbor - * C Band Ocean Range to set - */ - public void setCbor(Double cbor) { - this.cbor = cbor; - } - - /** - * RMS of C Band Ocean Range - * - * @param rcbor - * RMS of C Band Ocean Range to return - */ - public Double getRcbor() { - return rcbor; - } - - /** - * @param rcbor - * RMS of C Band Ocean Range to set - */ - public void setRcbor(Double rcbor) { - this.rcbor = rcbor; - } - - /** - * Get the Number of Number of 20 Hz valid points for C band - * - * @return nvpc the Number of 20 Hz valid points for C band - */ - public Long getNvpc() { - return nvpc; - } - - /** - * @param nvpc - * the Number of 20 Hz valid points for C band to set - */ - public void setNvpc(Long nvpc) { - this.nvpc = nvpc; - } - - /** - * C Band net instrumental correction - * - * @param cbic - * C band net instrumental correction to return - */ - public Double getCbic() { - return cbic; - } - - /** - * @param cbic - * C band net instrumental correction to set - */ - public void setCbic(Double cbic) { - this.cbic = cbic; - } - - /** - * Sea state bias correction on C band - * - * @param sbcc - * Sea state bias correction on C band to return - */ - public Double getSbcc() { - return sbcc; - } - - /** - * @param sbcc - * Sea state bias correction on C band to set - */ - public void setSbcc(Double sbcc) { - this.sbcc = sbcc; - } - - /** - * C band significant wave height - * - * @param cbsw - * C band significant wave height to return - */ - public Double getCbsw() { - return cbsw; - } - - /** - * @param cbsw - * C band significant wave height to set - */ - public void setCbsw(Double cbsw) { - this.cbsw = cbsw; - } - - /** - * RMS 20 Hz C band significant wave height - * - * @param rcsw - * RMS 20 Hz C band significant wave height to return - */ - public Double getRcsw() { - return rcsw; - } - - /** - * @param rcsw - * RMS 20 Hz C band significant wave height to set - */ - public void setRcsw(Double rcsw) { - this.rcsw = rcsw; - } - - /** - * Get the Number of 20 Hz valid points for C band significance - * - * @return nvcsw the Number of 20 Hz valid points for C band significance - */ - public Long getNvcsw() { - return nvcsw; - } - - /** - * @param nvcsw - * the Number of 20 Hz valid points for C band significance to - * set - */ - public void setNvcsw(Long nvcsw) { - this.nvcsw = nvcsw; - } - - /** - * C band net instrumental correction for significance - * - * @param cncs - * C band net instrumental correction for significance to return - */ - public Double getCncs() { - return cncs; - } - - /** - * @param cncs - * C band net instrumental correction for significance to set - */ - public void setCncs(Double cncs) { - this.cncs = cncs; - } - - /** - * C band corrected ocean backscatter coefficient - * - * @param ccob - * C band corrected ocean backscatter coefficient to return - */ - public Double getCcob() { - return ccob; - } - - /** - * @param ccob - * C band corrected ocean backscatter coefficient to set - */ - public void setCcob(Double ccob) { - this.ccob = ccob; - } - - /** - * RMS C band corrected ocean backscatter coefficient - * - * @param rccob - * RMS C band corrected ocean backscatter coefficient to return - */ - public Double getRccob() { - return rccob; - } - - /** - * @param rccob - * RMS C band corrected ocean backscatter coefficient to set - */ - public void setRccob(Double rccob) { - this.rccob = rccob; - } - - /** - * Get the Number of valid points for C band backscatter - * - * @return nvpcb the Number of valid points for C band backscatter - */ - public Long getNvpcb() { - return nvpcb; - } - - /** - * @param nvpcb - * the Number of valid points for C band backscatter to set - */ - public void setNvpcb(Long nvpcb) { - this.nvpcb = nvpcb; - } - - /** - * RMS C band net instrumental correction for AGC - * - * @param cnia - * C band net instrumental correction for AGC to return - */ - public Double getCnia() { - return cnia; - } - - /** - * @param cnia - * C band net instrumental correction for AGC to set - */ - public void setCnia(Double cnia) { - this.cnia = cnia; - } - - /** - * C band automatic gain control - * - * @param cagc - * C band automatic gain control to return - */ - public Double getCagc() { - return cagc; - } - - /** - * @param cagc - * C band automatic gain control to set - */ - public void setCagc(Double cagc) { - this.cagc = cagc; - } - - /** - * RMS C band automatic gain control - * - * @param rcagc - * RMS C band automatic gain control to return - */ - public Double getRcagc() { - return rcagc; - } - - /** - * @param rcagc - * RMS C band automatic gain control to set - */ - public void setRcagc(Double rcagc) { - this.rcagc = rcagc; - } - - /** - * Get the Number of valid points for C band automatic gain - * - * @return nvpca the Number of valid points for C band automatic gain - */ - public Long getNvpca() { - return nvpca; - } - - /** - * @param nvpca - * the Number of valid points for C band automatic gain to set - */ - public void setNvpca(Long nvpca) { - this.nvpca = nvpca; - } - - /** - * Satellite channel center frequency 1 - * - * @param sccf1 - * Satellite channel center frequency 1 - */ - public Double getSccf1() { - return sccf1; - } - - /** - * @param sccf1 - * Satellite channel center frequency 1 - */ - public void setSccf1(Double sccf1) { - this.sccf1 = sccf1; - } - - /** - * Satellite channel center frequency 1 - * - * @param sccf2 - * Satellite channel center frequency 2 - */ - public Double getSccf2() { - return sccf2; - } - - /** - * @param sccf2 - * Satellite channel center frequency 2 - */ - public void setSccf2(Double sccf2) { - this.sccf2 = sccf2; - } - - /** - * Satellite channel center frequency 3 - * - * @param sccf1 - * Satellite channel center frequency 3 - */ - public Double getSccf3() { - return sccf3; - } - - /** - * @param sccf3 - * Satellite channel center frequency 3 - */ - public void setSccf3(Double sccf3) { - this.sccf3 = sccf3; - } - - /** - * Brightness temperature 1 - * - * @param tmbrst1 - * Brightness temperature 1 - */ - public Double getTmbrst1() { - return tmbrst1; - } - - /** - * @param tmbrst1 - * Brightness temperature 1 - */ - public void setTmbrst1(Double tmbrst1) { - this.tmbrst1 = tmbrst1; - } - - /** - * Brightness temperature 2 - * - * @param tmbrst2 - * Brightness temperature 2 - */ - public Double getTmbrst2() { - return tmbrst2; - } - - /** - * @param tmbrst2 - * Brightness temperature 2 - */ - public void setTmbrst2(Double tmbrst2) { - this.tmbrst2 = tmbrst2; - } - - /** - * Brightness temperature 3 - * - * @param tmbrst3 - * Brightness temperature 3 - */ - public Double getTmbrst3() { - return tmbrst3; - } - - /** - * @param tmbrst3 - * Brightness temperature 3 - */ - public void setTmbrst3(Double tmbrst3) { - this.tmbrst3 = tmbrst3; - } - - /** - * Radiometer water vapor content - * - * @param rwvc - * Radiometer water vapor content to return - */ - public Double getRwvc() { - return rwvc; - } - - /** - * @param rwvc - * Radiometer water vapor content to set - */ - public void setRwvc(Double rwvc) { - this.rwvc = rwvc; - } - - /** - * Radiometer liquid content - * - * @param rlqc - * Radiometer liquid content to return - */ - public Double getRlqc() { - return rlqc; - } - - /** - * @param rlqc - * Radiometer liquid content to set - */ - public void setRlqc(Double rlqc) { - this.rlqc = rlqc; - } - - /** - * Height or altitude 1 - * - * @param hmsl - * Height or altitude 1 to return - */ - public Double getHmsl1() { - return hmsl1; - } - - /** - * @param hmsl - * Height or altitude 1 to set - */ - public void setHmsl1(Double hmsl1) { - this.hmsl1 = hmsl1; - } - - /** - * Height or altitude 2 - * - * @param hmsl - * Height or altitude 2 to return - */ - public Double getHmsl2() { - return hmsl2; - } - - /** - * @param hmsl - * Height or altitude 2 to set - */ - public void setHmsl2(Double hmsl2) { - this.hmsl2 = hmsl2; - } - - /** - * Wind speed from altimeter (m/s) - * - * @param wspa - * Wind speed from altimeter to return - */ - public Double getWspa() { - return wspa; - } - - /** - * @param wspa - * Wind speed from altimeter to set - */ - public void setWspa(Double wspa) { - this.wspa = wspa; - } - - /** - * Wind speed from radiometer (m/s) - * - * @param wspr - * Wind speed from radiometer to return - */ - public Double getWspr() { - return wspr; - } - - /** - * @param wspr - * Wind speed from radiometer to set - */ - public void setWspr(Double wspr) { - this.wspr = wspr; - } - - /** - * u-component of the model wind vector (m/s) - * - * @param umwv - * u-component of the model wind vector to return - */ - public Double getUmwv() { - return umwv; - } - - /** - * @param umwv - * u-component of the model wind vector to set - */ - public void setUmwv(Double umwv) { - this.umwv = umwv; - } - - /** - * u-component of the model wind vector (m/s) - * - * @param vwmv - * u-component of the model wind vector to return - */ - public Double getVwmv() { - return vwmv; - } - - /** - * @param vwmv - * u-component of the model wind vector to set - */ - public void setVwmv(Double vwmv) { - this.vwmv = vwmv; - } - - /** - * Mean dynamic topography (m) - * - * @param 1G Mean dynamic topography to return - */ - public Double getMdyt() { - return mdyt; - } - - /** - * @param mdyt - * Mean dynamic topography to set - */ - public void setMdyt(Double mdyt) { - this.mdyt = mdyt; - } - - /** - * Altitude of COG above reference ellipsoid (m) - * - * @param alre - * Altitude of COG above reference ellipsoid - */ - public Double getAlre() { - return alre; - } - - /** - * @param alre - * Altitude of COG above reference ellipsoid to set - */ - public void setAlre(Double alre) { - this.alre = alre; - } - - /** - * Instantaneous altitude rate (m/s) - * - * @param ialr - * Instantaneous altitude rate to return - */ - public Double getIalr() { - return ialr; - } - - /** - * @param ialr - * Instantaneous altitude rate to set - */ - public void setIalr(Double ialr) { - this.ialr = ialr; - } - - /** - * Squared off nadir angle of the satellite from platform data (degree**2) - * - * @param onap - * Squared off nadir angle of the satellite from platform data to - * set - */ - public Double getOnap() { - return onap; - } - - /** - * @param onap - * Squared off nadir angle of the satellite from platform data to - * set - */ - public void setOnap(Double onap) { - this.onap = onap; - } - - /** - * Squared off nadir angle of the satellite from waveform data (degree**2) - * - * @param sonaw - * Squared off nadir angle of the satellite from waveform data to - * return - */ - public Double getSonaw() { - return sonaw; - } - - /** - * @param sonaw - * Squared off nadir angle of the satellite from waveform data to - * set - */ - public void setSonaw(Double sonaw) { - this.sonaw = sonaw; - } - - /** - * Ionospheric correction from model on Ku band (m) - * - * @param icmk - * Ionospheric correction from model on Ku band to return - */ - public Double getIcmk() { - return icmk; - } - - /** - * @param icmk - * Ionospheric correction from model on Ku band to set - */ - public void setIcmk(Double icmk) { - this.icmk = icmk; - } - - /** - * Ionospheric correction from model on Ku band (m) - * - * @param aick - * Ionospheric correction from model on Ku band to return - */ - public Double getAick() { - return aick; - } - - /** - * @param aick - * Ionospheric correction from model on Ku band to set - */ - public void setAick(Double aick) { - this.aick = aick; - } - - /** - * Model dry tropospheric correction (m) - * - * @param mdtc - * Model dry tropospheric correction to return - */ - public Double getMdtc() { - return mdtc; - } - - /** - * @param mdtc - * Model dry tropospheric correction to set - */ - public void setMdtc(Double mdtc) { - this.mdtc = mdtc; - } - - /** - * Model wet tropospheric correction (m) - * - * @param mwtc - * Model wet tropospheric correction to return - */ - public Double getMwtc() { - return mwtc; - } - - /** - * @param mwtc - * Model wet tropospheric correction to set - */ - public void setMwtc(Double mwtc) { - this.mwtc = mwtc; - } - - /** - * Radiometer wet tropospheric correction (m) - * - * @param rwtc - * Radiometer wet tropospheric correction to return - */ - public Double getRwtc() { - return rwtc; - } - - /** - * @param rwtc - * Radiometer wet tropospheric correction to set - */ - public void setRwtc(Double rwtc) { - this.rwtc = rwtc; - } - - /** - * Mean sea-surface height (m) - * - * @param mssh - * Mean sea-surface height to return - */ - public Double getMssh() { - return mssh; - } - - /** - * @param mssh - * Mean sea-surface height to set - */ - public void setMssh(Double mssh) { - this.mssh = mssh; - } - - /** - * Mean sea-surface height from altimeter only (m) - * - * @param msha - * Mean sea-surface height from altimeter only to return - */ - public Double getMsha() { - return msha; - } - - /** - * @param msha - * Mean sea-surface height from altimeter only to set - */ - public void setMsha(Double msha) { - this.msha = msha; - } - - /** - * Geoid's height (m) - * - * @param geodh - * Geoid's height to return - */ - public Double getGeodh() { - return geodh; - } - - /** - * @param odle - * Ocean depth/land elevation (m) - */ - public void setGeodh(Double geodh) { - this.geodh = geodh; - } - - /** - * Ocean depth/land elevation (m) - * - * @param odle - * Ocean depth/land elevation to return - */ - public Double getOdle() { - return odle; - } - - /** - * @param odle - * Ocean depth/land elevation to set - */ - public void setOdle(Double odle) { - this.odle = odle; - } - - /** - * Solid earth tide height (m) - * - * @param seth - * Solid earth tide height to return - */ - public Double getSeth() { - return seth; - } - - /** - * @param seth - * Solid earth tide height to set - */ - public void setSeth(Double seth) { - this.seth = seth; - } - - /** - * Total geocentric ocean tide height solution 1 (m) - * - * @param tgoth1 - * Total geocentric ocean tide height solution 1 to return - */ - public Double getTgoth1() { - return tgoth1; - } - - /** - * @param tgoth1 - * Total geocentric ocean tide height solution 1 to set - */ - public void setTgoth1(Double tgoth1) { - this.tgoth1 = tgoth1; - } - - /** - * Total geocentric ocean tide height solution 2 (m) - * - * @param tgoth2 - * Total geocentric ocean tide height solution 2 to return - */ - public Double getTgoth2() { - return tgoth2; - } - - /** - * @param tgoth2 - * Total geocentric ocean tide height solution 2 to set - */ - public void setTgoth2(Double tgoth2) { - this.tgoth2 = tgoth2; - } - - /** - * Loading tide height geocentric ocean tide solution 1 (m) - * - * @param lths1 - * Loading tide height geocentric ocean tide solution 1 to return - */ - public Double getLths1() { - return lths1; - } - - /** - * @param lths1 - * Loading tide height geocentric ocean tide solution 1 to set - */ - public void setLths1(Double lths1) { - this.lths1 = lths1; - } - - /** - * Loading tide height geocentric ocean tide solution 2 (m) - * - * @param lths2 - * Loading tide height geocentric ocean tide solution 2 to return - */ - public Double getLths2() { - return lths2; - } - - /** - * @param lths2 - * Loading tide height geocentric ocean tide solution 2 to set - */ - public void setLths2(Double lths2) { - this.lths2 = lths2; - } - - /** - * Long period tide height (m) - * - * @param lpth - * Long period tide height to return - */ - public Double getLpth() { - return lpth; - } - - /** - * @param lpth - * Long period tide height to set - */ - public void setLpth(Double lpth) { - this.lpth = lpth; - } - - /** - * Non-equilibrium long period tide height (m) - * - * @param nlth - * Non-equilibrium long period tide height to return - */ - public Double getNlth() { - return nlth; - } - - /** - * @param nlth - * Non-equilibrium long period tide height to set - */ - public void setNlth(Double nlth) { - this.nlth = nlth; - } - - /** - * Geocentric pole tide height (m) - * - * @param gpth - * Geocentric pole tide height to return - */ - public Double getGpth() { - return gpth; - } - - /** - * @param gpth - * Geocentric pole tide height to set - */ - public void setGpth(Double gpth) { - this.gpth = gpth; - } - - /** - * Inverted barometer correction (m) - * - * @param ibco - * Inverted barometer correction to return - */ - public Double getIbco() { - return ibco; - } - - /** - * @param ibco - * Inverted barometer correction to set - */ - public void setIbco(Double ibco) { - this.ibco = ibco; - } - - /** - * High frequency fluctuations of the sea surface topography correction (m) - * - * @param hfstc - * High frequency fluctuations of the sea surface topography - * correction - * - */ - public Double getHfstc() { - return hfstc; - } - - /** - * @param hfstc - * High frequency fluctuations of the sea surface topography - * correction to set - */ - public void setHfstc(Double hfstc) { - this.hfstc = hfstc; - } - - /** - * Sea Surface Height Anomoly - * - * @param ssha - * Sea Surface Height Anomoly to return - */ - public Double getSsha() { - return ssha; - } - - /** - * @param ssha - * Sea Surface Height Anomoly to set - */ - public void setSsha(Double ssha) { - this.ssha = ssha; - } - - /** - * @return the obsTime - */ - public Calendar getObsTime() { - return obsTime; - } - - /** - * @param obsTime - * the obsTime to set - */ - public void setObsTime(Calendar obsTime) { - this.obsTime = obsTime; - } - - /** - * Get the value and units of a named parameter within this observation. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return An Amount with value and units. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Amount getValue(String paramName) { - return null; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public String getString(String paramName) { - return null; - } - - /** - * Get the value of a parameter that is represented as a String. - * - * @param paramName - * The name of the parameter value to retrieve. - * @return The String value of the parameter. If the parameter is unknown, a - * null reference is returned. - */ - @Override - public Collection getValues(String paramName) { - return null; - } - - /** - * Get the IDecoderGettable reference for this record. - * - * @return The IDecoderGettable reference for this record. - */ - @Override - public IDecoderGettable getDecoderGettable() { - return this; - } - - @Override - public void setDataURI(String dataURI) { - identifier = dataURI; - } - - @Override - public String[] getStrings(String paramName) { - return null; - } - - @Override - public Date getPersistenceTime() { - return this.dataTime.getRefTime(); - - } - - @Override - public void setPersistenceTime(Date persistTime) { - // TODO Auto-generated method stub - - } - - @Override - public PointDataView getPointDataView() { - return this.pointDataView; - } - - @Override - public void setPointDataView(PointDataView pointDataView) { - this.pointDataView = pointDataView; - - } + IDecoderGettable, IPointData, IPersistable { + private static final long serialVersionUID = 1L; + + private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; + + private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; + + /** Satellite Identification */ + @Column + /* + * Sea surface height anomalies are from blended TOPEX/Poseidon, Jason-1, + * ERS 1, ERS 2m GPO and Envisat ocean altimetry satellites, therefore said + * should be a primary key. + */ + @DataURI(position = 4) + @DynamicSerializeElement + private Long said; + + /** Satellite Instruments */ + @Column + @DynamicSerializeElement + private Long siid; + + /** Station Acquisition */ + @Column(length = 20) + @DynamicSerializeElement + private String staq; + + /** Software Identification and Version Number */ + @Column(length = 12) + @DynamicSerializeElement + private String softv; + + /** Satellite Cycle Number */ + @Column + @DynamicSerializeElement + private Long sacyln; + + /** Orbit Number */ + @Column + @DataURI(position = 5) + @DynamicSerializeElement + private Long orbn; + + /** Numerical Model Identifier */ + @Column(length = 16) + @DynamicSerializeElement + private String numid; + + /** Observation time */ + @Column + @DataURI(position = 1) + @DynamicSerializeElement + private Calendar obsTime; + + /** Latitude */ + @Column + @DataURI(position = 2) + @DynamicSerializeElement + private Double clath; + + /** Longitude */ + @Column + @DataURI(position = 3) + @DynamicSerializeElement + private Double clonh; + + /** Remotely Sensed Surface Type */ + @Transient + @DynamicSerializeElement + private Long rsst; + + /** Altimeter Echo Type */ + @Transient + @DynamicSerializeElement + private Long aetp; + + /** Radiometer Sensed Surface Type */ + @Transient + @DynamicSerializeElement + private Long dsst; + + /** Interpolation Flag */ + @Transient + @DynamicSerializeElement + private Long intf; + + /** Three-dimensional Error Estimate of the Navigator Orbit */ + @Transient + @DynamicSerializeElement + private Long eeno; + + /** Altimeter State Flag */ + @Transient + @DynamicSerializeElement + private Long asfl; + + /** Altimeter Data Quality Flag */ + @Transient + @DynamicSerializeElement + private Long adqf; + + /** Altimeter Correction Quality Flag */ + @Transient + @DynamicSerializeElement + private Long arqf; + + /** Altimeter Rain Flag */ + @Transient + @DynamicSerializeElement + private Long alrf; + + /** Radioimeter State Flag */ + @Transient + @DynamicSerializeElement + private Long rsfl; + + /** Radioimeter Data Quality Flag */ + @Transient + @DynamicSerializeElement + private Long rdqf; + + /** Radioimeter Brightness Temperature Interpretation */ + @Transient + @DynamicSerializeElement + private Long rbif; + + /** Ice Presence Indicator */ + @Transient + @DynamicSerializeElement + private Long ipin; + + /** Auxilliary Altimeter State Flags */ + @Transient + @DynamicSerializeElement + private Long aasf; + + /** Meteorological Map Availability */ + @Transient + @DynamicSerializeElement + private Long mmap; + + /** Interpolation Flag For Mean Diurnal Tide */ + @Transient + @DynamicSerializeElement + private Long ifdt; + + /** Ku Band Ocean Range (m) */ + @Transient + @DynamicSerializeElement + private Double kbor; + + /** RMS of 20 Hz Ku Band Ocean Range (m) */ + @Transient + @DynamicSerializeElement + private Double rkbor; + + /** Number of 20 Hz valid points for Ku Band */ + @Transient + @DynamicSerializeElement + private Long nvpk2; + + /** Ku Band net instrumental Correction (m) */ + @Transient + @DynamicSerializeElement + private Double kbic; + + /** Sea State Bias Correction On Ku Band (m) */ + @Transient + @DynamicSerializeElement + private Double sbck; + + /** Ku Band Significant Wave Height (m) */ + @Transient + @DynamicSerializeElement + private Double kbsw; + + /** RMS 20 Hz Ku Band Significant Wave Height (m) */ + @Transient + @DynamicSerializeElement + private Double rksw; + + /** Number of 20 Hz valid points for Ku Band Significant Wave Height */ + @Transient + @DynamicSerializeElement + private Long nvksw; + + /** + * 20 Hz RMS Ku Band Net Instrumental Correction For Significant Wave Height + * (m) + */ + @Transient + @DynamicSerializeElement + private Double kncs; + + /** Ku Band Corrected Ocean Backscatter coefficient (kb) */ + @Transient + @DynamicSerializeElement + private Double kobc; + + /** STD Ku Band Corrected Ocean Backscatter coefficient (kb) */ + @Transient + @DynamicSerializeElement + private Double skobc; + + /** Number of valid points for Ku Band Backscatter */ + @Transient + @DynamicSerializeElement + private Long nvpkb; + + /** Ku band net instrumental correction for AGC (db) */ + @Transient + @DynamicSerializeElement + private Double knic; + + /** Attenuation Correction 1 On Sigma-0 (db) */ + @Transient + @DynamicSerializeElement + private Double acrs1; + + /** Attenuation Correction 2 On Sigma-0 (db) */ + @Transient + @DynamicSerializeElement + private Double acrs2; + + /** Ku Band Automatic Gain Control (db) */ + @Transient + @DynamicSerializeElement + private Double kagc; + + /** RMS Ku Band Automatic Gain Control (db) */ + @Transient + @DynamicSerializeElement + private Double rkagc; + + /** Number of valid points for Ku Band Automatic Gain Control */ + @Transient + @DynamicSerializeElement + private Long nvkg; + + /** C Band Ocean Range (m) */ + @Transient + @DynamicSerializeElement + private Double cbor; + + /** RMS of C Band Ocean Range (m) */ + @Transient + @DynamicSerializeElement + private Double rcbor; + + /** Number of 20 Hz valid points for C band */ + @Transient + @DynamicSerializeElement + private Long nvpc; + + /** C band net instrumental correction (m) */ + @Transient + @DynamicSerializeElement + private Double cbic; + + /** Sea state bias correction on C band (m) */ + @Transient + @DynamicSerializeElement + private Double sbcc; + + /** C band significant wave height (m) */ + @Transient + @DynamicSerializeElement + private Double cbsw; + + /** RMS 20 Hz C band significant wave height (m) */ + @Transient + @DynamicSerializeElement + private Double rcsw; + + /** Number of 20 Hz valid points for C band significance */ + @Transient + @DynamicSerializeElement + private Long nvcsw; + + /** C band net instrumental correction for significance (m) */ + @Transient + @DynamicSerializeElement + private Double cncs; + + /** C band corrected ocean backscatter coefficient (db) */ + @Transient + @DynamicSerializeElement + private Double ccob; + + /** RMS C band corrected ocean backscatter coefficient (db) */ + @Transient + @DynamicSerializeElement + private Double rccob; + + /** Number of valid points for C band backscatter */ + @Transient + @DynamicSerializeElement + private Long nvpcb; + + /** C band net instrumental correction for AGC (db) */ + @Transient + @DynamicSerializeElement + private Double cnia; + + /** C band automatic gain control (db) */ + @Transient + @DynamicSerializeElement + private Double cagc; + + /** RMS C band automatic gain control (db) */ + @Transient + @DynamicSerializeElement + private Double rcagc; + + /** Number of valid points for C band automatic gain */ + @Transient + @DynamicSerializeElement + private Long nvpca; + + /** Satellite channel center frequency 1 (hz) */ + @Transient + @DynamicSerializeElement + private Double sccf1; + + /** Satellite channel center frequency 2 (hz) */ + @Transient + @DynamicSerializeElement + private Double sccf2; + + /** Satellite channel center frequency 3 (hz) */ + @Transient + @DynamicSerializeElement + private Double sccf3; + + /** Brightness temperature 1 (k) */ + @Transient + @DynamicSerializeElement + private Double tmbrst1; + + /** Brightness temperature 2 (k) */ + @Transient + @DynamicSerializeElement + private Double tmbrst2; + + /** Brightness temperature 3 (k) */ + @Transient + @DynamicSerializeElement + private Double tmbrst3; + + /** Radiometer water vapor content (kg/m**2) */ + @Transient + @DynamicSerializeElement + private Double rwvc; + + /** Radiometer liquid content (kg/m**) */ + @Transient + @DynamicSerializeElement + private Double rlqc; + + /** Height or altitude 1 (m) */ + @Transient + @DynamicSerializeElement + private Double hmsl1; + + /** Height or altitude 2 (m) */ + @Transient + @DynamicSerializeElement + private Double hmsl2; + + /** Wind speed from altimeter (m/s) */ + @Transient + @DynamicSerializeElement + private Double wspa; + + /** Wind speed from radiometer (m/s) */ + @Transient + @DynamicSerializeElement + private Double wspr; + + /** u-component of the model wind vector (m/s) */ + @Transient + @DynamicSerializeElement + private Double umwv; + + /** v-component of the model wind vector (m/s) */ + @Transient + @DynamicSerializeElement + private Double vwmv; + + /** Mean dynamic topography (m) */ + @Transient + @DynamicSerializeElement + private Double mdyt; + + /** Altitude of COG above reference ellipsoid (m) */ + @Transient + @DynamicSerializeElement + private Double alre; + + /** Instantaneous altitude rate (m/s) */ + @Transient + @DynamicSerializeElement + private Double ialr; + + /** Squared off nadir angle of the satellite from platform data (degree**2) */ + @Transient + @DynamicSerializeElement + private Double onap; + + /** Squared off nadir angle of the satellite from waveform data (degree**2) */ + @Transient + @DynamicSerializeElement + private Double sonaw; + + /** Ionospheric correction from model on Ku band (m) */ + @Transient + @DynamicSerializeElement + private Double icmk; + + /** Altimeter ionospheric correction on Ku band (m) */ + @Transient + @DynamicSerializeElement + private Double aick; + + /** Model dry tropospheric correction (m) */ + @Transient + @DynamicSerializeElement + private Double mdtc; + + /** Model wet tropospheric correction (m) */ + @Transient + @DynamicSerializeElement + private Double mwtc; + + /** Radiometer wet tropospheric correction (m) */ + @Transient + @DynamicSerializeElement + private Double rwtc; + + /** Mean sea-surface height (m) */ + @Transient + @DynamicSerializeElement + private Double mssh; + + /** Mean sea surface height from altimeter only (m) */ + @Transient + @DynamicSerializeElement + private Double msha; + + /** Geoid's height (m) */ + @Transient + @DynamicSerializeElement + private Double geodh; + + /** Ocean depth/land elevation (m) */ + @Transient + @DynamicSerializeElement + private Double odle; + + /** Solid earth tide height (m) */ + @Transient + @DynamicSerializeElement + private Double seth; + + /** Total geocentric ocean tide height solution 1 (m) */ + @Transient + @DynamicSerializeElement + private Double tgoth1; + + /** Total geocentric ocean tide height solution 2 (m) */ + @Transient + @DynamicSerializeElement + private Double tgoth2; + + /** Loading tide height geocentric ocean tide solution 1 (m) */ + @Transient + @DynamicSerializeElement + private Double lths1; + + /** Loading tide height geocentric ocean tide solution 2 (m) */ + @Transient + @DynamicSerializeElement + private Double lths2; + + /** Long period tide height (m) */ + @Transient + @DynamicSerializeElement + private Double lpth; + + /** Non-equilibrium long period tide height (m) */ + @Transient + @DynamicSerializeElement + private Double nlth; + + /** Geocentric pole tide height (m) */ + @Transient + @DynamicSerializeElement + private Double gpth; + + /* Inverted barometer correction (m) */ + @Transient + @DynamicSerializeElement + private Double ibco; + + /* High frequency fluctuations of the sea surface topography correction (m) */ + @Transient + @DynamicSerializeElement + private Double hfstc; + + /** Sea Surface Height Anomoly (m) */ + @Transient + @DynamicSerializeElement + private Double ssha; + + /** Report type */ + @Transient + @DynamicSerializeElement + @DataURI(position = 6) + private String reportType; + + @Embedded + @DynamicSerializeElement + private PointDataView pointDataView; + + /** + * Default constructor. + */ + public SshaRecord() { + Double doubleRmissd = Double.parseDouble(String.valueOf(RMISSD)); + Long longImissd = Long.parseLong(String.valueOf(IMISSD)); + this.reportType = "BUFRSSHA"; + this.said = longImissd; + this.siid = longImissd; + this.staq = " "; + this.softv = " "; + this.sacyln = longImissd; + this.orbn = longImissd; + this.numid = " "; + this.clath = doubleRmissd; + this.clonh = doubleRmissd; + this.rsst = longImissd; + this.aetp = longImissd; + this.dsst = longImissd; + this.intf = longImissd; + this.eeno = longImissd; + this.asfl = longImissd; + this.adqf = longImissd; + this.arqf = longImissd; + this.alrf = longImissd; + this.rsfl = longImissd; + this.rdqf = longImissd; + this.rbif = longImissd; + this.ipin = longImissd; + this.aasf = longImissd; + this.mmap = longImissd; + this.ifdt = longImissd; + this.kbor = doubleRmissd; + this.rkbor = doubleRmissd; + this.nvpk2 = longImissd; + this.kbic = doubleRmissd; + this.sbck = doubleRmissd; + this.kbsw = doubleRmissd; + this.rksw = doubleRmissd; + this.nvksw = longImissd; + this.kncs = doubleRmissd; + this.kobc = doubleRmissd; + this.skobc = doubleRmissd; + this.nvpkb = longImissd; + this.knic = doubleRmissd; + this.acrs1 = doubleRmissd; + this.acrs2 = doubleRmissd; + this.kagc = doubleRmissd; + this.rkagc = doubleRmissd; + this.nvkg = longImissd; + this.cbor = doubleRmissd; + this.rcbor = doubleRmissd; + this.nvpc = longImissd; + this.cbic = doubleRmissd; + this.sbcc = doubleRmissd; + this.cbsw = doubleRmissd; + this.rcsw = doubleRmissd; + this.nvcsw = longImissd; + this.cncs = doubleRmissd; + this.ccob = doubleRmissd; + this.rccob = doubleRmissd; + this.nvpcb = longImissd; + this.cnia = doubleRmissd; + this.cagc = doubleRmissd; + this.rcagc = doubleRmissd; + this.nvpca = longImissd; + this.sccf1 = doubleRmissd; + this.sccf2 = doubleRmissd; + this.sccf3 = doubleRmissd; + this.tmbrst1 = doubleRmissd; + this.tmbrst2 = doubleRmissd; + this.tmbrst3 = doubleRmissd; + this.rwvc = doubleRmissd; + this.rlqc = doubleRmissd; + this.hmsl1 = doubleRmissd; + this.hmsl2 = doubleRmissd; + this.wspa = doubleRmissd; + this.wspr = doubleRmissd; + this.umwv = doubleRmissd; + this.vwmv = doubleRmissd; + this.mdyt = doubleRmissd; + this.alre = doubleRmissd; + this.ialr = doubleRmissd; + this.onap = doubleRmissd; + this.sonaw = doubleRmissd; + this.icmk = doubleRmissd; + this.aick = doubleRmissd; + this.mdtc = doubleRmissd; + this.mwtc = doubleRmissd; + this.rwtc = doubleRmissd; + this.mssh = doubleRmissd; + this.msha = doubleRmissd; + this.geodh = doubleRmissd; + this.odle = doubleRmissd; + this.seth = doubleRmissd; + this.tgoth1 = doubleRmissd; + this.tgoth2 = doubleRmissd; + this.lths1 = doubleRmissd; + this.lths2 = doubleRmissd; + this.lpth = doubleRmissd; + this.nlth = doubleRmissd; + this.gpth = doubleRmissd; + this.ibco = doubleRmissd; + this.hfstc = doubleRmissd; + this.ssha = doubleRmissd; + } + + /** + * Constructor for DataURI construction through base class. This is used by + * the notification service. + * + * @param uri + * A data uri applicable to this class. + */ + public SshaRecord(String uri) { + super(uri); + } + + /** + * Get the observation report type. + * + * @return the reportType + */ + public String getReportType() { + return reportType; + } + + /** + * Set the observation report type. + * + * @param reportType + * the reportType to set + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * Get the Satellite Identifier. + * + * @return the Satellite ID + */ + public Long getSaid() { + return said; + } + + /** + * @param said + * the Satellite Identifier to set + */ + public void setSaid(Long said) { + this.said = said; + } + + /** + * Get the Satellite Instruments. + * + * @return the Satellite Instruments + */ + public Long getSiid() { + return siid; + } + + /** + * @param siid + * the Satellite Instruments to set + */ + public void setSiid(Long siid) { + this.siid = siid; + } + + /** + * Get the Station Acquisition. + * + * @return the Station Acquisition + */ + public String getStaq() { + return staq; + } + + /** + * @param staq + * the Station Acquisition to set + */ + public void setStaq(String staq) { + this.staq = staq; + } + + /** + * Get the Software Identification and Version. + * + * @return the Software Id and Version + */ + public String getSoftv() { + return softv; + } + + /** + * @param softv + * the Software Id and Version to set + */ + public void setSoftv(String softv) { + this.softv = softv; + } + + /** + * Get the Satellite Cycle Number. + * + * @return the Satellite Cycle Number + */ + public Long getSacyln() { + return sacyln; + } + + /** + * @param sacyln + * the Satellite Cycle Number to set + */ + public void setSacyln(Long sacyln) { + this.sacyln = sacyln; + } + + /** + * Get the Orbit Number. + * + * @return the Orbit Number + */ + public Long getOrbn() { + return orbn; + } + + /** + * @param orbn + * the Orbit Number to set + */ + public void setOrbn(Long orbn) { + this.orbn = orbn; + } + + /** + * Get the Numerical Model Identifier. + * + * @return the Numerical Model Identifier + */ + public String getNumid() { + return numid; + } + + /** + * @param numid + * the Numerical Model Identifier to set + */ + public void setNumid(String numid) { + this.numid = numid; + } + + /** + * @return the clath + */ + public Double getClath() { + return clath; + } + + /** + * @param clath + * the latitude to set + */ + public void setClath(Double clath) { + this.clath = clath; + } + + /** + * @return the clonh + */ + public Double getClonh() { + return clonh; + } + + /** + * @param clonh + * the longitude to set + */ + public void setClonh(Double clonh) { + this.clonh = clonh; + } + + /** + * Get the Remote Sensed Surface Type. + * + * @return the Remote Sensed Surface Type + */ + public Long getRsst() { + return rsst; + } + + /** + * @param rsst + * the Remote Sensed Surface Type to set + */ + public void setRsst(Long rsst) { + this.rsst = rsst; + } + + /** + * Get the Altimeter Echo Type. + * + * @return the Altimeter Echo Type + */ + public Long getAetp() { + return aetp; + } + + /** + * @param aetp + * the Altimeter Echo Type to set + */ + public void setAetp(Long aetp) { + this.aetp = aetp; + } + + /** + * Get the Radiometer Sensed Surface Type. + * + * @return the Remote Sensed Surface Type + */ + public Long getDsst() { + return dsst; + } + + /** + * @param dsst + * the Radiometer Sensed Surface Type to set + */ + public void setDsst(Long dsst) { + this.dsst = dsst; + } + + /** + * Get the Interpolation Flag. + * + * @return the Interpolation Flag + */ + public Long getIntf() { + return intf; + } + + /** + * @param intf + * the Interpolation Flag to set + */ + public void setIntf(Long intf) { + this.intf = intf; + } + + /** + * Get the Three-dimensional Error Estimate of the Navigator Orbit. + * + * @return the Three-dimensional Error Estimate of the Navigator Orbit + */ + public Long getEeno() { + return eeno; + } + + /** + * @param eeno + * the Three-dimensional Error Estimate of the Navigator Orbit to + * set + */ + public void setEeno(Long eeno) { + this.eeno = eeno; + } + + /** + * Get the Altimeter State Flag. + * + * @return the Altimeter State Flag + */ + public Long getAsfl() { + return asfl; + } + + /** + * @param asfl + * the Altimeter State Flag to set + */ + public void setAsfl(Long asfl) { + this.asfl = asfl; + } + + /** + * Get the Altimeter Data Quality Flag. + * + * @return the Altimeter Data Quality Flag + */ + public Long getAdqf() { + return adqf; + } + + /** + * @param adqf + * the Altimeter Data Quality Flag to set + */ + public void setAdqf(Long adqf) { + this.adqf = adqf; + } + + /** + * Get the Altimeter Correction Quality Flag. + * + * @return the Altimeter Correction Quality Flag + */ + public Long getArqf() { + return arqf; + } + + /** + * @param arqf + * the Altimeter Correction Quality Flag to set + */ + public void setArqf(Long arqf) { + this.arqf = arqf; + } + + /** + * Get the Altimeter Rain Flag. + * + * @return the Altimeter Rain Flag + */ + public Long getAlrf() { + return alrf; + } + + /** + * @param alrf + * the Altimeter Rain Flag to set + */ + public void setAlrf(Long alrf) { + this.alrf = alrf; + } + + /** + * Get the Radiometer State Flag. + * + * @return the Radiometer State Flag + */ + public Long getRsfl() { + return rsfl; + } + + /** + * @param rsfl + * the Radiometer State Flag to set + */ + public void setRsfl(Long rsfl) { + this.rsfl = rsfl; + } + + /** + * Get the Radiometer Data Quality Flag. + * + * @return the Radiometer Data Quality Flag + */ + public Long getRdqf() { + return rdqf; + } + + /** + * @param rdqf + * the Radiometer Data Quality Flag to set + */ + public void setRdqf(Long rdqf) { + this.rdqf = rdqf; + } + + /** + * Get the Radiometer Brightness Temperature Interpretation. + * + * @return the Radiometer Brightness Temperature Interpretation + */ + public Long getRbif() { + return rbif; + } + + /** + * @param rbif + * the Radiometer Brightness Temperature Interpretation to set + */ + public void setRbif(Long rbif) { + this.rbif = rbif; + } + + /** + * Get the Ice Presence Indicator. + * + * @return the Ice Presence Indicator + */ + public Long getIpin() { + return ipin; + } + + /** + * @param ipin + * the Ice Presence Indicator to set + */ + public void setIpin(Long ipin) { + this.ipin = ipin; + } + + /** + * Get the Auxillliary Altimeter State Flags. + * + * @return the Auxillliary Altimeter State Flags + */ + public Long getAasf() { + return aasf; + } + + /** + * @param aasf + * the Auxillliary Altimeter State Flags to set + */ + public void setAasf(Long aasf) { + this.aasf = aasf; + } + + /** + * Get the Meteorological Map Availablity. + * + * @return the Meteorological Map Availablity + */ + public Long getMmap() { + return mmap; + } + + /** + * @param mmap + * the Meteorological Map Availablity to set + */ + public void setMmap(Long mmap) { + this.mmap = mmap; + } + + /** + * Get the Interpolation Flag For Mean Diurnal Tide. + * + * @return the Interpolation Flag For Mean Diurnal Tide + */ + public Long getIfdt() { + return ifdt; + } + + /** + * @param ifdt + * the Interpolation Flag For Mean Diurnal Tide to set + */ + public void setIfdt(Long ifdt) { + this.ifdt = ifdt; + } + + /** + * Get the Ku Band Ocean Range + * + * @param kbor + * Ku Band Ocean Range to return + */ + public Double getKbor() { + return kbor; + } + + /** + * @param kbor + * Ku Band Ocean Range to set + */ + public void setKbor(Double kbor) { + this.kbor = kbor; + } + + /** + * Get the RMS of 20 Hz Ku Band Ocean Range + * + * @param rkbor + * RMS of 20 Hz Ku Band Ocean Range to return + */ + public Double getRkbor() { + return rkbor; + } + + /** + * @param rkbor + * RMS of 20 Hz Ku Band Ocean Range to set + */ + public void setRkbor(Double rkbor) { + this.rkbor = rkbor; + } + + /** + * Get the Number of 20 Hz valid points for Ku Band. + * + * @return the Number of 20 Hz valid points for Ku Band + */ + public Long getNvpk2() { + return nvpk2; + } + + /** + * @param nvpk2 + * the Number of 20 Hz valid points for Ku Band to set + */ + public void setNvpk2(Long nvpk2) { + this.nvpk2 = nvpk2; + } + + /** + * Get the Ku Band Net Instrumental Correction + * + * @param kbic + * Ku Band Net Instrumental Correction to return + */ + public Double getKbic() { + return kbic; + } + + /** + * @param kbic + * Ku Band Net Instrumental Correction to set + */ + public void setKbic(Double kbic) { + this.kbic = kbic; + } + + /** + * Get the Sea State Bias Correction On Ku Band + * + * @param sbck + * Sea State Bias Correction On Ku Band to return + */ + public Double getSbck() { + return sbck; + } + + /** + * @param sbck + * Sea State Bias Correction On Ku Band to set + */ + public void setSbck(Double sbck) { + this.sbck = sbck; + } + + /** + * Get Ku Band Significant Wave Height + * + * @param kbsw + * Ku Band Significant Wave Height to return + */ + public Double getKbsw() { + return kbsw; + } + + /** + * @param kbsw + * Ku Band Significant Wave Height to set + */ + public void setKbsw(Double kbsw) { + this.kbsw = kbsw; + } + + /** + * RMS 20 Hz Ku Band Significant Wave Height + * + * @param rksw + * RMS 20 Hz Ku Band Significant Wave Height + */ + public Double getRksw() { + return rksw; + } + + /** + * @param rksw + * 20 Hz RMS Ku Band Significant Wave Height to set + */ + public void setRksw(Double rksw) { + this.rksw = rksw; + } + + /** + * Get the Number of 20 Hz valid points for Ku Band Significant Wave Height. + * + * @return the Number of 20 Hz valid points for Ku Band Significant Wave + * Height + */ + public Long getNvksw() { + return nvksw; + } + + /** + * @param nvksw + * the Number of 20 Hz valid points for Ku Band Significant Wave + * Height to set + */ + public void setNvksw(Long nvksw) { + this.nvksw = nvksw; + } + + /** + * RMS 20 Hz Ku Band Net Instrumental Correction For Significant Wave Height + * + * @param kncs + * RMS 20 Hz Ku Band Net Instrumental Correction For Significant + * Wave Height + */ + public Double getKncs() { + return kncs; + } + + /** + * @param kncs + * 20 Hz RMS Ku Band Net Instrumental Correction For Significant + * Wave Height to set + */ + public void setKncs(Double kncs) { + this.kncs = kncs; + } + + /** + * Ku Band Corrected Ocean Backscatter coefficient + * + * @param kobc + * Ku Band Corrected Ocean Backscatter coefficient + */ + public Double getKobc() { + return kobc; + } + + /** + * @param kobc + * Ku Band Corrected Ocean Backscatter coefficient to set + */ + public void setKobc(Double kobc) { + this.kobc = kobc; + } + + /** + * STD Ku Band Corrected Ocean Backscatter coefficient + * + * @param kobc + * STD Ku Band Corrected Ocean Backscatter coefficient + */ + public Double getSkobc() { + return skobc; + } + + /** + * @param skobc + * STD Ku Band Corrected Ocean Backscatter coefficient to set + */ + public void setSkobc(Double skobc) { + this.skobc = skobc; + } + + /** + * Get the Number of valid points for Ku Band Backscatter. + * + * @return the Number of valid points for Ku Band Backscatter + */ + public Long getNvpkb() { + return nvpkb; + } + + /** + * @param nvpkb + * the Number of valid points for Ku Band Backscatter to set + */ + public void setNvpkb(Long nvpkb) { + this.nvpkb = nvpkb; + } + + /** + * Ku band net instrumental correction for AGC + * + * @param knic + * Ku band net instrumental correction for AGC + */ + public Double getKnic() { + return knic; + } + + /** + * @param knic + * Ku band net instrumental correction for AGC to set + */ + public void setKnic(Double knic) { + this.knic = knic; + } + + /** + * Attenuation Correction 1 On Sigma-0 + * + * @param acrs1 + * Attenuation 1 Correction On Sigma-0 + */ + public Double getAcrs1() { + return acrs1; + } + + /** + * @param acrs1 + * Attenuation Correction 1 On Sigma-0 + */ + public void setAcrs1(Double acrs1) { + this.acrs1 = acrs1; + } + + /** + * Attenuation Correction 2 On Sigma-0 + * + * @param acrs2 + * Attenuation Correction 2 On Sigma-0 + */ + public Double getAcrs2() { + return acrs2; + } + + /** + * @param acrs2 + * Attenuation Correction 2 On Sigma-0 + */ + public void setAcrs2(Double acrs2) { + this.acrs2 = acrs2; + } + + /** + * Ku Band Automatic Gain Control + * + * @param kagc + * Ku Band Automatic Gain Control + */ + public Double getKagc() { + return kagc; + } + + /** + * @param kagc + * Ku Band Automatic Gain Control + */ + public void setKagc(Double kagc) { + this.kagc = kagc; + } + + /** + * RMS Ku Band Automatic Gain Control + * + * @param rkagc + * RMS Ku Band Automatic Gain Control + */ + public Double getRkagc() { + return rkagc; + } + + /** + * @param rkagc + * RMS Ku Band Automatic Gain Control + */ + public void setRkagc(Double rkagc) { + this.rkagc = rkagc; + } + + /** + * Get the Number of valid points for Ku Band Automatic Gain Control. + * + * @return nvkg the Number of valid points for Ku Band Automatic Gain + * Control + */ + public Long getNvkg() { + return nvkg; + } + + /** + * @param nvkg + * the Number of valid points for Ku Band Automatic Gain Control + * to set + */ + public void setNvkg(Long nvkg) { + this.nvkg = nvkg; + } + + /** + * C Band Ocean Range + * + * @param cbor + * C Band Ocean Range to return + */ + public Double getCbor() { + return cbor; + } + + /** + * @param cbor + * C Band Ocean Range to set + */ + public void setCbor(Double cbor) { + this.cbor = cbor; + } + + /** + * RMS of C Band Ocean Range + * + * @param rcbor + * RMS of C Band Ocean Range to return + */ + public Double getRcbor() { + return rcbor; + } + + /** + * @param rcbor + * RMS of C Band Ocean Range to set + */ + public void setRcbor(Double rcbor) { + this.rcbor = rcbor; + } + + /** + * Get the Number of Number of 20 Hz valid points for C band + * + * @return nvpc the Number of 20 Hz valid points for C band + */ + public Long getNvpc() { + return nvpc; + } + + /** + * @param nvpc + * the Number of 20 Hz valid points for C band to set + */ + public void setNvpc(Long nvpc) { + this.nvpc = nvpc; + } + + /** + * C Band net instrumental correction + * + * @param cbic + * C band net instrumental correction to return + */ + public Double getCbic() { + return cbic; + } + + /** + * @param cbic + * C band net instrumental correction to set + */ + public void setCbic(Double cbic) { + this.cbic = cbic; + } + + /** + * Sea state bias correction on C band + * + * @param sbcc + * Sea state bias correction on C band to return + */ + public Double getSbcc() { + return sbcc; + } + + /** + * @param sbcc + * Sea state bias correction on C band to set + */ + public void setSbcc(Double sbcc) { + this.sbcc = sbcc; + } + + /** + * C band significant wave height + * + * @param cbsw + * C band significant wave height to return + */ + public Double getCbsw() { + return cbsw; + } + + /** + * @param cbsw + * C band significant wave height to set + */ + public void setCbsw(Double cbsw) { + this.cbsw = cbsw; + } + + /** + * RMS 20 Hz C band significant wave height + * + * @param rcsw + * RMS 20 Hz C band significant wave height to return + */ + public Double getRcsw() { + return rcsw; + } + + /** + * @param rcsw + * RMS 20 Hz C band significant wave height to set + */ + public void setRcsw(Double rcsw) { + this.rcsw = rcsw; + } + + /** + * Get the Number of 20 Hz valid points for C band significance + * + * @return nvcsw the Number of 20 Hz valid points for C band significance + */ + public Long getNvcsw() { + return nvcsw; + } + + /** + * @param nvcsw + * the Number of 20 Hz valid points for C band significance to + * set + */ + public void setNvcsw(Long nvcsw) { + this.nvcsw = nvcsw; + } + + /** + * C band net instrumental correction for significance + * + * @param cncs + * C band net instrumental correction for significance to return + */ + public Double getCncs() { + return cncs; + } + + /** + * @param cncs + * C band net instrumental correction for significance to set + */ + public void setCncs(Double cncs) { + this.cncs = cncs; + } + + /** + * C band corrected ocean backscatter coefficient + * + * @param ccob + * C band corrected ocean backscatter coefficient to return + */ + public Double getCcob() { + return ccob; + } + + /** + * @param ccob + * C band corrected ocean backscatter coefficient to set + */ + public void setCcob(Double ccob) { + this.ccob = ccob; + } + + /** + * RMS C band corrected ocean backscatter coefficient + * + * @param rccob + * RMS C band corrected ocean backscatter coefficient to return + */ + public Double getRccob() { + return rccob; + } + + /** + * @param rccob + * RMS C band corrected ocean backscatter coefficient to set + */ + public void setRccob(Double rccob) { + this.rccob = rccob; + } + + /** + * Get the Number of valid points for C band backscatter + * + * @return nvpcb the Number of valid points for C band backscatter + */ + public Long getNvpcb() { + return nvpcb; + } + + /** + * @param nvpcb + * the Number of valid points for C band backscatter to set + */ + public void setNvpcb(Long nvpcb) { + this.nvpcb = nvpcb; + } + + /** + * RMS C band net instrumental correction for AGC + * + * @param cnia + * C band net instrumental correction for AGC to return + */ + public Double getCnia() { + return cnia; + } + + /** + * @param cnia + * C band net instrumental correction for AGC to set + */ + public void setCnia(Double cnia) { + this.cnia = cnia; + } + + /** + * C band automatic gain control + * + * @param cagc + * C band automatic gain control to return + */ + public Double getCagc() { + return cagc; + } + + /** + * @param cagc + * C band automatic gain control to set + */ + public void setCagc(Double cagc) { + this.cagc = cagc; + } + + /** + * RMS C band automatic gain control + * + * @param rcagc + * RMS C band automatic gain control to return + */ + public Double getRcagc() { + return rcagc; + } + + /** + * @param rcagc + * RMS C band automatic gain control to set + */ + public void setRcagc(Double rcagc) { + this.rcagc = rcagc; + } + + /** + * Get the Number of valid points for C band automatic gain + * + * @return nvpca the Number of valid points for C band automatic gain + */ + public Long getNvpca() { + return nvpca; + } + + /** + * @param nvpca + * the Number of valid points for C band automatic gain to set + */ + public void setNvpca(Long nvpca) { + this.nvpca = nvpca; + } + + /** + * Satellite channel center frequency 1 + * + * @param sccf1 + * Satellite channel center frequency 1 + */ + public Double getSccf1() { + return sccf1; + } + + /** + * @param sccf1 + * Satellite channel center frequency 1 + */ + public void setSccf1(Double sccf1) { + this.sccf1 = sccf1; + } + + /** + * Satellite channel center frequency 1 + * + * @param sccf2 + * Satellite channel center frequency 2 + */ + public Double getSccf2() { + return sccf2; + } + + /** + * @param sccf2 + * Satellite channel center frequency 2 + */ + public void setSccf2(Double sccf2) { + this.sccf2 = sccf2; + } + + /** + * Satellite channel center frequency 3 + * + * @param sccf1 + * Satellite channel center frequency 3 + */ + public Double getSccf3() { + return sccf3; + } + + /** + * @param sccf3 + * Satellite channel center frequency 3 + */ + public void setSccf3(Double sccf3) { + this.sccf3 = sccf3; + } + + /** + * Brightness temperature 1 + * + * @param tmbrst1 + * Brightness temperature 1 + */ + public Double getTmbrst1() { + return tmbrst1; + } + + /** + * @param tmbrst1 + * Brightness temperature 1 + */ + public void setTmbrst1(Double tmbrst1) { + this.tmbrst1 = tmbrst1; + } + + /** + * Brightness temperature 2 + * + * @param tmbrst2 + * Brightness temperature 2 + */ + public Double getTmbrst2() { + return tmbrst2; + } + + /** + * @param tmbrst2 + * Brightness temperature 2 + */ + public void setTmbrst2(Double tmbrst2) { + this.tmbrst2 = tmbrst2; + } + + /** + * Brightness temperature 3 + * + * @param tmbrst3 + * Brightness temperature 3 + */ + public Double getTmbrst3() { + return tmbrst3; + } + + /** + * @param tmbrst3 + * Brightness temperature 3 + */ + public void setTmbrst3(Double tmbrst3) { + this.tmbrst3 = tmbrst3; + } + + /** + * Radiometer water vapor content + * + * @param rwvc + * Radiometer water vapor content to return + */ + public Double getRwvc() { + return rwvc; + } + + /** + * @param rwvc + * Radiometer water vapor content to set + */ + public void setRwvc(Double rwvc) { + this.rwvc = rwvc; + } + + /** + * Radiometer liquid content + * + * @param rlqc + * Radiometer liquid content to return + */ + public Double getRlqc() { + return rlqc; + } + + /** + * @param rlqc + * Radiometer liquid content to set + */ + public void setRlqc(Double rlqc) { + this.rlqc = rlqc; + } + + /** + * Height or altitude 1 + * + * @param hmsl + * Height or altitude 1 to return + */ + public Double getHmsl1() { + return hmsl1; + } + + /** + * @param hmsl + * Height or altitude 1 to set + */ + public void setHmsl1(Double hmsl1) { + this.hmsl1 = hmsl1; + } + + /** + * Height or altitude 2 + * + * @param hmsl + * Height or altitude 2 to return + */ + public Double getHmsl2() { + return hmsl2; + } + + /** + * @param hmsl + * Height or altitude 2 to set + */ + public void setHmsl2(Double hmsl2) { + this.hmsl2 = hmsl2; + } + + /** + * Wind speed from altimeter (m/s) + * + * @param wspa + * Wind speed from altimeter to return + */ + public Double getWspa() { + return wspa; + } + + /** + * @param wspa + * Wind speed from altimeter to set + */ + public void setWspa(Double wspa) { + this.wspa = wspa; + } + + /** + * Wind speed from radiometer (m/s) + * + * @param wspr + * Wind speed from radiometer to return + */ + public Double getWspr() { + return wspr; + } + + /** + * @param wspr + * Wind speed from radiometer to set + */ + public void setWspr(Double wspr) { + this.wspr = wspr; + } + + /** + * u-component of the model wind vector (m/s) + * + * @param umwv + * u-component of the model wind vector to return + */ + public Double getUmwv() { + return umwv; + } + + /** + * @param umwv + * u-component of the model wind vector to set + */ + public void setUmwv(Double umwv) { + this.umwv = umwv; + } + + /** + * u-component of the model wind vector (m/s) + * + * @param vwmv + * u-component of the model wind vector to return + */ + public Double getVwmv() { + return vwmv; + } + + /** + * @param vwmv + * u-component of the model wind vector to set + */ + public void setVwmv(Double vwmv) { + this.vwmv = vwmv; + } + + /** + * Mean dynamic topography (m) + * + * @param 1G Mean dynamic topography to return + */ + public Double getMdyt() { + return mdyt; + } + + /** + * @param mdyt + * Mean dynamic topography to set + */ + public void setMdyt(Double mdyt) { + this.mdyt = mdyt; + } + + /** + * Altitude of COG above reference ellipsoid (m) + * + * @param alre + * Altitude of COG above reference ellipsoid + */ + public Double getAlre() { + return alre; + } + + /** + * @param alre + * Altitude of COG above reference ellipsoid to set + */ + public void setAlre(Double alre) { + this.alre = alre; + } + + /** + * Instantaneous altitude rate (m/s) + * + * @param ialr + * Instantaneous altitude rate to return + */ + public Double getIalr() { + return ialr; + } + + /** + * @param ialr + * Instantaneous altitude rate to set + */ + public void setIalr(Double ialr) { + this.ialr = ialr; + } + + /** + * Squared off nadir angle of the satellite from platform data (degree**2) + * + * @param onap + * Squared off nadir angle of the satellite from platform data to + * set + */ + public Double getOnap() { + return onap; + } + + /** + * @param onap + * Squared off nadir angle of the satellite from platform data to + * set + */ + public void setOnap(Double onap) { + this.onap = onap; + } + + /** + * Squared off nadir angle of the satellite from waveform data (degree**2) + * + * @param sonaw + * Squared off nadir angle of the satellite from waveform data to + * return + */ + public Double getSonaw() { + return sonaw; + } + + /** + * @param sonaw + * Squared off nadir angle of the satellite from waveform data to + * set + */ + public void setSonaw(Double sonaw) { + this.sonaw = sonaw; + } + + /** + * Ionospheric correction from model on Ku band (m) + * + * @param icmk + * Ionospheric correction from model on Ku band to return + */ + public Double getIcmk() { + return icmk; + } + + /** + * @param icmk + * Ionospheric correction from model on Ku band to set + */ + public void setIcmk(Double icmk) { + this.icmk = icmk; + } + + /** + * Ionospheric correction from model on Ku band (m) + * + * @param aick + * Ionospheric correction from model on Ku band to return + */ + public Double getAick() { + return aick; + } + + /** + * @param aick + * Ionospheric correction from model on Ku band to set + */ + public void setAick(Double aick) { + this.aick = aick; + } + + /** + * Model dry tropospheric correction (m) + * + * @param mdtc + * Model dry tropospheric correction to return + */ + public Double getMdtc() { + return mdtc; + } + + /** + * @param mdtc + * Model dry tropospheric correction to set + */ + public void setMdtc(Double mdtc) { + this.mdtc = mdtc; + } + + /** + * Model wet tropospheric correction (m) + * + * @param mwtc + * Model wet tropospheric correction to return + */ + public Double getMwtc() { + return mwtc; + } + + /** + * @param mwtc + * Model wet tropospheric correction to set + */ + public void setMwtc(Double mwtc) { + this.mwtc = mwtc; + } + + /** + * Radiometer wet tropospheric correction (m) + * + * @param rwtc + * Radiometer wet tropospheric correction to return + */ + public Double getRwtc() { + return rwtc; + } + + /** + * @param rwtc + * Radiometer wet tropospheric correction to set + */ + public void setRwtc(Double rwtc) { + this.rwtc = rwtc; + } + + /** + * Mean sea-surface height (m) + * + * @param mssh + * Mean sea-surface height to return + */ + public Double getMssh() { + return mssh; + } + + /** + * @param mssh + * Mean sea-surface height to set + */ + public void setMssh(Double mssh) { + this.mssh = mssh; + } + + /** + * Mean sea-surface height from altimeter only (m) + * + * @param msha + * Mean sea-surface height from altimeter only to return + */ + public Double getMsha() { + return msha; + } + + /** + * @param msha + * Mean sea-surface height from altimeter only to set + */ + public void setMsha(Double msha) { + this.msha = msha; + } + + /** + * Geoid's height (m) + * + * @param geodh + * Geoid's height to return + */ + public Double getGeodh() { + return geodh; + } + + /** + * @param odle + * Ocean depth/land elevation (m) + */ + public void setGeodh(Double geodh) { + this.geodh = geodh; + } + + /** + * Ocean depth/land elevation (m) + * + * @param odle + * Ocean depth/land elevation to return + */ + public Double getOdle() { + return odle; + } + + /** + * @param odle + * Ocean depth/land elevation to set + */ + public void setOdle(Double odle) { + this.odle = odle; + } + + /** + * Solid earth tide height (m) + * + * @param seth + * Solid earth tide height to return + */ + public Double getSeth() { + return seth; + } + + /** + * @param seth + * Solid earth tide height to set + */ + public void setSeth(Double seth) { + this.seth = seth; + } + + /** + * Total geocentric ocean tide height solution 1 (m) + * + * @param tgoth1 + * Total geocentric ocean tide height solution 1 to return + */ + public Double getTgoth1() { + return tgoth1; + } + + /** + * @param tgoth1 + * Total geocentric ocean tide height solution 1 to set + */ + public void setTgoth1(Double tgoth1) { + this.tgoth1 = tgoth1; + } + + /** + * Total geocentric ocean tide height solution 2 (m) + * + * @param tgoth2 + * Total geocentric ocean tide height solution 2 to return + */ + public Double getTgoth2() { + return tgoth2; + } + + /** + * @param tgoth2 + * Total geocentric ocean tide height solution 2 to set + */ + public void setTgoth2(Double tgoth2) { + this.tgoth2 = tgoth2; + } + + /** + * Loading tide height geocentric ocean tide solution 1 (m) + * + * @param lths1 + * Loading tide height geocentric ocean tide solution 1 to return + */ + public Double getLths1() { + return lths1; + } + + /** + * @param lths1 + * Loading tide height geocentric ocean tide solution 1 to set + */ + public void setLths1(Double lths1) { + this.lths1 = lths1; + } + + /** + * Loading tide height geocentric ocean tide solution 2 (m) + * + * @param lths2 + * Loading tide height geocentric ocean tide solution 2 to return + */ + public Double getLths2() { + return lths2; + } + + /** + * @param lths2 + * Loading tide height geocentric ocean tide solution 2 to set + */ + public void setLths2(Double lths2) { + this.lths2 = lths2; + } + + /** + * Long period tide height (m) + * + * @param lpth + * Long period tide height to return + */ + public Double getLpth() { + return lpth; + } + + /** + * @param lpth + * Long period tide height to set + */ + public void setLpth(Double lpth) { + this.lpth = lpth; + } + + /** + * Non-equilibrium long period tide height (m) + * + * @param nlth + * Non-equilibrium long period tide height to return + */ + public Double getNlth() { + return nlth; + } + + /** + * @param nlth + * Non-equilibrium long period tide height to set + */ + public void setNlth(Double nlth) { + this.nlth = nlth; + } + + /** + * Geocentric pole tide height (m) + * + * @param gpth + * Geocentric pole tide height to return + */ + public Double getGpth() { + return gpth; + } + + /** + * @param gpth + * Geocentric pole tide height to set + */ + public void setGpth(Double gpth) { + this.gpth = gpth; + } + + /** + * Inverted barometer correction (m) + * + * @param ibco + * Inverted barometer correction to return + */ + public Double getIbco() { + return ibco; + } + + /** + * @param ibco + * Inverted barometer correction to set + */ + public void setIbco(Double ibco) { + this.ibco = ibco; + } + + /** + * High frequency fluctuations of the sea surface topography correction (m) + * + * @param hfstc + * High frequency fluctuations of the sea surface topography + * correction + * + */ + public Double getHfstc() { + return hfstc; + } + + /** + * @param hfstc + * High frequency fluctuations of the sea surface topography + * correction to set + */ + public void setHfstc(Double hfstc) { + this.hfstc = hfstc; + } + + /** + * Sea Surface Height Anomoly + * + * @param ssha + * Sea Surface Height Anomoly to return + */ + public Double getSsha() { + return ssha; + } + + /** + * @param ssha + * Sea Surface Height Anomoly to set + */ + public void setSsha(Double ssha) { + this.ssha = ssha; + } + + /** + * @return the obsTime + */ + public Calendar getObsTime() { + return obsTime; + } + + /** + * @param obsTime + * the obsTime to set + */ + public void setObsTime(Calendar obsTime) { + this.obsTime = obsTime; + } + + /** + * Get the value and units of a named parameter within this observation. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return An Amount with value and units. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Amount getValue(String paramName) { + return null; + } + + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public String getString(String paramName) { + return null; + } + + /** + * Get the value of a parameter that is represented as a String. + * + * @param paramName + * The name of the parameter value to retrieve. + * @return The String value of the parameter. If the parameter is unknown, a + * null reference is returned. + */ + @Override + public Collection getValues(String paramName) { + return null; + } + + /** + * Get the IDecoderGettable reference for this record. + * + * @return The IDecoderGettable reference for this record. + */ + @Override + public IDecoderGettable getDecoderGettable() { + return this; + } + + @Override + public void setDataURI(String dataURI) { + identifier = dataURI; + } + + @Override + public String[] getStrings(String paramName) { + return null; + } + + @Override + public Date getPersistenceTime() { + return this.dataTime.getRefTime(); + + } + + @Override + public void setPersistenceTime(Date persistTime) { + // TODO Auto-generated method stub + + } + + @Override + public PointDataView getPointDataView() { + return this.pointDataView; + } + + @Override + public void setPointDataView(PointDataView pointDataView) { + this.pointDataView = pointDataView; + + } @Override @Column @@ -2570,4 +2569,9 @@ public class SshaRecord extends PersistablePluginDataObject implements public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "ssha"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java index bfad2c3fe9..4c29426f79 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java @@ -1,23 +1,3 @@ -/* - * - * StormTrackRecord - * - * This class performs the mapping to the database tables for the Automated - * Tropical Cyclone Forecast (ATCF) and ensemble storm tracks Decoder plug-in. - * - * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ----------- -------------- ----------------------------------- - * 06/23/10 283 F. J. Yen Initial creation - * * - * This code has been developed by the SIB for use in the AWIPS2 system. - * - * - * @author F. J. Yen, SIB - * @version 1 - - */ - package gov.noaa.nws.ncep.common.dataplugin.stormtrack; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -55,18 +35,20 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 07/2011 T. Lee ATCF and Ensemble storm tracks - * 10/19/2011 858 Greg Hull remove forecastHr - * Apr 4, 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. - * + * Date Ticket# Engineer Description + * ------------ --------- ----------- -------------------------- + * Jun 23, 2010 283 F. J. Yen Initial creation + * 07/2011 T. Lee ATCF and Ensemble storm tracks + * Oct 19, 2011 858 Greg Hull remove forecastHr + * 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 * * - * @author tlee + * @author F. J. Yen, SIB * @version 1.0 */ @Entity @@ -76,674 +58,672 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "stormtrack", - indexes = { - @Index(name = "stormtrack_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "stormtrack", indexes = { @Index(name = "stormtrack_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize public class StormTrackRecord extends PluginDataObject { - private static final long serialVersionUID = 1L; - private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; - private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; - - /** Report type */ - @Column(length = 32) - @XmlElement - @DynamicSerializeElement - @DataURI(position = 6) - private String reportType; - - /** - * Basin, e.g. WP, IO, SH, CP, EP, AL, SL, ML - */ - @DataURI(position = 1) - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String basin; - - /** - * Annual cyclone number; 1 through 99 - */ - @DataURI(position = 2) - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String cycloneNum; - - /** - * Warning Date-Time - */ - @Column - @DynamicSerializeElement - @XmlElement - private Calendar warnTime; - - /** - * Objective technique sorting number/Minutes for best track: 00-99 - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private int techniqueNum; - - /** - * Objective Technique or CARQ or WRNG, BEST for best Track - */ - @DataURI(position = 3) - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String model; - -// @DataURI(position = 4) -// @Column -// @DynamicSerializeElement -// @XmlElement -// private int fcstHour; - - /** - * Latitude (degrees) for the DTG: -900 through 900 - */ - @DynamicSerializeElement - @XmlElement - private float clat; - - /** - * Longitude (degrees) for the DTG: -1800 through 1800 - */ - @DynamicSerializeElement - @XmlElement - private float clon; - - /** - * Maximum sustained wind speed in knots: 0 through 300 - */ - @DynamicSerializeElement - @XmlElement - private float windMax; - - /** - * Minimum sea level pressure, 1 through 1100MB - */ - @DynamicSerializeElement - @XmlElement - private float mslp; - - /** - * Level of tropical cyclone development; such as DB, TD, TS, TY, ... - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String stormType; - - /** - * Wind intensity (kts) for the radii defined i this record: 34, 50, 64 - */ - @DataURI(position = 4) - @DynamicSerializeElement - @XmlElement - private float windCategory; - - /** - * Radius Code for wind intensity: AAA = full circle; QQQ = quadrant (NNQ, - * NEQ, EEQ, SEQ, SSQ, SWQ, WWQ, NWQ) - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String windCode; - - /** - * If full circle, radius of specified wind intensity. If semicircle or - * quadrant, radius of specified wind intensity of circle portion specified - * in radius code. 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad1WindRad; - - /** - * If full circle, this field not used. If semicircle, radius (nm) of - * specified wind intensity for semicircle not specified in radius code. If - * quadrant, radius (nm) of specified wind intensity for 2nd quadrant - * (counting clockwise from quadrant specified in radius code). 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad2WindRad; - - /** - * If full circle or semicircle this field not used. If quadrant, radius - * (nm) of specified wind intensity for 3rd quadrant (counting clockwise - * from quadrant specified in radius code). 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad3WindRad; - - /** - * If full circle or semicircle this field not used. If quadrant, radius - * (nm) of specified wind intensity for 4th quadrant (counting clockwise - * from quadrant specified in radius code). 0 - 1200 nm. - */ - @DynamicSerializeElement - @XmlElement - private float quad4WindRad; - - /** - * Pressure in millibars of the last closed isobar. 900 - 1050 mb - */ - @DynamicSerializeElement - @XmlElement - private float closedP; - - /** - * Radius of the last closed isobar in nm. 0 - 9999 nm - */ - @DynamicSerializeElement - @XmlElement - private float radClosedP; - - /** - * Radius of max winds. 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float maxWindRad; - - /** - * Gusts. 0 - 995 kts. - */ - @DynamicSerializeElement - @XmlElement - private float gust; - - /** - * Eye diameter. 0 - 999nm - */ - @DynamicSerializeElement - @XmlElement - private float eyeSize; - - /** - * Subregion code: A, B, C, E, L, P, Q, S, W - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String subRegion; - - /** - * Max seas: 0 through 999 ft. - */ - @DynamicSerializeElement - @XmlElement - private float maxSeas; - - /** - * Forecaster's initials, used for forecastHour 0 WRNG, up to 3 chars - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String forecaster; - - /** - * Storm direction in compass coordinates, 0 - 359 degrees - */ - @DynamicSerializeElement - @XmlElement - private float stormDrct; - - /** - * Storm speed. 0 - 999 kts - */ - @DynamicSerializeElement - @XmlElement - private float stormSped; - - /** - * Literal storm name, NONAME, or INVEST - */ - @DataURI(position = 5) - @Column(length = 32) - @DynamicSerializeElement - @XmlElement - private String stormName; - - /** - * System depth, D=deep, M=medium, S=shallow, X=unknown - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String stormDepth; - - /** - * Wave height for radii defined in seas1 - seas4. 0 - 99 ft. - */ - @DynamicSerializeElement - @XmlElement - private float waveHght; - - /** - * Radius code for seas wave height - */ - @Column(length = 8) - @DynamicSerializeElement - @XmlElement - private String waveCode; - - /** - * First quadrant seas radius as defined by waveCode, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad1WaveRad; - - /** - * Second quadrant seas radius as defined by waveCode, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad2WaveRad; - - /** - * Third quadrant seas radius as defined by waveCode, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad3WaveRad; - - /** - * Fourth quadrant seas radius as defined by waveCode, 0 - 999 nm - */ - @DynamicSerializeElement - @XmlElement - private float quad4WaveRad; - - /* - * 20 character description of format to follow in userData - */ - @Column(length = 20) - @DynamicSerializeElement - @XmlElement - private String userDefined; - - /* - * User data section as indicated by userDefined parameter - */ - @Column(length = 30) - @DynamicSerializeElement - @XmlElement - private String userData; - - /** - * Default Constructor - */ - public StormTrackRecord() { - this.reportType= " "; - this.basin = "XX"; - this.cycloneNum = "M"; - this.warnTime = null; - this.techniqueNum = IDecoderConstantsN.INTEGER_MISSING; - this.model = " "; -// this.fcstHour = IMISSD; - this.clat = RMISSD; - this.clon = RMISSD; - this.windMax = RMISSD; - this.mslp = RMISSD; - this.stormType = "XX"; - this.windCategory = RMISSD; - this.windCode = "M"; - this.quad1WindRad = RMISSD; - this.quad2WindRad = RMISSD; - this.quad3WindRad = RMISSD; - this.quad4WindRad = RMISSD; - this.closedP = RMISSD; - this.radClosedP = RMISSD; - this.maxWindRad = RMISSD; - this.gust = RMISSD; - this.eyeSize = RMISSD; - this.subRegion = " "; - this.maxSeas = RMISSD; - this.forecaster = ""; - this.stormDrct = RMISSD; - this.stormSped = RMISSD; - this.stormName = " "; - this.stormDepth = " "; - this.waveHght = RMISSD; - this.waveCode = " "; - this.quad1WaveRad = RMISSD; - this.quad2WaveRad = RMISSD; - this.quad3WaveRad = RMISSD; - this.quad4WaveRad = RMISSD; - this.userDefined = " "; - this.userData = " "; - } - - /** - * Constructs a StormTrack record from a dataURI - * - * @param uri - * The dataURI - */ - public StormTrackRecord(String uri) { - super(uri); - } - - @Override - public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } - - public String getReportType() { - return reportType; - } - - public void setReportType(String reportType) { - this.reportType = reportType; - } - - public String getBasin() { - return basin; - } - - public void setBasin(String basin) { - this.basin = basin; - } - - public String getCycloneNum() { - return cycloneNum; - } - - public void setCycloneNum(String cycloneNum) { - this.cycloneNum = cycloneNum; - } - - public Calendar getWarnTime() { - return warnTime; - } - - public void setWarnTime(Calendar warnTime) { - this.warnTime = warnTime; - } - - public int getTechniqueNum() { - return techniqueNum; - } - - public void setTechniqueNum(int techniqueNum) { - this.techniqueNum = techniqueNum; - } - - public String getModel() { - return model; - } - - public void setModel(String model) { - this.model = model; - } - - public int getFcstHour() { - return dataTime.getFcstTime()/3600; //fcstHour; - } - - public float getClat() { - return clat; - } - - public void setClat(float clat) { - this.clat = clat; - } - - public float getClon() { - return clon; - } - - public void setClon(float clon) { - this.clon = clon; - } - - public float getWindMax() { - return windMax; - } - - public void setWindMax(float windMax) { - this.windMax = windMax; - } - - public float getMslp() { - return mslp; - } - - public void setMslp(float mslp) { - this.mslp = mslp; - } - - public String getStormType() { - return stormType; - } - - public void setStormType(String stormType) { - this.stormType = stormType; - } + private static final long serialVersionUID = 1L; + + private static final float RMISSD = IDecoderConstantsN.FLOAT_MISSING; + + private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; + + /** Report type */ + @Column(length = 32) + @XmlElement + @DynamicSerializeElement + @DataURI(position = 6) + private String reportType; + + /** + * Basin, e.g. WP, IO, SH, CP, EP, AL, SL, ML + */ + @DataURI(position = 1) + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String basin; + + /** + * Annual cyclone number; 1 through 99 + */ + @DataURI(position = 2) + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String cycloneNum; + + /** + * Warning Date-Time + */ + @Column + @DynamicSerializeElement + @XmlElement + private Calendar warnTime; + + /** + * Objective technique sorting number/Minutes for best track: 00-99 + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private int techniqueNum; + + /** + * Objective Technique or CARQ or WRNG, BEST for best Track + */ + @DataURI(position = 3) + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String model; + + // @DataURI(position = 4) + // @Column + // @DynamicSerializeElement + // @XmlElement + // private int fcstHour; + + /** + * Latitude (degrees) for the DTG: -900 through 900 + */ + @DynamicSerializeElement + @XmlElement + private float clat; + + /** + * Longitude (degrees) for the DTG: -1800 through 1800 + */ + @DynamicSerializeElement + @XmlElement + private float clon; + + /** + * Maximum sustained wind speed in knots: 0 through 300 + */ + @DynamicSerializeElement + @XmlElement + private float windMax; + + /** + * Minimum sea level pressure, 1 through 1100MB + */ + @DynamicSerializeElement + @XmlElement + private float mslp; + + /** + * Level of tropical cyclone development; such as DB, TD, TS, TY, ... + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String stormType; + + /** + * Wind intensity (kts) for the radii defined i this record: 34, 50, 64 + */ + @DataURI(position = 4) + @DynamicSerializeElement + @XmlElement + private float windCategory; + + /** + * Radius Code for wind intensity: AAA = full circle; QQQ = quadrant (NNQ, + * NEQ, EEQ, SEQ, SSQ, SWQ, WWQ, NWQ) + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String windCode; + + /** + * If full circle, radius of specified wind intensity. If semicircle or + * quadrant, radius of specified wind intensity of circle portion specified + * in radius code. 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad1WindRad; + + /** + * If full circle, this field not used. If semicircle, radius (nm) of + * specified wind intensity for semicircle not specified in radius code. If + * quadrant, radius (nm) of specified wind intensity for 2nd quadrant + * (counting clockwise from quadrant specified in radius code). 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad2WindRad; + + /** + * If full circle or semicircle this field not used. If quadrant, radius + * (nm) of specified wind intensity for 3rd quadrant (counting clockwise + * from quadrant specified in radius code). 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad3WindRad; + + /** + * If full circle or semicircle this field not used. If quadrant, radius + * (nm) of specified wind intensity for 4th quadrant (counting clockwise + * from quadrant specified in radius code). 0 - 1200 nm. + */ + @DynamicSerializeElement + @XmlElement + private float quad4WindRad; + + /** + * Pressure in millibars of the last closed isobar. 900 - 1050 mb + */ + @DynamicSerializeElement + @XmlElement + private float closedP; + + /** + * Radius of the last closed isobar in nm. 0 - 9999 nm + */ + @DynamicSerializeElement + @XmlElement + private float radClosedP; + + /** + * Radius of max winds. 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float maxWindRad; + + /** + * Gusts. 0 - 995 kts. + */ + @DynamicSerializeElement + @XmlElement + private float gust; + + /** + * Eye diameter. 0 - 999nm + */ + @DynamicSerializeElement + @XmlElement + private float eyeSize; + + /** + * Subregion code: A, B, C, E, L, P, Q, S, W + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String subRegion; + + /** + * Max seas: 0 through 999 ft. + */ + @DynamicSerializeElement + @XmlElement + private float maxSeas; + + /** + * Forecaster's initials, used for forecastHour 0 WRNG, up to 3 chars + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String forecaster; + + /** + * Storm direction in compass coordinates, 0 - 359 degrees + */ + @DynamicSerializeElement + @XmlElement + private float stormDrct; + + /** + * Storm speed. 0 - 999 kts + */ + @DynamicSerializeElement + @XmlElement + private float stormSped; + + /** + * Literal storm name, NONAME, or INVEST + */ + @DataURI(position = 5) + @Column(length = 32) + @DynamicSerializeElement + @XmlElement + private String stormName; + + /** + * System depth, D=deep, M=medium, S=shallow, X=unknown + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String stormDepth; + + /** + * Wave height for radii defined in seas1 - seas4. 0 - 99 ft. + */ + @DynamicSerializeElement + @XmlElement + private float waveHght; + + /** + * Radius code for seas wave height + */ + @Column(length = 8) + @DynamicSerializeElement + @XmlElement + private String waveCode; + + /** + * First quadrant seas radius as defined by waveCode, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad1WaveRad; + + /** + * Second quadrant seas radius as defined by waveCode, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad2WaveRad; + + /** + * Third quadrant seas radius as defined by waveCode, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad3WaveRad; + + /** + * Fourth quadrant seas radius as defined by waveCode, 0 - 999 nm + */ + @DynamicSerializeElement + @XmlElement + private float quad4WaveRad; + + /* + * 20 character description of format to follow in userData + */ + @Column(length = 20) + @DynamicSerializeElement + @XmlElement + private String userDefined; + + /* + * User data section as indicated by userDefined parameter + */ + @Column(length = 30) + @DynamicSerializeElement + @XmlElement + private String userData; + + /** + * Default Constructor + */ + public StormTrackRecord() { + this.reportType = " "; + this.basin = "XX"; + this.cycloneNum = "M"; + this.warnTime = null; + this.techniqueNum = IDecoderConstantsN.INTEGER_MISSING; + this.model = " "; + // this.fcstHour = IMISSD; + this.clat = RMISSD; + this.clon = RMISSD; + this.windMax = RMISSD; + this.mslp = RMISSD; + this.stormType = "XX"; + this.windCategory = RMISSD; + this.windCode = "M"; + this.quad1WindRad = RMISSD; + this.quad2WindRad = RMISSD; + this.quad3WindRad = RMISSD; + this.quad4WindRad = RMISSD; + this.closedP = RMISSD; + this.radClosedP = RMISSD; + this.maxWindRad = RMISSD; + this.gust = RMISSD; + this.eyeSize = RMISSD; + this.subRegion = " "; + this.maxSeas = RMISSD; + this.forecaster = ""; + this.stormDrct = RMISSD; + this.stormSped = RMISSD; + this.stormName = " "; + this.stormDepth = " "; + this.waveHght = RMISSD; + this.waveCode = " "; + this.quad1WaveRad = RMISSD; + this.quad2WaveRad = RMISSD; + this.quad3WaveRad = RMISSD; + this.quad4WaveRad = RMISSD; + this.userDefined = " "; + this.userData = " "; + } + + /** + * Constructs a StormTrack record from a dataURI + * + * @param uri + * The dataURI + */ + public StormTrackRecord(String uri) { + super(uri); + } + + @Override + public IDecoderGettable getDecoderGettable() { + // TODO Auto-generated method stub + return null; + } + + public String getReportType() { + return reportType; + } + + public void setReportType(String reportType) { + this.reportType = reportType; + } + + public String getBasin() { + return basin; + } + + public void setBasin(String basin) { + this.basin = basin; + } + + public String getCycloneNum() { + return cycloneNum; + } + + public void setCycloneNum(String cycloneNum) { + this.cycloneNum = cycloneNum; + } + + public Calendar getWarnTime() { + return warnTime; + } + + public void setWarnTime(Calendar warnTime) { + this.warnTime = warnTime; + } + + public int getTechniqueNum() { + return techniqueNum; + } + + public void setTechniqueNum(int techniqueNum) { + this.techniqueNum = techniqueNum; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public int getFcstHour() { + return dataTime.getFcstTime() / 3600; // fcstHour; + } + + public float getClat() { + return clat; + } + + public void setClat(float clat) { + this.clat = clat; + } + + public float getClon() { + return clon; + } + + public void setClon(float clon) { + this.clon = clon; + } + + public float getWindMax() { + return windMax; + } + + public void setWindMax(float windMax) { + this.windMax = windMax; + } + + public float getMslp() { + return mslp; + } + + public void setMslp(float mslp) { + this.mslp = mslp; + } + + public String getStormType() { + return stormType; + } + + public void setStormType(String stormType) { + this.stormType = stormType; + } - public float getWindCategory() { - return windCategory; - } + public float getWindCategory() { + return windCategory; + } - public void setWindCategory(float windCategory) { - this.windCategory = windCategory; - } + public void setWindCategory(float windCategory) { + this.windCategory = windCategory; + } - public String getWindCode() { - return windCode; - } + public String getWindCode() { + return windCode; + } - public void setWindCode(String windCode) { - this.windCode = windCode; - } + public void setWindCode(String windCode) { + this.windCode = windCode; + } - public float getQuad1WindRad() { - return quad1WindRad; - } + public float getQuad1WindRad() { + return quad1WindRad; + } - public void setQuad1WindRad(float quad1WindRad) { - this.quad1WindRad = quad1WindRad; - } + public void setQuad1WindRad(float quad1WindRad) { + this.quad1WindRad = quad1WindRad; + } - public float getQuad2WindRad() { - return quad2WindRad; - } + public float getQuad2WindRad() { + return quad2WindRad; + } - public void setQuad2WindRad(float quad2WindRad) { - this.quad2WindRad = quad2WindRad; - } + public void setQuad2WindRad(float quad2WindRad) { + this.quad2WindRad = quad2WindRad; + } - public float getQuad3WindRad() { - return quad3WindRad; - } + public float getQuad3WindRad() { + return quad3WindRad; + } - public void setQuad3WindRad(float quad3WindRad) { - this.quad3WindRad = quad3WindRad; - } + public void setQuad3WindRad(float quad3WindRad) { + this.quad3WindRad = quad3WindRad; + } - public float getQuad4WindRad() { - return quad4WindRad; - } + public float getQuad4WindRad() { + return quad4WindRad; + } - public void setQuad4WindRad(float quad4WindRad) { - this.quad4WindRad = quad4WindRad; - } + public void setQuad4WindRad(float quad4WindRad) { + this.quad4WindRad = quad4WindRad; + } - public float getClosedP() { - return closedP; - } + public float getClosedP() { + return closedP; + } - public void setClosedP(float closedP) { - this.closedP = closedP; - } + public void setClosedP(float closedP) { + this.closedP = closedP; + } - public float getRadClosedP() { - return radClosedP; - } + public float getRadClosedP() { + return radClosedP; + } - public void setRadClosedP(float radClosedP) { - this.radClosedP = radClosedP; - } + public void setRadClosedP(float radClosedP) { + this.radClosedP = radClosedP; + } - public float getMaxWindRad() { - return maxWindRad; - } + public float getMaxWindRad() { + return maxWindRad; + } - public void setMaxWindRad(float maxWindRad) { - this.maxWindRad = maxWindRad; - } + public void setMaxWindRad(float maxWindRad) { + this.maxWindRad = maxWindRad; + } - public float getGust() { - return gust; - } + public float getGust() { + return gust; + } - public void setGust(float gust) { - this.gust = gust; - } + public void setGust(float gust) { + this.gust = gust; + } - public float getEyeSize() { - return eyeSize; - } + public float getEyeSize() { + return eyeSize; + } - public void setEyeSize(float eyeSize) { - this.eyeSize = eyeSize; - } + public void setEyeSize(float eyeSize) { + this.eyeSize = eyeSize; + } - public String getSubRegion() { - return subRegion; - } + public String getSubRegion() { + return subRegion; + } - public void setSubRegion(String subRegion) { - this.subRegion = subRegion; - } + public void setSubRegion(String subRegion) { + this.subRegion = subRegion; + } - public float getMaxSeas() { - return maxSeas; - } + public float getMaxSeas() { + return maxSeas; + } - public void setMaxSeas(float maxSeas) { - this.maxSeas = maxSeas; - } + public void setMaxSeas(float maxSeas) { + this.maxSeas = maxSeas; + } - public String getForecaster() { - return forecaster; - } + public String getForecaster() { + return forecaster; + } - public void setForecaster(String forecaster) { - this.forecaster = forecaster; - } + public void setForecaster(String forecaster) { + this.forecaster = forecaster; + } - public float getStormDrct() { - return stormDrct; - } + public float getStormDrct() { + return stormDrct; + } - public void setStormDrct(float stormDrct) { - this.stormDrct = stormDrct; - } + public void setStormDrct(float stormDrct) { + this.stormDrct = stormDrct; + } - public float getStormSped() { - return stormSped; - } + public float getStormSped() { + return stormSped; + } - public void setStormSped(float stormSped) { - this.stormSped = stormSped; - } + public void setStormSped(float stormSped) { + this.stormSped = stormSped; + } - public String getStormName() { - return stormName; - } + public String getStormName() { + return stormName; + } - public void setStormName(String stormName) { - this.stormName = stormName; - } + public void setStormName(String stormName) { + this.stormName = stormName; + } - public String getStormDepth() { - return stormDepth; - } + public String getStormDepth() { + return stormDepth; + } - public void setStormDepth(String stormDepth) { - this.stormDepth = stormDepth; - } + public void setStormDepth(String stormDepth) { + this.stormDepth = stormDepth; + } - public float getWaveHght() { - return waveHght; - } + public float getWaveHght() { + return waveHght; + } - public void setWaveHght(float waveHght) { - this.waveHght = waveHght; - } + public void setWaveHght(float waveHght) { + this.waveHght = waveHght; + } - public String getWaveCode() { - return waveCode; - } + public String getWaveCode() { + return waveCode; + } - public void setWaveCode(String waveCode) { - this.waveCode = waveCode; - } + public void setWaveCode(String waveCode) { + this.waveCode = waveCode; + } - public float getQuad1WaveRad() { - return quad1WaveRad; - } + public float getQuad1WaveRad() { + return quad1WaveRad; + } - public void setQuad1WaveRad(float quad1WaveRad) { - this.quad1WaveRad = quad1WaveRad; - } + public void setQuad1WaveRad(float quad1WaveRad) { + this.quad1WaveRad = quad1WaveRad; + } - public float getQuad2WaveRad() { - return quad2WaveRad; - } + public float getQuad2WaveRad() { + return quad2WaveRad; + } - public void setQuad2WaveRad(float quad2WaveRad) { - this.quad2WaveRad = quad2WaveRad; - } + public void setQuad2WaveRad(float quad2WaveRad) { + this.quad2WaveRad = quad2WaveRad; + } - public float getQuad3WaveRad() { - return quad3WaveRad; - } + public float getQuad3WaveRad() { + return quad3WaveRad; + } - public void setQuad3WaveRad(float quad3WaveRad) { - this.quad3WaveRad = quad3WaveRad; - } + public void setQuad3WaveRad(float quad3WaveRad) { + this.quad3WaveRad = quad3WaveRad; + } - public float getQuad4WaveRad() { - return quad4WaveRad; - } + public float getQuad4WaveRad() { + return quad4WaveRad; + } - public void setQuad4WaveRad(float quad4WaveRad) { - this.quad4WaveRad = quad4WaveRad; - } + public void setQuad4WaveRad(float quad4WaveRad) { + this.quad4WaveRad = quad4WaveRad; + } - public String getUserDefined() { - return userDefined; - } + public String getUserDefined() { + return userDefined; + } - public void setUserDefined(String userDefined) { - this.userDefined = userDefined; - } + public void setUserDefined(String userDefined) { + this.userDefined = userDefined; + } - public String getUserData() { - return userData; - } + public String getUserData() { + return userData; + } - public void setUserData(String userData) { - this.userData = userData; - } + public void setUserData(String userData) { + this.userData = userData; + } @Override @Column @@ -752,4 +732,8 @@ public class StormTrackRecord extends PluginDataObject { return super.getDataURI(); } + @Override + public String getPluginName() { + return "stormtrack"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java index c4c96cc01b..27f67b511b 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java @@ -1,30 +1,3 @@ -/** - * - * TcmRecord - * - * This java class performs the mapping to the database tables for TCM. - * - *
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    	Engineer    Description
- * -------		------- 	-------- 	-----------
- * 06/2009		128			T. Lee		Initial coding
- * 07/2009		128			T. Lee		Migrated to TO11
- * 11/2009		128			T. Lee		Migrated to TO11D6
- * 09/2011      			Chin Chen   changed to improve purge performance and
- * 										removed xml serialization as well
- * 07/2012      #606        Greg Huoll  added reportType to the dataURI
- * Apr 4, 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.
- * 
- * 
- * - * @author T.Lee - * @version 1.0 - */ - package gov.noaa.nws.ncep.common.dataplugin.tcm; import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; @@ -53,6 +26,32 @@ import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; +/** + * + * TcmRecord + * + * This java class performs the mapping to the database tables for TCM. + * + *
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket# Engineer   Description
+ * ------------ ------- ---------- ---------------------------------
+ * 06/2009      128     T. Lee     Initial coding
+ * 07/2009      128     T. Lee     Migrated to TO11
+ * 11/2009      128     T. Lee     Migrated to TO11D6
+ * 09/2011              Chin Chen  changed to improve purge performance and
+ *                                 removed xml serialization as well
+ * 07/2012      606     Greg Hull  added reportType to the dataURI
+ * 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
+ * 
+ * + * @author T.Lee + * @version 1.0 + */ @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "tcmseq") @Table(name = "tcm", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -60,66 +59,61 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "tcm", - indexes = { - @Index(name = "tcm_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) +@org.hibernate.annotations.Table(appliesTo = "tcm", indexes = { @Index(name = "tcm_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize - public class TcmRecord extends PluginDataObject { private static final long serialVersionUID = 1L; - + /** Report type */ - @Column(length=32) - @DataURI(position=6) - @DynamicSerializeElement + @Column(length = 32) + @DataURI(position = 6) + @DynamicSerializeElement private String reportType; /** Storm name */ - @Column(length=32) - @DataURI(position=2) + @Column(length = 32) + @DataURI(position = 2) @DynamicSerializeElement private String stormName; - + /** Tropical storm basin */ - @Column(length=8) - @DataURI(position=1) + @Column(length = 8) + @DataURI(position = 1) @DynamicSerializeElement private String basin; /** Storm number */ - @Column(length=8) - @DataURI(position=3) + @Column(length = 8) + @DataURI(position = 3) @DynamicSerializeElement private String stormNumber; - + /** Advisory number */ - @Column(length=8) - @DataURI(position=4) + @Column(length = 8) + @DataURI(position = 4) @DynamicSerializeElement private String advisoryNumber; - + /** Correction flag */ @Column - @DataURI(position=5) + @DataURI(position = 5) @DynamicSerializeElement private Boolean corr; - + /** Bulletin insurance time */ @Column @DynamicSerializeElement private Calendar issueTime; - - /** Storm observation time **/ - @Column - @DynamicSerializeElement - private Calendar obsTime; + + /** Storm observation time **/ + @Column + @DynamicSerializeElement + private Calendar obsTime; /** Storm type */ - @Column(length=32) + @Column(length = 32) @DynamicSerializeElement private String stormType; @@ -142,359 +136,379 @@ public class TcmRecord extends PluginDataObject { @Column @DynamicSerializeElement private String ne12ft; - + /** Twelve-foot wave height radii at the SE quadrant */ @Column @DynamicSerializeElement private String se12ft; - + /** Twelve-foot wave height radii at the SW quadrant */ @Column @DynamicSerializeElement private String sw12ft; - + /** Twelve-foot wave height radii at the NW quadrant */ @Column @DynamicSerializeElement private String nw12ft; /** Mass news disseminator (MND) */ - @Column(length=72) + @Column(length = 72) @DynamicSerializeElement private String mndTime; /** Bulletin messages */ - @Column(length=8000) + @Column(length = 8000) @DynamicSerializeElement private String bullMessage; - + /** TCM position and winds */ @DynamicSerializeElement @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "tcmPosWinds_parentid_idex") - private Set tcmPosWinds = new HashSet(); - + private Set tcmPosWinds = new HashSet(); + /** * Default constructor */ public TcmRecord() { - basin = null; - stormName = null; - stormNumber = null; - issueTime = null; - obsTime = null; - corr = false; - mndTime = null; - advisoryNumber = null; - centralPressure = IDecoderConstantsN.INTEGER_MISSING; - positionAccuracy = IDecoderConstantsN.INTEGER_MISSING; - ne12ft = null; - se12ft = null; - sw12ft = null; - nw12ft = null; - bullMessage = null; + basin = null; + stormName = null; + stormNumber = null; + issueTime = null; + obsTime = null; + corr = false; + mndTime = null; + advisoryNumber = null; + centralPressure = IDecoderConstantsN.INTEGER_MISSING; + positionAccuracy = IDecoderConstantsN.INTEGER_MISSING; + ne12ft = null; + se12ft = null; + sw12ft = null; + nw12ft = null; + bullMessage = null; } /** * Constructs a TCM record from a dataURI * - * @param uri the dataURI + * @param uri + * the dataURI */ public TcmRecord(String uri) { - super(uri); + super(uri); } - - /** - * Return the report type + + /** + * Return the report type */ public String getReportType() { return reportType; } /** - * @param reportType the report type to set + * @param reportType + * the report type to set */ public void setReportType(String reportType) { this.reportType = reportType; } - - /** + + /** * Return the basin, e.g., AL/EP */ - public String getBasin() { - return basin; - } - - /** - * @param basin the basin name to set - */ - public void setBasin(String basin) { - this.basin = basin; - } - - /** - * Return the storm name - */ - public String getStormName() { - return stormName; - } + public String getBasin() { + return basin; + } /** - * @param stormName the storm name to set + * @param basin + * the basin name to set */ - public void setStormName(String stormName) { - this.stormName = stormName; - } - - /** + public void setBasin(String basin) { + this.basin = basin; + } + + /** + * Return the storm name + */ + public String getStormName() { + return stormName; + } + + /** + * @param stormName + * the storm name to set + */ + public void setStormName(String stormName) { + this.stormName = stormName; + } + + /** * Return the storm number */ - public String getStormNumber() { - return stormNumber; - } + public String getStormNumber() { + return stormNumber; + } /** - * @param stormNumber the storm number to set + * @param stormNumber + * the storm number to set */ - public void setStormNumber(String stormNumber) { - this.stormNumber = stormNumber; - } - - /** + public void setStormNumber(String stormNumber) { + this.stormNumber = stormNumber; + } + + /** * Return the advisory number */ - - public String getAdvisoryNumber() { - return advisoryNumber; - } + + public String getAdvisoryNumber() { + return advisoryNumber; + } /** - * @param advisory the advisory number to set + * @param advisory + * the advisory number to set */ - public void setAdvisoryNumber(String advisoryNumber) { - this.advisoryNumber = advisoryNumber; - } - - /** + public void setAdvisoryNumber(String advisoryNumber) { + this.advisoryNumber = advisoryNumber; + } + + /** * Return the correction flag */ - public Boolean getCorr() { - return corr; - } + public Boolean getCorr() { + return corr; + } /** - * @param corr the correction flag to set + * @param corr + * the correction flag to set */ - public void setCorr(Boolean corr) { - this.corr = corr; - } - - /** + public void setCorr(Boolean corr) { + this.corr = corr; + } + + /** * Return the storm type */ - public String getStormType() { - return stormType; - } + public String getStormType() { + return stormType; + } /** - * @param stormType the storm type to set + * @param stormType + * the storm type to set */ - public void setStormType(String stormType) { - this.stormType = stormType; - } - - /** + public void setStormType(String stormType) { + this.stormType = stormType; + } + + /** * Return the eye size */ - public Integer getEyeSize() { - return eyeSize; - } + public Integer getEyeSize() { + return eyeSize; + } /** - * @param eyeSize the eye size to set + * @param eyeSize + * the eye size to set */ - public void setEyeSize(Integer eyeSize) { - this.eyeSize = eyeSize; - } - - /** + public void setEyeSize(Integer eyeSize) { + this.eyeSize = eyeSize; + } + + /** * Return the minimum central pressure */ - public Integer getCentralPressure() { - return centralPressure; - } + public Integer getCentralPressure() { + return centralPressure; + } /** - * @param centralPressure the minimum central pressure to set + * @param centralPressure + * the minimum central pressure to set */ - public void setCentralPressure(Integer centralPressure) { - this.centralPressure = centralPressure; - } - - /** - * Return the position accuracy - */ - public Integer getPositionAccuracy() { - return positionAccuracy; - } + public void setCentralPressure(Integer centralPressure) { + this.centralPressure = centralPressure; + } /** - * @param positionAccuracy the position accuracy to set + * Return the position accuracy */ - public void setPositionAccuracy(Integer positionAccuracy) { - this.positionAccuracy = positionAccuracy; - } - - /** + public Integer getPositionAccuracy() { + return positionAccuracy; + } + + /** + * @param positionAccuracy + * the position accuracy to set + */ + public void setPositionAccuracy(Integer positionAccuracy) { + this.positionAccuracy = positionAccuracy; + } + + /** * Return the twelve-foot wave height radii at the NE quadrant */ - public String getNe12ft() { - return ne12ft; - } + public String getNe12ft() { + return ne12ft; + } /** - * @param ne12ft the twelve-foot wave height radii at the NE quadrant to set + * @param ne12ft + * the twelve-foot wave height radii at the NE quadrant to set */ - public void setNe12ft(String ne12ft) { - this.ne12ft = ne12ft; - } + public void setNe12ft(String ne12ft) { + this.ne12ft = ne12ft; + } - /** + /** * Return the twelve-foot wave height radii at the SE quadrant */ - public String getSe12ft() { - return se12ft; - } + public String getSe12ft() { + return se12ft; + } - /** - * @param se12ft the twelve-foot wave height radii at the SE quadrant to set + /** + * @param se12ft + * the twelve-foot wave height radii at the SE quadrant to set */ - public void setSe12ft(String se12ft) { - this.se12ft = se12ft; - } + public void setSe12ft(String se12ft) { + this.se12ft = se12ft; + } - /** + /** * Return the twelve-foot wave height radii at the SW quadrant */ - public String getSw12ft() { - return sw12ft; - } + public String getSw12ft() { + return sw12ft; + } - /** - * @param sw12ft The twelve-foot wave height radii at the SW quadrant to set + /** + * @param sw12ft + * The twelve-foot wave height radii at the SW quadrant to set */ - public void setSw12ft(String sw12ft) { - this.sw12ft = sw12ft; - } + public void setSw12ft(String sw12ft) { + this.sw12ft = sw12ft; + } - /** + /** * Return the twelve-foot wave height radii at the NW quadrant */ - public String getNw12ft() { - return nw12ft; - } + public String getNw12ft() { + return nw12ft; + } - /** - * @param nw12ft The twelve-foot wave height radii at the NW quadrant to set + /** + * @param nw12ft + * The twelve-foot wave height radii at the NW quadrant to set */ - public void setNw12ft(String nw12ft) { - this.nw12ft = nw12ft; - } + public void setNw12ft(String nw12ft) { + this.nw12ft = nw12ft; + } /** * @return the issueTime */ public Calendar getIssueTime() { - return issueTime; + return issueTime; } /** - * @param obsTime The obsTime to set + * @param obsTime + * The obsTime to set */ public void setObsTime(Calendar obsTime) { - this.obsTime = obsTime; + this.obsTime = obsTime; } - + /** * @return the obsTime */ public Calendar getObsTime() { - return obsTime; + return obsTime; } /** - * @param issueTime the issueTime to set + * @param issueTime + * the issueTime to set */ public void setIssueTime(Calendar issueTime) { - this.issueTime = issueTime; + this.issueTime = issueTime; } - + /** * @return the bullMessage */ public String getBullMessage() { - return bullMessage; - } - + return bullMessage; + } + /** - * @param bullMessage the bullMessage to set + * @param bullMessage + * the bullMessage to set */ public void setBullMessage(String bullMessage) { - this.bullMessage = bullMessage; + this.bullMessage = bullMessage; } - + /** * @return the MndTime */ public String getMndTime() { - return mndTime; + return mndTime; } /** - * @param mndTime the mndTime to set + * @param mndTime + * the mndTime to set */ public void setMndTime(String mndTime) { - this.mndTime = mndTime; + this.mndTime = mndTime; } - + /** * @return the set of position and winds */ public Set getTcmPosWinds() { - return tcmPosWinds; + return tcmPosWinds; } /** - * @param tcmPW the set of position and winds to set + * @param tcmPW + * the set of position and winds to set */ - public void setTcmPosWinds(Set tcmPosWinds ) { - this.tcmPosWinds = tcmPosWinds; + public void setTcmPosWinds(Set tcmPosWinds) { + this.tcmPosWinds = tcmPosWinds; } /** * Add TcmPosWinds to set */ - public void addPosWinds(TcmPositionWinds poswinds){ - tcmPosWinds.add(poswinds); - - } + public void addPosWinds(TcmPositionWinds poswinds) { + tcmPosWinds.add(poswinds); - /** - * Override existing set method to modify any - * classes that use the dataURI as a foreign key - */ - @Override - public void setIdentifier(Object dataURI) { - this.identifier = dataURI; - } - @Override + /** + * Override existing set method to modify any classes that use the dataURI + * as a foreign key + */ + @Override + public void setIdentifier(Object dataURI) { + this.identifier = dataURI; + + } + + @Override public IDecoderGettable getDecoderGettable() { - // TODO Auto-generated method stub - return null; - } + // TODO Auto-generated method stub + return null; + } @Override @Column @@ -502,4 +516,9 @@ public class TcmRecord extends PluginDataObject { public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "tcm"; + } } diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/src/gov/noaa/nws/ncep/common/dataplugin/wcp/WcpRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/src/gov/noaa/nws/ncep/common/dataplugin/wcp/WcpRecord.java index 757c3288ee..a04b47479f 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/src/gov/noaa/nws/ncep/common/dataplugin/wcp/WcpRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/src/gov/noaa/nws/ncep/common/dataplugin/wcp/WcpRecord.java @@ -1,4 +1,3 @@ - /** * WcpRecord is the Data Access component for WCP Watch Corner Point data. * This contains getters and setters for the main parent table wcp. @@ -10,16 +9,19 @@ * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * 12Dec2008 37 F. J. Yen Initial Coding. - * 17Apr2009 37 F. J. Yen Refactored for TO10 - * 24Aug2009 37 F. J. Yen Refactored for TO11 - * 17May2010 37 F. J. Yen Refactored to dataplugin for migration to to11dr11 - * 09/2011 Chin Chen changed to improve purge performance and - * removed xml serialization as well - * * Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * 12Dec2008 37 F. J. Yen Initial Coding. + * 17Apr2009 37 F. J. Yen Refactored for TO10 + * 24Aug2009 37 F. J. Yen Refactored for TO11 + * 17May2010 37 F. J. Yen Refactored to dataplugin for migration to + * to11dr11 + * 09/2011 Chin Chen changed to improve purge performance and + * removed xml serialization as well + * 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 * * * @@ -52,6 +54,7 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; + @Entity @SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "wcpseq") @Table(name = "wcp", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @@ -59,46 +62,40 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * Both refTime and forecastTime are included in the refTimeIndex since * forecastTime is unlikely to be used. */ -@org.hibernate.annotations.Table( - appliesTo = "wcp", - indexes = { - @Index(name = "wcp_refTimeIndex", columnNames = { "refTime", "forecastTime" } ) - } -) - +@org.hibernate.annotations.Table(appliesTo = "wcp", indexes = { @Index(name = "wcp_refTimeIndex", columnNames = { + "refTime", "forecastTime" }) }) @DynamicSerialize +public class WcpRecord extends PluginDataObject { -public class WcpRecord extends PluginDataObject{ - - private static final long serialVersionUID = 1L; - - /** Report type */ - @Column(length=32) - @DynamicSerializeElement - @DataURI(position = 2) - private String reportType; - - @Column + private static final long serialVersionUID = 1L; + + /** Report type */ + @Column(length = 32) @DynamicSerializeElement - private Calendar issueTime; + @DataURI(position = 2) + private String reportType; - @DataURI(position = 1) - @Column(length = 8) - @DynamicSerializeElement - private String designatorBBB; - - @Column(length = 2500) - @DynamicSerializeElement - private String bullMessage; + @Column + @DynamicSerializeElement + private Calendar issueTime; - /** WcpSevrln */ - @DynamicSerializeElement - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parentID", nullable = false) + @DataURI(position = 1) + @Column(length = 8) + @DynamicSerializeElement + private String designatorBBB; + + @Column(length = 2500) + @DynamicSerializeElement + private String bullMessage; + + /** WcpSevrln */ + @DynamicSerializeElement + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JoinColumn(name = "parentID", nullable = false) @Index(name = "wcpSevrLn_parentid_idex") - private Set wcpSevrLn = new HashSet(); + private Set wcpSevrLn = new HashSet(); - /** + /** * Default Constructor */ public WcpRecord() { @@ -113,73 +110,83 @@ public class WcpRecord extends PluginDataObject{ public WcpRecord(String uri) { super(uri); } - + @Override public IDecoderGettable getDecoderGettable() { // TODO Auto-generated method stub return null; } - + public String getReportType() { - return reportType; + return reportType; } + public void setReportType(String reportType) { - this.reportType = reportType; + this.reportType = reportType; } - - public Calendar getIssueTime(){ - return issueTime; - } - public void setIssueTime(Calendar issueTime){ - this.issueTime=issueTime; - } - - public String getDesignatorBBB(){ - return designatorBBB; - } - public void setDesignatorBBB(String designatorBBB){ - this.designatorBBB=designatorBBB; - } - - public String getBullMessage(){ - return bullMessage; - } - public void setBullMessage(String bullMessage){ - this.bullMessage=bullMessage; - } - /** - * return the set of wcpSevrLn - */ - public Set getWcpSevrLn() { - return wcpSevrLn; - } - - /** - * @param wcpSevrln the wcpSevrln to set - */ - public void setWcpSevrLn(Set wcpSevrlin) { - this.wcpSevrLn = wcpSevrlin; - } - - /* - * Add wcpSevrln to set - */ - public void addWcpSevrLn(WcpSevrln psevrln) { - wcpSevrLn.add(psevrln); - - } - - public void setIdentifier(Object dataURI){ - this.identifier = dataURI; - - + public Calendar getIssueTime() { + return issueTime; } - + + public void setIssueTime(Calendar issueTime) { + this.issueTime = issueTime; + } + + public String getDesignatorBBB() { + return designatorBBB; + } + + public void setDesignatorBBB(String designatorBBB) { + this.designatorBBB = designatorBBB; + } + + public String getBullMessage() { + return bullMessage; + } + + public void setBullMessage(String bullMessage) { + this.bullMessage = bullMessage; + } + + /** + * return the set of wcpSevrLn + */ + public Set getWcpSevrLn() { + return wcpSevrLn; + } + + /** + * @param wcpSevrln + * the wcpSevrln to set + */ + public void setWcpSevrLn(Set wcpSevrlin) { + this.wcpSevrLn = wcpSevrlin; + } + + /* + * Add wcpSevrln to set + */ + public void addWcpSevrLn(WcpSevrln psevrln) { + wcpSevrLn.add(psevrln); + + } + + @Override + public void setIdentifier(Object dataURI) { + this.identifier = dataURI; + + } + @Override @Column @Access(AccessType.PROPERTY) public String getDataURI() { return super.getDataURI(); } + + @Override + public String getPluginName() { + return "wcp"; + } } diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/src/gov/noaa/nws/ncep/edex/plugin/airmet/decoder/AirmetDecoder.java b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/src/gov/noaa/nws/ncep/edex/plugin/airmet/decoder/AirmetDecoder.java index 7aad148a39..bff3c951cc 100755 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/src/gov/noaa/nws/ncep/edex/plugin/airmet/decoder/AirmetDecoder.java +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/src/gov/noaa/nws/ncep/edex/plugin/airmet/decoder/AirmetDecoder.java @@ -109,7 +109,6 @@ public class AirmetDecoder extends AbstractDecoder { */ if (record != null) { record.setTraceId(traceId); - record.setPluginName(pluginName); record.setReportType(pluginName); record.setReportName(reportName); // Decode and set the update number diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/src/gov/noaa/nws/ncep/edex/plugin/atcf/decoder/AtcfDecoder.java b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/src/gov/noaa/nws/ncep/edex/plugin/atcf/decoder/AtcfDecoder.java index 0d5f84bfa1..6072c95d34 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/src/gov/noaa/nws/ncep/edex/plugin/atcf/decoder/AtcfDecoder.java +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/src/gov/noaa/nws/ncep/edex/plugin/atcf/decoder/AtcfDecoder.java @@ -1,15 +1,3 @@ -/** - * - * AtcfDecoder - * - * Decoder Plug-In for Automated Tropical Cyclone Forecast ATCF. - * - * 12 December 2008 - * - * This code has been developed by the SIB for use in the AWIPS2 system. - * - */ - package gov.noaa.nws.ncep.edex.plugin.atcf.decoder; import gov.noaa.nws.ncep.common.dataplugin.atcf.AtcfRecord; @@ -31,13 +19,15 @@ import com.raytheon.uf.common.dataplugin.PluginException; * * Decoder implementation for ATCF Plug-In * + * This code has been developed by the SIB for use in the AWIPS2 system. + * *
  * SOFTWARE HISTORY
  * 
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * 06/23/10		208			F. J. Yen	Initial creation
- * 
+ * Date         Ticket#    Engineer     Description
+ * ------------ -------- ----------- --------------------------
+ * Jun 23, 2010 208      F. J. Yen   Initial creation
+ * Aug 30, 2013 2298     rjpeter     Make getPluginName abstract
  * 
* * @author Fee Jing Yen, SIB @@ -114,7 +104,6 @@ public class AtcfDecoder extends AbstractDecoder { if (record != null) { try { record.setTraceId(traceId); - record.setPluginName(pluginName); record.constructDataURI(); } catch (PluginException e) { throw new DecoderException( diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml index 43e4b06517..a5d33aaca6 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml @@ -5,9 +5,7 @@ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - - +