Omaha #5166: Update logging to use SLF4J:goessounding,poessounding
Change-Id: I9823171ffc2fa2807ad6c18198c9f6dd082e9c86 Former-commit-id: b475166fb952e9850ff0df6a9b52c30c206466c9
This commit is contained in:
parent
31b3ba9bd4
commit
907df44c71
8 changed files with 85 additions and 79 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Goessounding Plug-in
|
Bundle-Name: Goessounding Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.edex.plugin.goessounding
|
Bundle-SymbolicName: com.raytheon.edex.plugin.goessounding
|
||||||
Bundle-Version: 1.14.0.qualifier
|
Bundle-Version: 1.15.0.qualifier
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Require-Bundle: com.raytheon.edex.common,
|
Require-Bundle: com.raytheon.edex.common,
|
||||||
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
|
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
|
||||||
|
@ -23,4 +23,4 @@ Import-Package: com.raytheon.uf.common.dataplugin.goessounding,
|
||||||
com.raytheon.uf.edex.bufrtools.descriptors,
|
com.raytheon.uf.edex.bufrtools.descriptors,
|
||||||
com.raytheon.uf.edex.bufrtools.packets,
|
com.raytheon.uf.edex.bufrtools.packets,
|
||||||
com.raytheon.uf.edex.pointdata,
|
com.raytheon.uf.edex.pointdata,
|
||||||
org.apache.commons.logging
|
org.slf4j
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.goessounding;
|
package com.raytheon.edex.plugin.goessounding;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.raytheon.edex.esb.Headers;
|
import com.raytheon.edex.esb.Headers;
|
||||||
|
|
||||||
|
@ -33,7 +33,8 @@ import com.raytheon.edex.esb.Headers;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Oct 6, 2009 jkorman Initial creation
|
* Oct 06, 2009 jkorman Initial creation
|
||||||
|
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -43,8 +44,8 @@ import com.raytheon.edex.esb.Headers;
|
||||||
|
|
||||||
public class GOESSndgSeparatorFactory {
|
public class GOESSndgSeparatorFactory {
|
||||||
|
|
||||||
private static Log logger = LogFactory
|
private static Logger logger = LoggerFactory
|
||||||
.getLog(GOESSndgSeparatorFactory.class);
|
.getLogger(GOESSndgSeparatorFactory.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory method to return a separator to the client.
|
* Factory method to return a separator to the client.
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.raytheon.edex.esb.Headers;
|
import com.raytheon.edex.esb.Headers;
|
||||||
import com.raytheon.edex.exception.DecoderException;
|
import com.raytheon.edex.exception.DecoderException;
|
||||||
|
@ -62,6 +62,7 @@ import com.raytheon.uf.edex.bufrtools.packets.IBUFRDataPacket;
|
||||||
* Nov 25, 2008 1684 chammack Camel Refactor
|
* Nov 25, 2008 1684 chammack Camel Refactor
|
||||||
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
|
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
|
||||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||||
|
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -75,7 +76,7 @@ public class GOESSoundingDecoder extends AbstractDecoder implements
|
||||||
public static final String PLUGIN_NAME = "goessounding";
|
public static final String PLUGIN_NAME = "goessounding";
|
||||||
|
|
||||||
/** The logger */
|
/** The logger */
|
||||||
private final Log logger = LogFactory.getLog(getClass());
|
private final Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private PointDataDescription pdd;
|
private PointDataDescription pdd;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.goessounding.dao.GOESSoundingDAO;
|
import com.raytheon.edex.plugin.goessounding.dao.GOESSoundingDAO;
|
||||||
import com.raytheon.uf.common.dataplugin.goessounding.GOESSounding;
|
import com.raytheon.uf.common.dataplugin.goessounding.GOESSounding;
|
||||||
|
@ -63,6 +63,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
||||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||||
* Jul 23, 2014 3410 bclement location changed to floats
|
* Jul 23, 2014 3410 bclement location changed to floats
|
||||||
* Sep 16, 2014 3628 mapeters Replaced static imports.
|
* Sep 16, 2014 3628 mapeters Replaced static imports.
|
||||||
|
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -71,8 +72,8 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
||||||
*/
|
*/
|
||||||
public class GOESSoundingDataAdapter {
|
public class GOESSoundingDataAdapter {
|
||||||
|
|
||||||
private static Log logger = LogFactory
|
private static Logger logger = LoggerFactory
|
||||||
.getLog(GOESSoundingDataAdapter.class);
|
.getLogger(GOESSoundingDataAdapter.class);
|
||||||
|
|
||||||
private static final String SPI_FILE = "goesBufr.spi";
|
private static final String SPI_FILE = "goesBufr.spi";
|
||||||
|
|
||||||
|
@ -162,22 +163,23 @@ public class GOESSoundingDataAdapter {
|
||||||
|
|
||||||
index = SAT_YEAR_POS;
|
index = SAT_YEAR_POS;
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
year = getInt(dp,null);
|
year = getInt(dp, null);
|
||||||
|
|
||||||
// year = (dp.getValue() != null) ? ((Number) dp.getValue())
|
// year = (dp.getValue() != null) ? ((Number) dp.getValue())
|
||||||
// .intValue() : null;
|
// .intValue() : null;
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
day = getInt(dp,null);
|
day = getInt(dp, null);
|
||||||
|
|
||||||
// day = (dp.getValue() != null) ? ((Number) dp.getValue()).intValue()
|
// day = (dp.getValue() != null) ? ((Number)
|
||||||
// : null;
|
// dp.getValue()).intValue()
|
||||||
|
// : null;
|
||||||
|
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
lat = getDouble(dp,null);
|
lat = getDouble(dp, null);
|
||||||
// lat = ((Number) dp.getValue()).doubleValue();
|
// lat = ((Number) dp.getValue()).doubleValue();
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
lon = getDouble(dp,null);
|
lon = getDouble(dp, null);
|
||||||
// lon = ((Number) dp.getValue()).doubleValue();
|
// lon = ((Number) dp.getValue()).doubleValue();
|
||||||
|
|
||||||
// If we have lat/lon data, set it into the obs object. Otherwise
|
// If we have lat/lon data, set it into the obs object. Otherwise
|
||||||
// no need to go further, set the obs object to null and quit!
|
// no need to go further, set the obs object to null and quit!
|
||||||
|
@ -202,19 +204,19 @@ public class GOESSoundingDataAdapter {
|
||||||
}
|
}
|
||||||
if (obsData != null) {
|
if (obsData != null) {
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
hour = getInt(dp,null);
|
hour = getInt(dp, null);
|
||||||
// hour = (dp.getValue() != null) ? ((Double) dp.getValue())
|
// hour = (dp.getValue() != null) ? ((Double) dp.getValue())
|
||||||
// .intValue() : null;
|
// .intValue() : null;
|
||||||
|
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
minute = getInt(dp,null);
|
minute = getInt(dp, null);
|
||||||
// minute = (dp.getValue() != null) ? ((Double) dp.getValue())
|
// minute = (dp.getValue() != null) ? ((Double) dp.getValue())
|
||||||
// .intValue() : null;
|
// .intValue() : null;
|
||||||
|
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
seconds = getInt(dp,null);
|
seconds = getInt(dp, null);
|
||||||
// seconds = (dp.getValue() != null) ? ((Double) dp.getValue())
|
// seconds = (dp.getValue() != null) ? ((Double) dp.getValue())
|
||||||
// .intValue() : null;
|
// .intValue() : null;
|
||||||
|
|
||||||
Calendar baseTime = TimeUtil.newGmtCalendar(year, 1, 1);
|
Calendar baseTime = TimeUtil.newGmtCalendar(year, 1, 1);
|
||||||
baseTime.set(Calendar.DAY_OF_YEAR, day);
|
baseTime.set(Calendar.DAY_OF_YEAR, day);
|
||||||
|
@ -247,27 +249,27 @@ public class GOESSoundingDataAdapter {
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
IBUFRDataPacket dp = dataList.get(SAT_ID_POS);
|
IBUFRDataPacket dp = dataList.get(SAT_ID_POS);
|
||||||
n = getInt(dp,-9999);
|
n = getInt(dp, -9999);
|
||||||
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
||||||
// : -9999;
|
// : -9999;
|
||||||
view.setInt("satid", n);
|
view.setInt("satid", n);
|
||||||
|
|
||||||
dp = dataList.get(SAT_PROC_INSTR);
|
dp = dataList.get(SAT_PROC_INSTR);
|
||||||
n = getInt(dp,-9999);
|
n = getInt(dp, -9999);
|
||||||
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
||||||
// : -9999;
|
// : -9999;
|
||||||
view.setInt("satinstrument", n);
|
view.setInt("satinstrument", n);
|
||||||
|
|
||||||
dp = dataList.get(SAT_QUAL_POS);
|
dp = dataList.get(SAT_QUAL_POS);
|
||||||
n = getInt(dp,-9999);
|
n = getInt(dp, -9999);
|
||||||
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
||||||
// : -9999;
|
// : -9999;
|
||||||
view.setInt("qualityinfo", n);
|
view.setInt("qualityinfo", n);
|
||||||
|
|
||||||
dp = dataList.get(SAT_CHANNELS_POS);
|
dp = dataList.get(SAT_CHANNELS_POS);
|
||||||
n = getInt(dp,-9999);
|
n = getInt(dp, -9999);
|
||||||
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
// n = (dp.getValue() != null) ? ((Long) dp.getValue()).intValue()
|
||||||
// : -9999;
|
// : -9999;
|
||||||
view.setInt("sounderchannels", n);
|
view.setInt("sounderchannels", n);
|
||||||
|
|
||||||
// TODO: need elevation
|
// TODO: need elevation
|
||||||
|
@ -375,11 +377,11 @@ public class GOESSoundingDataAdapter {
|
||||||
*/
|
*/
|
||||||
private static Double getDouble(IBUFRDataPacket packet, Double defaultValue) {
|
private static Double getDouble(IBUFRDataPacket packet, Double defaultValue) {
|
||||||
Double retValue = defaultValue;
|
Double retValue = defaultValue;
|
||||||
if(packet != null) {
|
if (packet != null) {
|
||||||
Object o = packet.getValue();
|
Object o = packet.getValue();
|
||||||
if(o instanceof Double) {
|
if (o instanceof Double) {
|
||||||
retValue = ((Double) o).doubleValue();
|
retValue = ((Double) o).doubleValue();
|
||||||
} else if(o instanceof Long) {
|
} else if (o instanceof Long) {
|
||||||
retValue = ((Long) o).doubleValue();
|
retValue = ((Long) o).doubleValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -394,19 +396,17 @@ public class GOESSoundingDataAdapter {
|
||||||
*/
|
*/
|
||||||
private static Integer getInt(IBUFRDataPacket packet, Integer defaultValue) {
|
private static Integer getInt(IBUFRDataPacket packet, Integer defaultValue) {
|
||||||
Integer retValue = defaultValue;
|
Integer retValue = defaultValue;
|
||||||
if(packet != null) {
|
if (packet != null) {
|
||||||
Object o = packet.getValue();
|
Object o = packet.getValue();
|
||||||
if(o instanceof Double) {
|
if (o instanceof Double) {
|
||||||
retValue = ((Double) o).intValue();
|
retValue = ((Double) o).intValue();
|
||||||
} else if(o instanceof Long) {
|
} else if (o instanceof Long) {
|
||||||
retValue = ((Long) o).intValue();
|
retValue = ((Long) o).intValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Poessounding Plug-in
|
Bundle-Name: Poessounding Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.edex.plugin.poessounding
|
Bundle-SymbolicName: com.raytheon.edex.plugin.poessounding
|
||||||
Bundle-Version: 1.14.0.qualifier
|
Bundle-Version: 1.15.0.qualifier
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Require-Bundle: com.raytheon.edex.common,
|
Require-Bundle: com.raytheon.edex.common,
|
||||||
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
|
com.raytheon.uf.edex.decodertools;bundle-version="1.0.0",
|
||||||
|
@ -23,4 +23,4 @@ Import-Package: com.raytheon.uf.common.dataplugin.poessounding,
|
||||||
com.raytheon.uf.edex.bufrtools.descriptors,
|
com.raytheon.uf.edex.bufrtools.descriptors,
|
||||||
com.raytheon.uf.edex.bufrtools.packets,
|
com.raytheon.uf.edex.bufrtools.packets,
|
||||||
com.raytheon.uf.edex.pointdata,
|
com.raytheon.uf.edex.pointdata,
|
||||||
org.apache.commons.logging
|
org.slf4j
|
||||||
|
|
|
@ -26,8 +26,8 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.raytheon.edex.esb.Headers;
|
import com.raytheon.edex.esb.Headers;
|
||||||
import com.raytheon.edex.exception.DecoderException;
|
import com.raytheon.edex.exception.DecoderException;
|
||||||
|
@ -66,6 +66,7 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory;
|
||||||
* correct file.
|
* correct file.
|
||||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||||
* May 14, 2014 2536 bclement moved WMO Header to common
|
* May 14, 2014 2536 bclement moved WMO Header to common
|
||||||
|
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -79,7 +80,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements
|
||||||
public static final String PLUGIN_NAME = "poessounding";
|
public static final String PLUGIN_NAME = "poessounding";
|
||||||
|
|
||||||
/** The logger */
|
/** The logger */
|
||||||
private final Log logger = LogFactory.getLog(getClass());
|
private final Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private PointDataDescription pdd;
|
private PointDataDescription pdd;
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ package com.raytheon.edex.plugin.poessounding;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.raytheon.edex.esb.Headers;
|
import com.raytheon.edex.esb.Headers;
|
||||||
import com.raytheon.edex.plugin.AbstractRecordSeparator;
|
import com.raytheon.edex.plugin.AbstractRecordSeparator;
|
||||||
|
@ -48,8 +48,9 @@ import com.raytheon.uf.edex.bufrtools.packets.IBUFRDataPacket;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080303 1026 jkorman Initial implementation.
|
* Mar 03, 2008 1026 jkorman Initial implementation.
|
||||||
* May 14, 2014 2536 bclement moved WMO Header to common
|
* May 14, 2014 2536 bclement moved WMO Header to common
|
||||||
|
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -59,7 +60,7 @@ import com.raytheon.uf.edex.bufrtools.packets.IBUFRDataPacket;
|
||||||
public class POESSoundingSeparator extends AbstractRecordSeparator implements
|
public class POESSoundingSeparator extends AbstractRecordSeparator implements
|
||||||
IDescriptorFactorySelector {
|
IDescriptorFactorySelector {
|
||||||
|
|
||||||
private Log logger = LogFactory.getLog(getClass());
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private WMOHeader wmoHeader = null;
|
private WMOHeader wmoHeader = null;
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.raytheon.edex.plugin.poessounding.dao.POESSoundingDAO;
|
import com.raytheon.edex.plugin.poessounding.dao.POESSoundingDAO;
|
||||||
import com.raytheon.uf.common.dataplugin.poessounding.POESSounding;
|
import com.raytheon.uf.common.dataplugin.poessounding.POESSounding;
|
||||||
|
@ -61,6 +61,7 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
||||||
* correct file.
|
* correct file.
|
||||||
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
* May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage
|
||||||
* Jul 23, 2014 3410 bclement location changed to floats
|
* Jul 23, 2014 3410 bclement location changed to floats
|
||||||
|
* Dec 15, 2015 5166 kbisanz Update logging to use SLF4J
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -69,8 +70,8 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
||||||
*/
|
*/
|
||||||
public class POESSoundingDataAdapter {
|
public class POESSoundingDataAdapter {
|
||||||
|
|
||||||
private static Log logger = LogFactory
|
private static Logger logger = LoggerFactory
|
||||||
.getLog(POESSoundingDataAdapter.class);
|
.getLogger(POESSoundingDataAdapter.class);
|
||||||
|
|
||||||
private static final String SPI_FILE = "poesBufr.spi";
|
private static final String SPI_FILE = "poesBufr.spi";
|
||||||
|
|
||||||
|
@ -155,9 +156,9 @@ public class POESSoundingDataAdapter {
|
||||||
|
|
||||||
IBUFRDataPacket dp = dataList.get(index++);
|
IBUFRDataPacket dp = dataList.get(index++);
|
||||||
|
|
||||||
Double lat = getDouble(dp,null); // (Double) dp.getValue();
|
Double lat = getDouble(dp, null); // (Double) dp.getValue();
|
||||||
dp = dataList.get(index++);
|
dp = dataList.get(index++);
|
||||||
Double lon = getDouble(dp,null); // (Double) dp.getValue();
|
Double lon = getDouble(dp, null); // (Double) dp.getValue();
|
||||||
|
|
||||||
// If we have lat/lon data, set it into the obs object. Otherwise
|
// If we have lat/lon data, set it into the obs object. Otherwise
|
||||||
// no need to go further, set the obs object to null and quit!
|
// no need to go further, set the obs object to null and quit!
|
||||||
|
@ -175,7 +176,8 @@ public class POESSoundingDataAdapter {
|
||||||
obsData.setLocation(location);
|
obsData.setLocation(location);
|
||||||
|
|
||||||
dp = dataList.get(SNDG_HGT);
|
dp = dataList.get(SNDG_HGT);
|
||||||
Double elev = getDouble(dp,-9999.0); // (Double) dp.getValue();
|
Double elev = getDouble(dp, -9999.0); // (Double)
|
||||||
|
// dp.getValue();
|
||||||
location.setElevation(elev.intValue());
|
location.setElevation(elev.intValue());
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
|
@ -290,11 +292,11 @@ public class POESSoundingDataAdapter {
|
||||||
*/
|
*/
|
||||||
private static Double getDouble(IBUFRDataPacket packet, Double defaultValue) {
|
private static Double getDouble(IBUFRDataPacket packet, Double defaultValue) {
|
||||||
Double retValue = defaultValue;
|
Double retValue = defaultValue;
|
||||||
if(packet != null) {
|
if (packet != null) {
|
||||||
Object o = packet.getValue();
|
Object o = packet.getValue();
|
||||||
if(o instanceof Double) {
|
if (o instanceof Double) {
|
||||||
retValue = ((Double) o).doubleValue();
|
retValue = ((Double) o).doubleValue();
|
||||||
} else if(o instanceof Long) {
|
} else if (o instanceof Long) {
|
||||||
retValue = ((Long) o).doubleValue();
|
retValue = ((Long) o).doubleValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue