Issue #2362: Merge issues with initial cherry pick of Wes2Bridge DRs
Former-commit-id: 89a61850616dd532fc81e7cdaefc9dcb360633f3
This commit is contained in:
parent
75d2cd017e
commit
4b6e4fcd3a
9 changed files with 298 additions and 285 deletions
|
@ -51,7 +51,7 @@ public class FollowupData extends AbstractWarningRecord {
|
|||
/**
|
||||
* String displayed in the drop down update list.
|
||||
*/
|
||||
private String displayString;
|
||||
private final String displayString;
|
||||
|
||||
/**
|
||||
* String used to test if this object is equivalent to one of the updated
|
||||
|
@ -62,7 +62,7 @@ public class FollowupData extends AbstractWarningRecord {
|
|||
/**
|
||||
* Information string used when the follow up is no longer valid or allowed.
|
||||
*/
|
||||
private String expirationString;
|
||||
private final String expirationString;
|
||||
|
||||
public FollowupData(WarningAction action, AbstractWarningRecord record) {
|
||||
super(record);
|
||||
|
@ -192,4 +192,13 @@ public class FollowupData extends AbstractWarningRecord {
|
|||
return expirationString;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.common.dataplugin.PluginDataObject#getPluginName()
|
||||
*/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "followUpWarning";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ Bundle-ClassPath: apache-mime4j-core-0.7.jar,
|
|||
tika-parsers-1.0.jar,
|
||||
.
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.apache.log4j
|
||||
org.apache.log4j,
|
||||
org.apache.commons.compress;bundle-version="1.5.0"
|
||||
Export-Package: com.drew.imaging,
|
||||
com.drew.imaging.jpeg,
|
||||
|
|
|
@ -46,9 +46,9 @@ import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
|||
import com.raytheon.uf.common.status.IPerformanceStatusHandler;
|
||||
import com.raytheon.uf.common.status.PerformanceStatus;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.util.ArraysUtil;
|
||||
import com.raytheon.uf.common.time.util.ITimer;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.ArraysUtil;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||
|
||||
|
@ -90,7 +90,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
|||
*/
|
||||
public class SatelliteDecoder extends AbstractDecoder {
|
||||
|
||||
private String traceId = "";
|
||||
private final String traceId = "";
|
||||
|
||||
private static final int MAX_IMAGE_SIZE = 30000000;
|
||||
|
||||
|
@ -111,8 +111,9 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
|
||||
SatelliteRecord record = null;
|
||||
|
||||
if (file == null || (file.length() < 1))
|
||||
if ((file == null) || (file.length() < 1)) {
|
||||
return new PluginDataObject[0];
|
||||
}
|
||||
RandomAccessFile f = new RandomAccessFile(file, "r");
|
||||
try {
|
||||
ITimer timer = TimeUtil.getTimer();
|
||||
|
@ -129,7 +130,8 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
byteBuffer = null;
|
||||
}
|
||||
if (byteBuffer != null) {
|
||||
int offsetOfDataInFile = byteBuffer.position() + GINI_HEADER_SIZE;
|
||||
int offsetOfDataInFile = byteBuffer.position()
|
||||
+ GINI_HEADER_SIZE;
|
||||
Calendar calendar = Calendar.getInstance(TimeZone
|
||||
.getTimeZone("GMT"));
|
||||
int intValue = 0;
|
||||
|
@ -140,20 +142,23 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
record = new SatelliteRecord();
|
||||
|
||||
if (isCompressed(byteBuffer)) {
|
||||
/* If the data is compressed, we assume it came from the SBN
|
||||
/*
|
||||
* If the data is compressed, we assume it came from the SBN
|
||||
* and will have a reasonable size such that we can have two
|
||||
* copies of the data in memory at the same time. Ideally,
|
||||
* SBN decompression should be performed upstream from EDEX
|
||||
* and this code would be removed.
|
||||
*/
|
||||
byte[] data = new byte[(int) file.length() - byteBuffer.position()];
|
||||
byte[] data = new byte[(int) file.length()
|
||||
- byteBuffer.position()];
|
||||
f.seek(byteBuffer.position());
|
||||
f.readFully(data);
|
||||
byte[][] retVal = decompressSatellite(data);
|
||||
byteBuffer = ByteBuffer.wrap(retVal[0]);
|
||||
tempBytes = retVal[1];
|
||||
} else {
|
||||
/* The code bellow performs absolute gets on the buffer, so
|
||||
/*
|
||||
* The code bellow performs absolute gets on the buffer, so
|
||||
* it needs to be compacted.
|
||||
*/
|
||||
byteBuffer.compact();
|
||||
|
@ -255,7 +260,7 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
// Get the Satellite Height
|
||||
int satHeight = byteBuffer.getShort(53);
|
||||
|
||||
if (latSub != 0 || lonSub != 0 || satHeight != 0) {
|
||||
if ((latSub != 0) || (lonSub != 0) || (satHeight != 0)) {
|
||||
// Correct the longitude so negative is west
|
||||
lonSub *= -1;
|
||||
// Correct the height to be height above ground
|
||||
|
@ -287,8 +292,9 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
// get number of points along y-axis
|
||||
int ny = byteBuffer.getShort(18);
|
||||
|
||||
/* If input was SBN-compressed, we already have the data
|
||||
* loaded. If not, load it now.
|
||||
/*
|
||||
* If input was SBN-compressed, we already have the data loaded.
|
||||
* If not, load it now.
|
||||
*/
|
||||
if (tempBytes == null) {
|
||||
tempBytes = new byte[nx * ny];
|
||||
|
@ -433,7 +439,6 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
record.setCoverage(mapCoverage);
|
||||
record.setPersistenceTime(TimeTools.getSystemCalendar()
|
||||
.getTime());
|
||||
record.setPluginName("satellite");
|
||||
record.constructDataURI();
|
||||
// Create the data record.
|
||||
IDataRecord dataRec = messageData.getStorageRecord(record,
|
||||
|
@ -466,10 +471,11 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
* @throws DecoderException
|
||||
* If WMO header is not found, or is incorrect.
|
||||
* @param messageData
|
||||
* Contains the start of the satellite data file. On return,
|
||||
* the position is set the beginning of the GINI header.
|
||||
* Contains the start of the satellite data file. On return, the
|
||||
* position is set the beginning of the GINI header.
|
||||
*/
|
||||
private void removeWmoHeader(ByteBuffer messageData) throws DecoderException {
|
||||
private void removeWmoHeader(ByteBuffer messageData)
|
||||
throws DecoderException {
|
||||
|
||||
// Copy to a char [], carefully, as creating a string from
|
||||
// a byte [] with binary data can create erroneous data
|
||||
|
@ -508,8 +514,8 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
byte[] placeholder = new byte[10];
|
||||
Inflater decompressor = new Inflater();
|
||||
try {
|
||||
decompressor.setInput(messageData.array(),
|
||||
messageData.position(), messageData.remaining());
|
||||
decompressor.setInput(messageData.array(), messageData.position(),
|
||||
messageData.remaining());
|
||||
decompressor.inflate(placeholder);
|
||||
} catch (DataFormatException e) {
|
||||
compressed = false;
|
||||
|
@ -539,14 +545,13 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
// Allocate 30MB for a possible max size
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream(MAX_IMAGE_SIZE);
|
||||
int totalBytesDecomp = 0;
|
||||
int decompByteCounter = 0;
|
||||
byte[] inputArray = new byte[1024 * 10];
|
||||
Inflater decompressor = new Inflater();
|
||||
int index = -1;
|
||||
try {
|
||||
while (totalBytesDecomp < zSatellite.length) {
|
||||
|
||||
int compChunkSize = zSatellite.length - totalBytesDecomp > 10240 ? 10240
|
||||
int compChunkSize = (zSatellite.length - totalBytesDecomp) > 10240 ? 10240
|
||||
: zSatellite.length - totalBytesDecomp;
|
||||
|
||||
// copy compChunkSize compressed data from zSatellite, offset by
|
||||
|
@ -570,9 +575,6 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
throw new DecoderException(
|
||||
"Unable to decompress satellite data - input data appears to be truncated");
|
||||
}
|
||||
// add the total bytes decompressed from inflate call
|
||||
decompByteCounter += inflatedBytes;
|
||||
|
||||
// retrieve the total compressed bytes input so far
|
||||
totalBytesDecomp += decompressor.getTotalIn();
|
||||
|
||||
|
@ -641,9 +643,9 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
|
||||
}
|
||||
|
||||
if (index != -1 && (index + 3 <= inflateArray.length - 1)) {
|
||||
if (!(inflateArray[index] == -1 && inflateArray[index + 1] == 0
|
||||
&& inflateArray[index + 2] == -1 && inflateArray[index + 3] == 0)) {
|
||||
if ((index != -1) && ((index + 3) <= (inflateArray.length - 1))) {
|
||||
if (!((inflateArray[index] == -1) && (inflateArray[index + 1] == 0)
|
||||
&& (inflateArray[index + 2] == -1) && (inflateArray[index + 3] == 0))) {
|
||||
index = getIndex(inflateArray, index + 1);
|
||||
}
|
||||
} else {
|
||||
|
@ -686,7 +688,7 @@ public class SatelliteDecoder extends AbstractDecoder {
|
|||
if (byteArray[0] < 0) {
|
||||
// remove the negative value
|
||||
byteArray[0] &= 127;
|
||||
latitude = byteArrayToFloat(byteArray) / 10000 * -1;
|
||||
latitude = (byteArrayToFloat(byteArray) / 10000) * -1;
|
||||
} else {
|
||||
latitude = byteArrayToFloat(byteArray) / 10000;
|
||||
}
|
||||
|
|
|
@ -19,10 +19,15 @@
|
|||
**/
|
||||
package test.edex.transform.shef;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import com.raytheon.edex.transform.shef.MetarToShefTransformer;
|
||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
||||
|
@ -50,8 +55,7 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
|||
public class TestMetarToShefTransformer {
|
||||
|
||||
/**
|
||||
* Test that the transformer creates an empty iterator when
|
||||
* given no input.
|
||||
* Test that the transformer creates an empty iterator when given no input.
|
||||
*/
|
||||
@Test
|
||||
public void testMetarToShefInteratorA() {
|
||||
|
@ -61,7 +65,7 @@ public class TestMetarToShefTransformer {
|
|||
assertFalse(it.hasNext());
|
||||
assertNull(it.next());
|
||||
|
||||
pdos = new PluginDataObject [0];
|
||||
pdos = new PluginDataObject[0];
|
||||
it = MetarToShefTransformer.iterate(pdos);
|
||||
assertNotNull(it);
|
||||
assertFalse(it.hasNext());
|
||||
|
@ -70,8 +74,7 @@ public class TestMetarToShefTransformer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test that the transformer creates an non-empty iterator for
|
||||
* given input.
|
||||
* Test that the transformer creates an non-empty iterator for given input.
|
||||
*/
|
||||
@Test
|
||||
public void testMetarToShefInteratorB() {
|
||||
|
@ -81,6 +84,18 @@ public class TestMetarToShefTransformer {
|
|||
public IDecoderGettable getDecoderGettable() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.common.dataplugin.PluginDataObject#getPluginName
|
||||
* ()
|
||||
*/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "testMetarToShef";
|
||||
}
|
||||
};
|
||||
|
||||
PluginDataObject[] pdos = { p, };
|
||||
|
@ -107,7 +122,4 @@ public class TestMetarToShefTransformer {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -95,6 +95,6 @@ public class NucapsRecord extends NPPSoundingRecord {
|
|||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return PLUGIN_NAME;
|
||||
return "nucaps";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -754,7 +754,7 @@ public abstract class PluginDao extends CoreDao {
|
|||
* @throws DataAccessLayerException
|
||||
*/
|
||||
protected int purgeExpiredKey(PurgeRuleSet ruleSet, String[] purgeKeys)
|
||||
String[] purgeKeys) throws DataAccessLayerException {
|
||||
throws DataAccessLayerException {
|
||||
List<PurgeRule> rules = ruleSet.getRuleForKeys(purgeKeys);
|
||||
|
||||
if (rules == null) {
|
||||
|
|
|
@ -46,6 +46,7 @@ import com.raytheon.uf.common.dataplugin.ffmp.FFMPTemplates;
|
|||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPTemplates.MODE;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPUtils;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.SourceBinList;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.dao.FFMPDao;
|
||||
import com.raytheon.uf.common.dataplugin.message.DataURINotificationMessage;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarStation;
|
||||
import com.raytheon.uf.common.dataplugin.radar.util.RadarsInUseUtil;
|
||||
|
|
|
@ -49,19 +49,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
import com.raytheon.uf.common.time.DataTime;
|
||||
|
||||
@Entity
|
||||
//@Table(name = "gpd", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
||||
// @Table(name = "gpd", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||
// "dataURI" }) })
|
||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "gpdseq")
|
||||
@Table(name = "gpd")
|
||||
@DynamicSerialize
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlRootElement
|
||||
public class GenericPointDataRecord extends PersistablePluginDataObject implements
|
||||
/*ISpatialEnabled,*/ IDecoderGettable, IPointData, IPersistable {
|
||||
public class GenericPointDataRecord extends PersistablePluginDataObject
|
||||
implements
|
||||
/* ISpatialEnabled, */IDecoderGettable, IPointData, IPersistable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ManyToOne
|
||||
@PrimaryKeyJoinColumn
|
||||
//@DataURI(position = 1, embedded = true)
|
||||
// @DataURI(position = 1, embedded = true)
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private GenericPointDataProductInfo productInfo;
|
||||
|
@ -86,48 +89,54 @@ public class GenericPointDataRecord extends PersistablePluginDataObject implemen
|
|||
@DynamicSerializeElement
|
||||
private PointDataView pointDataView;
|
||||
|
||||
/* TBM - chin...delete these later..not used?
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private int numLevel;
|
||||
/*
|
||||
* TBM - chin...delete these later..not used?
|
||||
*
|
||||
* @Column
|
||||
*
|
||||
* @DynamicSerializeElement
|
||||
*
|
||||
* @XmlAttribute private int numLevel;
|
||||
*/
|
||||
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
//@DataURI(position = 2)
|
||||
//product release version for product correction used only.
|
||||
private int productVersion=0;
|
||||
// @DataURI(position = 2)
|
||||
// product release version for product correction used only.
|
||||
private int productVersion = 0;
|
||||
|
||||
|
||||
//list of master level values
|
||||
// list of master level values
|
||||
@Transient
|
||||
@XmlElement
|
||||
private List<Float> levelValueLst = new ArrayList<Float>();
|
||||
|
||||
//one level of parameters value map. Key (String) = parameter name, value (double) = parameter value
|
||||
//@Transient
|
||||
//private HashMap<String, Double> Map_ParmToValue = new HashMap<String, Double>();
|
||||
// one level of parameters value map. Key (String) = parameter name, value
|
||||
// (double) = parameter value
|
||||
// @Transient
|
||||
// private HashMap<String, Double> Map_ParmToValue = new HashMap<String,
|
||||
// Double>();
|
||||
|
||||
//Map of all levels of parameters value maps. Key (integer) = level value in levelValueLst, value =
|
||||
// Map of all levels of parameters value maps. Key (integer) = level value
|
||||
// in levelValueLst, value =
|
||||
// one level of parameter values = a Map_ParmToValue map).
|
||||
//@Transient
|
||||
//private HashMap<Float, HashMap<String, Double>> Map_LevelToParmValueMap = new HashMap<Float, HashMap<String, Double> >();
|
||||
// @Transient
|
||||
// private HashMap<Float, HashMap<String, Double>> Map_LevelToParmValueMap =
|
||||
// new HashMap<Float, HashMap<String, Double> >();
|
||||
|
||||
public GenericPointDataRecord() {
|
||||
super();
|
||||
//System.out.println("GenericPointDataRecord() entered");
|
||||
// System.out.println("GenericPointDataRecord() entered");
|
||||
|
||||
}
|
||||
|
||||
public GenericPointDataRecord(String uri) {
|
||||
super(uri);
|
||||
//System.out.println("GenericPointDataRecord(String uri) entered");
|
||||
// System.out.println("GenericPointDataRecord(String uri) entered");
|
||||
}
|
||||
|
||||
public GenericPointDataRecord(String uri, GenericPointDataProductInfo productInfo,
|
||||
ObStation location,
|
||||
public GenericPointDataRecord(String uri,
|
||||
GenericPointDataProductInfo productInfo, ObStation location,
|
||||
float slat, float slon, PointDataView pointDataView) {
|
||||
super(uri);
|
||||
this.productInfo = productInfo;
|
||||
|
@ -135,13 +144,12 @@ public class GenericPointDataRecord extends PersistablePluginDataObject implemen
|
|||
this.slat = slat;
|
||||
this.slon = slon;
|
||||
this.pointDataView = pointDataView;
|
||||
this.pluginName ="gpd";
|
||||
//System.out.println("GenericPointDataRecord(3) entered");
|
||||
// System.out.println("GenericPointDataRecord(3) entered");
|
||||
}
|
||||
|
||||
public GenericPointDataRecord(GenericPointDataProductInfo productInfo,
|
||||
ObStation location,
|
||||
float slat, float slon, PointDataView pointDataView, DataTime dataTime,
|
||||
int productVersion) {
|
||||
ObStation location, float slat, float slon,
|
||||
PointDataView pointDataView, DataTime dataTime, int productVersion) {
|
||||
this.productInfo = productInfo;
|
||||
this.location = location;
|
||||
this.slat = slat;
|
||||
|
@ -149,25 +157,21 @@ public class GenericPointDataRecord extends PersistablePluginDataObject implemen
|
|||
this.pointDataView = pointDataView;
|
||||
this.dataTime = dataTime;
|
||||
this.productVersion = productVersion;
|
||||
this.pluginName ="gpd";
|
||||
//System.out.println("GenericPointDataRecord(4) entered");
|
||||
// System.out.println("GenericPointDataRecord(4) entered");
|
||||
}
|
||||
|
||||
/* TBM - chin...delete it later..not used?
|
||||
public void constructTransientListAndMap(GenericPointDataStationProduct stnPd){
|
||||
setNumLevel(stnPd.getNumLevel());
|
||||
for(int i=0; i<stnPd.getNumLevel(); i++ ){
|
||||
GenericPointDataLevel gpdLevel=stnPd.getLevelLst().get(i);
|
||||
getLevelValueLst().add(i, gpdLevel.getLevelValue());
|
||||
for(GenericPointDataParameter gdpParm: gpdLevel.getGpdParameters()){
|
||||
getMap_ParmToValue().put(gdpParm.getName(),(double) gdpParm.getValue());
|
||||
}
|
||||
getMap_LevelToParmValueMap().put(gpdLevel.getLevelValue(), getMap_ParmToValue());
|
||||
}
|
||||
}
|
||||
/*
|
||||
* TBM - chin...delete it later..not used? public void
|
||||
* constructTransientListAndMap(GenericPointDataStationProduct stnPd){
|
||||
* setNumLevel(stnPd.getNumLevel()); for(int i=0; i<stnPd.getNumLevel(); i++
|
||||
* ){ GenericPointDataLevel gpdLevel=stnPd.getLevelLst().get(i);
|
||||
* getLevelValueLst().add(i, gpdLevel.getLevelValue());
|
||||
* for(GenericPointDataParameter gdpParm: gpdLevel.getGpdParameters()){
|
||||
* getMap_ParmToValue().put(gdpParm.getName(),(double) gdpParm.getValue());
|
||||
* } getMap_LevelToParmValueMap().put(gpdLevel.getLevelValue(),
|
||||
* getMap_ParmToValue()); } }
|
||||
*/
|
||||
|
||||
|
||||
public GenericPointDataProductInfo getProductInfo() {
|
||||
return productInfo;
|
||||
}
|
||||
|
@ -232,31 +236,23 @@ public class GenericPointDataRecord extends PersistablePluginDataObject implemen
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
/*TBM - chin...delete these later..not used?
|
||||
@Override
|
||||
public void constructDataURI() throws PluginException {
|
||||
// TODO Auto-generated method stub
|
||||
super.constructDataURI();
|
||||
// ObStation class does not define dataUri component. Therefore,
|
||||
// add stationId/longitude/latitude here to end of dataUri
|
||||
if(this.location!=null){
|
||||
if(this.location.getStationId()!=null){
|
||||
this.dataURI = this.dataURI+DataURI.SEPARATOR+this.location.getStationId();
|
||||
}
|
||||
else {
|
||||
this.dataURI = this.dataURI+DataURI.SEPARATOR+"null";
|
||||
}
|
||||
if(this.location.getStationGeom()!=null){
|
||||
this.dataURI = this.dataURI+DataURI.SEPARATOR+
|
||||
this.location.getStationGeom().getX()+ DataURI.SEPARATOR+
|
||||
this.location.getStationGeom().getY();
|
||||
}
|
||||
else {
|
||||
this.dataURI = this.dataURI+DataURI.SEPARATOR+"null"+DataURI.SEPARATOR+"null";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
/*
|
||||
* TBM - chin...delete these later..not used?
|
||||
*
|
||||
* @Override public void constructDataURI() throws PluginException { // TODO
|
||||
* Auto-generated method stub super.constructDataURI(); // ObStation class
|
||||
* does not define dataUri component. Therefore, // add
|
||||
* stationId/longitude/latitude here to end of dataUri
|
||||
* if(this.location!=null){ if(this.location.getStationId()!=null){
|
||||
* this.dataURI =
|
||||
* this.dataURI+DataURI.SEPARATOR+this.location.getStationId(); } else {
|
||||
* this.dataURI = this.dataURI+DataURI.SEPARATOR+"null"; }
|
||||
* if(this.location.getStationGeom()!=null){ this.dataURI =
|
||||
* this.dataURI+DataURI.SEPARATOR+ this.location.getStationGeom().getX()+
|
||||
* DataURI.SEPARATOR+ this.location.getStationGeom().getY(); } else {
|
||||
* this.dataURI =
|
||||
* this.dataURI+DataURI.SEPARATOR+"null"+DataURI.SEPARATOR+"null"; } } }
|
||||
*/
|
||||
|
||||
public ObStation getLocation() {
|
||||
return location;
|
||||
|
@ -266,14 +262,12 @@ public class GenericPointDataRecord extends PersistablePluginDataObject implemen
|
|||
this.location = location;
|
||||
}
|
||||
|
||||
/* TBM - chin...delete these later..not used?
|
||||
public int getNumLevel() {
|
||||
return numLevel;
|
||||
}
|
||||
|
||||
public void setNumLevel(int numLevel) {
|
||||
this.numLevel = numLevel;
|
||||
} */
|
||||
/*
|
||||
* TBM - chin...delete these later..not used? public int getNumLevel() {
|
||||
* return numLevel; }
|
||||
*
|
||||
* public void setNumLevel(int numLevel) { this.numLevel = numLevel; }
|
||||
*/
|
||||
|
||||
public List<Float> getLevelValueLst() {
|
||||
return levelValueLst;
|
||||
|
@ -283,23 +277,20 @@ public class GenericPointDataRecord extends PersistablePluginDataObject implemen
|
|||
this.levelValueLst = levelValueLst;
|
||||
}
|
||||
|
||||
/* TBM - chin...delete these later..not used?
|
||||
public HashMap<String, Double> getMap_ParmToValue() {
|
||||
return Map_ParmToValue;
|
||||
}
|
||||
|
||||
public void setMap_ParmToValue(HashMap<String, Double> map_ParmToValue) {
|
||||
Map_ParmToValue = map_ParmToValue;
|
||||
}
|
||||
|
||||
public HashMap<Float, HashMap<String, Double>> getMap_LevelToParmValueMap() {
|
||||
return Map_LevelToParmValueMap;
|
||||
}
|
||||
|
||||
public void setMap_LevelToParmValueMap(
|
||||
HashMap<Float, HashMap<String, Double>> map_LevelToParmValueMap) {
|
||||
Map_LevelToParmValueMap = map_LevelToParmValueMap;
|
||||
}*/
|
||||
/*
|
||||
* TBM - chin...delete these later..not used? public HashMap<String, Double>
|
||||
* getMap_ParmToValue() { return Map_ParmToValue; }
|
||||
*
|
||||
* public void setMap_ParmToValue(HashMap<String, Double> map_ParmToValue) {
|
||||
* Map_ParmToValue = map_ParmToValue; }
|
||||
*
|
||||
* public HashMap<Float, HashMap<String, Double>>
|
||||
* getMap_LevelToParmValueMap() { return Map_LevelToParmValueMap; }
|
||||
*
|
||||
* public void setMap_LevelToParmValueMap( HashMap<Float, HashMap<String,
|
||||
* Double>> map_LevelToParmValueMap) { Map_LevelToParmValueMap =
|
||||
* map_LevelToParmValueMap; }
|
||||
*/
|
||||
|
||||
public int getProductVersion() {
|
||||
return productVersion;
|
||||
|
@ -309,4 +300,8 @@ public class GenericPointDataRecord extends PersistablePluginDataObject implemen
|
|||
this.productVersion = productVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "gpd";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
* 08/08/13 1028 G. Hull rm underscores from reportType and set mndTime in URI
|
||||
package gov.noaa.nws.ncep.edex.plugin.aww.decoder;
|
||||
|
||||
import gov.noaa.nws.ncep.common.dataplugin.aww.AwwLatlons;
|
||||
|
@ -53,11 +52,12 @@ import com.raytheon.uf.edex.decodertools.core.IDecoderConstants;
|
|||
* 11/2009 38 L. Lin Correctly get UGC information.
|
||||
* 11/2009 38 L. Lin Migration to TO11 D6.
|
||||
* 05/2010 38 L. Lin Migration to TO11DR11.
|
||||
* 01/26/2011 N/A M. Gao Refactor:
|
||||
* Jan 26, 2011 N/A M. Gao Refactor:
|
||||
* 1. if AwwParser.processWMO failed, simply
|
||||
* drop the record by throwing an exception
|
||||
* 2. comment out the end check "if(record == null")
|
||||
* because it is a dead code.
|
||||
* Aug 08, 2013 1028 G. Hull rm underscores from reportType and set mndTime in URI
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* </pre>
|
||||
*
|
||||
|
@ -248,12 +248,7 @@ public class AwwDecoder extends AbstractDecoder {
|
|||
List<AwwLatlons> pointAwwLatLonsList = AwwLatLonUtil
|
||||
.getAwwLatLonsListBySereveWeatherStatusPointLine(awwVtec
|
||||
.getVtecLine());
|
||||
// System.out.println("==========, within AwwDecoder, pointAwwLatLonsList.size="+pointAwwLatLonsList.size());
|
||||
int index = 0;
|
||||
for (AwwLatlons eachAwwLatlons : pointAwwLatLonsList) {
|
||||
// System.out.println("===============,before adding awwLatLons to ugc, No."+(index+1)+" awwLatLons.getLat="+
|
||||
// eachAwwLatlons.getLat()+" awwLatLons.getLon="+eachAwwLatlons.getLon());
|
||||
index++;
|
||||
ugc.addAwwLatLon(eachAwwLatlons);
|
||||
}
|
||||
}
|
||||
|
@ -278,15 +273,14 @@ public class AwwDecoder extends AbstractDecoder {
|
|||
return new PluginDataObject[0];
|
||||
}
|
||||
|
||||
record.setReportType( reportType.trim() );
|
||||
record.setReportType(reportType.trim());
|
||||
record.setTraceId(traceId);
|
||||
// Set MND remark before the URI is constructed
|
||||
if( mt.getMndTimeString() == null ||
|
||||
mt.getMndTimeString().trim().isEmpty() ) {
|
||||
record.setMndTime( "unknown" );
|
||||
}
|
||||
else {
|
||||
record.setMndTime( mt.getMndTimeString() );
|
||||
if ((mt.getMndTimeString() == null)
|
||||
|| mt.getMndTimeString().trim().isEmpty()) {
|
||||
record.setMndTime("unknown");
|
||||
} else {
|
||||
record.setMndTime(mt.getMndTimeString());
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue