From 0c657c2a49038abc142ee9ba6ba5b8ce42e347f2 Mon Sep 17 00:00:00 2001 From: Mark Peters Date: Fri, 26 Sep 2014 14:50:03 -0500 Subject: [PATCH] Omaha #3629 Move datatype specific code from edex.decodertools to the specific datatype edex plugins Change-Id: I6b66103ef55107df78fdbb047dfb8c743deaf2d4 Former-commit-id: e196f02cf7533498280b252e9c345f9b3c4a3629 --- .../binlightning/BinLightningDecoder.java | 2 +- .../impl/BaseLightningDecoder.java | 1 - .../impl/BinLightningFactory.java | 1 - .../impl/FlashLightningDecoder.java | 1 - .../binlightning/impl}/IBinDataSource.java | 3 +- .../impl/LightningDataSource.java | 1 - .../binlightning/impl/RTLightningDecoder.java | 1 - .../profiler/decoder/ProfilerDataAdapter.java | 5 +- .../edex/plugin/recco/RECCODecoder.java | 12 ++- .../edex/plugin/sfcobs/SfcObsSeparator.java | 16 ++-- .../edex/plugin/sfcobs/common/SfcObsPart.java | 16 ++-- .../sfcobs/decoder/AbstractSfcObsDecoder.java | 2 - .../edex/plugin/sfcobs/decoder}/DataItem.java | 3 +- .../decoder}/DefaultParserStrategy.java | 5 +- .../sfcobs/decoder}/IParserStrategy.java | 3 +- .../plugin/sfcobs/decoder/ISfcObsDecoder.java | 11 +++ .../plugin/sfcobs/decoder}/ReportParser.java | 6 +- .../sfcobs/decoder/SfcObsDecoderFactory.java | 5 +- .../sfcobs/decoder/buoy/DRIBUSec1Decoder.java | 39 ++++----- .../sfcobs/decoder/buoy/DRIBUSec2Decoder.java | 47 +++++------ .../sfcobs/decoder/buoy/DRIBUSec3Decoder.java | 2 +- .../sfcobs/decoder/buoy/DRIBUSec4Decoder.java | 2 +- .../sfcobs/decoder/buoy/DRIBUSec5Decoder.java | 2 +- .../decoder/buoy/DRIBUSynopticDecoder.java | 3 +- .../synoptic/AbstractSectionDecoder.java | 2 +- .../decoder/synoptic/CMANSynopticDecoder.java | 3 +- .../synoptic/MAROBSynopticDecoder.java | 3 +- .../decoder/synoptic/SHIPSynopticDecoder.java | 5 +- .../decoder/synoptic/SynopticGroups.java | 25 +++--- .../decoder/synoptic/SynopticSec1Decoder.java | 84 ++++++++++--------- .../decoder/synoptic/SynopticSec2Decoder.java | 63 +++++++------- .../decoder/synoptic/SynopticSec3Decoder.java | 33 ++++---- .../decoder/synoptic/SynopticSec4Decoder.java | 2 +- .../decoder/synoptic/SynopticSec5Decoder.java | 2 +- .../synoptic/regional/Sec5Block72Decoder.java | 23 +++-- .../regional/Sec5MaritimeDecoder.java | 2 +- ...f.common.serialization.ISerializableObject | 2 +- ...f.common.serialization.ISerializableObject | 4 - .../decodertools/core/IDecoderConstants.java | 31 +------ 39 files changed, 225 insertions(+), 248 deletions(-) rename edexOsgi/{com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core => com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl}/IBinDataSource.java (94%) rename edexOsgi/{com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core => com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder}/DataItem.java (97%) rename edexOsgi/{com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core => com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder}/DefaultParserStrategy.java (90%) rename edexOsgi/{com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core => com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder}/IParserStrategy.java (93%) rename edexOsgi/{com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core => com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder}/ReportParser.java (95%) delete mode 100644 edexOsgi/com.raytheon.uf.edex.decodertools/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject 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 c3ad87c4c2..8c0a552f34 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 @@ -46,6 +46,7 @@ import com.raytheon.edex.exception.DecoderException; import com.raytheon.edex.plugin.AbstractDecoder; import com.raytheon.edex.plugin.binlightning.filter.LightningGeoFilter; import com.raytheon.edex.plugin.binlightning.impl.BinLightningFactory; +import com.raytheon.edex.plugin.binlightning.impl.IBinDataSource; import com.raytheon.edex.plugin.binlightning.impl.IBinLightningDecoder; import com.raytheon.edex.plugin.binlightning.impl.LightningDataSource; import com.raytheon.uf.common.dataplugin.PluginDataObject; @@ -60,7 +61,6 @@ import com.raytheon.uf.common.time.util.TimeUtil; import com.raytheon.uf.common.wmo.WMOHeader; import com.raytheon.uf.common.wmo.WMOTimeParser; import com.raytheon.uf.edex.decodertools.core.DecoderTools; -import com.raytheon.uf.edex.decodertools.core.IBinDataSource; /** * AWIPS decoder adapter strategy for binary lightning data.
diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BaseLightningDecoder.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BaseLightningDecoder.java index 27a6ee8a68..592bb990ff 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BaseLightningDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BaseLightningDecoder.java @@ -26,7 +26,6 @@ import java.util.List; import com.raytheon.uf.common.dataplugin.binlightning.impl.LightningStrikePoint; import com.raytheon.uf.common.time.util.TimeUtil; -import com.raytheon.uf.edex.decodertools.core.IBinDataSource; /** * Provide the base class for the binary lightning decoders. This class diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BinLightningFactory.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BinLightningFactory.java index 3d88ff75f1..e3f4e6046b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BinLightningFactory.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/BinLightningFactory.java @@ -19,7 +19,6 @@ **/ package com.raytheon.edex.plugin.binlightning.impl; -import com.raytheon.uf.edex.decodertools.core.IBinDataSource; import static com.raytheon.edex.plugin.binlightning.impl.IBinLightningDecoder.*; diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/FlashLightningDecoder.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/FlashLightningDecoder.java index 024e271110..10e407327c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/FlashLightningDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/FlashLightningDecoder.java @@ -24,7 +24,6 @@ import java.util.Calendar; import com.raytheon.uf.common.dataplugin.binlightning.impl.LightningStrikePoint; import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgMsgType; import com.raytheon.uf.common.time.util.TimeUtil; -import com.raytheon.uf.edex.decodertools.core.IBinDataSource; /** * Decode one or more Flash lightning observations. Decode algorithm is taken diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IBinDataSource.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/IBinDataSource.java similarity index 94% rename from edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IBinDataSource.java rename to edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/IBinDataSource.java index cc2cd702f6..6b5672aa95 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IBinDataSource.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/IBinDataSource.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.decodertools.core; +package com.raytheon.edex.plugin.binlightning.impl; /** * Implementations of this interface are adapters between some data source and @@ -33,6 +33,7 @@ package com.raytheon.uf.edex.decodertools.core; * ------------ ---------- ----------- -------------------------- * 27 July 2007 411 jkorman Initial Development * 20070912 379 jkorman Code review cleanup. + * 26 Sep 2014 3629 mapeters Moved from uf.edex.decodertools.core. * * * diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/LightningDataSource.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/LightningDataSource.java index 8c68497755..1daeea465e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/LightningDataSource.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/LightningDataSource.java @@ -21,7 +21,6 @@ package com.raytheon.edex.plugin.binlightning.impl; import java.io.ByteArrayInputStream; -import com.raytheon.uf.edex.decodertools.core.IBinDataSource; /** * Wraps a ByteArrayInputStream with access methods specific to binary diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/RTLightningDecoder.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/RTLightningDecoder.java index 386d0377b9..662e480cfa 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/RTLightningDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/impl/RTLightningDecoder.java @@ -23,7 +23,6 @@ import java.util.Calendar; import com.raytheon.uf.common.dataplugin.binlightning.impl.LightningStrikePoint; import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgMsgType; -import com.raytheon.uf.edex.decodertools.core.IBinDataSource; /** * Decode one or more Real Time Flash lightning observations. Decode algorithm diff --git a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java index 76b1fdf525..16fa748d41 100644 --- a/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java +++ b/edexOsgi/com.raytheon.edex.plugin.profiler/src/com/raytheon/edex/plugin/profiler/decoder/ProfilerDataAdapter.java @@ -63,6 +63,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; * added breaks/default to switch * Jul 23, 2014 3410 bclement location changed to floats * Sep 16, 2014 3628 mapeters Replaced static imports. + * Sep 26, 2014 3629 mapeters Added PROFILER_DATA constant. * * * @@ -74,6 +75,8 @@ public class ProfilerDataAdapter { private static final IUFStatusHandler logger = UFStatus .getHandler(ProfilerDataAdapter.class); + private static final int PROFILER_DATA = 3000; + private static final String PROFILER_SITES = "profilerSites.xml"; private static Profilers profilers = populateProfilerData(); @@ -191,7 +194,7 @@ public class ProfilerDataAdapter { if (dataList != null) { obsData = new ProfilerObs(); - obsData.setReportType(IDecoderConstants.PROFILER_DATA); + obsData.setReportType(PROFILER_DATA); SurfaceObsLocation location = new SurfaceObsLocation(); lat = getDouble(dataList.get(2), IDecoderConstants.VAL_MISSING); 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 4fe36f714a..f3d76efacf 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 @@ -30,7 +30,6 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.pointdata.spatial.AircraftObsLocation; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.wmo.WMOHeader; -import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; import com.raytheon.uf.edex.decodertools.core.IDecoderInput; import com.raytheon.uf.edex.decodertools.time.TimeTools; @@ -58,6 +57,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * May 14, 2014 2536 bclement moved WMO Header to common, removed PLUGIN_NAME * Jul 23, 2014 3410 bclement location changed to floats + * Sep 26, 2014 3629 mapeters Added RECCO_MANOBS, RECCO_INTEROBS constants. * * * @author jkorman @@ -65,6 +65,10 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; */ public class RECCODecoder extends AbstractDecoder { + private static final int RECCO_MANOBS = 4500; + + private static final int RECCO_INTEROBS = 4510; + private boolean removeNILs = true; /** @@ -154,11 +158,11 @@ public class RECCODecoder extends AbstractDecoder { record.setReportData(parser.getReportData()); if ("222".equals(parser.getObsType())) { - record.setReportType(IDecoderConstants.RECCO_MANOBS); + record.setReportType(RECCO_MANOBS); } else if ("555".equals(parser.getObsType())) { - record.setReportType(IDecoderConstants.RECCO_INTEROBS); + record.setReportType(RECCO_INTEROBS); } else if ("777".equals(parser.getObsType())) { - record.setReportType(IDecoderConstants.RECCO_MANOBS); + record.setReportType(RECCO_MANOBS); } location.setLatitude(parser.getLatitude()); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsSeparator.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsSeparator.java index 206b46193c..f0eb9cecad 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsSeparator.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/SfcObsSeparator.java @@ -19,10 +19,6 @@ **/ package com.raytheon.edex.plugin.sfcobs; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.ETX; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.SOM; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.WMO_HEADER; - import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; @@ -38,6 +34,7 @@ import com.raytheon.edex.plugin.sfcobs.common.SfcObsPart; import com.raytheon.edex.plugin.sfcobs.common.SfcObsSubMessage; import com.raytheon.uf.common.wmo.WMOHeader; import com.raytheon.uf.edex.decodertools.core.DecoderTools; +import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; /** * The SfcObsSeparator takes a potential weather message and attempts to @@ -58,6 +55,7 @@ import com.raytheon.uf.edex.decodertools.core.DecoderTools; * ------------ ---------- ----------- -------------------------- * 20070925 391 jkorman Initial Coding. * May 14, 2014 2536 bclement moved WMO Header to common + * Sep 26, 2014 3629 mapeters Added SOM constant, replaced static imports. * * * @author jkorman @@ -67,7 +65,11 @@ public class SfcObsSeparator extends AbstractRecordSeparator { /** The logger */ private Log logger = LogFactory.getLog(getClass()); - private static final String SPLITCHARS = " \r=;$" + SOM + ETX; + private static final String SOM = String + .valueOf((char) IDecoderConstants.ASCII_SOM); + + private static final String SPLITCHARS = " \r=;$" + SOM + + IDecoderConstants.ETX; // private static final String GGYYiW_GRP = // "((0[1-9])|([1-2]\\d)|3[0-1])(([0-1]\\d)|2[0-3])[1-4]"; @@ -140,7 +142,7 @@ public class SfcObsSeparator extends AbstractRecordSeparator { wmoHeader = new WMOHeader(rawMessage, fileName); if (wmoHeader.isValid()) { messageData = DecoderTools.stripWMOHeader(rawMessage, - WMO_HEADER); + IDecoderConstants.WMO_HEADER); } } cleanGarbage(); @@ -204,7 +206,7 @@ public class SfcObsSeparator extends AbstractRecordSeparator { parts.add(SfcObsPart.RE_PART); } else if (SOM.equals(s)) { parts.add(SfcObsPart.MS_PART); - } else if (ETX.equals(s)) { + } else if (IDecoderConstants.ETX.equals(s)) { parts.add(SfcObsPart.ME_PART); } else { SfcObsPart reportPart = SfcObsPart.partFactory(s); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/common/SfcObsPart.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/common/SfcObsPart.java index 61b885a8b4..762e1bcba2 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/common/SfcObsPart.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/common/SfcObsPart.java @@ -19,11 +19,6 @@ **/ package com.raytheon.edex.plugin.sfcobs.common; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.CARRIAGECONTROL; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.MESSAGE_END; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.MESSAGE_START; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.REPORT_END; - import java.util.HashMap; import java.util.Map; @@ -40,6 +35,7 @@ import java.util.Map; * ------------- -------- ----------- -------------------------- * Sep 25, 2007 391 jkorman Initial Coding. * Oct 29, 2013 2489 bsteffen Add NAVTEX_END_PART + * Sep 26, 2014 3629 mapeters Removed static imports. * * * @@ -47,13 +43,15 @@ import java.util.Map; * @version 1.0 */ public class SfcObsPart { - public static final SfcObsPart CR_PART = new SfcObsPart(CARRIAGECONTROL,false); - public static final SfcObsPart RE_PART = new SfcObsPart(REPORT_END, false); + public static final SfcObsPart CR_PART = new SfcObsPart("CARRIAGECONTROL", + false); - public static final SfcObsPart MS_PART = new SfcObsPart(MESSAGE_START,false); + public static final SfcObsPart RE_PART = new SfcObsPart("RPT_END", false); - public static final SfcObsPart ME_PART = new SfcObsPart(MESSAGE_END,false); + public static final SfcObsPart MS_PART = new SfcObsPart("MSG_START", false); + + public static final SfcObsPart ME_PART = new SfcObsPart("MSG_END", false); public static final SfcObsPart AAXX_PART = new SfcObsPart("AAXX",false); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/AbstractSfcObsDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/AbstractSfcObsDecoder.java index b8c6e669d9..41314db9a9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/AbstractSfcObsDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/AbstractSfcObsDecoder.java @@ -24,8 +24,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import com.raytheon.uf.common.wmo.WMOHeader; -import com.raytheon.uf.edex.decodertools.core.DefaultParserStrategy; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * AbstractSfcObsDecoder is the base class for all surface observation decoders. diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/DataItem.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/DataItem.java similarity index 97% rename from edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/DataItem.java rename to edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/DataItem.java index 6a5ddd3559..755c2b048c 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/DataItem.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/DataItem.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.decodertools.core; +package com.raytheon.edex.plugin.sfcobs.decoder; /** * The DataItem class is used to hold intermediate information especially when @@ -32,6 +32,7 @@ package com.raytheon.uf.edex.decodertools.core; * ------------ ---------- ----------- -------------------------- * 20070925 391 jkorman Initial Coding. * Sep 18, 2014 3627 mapeters Removed unused methods/fields. + * Sep 26, 2014 3629 mapeters Moved from uf.edex.decodertools.core. * * * @author jkorman diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/DefaultParserStrategy.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/DefaultParserStrategy.java similarity index 90% rename from edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/DefaultParserStrategy.java rename to edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/DefaultParserStrategy.java index 6c77e959e9..dfce0b3db0 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/DefaultParserStrategy.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/DefaultParserStrategy.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.decodertools.core; +package com.raytheon.edex.plugin.sfcobs.decoder; import java.util.ArrayList; import java.util.List; @@ -34,6 +34,7 @@ import java.util.StringTokenizer; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 20071019 391 jkorman Initial coding. + * Sep 26, 2014 3629 mapeters Moved from uf.edex.decodertools.core. * * * @author jkorman @@ -48,7 +49,7 @@ public class DefaultParserStrategy implements IParserStrategy { * @param dataToParse * The input string to parse. * @return A list of the parsed elements. - * @see com.raytheon.uf.edex.decodertools.core.IParserStrategy#parse(java.lang.String) + * @see com.raytheon.edex.plugin.sfcobs.decoder.IParserStrategy#parse(java.lang.String) */ @Override public List parse(String dataToParse) { diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IParserStrategy.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/IParserStrategy.java similarity index 93% rename from edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IParserStrategy.java rename to edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/IParserStrategy.java index e9ec041324..d5430fa98b 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IParserStrategy.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/IParserStrategy.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.decodertools.core; +package com.raytheon.edex.plugin.sfcobs.decoder; import java.util.List; @@ -35,6 +35,7 @@ import java.util.List; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 20071019 391 jkorman Initial coding. + * Sep 26, 2014 3629 mapeters Moved from uf.edex.decodertools.core. * * * diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/ISfcObsDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/ISfcObsDecoder.java index 67b90db3db..9bfcc70743 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/ISfcObsDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/ISfcObsDecoder.java @@ -40,6 +40,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 20070928 391 jkorman Initial Coding. + * Sep 26, 2014 3629 mapeters Added SYNOPTIC_*, DRIFTING_BUOY constants. * * * @author jkorman @@ -51,6 +52,16 @@ public interface ISfcObsDecoder { public static final Integer VAL_MISSING = IDecoderConstants.VAL_MISSING; + public static final int SYNOPTIC_SHIP = 1003; + + public static final int SYNOPTIC_CMAN = 1004; + + public static final int SYNOPTIC_MOORED_BUOY = 1005; + + public static final int DRIFTING_BUOY = 1006; + + public static final int SYNOPTIC_MAROB = 1007; + /** * Get the text report data. * diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/ReportParser.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/ReportParser.java similarity index 95% rename from edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/ReportParser.java rename to edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/ReportParser.java index 8ceca8b7f3..2c30a9b9b7 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/ReportParser.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/ReportParser.java @@ -17,12 +17,13 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.edex.decodertools.core; +package com.raytheon.edex.plugin.sfcobs.decoder; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; + /** * A simple parser element factored from decoder report parsing. This class * wraps a list of elements parsed from a report. @@ -36,6 +37,7 @@ import java.util.regex.Pattern; * 20071130 410 jkorman Changed bad copyright symbol. * 20071203 410 jkorman JavaDoc complaints. * Sep 18, 2014 3627 mapeters Removed unused methods. + * Sep 26, 2014 3629 mapeters Moved from uf.edex.decodertools.core. * * * @author jkorman @@ -60,7 +62,7 @@ public class ReportParser { * A parser strategy to be used when splitting the reportData. If * a null reference is passed, the an instance of * DefaultParserStrategy is used. - * @see com.raytheon.uf.edex.decodertools.core.DefaultParserStrategy#parse(java.lang.String) + * @see com.raytheon.edex.plugin.sfcobs.decoder.DefaultParserStrategy#parse(java.lang.String) */ public ReportParser(String reportData, IParserStrategy parser) { diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/SfcObsDecoderFactory.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/SfcObsDecoderFactory.java index 04afab80d4..509cb19e94 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/SfcObsDecoderFactory.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/SfcObsDecoderFactory.java @@ -19,8 +19,6 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.SPACE_CHAR; - import java.util.HashMap; import java.util.Map; @@ -48,6 +46,7 @@ import com.raytheon.uf.common.wmo.WMOHeader; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 20070925 391 jkorman Initial Coding. + * Sep 26, 2014 3629 mapeters Added SPACE_CHAR constant. * * * @author jkorman @@ -57,6 +56,8 @@ public class SfcObsDecoderFactory { /** The logger */ private static Log logger = LogFactory.getLog(SfcObsDecoderFactory.class); + private static final char SPACE_CHAR = ' '; + private static final Map> DECODER_MAP = new HashMap>(); static { DECODER_MAP.put("AAXX", LandSynopticDecoder.class); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec1Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec1Decoder.java index b3ad7669f6..20eca51ceb 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec1Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec1Decoder.java @@ -19,24 +19,19 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.buoy; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.getInt; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.matchElement; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_3_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_ERROR; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_MISSING; - import java.util.regex.Pattern; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.DataItem; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSectionDecoder; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.SynopticGroups; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; import com.raytheon.uf.common.time.util.TimeUtil; -import com.raytheon.uf.edex.decodertools.core.DataItem; -import com.raytheon.uf.edex.decodertools.core.ReportParser; +import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; import com.raytheon.uf.edex.decodertools.time.TimeTools; /** @@ -51,6 +46,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * ------------ ---------- ----------- -------------------------- * 20071010 391 jkorman Initial coding. * Sep 18, 2014 3627 mapeters Updated deprecated {@link TimeTools} usage. + * Sep 26, 2014 3629 mapeters Replaced static imports. * * * @@ -114,23 +110,27 @@ public class DRIBUSec1Decoder extends AbstractSectionDecoder { break; } - if (matchElement(element, DRIBUSec2Decoder.SEC_2_PATTERN)) { + if (AbstractSfcObsDecoder.matchElement(element, + DRIBUSec2Decoder.SEC_2_PATTERN)) { break; - } else if (matchElement(element, SEC_3_LEAD)) { + } else if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_3_LEAD)) { break; - } else if (matchElement(element, SEC_4_LEAD)) { + } else if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_4_LEAD)) { break; - } else if (matchElement(element, SEC_5_LEAD)) { + } else if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_5_LEAD)) { break; } String s = element.substring(0, 1); if ("0".equals(s) && doGroup(0)) { - Integer temp = getInt(element, 1, 3); + Integer temp = AbstractSfcObsDecoder.getInt(element, 1, 3); if ((temp != null) && (temp >= 0)) { windDirection = temp * 10; } - temp = getInt(element, 3, 5); + temp = AbstractSfcObsDecoder.getInt(element, 3, 5); if ((temp != null) && (temp >= 0)) { windSpeed = temp.doubleValue(); } @@ -153,7 +153,7 @@ public class DRIBUSec1Decoder extends AbstractSectionDecoder { element, 1); closeGroup(4); } else if ("5".equals(s) && doGroup(5)) { - Integer val = getInt(element, 1, 2); + Integer val = AbstractSfcObsDecoder.getInt(element, 1, 2); changeCharacter = new DataItem("changeCharacter"); changeCharacter.setDataValue(val.doubleValue()); changeCharacter @@ -189,10 +189,11 @@ public class DRIBUSec1Decoder extends AbstractSectionDecoder { * @return The populated receiver object. */ public ObsCommon getDecodedData(ObsCommon receiver) { - final Double[] ignore = { VAL_ERROR.doubleValue(), - VAL_MISSING.doubleValue() }; if (receiver != null) { + final Double[] ignore = { + IDecoderConstants.VAL_ERROR.doubleValue(), + IDecoderConstants.VAL_MISSING.doubleValue() }; int iSubW = decoderParent.getISubw(); double conversion = 1.0; diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec2Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec2Decoder.java index c9459313a5..211819b1a6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec2Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec2Decoder.java @@ -19,23 +19,18 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.buoy; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.getInt; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.matchElement; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_3_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_ERROR; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_MISSING; - import java.util.regex.Pattern; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.DataItem; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSectionDecoder; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.SynopticGroups; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.DataItem; -import com.raytheon.uf.edex.decodertools.core.ReportParser; +import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; /** * Decode synoptic section 2 data. This section has a single group which @@ -53,6 +48,7 @@ import com.raytheon.uf.edex.decodertools.core.ReportParser; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 20071010 391 jkorman Initial coding. + * Sep 26, 2014 3629 mapeters Removed unused fields, replaced static imports. * * * @@ -65,12 +61,6 @@ public class DRIBUSec2Decoder extends AbstractSectionDecoder { private DataItem seaTemp = null; - // high resolution wave period (second) - private Integer windWavePeriod_lo = null; - - // low resolution wave period (1 meter) - private Integer windWaveHeight_lo = null; - // high resolution wave period (1/10th second) private Integer windWavePeriod_hi = null; @@ -113,21 +103,22 @@ public class DRIBUSec2Decoder extends AbstractSectionDecoder { break; } - if (matchElement(element, SEC_3_LEAD)) { + if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_3_LEAD)) { break; - } else if (matchElement(element, SEC_4_LEAD)) { + } else if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_4_LEAD)) { break; - } else if (matchElement(element, SEC_5_LEAD)) { + } else if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_5_LEAD)) { break; } if ("0".equals(element.substring(0, 1))) { seaTemp = SynopticGroups.decodeTemperature(element, 2); - } else if ("1".equals(element.substring(0, 1))) { - windWavePeriod_lo = getInt(element, 1, 3); - windWaveHeight_lo = getInt(element, 3, 5); } else if ("20".equals(element.substring(0, 2))) { - windWavePeriod_hi = getInt(element, 1, 3); + windWavePeriod_hi = AbstractSfcObsDecoder.getInt(element, + 1, 3); if ((windWavePeriod_hi != null) && (windWavePeriod_hi >= 0)) { // TODO : For now the finest granularity in time is one // second, @@ -137,7 +128,8 @@ public class DRIBUSec2Decoder extends AbstractSectionDecoder { .round(windWavePeriod_hi / 10.0); } } else if ("21".equals(element.substring(0, 2))) { - windWaveHeight_hi = getInt(element, 3, 5); + windWaveHeight_hi = AbstractSfcObsDecoder.getInt(element, + 3, 5); } } // while } @@ -149,8 +141,6 @@ public class DRIBUSec2Decoder extends AbstractSectionDecoder { */ private void init() { seaTemp = null; - windWavePeriod_lo = null; - windWaveHeight_lo = null; windWavePeriod_hi = null; windWaveHeight_hi = null; } @@ -163,10 +153,11 @@ public class DRIBUSec2Decoder extends AbstractSectionDecoder { * @return The populated receiver object. */ public ObsCommon getDecodedData(ObsCommon receiver) { - final Double[] ignore = { VAL_ERROR.doubleValue(), - VAL_MISSING.doubleValue() }; if (receiver != null) { + final Double[] ignore = { + IDecoderConstants.VAL_ERROR.doubleValue(), + IDecoderConstants.VAL_MISSING.doubleValue() }; receiver.setSeaTemp(DataItem.getValue(seaTemp, ignore)); if ((windWavePeriod_hi != null) || (windWaveHeight_hi != null)) { diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec3Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec3Decoder.java index c919d7b7d6..56e66159ed 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec3Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec3Decoder.java @@ -25,10 +25,10 @@ import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_L import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSectionDecoder; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * Decode the Drifting buoy section 3 data. The current decoders skip Buoy diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec4Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec4Decoder.java index b31abd45e3..ed4b7b7530 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec4Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec4Decoder.java @@ -25,10 +25,10 @@ import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_L import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSectionDecoder; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * Decode synoptic section 4 data. This section has a single group which diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec5Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec5Decoder.java index 9c494a365c..8149abdb2c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec5Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSec5Decoder.java @@ -20,10 +20,10 @@ package com.raytheon.edex.plugin.sfcobs.decoder.buoy; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSectionDecoder; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * Decode buoy section 5 data. Section 5 data is specific to various regions in diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSynopticDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSynopticDecoder.java index 2d6ba00d88..8800b483dd 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSynopticDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/buoy/DRIBUSynopticDecoder.java @@ -24,7 +24,6 @@ import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; -import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; /** * Decode the FM-18 Buoy observation data. @@ -124,7 +123,7 @@ public class DRIBUSynopticDecoder extends AbstractSynopticDecoder { } report = (ObsCommon) super.consolidateReport(); if (report != null) { - report.setReportType(IDecoderConstants.DRIFTING_BUOY); + report.setReportType(DRIFTING_BUOY); SurfaceObsLocation loc = new SurfaceObsLocation( getReportIdentifier()); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSectionDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSectionDecoder.java index f381feb20e..9c74df2089 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSectionDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSectionDecoder.java @@ -20,8 +20,8 @@ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/CMANSynopticDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/CMANSynopticDecoder.java index fcc3e226e4..d15889eed4 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/CMANSynopticDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/CMANSynopticDecoder.java @@ -29,7 +29,6 @@ import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; import com.raytheon.uf.common.pointdata.spatial.ObStation; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.edex.database.DataAccessLayerException; -import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; import com.raytheon.uf.edex.pointdata.spatial.ObStationDao; /** @@ -167,7 +166,7 @@ public class CMANSynopticDecoder extends LandSynopticDecoder { if (report != null) { // If we didn't find this report in the catalog then don't store it. if ((stationInfo != null)) { - report.setReportType(IDecoderConstants.SYNOPTIC_CMAN); + report.setReportType(SYNOPTIC_CMAN); // Land synoptic needs to add the Fixed Land report SurfaceObsLocation loc = new SurfaceObsLocation( getReportIdentifier()); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/MAROBSynopticDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/MAROBSynopticDecoder.java index 8b64b44644..8609babf62 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/MAROBSynopticDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/MAROBSynopticDecoder.java @@ -25,7 +25,6 @@ import org.apache.commons.logging.LogFactory; import com.raytheon.edex.exception.DecoderException; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; /** * Decode the MAROB (Marine Observation) data. This format is very similar to @@ -129,7 +128,7 @@ public class MAROBSynopticDecoder extends SHIPSynopticDecoder { ObsCommon report = (ObsCommon) super.consolidateReport(); // Need to override the reportType. if (report != null) { - report.setReportType(IDecoderConstants.SYNOPTIC_MAROB); + report.setReportType(SYNOPTIC_MAROB); } return report; } diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SHIPSynopticDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SHIPSynopticDecoder.java index ee266e6e0e..44cebfbca5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SHIPSynopticDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SHIPSynopticDecoder.java @@ -30,7 +30,6 @@ import com.raytheon.uf.common.pointdata.spatial.ObStation; import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.edex.database.DataAccessLayerException; import com.raytheon.uf.edex.decodertools.core.DecoderTools; -import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; import com.raytheon.uf.edex.pointdata.spatial.ObStationDao; /** @@ -198,9 +197,9 @@ public class SHIPSynopticDecoder extends AbstractSynopticDecoder { if (report != null) { if (isFixedBuoy) { - report.setReportType(IDecoderConstants.SYNOPTIC_MOORED_BUOY); + report.setReportType(SYNOPTIC_MOORED_BUOY); } else { - report.setReportType(IDecoderConstants.SYNOPTIC_SHIP); + report.setReportType(SYNOPTIC_SHIP); } SurfaceObsLocation loc = new SurfaceObsLocation( diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticGroups.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticGroups.java index 2360c8c745..37e5c807a8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticGroups.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticGroups.java @@ -19,14 +19,12 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.getInt; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.matchElement; - import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; +import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.DataItem; import com.raytheon.uf.common.time.util.TimeUtil; -import com.raytheon.uf.edex.decodertools.core.DataItem; import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; /** @@ -55,6 +53,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; * 20070925 391 jkorman Initial Coding. * 20071109 391 jkorman Factored out time constants. * Sep 18, 2014 #3627 mapeters Convert units using {@link UnitConverter}. + * Sep 26, 2014 #3629 mapeters Replaced static imports. * * * @author jkorman @@ -89,7 +88,7 @@ public class SynopticGroups { int lookingForSect) { DataItem decodedItem = null; - if (matchElement(groupData, "2\\d{4}")) { + if (AbstractSfcObsDecoder.matchElement(groupData, "2\\d{4}")) { Integer val = Integer.parseInt(groupData.substring(2, 5)); if ((val != null) && (val >= 0)) { if (lookingForSect == 1) { @@ -126,7 +125,7 @@ public class SynopticGroups { if ("///".equals(s)) { return decodedItem; } - Integer val = getInt(groupData, 2, 5); + Integer val = AbstractSfcObsDecoder.getInt(groupData, 2, 5); if ((val != null) && (val >= 0)) { String dataItemName = null; int sign = 0; @@ -205,7 +204,7 @@ public class SynopticGroups { if ((groupData != null) && (groupData.length() == 5)) { if ((groupData.charAt(0) == '3') && (lookingForSect == 1)) { - Integer val = getInt(groupData, 1, 5); + Integer val = AbstractSfcObsDecoder.getInt(groupData, 1, 5); if ((val != null) && (val >= 0)) { decodedItem = new DataItem("stationPressure"); // RULE : If the value is between 0 and 100, assume the @@ -239,7 +238,7 @@ public class SynopticGroups { if ((groupData != null) && (groupData.length() == 5)) { if ((groupData.charAt(0) == '4') && (lookingForSect == 1)) { - Integer val = getInt(groupData, 1, 5); + Integer val = AbstractSfcObsDecoder.getInt(groupData, 1, 5); if ((val != null) && (val >= 0)) { decodedItem = new DataItem("seaLevelPressure"); // RULE : If the value is between 0 and 100, assume the @@ -273,7 +272,7 @@ public class SynopticGroups { if ((groupData != null) && (groupData.length() == 5)) { if ((groupData.charAt(0) == '5') && (lookingForSect == 1)) { - Integer val = getInt(groupData, 2, 5); + Integer val = AbstractSfcObsDecoder.getInt(groupData, 2, 5); if ((val != null) && (val >= 0)) { decodedItem = new DataItem("3HRChange"); decodedItem.setDataValue(hPaToPa.convert(val)); @@ -300,7 +299,7 @@ public class SynopticGroups { if ((groupData != null) && (groupData.length() == 5)) { if ((groupData.charAt(0) == '6')) { if ((lookingForSect == 1) || (lookingForSect == 3)) { - Integer val = getInt(groupData, 1, 4); + Integer val = AbstractSfcObsDecoder.getInt(groupData, 1, 4); if (val != null) { decodedItem = new DataItem("precip"); if ((val >= 0) && (val < 990)) { @@ -310,7 +309,7 @@ public class SynopticGroups { decodedItem.setDataValue(value); } - val = getInt(groupData, 4, 5); + val = AbstractSfcObsDecoder.getInt(groupData, 4, 5); if ((val != null) && (val >= 0)) { decodedItem.setDataPeriod(precipHours[val] * TimeUtil.SECONDS_PER_HOUR); @@ -319,7 +318,7 @@ public class SynopticGroups { } } else if ((groupData.charAt(0) == '7') && (lookingForSect == 3)) { - Integer val = getInt(groupData, 1, 5); + Integer val = AbstractSfcObsDecoder.getInt(groupData, 1, 5); if ((val != null) && (val >= 0)) { decodedItem = new DataItem("precip"); if (val > 9998) { @@ -329,7 +328,7 @@ public class SynopticGroups { decodedItem.setDataPeriod(TimeUtil.SECONDS_PER_DAY); } } else if ((groupData.charAt(0) == '2') && (lookingForSect == 5)) { - Integer val = getInt(groupData, 1, 5); + Integer val = AbstractSfcObsDecoder.getInt(groupData, 1, 5); if ((val != null) && (val >= 0)) { decodedItem = new DataItem("cityPrecip"); if (!IDecoderConstants.VAL_MISSING.equals(val)) { diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec1Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec1Decoder.java index 527df7e938..9e9acef975 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec1Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec1Decoder.java @@ -19,24 +19,16 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.checkRange; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.getInt; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.matchElement; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_2_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_3_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_ERROR; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_MISSING; - import java.util.Calendar; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.DataItem; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.uf.common.dataplugin.sfcobs.AncPrecip; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; import com.raytheon.uf.common.time.DataTime; -import com.raytheon.uf.edex.decodertools.core.DataItem; -import com.raytheon.uf.edex.decodertools.core.ReportParser; +import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; import com.raytheon.uf.edex.decodertools.time.TimeTools; /** @@ -55,6 +47,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * the correct day of month. * Sep 18, 2014 #3627 mapeters Updated deprecated {@link TimeTools} usage, * removed unused lowCloudAmount field. + * Sep 26, 2014 #3629 mapeters Replaced static imports. * * * @@ -151,24 +144,27 @@ public class SynopticSec1Decoder extends AbstractSectionDecoder { break; } if (!irix && !winds - && matchElement(element, ISynoptic.SEC_1_IRIXHVV)) { + && AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_1_IRIXHVV)) { // iSubR = getInt(element, 0, 1); - getInt(element, 0, 1); + AbstractSfcObsDecoder.getInt(element, 0, 1); // iSubX = getInt(element, 1, 2); - getInt(element, 1, 2); + AbstractSfcObsDecoder.getInt(element, 1, 2); - loCloudHeight = getInt(element, 2, 3); - visibility = getInt(element, 3, 5); + loCloudHeight = AbstractSfcObsDecoder.getInt(element, 2, 3); + visibility = AbstractSfcObsDecoder.getInt(element, 3, 5); irix = true; continue; - } else if (!winds && matchElement(element, ISynoptic.SEC_1_NDDFF)) { - totalCloud = getInt(element, 0, 1); - Integer temp = getInt(element, 1, 3); + } else if (!winds + && AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_1_NDDFF)) { + totalCloud = AbstractSfcObsDecoder.getInt(element, 0, 1); + Integer temp = AbstractSfcObsDecoder.getInt(element, 1, 3); if ((temp != null) && (temp >= 0)) { windDirection = temp * 10; } - temp = getInt(element, 3, 5); + temp = AbstractSfcObsDecoder.getInt(element, 3, 5); if ((temp != null) && (temp >= 0)) { windSpeed = temp.doubleValue(); } @@ -179,7 +175,8 @@ public class SynopticSec1Decoder extends AbstractSectionDecoder { } element = reportParser.getElement(); if ("00".equals(element.substring(0, 2))) { - windSpeed = getInt(element, 2, 5).doubleValue(); + windSpeed = AbstractSfcObsDecoder.getInt(element, 2, 5) + .doubleValue(); winds = true; } else { // TODO : Need to indicate an error here! @@ -188,13 +185,15 @@ public class SynopticSec1Decoder extends AbstractSectionDecoder { winds = true; } continue; - } else if (winds && matchElement(element, SEC_2_LEAD)) { + } else if (winds + && AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_2_LEAD)) { break; - } else if (SEC_3_LEAD.equals(element)) { + } else if (ISynoptic.SEC_3_LEAD.equals(element)) { break; - } else if (SEC_4_LEAD.equals(element)) { + } else if (ISynoptic.SEC_4_LEAD.equals(element)) { break; - } else if (SEC_5_LEAD.equals(element)) { + } else if (ISynoptic.SEC_5_LEAD.equals(element)) { break; } else if ("80000".equals(element)) { break; @@ -232,7 +231,7 @@ public class SynopticSec1Decoder extends AbstractSectionDecoder { closeGroup(4); winds = true; } else if ("5".equals(element.substring(0, 1)) && doGroup(5)) { - Integer val = getInt(element, 1, 2); + Integer val = AbstractSfcObsDecoder.getInt(element, 1, 2); changeCharacter = new DataItem("changeCharacter"); changeCharacter.setDataValue(val.doubleValue()); changeCharacter.setDataPeriod(3 * 3600); @@ -246,29 +245,34 @@ public class SynopticSec1Decoder extends AbstractSectionDecoder { winds = true; } else if ("7".equals(element.substring(0, 1)) && doGroup(7)) { // TODO : - presentWeather = getInt(element, 1, 3); - pastWeather1 = getInt(element, 3, 4); - pastWeather2 = getInt(element, 4, 5); + presentWeather = AbstractSfcObsDecoder.getInt(element, 1, 3); + pastWeather1 = AbstractSfcObsDecoder.getInt(element, 3, 4); + pastWeather2 = AbstractSfcObsDecoder.getInt(element, 4, 5); closeGroup(7); winds = true; } else if ("8".equals(element.substring(0, 1)) && doGroup(8)) { - if (!winds && matchElement(element, "8[/0-9]{4}")) { - if ((lowCloudType = getInt(element, 2, 3)) < 0) { + if (!winds + && AbstractSfcObsDecoder.matchElement(element, + "8[/0-9]{4}")) { + if ((lowCloudType = AbstractSfcObsDecoder.getInt(element, + 2, 3)) < 0) { lowCloudType = null; } - if ((midCloudType = getInt(element, 3, 4)) < 0) { + if ((midCloudType = AbstractSfcObsDecoder.getInt(element, + 3, 4)) < 0) { midCloudType = null; } - if ((hiCloudType = getInt(element, 4, 5)) < 0) { + if ((hiCloudType = AbstractSfcObsDecoder.getInt(element, 4, + 5)) < 0) { hiCloudType = null; } closeGroup(8); } winds = true; } else if ("9".equals(element.substring(0, 1)) && doGroup(9)) { - obsTimeHour = getInt(element, 1, 3); - obsTimeMinute = getInt(element, 3, 5); + obsTimeHour = AbstractSfcObsDecoder.getInt(element, 1, 3); + obsTimeMinute = AbstractSfcObsDecoder.getInt(element, 3, 5); break; } } // while() @@ -282,8 +286,8 @@ public class SynopticSec1Decoder extends AbstractSectionDecoder { * @return The populated receiver object. */ public ObsCommon getDecodedData(ObsCommon receiver) { - final Double[] ignore = { VAL_ERROR.doubleValue(), - VAL_MISSING.doubleValue() }; + final Double[] ignore = { IDecoderConstants.VAL_ERROR.doubleValue(), + IDecoderConstants.VAL_MISSING.doubleValue() }; // Check to see if we need to convert knots to mps. int iSubW = decoderParent.getISubw(); @@ -359,8 +363,8 @@ public class SynopticSec1Decoder extends AbstractSectionDecoder { // Do we need to override the observation time if ((obsTimeHour != null) && (obsTimeMinute != null)) { - if (checkRange(0, obsTimeHour, 23) - && checkRange(0, obsTimeMinute, 59)) { + if (AbstractSfcObsDecoder.checkRange(0, obsTimeHour, 23) + && AbstractSfcObsDecoder.checkRange(0, obsTimeMinute, 59)) { Calendar obsT = receiver.getTimeObs(); Integer month = getParent().getHeader().getMonth(); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec2Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec2Decoder.java index 1e577dd73b..b5519d7a19 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec2Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec2Decoder.java @@ -19,20 +19,14 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.getInt; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_2_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_3_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_ERROR; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_MISSING; - import java.util.regex.Pattern; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.DataItem; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.DataItem; -import com.raytheon.uf.edex.decodertools.core.ReportParser; +import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; /** * Decode synoptic section 2 data. This section has a single group which @@ -46,7 +40,8 @@ import com.raytheon.uf.edex.decodertools.core.ReportParser; * ------------ ---------- ----------- -------------------------- * 20071010 391 jkorman Initial coding. * 20071109 391 jkorman Added guard for short data. - * 2013/8 757 T. Lee Checked missing wave height from ship report + * 2013/8 757 T. Lee Checked missing wave height from ship report + * Sep 26, 2014 3629 mapeters Replaced static imports. * * * @@ -113,7 +108,7 @@ public class SynopticSec2Decoder extends AbstractSectionDecoder { * Thrown when an relevant error has occurred. */ public void decode(ReportParser reportParser) throws DecoderException { - Pattern pattern = Pattern.compile(SEC_2_LEAD); + Pattern pattern = Pattern.compile(ISynoptic.SEC_2_LEAD); init(); if (reportParser == null) { // nothing to do. @@ -122,8 +117,8 @@ public class SynopticSec2Decoder extends AbstractSectionDecoder { if (reportParser.positionTo(pattern)) { String element = reportParser.getElement(); // need to decode the Ds vs data - shipDirection = getInt(element, 3, 4); - shipSpeed = getInt(element, 4, 5); + shipDirection = AbstractSfcObsDecoder.getInt(element, 3, 4); + shipSpeed = AbstractSfcObsDecoder.getInt(element, 4, 5); while (true) { // if we run out of data, exit. if (reportParser.next()) { @@ -134,11 +129,11 @@ public class SynopticSec2Decoder extends AbstractSectionDecoder { break; } - if (SEC_3_LEAD.equals(element)) { + if (ISynoptic.SEC_3_LEAD.equals(element)) { break; - } else if (SEC_4_LEAD.equals(element)) { + } else if (ISynoptic.SEC_4_LEAD.equals(element)) { break; - } else if (SEC_5_LEAD.equals(element)) { + } else if (ISynoptic.SEC_5_LEAD.equals(element)) { break; } else if ("80000".equals(element)) { break; @@ -165,30 +160,36 @@ public class SynopticSec2Decoder extends AbstractSectionDecoder { seaTemp = SynopticGroups.decodeTemperature(element, 2); closeGroup(1); } else if (doGroup(1) && "1".equals(element.substring(0, 1))) { - wavePeriod = getInt(element, 1, 3); - waveHeight = getInt(element, 3, 5); + wavePeriod = AbstractSfcObsDecoder.getInt(element, 1, 3); + waveHeight = AbstractSfcObsDecoder.getInt(element, 3, 5); closeGroup(1); } else if (doGroup(2) && "2".equals(element.substring(0, 1))) { - windWavePeriod = getInt(element, 1, 3); - windWaveHeight = getInt(element, 3, 5); + windWavePeriod = AbstractSfcObsDecoder + .getInt(element, 1, 3); + windWaveHeight = AbstractSfcObsDecoder + .getInt(element, 3, 5); closeGroup(2); } else if (doGroup(3) && "3".equals(element.substring(0, 1))) { - swellWave1Dir = getInt(element, 1, 3); - swellWave2Dir = getInt(element, 3, 5); + swellWave1Dir = AbstractSfcObsDecoder.getInt(element, 1, 3); + swellWave2Dir = AbstractSfcObsDecoder.getInt(element, 3, 5); closeGroup(3); } else if (doGroup(4) && "4".equals(element.substring(0, 1))) { - swellWave1Period = getInt(element, 1, 3); - swellWave1Height = getInt(element, 3, 5); + swellWave1Period = AbstractSfcObsDecoder.getInt(element, 1, + 3); + swellWave1Height = AbstractSfcObsDecoder.getInt(element, 3, + 5); closeGroup(4); } else if (doGroup(5) && "5".equals(element.substring(0, 1))) { - swellWave2Period = getInt(element, 1, 3); - swellWave2Height = getInt(element, 3, 5); + swellWave2Period = AbstractSfcObsDecoder.getInt(element, 1, + 3); + swellWave2Height = AbstractSfcObsDecoder.getInt(element, 3, + 5); closeGroup(5); } else if (doGroup(6) && "6".equals(element.substring(0, 1))) { // TODO : closeGroup(6); } else if (doGroup(7) && "70".equals(element.substring(0, 2))) { - heightOfWaves = getInt(element, 2, 5); + heightOfWaves = AbstractSfcObsDecoder.getInt(element, 2, 5); closeGroup(7); } else if (doGroup(8) && "8".equals(element.substring(0, 1))) { wetBulb = SynopticGroups.decodeTemperature(element, 2); @@ -227,10 +228,12 @@ public class SynopticSec2Decoder extends AbstractSectionDecoder { * @return The populated receiver object. */ public ObsCommon getDecodedData(ObsCommon receiver) { - final Double[] ignore = { VAL_ERROR.doubleValue(), - VAL_MISSING.doubleValue() }; if (receiver != null) { + final Double[] ignore = { + IDecoderConstants.VAL_ERROR.doubleValue(), + IDecoderConstants.VAL_MISSING.doubleValue() }; + receiver.setShipIceData(iceCode); receiver.setSeaTemp(DataItem.getValue(seaTemp, ignore)); receiver.setWetBulb(DataItem.getValue(wetBulb, ignore)); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec3Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec3Decoder.java index 9d9058d09a..22042794c0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec3Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec3Decoder.java @@ -19,13 +19,6 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.getInt; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_3_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_LEAD; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_ERROR; -import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.VAL_MISSING; - import java.util.regex.Pattern; import javax.measure.converter.UnitConverter; @@ -35,13 +28,15 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.DataItem; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.uf.common.dataplugin.sfcobs.AncPrecip; import com.raytheon.uf.common.dataplugin.sfcobs.AncPressure; import com.raytheon.uf.common.dataplugin.sfcobs.AncTemp; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; import com.raytheon.uf.common.time.util.TimeUtil; -import com.raytheon.uf.edex.decodertools.core.DataItem; -import com.raytheon.uf.edex.decodertools.core.ReportParser; +import com.raytheon.uf.edex.decodertools.core.IDecoderConstants; /** * TODO Add Description @@ -63,6 +58,7 @@ import com.raytheon.uf.edex.decodertools.core.ReportParser; * 20080116 798 jkorman Changed logging levels. * Sep 18, 2014 #3627 mapeters Convert units using {@link UnitConverter}, removed * unused duration field, made patterns constant. + * Sep 26, 2014 #3629 mapeters Replaced static imports. * * * @@ -133,7 +129,7 @@ public class SynopticSec3Decoder extends AbstractSectionDecoder { return; } String element = null; - if (reportParser.positionTo(SEC_3_LEAD)) { + if (reportParser.positionTo(ISynoptic.SEC_3_LEAD)) { while (true) { // if we run out of data, exit. if (reportParser.next()) { @@ -143,9 +139,9 @@ public class SynopticSec3Decoder extends AbstractSectionDecoder { } else { break; } - if (SEC_4_LEAD.equals(element)) { + if (ISynoptic.SEC_4_LEAD.equals(element)) { break; - } else if (SEC_5_LEAD.equals(element)) { + } else if (ISynoptic.SEC_5_LEAD.equals(element)) { break; } else if ("80000".equals(element)) { break; @@ -174,7 +170,7 @@ public class SynopticSec3Decoder extends AbstractSectionDecoder { } else if (element.charAt(1) == '9') { sign = -1; } - Integer val = getInt(element, 2, 5); + Integer val = AbstractSfcObsDecoder.getInt(element, 2, 5); if ((val != null) && (val >= 0)) { pressure24 = new DataItem("24HRChange"); pressure24.setDataValue(hPaToPa.convert(val @@ -195,18 +191,18 @@ public class SynopticSec3Decoder extends AbstractSectionDecoder { } else if (P907.matcher(element).find()) { // TODO : Should something be done here? } else if (P910.matcher(element).find()) { - Integer temp = getInt(element, 3, 5); + Integer temp = AbstractSfcObsDecoder.getInt(element, 3, 5); if ((temp != null) && (temp >= 0)) { windGust910 = temp * conversion; } } else if (P911.matcher(element).find()) { - Integer temp = getInt(element, 3, 5); + Integer temp = AbstractSfcObsDecoder.getInt(element, 3, 5); if ((temp != null) && (temp >= 0)) { windGust911 = temp * conversion; } } else if (P912.matcher(element).find()) { - Integer temp = getInt(element, 3, 5); + Integer temp = AbstractSfcObsDecoder.getInt(element, 3, 5); if ((temp != null) && (temp >= 0)) { windGust912 = temp * conversion; ; @@ -226,8 +222,6 @@ public class SynopticSec3Decoder extends AbstractSectionDecoder { * @return The populated receiver object. */ public ObsCommon getDecodedData(ObsCommon receiver) { - final Double[] ignore = { VAL_ERROR.doubleValue(), - VAL_MISSING.doubleValue() }; if (maxTemperature != null) { AncTemp temp = new AncTemp(); @@ -266,6 +260,9 @@ public class SynopticSec3Decoder extends AbstractSectionDecoder { } } if (pressure24 != null) { + final Double[] ignore = { + IDecoderConstants.VAL_ERROR.doubleValue(), + IDecoderConstants.VAL_MISSING.doubleValue() }; Double v = DataItem.getValue(pressure24, ignore); if ((v != null) && (v >= -9999)) { AncPressure press = new AncPressure(); diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec4Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec4Decoder.java index e66bcd07b9..71430bf524 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec4Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec4Decoder.java @@ -25,9 +25,9 @@ import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.GENERAL import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_4_LEAD; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.uf.common.dataplugin.sfcobs.AncCloud; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * Decode synoptic section 4 data. This section has a single group which diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec5Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec5Decoder.java index 534fe1135b..f949cde344 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec5Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/SynopticSec5Decoder.java @@ -20,8 +20,8 @@ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * Decode synoptic section 5 data. Section 5 data is specific to various regions diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5Block72Decoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5Block72Decoder.java index e7a1cca947..c4444e625e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5Block72Decoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5Block72Decoder.java @@ -19,25 +19,21 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic.regional; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.getInt; -import static com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder.matchElement; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_72_CMAXMIN; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_72_CTEMP; -import static com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic.SEC_5_LEAD; - import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.SI; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.DataItem; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; +import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.ISynoptic; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.SynopticGroups; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.SynopticSec5Decoder; import com.raytheon.uf.common.dataplugin.sfcobs.AncPrecip; import com.raytheon.uf.common.dataplugin.sfcobs.AncTemp; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; -import com.raytheon.uf.edex.decodertools.core.DataItem; -import com.raytheon.uf.edex.decodertools.core.ReportParser; /** * Decode synoptic section 5 regional data for WMO block 72 (United States) @@ -50,6 +46,7 @@ import com.raytheon.uf.edex.decodertools.core.ReportParser; * ------------ ---------- ----------- -------------------------- * 20071010 391 jkorman Initial coding. * Sep 18, 2014 #3627 mapeters Convert units using {@link UnitConverter}. + * Sep 26, 2014 #3629 mapeters Replaced static imports. * * * @@ -101,7 +98,7 @@ public class Sec5Block72Decoder extends SynopticSec5Decoder { // nothing to do. return; } - if (reportParser.positionTo(SEC_5_LEAD)) { + if (reportParser.positionTo(ISynoptic.SEC_5_LEAD)) { String element = null; while (true) { @@ -114,7 +111,8 @@ public class Sec5Block72Decoder extends SynopticSec5Decoder { break; } if (isBlock72Data) { - if (matchElement(element, SEC_5_72_CTEMP)) { + if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_5_72_CTEMP)) { // City temperature. Double val = decodeFahrenheit(element.substring(1, 4)); if (val != null) { @@ -122,7 +120,8 @@ public class Sec5Block72Decoder extends SynopticSec5Decoder { cityTemperature.setDataValue(val); cityTemperature.setDataPeriod(0); } - } else if (matchElement(element, SEC_5_72_CMAXMIN)) { + } else if (AbstractSfcObsDecoder.matchElement(element, + ISynoptic.SEC_5_72_CMAXMIN)) { // City maximum/minimum temperature. Double val = decodeFahrenheit(element.substring(0, 3)); if (val != null) { @@ -225,7 +224,7 @@ public class Sec5Block72Decoder extends SynopticSec5Decoder { private static final Double decodeFahrenheit(String element) { Double decodedValue = null; int sign = SynopticGroups.getSign(element.charAt(0)); - Integer val = getInt(element, 1, 3); + Integer val = AbstractSfcObsDecoder.getInt(element, 1, 3); if ((val != null) && (val >= 0)) { decodedValue = fToK.convert((double) val * sign); } else { diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5MaritimeDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5MaritimeDecoder.java index 8a0ff8353a..e48cecace3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5MaritimeDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/regional/Sec5MaritimeDecoder.java @@ -31,12 +31,12 @@ import javax.measure.unit.NonSI; import javax.measure.unit.SI; import com.raytheon.edex.exception.DecoderException; +import com.raytheon.edex.plugin.sfcobs.decoder.ReportParser; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.AbstractSynopticDecoder; import com.raytheon.edex.plugin.sfcobs.decoder.synoptic.SynopticSec5Decoder; import com.raytheon.uf.common.dataplugin.sfcobs.InterWinds; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; import com.raytheon.uf.common.time.util.TimeUtil; -import com.raytheon.uf.edex.decodertools.core.ReportParser; import com.raytheon.uf.edex.decodertools.time.TimeTools; /** diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.shef/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index a68bfd08c2..63ebb6f13a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/edexOsgi/com.raytheon.edex.plugin.shef/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -347,4 +347,4 @@ com.raytheon.uf.common.dataplugin.shef.tables.Zoneinfo com.raytheon.uf.common.dataplugin.shef.tables.ZoneinfoId com.raytheon.uf.common.dataplugin.shef.tables.Zonenum com.raytheon.uf.common.dataplugin.shef.tables.ZonenumId -com.raytheon.edex.transform.shef.MetarToShefFilter +com.raytheon.edex.transform.shef.MetarToShefFilter \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.edex.decodertools/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index f816069cf3..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1,4 +0,0 @@ -com.raytheon.uf.edex.decodertools.core.filterimpl.RectFilterElement -com.raytheon.uf.edex.decodertools.core.filterimpl.RadiusFilterElement -com.raytheon.uf.edex.decodertools.core.filterimpl.StationIdFilterElement -com.raytheon.uf.edex.decodertools.core.filterimpl.WMOHeaderFilterElement \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IDecoderConstants.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IDecoderConstants.java index 44ca2b5ad5..5f004a198a 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IDecoderConstants.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/core/IDecoderConstants.java @@ -33,6 +33,7 @@ package com.raytheon.uf.edex.decodertools.core; * 20080102 384 jkorman Added additional obs type constants. * 20080114 763 jkorman Added constants for vertical sig values. * Sep 18, 2014 3627 mapeters Removed unused constants. + * Sep 26, 2014 3629 mapeters Removed constants specific to particular packages. * * * @author jkorman @@ -49,18 +50,6 @@ public interface IDecoderConstants { public static final byte ASCII_SP = 0x20; - public static final char SPACE_CHAR = ' '; - - public static final String CARRIAGECONTROL = "CARRIAGECONTROL"; - - public static final String REPORT_END = "RPT_END"; - - public static final String MESSAGE_START = "MSG_START"; - - public static final String MESSAGE_END = "MSG_END"; - - public static final String SOM = String.valueOf((char) ASCII_SOM); - public static final String ETX = String.valueOf((char) ASCII_ETX); public static final String WMO_HEADER = "[A-Z]{4}\\d{0,2} [A-Z][A-Z0-9]{3} \\d{6}[^\\r\\n]*[\\r\\n]+"; @@ -73,23 +62,7 @@ public interface IDecoderConstants { public static final int SYNOPTIC_MOBILE_LAND = 1002; - public static final int SYNOPTIC_SHIP = 1003; - - public static final int SYNOPTIC_CMAN = 1004; - - public static final int SYNOPTIC_MOORED_BUOY = 1005; - - public static final int DRIFTING_BUOY = 1006; - - public static final int SYNOPTIC_MAROB = 1007; - - public static final int RECCO_MANOBS = 4500; - - public static final int RECCO_INTEROBS = 4510; - public static final int AIREP_NORMAL = 4600; - + public static final int AIREP_SPECIAL = 4610; - - public static final int PROFILER_DATA = 3000; }