Issue #2298: Make getPluginName abstract

Change-Id: Ieefc9ab24dee34ed5c653d035db2a2e1f0e6f9ae

Former-commit-id: 54356ea774bfab26b85aff317fc759de41e259d1
This commit is contained in:
Richard Peter 2013-08-30 10:40:54 -05:00
parent d573869ffb
commit 592218edb8
224 changed files with 36780 additions and 36856 deletions

View file

@ -32,15 +32,16 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
* TODO Add Description
*
* <pre>
*
*
* SOFTWARE HISTORY
*
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 26, 2011 bsteffen Initial creation
*
* Jul 26, 2011 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
*
* @author bsteffen
* @version 1.0
*/
@ -79,4 +80,8 @@ public class D2DNSharpDataObject extends PluginDataObject {
this.layers = layers;
}
@Override
public String getPluginName() {
return "d2dnsharpdataobject";
}
}

View file

@ -61,9 +61,10 @@ import com.raytheon.uf.viz.monitor.scan.ScanMonitor;
* ------------ ---------- ----------- --------------------------
* Oct 13, 2009 dhladky Initial creation
* Feb 28, 2013 1731 bsteffen Optimize construction of scan resource.
* Apr 18, 2013 1926 njensen Reuse URIs in construction of resource
* Jul 24, 2013 2218 mpduff Changed method signature.
* Aug 15, 2013 2143 mpduff Add missing data check.
* Apr 18, 2013 1926 njensen Reuse URIs in construction of resource
* Jul 24, 2013 2218 mpduff Changed method signature.
* Aug 15, 2013 2143 mpduff Add missing data check.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -206,7 +207,6 @@ public class ScanResourceData extends AbstractRequestableResourceData {
public void populateRecords(ScanRecord[] records) throws VizException {
Map<File, Set<ScanRecord>> fileMap = new HashMap<File, Set<ScanRecord>>();
for (ScanRecord record : records) {
record.setPluginName("scan");
File loc = HDF5Util.findHDF5Location(record);
Set<ScanRecord> recordSet = fileMap.get(loc);
if (recordSet == null) {
@ -263,12 +263,12 @@ public class ScanResourceData extends AbstractRequestableResourceData {
List<DataTime> dataList = new ArrayList<DataTime>();
long[] times = monitor.getDMDMaxAngleTimes(icao);
int index = times.length - 1 < 0 ? 0 : times.length - 1;
int index = (times.length - 1) < 0 ? 0 : times.length - 1;
if ((times != null) && (times.length != 0)) {
for (int i = 0; i < allTimes.length; i++) {
if (allTimes[i].getRefTime() != null) {
if (allTimes[i].getRefTime().getTime() == times[index]) {
dataList.add(allTimes[i]);
for (DataTime allTime : allTimes) {
if (allTime.getRefTime() != null) {
if (allTime.getRefTime().getTime() == times[index]) {
dataList.add(allTime);
index--;
if (index == -1) {
break;

View file

@ -84,11 +84,11 @@ public class FSILauncherLayer extends
private MouseHandler mouseHandler;
private MenuManager quickMenuManager;
private final MenuManager quickMenuManager;
private MenuManager fullMenuManager;
private final MenuManager fullMenuManager;
private Shell shell;
private final Shell shell;
public FSILauncherLayer(FSILauncherResourceData fsiLauncherResourceData,
LoadProperties loadProperties) {
@ -201,14 +201,16 @@ public class FSILauncherLayer extends
} else {
try {
for (Object o : (ArrayList<?>) ((ResponseMessageGeneric) response)
.getContents())
.getContents()) {
result.add((String) o);
}
} catch (RuntimeException e) {
throw new VizException("Unexpected server response", e);
}
}
} else
} else {
throw new VizException("Could not load getFsiRadars.py");
}
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM,
"Could not retrieve FSI radar list", e);
@ -229,15 +231,16 @@ public class FSILauncherLayer extends
geoClickedPoint = getResourceContainer().translateClick(x, y);
if (isEditable()) {
// panelClickPoint = new Point(x, y);
if (mouseButton == MOUSE_BUTTON_TO_USE)
if (mouseButton == MOUSE_BUTTON_TO_USE) {
clicked = true;
}
}
return false;
}
@Override
public boolean handleMouseUp(int x, int y, int mouseButton) {
if (clicked && mouseButton == MOUSE_BUTTON_TO_USE) {
if (clicked && (mouseButton == MOUSE_BUTTON_TO_USE)) {
clicked = false;
/*
@ -295,8 +298,9 @@ public class FSILauncherLayer extends
throw new VizException("Unexpected server response", e);
}
}
} else
} else {
throw new VizException("Could not retrieve FSI environment");
}
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM,
"Could not retrieve FSI radar list", e);
@ -307,7 +311,7 @@ public class FSILauncherLayer extends
public class LaunchFSIAction extends Action {
private String radarName;
private final String radarName;
private class StormVector {
public boolean useSTI = true;
@ -393,7 +397,8 @@ public class FSILauncherLayer extends
RadarRecord radarRecord = null;
try {
List<Object[]> obs = query.performQuery();
if (obs != null && !obs.isEmpty() && obs.get(0).length > 0) {
if ((obs != null) && !obs.isEmpty()
&& (obs.get(0).length > 0)) {
radarRecord = (RadarRecord) obs.get(0)[0];
} else {
// default to 0.5 for non-terminal radars, test if
@ -409,7 +414,6 @@ public class FSILauncherLayer extends
} catch (RuntimeException e) {
throw new VizException("Unexpected response format", e);
}
radarRecord.setPluginName("radar"); // TODO: huh?
File loc = HDF5Util.findHDF5Location(radarRecord);
IDataStore dataStore = DataStoreFactory.getDataStore(loc);
try {
@ -439,8 +443,9 @@ public class FSILauncherLayer extends
private String createControlMessage() {
FSIEnvironment env = getFSIEnvironment();
if (env == null)
if (env == null) {
return null;
}
// According to FSI_GUI, this must have the format ##.##
String subTypeStr = String.format("%04.2f",
@ -540,13 +545,14 @@ public class FSILauncherLayer extends
@Override
public void run() {
String controlMessage = createControlMessage();
if (controlMessage == null)
if (controlMessage == null) {
return;
}
File f = PathManagerFactory.getPathManager().getStaticFile(
"fsi" + File.separator + FSI_START_SCRIPT_NAME);
if (f == null || !f.exists()) {
if ((f == null) || !f.exists()) {
statusHandler.handle(Priority.PROBLEM,
"Could not find the FSI start script.");
return;
@ -604,12 +610,14 @@ public class FSILauncherLayer extends
int nLines = 0;
while (true) {
String s = br.readLine();
if (s == null)
if (s == null) {
break;
}
sb.append(s);
sb.append('\n');
if (++nLines >= MAX_LINES)
if (++nLines >= MAX_LINES) {
break;
}
}
} catch (IOException e) {
e.printStackTrace(System.err);
@ -628,7 +636,7 @@ public class FSILauncherLayer extends
statusHandler
.handle(Priority.PROBLEM,
"FSI failed to start: "
+ sb.toString());
+ sb.toString());
return;
}
} catch (InterruptedException e) {

View file

@ -27,7 +27,6 @@ import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
@ -57,7 +56,8 @@ import com.raytheon.viz.grid.util.SliceUtil;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 18, 2010 #4473 rjpeter Initial creation
* Mar 18, 2010 4473 rjpeter Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -69,9 +69,9 @@ public class RadarRequestableData extends GridRequestableData {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(RadarRequestableData.class);
private RadarRecord radarSource;
private final RadarRecord radarSource;
private RadarMapper tiler;
private final RadarMapper tiler;
private WeakReference<FloatDataRecord> cache = null;
@ -107,7 +107,6 @@ public class RadarRequestableData extends GridRequestableData {
Parameter parameter = new Parameter(parameterAbbrev,
this.parameterName, unit);
record.setParameter(parameter);
record.setPluginName(GridConstants.GRID);
record.setDataTime(source.getDataTime());
record.constructDataURI();
setGridSource(record);

View file

@ -58,7 +58,8 @@ import com.raytheon.viz.grid.util.RadarAdapter;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 25, 2010 bsteffen Initial creation
* Mar 25, 2010 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -88,9 +89,9 @@ public class GridUpdater implements IAlertObserver {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + getOuterType().hashCode();
result = prime * result + ((node == null) ? 0 : node.hashCode());
result = prime * result + timeOffset;
result = (prime * result) + getOuterType().hashCode();
result = (prime * result) + ((node == null) ? 0 : node.hashCode());
result = (prime * result) + timeOffset;
return result;
}
@ -101,22 +102,29 @@ public class GridUpdater implements IAlertObserver {
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
UpdateValue other = (UpdateValue) obj;
if (!getOuterType().equals(other.getOuterType()))
if (!getOuterType().equals(other.getOuterType())) {
return false;
}
if (node == null) {
if (other.node != null)
if (other.node != null) {
return false;
} else if (!node.equals(other.node))
}
} else if (!node.equals(other.node)) {
return false;
if (timeOffset != other.timeOffset)
}
if (timeOffset != other.timeOffset) {
return false;
}
return true;
}
@ -126,11 +134,11 @@ public class GridUpdater implements IAlertObserver {
}
private Set<String> myUpdates = new HashSet<String>();
private final Set<String> myUpdates = new HashSet<String>();
private GridInventory inventory;
private final GridInventory inventory;
private Map<GridMapKey, Set<UpdateValue>> updateMap = new HashMap<GridMapKey, Set<UpdateValue>>();
private final Map<GridMapKey, Set<UpdateValue>> updateMap = new HashMap<GridMapKey, Set<UpdateValue>>();
public GridUpdater(GridInventory inventory) {
this.inventory = inventory;
@ -147,7 +155,7 @@ public class GridUpdater implements IAlertObserver {
public synchronized void addNode(AbstractDerivedDataNode node)
throws VizException {
List<Dependency> dependencies = node.getDependencies();
if (dependencies == null || dependencies.isEmpty()) {
if ((dependencies == null) || dependencies.isEmpty()) {
return;
}
List<Dependency> dep = new ArrayList<Dependency>(dependencies);
@ -238,7 +246,7 @@ public class GridUpdater implements IAlertObserver {
// Null means it is an alias model and supplement means
// there exists a true GribNode buried under the or
// node
if (method == null
if ((method == null)
|| !method.getName().equals("Supplement")) {
inventory.reinitTree();
// System.out.println(((AbstractDerivedLevelNode) lNode)
@ -256,7 +264,6 @@ public class GridUpdater implements IAlertObserver {
}
for (UpdateValue value : set) {
GridRecord fakeRec = new GridRecord();
fakeRec.setPluginName(GridInventory.PLUGIN_NAME);
Object obj = alert.decodedAlert.get("dataTime");
if (!(obj instanceof DataTime)) {
throw new IllegalArgumentException(

View file

@ -38,7 +38,8 @@ import com.raytheon.viz.grid.util.RadarProductCodeMapping;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 20, 2012 bsteffen Initial creation
* Sep 20, 2012 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -77,33 +78,39 @@ public class RadarUpdater implements IAlertObserver {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime
* result
result = (prime * result)
+ ((elevationAngle == null) ? 0 : elevationAngle.hashCode());
result = prime * result
result = (prime * result)
+ ((productCode == null) ? 0 : productCode.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
CacheKey other = (CacheKey) obj;
if (elevationAngle == null) {
if (other.elevationAngle != null)
if (other.elevationAngle != null) {
return false;
} else if (!elevationAngle.equals(other.elevationAngle))
}
} else if (!elevationAngle.equals(other.elevationAngle)) {
return false;
}
if (productCode == null) {
if (other.productCode != null)
if (other.productCode != null) {
return false;
} else if (!productCode.equals(other.productCode))
}
} else if (!productCode.equals(other.productCode)) {
return false;
}
return true;
}
@ -122,7 +129,7 @@ public class RadarUpdater implements IAlertObserver {
}
private Map<CacheKey, CacheEntry> cache = new LinkedHashMap<CacheKey, CacheEntry>(
private final Map<CacheKey, CacheEntry> cache = new LinkedHashMap<CacheKey, CacheEntry>(
100, .75f, true) {
private static final long serialVersionUID = 2022670836957170184L;
@ -152,14 +159,14 @@ public class RadarUpdater implements IAlertObserver {
for (AlertMessage alertMessage : alertMessages) {
String icao = alertMessage.decodedAlert
.get(RadarAdapter.ICAO_QUERY).toString();
if (icao == null
if ((icao == null)
|| !icao.equalsIgnoreCase(configuredRadar.getRdaId())) {
continue;
}
globalTimes = null;
Object obj = alertMessage.decodedAlert
.get(RadarAdapter.PRODUCT_CODE_QUERY);
if (obj == null || !(obj instanceof Integer)) {
if ((obj == null) || !(obj instanceof Integer)) {
continue;
}
Integer productCode = (Integer) obj;
@ -169,12 +176,12 @@ public class RadarUpdater implements IAlertObserver {
continue;
}
obj = alertMessage.decodedAlert.get("dataTime");
if (obj == null || !(obj instanceof DataTime)) {
if ((obj == null) || !(obj instanceof DataTime)) {
continue;
}
DataTime time = (DataTime) obj;
obj = alertMessage.decodedAlert.get(RadarAdapter.TILT_QUERY);
if (obj == null || !(obj instanceof Double)) {
if ((obj == null) || !(obj instanceof Double)) {
continue;
}
Double elevationAngle = (Double) obj;
@ -188,7 +195,6 @@ public class RadarUpdater implements IAlertObserver {
e1.getLocalizedMessage(), e1);
}
GridRecord fakeRec = new GridRecord();
fakeRec.setPluginName(GridInventory.PLUGIN_NAME);
fakeRec.setDataTime(time);
fakeRec.setDatasetId(RadarAdapter.RADAR_SOURCE);
@ -209,12 +215,12 @@ public class RadarUpdater implements IAlertObserver {
private CacheKey getCacheKey(RadarRequestableLevelNode rNode) {
Map<String, RequestConstraint> rcMap = rNode.getRequestConstraintMap();
RequestConstraint rc = rcMap.get(RadarAdapter.PRODUCT_CODE_QUERY);
if (rc == null || rc.getConstraintType() != ConstraintType.EQUALS) {
if ((rc == null) || (rc.getConstraintType() != ConstraintType.EQUALS)) {
return null;
}
Integer productCode = Integer.parseInt(rc.getConstraintValue());
rc = rcMap.get(RadarAdapter.TILT_QUERY);
if (rc == null || rc.getConstraintType() != ConstraintType.EQUALS) {
if ((rc == null) || (rc.getConstraintType() != ConstraintType.EQUALS)) {
return null;
}
Double elevationAngle = Double.parseDouble(rc.getConstraintValue());
@ -232,7 +238,7 @@ public class RadarUpdater implements IAlertObserver {
if (entry == null) {
return null;
}
if (entry.insertTime + CACHE_TIME < System.currentTimeMillis()) {
if ((entry.insertTime + CACHE_TIME) < System.currentTimeMillis()) {
cache.remove(cacheKey);
return null;
}
@ -248,7 +254,7 @@ public class RadarUpdater implements IAlertObserver {
if (globalTimes == null) {
return null;
}
if (globalInsertTime + CACHE_TIME < System.currentTimeMillis()) {
if ((globalInsertTime + CACHE_TIME) < System.currentTimeMillis()) {
globalTimes = null;
return null;
}

View file

@ -24,7 +24,6 @@ import java.util.Collection;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
@ -40,17 +39,18 @@ import com.raytheon.viz.grid.util.TiltRequest;
/**
* A PDO that extends GridRecord and wraps a AbstractRequestableData to allow
* derived parameters to be used anywhere GridRecords can be used.
*
*
* <pre>
*
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 18, 2010 bsteffen Initial creation
* Mar 18, 2010 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
*
* </pre>
*
*
* @author bsteffen
* @version 1.0
*/
@ -67,9 +67,10 @@ public class RequestableDataRecord extends GridRecord {
GridCoverage coverage = null;
if (requester.getSpace() instanceof GridCoverage) {
coverage = (GridCoverage) requester.getSpace();
if (requester instanceof GridRequestableData) {
setSecondaryId(((GridRequestableData) requester).getGridSource().getSecondaryId());
}
if (requester instanceof GridRequestableData) {
setSecondaryId(((GridRequestableData) requester)
.getGridSource().getSecondaryId());
}
}
setDatasetId(requester.getSource());
setLocation(coverage);
@ -78,7 +79,6 @@ public class RequestableDataRecord extends GridRecord {
requester.getParameterName(), requester.getUnit());
setParameter(parameter);
setPluginName(GridConstants.GRID);
setDataTime(requester.getDataTime());
try {
constructDataURI();
@ -142,7 +142,7 @@ public class RequestableDataRecord extends GridRecord {
}
}
float[] data = new float[nx * ny];
for (int i = 0; i < nx * ny; i++) {
for (int i = 0; i < (nx * ny); i++) {
data[i] = ((Number) obj).floatValue();
}
FloatDataRecord rec = new FloatDataRecord(this.getParameter()

View file

@ -47,19 +47,18 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* }
* </code>
*
*
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080103 384 jkorman Initial Coding.
* 20080408 1039 jkorman Added traceId for tracing data.
* 11/11/08 1684 chammack Camel Refactor
* ======================================
* AWIPS2 DR Work
* 20120911 1011 jkorman Added decode of AIREP turbulence.
* Jan 03, 2008 384 jkorman Initial Coding.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Nov 11, 2008 1684 chammack Camel Refactor
* Sep 11, 2012 1011 jkorman Added decode of AIREP turbulence.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author jkorman
@ -103,19 +102,19 @@ public class AirepDecoder extends AbstractDecoder {
try {
WMOHeader wmoHeader = input.wmoHeader;
if(wmoHeader != null) {
if (wmoHeader != null) {
traceId = wmoHeader.getWmoHeader().replace(" ", "_");
logger.info(traceId + "- AirepDecoder.decode()");
Calendar refTime = TimeTools.findDataTime(
wmoHeader.getYYGGgg(), header);
if(refTime != null) {
report = populateRecord(new AirepParser(input.report, refTime));
if (refTime != null) {
report = populateRecord(new AirepParser(input.report,
refTime));
}
}
if (report != null) {
report.setTraceId(traceId);
report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
} catch (PluginException e) {
@ -182,17 +181,17 @@ public class AirepDecoder extends AbstractDecoder {
}
AirepParser.Turbulence turb = parser.getTurbulence();
int t = -1;
if(turb != null) {
if (turb != null) {
t = turb.getTurbulence() << 4;
}
if(flightConditions > -1) {
if(t > -1) {
if (flightConditions > -1) {
if (t > -1) {
record.setFlightConditions(flightConditions | t);
} else {
record.setFlightConditions(flightConditions);
}
} else {
if(t > -1) {
if (t > -1) {
record.setFlightConditions(t);
}
}

View file

@ -64,18 +64,21 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070810 379 jkorman Initial Coding from prototype.
* 20070817 379 jkorman Changed log info to debug in decode().
* 20070821 379 jkorman Added SFPA41 lightning data pattern.
* 20070912 379 jkorman Code review cleanup.
* 20070920 379 jkorman Check for null persistence time.
* 20070924 379 jkorman Removed HDFGroup code. Set insert_time
* Aug 10, 2007 379 jkorman Initial Coding from prototype.
* Aug 17, 2007 379 jkorman Changed log info to debug in decode().
* Aug 21, 2007 379 jkorman Added SFPA41 lightning data pattern.
* Sep 12, 2007 379 jkorman Code review cleanup.
* Sep 20, 2007 379 jkorman Check for null persistence time.
* Sep 24, 2007 379 jkorman Removed HDFGroup code. Set insert_time
* directly in decode.
* 20070926 379 jkorman Updated to set DataTime.
* 20080318 1026 jkorman Added debug strike info.
* 20080408 1039 jkorman Added traceId for tracing data.
* 11/11/08 1684 chammack Refactored for camel integration
* 20130503 DCS 112 Wufeng Zhou Modified to be able to handle both the new encrypted data and legacy bit-shifted data
* Sep 26, 2007 379 jkorman Updated to set DataTime.
* Mar 18, 2008 1026 jkorman Added debug strike info.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Nov 11, 2008 1684 chammack Refactored for camel integration
* May 03, 2013 DCS 112 Wufeng Zhou Modified to be able to handle both the
* new encrypted data and legacy bit-shifted
* data
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -90,9 +93,9 @@ public class BinLightningDecoder extends AbstractDecoder {
// Allow ingest up to 10 minutes into the future.
private static final long TEN_MINUTES = 10 * 60 * 1000L;
private SimpleDateFormat SDF;
private final SimpleDateFormat SDF;
private Log logger = LogFactory.getLog(getClass());
private final Log logger = LogFactory.getLog(getClass());
/**
* Default lightning strike type for FLASH messages. RT_FLASH documents
@ -101,7 +104,7 @@ public class BinLightningDecoder extends AbstractDecoder {
public LtgStrikeType DEFAULT_FLASH_TYPE = LtgStrikeType.STRIKE_CG;
private String traceId = null;
/**
* Construct a BinLightning decoder. Calling hasNext() after construction
* will return false, decode() will return a null.
@ -118,9 +121,10 @@ public class BinLightningDecoder extends AbstractDecoder {
* @throws DecoderException
* Thrown if no data is available.
*/
public PluginDataObject[] decode(byte[] data, Headers headers) throws DecoderException {
public PluginDataObject[] decode(byte[] data, Headers headers)
throws DecoderException {
//String traceId = null;
// String traceId = null;
PluginDataObject[] reports = new PluginDataObject[0];
if (data != null) {
@ -131,43 +135,56 @@ public class BinLightningDecoder extends AbstractDecoder {
Calendar baseTime = TimeTools.findDataTime(wmoHdr.getYYGGgg(),
headers);
// Because binary nature of the encrypted data, the string created with its byte[] array may not have the same length of the byte[] array length
// So when DecoderTools.stripWMOHeader() assumes byte[] length == String length in it logic, it is observed that it may return a shorter byte[] than
// the real data array. (Looks like a bug???)
// byte[] pdata = DecoderTools.stripWMOHeader(data, SFUS_PATTERN);
// if (pdata == null) {
// pdata = DecoderTools.stripWMOHeader(data, SFPA_PATTERN);
// }
// instead the following is used to strip WMO header a little more safely.
// Because binary nature of the encrypted data, the string
// created with its byte[] array may not have the same length of
// the byte[] array length
// So when DecoderTools.stripWMOHeader() assumes byte[] length
// == String length in it logic, it is observed that it may
// return a shorter byte[] than
// the real data array. (Looks like a bug???)
// byte[] pdata = DecoderTools.stripWMOHeader(data,
// SFUS_PATTERN);
// if (pdata == null) {
// pdata = DecoderTools.stripWMOHeader(data, SFPA_PATTERN);
// }
// instead the following is used to strip WMO header a little
// more safely.
byte[] pdata = null;
if (wmoHdr.isValid() && wmoHdr.getMessageDataStart() > 0) {
pdata = new byte[data.length - wmoHdr.getMessageDataStart()];
System.arraycopy(data, wmoHdr.getMessageDataStart(), pdata, 0, data.length - wmoHdr.getMessageDataStart());
}
if (wmoHdr.isValid() && (wmoHdr.getMessageDataStart() > 0)) {
pdata = new byte[data.length - wmoHdr.getMessageDataStart()];
System.arraycopy(data, wmoHdr.getMessageDataStart(), pdata,
0, data.length - wmoHdr.getMessageDataStart());
}
if ((pdata == null) || (pdata.length == 0)) {
return new PluginDataObject[0];
}
//
// Modified by Wufeng Zhou to handle both legacy bit-shifted and new encryted data
// Modified by Wufeng Zhou to handle both legacy bit-shifted and
// new encryted data
//
// Preserved the legacy decoding in BinLigntningDecoderUtil.decodeBitShiftedBinLightningData(), and added logic to process
// both encrypted data and legacy data
//
List<LightningStrikePoint> strikes = BinLigntningDecoderUtil.decodeBinLightningData(data, pdata, traceId, baseTime.getTime());
// Preserved the legacy decoding in
// BinLigntningDecoderUtil.decodeBitShiftedBinLightningData(),
// and added logic to process
// both encrypted data and legacy data
//
List<LightningStrikePoint> strikes = BinLigntningDecoderUtil
.decodeBinLightningData(data, pdata, traceId,
baseTime.getTime());
if (strikes == null) { // keep-alive record, log and return
logger.info(traceId + " - found keep-alive record. ignore for now.");
return reports;
logger.info(traceId
+ " - found keep-alive record. ignore for now.");
return reports;
}
//
// Done MOD by Wufeng Zhou
//
// post processing data - if not keep-alive record
BinLightningRecord report = null;
if (strikes.size() > 0) {
@ -182,22 +199,22 @@ public class BinLightningDecoder extends AbstractDecoder {
Calendar c = TimeTools.copy(baseTime);
if (c == null) {
throw new DecoderException(traceId + " - Error decoding times");
throw new DecoderException(traceId
+ " - Error decoding times");
}
//report.setInsertTime(c); // OB13.4 source code does not have this line anymore, WZ 05/03/2013
// report.setInsertTime(c); // OB13.4 source code does not have
// this line anymore, WZ 05/03/2013
Calendar cStart = report.getStartTime();
if (cStart.getTimeInMillis() > c.getTimeInMillis()
+ TEN_MINUTES) {
synchronized (SDF) {
logger.info("Discarding future data for " + traceId
+ " at " + SDF.format(cStart.getTime()));
}
if (cStart.getTimeInMillis() > (c.getTimeInMillis() + TEN_MINUTES)) {
synchronized (SDF) {
logger.info("Discarding future data for " + traceId
+ " at " + SDF.format(cStart.getTime()));
}
} else {
Calendar cStop = report.getStopTime();
TimeRange range = new TimeRange(
cStart.getTimeInMillis(),
TimeRange range = new TimeRange(cStart.getTimeInMillis(),
cStop.getTimeInMillis());
DataTime dataTime = new DataTime(cStart, range);
@ -205,19 +222,19 @@ public class BinLightningDecoder extends AbstractDecoder {
if (report != null) {
report.setTraceId(traceId);
report.setPluginName("binlightning");
try {
report.constructDataURI();
reports = new PluginDataObject[] { report };
} catch (PluginException e) {
logger.error("Error constructing datauri", e);
throw new DecoderException("Error constructing datauri", e);
logger.error("Error constructing datauri", e);
throw new DecoderException(
"Error constructing datauri", e);
}
}
}
}
} else {
logger.error("No WMOHeader found in data");
logger.error("No WMOHeader found in data");
}
return reports;
}

View file

@ -59,6 +59,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* May 02, 2013 1970 bgonzale Removed Table annotation, changed from
* Entity annotation to MappedSuperClass.
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -75,123 +76,126 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
public abstract class BufrMosData extends PersistablePluginDataObject implements
IPersistable, IPointData {
public static enum MOSType {
ETA, GFS, AVN, LAMP, HPC, MRF, NGM
};
public static enum MOSType {
ETA, GFS, AVN, LAMP, HPC, MRF, NGM
};
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
public static final String MOS_DATA = "Data";
public static final String MOS_DATA = "Data";
// Text of the WMO header
@Transient
@XmlAttribute
@DynamicSerializeElement
private String wmoHeader;
// Text of the WMO header
@Transient
@XmlAttribute
@DynamicSerializeElement
private String wmoHeader;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView = null;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView = null;
@ManyToOne(cascade = { CascadeType.REFRESH })
@PrimaryKeyJoinColumn
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private BufrMosDataLocation location;
@ManyToOne(cascade = { CascadeType.REFRESH })
@PrimaryKeyJoinColumn
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private BufrMosDataLocation location;
/**
* Create an empty MOSData object.
*/
public BufrMosData() {
this.pluginName = "bufrmos" + getType();
}
/**
* Create an empty MOSData object.
*/
public BufrMosData() {
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public BufrMosData(String uri) {
super(uri);
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public BufrMosData(String uri) {
super(uri);
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* @return the type
*/
public abstract MOSType getType();
/**
* @return the type
*/
public abstract MOSType getType();
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
identifier = dataURI;
}
/**
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
identifier = dataURI;
}
public BufrMosDataLocation getLocation() {
return location;
}
public BufrMosDataLocation getLocation() {
return location;
}
public void setLocation(BufrMosDataLocation mosLocation) {
this.location = mosLocation;
}
public void setLocation(BufrMosDataLocation mosLocation) {
this.location = mosLocation;
}
@Override
public PointDataView getPointDataView() {
return this.pointDataView;
}
@Override
public PointDataView getPointDataView() {
return this.pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
}
@Override
public String getPluginName() {
return "bufrmos" + getType();
}
}

View file

@ -53,6 +53,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* work without dataURI.
* Jul 19, 2013 1992 bsteffen Remove redundant time columns from
* bufrua.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -112,7 +113,6 @@ public abstract class AbstractBUFRUAAdapter extends BUFRPointDataAdapter<UAObs>
if ((obsData != null) && (wmoStaId != null)) {
// pickup the data.
obsData.setPluginName(getPluginName());
obsData.setWmoHeader(wmoHeader.getWmoHeader());
Calendar validTime = obsData.getDataTime()

View file

@ -43,11 +43,12 @@ import com.vividsolutions.jts.io.WKTReader;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 03/03/2007 908 bwoodle initial creation
* 12/03/2008 chammack Camel refactor
* 09/15/2009 3027 njensen Patterns constants
* 09/21/2009 3072 bsteffen Fixed Decoding of Line Records
* 01/02/2013 DCS 135 tk handle coverage value Line records
* Mar 03, 2007 908 bwoodle initial creation
* Dec 03, 2008 chammack Camel refactor
* Sep 15, 2009 3027 njensen Patterns constants
* Sep 21, 2009 3072 bsteffen Fixed Decoding of Line Records
* Jan 02, 2013 DCS 135 tk handle coverage value Line records
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -86,7 +87,8 @@ public class CcfpDecoder extends AbstractDecoder {
private static final String SPACE = " ";
private static final PluginDataObject [] EMPTY_PDO = new PluginDataObject [0];
private static final PluginDataObject[] EMPTY_PDO = new PluginDataObject[0];
/**
* Constructor
*
@ -95,10 +97,11 @@ public class CcfpDecoder extends AbstractDecoder {
public CcfpDecoder() throws DecoderException {
}
public PluginDataObject[] decode(String msg, Headers headers) throws PluginException {
public PluginDataObject[] decode(String msg, Headers headers)
throws PluginException {
PluginDataObject[] data = null;
PluginDataObject [] data = null;
Calendar baseTime = null;
WMOHeader wmoHdr = new WMOHeader(msg.getBytes());
if (wmoHdr.isValid()) {
@ -106,7 +109,7 @@ public class CcfpDecoder extends AbstractDecoder {
} else {
baseTime = TimeTools.getSystemCalendar();
}
CcfpRecord record = new CcfpRecord();
record.setMessageData(msg);
CcfpLocation location = new CcfpLocation();
@ -116,18 +119,20 @@ public class CcfpDecoder extends AbstractDecoder {
try {
WKTReader wktReader = new WKTReader();
if (matcher.find()) {
Calendar start = TimeTools.getBaseCalendar(Integer
.parseInt(matcher.group(1)), Integer.parseInt(matcher
.group(2)), Integer.parseInt(matcher.group(3)));
start.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher
.group(4)));
Calendar valid = TimeTools.getBaseCalendar(Integer
.parseInt(matcher.group(5)), Integer.parseInt(matcher
.group(6)), Integer.parseInt(matcher.group(7)));
valid.set(Calendar.HOUR_OF_DAY, Integer.parseInt(matcher
.group(8)));
TimeRange range = new TimeRange(start.getTime(), valid
.getTime());
Calendar start = TimeTools.getBaseCalendar(
Integer.parseInt(matcher.group(1)),
Integer.parseInt(matcher.group(2)),
Integer.parseInt(matcher.group(3)));
start.set(Calendar.HOUR_OF_DAY,
Integer.parseInt(matcher.group(4)));
Calendar valid = TimeTools.getBaseCalendar(
Integer.parseInt(matcher.group(5)),
Integer.parseInt(matcher.group(6)),
Integer.parseInt(matcher.group(7)));
valid.set(Calendar.HOUR_OF_DAY,
Integer.parseInt(matcher.group(8)));
TimeRange range = new TimeRange(start.getTime(),
valid.getTime());
record.setDataTime(new DataTime(start.getTime().getTime(),
range));
record.setProducttype(matcher.group(9));
@ -147,8 +152,7 @@ public class CcfpDecoder extends AbstractDecoder {
record.setTops(Integer.parseInt(matcher.group(4)));
record.setSpeed(Integer.parseInt(matcher.group(5)));
record.setDirection(Integer.parseInt(matcher.group(6)));
location
.setBoxLat(Double.parseDouble(matcher.group(8)) * 0.1);
location.setBoxLat(Double.parseDouble(matcher.group(8)) * 0.1);
location.setBoxLong(Double.parseDouble(matcher.group(9))
* -0.1);
String templatlonpairs = matcher.group(7);
@ -157,8 +161,7 @@ public class CcfpDecoder extends AbstractDecoder {
wtk.append("POLYGON((");
if (matcher.find()) {
wtk.append(Double.toString(Integer.parseInt(matcher
.group(2))
* -0.1));
.group(2)) * -0.1));
wtk.append(SPACE);
wtk.append(Double.toString(Integer.parseInt(matcher
.group(1)) * 0.1));
@ -167,8 +170,7 @@ public class CcfpDecoder extends AbstractDecoder {
wtk.append(COMMA);
wtk.append(SPACE);
wtk.append(Double.toString(Integer.parseInt(matcher
.group(2))
* -0.1));
.group(2)) * -0.1));
wtk.append(SPACE);
wtk.append(Double.toString(Integer.parseInt(matcher
.group(1)) * 0.1));
@ -180,30 +182,30 @@ public class CcfpDecoder extends AbstractDecoder {
} else if (record.getProducttype().equals("LINE")) {
matcher = LINE_PATTERN.matcher(msg);
if (matcher.find()) {
record.setCoverage(Integer.parseInt(matcher.group(1))); // change to group 1
// change to group 1
record.setCoverage(Integer.parseInt(matcher.group(1)));
record.setConf(null);
record.setGrowth(null);
record.setTops(null);
record.setSpeed(null);
record.setDirection(null);
String templatlonpairs = matcher.group(2); // change to group 2
// change to group 2
String templatlonpairs = matcher.group(2);
matcher = PAIR_PATTERN.matcher(templatlonpairs);
StringBuffer wtk = new StringBuffer();
wtk.append("LINESTRING(");
if (matcher.find()) {
Double lon = Integer.parseInt(matcher
.group(2)) * -0.1;
Double lon = Integer.parseInt(matcher.group(2)) * -0.1;
String lonStr = Double.toString(lon);
Double lat = Integer.parseInt(matcher
.group(1)) * 0.1;
Double lat = Integer.parseInt(matcher.group(1)) * 0.1;
String latStr = Double.toString(lat);
location.setBoxLong(lon);
location.setBoxLat(lat);
wtk.append(lonStr);
wtk.append(SPACE);
wtk.append(latStr);
@ -212,8 +214,7 @@ public class CcfpDecoder extends AbstractDecoder {
wtk.append(COMMA);
wtk.append(SPACE);
wtk.append(Double.toString(Integer.parseInt(matcher
.group(2))
* -0.1));
.group(2)) * -0.1));
wtk.append(SPACE);
wtk.append(Double.toString(Integer.parseInt(matcher
.group(1)) * 0.1));
@ -228,8 +229,7 @@ public class CcfpDecoder extends AbstractDecoder {
logger.error("Unable to decode CCFP", e);
}
data = EMPTY_PDO;
if(record != null) {
record.setPluginName(PLUGIN_NAME);
if (record != null) {
try {
record.constructDataURI();
record.setInsertTime(baseTime);

View file

@ -51,13 +51,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 03/03/2007 908 bwoodle initial creation
* 09/15/2009 3027 njensen Use dates for times
* 09/21/2009 3072 bsteffen Removed times because they are stored in DataTime
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Mar 03, 2007 908 bwoodle initial creation
* Sep 15, 2009 3027 njensen Use dates for times
* Sep 21, 2009 3072 bsteffen Removed times because they are stored in
* DataTime
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
*
* </pre>
@ -72,12 +75,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "ccfp",
indexes = {
@Index(name = "ccfp_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "ccfp", indexes = { @Index(name = "ccfp_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -299,4 +298,9 @@ public class CcfpRecord extends PluginDataObject implements ISpatialEnabled {
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "ccfp";
}
}

View file

@ -48,15 +48,17 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 03/20/13 #1774 randerso Refactored out of GFEDao
* 04/04/13 #1787 randerso Fixed to support changes to D2D grid location
* Additional cleanup to move the D2D to GFE translation
* logic into D2DGridDatabase.
* 05/03/13 #1974 randerso Changed queryByParmId to look for parm with duration
* suffix first.
* 05/22/13 #1974 randerso Fix bug introduced by the previous fix where query for
* T (T%hr) returned TP6hr
* 06/13/13 #2044 randerso Cleaned up JavaDoc
* Mar 20, 2013 1774 randerso Refactored out of GFEDao
* Apr 04, 2013 1787 randerso Fixed to support changes to D2D grid
* location Additional cleanup to move the
* D2D to GFE translation logic into
* D2DGridDatabase.
* May 03, 2013 1974 randerso Changed queryByParmId to look for parm
* with duration suffix first.
* May 22, 2013 1974 randerso Fix bug introduced by the previous fix
* where query for T (T%hr) returned TP6hr
* Jun 13, 2013 2044 randerso Cleaned up JavaDoc
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -141,7 +143,6 @@ public class GFED2DDao extends GridDao {
GridRecord retVal = (GridRecord) s.get(GridRecord.class,
rawTimes.get(forecastTime));
retVal.setPluginName(GridConstants.GRID);
return retVal;
} finally {

View file

@ -61,6 +61,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* Apr 14, 2008 1077 jkorman Initial implementation.
* Nov 25, 2008 1684 chammack Camel Refactor
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -74,7 +75,7 @@ public class GOESSoundingDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "goessounding";
/** The logger */
private Log logger = LogFactory.getLog(getClass());
private final Log logger = LogFactory.getLog(getClass());
private PointDataDescription pdd;
@ -131,7 +132,7 @@ public class GOESSoundingDecoder extends AbstractDecoder implements
PluginDataObject[] decodedData = null;
if (input != null && input.getDocumentData().length > 0) {
if ((input != null) && (input.getDocumentData().length > 0)) {
WMOHeader wmoHeader = input.getWmoHeader();
@ -153,7 +154,6 @@ public class GOESSoundingDecoder extends AbstractDecoder implements
container, this.pdd, dao);
if (soundingData != null) {
soundingData.setTraceId(traceId);
soundingData.setPluginName(PLUGIN_NAME);
PointDataView pdv = soundingData.getPointDataView();
pdv.setString("wmoHeader",
soundingData.getWmoHeader());

View file

@ -92,8 +92,10 @@ import com.raytheon.uf.common.util.mapping.MultipleMappingException;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 3/11/10 4758 bphillip Initial Creation
* Feb 15, 2013 1638 mschenke Moved array based utilities from Util into ArraysUtil
* Mar 11, 2010 4758 bphillip Initial Creation
* Feb 15, 2013 1638 mschenke Moved array based utilities from Util
* into ArraysUtil
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -236,7 +238,7 @@ public class Grib1Decoder extends AbstractDecoder {
.getGrib2Parameter(centerAlias, subcenterAlias, tableAlias,
pdsVars.getParameterNumber());
if (parameter == null || parameter.getName().equals(MISSING)) {
if ((parameter == null) || parameter.getName().equals(MISSING)) {
try {
logger.warn("Unable to map Grib 1 parameter to equivalent Grib 2 parameter for center ["
+ centerid
@ -294,7 +296,7 @@ public class Grib1Decoder extends AbstractDecoder {
// unidata does not handle isEnsemble call when
// octet size is less than 40.
if (pdsVars.getLength() > 40 && pdsVars.isEnsemble()) {
if ((pdsVars.getLength() > 40) && pdsVars.isEnsemble()) {
// rcg: added code to get perturbation
int pos42 = pdsVars.getOctet(42);
int pos43 = pdsVars.getOctet(43);
@ -363,13 +365,13 @@ public class Grib1Decoder extends AbstractDecoder {
int timeRange = pdsVars.getTimeRangeIndicator();
// Check for initialization of average or accumulation parameters
if ((AVG_ACCUM_LIST.contains(timeRange) && dataTime
.getValidPeriod().getDuration() == 0)) {
if ((AVG_ACCUM_LIST.contains(timeRange) && (dataTime
.getValidPeriod().getDuration() == 0))) {
statusHandler.handle(Priority.EVENTA,
"Discarding empty accumulation grid");
return null;
} else if ((gdsVars != null && gdsVars.isThin())
|| (gdsVars == null && (gridCoverage instanceof LatLonGridCoverage && ((LatLonGridCoverage) gridCoverage)
} else if (((gdsVars != null) && gdsVars.isThin())
|| ((gdsVars == null) && ((gridCoverage instanceof LatLonGridCoverage) && ((LatLonGridCoverage) gridCoverage)
.isThin()))) {
// Unfortunately the UCAR Decoder does Cubic Spline
// interpolation, however we want to do simpler linear
@ -468,7 +470,7 @@ public class Grib1Decoder extends AbstractDecoder {
if (newAbbr == null) {
if (!parameterName.equals(MISSING)
&& dataTime.getValidPeriod().getDuration() > 0) {
&& (dataTime.getValidPeriod().getDuration() > 0)) {
parameterAbbreviation = parameterAbbreviation
+ String.valueOf(dataTime.getValidPeriod()
.getDuration() / 3600000) + "hr";
@ -485,7 +487,6 @@ public class Grib1Decoder extends AbstractDecoder {
parameterAbbreviation = e.getArbitraryMapping();
}
retVal.setPluginName("grid");
Parameter param = new Parameter(parameterAbbreviation, parameterName,
parameterUnit);
GribParamTranslator.getInstance().getParameterNameAlias(modelName,
@ -530,7 +531,7 @@ public class Grib1Decoder extends AbstractDecoder {
for (int row = 0; row < rowCount; row++) {
for (int column = 0; column < columnCount; column++) {
newGrid[row][column] = data[row * columnCount + column];
newGrid[row][column] = data[(row * columnCount) + column];
}
}
@ -569,8 +570,8 @@ public class Grib1Decoder extends AbstractDecoder {
total -= 1;
trail = inData[inIndex++];
}
outData[outIndex++] = inData[inIndex] * total + trail
* (1 - total);
outData[outIndex++] = (inData[inIndex] * total)
+ (trail * (1 - total));
total += dx;
}
outData[outIndex++] = inData[inIndex++];
@ -594,7 +595,7 @@ public class Grib1Decoder extends AbstractDecoder {
for (int row = 0; row < rowCount; row++) {
for (int column = 0; column < columnCount; column++) {
newGrid[row * columnCount + column] = data[row][column];
newGrid[(row * columnCount) + column] = data[row][column];
}
}
return newGrid;
@ -663,7 +664,7 @@ public class Grib1Decoder extends AbstractDecoder {
private void correctForScanMode(float[] data, int nx, int ny,
boolean bmsExists, int scanMode) {
for (int i = 0; i < data.length; i++) {
if (bmsExists && data[i] == -9999) {
if (bmsExists && (data[i] == -9999)) {
data[i] = -999999;
}
}
@ -884,7 +885,7 @@ public class Grib1Decoder extends AbstractDecoder {
GridCoverage grid = GribSpatialCache.getInstance().getGrid(coverage);
if (grid == null && gridNumber != 255) {
if ((grid == null) && (gridNumber != 255)) {
// 255 is specifically reserved to non-defined grids and should not
// use the gridNumber as a lookup value
@ -929,7 +930,7 @@ public class Grib1Decoder extends AbstractDecoder {
int subcenterId, int process, GridCoverage grid) {
GridModel gridModel = GribModelLookup.getInstance().getModel(centerId,
subcenterId, grid, process);
if (gridModel != null && gridModel.getAnalysisOnly()) {
if ((gridModel != null) && gridModel.getAnalysisOnly()) {
time.getUtilityFlags().remove(FLAG.FCST_USED);
}
}
@ -1175,7 +1176,7 @@ public class Grib1Decoder extends AbstractDecoder {
level1Value = lval1;
break;
default:
if (ltype1 > 99 && ltype1 < 200) {
if ((ltype1 > 99) && (ltype1 < 200)) {
level1Type = 255;
logger.warn("GRIB1 level " + ltype1 + " not recognized");
}
@ -1234,7 +1235,7 @@ public class Grib1Decoder extends AbstractDecoder {
}
// Scale the level one value if necessary
if (scaleFactor1 == 0 || value1 == 0) {
if ((scaleFactor1 == 0) || (value1 == 0)) {
levelOneValue = value1;
} else {
levelOneValue = new Double((float) (value1 * Math.pow(10,
@ -1249,13 +1250,13 @@ public class Grib1Decoder extends AbstractDecoder {
} else if (levelTwoNumber == 1) {
levelTwoValue = Level.getInvalidLevelValue();
} else {
if (scaleFactor2 == 0 || value2 == 0) {
if ((scaleFactor2 == 0) || (value2 == 0)) {
levelTwoValue = value2;
} else {
levelTwoValue = (value2 * Math.pow(10, scaleFactor2 * -1));
}
}
if (levelName.equals("SFC") && levelOneValue != 0) {
if (levelName.equals("SFC") && (levelOneValue != 0)) {
levelOneValue = 0.0;
}
if (levelName.equals("EATM")) {
@ -1289,7 +1290,7 @@ public class Grib1Decoder extends AbstractDecoder {
}
if (lon >= 180) {
lon = (180 - lon % 180) * -1;
lon = (180 - (lon % 180)) * -1;
} else if (lon < -180) {
lon = (180 - (-lon % 180));
}
@ -1313,7 +1314,7 @@ public class Grib1Decoder extends AbstractDecoder {
}
if (lat > 90) {
lat = 90 - lat % 90;
lat = 90 - (lat % 90);
} else if (lat < -90) {
lat = (90 - (-lat % 90)) * -1;
}

View file

@ -35,7 +35,8 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 4, 2012 bsteffen Initial creation
* May 04, 2012 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -62,10 +63,9 @@ public class GridToGribConverter {
GridRecord grid = records[i];
GribRecord grib = new GribRecord();
GribModel model = new GribModel();
grib.setPluginName("grib");
grib.setDataTime(grid.getDataTime());
model.setModelName(grid.getDatasetId());
if (grid.getSecondaryId() != null
if ((grid.getSecondaryId() != null)
&& grid.getSecondaryId().startsWith("Version")) {
grib.setGridVersion(Integer.parseInt(grid.getSecondaryId()
.replace("Version", "")));
@ -108,31 +108,31 @@ public class GridToGribConverter {
model.setTypeEnsemble(3);
}
Object centerid = grid.getExtraAttribute("centerid");
if (centerid != null && centerid instanceof Integer) {
if ((centerid != null) && (centerid instanceof Integer)) {
model.setCenterid((Integer) centerid);
}
Object subcenterid = grid.getExtraAttribute("subcenterid");
if (subcenterid != null && subcenterid instanceof Integer) {
if ((subcenterid != null) && (subcenterid instanceof Integer)) {
model.setSubcenterid((Integer) subcenterid);
}
Object genprocess = grid.getExtraAttribute("genprocess");
if (genprocess != null && genprocess instanceof Integer) {
if ((genprocess != null) && (genprocess instanceof Integer)) {
model.setGenprocess((Integer) genprocess);
}
Object backGenprocess = grid.getExtraAttribute("backGenprocess");
if (backGenprocess != null && backGenprocess instanceof Integer) {
if ((backGenprocess != null) && (backGenprocess instanceof Integer)) {
model.setBackGenprocess((Integer) backGenprocess);
}
Object pdsTemplate = grid.getExtraAttribute("pdsTemplate");
if (pdsTemplate != null && pdsTemplate instanceof Integer) {
if ((pdsTemplate != null) && (pdsTemplate instanceof Integer)) {
model.setPdsTemplate((Integer) pdsTemplate);
}
Object gridid = grid.getExtraAttribute("gridid");
if (gridid != null && gridid instanceof String) {
if ((gridid != null) && (gridid instanceof String)) {
model.setGridid((String) gridid);
}
Object numForecasts = grid.getExtraAttribute("numForecasts");
if (numForecasts != null && numForecasts instanceof Integer) {
if ((numForecasts != null) && (numForecasts instanceof Integer)) {
model.setNumForecasts((Integer) numForecasts);
}
model.setLevel(grid.getLevel());

View file

@ -24,7 +24,6 @@ import java.util.Calendar;
import com.raytheon.edex.plugin.grib.exception.GribException;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
@ -51,7 +50,8 @@ import com.raytheon.uf.common.time.DataTime;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 03/09/11 4243 porricel Initial Creation
* Mar 09, 2011 4243 porricel Initial Creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -84,7 +84,6 @@ public class CPCoutlookGribPostProcessor implements IDecoderPostProcessor {
record.setDataURI(null);
try {
record.setPluginName(GridConstants.GRID);
record.constructDataURI();
} catch (PluginException e) {
statusHandler.handle(Priority.PROBLEM,

View file

@ -70,10 +70,11 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/09/10 4638 bphillip Initial Creation
* Apr 09, 2010 4638 bphillip Initial Creation
* Mar 14, 2013 1794 djohnson FileUtil.listFiles now returns List.
* Mar 27, 2013 1821 bsteffen Reduce db and pypies requests in grid
* assembler.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -232,7 +233,6 @@ public class EnsembleGridAssembler implements IDecoderPostProcessor {
newRecord.setEnsembleId(record.getEnsembleId());
newRecord.setDataTime(record.getDataTime());
newRecord.setDataURI(null);
newRecord.setPluginName(GridConstants.GRID);
newRecord.setInsertTime(Calendar.getInstance());
try {
newRecord.constructDataURI();
@ -320,7 +320,7 @@ public class EnsembleGridAssembler implements IDecoderPostProcessor {
} else {
Util.insertSubgrid(assembledData, Util.resizeDataTo2D(
(float[]) record.getMessageData(), coverage.getNx(),
coverage.getNy()), nx * modIndex - modIndex, 0, nx, ny);
coverage.getNy()), (nx * modIndex) - modIndex, 0, nx, ny);
}
assembledRecord.setMessageData(Util.resizeDataTo1D(assembledData,

View file

@ -53,6 +53,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 25, 2011 rgeorge Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -69,7 +70,7 @@ public class GFSProcessor extends SixHrPrecipGridProcessor {
public GridRecord[] process(GridRecord record) throws GribException {
// Post process the data if this is a Total Precipitation grid
if (record.getParameter().getAbbreviation().equals("TP12hr")
&& record.getDataTime().getFcstTime() / 3600 > 180) {
&& ((record.getDataTime().getFcstTime() / 3600) > 180)) {
return super.process(record);
}
return new GridRecord[] { record };
@ -86,6 +87,7 @@ public class GFSProcessor extends SixHrPrecipGridProcessor {
* @return The generated 6-hr precipitation grids
* @throws GribException
*/
@Override
protected synchronized GridRecord[] generate6hrPrecipGrids(GridRecord record)
throws GribException {
List<GridRecord> generated6hrPrecips = new ArrayList<GridRecord>();
@ -111,11 +113,11 @@ public class GFSProcessor extends SixHrPrecipGridProcessor {
Collections.sort(precipInventory, comparator);
// loop through set, find twelve hour gaps and create new 6hr records.
for (int i = 0; i < precipInventory.size() - 1; i++) {
for (int i = 0; i < (precipInventory.size() - 1); i++) {
GridRecord sequence1Record = precipInventory.get(i);
GridRecord sequence2Record = precipInventory.get(i + 1);
if (sequence1Record.getDataTime().getFcstTime() == sequence2Record
.getDataTime().getFcstTime() - SECONDS_IN_12_HRS) {
if (sequence1Record.getDataTime().getFcstTime() == (sequence2Record
.getDataTime().getFcstTime() - SECONDS_IN_12_HRS)) {
// we have a 12Hr gap
generated6hrPrecips.add(calculate6hrPrecip(sequence1Record,
sequence2Record));
@ -226,7 +228,6 @@ public class GFSProcessor extends SixHrPrecipGridProcessor {
record.setDataTime(newDataTime);
record.setDataURI(null);
try {
record.setPluginName(GridConstants.GRID);
record.constructDataURI();
} catch (PluginException e) {
statusHandler.handle(Priority.PROBLEM,

View file

@ -47,7 +47,8 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 17, 2011 bphillip Initial creation
* Nov 17, 2011 bphillip Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -169,14 +170,14 @@ public class Nam80PostProcessor implements IDecoderPostProcessor {
float[] newData = null;
float[] tp6Data = null;
if (tp12HrRecord.getMessageData() == null) {
newData = (float[]) ((FloatDataRecord) dao.getHDF5Data(
tp12HrRecord, -1)[0]).getFloatData();
newData = ((FloatDataRecord) dao.getHDF5Data(tp12HrRecord, -1)[0])
.getFloatData();
} else {
newData = (float[]) tp12HrRecord.getMessageData();
}
if (tp6HrRecord.getMessageData() == null) {
tp6Data = (float[]) ((FloatDataRecord) dao.getHDF5Data(
tp6HrRecord, -1)[0]).getFloatData();
tp6Data = ((FloatDataRecord) dao.getHDF5Data(tp6HrRecord, -1)[0])
.getFloatData();
} else {
tp6Data = (float[]) tp6HrRecord.getMessageData();
}
@ -197,7 +198,7 @@ public class Nam80PostProcessor implements IDecoderPostProcessor {
Calendar refTime = tp12HrRecord.getDataTime().getRefTimeAsCalendar();
Date start = new Date(tp12HrRecord.getDataTime().getValidPeriod()
.getEnd().getTime()
- SECONDS_IN_6_HRS * 1000);
- (SECONDS_IN_6_HRS * 1000));
DataTime newDataTime = new DataTime(refTime, tp12HrRecord.getDataTime()
.getFcstTime(), new TimeRange(start, tp12HrRecord.getDataTime()
@ -208,7 +209,6 @@ public class Nam80PostProcessor implements IDecoderPostProcessor {
newRecord.getInfo().setId(null);
newRecord.setDataURI(null);
try {
newRecord.setPluginName(GridConstants.GRID);
newRecord.constructDataURI();
} catch (PluginException e) {
throw new GribException("Error constructing dataURI!", e);

View file

@ -26,7 +26,6 @@ import java.util.List;
import com.raytheon.edex.plugin.grib.exception.GribException;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.parameter.Parameter;
@ -48,6 +47,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 25, 2011 rgeorge Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -107,8 +107,7 @@ public abstract class SixHrPrecipGridProcessor implements IDecoderPostProcessor
// previous grid
else {
for (GridRecord rec : precipInventory) {
if (rec.getDataTime().getFcstTime() == currentFcstTime
- SECONDS_IN_6_HRS) {
if (rec.getDataTime().getFcstTime() == (currentFcstTime - SECONDS_IN_6_HRS)) {
tp6hrRecords.add(calculate6hrPrecip(rec, record));
}
}
@ -218,7 +217,6 @@ public abstract class SixHrPrecipGridProcessor implements IDecoderPostProcessor
record.setDataTime(newDataTime);
record.setDataURI(null);
try {
record.setPluginName(GridConstants.GRID);
record.constructDataURI();
} catch (PluginException e) {
statusHandler.handle(Priority.PROBLEM,

View file

@ -26,7 +26,6 @@ import java.util.List;
import com.raytheon.edex.plugin.grib.exception.GribException;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.parameter.Parameter;
@ -47,7 +46,8 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 24, 2012 DR 14299 M. Porricelli Initial creation
* Jan 24, 2012 14299 M. Porricelli Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -108,8 +108,7 @@ public abstract class ThreeHrPrecipGridProcessor implements
// previous grid
else {
for (GridRecord rec : precipInventory) {
if (rec.getDataTime().getFcstTime() == currentFcstTime
- SECONDS_IN_3_HRS) {
if (rec.getDataTime().getFcstTime() == (currentFcstTime - SECONDS_IN_3_HRS)) {
tp3hrRecords.add(calculate3hrPrecip(rec, record));
}
}
@ -220,7 +219,6 @@ public abstract class ThreeHrPrecipGridProcessor implements
record.setDataTime(newDataTime);
record.setDataURI(null);
try {
record.setPluginName(GridConstants.GRID);
record.constructDataURI();
} catch (PluginException e) {
statusHandler.handle(Priority.PROBLEM,

View file

@ -2,9 +2,6 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="hydroPluginName" class="java.lang.String">
<constructor-arg type="java.lang.String" value="ldadhydro" />
</bean>
<bean id="hydroProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" value="ldadhydro" />
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.ldadhydro" />
@ -12,12 +9,8 @@
<property name="record" value="com.raytheon.uf.common.dataplugin.ldadhydro.HydroLdadRecord" />
</bean>
<bean id="hydroDecoder" class="com.raytheon.edex.plugin.ldadhydro.dao.HydroDecoder">
<constructor-arg ref="hydroPluginName" />
</bean>
<bean factory-bean="pluginRegistry" factory-method="register">
<constructor-arg ref="hydroPluginName" />
<constructor-arg value="ldadhydro" />
<constructor-arg ref="hydroProperties" />
</bean>
</beans>

View file

@ -4,9 +4,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="hydroDecoder" class="com.raytheon.edex.plugin.ldadhydro.dao.HydroDecoder">
<constructor-arg ref="hydroPluginName" />
</bean>
<bean id="hydroDecoder" class="com.raytheon.edex.plugin.ldadhydro.dao.HydroDecoder"/>
<bean id="hydroDatabase" class="java.lang.String">
<constructor-arg type="java.lang.String" value="metadata" />

View file

@ -64,9 +64,10 @@ import com.raytheon.uf.common.time.DataTime;
*
* SOFTWARE HISTORY
*
* ate Ticket# Engineer Description
* ----------- ---------- ----------- --------------------------
* 9/30/09 vkorolev Initial creation
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 30, 2009 vkorolev Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author vkorolev
@ -75,8 +76,6 @@ import com.raytheon.uf.common.time.DataTime;
public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
private final String PLUGIN_NAME;
private String traceId = null;
public SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd HH:mm:ss");
@ -85,10 +84,6 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
public Properties configFile = new Properties();
public HydroDecoder(String pluginName) throws DecoderException {
PLUGIN_NAME = pluginName;
}
public void setTraceId(String id) {
traceId = id;
}
@ -152,7 +147,6 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
HydroLdadRecord record = new HydroLdadRecord();
SurfaceObsLocation location = new SurfaceObsLocation();
record.setDataProvider(dd.provider);
record.setPluginName(PLUGIN_NAME);
record.setStationType(dd.type);
record.setReportTime(dd.reportTime);
// Loop through fields
@ -311,8 +305,7 @@ public class HydroDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
Class cls = record.getClass();
Field fieldlist[] = cls.getDeclaredFields();
for (int i = 0; i < fieldlist.length; i++) {
Field fld = fieldlist[i];
for (Field fld : fieldlist) {
System.out.println("name = " + fld.getName());
// System.out.println("decl class = " +
// fld.getDeclaringClass());

View file

@ -2,9 +2,6 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="manualPluginName" class="java.lang.String">
<constructor-arg type="java.lang.String" value="ldadmanual" />
</bean>
<bean id="manualProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" value="ldadmanual" />
<property name="pluginFQN" value="com.raytheon.edex.plugin.ldadmanual" />
@ -12,9 +9,6 @@
<property name="record" value="com.raytheon.edex.plugin.ldadmanual.dao.ManualLdadRecord" />
</bean>
<bean id="manualDecoder" class="com.raytheon.edex.plugin.ldadmanual.dao.ManualDecoder">
<constructor-arg ref="manualPluginName" />
</bean>
<bean factory-bean="pluginRegistry" factory-method="register">
<constructor-arg value="ldadmanual" />
<constructor-arg ref="manualProperties" />

View file

@ -4,9 +4,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="manualDecoder" class="com.raytheon.edex.plugin.ldadmanual.dao.ManualDecoder">
<constructor-arg ref="manualPluginName" />
</bean>
<bean id="manualDecoder" class="com.raytheon.edex.plugin.ldadmanual.dao.ManualDecoder"/>
<bean id="manualDatabase" class="java.lang.String">
<constructor-arg type="java.lang.String" value="metadata" />
</bean>

View file

@ -27,7 +27,6 @@ import java.io.StringReader;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -63,9 +62,10 @@ import com.raytheon.uf.common.time.DataTime;
*
* SOFTWARE HISTORY
*
* ate Ticket# Engineer Description
* ----------- ---------- ----------- --------------------------
* 9/30/09 vkorolev Initial creation
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 30, 2009 vkorolev Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author vkorolev
@ -73,9 +73,6 @@ import com.raytheon.uf.common.time.DataTime;
*/
public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder {
private final String PLUGIN_NAME;
private String traceId = null;
public SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd HH:mm:ss");
@ -84,10 +81,6 @@ public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder
public Properties configFile = new Properties();
public ManualDecoder(String pluginName) throws DecoderException {
PLUGIN_NAME = pluginName;
}
public void setTraceId(String id) {
traceId = id;
}
@ -151,7 +144,6 @@ public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder
ManualLdadRecord record = new ManualLdadRecord();
SurfaceObsLocation location = new SurfaceObsLocation();
record.setProviderId(dd.provider);
record.setPluginName(PLUGIN_NAME);
// record.setReportType???(dd.type));
// record.set???(dd.reportTime);
// Loop through fields
@ -241,14 +233,13 @@ public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder
* @throws ClassNotFoundException
* @throws Throwable
*/
@SuppressWarnings("unchecked")
public void setProperty(String name, Object obj, String value, String vunit) {
String prop = Character.toUpperCase(name.charAt(0)) + name.substring(1);
String mname = "set" + prop;
Object val = null;
try {
@SuppressWarnings("rawtypes")
Class cls = obj.getClass();
Field fld = cls.getDeclaredField(name);
Class<?> clazz = fld.getType();
@ -301,27 +292,4 @@ public class ManualDecoder<E> extends AbstractDecoder implements IBinaryDecoder
}
return;
}
// List of Fields in record
@SuppressWarnings("unchecked")
public static void main(String args[]) {
ManualLdadRecord record = new ManualLdadRecord();
try {
Class cls = record.getClass();
Field fieldlist[] = cls.getDeclaredFields();
for (int i = 0; i < fieldlist.length; i++) {
Field fld = fieldlist[i];
System.out.println("name = " + fld.getName());
// System.out.println("decl class = " +
// fld.getDeclaringClass());
System.out.println("type = " + fld.getType());
int mod = fld.getModifiers();
System.out.println("modifiers = " + Modifier.toString(mod));
System.out.println("-----");
}
} catch (Throwable e) {
System.err.println(e);
}
}
}

View file

@ -68,11 +68,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ----------- ---------- ----------- --------------------------
* 10/07/09 vkorolev Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Oct 07, 2009 vkorolev Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -87,309 +89,305 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "ldadprofiler",
indexes = {
@Index(name = "ldadprofiler_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "ldadprofiler", indexes = { @Index(name = "ldadprofiler_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class ProfilerLdadObs extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
public static final String PLUGIN_NAME = "ldadprofiler";
public static final String PLUGIN_NAME = "ldadprofiler";
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
static {
PARM_MAP.put("NLAT", STA_LAT);
PARM_MAP.put("NLON", STA_LON);
PARM_MAP.put("WS", SFC_WNDSPD);
PARM_MAP.put("WD", SFC_WNDDIR);
}
static {
PARM_MAP.put("NLAT", STA_LAT);
PARM_MAP.put("NLON", STA_LON);
PARM_MAP.put("WS", SFC_WNDSPD);
PARM_MAP.put("WD", SFC_WNDDIR);
}
private static final String PRESS = "PRESS";
private static final String PRESS = "PRESS";
private static final String AGL = "AGL";
private static final String AGL = "AGL";
public static final String PRESS_PARAM_PTRN = ".*:" + PRESS + "=\\d{2,4}";
public static final String PRESS_PARAM_PTRN = ".*:" + PRESS + "=\\d{2,4}";
public static final String AGL_PARAM_PTRN = ".*:" + AGL + "=\\d{2,4}";
public static final String AGL_PARAM_PTRN = ".*:" + AGL + "=\\d{2,4}";
@Transient
private String parameterName = null;
@Transient
private String parameterName = null;
@DataURI(position = 1)
@XmlAttribute
@DynamicSerializeElement
private Integer reportType;
@DataURI(position = 1)
@XmlAttribute
@DynamicSerializeElement
private Integer reportType;
// Location
@Embedded
@DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location; // latitude, longitude, elevation,
// Location
@Embedded
@DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location; // latitude, longitude, elevation,
// stationId
// stationId
// Base time in Epoch "seconds since 1970-01-01 00:00:00 UTC"
@Column
@DynamicSerializeElement
@XmlElement
int base_time;
// Base time in Epoch "seconds since 1970-01-01 00:00:00 UTC"
@Column
@DynamicSerializeElement
@XmlElement
int base_time;
// Consensus start time offset from base_time
// "seconds since 2009/10/07 00:00:00 UTC"
@Column
@DynamicSerializeElement
@XmlElement
double start_time_offset;
// Consensus start time offset from base_time
// "seconds since 2009/10/07 00:00:00 UTC"
@Column
@DynamicSerializeElement
@XmlElement
double start_time_offset;
// Consensus end time offset from base_time
// "seconds since 2009/10/07 00:00:00 UTC"
@Column
@DynamicSerializeElement
@XmlElement
double end_time_offset;
// Consensus end time offset from base_time
// "seconds since 2009/10/07 00:00:00 UTC"
@Column
@DynamicSerializeElement
@XmlElement
double end_time_offset;
// nhts Number of heights?
@Column
@DynamicSerializeElement
@XmlElement
int nhts;
// nhts Number of heights?
@Column
@DynamicSerializeElement
@XmlElement
int nhts;
// the level data
@XmlElement
@DynamicSerializeElement
@Transient
private List<ProfilerLdadLevel> levels;
// the level data
@XmlElement
@DynamicSerializeElement
@Transient
private List<ProfilerLdadLevel> levels;
// The profiler observation time.
@Column
@XmlAttribute
@DynamicSerializeElement
private Calendar timeObs;
// The profiler observation time.
@Column
@XmlAttribute
@DynamicSerializeElement
private Calendar timeObs;
@Column
@XmlAttribute
@DynamicSerializeElement
private String stationName;
@Column
@XmlAttribute
@DynamicSerializeElement
private String stationName;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
/**
* @return the base_time
*/
public int getBase_time() {
return base_time;
}
/**
* @return the base_time
*/
public int getBase_time() {
return base_time;
}
/**
* @param base_time
* the base_time to set
*/
public void setBase_time(int base_time) {
this.base_time = base_time;
}
/**
* @param base_time
* the base_time to set
*/
public void setBase_time(int base_time) {
this.base_time = base_time;
}
public Calendar getTimeObs() {
return timeObs;
}
public Calendar getTimeObs() {
return timeObs;
}
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
/**
* @return the start_time_offset
*/
public double getStart_time_offset() {
return start_time_offset;
}
/**
* @return the start_time_offset
*/
public double getStart_time_offset() {
return start_time_offset;
}
/**
* @param start_time_offset
* the start_time_offset to set
*/
public void setStart_time_offset(double start_time_offset) {
this.start_time_offset = start_time_offset;
}
/**
* @param start_time_offset
* the start_time_offset to set
*/
public void setStart_time_offset(double start_time_offset) {
this.start_time_offset = start_time_offset;
}
/**
* @return the end_time_offset
*/
public double getEnd_time_offset() {
return end_time_offset;
}
/**
* @return the end_time_offset
*/
public double getEnd_time_offset() {
return end_time_offset;
}
/**
* @param end_time_offset
* the end_time_offset to set
*/
public void setEnd_time_offset(double end_time_offset) {
this.end_time_offset = end_time_offset;
}
/**
* @param end_time_offset
* the end_time_offset to set
*/
public void setEnd_time_offset(double end_time_offset) {
this.end_time_offset = end_time_offset;
}
/**
* @return the nhts
*/
public int getNhts() {
return nhts;
}
/**
* @return the nhts
*/
public int getNhts() {
return nhts;
}
/**
* @param nhts
* the nhts to set
*/
public void setNhts(int nhts) {
this.nhts = nhts;
}
/**
* @param nhts
* the nhts to set
*/
public void setNhts(int nhts) {
this.nhts = nhts;
}
/**
* @return the levels
*/
public List<ProfilerLdadLevel> getLevels() {
return levels;
}
/**
* @return the levels
*/
public List<ProfilerLdadLevel> getLevels() {
return levels;
}
/**
* @param levels
* the levels to set
*/
public void setLevels(List<ProfilerLdadLevel> levels) {
this.levels = levels;
}
/**
* @param levels
* the levels to set
*/
public void setLevels(List<ProfilerLdadLevel> levels) {
this.levels = levels;
}
/**
* @return the pointDataView
*/
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
/**
* @return the pointDataView
*/
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
public ProfilerLdadObs() {
}
public ProfilerLdadObs() {
}
/**
* @param pointDataView
* the pointDataView to set
*/
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
/**
* @param pointDataView
* the pointDataView to set
*/
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
// ----------------------------------------------------
// ----------------------------------------------------
@Override
public IDecoderGettable getDecoderGettable() {
// TODO Auto-generated method stub
return null;
}
@Override
public IDecoderGettable getDecoderGettable() {
// TODO Auto-generated method stub
return null;
}
@Override
public ISpatialObject getSpatialObject() {
// TODO Auto-generated method stub
return null;
}
@Override
public ISpatialObject getSpatialObject() {
// TODO Auto-generated method stub
return null;
}
@Override
public String getString(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public String getString(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public String[] getStrings(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public String[] getStrings(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public Amount getValue(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public Amount getValue(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
// TODO Auto-generated method stub
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
// TODO Auto-generated method stub
return null;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @param stationName
* the stationName to set
*/
public void setStationName(String stationName) {
this.stationName = stationName;
}
/**
* @param stationName
* the stationName to set
*/
public void setStationName(String stationName) {
this.stationName = stationName;
}
/**
* @return the stationName
*/
public String getStationName() {
return stationName;
}
/**
* @return the stationName
*/
public String getStationName() {
return stationName;
}
/**
* @param parameterName
* the parameterName to set
*/
public void setParameterName(String parameterName) {
this.parameterName = parameterName;
}
/**
* @param parameterName
* the parameterName to set
*/
public void setParameterName(String parameterName) {
this.parameterName = parameterName;
}
/**
* @return the parameterName
*/
public String getParameterName() {
return parameterName;
}
/**
* @return the parameterName
*/
public String getParameterName() {
return parameterName;
}
/**
* @param reportType
* the reportType to set
*/
public void setReportType(Integer reportType) {
this.reportType = reportType;
}
/**
* @param reportType
* the reportType to set
*/
public void setReportType(Integer reportType) {
this.reportType = reportType;
}
/**
* @return the reportType
*/
public Integer getReportType() {
return reportType;
}
/**
* @return the reportType
*/
public Integer getReportType() {
return reportType;
}
@Override
@Column
@ -397,4 +395,9 @@ public class ProfilerLdadObs extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "ldadprofiler";
}
}

View file

@ -59,21 +59,24 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation.
* 20080408 1039 jkorman Added traceId for tracing data.
* 11/25/08 #1684 chammack Camel Refactor
* 04/29/13 #1861 bkowal Create a separate Point Data Container for
* every record so each forecast hour will
* receive a unique hdf5 file.
* 07/03/13 #2161 bkowal Store and retrieve the Point Data Containers
* by forecast hour and reftime when completing
* a decode operation. Overrode default
* Point Data Container size.
* 07/16/13 #2161 bkowal Store the records in a container that will
* be persisted every X (configurable) seconds
* by a timer. The timer is started during spring
* initialization and destroyed during spring
* container destruction.
* Mar 03, 2008 1026 jkorman Initial implementation.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Nov 25, 2008 1684 chammack Camel Refactor
* Apr 29, 2013 1861 bkowal Create a separate Point Data Container
* for every record so each forecast hour
* will receive a unique hdf5 file.
* Jul 03, 2013 2161 bkowal Store and retrieve the Point Data
* Containers by forecast hour and reftime
* when completing a decode operation.
* Overrode default Point Data Container
* size.
* Jul 16, 2013 2161 bkowal Store the records in a container that
* will be persisted every X (configurable)
* seconds by a timer. The timer is started
* during spring initialization and
* destroyed during spring container
* destruction.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -219,7 +222,6 @@ public class ModelSoundingDecoder extends AbstractDecoder implements
soundingTemporalData);
if (soundingData != null) {
soundingData.setTraceId(traceId);
soundingData.setPluginName(PLUGIN_NAME);
try {
soundingData.constructDataURI();
} catch (PluginException e) {

View file

@ -62,11 +62,13 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 1026 jkorman Initial implementation.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Mar 03, 2008 1026 jkorman Initial implementation.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -911,10 +913,16 @@ public class SoundingSite extends PersistablePluginDataObject implements
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "modelsounding";
}
}

View file

@ -7,7 +7,6 @@ Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serializ
Bundle-Vendor: RAYTHEON
Export-Package: com.raytheon.edex.plugin.obs,
com.raytheon.edex.plugin.obs.mesowest,
com.raytheon.edex.plugin.obs.mesowest.util,
com.raytheon.edex.plugin.obs.metar,
com.raytheon.edex.plugin.obs.metar.util,
com.raytheon.edex.uengine.tasks.obs

View file

@ -1 +0,0 @@
com.raytheon.edex.plugin.obs.mesowest.MesowestRecord

View file

@ -3,9 +3,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="obsDecoder" class="com.raytheon.edex.plugin.obs.ObsDecoder">
<constructor-arg ref="obsPluginName" />
</bean>
<bean id="obsDecoder" class="com.raytheon.edex.plugin.obs.ObsDecoder"/>
<bean id="metarPointData" class="com.raytheon.edex.plugin.obs.metar.MetarPointDataTransform"/>

View file

@ -20,30 +20,6 @@
package com.raytheon.edex.plugin.obs;
/**
* Decoder implementation for observation data types. This class provides a
* wrapper in order to select the correct decoder based on the data type
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ----------- ---------- ----------- --------------------------
* 4/27/07 199 bphillip Initial creation
* 07/31/2007 411 jkorman Added addition logging
* 08/10/2007 379 jkorman Added disposal behavior.
* 20071217 453 jkorman Added code to check for duplicate obs.
* 20080314 995 jkorman Changed setDecoderStrategy to check for
* empty data.
* 20080408 1039 jkorman Added traceId for tracing data.
* Mar 19, 2013 1785 bgonzale Added performance status handler and added
* status to decode.
* </pre>
*
* @author bphillip
* @version 1
*/
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -58,24 +34,40 @@ import com.raytheon.uf.common.time.util.ITimer;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.edex.wmo.message.WMOHeader;
/**
* Decoder implementation for observation data types. This class provides a
* wrapper in order to select the correct decoder based on the data type
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ----------- ---------- ----------- --------------------------
* Apr 27, 2007 199 bphillip Initial creation
* Jul 31, 2007 411 jkorman Added addition logging
* Aug 10, 2007 379 jkorman Added disposal behavior.
* Dec 17, 2007 453 jkorman Added code to check for duplicate obs.
* Mar 14, 2008 995 jkorman Changed setDecoderStrategy to check for
* empty data.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Mar 19, 2013 1785 bgonzale Added performance status handler and added
* status to decode.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author bphillip
* @version 1
*/
public class ObsDecoder extends AbstractDecoder {
/** The logger */
private Log logger = LogFactory.getLog(getClass());
private final String PLUGIN_NAME;
private final Log logger = LogFactory.getLog(getClass());
private final IPerformanceStatusHandler perfLog = PerformanceStatus
.getHandler("Obs:");
private String traceId = null;
/**
* Required empty constructor.
*/
public ObsDecoder(String pluginName) {
PLUGIN_NAME = pluginName;
}
/**
*
* @return A decoded data record.
@ -139,13 +131,13 @@ public class ObsDecoder extends AbstractDecoder {
if ('S' == header.getT1()) {
switch (header.getT2()) {
case 'A': {
decoder = new MetarDecoder(PLUGIN_NAME);
((MetarDecoder) decoder).setTraceId(traceId);
decoder = new MetarDecoder();
decoder.setTraceId(traceId);
break;
}
case 'P': {
decoder = new MetarDecoder(PLUGIN_NAME);
((MetarDecoder) decoder).setTraceId(traceId);
decoder = new MetarDecoder();
decoder.setTraceId(traceId);
break;
}
}

View file

@ -1,150 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.edex.plugin.obs.mesowest;
import java.text.DecimalFormat;
import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.edex.util.Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.decodertools.core.DecoderTools;
import com.raytheon.uf.edex.decodertools.time.TimeTools;
/**
* Decoder implementation for mesowest plugin
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 02/14/06 139 bphillip Initial creation
* 11/11/08 1684 chammack Refactored to camel interfaces
*
* </pre>
*
* @author bphillip
* @version 1
*/
public class MesowestDecoder extends AbstractDecoder {
private static final DecimalFormat DECIMALTENTHS = new DecimalFormat("#.#");
private static final DecimalFormat WHOLENUMBER = new DecimalFormat("#");
/**
* Constructor
*
* @throws DecoderException
*/
public MesowestDecoder() throws DecoderException {
}
/*
* (non-Javadoc)
*
* @see com.raytheon.edex.plugin.IBinaryDecoder#decode(byte[])
*/
public PluginDataObject[] decode(byte[] data, Headers headers)
throws DecoderException {
byte[] messageData = null;
String theMessage = new String(messageData);
MesowestRecord record = new MesowestRecord();
record.setMessageData(theMessage);
record.setPluginName("obs");
record.setReportType("MESOWEST");
record.setMessageData(theMessage);
String[] mwObs = theMessage.split(",");
try {
if (mwObs.length >= 7) {
record.setStationID(mwObs[1]);
String timeGroup = mwObs[6].substring(6, 8)
+ mwObs[6].substring(9, 13) + "Z";
String fileName = null;
if (headers != null) {
fileName = (String) headers
.get(DecoderTools.INGEST_FILE_NAME);
}
record.setTimeObs(TimeTools
.findCurrentTime(timeGroup, fileName));
record.setDataTime(new DataTime(Util
.findReferenceTime(timeGroup)));
record.setRefHour(Util.findReferenceHour(timeGroup));
}
// Only want the observations in columns 7 through 15
int mwArrayLength = mwObs.length < 17 ? mwObs.length : 17;
for (int i = 7; i < mwArrayLength; i++) {
if (i == 7 && mwObs[7].length() > 0) {
double temp = calculateCelsius(mwObs[7]);
record.setTemperature(Integer.parseInt(WHOLENUMBER
.format(temp)));
record.setTempFromTenths(Float.parseFloat(DECIMALTENTHS
.format(temp)));
} else if (i == 9 && mwObs[9].length() > 0) {
double wSpeed = Double.valueOf(mwObs[9].trim())
.doubleValue();
record.setWindSpeed(Integer.parseInt(WHOLENUMBER
.format(wSpeed)));
} else if (i == 10 && mwObs[10].length() > 0) {
double wGust = Double.valueOf(mwObs[10].trim())
.doubleValue();
record.setWindGust(Integer.parseInt(WHOLENUMBER
.format(wGust)));
} else if (i == 11 && mwObs[11].length() > 0) {
record.setWindDir(mwObs[11]);
} else if (i == 13 && mwObs[13].length() > 0) {
double dewp = calculateCelsius(mwObs[13]);
record.setDewPoint(Integer.parseInt(WHOLENUMBER
.format(dewp)));
record.setDewPointFromTenths(Float.parseFloat(DECIMALTENTHS
.format(dewp)));
} else if (i == 15 && mwObs[15].length() > 0) {
record.setSeaLevelPress(Float.parseFloat(mwObs[15]));
} else if (i == 16 && mwObs[16].length() > 0) {
record.setAltimeter(Float.parseFloat(mwObs[16]));
}
}
} catch (Exception e) {
throw new DecoderException("Unable to decode Mesowest data", e);
}
if (record == null)
return new PluginDataObject[0];
return new PluginDataObject[] { record };
}
private double calculateCelsius(String tempString) {
double temp = Double.valueOf(tempString.trim()).doubleValue();
double tempC = (temp - 32.0) * (5.0 / 9.0);
return tempC;
}
}

View file

@ -1,361 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.edex.plugin.obs.mesowest;
import java.util.Calendar;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* Record implementation for mesowest plugin
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/14/2007 139 Phillippe Initial creation
* 20071129 472 jkorman Added IDecoderGettable interface.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
*
*
* </pre>
*
* @author bphillip
* @version 1
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class MesowestRecord extends PluginDataObject {
private static final long serialVersionUID = 1L;
/** A string denoting the report type */
@XmlAttribute
@DynamicSerializeElement
private String reportType;
/** A string denoting the reporting station */
@XmlAttribute
@DynamicSerializeElement
private String stationID;
/** A string denoting the time of observation */
@XmlElement
@DynamicSerializeElement
private Calendar timeObs;
/** A string denoting the temperature in degrees Celsius */
@XmlAttribute
@DynamicSerializeElement
private Integer temperature;
/** A string denoting the current temperature in tenths of degrees Celsius */
@XmlAttribute
@DynamicSerializeElement
private Float tempFromTenths;
/** A string denoting the wind direction in degrees from north */
@XmlAttribute
@DynamicSerializeElement
private String windDir;
/** A string denoting the wind speed in knots */
@XmlAttribute
@DynamicSerializeElement
private Integer windSpeed;
/** A string denoting the wind gusts in knots */
@XmlAttribute
@DynamicSerializeElement
private Integer windGust;
/** A string denoting the current dew point in degrees Celsius */
@XmlAttribute
@DynamicSerializeElement
private Integer dewPoint;
/** A string denoting the current dew point in tenths of degrees Celsius */
@XmlAttribute
@DynamicSerializeElement
private Float dewPointFromTenths;
/** A string denoting the altimeter reading in in/Hg */
@XmlAttribute
@DynamicSerializeElement
private Float altimeter;
/** A string denoting the sea level pressure in millibars */
@XmlAttribute
@DynamicSerializeElement
private Float seaLevelPress;
/** The reference hour * */
@XmlElement
@DynamicSerializeElement
private Calendar refHour;
/**
* No argument constructor
*
*/
public MesowestRecord() {
}
/**
* Constructs a mesowest record from a dataURI
*
* @param uri
* The dataURI
* @param tableDef
* The table definition associated with this class
*/
public MesowestRecord(String uri) {
super(uri);
}
/**
* @return the reportType
*/
public String getReportType() {
return reportType;
}
/**
* @param reportType
* the reportType to set
*/
public void setReportType(String reportType) {
this.reportType = reportType;
}
/**
* @return the altimeter
*/
public Float getAltimeter() {
return altimeter;
}
/**
* @param altimeter
* the altimeter to set
*/
public void setAltimeter(Float altimeter) {
this.altimeter = altimeter;
}
/**
* @return the dewPoint
*/
public Integer getDewPoint() {
return dewPoint;
}
/**
* @param dewPoint
* the dewPoint to set
*/
public void setDewPoint(Integer dewPoint) {
this.dewPoint = dewPoint;
}
/**
* @return the dewPointFromTenths
*/
public Float getDewPointFromTenths() {
return dewPointFromTenths;
}
/**
* @param dewPointFromTenths
* the dewPointFromTenths to set
*/
public void setDewPointFromTenths(Float dewPointFromTenths) {
this.dewPointFromTenths = dewPointFromTenths;
}
/**
* @return the refHour
*/
public Calendar getRefHour() {
return refHour;
}
/**
* @param refHour
* the refHour to set
*/
public void setRefHour(Calendar refHour) {
this.refHour = refHour;
}
/**
* @return the seaLevelPress
*/
public Float getSeaLevelPress() {
return seaLevelPress;
}
/**
* @param seaLevelPress
* the seaLevelPress to set
*/
public void setSeaLevelPress(Float seaLevelPress) {
this.seaLevelPress = seaLevelPress;
}
/**
* @return the stationID
*/
public String getStationID() {
return stationID;
}
/**
* @param stationID
* the stationID to set
*/
public void setStationID(String stationID) {
this.stationID = stationID;
}
/**
* @return the temperature
*/
public Integer getTemperature() {
return temperature;
}
/**
* @param temperature
* the temperature to set
*/
public void setTemperature(Integer temperature) {
this.temperature = temperature;
}
/**
* @return the tempFromTenths
*/
public Float getTempFromTenths() {
return tempFromTenths;
}
/**
* @param tempFromTenths
* the tempFromTenths to set
*/
public void setTempFromTenths(Float tempFromTenths) {
this.tempFromTenths = tempFromTenths;
}
/**
* @return the timeObs
*/
public Calendar getTimeObs() {
return timeObs;
}
/**
* @param timeObs
* the timeObs to set
*/
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
/**
* @return the windDir
*/
public String getWindDir() {
return windDir;
}
/**
* @param windDir
* the windDir to set
*/
public void setWindDir(String windDir) {
this.windDir = windDir;
}
/**
* @return the windGust
*/
public Integer getWindGust() {
return windGust;
}
/**
* @param windGust
* the windGust to set
*/
public void setWindGust(Integer windGust) {
this.windGust = windGust;
}
/**
* @return the windSpeed
*/
public Integer getWindSpeed() {
return windSpeed;
}
/**
* @param windSpeed
* the windSpeed to set
*/
public void setWindSpeed(Integer windSpeed) {
this.windSpeed = windSpeed;
}
/**
* Get the IDecoderGettable reference for this record.
*
* @return The IDecoderGettable reference for this record. Null for this
* class.
*/
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}

View file

@ -1,23 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
/**
* Contains utility classes for mesowest plugin
*/
package com.raytheon.edex.plugin.obs.mesowest.util;

View file

@ -54,29 +54,30 @@ import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
*
* SOFTWARE HISTORY
*
* ate Ticket# Engineer Description
* ----------- ---------- ----------- --------------------------
* 2/14/07 139 bphillip Initial creation
* 20071029 505 jkorman Changed setting of DataTime from refhour
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 14, 2007 139 bphillip Initial creation
* Oct 29, 2007 505 jkorman Changed setting of DataTime from refhour
* to observation time.
* 20071128 575 jkorman Added future obs time threshold check in
* Nov 28, 2007 575 jkorman Added future obs time threshold check in
* decode.
* 12/07/07 452 bphillip Retrieve lat/lon info from station table
* 12/17/07 628 bphillip Discarding data with no station info
* 20071217 453 jkorman Major restructure of the decode method
* Dec 07, 2007 452 bphillip Retrieve lat/lon info from station table
* Dec 17, 2007 628 bphillip Discarding data with no station info
* Dec 17, 2007 453 jkorman Major restructure of the decode method
* to ensure that all sections are decoded
* properly. Added cleanMessage method.
* 20071218 453 jkorman Added metric winds and visibility.
* 20071221 665 jkorman Modified metric vis to ensure it is not
* Dec 18, 2007 453 jkorman Added metric winds and visibility.
* Dec 21, 2007 665 jkorman Modified metric vis to ensure it is not
* decoding alstg data. Added checks for
* NSC, NCD, and CAVOK. Added checks for
* metric sector vis.
* 20080102 667 jkorman Added code to properly decode/store clear
* sky conditions.
* 20080116 798 jkorman Changed logging levels.
* 20080414 996 jkorman Rewrote sky cover decode section to handle
* CB/TCU and /// data.
* 11/11/08 1684 chammack Camel refactor.
* Jan 02, 2008 667 jkorman Added code to properly decode/store
* clear sky conditions.
* Jan 16, 2008 798 jkorman Changed logging levels.
* Apr 14, 2008 996 jkorman Rewrote sky cover decode section to
* handle CB/TCU and /// data.
* Nov 11, 2008 1684 chammack Camel refactor.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author bphillip
@ -185,8 +186,6 @@ public class MetarDecoder extends AbstractDecoder {
public static final Pattern SUNSHINE = Pattern
.compile("(\\b)98(\\d{3}|///)");
private final String PLUGIN_NAME;
private boolean useMockInfo = false;
private ObStation mockInfo = null;
@ -195,8 +194,7 @@ public class MetarDecoder extends AbstractDecoder {
private String traceId = null;
public MetarDecoder(String pluginName) throws DecoderException {
PLUGIN_NAME = pluginName;
public MetarDecoder() {
VIS_PARSER = new VisibilityParser();
}
@ -924,7 +922,6 @@ public class MetarDecoder extends AbstractDecoder {
record.setSunshine(value);
}
record.setPluginName(PLUGIN_NAME);
record.constructDataURI();
record.setWmoHeader(sep.getWMOHeader().getWmoHeader());
@ -1008,7 +1005,7 @@ public class MetarDecoder extends AbstractDecoder {
StringBuilder sb = null;
if (data != null) {
sb = new StringBuilder(data);
for (int i = 0; i < sb.length() - 1; i++) {
for (int i = 0; i < (sb.length() - 1); i++) {
if (sb.charAt(i) == '0') {
sb.setCharAt(i, ' ');
}

View file

@ -59,6 +59,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* dimensioned size.
* May 09, 2013 1869 bsteffen Modified D2D time series of point data to
* work without dataURI.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -68,7 +69,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
public class MetarPointDataTransform {
public static final String ALTIMETER = "altimeter";
public static final String ALTIMETER = "altimeter";
public static final String SEA_LEVEL_PRESS = "seaLevelPress";
@ -232,8 +233,9 @@ public class MetarPointDataTransform {
Map<File, PointDataContainer> pointMap = new HashMap<File, PointDataContainer>();
for (PluginDataObject p : pdo) {
if (!(p instanceof MetarRecord))
if (!(p instanceof MetarRecord)) {
continue;
}
File f = this.dao.getFullFilePath(p);
PointDataContainer pdc = pointMap.get(f);
@ -254,7 +256,7 @@ public class MetarPointDataTransform {
MetarRecord record) {
PointDataView pdv = container.append();
if (record.getCorrection() != null
if ((record.getCorrection() != null)
&& record.getCorrection().equals("COR")) {
pdv.setInt(CORRECTION, 1);
} else {
@ -272,12 +274,12 @@ public class MetarPointDataTransform {
if (record.getSkyCoverage() != null) {
int maxSize = container.getDescription(SKY_COVER)
.getDimensionAsInt();
.getDimensionAsInt();
record.sort(record.getSkyCoverage());
Iterator<SkyCover> scIterator = record.getSkyCoverage().iterator();
int i = 0;
while (scIterator.hasNext()) {
if(i >= maxSize) {
if (i >= maxSize) {
break;
}
// TODO: storing duplicate info like this, needs to be resolved
@ -285,8 +287,9 @@ public class MetarPointDataTransform {
if (sc.getType() != null) {
StringBuffer scBuffer = new StringBuffer();
scBuffer.append(sc.getType());
if (sc.getGenus() != null)
if (sc.getGenus() != null) {
scBuffer.append(sc.getGenus());
}
pdv.setString(SKY_COVER, scBuffer.toString(), i);
if (sc.getType() != null) {
@ -346,7 +349,7 @@ public class MetarPointDataTransform {
pdv.setFloat(SNOWFALL6_HOUR, record.getSnowFall_6Hours());
pdv.setInt(SUNSHINE, record.getSunshine());
if (record.getWindDir() != null
if ((record.getWindDir() != null)
&& !record.getWindDir().equalsIgnoreCase("VRB")) {
pdv.setFloat("windDir", Float.parseFloat(record.getWindDir()));
}
@ -415,7 +418,6 @@ public class MetarPointDataTransform {
mr.setPressChange3Hour(pdv.getNumber(PRESS_CHANGE3_HOUR).floatValue());
mr.setPressChangeChar(pdv.getString(PRESS_CHANGE_CHAR));
mr.setPluginName("obs");
mr.setPrecip1Hour(pdv.getNumber(PRECIP1_HOUR).floatValue());
mr.setPrecip3Hour(pdv.getNumber(PRECIP3_HOUR).floatValue());
mr.setPrecip6Hour(pdv.getNumber(PRECIP6_HOUR).floatValue());
@ -427,7 +429,7 @@ public class MetarPointDataTransform {
int i = 0;
Set<SkyCover> scList = new HashSet<SkyCover>();
for (String s : scType) {
if (s != null && !s.equals("")) {
if ((s != null) && !s.equals("")) {
SkyCover skyCover = new SkyCover();
skyCover.setType(s);

View file

@ -59,10 +59,11 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080103 384 jkorman Initial Coding.
* 20080128 861 jkorman Add pirep layer data.
* 20080408 1039 jkorman Added traceId for tracing data.
* 11/13/08 1684 chammack Camel Refactor
* Jan 03, 2008 384 jkorman Initial Coding.
* Jan 28, 2008 861 jkorman Add pirep layer data.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Nov 13, 2008 1684 chammack Camel Refactor
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author jkorman
@ -108,7 +109,6 @@ public class PirepDecoder extends AbstractDecoder {
if (report != null) {
report.setTraceId(traceId);
report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
} catch (PluginException e) {
@ -181,8 +181,7 @@ public class PirepDecoder extends AbstractDecoder {
record.setHorzVisibility(parser.getHorxVisibility());
// Collect the decoded icing flight conditions data
List<AircraftFlightCondition> icing = parser
.getIcingLayers();
List<AircraftFlightCondition> icing = parser.getIcingLayers();
if (icing != null) {
PirepLayerData iceLayer = null;
for (AircraftFlightCondition layer : icing) {
@ -250,7 +249,7 @@ public class PirepDecoder extends AbstractDecoder {
}
if (traceIdx >= 0) {
newTrace = new StackTraceElement[traceIdx + 1];
for (int j = 0; j < traceIdx + 1; j++) {
for (int j = 0; j < (traceIdx + 1); j++) {
newTrace[j] = trace[j];
}
e.setStackTrace(newTrace);

View file

@ -64,6 +64,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
* Jul 17, 2013 2112 bsteffen Split poes data so it gets stored in
* correct file.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -77,7 +78,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "poessounding";
/** The logger */
private Log logger = LogFactory.getLog(getClass());
private final Log logger = LogFactory.getLog(getClass());
private PointDataDescription pdd;
@ -125,7 +126,7 @@ public class POESSoundingDecoder extends AbstractDecoder implements
PluginDataObject[] decodedData = null;
if (data != null && data.length > 0) {
if ((data != null) && (data.length > 0)) {
WMOHeader wmoHeader = new WMOHeader(data, headers);
@ -153,7 +154,6 @@ public class POESSoundingDecoder extends AbstractDecoder implements
container, pdd, dao);
if (soundingData != null) {
soundingData.setTraceId(traceId);
soundingData.setPluginName(PLUGIN_NAME);
pdoList.add(soundingData);
}
}

View file

@ -56,8 +56,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation.
* 20080408 1039 jkorman Added traceId for tracing data.
* Mar 03, 2008 969 jkorman Initial implementation.
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -71,7 +72,7 @@ public class ProfilerDecoder extends AbstractDecoder implements
public static final String PLUGIN_NAME = "profiler";
/** The logger */
private Log logger = LogFactory.getLog(getClass());
private final Log logger = LogFactory.getLog(getClass());
private PointDataDescription pdd;
@ -131,7 +132,7 @@ public class ProfilerDecoder extends AbstractDecoder implements
PluginDataObject[] decodedData = null;
if (data != null && data.length > 0) {
if ((data != null) && (data.length > 0)) {
WMOHeader wmoHeader = new WMOHeader(data, headers);
if ((wmoHeader != null) && (wmoHeader.isValid())) {
@ -160,7 +161,6 @@ public class ProfilerDecoder extends AbstractDecoder implements
container, traceId);
if (soundingData != null) {
soundingData.setTraceId(traceId);
soundingData.setPluginName(PLUGIN_NAME);
try {
soundingData.constructDataURI();
PointDataView view = soundingData

View file

@ -87,12 +87,15 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/14/2007 139 Phillippe Initial check-in. Refactor of initial implementation.
* Feb 14, 2007 139 Phillippe Initial check-in. Refactor of initial
* implementation.
* Dec 17, 2007 600 bphillip Added dao pool usage
* Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz() signature changed.
* Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz()
* signature changed.
* Mar 19, 2013 1804 bsteffen Optimize decoder performance.
* Mar 19, 2013 1785 bgonzale Added performance status handler and added status
* to decode.
* Mar 19, 2013 1785 bgonzale Added performance status handler and
* added status to decode.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author bphillip
@ -130,7 +133,7 @@ public class RadarDecoder extends AbstractDecoder {
private String traceId = "";
private RadarInfoDict infoDict;
private final RadarInfoDict infoDict;
private RadarStationDao radarStationDao = new RadarStationDao();
@ -541,7 +544,6 @@ public class RadarDecoder extends AbstractDecoder {
private void finalizeRecord(RadarRecord record) throws PluginException {
record.setTraceId(traceId);
record.setPluginName("radar");
record.constructDataURI();
record.setInsertTime(TimeTools.getSystemCalendar());
// for GSM, we want all the messages as they have the possibility of
@ -562,7 +564,7 @@ public class RadarDecoder extends AbstractDecoder {
if (symbologyBlock == null) {
return;
}
int packetsKept = 0;
List<Layer> packetsInLyrs = new ArrayList<Layer>();
@ -587,9 +589,9 @@ public class RadarDecoder extends AbstractDecoder {
GenericDataPacket genericPacket = (GenericDataPacket) packet;
List<GenericDataComponent> components = genericPacket
.getComponents();
if (components != null
&& components.size() == 1
&& components.get(0).getComponentType() == ComponentType.RADIAL) {
if ((components != null)
&& (components.size() == 1)
&& (components.get(0).getComponentType() == ComponentType.RADIAL)) {
processRadialComponent(record,
(RadialComponent) components.get(0));
} else {
@ -698,7 +700,7 @@ public class RadarDecoder extends AbstractDecoder {
ClusterTask task = ClusterLockUtils.lookupLock(lockname,
record.getIcao());
String formatStatus = RadarUtil.formatBits(messagePart, constants);
if (task == null || task.getExtraInfo() == null) {
if ((task == null) || (task.getExtraInfo() == null)) {
ClusterLockUtils.lock(lockname, record.getIcao(), formatStatus, 30,
true);
EDEXUtil.sendMessageAlertViz(Priority.INFO,
@ -711,7 +713,7 @@ public class RadarDecoder extends AbstractDecoder {
}
if (task.getExtraInfo() != null) {
if (formatStatus != null
if ((formatStatus != null)
&& !formatStatus.equals(task.getExtraInfo().trim())) {
String details = "";
String temp = "";

View file

@ -27,8 +27,9 @@ package com.raytheon.edex.plugin.radar.dao;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 02/06/09 1990 bphillip Initial creation
* Feb 06, 2009 1990 bphillip Initial creation
* Mar 18, 2013 1804 bsteffen Reduce useless data stored in radar hdf5
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -120,7 +121,8 @@ public class RadarDao extends PluginDao {
dataStore.addDataRecord(rec, sp);
}
if (radarRec.getThresholds() != null && radarRec.getProductCode() != 2) {
if ((radarRec.getThresholds() != null)
&& (radarRec.getProductCode() != 2)) {
IDataRecord rec = new ShortDataRecord(
RadarStoredData.THRESHOLDS_ID, radarRec.getDataURI(),
radarRec.getThresholds(), 1, new long[] { 16 });
@ -139,7 +141,7 @@ public class RadarDao extends PluginDao {
}
Map<RadarDataKey, RadarDataPoint> symData = radarRec.getSymbologyData();
if (symData != null && !symData.isEmpty()) {
if ((symData != null) && !symData.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(symData);
ByteDataRecord bdr = new ByteDataRecord(
@ -161,7 +163,7 @@ public class RadarDao extends PluginDao {
Map<MapValues, Map<String, Map<MapValues, String>>> mapProdVals = radarRec
.getMapProductVals();
if (mapProdVals != null && !mapProdVals.isEmpty()) {
if ((mapProdVals != null) && !mapProdVals.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(mapProdVals);
ByteDataRecord bdr = new ByteDataRecord(
@ -192,7 +194,7 @@ public class RadarDao extends PluginDao {
Map<MapValues, Map<MapValues, String>> mapRecVals = radarRec
.getMapRecordVals();
if (mapRecVals != null && !mapRecVals.isEmpty()) {
if ((mapRecVals != null) && !mapRecVals.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(mapRecVals);
ByteDataRecord bdr = new ByteDataRecord(
@ -202,7 +204,7 @@ public class RadarDao extends PluginDao {
}
Map<String, RadarDataKey> stormIds = radarRec.getStormIDs();
if (stormIds != null && !stormIds.isEmpty()) {
if ((stormIds != null) && !stormIds.isEmpty()) {
byte[] data = DynamicSerializationManager.getManager(
SerializationType.Thrift).serialize(stormIds);
ByteDataRecord bdr = new ByteDataRecord(
@ -274,7 +276,6 @@ public class RadarDao extends PluginDao {
PluginDataObject[] queryResults = getMetadata(query);
for (PluginDataObject obj : queryResults) {
RadarRecord record = (RadarRecord) obj;
record.setPluginName(pluginName);
IDataRecord[] hdf5Data = getHDF5Data(record, tile);
record.setMessageData(hdf5Data[0].getDataObject());
record.setAngleData((float[]) hdf5Data[1].getDataObject());

View file

@ -54,8 +54,9 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080103 384 jkorman Initial Coding.
* 11/25/08 #1684 chammack Camel Refactor
* Jan 03, 2008 384 jkorman Initial Coding.
* Nov 25, 2008 1684 chammack Camel Refactor
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author jkorman
@ -115,7 +116,6 @@ public class RECCODecoder extends AbstractDecoder {
input.getWmoHeader());
if (report != null) {
report.setTraceId(traceId);
report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
} catch (PluginException e) {

View file

@ -73,6 +73,7 @@ import com.vividsolutions.jts.geom.Geometry;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Jun 20, 2013 2128 bsteffen Ensure setDataURI sets the dataURI.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -86,12 +87,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "recco",
indexes = {
@Index(name = "recco_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "recco", indexes = { @Index(name = "recco_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -140,7 +137,7 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled,
@XmlAttribute
private Calendar refHour;
//
//
@Column
@DataURI(position = 1)
@DynamicSerializeElement
@ -687,6 +684,7 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled,
return a;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@ -723,4 +721,9 @@ public class RECCORecord extends PluginDataObject implements ISpatialEnabled,
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "recco";
}
}

View file

@ -47,14 +47,15 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080512 1131 jkorman Initial implementation.
* 20080529 1131 jkorman Added new Separator constructor.
* 11/11/08 1684 chammack Refactored to camel
* 20090327 2019 jkorman Added code to check for non-redbook data.
* 20120524 #647 dgilling Update persistence time in
* May 12, 2008 1131 jkorman Initial implementation.
* May 29, 2008 1131 jkorman Added new Separator constructor.
* Nov 11, 2008 1684 chammack Refactored to camel
* Mar 27, 2009 2019 jkorman Added code to check for non-redbook data.
* May 24, 2012 647 dgilling Update persistence time in
* createdBackDatedVersionIfNeeded.
* Mar 19, 2013 1785 bgonzale Added performance status handler and added
* status to decode.
* Mar 19, 2013 1785 bgonzale Added performance status handler and
* added status to decode.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author jkorman
@ -95,6 +96,7 @@ public class RedbookDecoder extends AbstractDecoder {
private final IPerformanceStatusHandler perfLog = PerformanceStatus
.getHandler("Redbook:");
private String traceId = null;
/**
@ -142,12 +144,11 @@ public class RedbookDecoder extends AbstractDecoder {
+ "- File is not Redbook data. Type is "
+ foreign.dataType);
} else {
report = new RedbookParser(traceId, data,
wmoHeader).getDecodedRecord();
report = new RedbookParser(traceId, data, wmoHeader)
.getDecodedRecord();
}
if (report != null) {
report.setPersistenceTime(new Date());
report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
@ -219,7 +220,6 @@ public class RedbookDecoder extends AbstractDecoder {
// and the Wes2Bridge archiver properly finds these backdated
// records
backDatedRecord.setPersistenceTime(new Date());
backDatedRecord.setPluginName(PLUGIN_NAME);
backDatedRecord.constructDataURI();
} catch (PluginException e) {
logger.error(traceId + "Could not create back-dated copy of "

View file

@ -61,14 +61,17 @@ import com.raytheon.uf.common.time.DataTime;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080512 1131 jkorman Initial implementation.
* 20080529 1131 jkorman getPersistenceTime now returns system time.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* 20130408 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 29, 2013 1958 bgonzale Added equals and hashcode.
* May 12, 2008 1131 jkorman Initial implementation.
* May 29, 2008 1131 jkorman getPersistenceTime now returns system
* time.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 29, 2013 1958 bgonzale Added equals and hashcode.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -82,17 +85,13 @@ import com.raytheon.uf.common.time.DataTime;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "redbook",
indexes = {
@Index(name = "redbook_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "redbook", indexes = { @Index(name = "redbook_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class RedbookRecord extends PersistablePluginDataObject
implements IPersistable, Cloneable {
public class RedbookRecord extends PersistablePluginDataObject implements
IPersistable, Cloneable {
private static final long serialVersionUID = 1L;
@ -361,7 +360,8 @@ public class RedbookRecord extends PersistablePluginDataObject
other.id = 0;
other.dataURI = null;
Date newRefTime = new Date(dataTime.getRefTime().getTime() - 60 * 1000);
Date newRefTime = new Date(dataTime.getRefTime().getTime()
- (60 * 1000));
if (dataTime.getUtilityFlags().contains(DataTime.FLAG.FCST_USED)) {
other.dataTime = new DataTime(newRefTime, dataTime.getFcstTime());
} else {
@ -380,22 +380,23 @@ public class RedbookRecord extends PersistablePluginDataObject
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((corIndicator == null) ? 0 : corIndicator.hashCode());
result = prime * result
result = (prime * result)
+ ((fcstHours == null) ? 0 : fcstHours.hashCode());
result = prime * result + ((fileId == null) ? 0 : fileId.hashCode());
result = prime * result
result = (prime * result) + ((fileId == null) ? 0 : fileId.hashCode());
result = (prime * result)
+ ((originatorId == null) ? 0 : originatorId.hashCode());
result = prime * result
result = (prime * result)
+ ((productId == null) ? 0 : productId.hashCode());
result = prime * result + Arrays.hashCode(redBookData);
result = prime * result
result = (prime * result) + Arrays.hashCode(redBookData);
result = (prime * result)
+ ((retentionHours == null) ? 0 : retentionHours.hashCode());
result = prime * result + ((timeObs == null) ? 0 : timeObs.hashCode());
result = prime * result
result = (prime * result)
+ ((timeObs == null) ? 0 : timeObs.hashCode());
result = (prime * result)
+ ((wmoCCCCdt == null) ? 0 : wmoCCCCdt.hashCode());
result = prime * result
result = (prime * result)
+ ((wmoTTAAii == null) ? 0 : wmoTTAAii.hashCode());
return result;
}
@ -407,60 +408,82 @@ public class RedbookRecord extends PersistablePluginDataObject
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
RedbookRecord other = (RedbookRecord) obj;
if (corIndicator == null) {
if (other.corIndicator != null)
if (other.corIndicator != null) {
return false;
} else if (!corIndicator.equals(other.corIndicator))
}
} else if (!corIndicator.equals(other.corIndicator)) {
return false;
}
if (fcstHours == null) {
if (other.fcstHours != null)
if (other.fcstHours != null) {
return false;
} else if (!fcstHours.equals(other.fcstHours))
}
} else if (!fcstHours.equals(other.fcstHours)) {
return false;
}
if (fileId == null) {
if (other.fileId != null)
if (other.fileId != null) {
return false;
} else if (!fileId.equals(other.fileId))
}
} else if (!fileId.equals(other.fileId)) {
return false;
}
if (originatorId == null) {
if (other.originatorId != null)
if (other.originatorId != null) {
return false;
} else if (!originatorId.equals(other.originatorId))
}
} else if (!originatorId.equals(other.originatorId)) {
return false;
}
if (productId == null) {
if (other.productId != null)
if (other.productId != null) {
return false;
} else if (!productId.equals(other.productId))
}
} else if (!productId.equals(other.productId)) {
return false;
if (!Arrays.equals(redBookData, other.redBookData))
}
if (!Arrays.equals(redBookData, other.redBookData)) {
return false;
}
if (retentionHours == null) {
if (other.retentionHours != null)
if (other.retentionHours != null) {
return false;
} else if (!retentionHours.equals(other.retentionHours))
}
} else if (!retentionHours.equals(other.retentionHours)) {
return false;
}
if (timeObs == null) {
if (other.timeObs != null)
if (other.timeObs != null) {
return false;
} else if (!timeObs.equals(other.timeObs))
}
} else if (!timeObs.equals(other.timeObs)) {
return false;
}
if (wmoCCCCdt == null) {
if (other.wmoCCCCdt != null)
if (other.wmoCCCCdt != null) {
return false;
} else if (!wmoCCCCdt.equals(other.wmoCCCCdt))
}
} else if (!wmoCCCCdt.equals(other.wmoCCCCdt)) {
return false;
}
if (wmoTTAAii == null) {
if (other.wmoTTAAii != null)
if (other.wmoTTAAii != null) {
return false;
} else if (!wmoTTAAii.equals(other.wmoTTAAii))
}
} else if (!wmoTTAAii.equals(other.wmoTTAAii)) {
return false;
}
return true;
}
@ -471,4 +494,8 @@ public class RedbookRecord extends PersistablePluginDataObject
return super.getDataURI();
}
@Override
public String getPluginName() {
return "redbook";
}
}

View file

@ -62,16 +62,17 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20070925 391 jkorman Initial Coding.
* 20071107 391 jkorman Modified findDuplicate to use a different
* Sep 25, 2007 391 jkorman Initial Coding.
* Nov 07, 2007 391 jkorman Modified findDuplicate to use a different
* dataURI query.
* Dec 17, 2007 600 bphillip Added dao pool usage
* 20080123 758 jkorman Added code to remove observation with a
* Jan 23, 2008 758 jkorman Added code to remove observation with a
* time in the future.
* 20080215 887 jkorman Added null checks in decode.
* 20080218 887 jkorman Reverse null checks in findDuplicate.
* Mar 19, 2013 1785 bgonzale Added performance status handler and added status
* to decode.
* Feb 15, 2008 887 jkorman Added null checks in decode.
* Feb 18, 2008 887 jkorman Reverse null checks in findDuplicate.
* Mar 19, 2013 1785 bgonzale Added performance status handler and
* added status to decode.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author jkorman
@ -87,7 +88,7 @@ public class SfcObsDecoder extends AbstractDecoder {
.getHandler("SfcObs:");
/** The logger */
private Log logger = LogFactory.getLog(getClass());
private final Log logger = LogFactory.getLog(getClass());
private boolean removeNILs = true;
@ -169,7 +170,6 @@ public class SfcObsDecoder extends AbstractDecoder {
}
if (report != null) {
report.setTraceId(traceId);
report.setPluginName(PLUGIN_NAME);
try {
report.constructDataURI();
} catch (PluginException e) {

View file

@ -47,14 +47,14 @@ import com.raytheon.uf.common.time.DataTime;
/**
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* June2006 3,14 Phillippe Initial Creation.
* 20071129 472 jkorman Added IDecoderGettable interface.
* 19Mar2008 387 M. Duff Modified to store SHEF data.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* June2006 314 Phillippe Initial Creation.
* Nov 29, 2007 472 jkorman Added IDecoderGettable interface.
* Mar 19, 2008 387 M. Duff Modified to store SHEF data.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
*
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author bphillip
@ -63,21 +63,19 @@ import com.raytheon.uf.common.time.DataTime;
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class ShefRecord extends PluginDataObject {
public static enum ShefType {
A, B, E;
}
private static final long serialVersionUID = 2726928942130489733L;
private static final int MILLIS_PER_MINUTE = 1000 * 60;
private static final long serialVersionUID = 2726928942130489733L;
/**
* Collection of SHEF data values for this record
*/
@Transient
private List<ShefData> dataValues = null;
@Transient
protected String rawMessage = null;
@ -127,12 +125,12 @@ public class ShefRecord extends PluginDataObject {
@Transient
private SHEFDate obsDate = null;
@Transient
private SHEFDate createDate = null;
@Transient
private int durationValue = ParameterCode.Duration.DEFAULT.getValue();
private final int durationValue = ParameterCode.Duration.DEFAULT.getValue();
/**
* Empty constructor
@ -161,12 +159,12 @@ public class ShefRecord extends PluginDataObject {
}
public void addDataValue(ShefData value) {
if(dataValues == null) {
if (dataValues == null) {
dataValues = new ArrayList<ShefData>();
}
dataValues.add(value);
}
/**
* Get the record type.
*
@ -246,19 +244,19 @@ public class ShefRecord extends PluginDataObject {
this.recordDate = recordDate;
if (recordDate.length() == 4) {
int year = ShefUtil.getFullYear(recordDate);
synchronized(ShefConstants.YYYYMMDD_FORMAT){
synchronized (ShefConstants.YYYYMMDD_FORMAT) {
recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(year
+ recordDate);
}
} else if (recordDate.length() == 6) {
int year = ShefUtil.getFullYear(recordDate);
year = year / 100;
synchronized(ShefConstants.YYYYMMDD_FORMAT){
synchronized (ShefConstants.YYYYMMDD_FORMAT) {
recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(year
+ recordDate);
}
} else { // recordDate length must be 8
synchronized(ShefConstants.YYYYMMDD_FORMAT){
synchronized (ShefConstants.YYYYMMDD_FORMAT) {
recordDateObj = ShefConstants.YYYYMMDD_FORMAT.parse(recordDate);
}
}
@ -287,7 +285,7 @@ public class ShefRecord extends PluginDataObject {
public void setObsDate(SHEFDate date) {
obsDate = date;
}
/**
*
* @return
@ -295,7 +293,7 @@ public class ShefRecord extends PluginDataObject {
public SHEFDate getObsDate() {
return obsDate;
}
/**
* Get the time zone code
*
@ -375,7 +373,7 @@ public class ShefRecord extends PluginDataObject {
* @param date
*/
public void setCreationDate(SHEFDate date) {
if(date != null) {
if (date != null) {
createDate = date;
creationDate = date.toLocal();
creationDateObj = date.toCalendar().getTime();
@ -385,7 +383,6 @@ public class ShefRecord extends PluginDataObject {
creationDateObj = null;
}
}
/**
* Get the creation date Date object
@ -563,54 +560,15 @@ public class ShefRecord extends PluginDataObject {
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Record type = ");
sb.append(shefType);
// if(obsDate != null) {
// sb.append(obsDate.toOutString());
// } else {
// sb.append(" 0 0 0 0 0 0");
// }
// sb.append(" ");
// if(createDate != null) {
// sb.append(createDate.toOutString());
// } else {
// sb.append(" 0 0 0 0 0 0");
// }
// sb.append(" ");
// // PE
// sb.append("HG");
// sb.append(" ");
// sb.append(String.format("%4d",durationValue));
// sb.append(" ");
// // Type Code
// sb.append("R");
// sb.append(" ");
// // Source Code
// sb.append("G");
// sb.append(" ");
// // Extremnum
// sb.append("Z");
// sb.append(" ");
// // Probability Code
// sb.append(" ");
// sb.append(" ");
// // Data Value
// sb.append("00000.000");
// sb.append(" ");
// // Data Qualifier
// sb.append(" ");
// sb.append(" ");
// // Revision code
// sb.append((revisedRecord) ? "0" : "1");
// sb.append(ShefConstants.EOL);
// sb.append("----------------------------------------");
if(dataValues != null) {
for(ShefData d : dataValues) {
if (dataValues != null) {
for (ShefData d : dataValues) {
sb.append(ShefConstants.EOL);
d.toString(sb);
}
@ -618,11 +576,16 @@ public class ShefRecord extends PluginDataObject {
sb.append(ShefConstants.EOL);
return sb.toString();
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "shef";
}
}

View file

@ -30,18 +30,18 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
/**
*
* Decoder implementation for taf plugin
* Decoder implementation for taf plugin.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/14/07 139 bphillip Initial creation
* 6/21/07 180 bphillip Updated to use new plugin pattern
* 20080425 1001 jkorman Extracted decoder code into TAFParser.
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 14, 2007 139 bphillip Initial creation
* Jun 21, 2007 180 bphillip Updated to use new plugin pattern
* Apr 25, 2008 1001 jkorman Extracted decoder code into TAFParser.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author bphillip
@ -52,7 +52,7 @@ public class TafDecoder extends AbstractDecoder {
// Name of the plugin controlling this decoder.
public static final String PLUGIN_NAME = "TAF";
private String traceId = "";
private final String traceId = "";
/**
* Constructor.
@ -88,12 +88,12 @@ public class TafDecoder extends AbstractDecoder {
record = parser.getDecodedRecord();
if (record != null) {
record.setTraceId(traceId);
record.setPluginName("taf");
record.constructDataURI();
} else {
TAFParts parts = input.tafParts;
if(parts.getTafHeader() != null) {
logger.error("Could not parse TAF for input " + parts.getTafHeader() + " in file " + traceId);
if (parts.getTafHeader() != null) {
logger.error("Could not parse TAF for input "
+ parts.getTafHeader() + " in file " + traceId);
} else {
logger.error("Could not parse file " + traceId);
}
@ -107,8 +107,9 @@ public class TafDecoder extends AbstractDecoder {
record = null;
}
if (record == null)
if (record == null) {
return new PluginDataObject[0];
}
return new PluginDataObject[] { record };
}

View file

@ -22,7 +22,6 @@ package com.raytheon.edex.plugin.taf.common;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.persistence.Access;
@ -61,13 +60,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/14/07 139 bphillip Initial Creation
* 6/21/07 180 bphillip Updated to use new plugin pattern
* 20071129 472 jkorman Added IDecoderGettable interface.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Feb 14, 2007 139 bphillip Initial Creation
* Jun 21, 2007 180 bphillip Updated to use new plugin pattern
* Nov 29, 2007 472 jkorman Added IDecoderGettable interface.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -81,12 +82,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "taf",
indexes = {
@Index(name = "taf_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "taf", indexes = { @Index(name = "taf_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement
@ -347,10 +344,8 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
this.identifier = dataURI;
if (this.changeGroups != null && this.changeGroups.size() > 0) {
for (Iterator<ChangeGroup> iter = this.changeGroups.iterator(); iter
.hasNext();) {
ChangeGroup group = iter.next();
if ((this.changeGroups != null) && (this.changeGroups.size() > 0)) {
for (ChangeGroup group : this.changeGroups) {
group.setParentID(this);
}
}
@ -391,7 +386,7 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
result = (prime * result)
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
return result;
}
@ -405,19 +400,23 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
TafRecord other = (TafRecord) obj;
if (getDataURI() == null) {
if (other.getDataURI() != null) {
return false;
}
} else if (!getDataURI().equals(other.getDataURI()))
} else if (!getDataURI().equals(other.getDataURI())) {
return false;
}
return true;
}
@ -427,4 +426,9 @@ public class TafRecord extends PluginDataObject implements ISpatialEnabled {
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "taf";
}
}

View file

@ -66,18 +66,19 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2008 Aug 11 jkorman
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 11, 2008 jkorman Initial creation
* Jul 10, 2009 2191 rjpeter Finished implementation.
* Apr 14, 2010 4734 mhuang Corrected StdTextProduct import
* dependency
* Apr 14, 2010 4734 mhuang Corrected StdTextProduct import
* dependency
* May 28, 2010 2187 cjeanbap Added StdTextProductFactory
* functionality.
* functionality.
* Aug 26, 2010 2187 cjeanbap Renamed operationalMode for
* consistency.
* consistency.
* Dec 13, 2010 5805 cjeanbap Parse Report to get AFOS Product Id
* Jul 16, 2013 DR 16323 D. Friedman Use concurrent map
* Jul 16, 2013 16323 D. Friedman Use concurrent map
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author
@ -99,7 +100,7 @@ public class TextDecoder extends AbstractDecoder {
.getEnvProperties().getEnvValue("DEFAULTDATADIR")
+ "badTxt";
private Log logger = LogFactory.getLog(getClass());
private final Log logger = LogFactory.getLog(getClass());
private String pluginName;
@ -107,11 +108,11 @@ public class TextDecoder extends AbstractDecoder {
private String fileName;
private TextDB textdb = new TextDB();
private final TextDB textdb = new TextDB();
// keeps track of the headers that have been logged as not mapped and the
// time it was logged, so that each one is only logged once a day
private Map<String, Long> notMappedHeaders = new ConcurrentHashMap<String, Long>();
private final Map<String, Long> notMappedHeaders = new ConcurrentHashMap<String, Long>();
private long msgHdrLogTime = 0;
@ -158,7 +159,6 @@ public class TextDecoder extends AbstractDecoder {
if (pdo != null) {
pdo.setTraceId(traceId);
pdo.setPluginName(pluginName);
try {
pdo.constructDataURI();
} catch (PluginException e) {
@ -209,7 +209,7 @@ public class TextDecoder extends AbstractDecoder {
TextRecord pdo = null;
WMOReportData rptData = (WMOReportData) separator.next();
WMOReportData rptData = separator.next();
boolean operationalMode = true;
if (rptData != null) {
@ -227,8 +227,8 @@ public class TextDecoder extends AbstractDecoder {
if (afosIdContainer != null) {
List<AfosToAwips> afosIdList = afosIdContainer
.getIdList();
if (afosIdList != null
&& afosIdList.size() > 0) {
if ((afosIdList != null)
&& (afosIdList.size() > 0)) {
StringTokenizer st = new StringTokenizer(
rptData.getReportData(), "\n");
String potentialId = st.nextToken();
@ -266,20 +266,20 @@ public class TextDecoder extends AbstractDecoder {
+ rptHdr.getCccc();
Long time = notMappedHeaders.get(key);
long curTime = System.currentTimeMillis();
if (time == null
|| (curTime - time > NOT_FOUND_LOG_PERIOD)) {
if ((time == null)
|| ((curTime - time) > NOT_FOUND_LOG_PERIOD)) {
StringBuilder msg = new StringBuilder(200);
msg.append("Could not determine AFOS id for wmo header: [");
msg.append(rptHdr.toString());
msg.append("]");
if (msgHdr != null
if ((msgHdr != null)
&& !msgHdr.equals(rptHdr)) {
msg.append(" incoming message header [");
msg.append(msgHdr.toString());
msg.append("]");
}
if (curTime - msgHdrLogTime > MSG_HDR_LOG_PERIOD) {
if ((curTime - msgHdrLogTime) > MSG_HDR_LOG_PERIOD) {
msg.append("\nMsg for a given header will only be logged once in a "
+ (NOT_FOUND_LOG_PERIOD / MILLIS_PER_HOUR)
+ " hour period");
@ -319,7 +319,6 @@ public class TextDecoder extends AbstractDecoder {
if (pdo != null) {
pdo.setTraceId(traceId);
pdo.setPluginName(pluginName);
try {
pdo.constructDataURI();
} catch (PluginException e) {
@ -359,8 +358,8 @@ public class TextDecoder extends AbstractDecoder {
key = header.getOriginalMessage();
}
Long time = notMappedHeaders.get(key);
if (time == null
|| (curTime - time > NOT_FOUND_LOG_PERIOD)) {
if ((time == null)
|| ((curTime - time) > NOT_FOUND_LOG_PERIOD)) {
notMappedHeaders.put(key, curTime);
} else {
iter.remove();
@ -387,7 +386,7 @@ public class TextDecoder extends AbstractDecoder {
}
}
if (curTime - msgHdrLogTime > MSG_HDR_LOG_PERIOD) {
if ((curTime - msgHdrLogTime) > MSG_HDR_LOG_PERIOD) {
msg.append("\nMsg for a given header will only be logged once in a "
+ (NOT_FOUND_LOG_PERIOD / MILLIS_PER_HOUR)
+ " hour period");

View file

@ -38,9 +38,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 5, 2008 jkorman Initial creation
* Dec 05, 2008 jkorman Initial creation
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -108,4 +109,8 @@ public class TextRecord extends PluginDataObject {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "text";
}
}

View file

@ -41,22 +41,23 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* TODO Add Description
*
* <pre>
*
*
* SOFTWARE HISTORY
*
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 25, 2010 jsanchez Initial creation
*
* Mar 25, 2010 jsanchez Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
*
* @author jsanchez
* @version 1.0
* @version 1.0
*/
public class TextLightningDecoder extends AbstractDecoder implements
IBinaryDecoder {
private Log logger = LogFactory.getLog(getClass());
private final Log logger = LogFactory.getLog(getClass());
private String traceId = null;
@ -74,17 +75,18 @@ public class TextLightningDecoder extends AbstractDecoder implements
* @throws DecoderException
* Thrown if no data is available.
*/
@Override
public PluginDataObject[] decode(byte[] data) throws DecoderException {
ArrayList<LightningStrikePoint> strikes = new ArrayList<LightningStrikePoint>();
TextLightningParser parser = new TextLightningParser(data);
LightningStrikePoint token;
while(parser.hasNext()) {
while (parser.hasNext()) {
token = parser.next();
if(token != null) {
if (token != null) {
strikes.add(token);
}
}
}
BinLightningRecord report = null;
if (strikes.size() > 0) {
@ -106,15 +108,14 @@ public class TextLightningDecoder extends AbstractDecoder implements
Calendar cStart = report.getStartTime();
Calendar cStop = report.getStopTime();
TimeRange range = new TimeRange(cStart.getTimeInMillis(), cStop
.getTimeInMillis());
TimeRange range = new TimeRange(cStart.getTimeInMillis(),
cStop.getTimeInMillis());
DataTime dataTime = new DataTime(cStart, range);
report.setDataTime(dataTime);
if (report != null) {
report.setTraceId(traceId);
report.setPluginName("binlightning");
try {
report.constructDataURI();
} catch (PluginException e) {

View file

@ -20,10 +20,7 @@
package com.raytheon.edex.uengine.tasks.query;
import java.util.List;
import com.raytheon.edex.uengine.exception.MicroEngineException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginFactory;
@ -37,12 +34,14 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory;
*
* <pre>
* SOFTWARE HISTORY
* Date PR# Engineer Description
* ----------- ---------- ------------ --------------------------
* Mar 27, 2007 njensen Initial Creation.
* 9/21/2007 368 grichard Added plugin operations from superclass.
* 6/04/2008 875 bphillip Refactored to use DatabaseQuery
* </PRE>
* Date Ticket# Engineer Description
* ------------ ---------- ------------ ----------------------------------------
* Mar 27, 2007 njensen Initial Creation.
* Sep 21, 2007 368 grichard Added plugin operations from
* superclass.
* Jun 04, 2008 875 bphillip Refactored to use DatabaseQuery
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author njensen
*/
@ -61,6 +60,7 @@ public class TermQuery extends TableQuery {
* @throws PluginException
* @deprecated
*/
@Deprecated
public TermQuery(String aPlugin, String dummy1, String dummy2)
throws DataAccessLayerException, PluginException {
this(aPlugin);
@ -80,19 +80,6 @@ public class TermQuery extends TableQuery {
this.plugin = aPlugin;
}
@SuppressWarnings("unchecked")
public List<PluginDataObject> execute() throws Exception {
List<PluginDataObject> results = (List<PluginDataObject>) super
.execute();
if (results != null) {
for (int i = 0; i < results.size(); i++) {
results.get(i).setPluginName(plugin);
}
}
return results;
}
/**
*
* @return

View file

@ -65,15 +65,17 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 21, 2009 1939 jkorman Initial creation
* Apr 09, 2009 952 jsanchez Updated getValue method.
* Added a getMessageData method.
* Apr 21, 2009 2245 jsanchez Returned temperature unit to kelvin.
* May 21, 2009 2338 jsanchez Updated the getMessageData.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Jan 21, 2009 1939 jkorman Initial creation
* Apr 09, 2009 952 jsanchez Updated getValue method. Added a
* getMessageData method.
* Apr 21, 2009 2245 jsanchez Returned temperature unit to kelvin.
* May 21, 2009 2338 jsanchez Updated the getMessageData.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -87,12 +89,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "acars",
indexes = {
@Index(name = "acars_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "acars", indexes = { @Index(name = "acars_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -698,9 +696,9 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled,
a = new Amount(getLatitude(), LOCATION_UNIT);
} else if (STA_LON.equals(pName)) {
a = new Amount(getLongitude(), LOCATION_UNIT);
} else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) {
} else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) {
a = new Amount(getFlightLevel().intValue(), FLIGHT_LEVEL_UNIT);
} else if (SFC_DWPT.equals(pName) && getDwpt() != null) {
} else if (SFC_DWPT.equals(pName) && (getDwpt() != null)) {
a = new Amount(getDwpt(), TEMPERATURE_UNIT);
}
@ -724,47 +722,53 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled,
return String.format(TEXT_FMT, getTailNumber(), getTimeObs());
}
/* (non-Javadoc)
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
result = (prime * result)
+ ((tailNumber == null) ? 0 : tailNumber.hashCode());
result = prime * result + ((timeObs == null) ? 0 : timeObs.hashCode());
result = (prime * result)
+ ((timeObs == null) ? 0 : timeObs.hashCode());
return result;
}
/* (non-Javadoc)
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
ACARSRecord other = (ACARSRecord) obj;
if (tailNumber == null) {
if (other.tailNumber != null)
if (other.tailNumber != null) {
return false;
} else if (!tailNumber.equals(other.tailNumber))
}
} else if (!tailNumber.equals(other.tailNumber)) {
return false;
}
if (timeObs == null) {
if (other.timeObs != null)
if (other.timeObs != null) {
return false;
} else if (!timeObs.equals(other.timeObs))
}
} else if (!timeObs.equals(other.timeObs)) {
return false;
}
return true;
}
@ -782,7 +786,7 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled,
if (this == other) {
result = EQUAL;
} else {
if(getTailNumber().equals(getTailNumber())) {
if (getTailNumber().equals(getTailNumber())) {
result = timeObs.compareTo(other.timeObs);
} else {
result = getTailNumber().compareTo(other.getTailNumber());
@ -790,11 +794,16 @@ public class ACARSRecord extends PluginDataObject implements ISpatialEnabled,
}
return result;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "acars";
}
}

View file

@ -64,11 +64,13 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20090403 1939 jkorman Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 03, 2009 1939 jkorman Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -82,12 +84,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "acarssounding",
indexes = {
@Index(name = "acarssounding_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "acarssounding", indexes = { @Index(name = "acarssounding_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -122,12 +120,12 @@ public class ACARSSoundingRecord extends PluginDataObject implements
@XmlElement
private String tailNumber;
// Flight phase (A[scending] D[escending])
// Flight phase (A[scending] D[escending])
@Column(length = 1)
@DynamicSerializeElement
@XmlElement
private String phase = null;
// oldest observation time in this sounding
@Column
@DynamicSerializeElement
@ -139,7 +137,7 @@ public class ACARSSoundingRecord extends PluginDataObject implements
@DynamicSerializeElement
@XmlElement
private Long newestTime = Long.MIN_VALUE;
// The level data for this observation.
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parent", fetch = FetchType.EAGER)
@XmlElement
@ -261,7 +259,7 @@ public class ACARSSoundingRecord extends PluginDataObject implements
public void setTailNumber(String tailNumber) {
this.tailNumber = tailNumber;
}
/**
* @return the phase
*/
@ -270,7 +268,8 @@ public class ACARSSoundingRecord extends PluginDataObject implements
}
/**
* @param phase the phase to set
* @param phase
* the phase to set
*/
public void setPhase(String phase) {
this.phase = phase;
@ -284,7 +283,8 @@ public class ACARSSoundingRecord extends PluginDataObject implements
}
/**
* @param oldestTime the oldestTime to set
* @param oldestTime
* the oldestTime to set
*/
public void setOldestTime(Long oldestTime) {
this.oldestTime = oldestTime;
@ -298,7 +298,8 @@ public class ACARSSoundingRecord extends PluginDataObject implements
}
/**
* @param newestTime the newestTime to set
* @param newestTime
* the newestTime to set
*/
public void setNewestTime(Long newestTime) {
this.newestTime = newestTime;
@ -328,17 +329,17 @@ public class ACARSSoundingRecord extends PluginDataObject implements
* @param cloud
*/
public void addLevel(ACARSSoundingLayer level) {
if(level != null) {
if (level != null) {
level.setParent(this);
if (levels == null) {
levels = new HashSet<ACARSSoundingLayer>();
}
levels.add(level);
long cTime = level.getTimeObs().getTimeInMillis();
if(cTime < oldestTime) {
if (cTime < oldestTime) {
oldestTime = cTime;
}
if(cTime > newestTime) {
if (cTime > newestTime) {
newestTime = cTime;
}
}
@ -386,4 +387,9 @@ public class ACARSSoundingRecord extends PluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "acarssounding";
}
}

View file

@ -69,16 +69,19 @@ import com.vividsolutions.jts.geom.Geometry;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080103 384 jkorman Initial Coding.
* 20080107 720 jkorman remove default assignments from attributes.
* 20120405 435 dgilling Prevent NullPointerExceptions in
* Jan 03, 2008 384 jkorman Initial Coding.
* Jan 07, 2008 720 jkorman remove default assignments from
* attributes.
* Apr 05, 2012 435 dgilling Prevent NullPointerExceptions in
* buildMessageData().
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* 20120911 1011 jkorman Added ability to report turbulence from decoded
* TB group.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Sep 11, 2012 1011 jkorman Added ability to report turbulence from
* decoded TB group.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -92,12 +95,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "airep",
indexes = {
@Index(name = "airep_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "airep", indexes = { @Index(name = "airep_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -330,7 +329,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
*/
public String getReportData() {
String s = null;
if (messageData != null && messageData instanceof String) {
if ((messageData != null) && (messageData instanceof String)) {
s = (String) messageData;
} else {
s = buildMessageData();
@ -593,7 +592,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
a = new Amount(this.getLatitude(), LOCATION_UNIT);
} else if (STA_LON.equals(pName)) {
a = new Amount(this.getLongitude(), LOCATION_UNIT);
} else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) {
} else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) {
a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT);
}
@ -627,7 +626,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
String[] retValue = null;
String value = null;
if ("FLT_HZD".matches(paramName) && flightHazard != null) {
if ("FLT_HZD".matches(paramName) && (flightHazard != null)) {
if (flightHazard != null) {
retValue = new String[] { flightHazard.toString() };
}
@ -720,7 +719,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
boolean validLocation = (location != null);
StringBuilder messageData = new StringBuilder("ARP ");
if (validLocation && getStationId() != null) {
if (validLocation && (getStationId() != null)) {
messageData.append(getStationId());
}
messageData.append(' ');
@ -739,7 +738,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
}
messageData.append(" F");
if (validLocation && getFlightLevel() != null) {
if (validLocation && (getFlightLevel() != null)) {
int flightLevel = (int) ftToHft.convert(getFlightLevel());
messageData.append(flightLevel);
}
@ -761,7 +760,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
messageData.append(windSpeed.intValue());
messageData.append("KT");
}
if(flightConditions != null) {
if (flightConditions != null) {
int turb = flightConditions >> 4;
if ((turb & 0x80) > 0) {
messageData.append(" TB");
@ -831,7 +830,7 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
result = (prime * result)
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
return result;
}
@ -871,4 +870,9 @@ public class AirepRecord extends PluginDataObject implements ISpatialEnabled,
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "airep";
}
}

View file

@ -62,24 +62,27 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
*
* Date Ticket# Engineer Description
* ---------- ---------- ----------- --------------------------
* 20070810 379 jkorman Initial Coding from prototype.
* 20070817 379 jkorman Fixed convert(). Was writing day into
* Aug 10, 2007 379 jkorman Initial Coding from prototype.
* Aug 17, 2007 379 jkorman Fixed convert(). Was writing day into
* hours field of new calendar.
* 20070920 379 jkorman Modified getPersistenceTime.
* 20070921 379 jkorman Modified get/set start/stop times due
* Sep 20, 2007 379 jkorman Modified getPersistenceTime.
* Sep 21, 2007 379 jkorman Modified get/set start/stop times due
* to JiBX problems.
* 20070924 379 jkorman Removed Group, added insert_time and
* (set/get)ers to make DataURI work.
* 20071129 472 jkorman Added IDecoderGettable interface.
* 20080107 720 jkorman remove default assignments from attributes.
* 20080708 1174 jkorman Added persistenceTime handling.
* 20090206 1990 bphillip Removed populateDataStore method
* 20130227 DCS 152 jgerth/elau Support for WWLLN and multiple sources
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* 20130408 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Sep 24, 2007 379 jkorman Removed Group, added insert_time and
* (set/get)ers to make DataURI work.
* Nov 29, 2007 472 jkorman Added IDecoderGettable interface.
* Jan 07, 2008 720 jkorman remove default assignments from
* attributes.
* Jul 08, 2008 1174 jkorman Added persistenceTime handling.
* Feb 06, 2009 1990 bphillip Removed populateDataStore method
* Feb 27, 2013 DCS 152 jgerth/elau Support for WWLLN and multiple sources
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -93,17 +96,13 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "binlightning",
indexes = {
@Index(name = "binlightning_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "binlightning", indexes = { @Index(name = "binlightning_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@DynamicSerialize
@XmlAccessorType(XmlAccessType.NONE)
public class BinLightningRecord extends
PersistablePluginDataObject implements IPersistable {
public class BinLightningRecord extends PersistablePluginDataObject implements
IPersistable {
/** Serializable id * */
private static final long serialVersionUID = 1L;
@ -159,7 +158,7 @@ public class BinLightningRecord extends
@DynamicSerializeElement
@XmlAttribute
private Calendar stopTime;
// JJG - source of lightning data
@Column(length = 5)
@DataURI(position = 3)
@ -221,8 +220,8 @@ public class BinLightningRecord extends
*/
@SuppressWarnings("unused")
private void updatePersistenceTime() {
if (startTimeMillis != Long.MAX_VALUE
&& stopTimeMillis != Long.MIN_VALUE) {
if ((startTimeMillis != Long.MAX_VALUE)
&& (stopTimeMillis != Long.MIN_VALUE)) {
persistTime = (startTimeMillis + stopTimeMillis) / 2;
setPersistenceTime(TimeTools.newCalendar(persistTime).getTime());
} else {
@ -238,24 +237,25 @@ public class BinLightningRecord extends
* A strike report to add.
*/
public void addStrike(LightningStrikePoint strike) {
// jjg add
if (lightSource == null) {
if (strike.getLightSource() == null) {
lightSource = (String) "NLDN";
} else if (strike.getLightSource().isEmpty()) {
lightSource = (String) "UNKN";
} else {
lightSource = (String) strike.getLightSource();
}
} else {
if (strike.getLightSource() == null) {
lightSource = (String) "NLDN";
} else if (!lightSource.equals(strike.getLightSource()))
lightSource = (String) "UNKN";
}
// end
// jjg add
if (lightSource == null) {
if (strike.getLightSource() == null) {
lightSource = "NLDN";
} else if (strike.getLightSource().isEmpty()) {
lightSource = "UNKN";
} else {
lightSource = strike.getLightSource();
}
} else {
if (strike.getLightSource() == null) {
lightSource = "NLDN";
} else if (!lightSource.equals(strike.getLightSource())) {
lightSource = "UNKN";
}
}
// end
if (insertIndex < obsTimes.length) {
if (insertIndex < obsTimes.length) {
long t1 = startTimeMillis;
Calendar c = TimeTools.getBaseCalendar(strike.getYear(),
@ -445,7 +445,7 @@ public class BinLightningRecord extends
public void setLightSource(String lightSource) {
this.lightSource = lightSource;
}
/**
* Get the IDecoderGettable reference for this record.
*
@ -506,4 +506,9 @@ public class BinLightningRecord extends
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "binlightning";
}
}

View file

@ -60,6 +60,7 @@ import com.vividsolutions.jts.geom.Geometry;
* PluginDataObject.
* May 17, 2013 1869 bsteffen Remove DataURI column from sat plot
* types.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -74,283 +75,283 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "bufrascat",
indexes = {
@Index(name = "bufrascat_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "bufrascat", indexes = { @Index(name = "bufrascat_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
public class AScatObs extends PersistablePluginDataObject implements
ISpatialEnabled, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@DataURI(position = 1)
@DynamicSerializeElement
private Integer satId;
@DataURI(position = 1)
@DynamicSerializeElement
private Integer satId;
@Embedded
@DataURI(position = 2, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DataURI(position = 2, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
private String wmoHeader;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
private String wmoHeader;
@DynamicSerializeElement
@Transient
private Integer orbitNumber;
@DynamicSerializeElement
@Transient
private Integer orbitNumber;
// The observation time.
@DynamicSerializeElement
@Transient
private Calendar validTime;
// The observation time.
@DynamicSerializeElement
@Transient
private Calendar validTime;
@DynamicSerializeElement
@Transient
private Double windDir;
@DynamicSerializeElement
@Transient
private Double windDir;
@DataURI(position = 3)
@DynamicSerializeElement
private Float windSpd;
@DataURI(position = 3)
@DynamicSerializeElement
private Float windSpd;
@DynamicSerializeElement
@Transient
private Double probRain;
@DynamicSerializeElement
@Transient
private Double probRain;
@DynamicSerializeElement
@Transient
private Integer rainIndex;
@DynamicSerializeElement
@Transient
private Integer rainIndex;
/**
* Empty constructor.
*/
public AScatObs() {
}
/**
* Empty constructor.
*/
public AScatObs() {
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public AScatObs(String uri) {
super(uri);
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public AScatObs(String uri) {
super(uri);
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @return the orbitNumber
*/
public Integer getOrbitNumber() {
return orbitNumber;
}
/**
* @return the orbitNumber
*/
public Integer getOrbitNumber() {
return orbitNumber;
}
/**
* @param orbitNumber
* the orbitNumber to set
*/
public void setOrbitNumber(Integer orbitNumber) {
this.orbitNumber = orbitNumber;
}
/**
* @param orbitNumber
* the orbitNumber to set
*/
public void setOrbitNumber(Integer orbitNumber) {
this.orbitNumber = orbitNumber;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @return the windDir
*/
public Double getWindDir() {
return windDir;
}
/**
* @return the windDir
*/
public Double getWindDir() {
return windDir;
}
/**
* @param windDir
* the windDir to set
*/
public void setWindDir(Double windDir) {
this.windDir = windDir;
}
/**
* @param windDir
* the windDir to set
*/
public void setWindDir(Double windDir) {
this.windDir = windDir;
}
/**
* @return the windSpd
*/
public Float getWindSpd() {
return windSpd;
}
/**
* @return the windSpd
*/
public Float getWindSpd() {
return windSpd;
}
/**
* @param windSpd
* the windSpd to set
*/
public void setWindSpd(Float windSpd) {
this.windSpd = windSpd;
}
/**
* @param windSpd
* the windSpd to set
*/
public void setWindSpd(Float windSpd) {
this.windSpd = windSpd;
}
/**
* @return the probRain
*/
public Double getProbRain() {
return probRain;
}
/**
* @return the probRain
*/
public Double getProbRain() {
return probRain;
}
/**
* @param probRain
* the probRain to set
*/
public void setProbRain(Double probRain) {
this.probRain = probRain;
}
/**
* @param probRain
* the probRain to set
*/
public void setProbRain(Double probRain) {
this.probRain = probRain;
}
/**
* @return the rainIndex
*/
public Integer getRainIndex() {
return rainIndex;
}
/**
* @return the rainIndex
*/
public Integer getRainIndex() {
return rainIndex;
}
/**
* @param rainIndex
* the rainIndex to set
*/
public void setRainIndex(Integer rainIndex) {
this.rainIndex = rainIndex;
}
/**
* @param rainIndex
* the rainIndex to set
*/
public void setRainIndex(Integer rainIndex) {
this.rainIndex = rainIndex;
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getValidTime() {
return validTime;
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getValidTime() {
return validTime;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setValidTime(Calendar time) {
validTime = time;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setValidTime(Calendar time) {
validTime = time;
}
@Override
public ISpatialObject getSpatialObject() {
return location;
}
@Override
public ISpatialObject getSpatialObject() {
return location;
}
/**
/**
*
*/
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
/**
/**
*
*/
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public String getPluginName() {
return "bufrascat";
}
}

View file

@ -60,10 +60,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 17, 2009 jkorman Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -77,213 +79,215 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "bufrncwf",
indexes = {
@Index(name = "bufrncwf_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "bufrncwf", indexes = { @Index(name = "bufrncwf_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class BUFRncwf extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
@Transient
@XmlElement
@DynamicSerializeElement
private NCWFFeature detection;
@Transient
@XmlElement
@DynamicSerializeElement
private NCWFFeature detection;
@Transient
@XmlElement
@DynamicSerializeElement
private NCWFFeature forecast;
@Transient
@XmlElement
@DynamicSerializeElement
private NCWFFeature forecast;
@Transient
@XmlAttribute
@DynamicSerializeElement
private Double stormDir;
@Transient
@XmlAttribute
@DynamicSerializeElement
private Double stormDir;
@Transient
@XmlAttribute
@DynamicSerializeElement
private Double stormSpeed;
@Transient
@XmlAttribute
@DynamicSerializeElement
private Double stormSpeed;
@Transient
@XmlAttribute
@DynamicSerializeElement
private Double stormTop;
@Transient
@XmlAttribute
@DynamicSerializeElement
private Double stormTop;
/**
* Empty constructor.
*/
public BUFRncwf() {
}
/**
* Empty constructor.
*/
public BUFRncwf() {
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public BUFRncwf(String uri) {
super(uri);
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public BUFRncwf(String uri) {
super(uri);
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @return the detection
*/
public NCWFFeature getDetection() {
return detection;
}
/**
* @return the detection
*/
public NCWFFeature getDetection() {
return detection;
}
/**
* @param detection
* the detection to set
*/
public void setDetection(NCWFFeature detection) {
this.detection = detection;
}
/**
* @param detection
* the detection to set
*/
public void setDetection(NCWFFeature detection) {
this.detection = detection;
}
/**
* @return the forecast
*/
public NCWFFeature getForecast() {
return forecast;
}
/**
* @return the forecast
*/
public NCWFFeature getForecast() {
return forecast;
}
/**
* @param forecast
* the forecast to set
*/
public void setForecast(NCWFFeature forecast) {
this.forecast = forecast;
}
/**
* @param forecast
* the forecast to set
*/
public void setForecast(NCWFFeature forecast) {
this.forecast = forecast;
}
/**
* @return the stormDir
*/
public Double getStormDir() {
return stormDir;
}
/**
* @return the stormDir
*/
public Double getStormDir() {
return stormDir;
}
/**
* @param stormDir
* the stormDir to set
*/
public void setStormDir(Double stormDir) {
this.stormDir = stormDir;
}
/**
* @param stormDir
* the stormDir to set
*/
public void setStormDir(Double stormDir) {
this.stormDir = stormDir;
}
/**
* @return the stormSpeed
*/
public Double getStormSpeed() {
return stormSpeed;
}
/**
* @return the stormSpeed
*/
public Double getStormSpeed() {
return stormSpeed;
}
/**
* @param stormSpeed
* the stormSpeed to set
*/
public void setStormSpeed(Double stormSpeed) {
this.stormSpeed = stormSpeed;
}
/**
* @param stormSpeed
* the stormSpeed to set
*/
public void setStormSpeed(Double stormSpeed) {
this.stormSpeed = stormSpeed;
}
/**
* @return the stormTop
*/
public Double getStormTop() {
return stormTop;
}
/**
* @return the stormTop
*/
public Double getStormTop() {
return stormTop;
}
/**
* @param stormTop
* the stormTop to set
*/
public void setStormTop(Double stormTop) {
this.stormTop = stormTop;
}
/**
* @param stormTop
* the stormTop to set
*/
public void setStormTop(Double stormTop) {
this.stormTop = stormTop;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public ISpatialObject getSpatialObject() {
return location;
}
@Override
public ISpatialObject getSpatialObject() {
return location;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
/**
/**
*
*/
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
/**
/**
*
*/
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "bufrncwf";
}
}

View file

@ -61,11 +61,13 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 18, 2009 2520 jkorman Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Jun 18, 2009 2520 jkorman Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -79,324 +81,326 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "bufrquikscat",
indexes = {
@Index(name = "bufrquikscat_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "bufrquikscat", indexes = { @Index(name = "bufrquikscat_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class QUIKScatObs extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@DataURI(position = 1)
@XmlAttribute
@DynamicSerializeElement
private Integer satId;
@DataURI(position = 1)
@XmlAttribute
@DynamicSerializeElement
private Integer satId;
@Embedded
@DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
@XmlElement
private String wmoHeader;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
@XmlElement
private String wmoHeader;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Integer orbitNumber;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Integer orbitNumber;
// The observation time.
@XmlAttribute
@DynamicSerializeElement
@Transient
private Calendar timeObs;
// The observation time.
@XmlAttribute
@DynamicSerializeElement
@Transient
private Calendar timeObs;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Double windDir;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Double windDir;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Double windSpd;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Double windSpd;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Double probRain;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Double probRain;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Integer rainIndex;
@XmlAttribute
@DynamicSerializeElement
@Transient
private Integer rainIndex;
/**
* Empty constructor.
*/
public QUIKScatObs() {
}
/**
* Empty constructor.
*/
public QUIKScatObs() {
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public QUIKScatObs(String uri) {
super(uri);
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public QUIKScatObs(String uri) {
super(uri);
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @return the location
*/
public SurfaceObsLocation getLocation() {
return location;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @param location
* the location to set
*/
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @return the orbitNumber
*/
public Integer getOrbitNumber() {
return orbitNumber;
}
/**
* @return the orbitNumber
*/
public Integer getOrbitNumber() {
return orbitNumber;
}
/**
* @param orbitNumber
* the orbitNumber to set
*/
public void setOrbitNumber(Integer orbitNumber) {
this.orbitNumber = orbitNumber;
}
/**
* @param orbitNumber
* the orbitNumber to set
*/
public void setOrbitNumber(Integer orbitNumber) {
this.orbitNumber = orbitNumber;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @return the windDir
*/
public Double getWindDir() {
return windDir;
}
/**
* @return the windDir
*/
public Double getWindDir() {
return windDir;
}
/**
* @param windDir
* the windDir to set
*/
public void setWindDir(Double windDir) {
this.windDir = windDir;
}
/**
* @param windDir
* the windDir to set
*/
public void setWindDir(Double windDir) {
this.windDir = windDir;
}
/**
* @return the windSpd
*/
public Double getWindSpd() {
return windSpd;
}
/**
* @return the windSpd
*/
public Double getWindSpd() {
return windSpd;
}
/**
* @param windSpd
* the windSpd to set
*/
public void setWindSpd(Double windSpd) {
this.windSpd = windSpd;
}
/**
* @param windSpd
* the windSpd to set
*/
public void setWindSpd(Double windSpd) {
this.windSpd = windSpd;
}
/**
* @return the probRain
*/
public Double getProbRain() {
return probRain;
}
/**
* @return the probRain
*/
public Double getProbRain() {
return probRain;
}
/**
* @param probRain
* the probRain to set
*/
public void setProbRain(Double probRain) {
this.probRain = probRain;
}
/**
* @param probRain
* the probRain to set
*/
public void setProbRain(Double probRain) {
this.probRain = probRain;
}
/**
* @return the rainIndex
*/
public Integer getRainIndex() {
return rainIndex;
}
/**
* @return the rainIndex
*/
public Integer getRainIndex() {
return rainIndex;
}
/**
* @param rainIndex
* the rainIndex to set
*/
public void setRainIndex(Integer rainIndex) {
this.rainIndex = rainIndex;
}
/**
* @param rainIndex
* the rainIndex to set
*/
public void setRainIndex(Integer rainIndex) {
this.rainIndex = rainIndex;
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getTimeObs() {
return timeObs;
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getTimeObs() {
return timeObs;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public ISpatialObject getSpatialObject() {
return location;
}
@Override
public ISpatialObject getSpatialObject() {
return location;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
/**
/**
*
*/
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
/**
/**
*
*/
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "bufrquikscat";
}
}

View file

@ -60,10 +60,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 18, 2009 jkorman Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -77,250 +79,251 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "bufrsigwx",
indexes = {
@Index(name = "bufrswigwx_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "bufrsigwx", indexes = { @Index(name = "bufrswigwx_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public class SigWxData extends PersistablePluginDataObject implements
IDecoderGettable, IPointData, IPersistable {
IDecoderGettable, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@Column
@DataURI(position = 1)
@XmlElement
@DynamicSerializeElement
private SigWxLayer wxLayer;
@Column
@DataURI(position = 1)
@XmlElement
@DynamicSerializeElement
private SigWxLayer wxLayer;
@Column
@DataURI(position = 2)
@XmlElement
@DynamicSerializeElement
private SigWxType wxType;
@Column
@DataURI(position = 2)
@XmlElement
@DynamicSerializeElement
private SigWxType wxType;
@Column
@DataURI(position = 3)
@XmlAttribute
@DynamicSerializeElement
private Integer key;
@Column
@DataURI(position = 3)
@XmlAttribute
@DynamicSerializeElement
private Integer key;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer baseHeight;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer baseHeight;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer topHeight;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer topHeight;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
@XmlElement
private String wmoHeader;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
@XmlElement
private String wmoHeader;
@Transient
@DynamicSerializeElement
@XmlElement
private TropopauseLayerData tropData;
@Transient
@DynamicSerializeElement
@XmlElement
private TropopauseLayerData tropData;
/**
* Empty constructor.
*/
public SigWxData() {
}
/**
* Empty constructor.
*/
public SigWxData() {
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public SigWxData(String uri) {
super(uri);
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public SigWxData(String uri) {
super(uri);
}
/**
* @return the wxLayer
*/
public SigWxLayer getWxLayer() {
return wxLayer;
}
/**
* @return the wxLayer
*/
public SigWxLayer getWxLayer() {
return wxLayer;
}
/**
* @param wxLayer
* the wxLayer to set
*/
public void setWxLayer(SigWxLayer wxLayer) {
this.wxLayer = wxLayer;
}
/**
* @param wxLayer
* the wxLayer to set
*/
public void setWxLayer(SigWxLayer wxLayer) {
this.wxLayer = wxLayer;
}
/**
* @return the wxType
*/
public SigWxType getWxType() {
return wxType;
}
/**
* @return the wxType
*/
public SigWxType getWxType() {
return wxType;
}
/**
* @param wxType
* the wxType to set
*/
public void setWxType(SigWxType wxType) {
this.wxType = wxType;
}
/**
* @param wxType
* the wxType to set
*/
public void setWxType(SigWxType wxType) {
this.wxType = wxType;
}
/**
* @return the baseHeight
*/
public Integer getBaseHeight() {
return baseHeight;
}
/**
* @return the baseHeight
*/
public Integer getBaseHeight() {
return baseHeight;
}
/**
* @param baseHeight
* the baseHeight to set
*/
public void setBaseHeight(Integer baseHeight) {
this.baseHeight = baseHeight;
}
/**
* @param baseHeight
* the baseHeight to set
*/
public void setBaseHeight(Integer baseHeight) {
this.baseHeight = baseHeight;
}
/**
* @return the topHeight
*/
public Integer getTopHeight() {
return topHeight;
}
/**
* @return the topHeight
*/
public Integer getTopHeight() {
return topHeight;
}
/**
* @param topHeight
* the topHeight to set
*/
public void setTopHeight(Integer topHeight) {
this.topHeight = topHeight;
}
/**
* @param topHeight
* the topHeight to set
*/
public void setTopHeight(Integer topHeight) {
this.topHeight = topHeight;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @return the tropData
*/
public TropopauseLayerData getTropData() {
return tropData;
}
/**
* @return the tropData
*/
public TropopauseLayerData getTropData() {
return tropData;
}
/**
* @param tropData
* the tropData to set
*/
public void setTropData(TropopauseLayerData tropData) {
this.tropData = tropData;
}
/**
* @param tropData
* the tropData to set
*/
public void setTropData(TropopauseLayerData tropData) {
this.tropData = tropData;
}
/**
* @return the key
*/
public Integer getKey() {
return key;
}
/**
* @return the key
*/
public Integer getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(Integer key) {
this.key = key;
}
/**
* @param key
* the key to set
*/
public void setKey(Integer key) {
this.key = key;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
/**
/**
*
*/
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
/**
/**
*
*/
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
/**
*
* @return
*/
public final SigWxData copyObs() {
SigWxData obs = new SigWxData();
/**
*
* @return
*/
public final SigWxData copyObs() {
SigWxData obs = new SigWxData();
obs.dataTime = dataTime.clone();
obs.pluginName = pluginName;
obs.dataTime = dataTime.clone();
obs.baseHeight = baseHeight;
obs.topHeight = topHeight;
obs.wxLayer = wxLayer;
obs.wxType = wxType;
obs.wmoHeader = wmoHeader;
obs.baseHeight = baseHeight;
obs.topHeight = topHeight;
obs.wxLayer = wxLayer;
obs.wxType = wxType;
obs.wmoHeader = wmoHeader;
return obs;
}
return obs;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "bufrsigwx";
}
}

View file

@ -61,6 +61,7 @@ import com.vividsolutions.jts.geom.Geometry;
* PluginDataObject.
* May 17, 2013 1869 bsteffen Remove DataURI column from sat plot
* types.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -75,300 +76,300 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "bufrssmi",
indexes = {
@Index(name = "bufrssmi_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "bufrssmi", indexes = { @Index(name = "bufrssmi_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
public class SSMIScanData extends PersistablePluginDataObject implements
ISpatialEnabled, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@DataURI(position = 1)
@XmlAttribute
@DynamicSerializeElement
private Integer satId;
@DataURI(position = 1)
@XmlAttribute
@DynamicSerializeElement
private Integer satId;
@Embedded
@DataURI(position = 2, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DataURI(position = 2, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
@DynamicSerializeElement
@Transient
private Integer orbitNumber;
@DynamicSerializeElement
@Transient
private Integer orbitNumber;
@DynamicSerializeElement
@Transient
private Integer scanNumber;
@DynamicSerializeElement
@Transient
private Integer scanNumber;
@DynamicSerializeElement
@Transient
private Integer posNumber;
@DynamicSerializeElement
@Transient
private Integer posNumber;
// The profiler observation time.
@Column
@DynamicSerializeElement
private Calendar timeObs;
// The profiler observation time.
@Column
@DynamicSerializeElement
private Calendar timeObs;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
private String wmoHeader;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
private String wmoHeader;
/**
* Empty constructor.
*/
public SSMIScanData() {
}
/**
* Empty constructor.
*/
public SSMIScanData() {
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public SSMIScanData(String uri) {
super(uri);
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public SSMIScanData(String uri) {
super(uri);
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @return the orbitNumber
*/
public Integer getOrbitNumber() {
return orbitNumber;
}
/**
* @return the orbitNumber
*/
public Integer getOrbitNumber() {
return orbitNumber;
}
/**
* @param orbitNumber
* the orbitNumber to set
*/
public void setOrbitNumber(Integer orbitNumber) {
this.orbitNumber = orbitNumber;
}
/**
* @param orbitNumber
* the orbitNumber to set
*/
public void setOrbitNumber(Integer orbitNumber) {
this.orbitNumber = orbitNumber;
}
/**
* @return the scanNumber
*/
public Integer getScanNumber() {
return scanNumber;
}
/**
* @return the scanNumber
*/
public Integer getScanNumber() {
return scanNumber;
}
/**
* @param scanNumber
* the scanNumber to set
*/
public void setScanNumber(Integer scanNumber) {
this.scanNumber = scanNumber;
}
/**
* @param scanNumber
* the scanNumber to set
*/
public void setScanNumber(Integer scanNumber) {
this.scanNumber = scanNumber;
}
/**
* @return the posNumber
*/
public Integer getPosNumber() {
return posNumber;
}
/**
* @return the posNumber
*/
public Integer getPosNumber() {
return posNumber;
}
/**
* @param posNumber
* the posNumber to set
*/
public void setPosNumber(Integer posNumber) {
this.posNumber = posNumber;
}
/**
* @param posNumber
* the posNumber to set
*/
public void setPosNumber(Integer posNumber) {
this.posNumber = posNumber;
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getTimeObs() {
return timeObs;
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getTimeObs() {
return timeObs;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
public SurfaceObsLocation getLocation() {
return location;
}
public SurfaceObsLocation getLocation() {
return location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
/**
*
*/
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
/**
/**
*
*/
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
/**
*
* @return
*/
public final SSMIScanData copyObs() {
SSMIScanData obs = new SSMIScanData();
/**
*
* @return
*/
public final SSMIScanData copyObs() {
SSMIScanData obs = new SSMIScanData();
obs.dataTime = dataTime.clone();
obs.timeObs = TimeTools.copy(timeObs);
obs.orbitNumber = orbitNumber;
obs.satId = satId;
obs.scanNumber = scanNumber;
obs.wmoHeader = wmoHeader;
obs.dataTime = dataTime.clone();
obs.timeObs = TimeTools.copy(timeObs);
obs.orbitNumber = orbitNumber;
obs.satId = satId;
obs.scanNumber = scanNumber;
obs.wmoHeader = wmoHeader;
return obs;
}
return obs;
}
/**
* Returns the hashCode for this object. This implementation returns the
* hashCode of the generated dataURI.
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
return result;
}
/**
* Returns the hashCode for this object. This implementation returns the
* hashCode of the generated dataURI.
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result)
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
return result;
}
/**
* Checks if this record is equal to another by checking the generated
* dataURI.
*
* @param obj
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
SSMIScanData other = (SSMIScanData) obj;
if (getDataURI() == null) {
if (other.getDataURI() != null) {
return false;
}
} else if (!getDataURI().equals(other.getDataURI())) {
return false;
}
return true;
}
/**
* Checks if this record is equal to another by checking the generated
* dataURI.
*
* @param obj
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
SSMIScanData other = (SSMIScanData) obj;
if (getDataURI() == null) {
if (other.getDataURI() != null) {
return false;
}
} else if (!getDataURI().equals(other.getDataURI())) {
return false;
}
return true;
}
@Override
public String getPluginName() {
return "bufrssmi";
}
}

View file

@ -56,11 +56,13 @@ import com.vividsolutions.jts.geom.Coordinate;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 1, 2010 jsanchez Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Feb 01, 2010 jsanchez Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -74,132 +76,134 @@ import com.vividsolutions.jts.geom.Coordinate;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "cwa",
indexes = {
@Index(name = "cwa_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "cwa", indexes = { @Index(name = "cwa_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class CWARecord extends PersistablePluginDataObject implements
IPointData, IPersistable {
IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
// Text of the WMO header
@Transient
@XmlElement
@DynamicSerializeElement
private String wmoHeader = "";
// Text of the WMO header
@Transient
@XmlElement
@DynamicSerializeElement
private String wmoHeader = "";
@Transient
@XmlElement
@DynamicSerializeElement
private CWADimension dimension;
@Transient
@XmlElement
@DynamicSerializeElement
private CWADimension dimension;
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private String eventId;
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private String eventId;
@Transient
@XmlElement
@DynamicSerializeElement
private Coordinate[] coordinates;
@Transient
@XmlElement
@DynamicSerializeElement
private Coordinate[] coordinates;
@Transient
@XmlElement
@DynamicSerializeElement
private String text;
@Transient
@XmlElement
@DynamicSerializeElement
private String text;
public CWADimension getDimension() {
return dimension;
}
public CWADimension getDimension() {
return dimension;
}
public void setDimension(CWADimension dimension) {
this.dimension = dimension;
}
public void setDimension(CWADimension dimension) {
this.dimension = dimension;
}
public String getWmoHeader() {
return wmoHeader;
}
public String getWmoHeader() {
return wmoHeader;
}
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
public Coordinate[] getCoordinates() {
return coordinates;
}
public Coordinate[] getCoordinates() {
return coordinates;
}
public void setCoordinates(Coordinate[] coordinates) {
this.coordinates = coordinates;
}
public void setCoordinates(Coordinate[] coordinates) {
this.coordinates = coordinates;
}
public String getEventId() {
return eventId;
}
public String getEventId() {
return eventId;
}
public void setEventId(String eventId) {
this.eventId = eventId;
}
public void setEventId(String eventId) {
this.eventId = eventId;
}
/**
* Set the data uri for this observation.
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
super.setDataURI(dataURI);
identifier = dataURI;
}
/**
* Set the data uri for this observation.
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
super.setDataURI(dataURI);
identifier = dataURI;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
public String getText() {
return text;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public void setText(String text) {
this.text = text;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Calendar c = getDataTime().getRefTimeAsCalendar();
if (c != null) {
sb.append(String.format("CWA:%1$tY%1$tm%1$td%1$tH%1$tM",
getDataTime().getRefTimeAsCalendar()));
} else {
sb.append("CWA:YYYYMMDDHHmm");
}
return sb.toString();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Calendar c = getDataTime().getRefTimeAsCalendar();
if (c != null) {
sb.append(String.format("CWA:%1$tY%1$tm%1$td%1$tH%1$tM",
getDataTime().getRefTimeAsCalendar()));
} else {
sb.append("CWA:YYYYMMDDHHmm");
}
return sb.toString();
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "cwa";
}
}

View file

@ -72,13 +72,15 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 06/03/09 2037 D. Hladky Initial release
* Apr 04, 2013 1846 bkowal Added an index on refTime and forecastTime
* 04/08/13 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* Jun 03, 2009 2037 D. Hladky Initial release
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 06, 2013 2228 njensen Use deserialize(byte[])
* Aug 06, 2013 2228 njensen Use deserialize(byte[])
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -448,9 +450,9 @@ public class CWATRecord extends PersistablePluginDataObject implements
try {
IDataRecord[] dataRec = dataStore.retrieve(getDataURI());
for (int i = 0; i < dataRec.length; i++) {
if (dataRec[i] instanceof ShortDataRecord) {
setDataArray(((ShortDataRecord) dataRec[i]).getShortData());
for (IDataRecord element : dataRec) {
if (element instanceof ShortDataRecord) {
setDataArray(((ShortDataRecord) element).getShortData());
}
}
retrieveMapFromDataStore(dataStore);
@ -569,4 +571,9 @@ public class CWATRecord extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "cwat";
}
}

View file

@ -77,18 +77,22 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 06/03/09 2521 D. Hladky Initial release
* 01/27/13 1478 D. Hladky OUN memory help
* Feb 28, 2013 1729 dhladky Supressed un-necessary debug loggers
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 8, 2013 1293 bkowal Removed references to hdffileid.
* April, 9 2013 1890 dhladky Moved dates to referenced map in record rather than multiple dates in FFMPBasin objs.
* Jun 03, 2009 2521 D. Hladky Initial release
* Jan 27, 2013 1478 D. Hladky OUN memory help
* Feb 28, 2013 1729 dhladky Supressed un-necessary debug loggers
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* April, 9 2013 1890 dhladky Moved dates to referenced map in record
* rather than multiple dates in
* FFMPBasin objs.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 16, 2013 1912 bsteffen Initial bulk hdf5 access for ffmp
* Apr 18, 2013 1919 dhladky Added method for VGB loading
* Apr 18, 2013 1919 dhladky Added method for VGB loading
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -102,18 +106,13 @@ import com.raytheon.uf.common.time.util.ImmutableDate;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "ffmp",
indexes = {
@Index(name = "ffmp_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "ffmp", indexes = { @Index(name = "ffmp_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class FFMPRecord extends PersistablePluginDataObject
implements IPersistable {
public class FFMPRecord extends PersistablePluginDataObject implements
IPersistable {
private static final long serialVersionUID = 76774564365671L;
@ -273,8 +272,8 @@ public class FFMPRecord extends PersistablePluginDataObject
String unit = null;
if (field == FIELDS.RATE) {
unit = "in/hr";
} else if (field == FIELDS.QPE || field == FIELDS.QPF
|| field == FIELDS.GUIDANCE || field == FIELDS.DIFF) {
} else if ((field == FIELDS.QPE) || (field == FIELDS.QPF)
|| (field == FIELDS.GUIDANCE) || (field == FIELDS.DIFF)) {
unit = "in";
} else if (field == FIELDS.RATIO) {
unit = "%";
@ -394,7 +393,7 @@ public class FFMPRecord extends PersistablePluginDataObject
LinkedHashMap<Long, ?> map = template.getMap(getSiteKey(),
domain.getCwa(), FFMPRecord.ALL);
if (map != null && !map.isEmpty()) {
if ((map != null) && !map.isEmpty()) {
fbd.addBasins(datastoreFile, uri, getSiteKey(),
domain.getCwa(), FFMPRecord.ALL, sourceName, idate,
map.keySet(), aggregate);
@ -446,7 +445,7 @@ public class FFMPRecord extends PersistablePluginDataObject
LinkedHashMap<Long, ?> map = template.getMap(getSiteKey(),
domain.getCwa(), huc);
if (map != null && map.get(pfaf) != null) {
if ((map != null) && (map.get(pfaf) != null)) {
int index = 0;
for (Long pfafToCheck : map.keySet()) {
@ -696,4 +695,9 @@ public class FFMPRecord extends PersistablePluginDataObject
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "ffmp";
}
}

View file

@ -62,12 +62,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12/12/09 D. Hladky Initial release
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* 04/08/13 1293 bkowal Removed references to hdffileid.
* Dec 12, 2009 D. Hladky Initial release
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -81,17 +83,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "fog",
indexes = {
@Index(name = "fog_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "fog", indexes = { @Index(name = "fog_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class FogRecord extends PersistablePluginDataObject
implements IPersistable {
public class FogRecord extends PersistablePluginDataObject implements
IPersistable {
private static final long serialVersionUID = 76774564365671L;
@ -429,14 +427,14 @@ public class FogRecord extends PersistablePluginDataObject
}
public GridGeometry2D getGridGeometry2D() {
return gridGeometry2D;
}
return gridGeometry2D;
}
public void setGridGeometry2D(GridGeometry2D gridGeometry2D) {
this.gridGeometry2D = gridGeometry2D;
}
public void setGridGeometry2D(GridGeometry2D gridGeometry2D) {
this.gridGeometry2D = gridGeometry2D;
}
/**
/**
* Set the VIS pixel array
*
* @param data_array
@ -652,28 +650,31 @@ public class FogRecord extends PersistablePluginDataObject
// then means both vis_range and ir_range store range of vis
if (getRangeType(j) == IMAGE_GROUP.TWILIGHT_GROUP) {
if (i <= getVisRange(j).getEnd() && i >= getVisRange(j).getStart()) {
if ((i <= getVisRange(j).getEnd())
&& (i >= getVisRange(j).getStart())) {
return IMAGE_GROUP.VIS_GROUP;
}
else if (i <= getIRRange(j).getEnd()
&& i >= getIRRange(j).getStart()) {
else if ((i <= getIRRange(j).getEnd())
&& (i >= getIRRange(j).getStart())) {
return IMAGE_GROUP.IR_GROUP;
} else {
return IMAGE_GROUP.TWILIGHT_GROUP;
}
} else if (getRangeType(j) == IMAGE_GROUP.VIS_GROUP) {
if ((i <= getVisRange(j).getEnd() && i >= getVisRange(j).getStart())
|| (i <= getIRRange(j).getEnd() && i >= getIRRange(j)
.getStart())) {
if (((i <= getVisRange(j).getEnd()) && (i >= getVisRange(j)
.getStart()))
|| ((i <= getIRRange(j).getEnd()) && (i >= getIRRange(j)
.getStart()))) {
return IMAGE_GROUP.VIS_GROUP;
} else {
return IMAGE_GROUP.TWILIGHT_GROUP;
}
} else {
if ((i <= getVisRange(j).getEnd() && i >= getVisRange(j).getStart())
|| (i <= getIRRange(j).getEnd() && i >= getIRRange(j)
.getStart())) {
if (((i <= getVisRange(j).getEnd()) && (i >= getVisRange(j)
.getStart()))
|| ((i <= getIRRange(j).getEnd()) && (i >= getIRRange(j)
.getStart()))) {
return IMAGE_GROUP.IR_GROUP;
} else {
return IMAGE_GROUP.TWILIGHT_GROUP;
@ -704,10 +705,16 @@ public class FogRecord extends PersistablePluginDataObject
public Calendar getRefHour() {
return refHour;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "fog";
}
}

View file

@ -77,6 +77,7 @@ import com.raytheon.uf.common.time.TimeRange;
* PluginDataObject.
* May 13, 2013 1869 bsteffen Remove DataURI column from GFE.
* Jun 20, 2013 2127 rjpeter Added OnDelete annotation.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -151,7 +152,6 @@ public class GFERecord extends PluginDataObject {
* The parm Info
*/
public GFERecord(ParmID parmId, TimeRange timeRange) {
this.pluginName = "gfe";
Calendar cal = (Calendar) Calendar.getInstance(
TimeZone.getTimeZone("GMT")).clone();
cal.setTime(timeRange.getStart());
@ -276,4 +276,9 @@ public class GFERecord extends PluginDataObject {
}
}
}
@Override
public String getPluginName() {
return "gfe";
}
}

View file

@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.Geometry;
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
* Jul 16, 2013 2181 bsteffen Convert geometry types to use hibernate-
* spatial
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -78,348 +79,348 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "goessounding",
indexes = {
@Index(name = "goessounding_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "goessounding", indexes = { @Index(name = "goessounding_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
public class GOESSounding extends PersistablePluginDataObject implements
ISpatialEnabled, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@Embedded
@DataURI(position = 1, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DataURI(position = 1, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
// The bounding box that contains this observation.
// The bounding box that contains this observation.
@Column
@Type(type = "org.hibernatespatial.GeometryUserType")
@DynamicSerializeElement
private Geometry boxGeometry;
@DynamicSerializeElement
private Geometry boxGeometry;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
// Text of the WMO header
@Transient
@DynamicSerializeElement
private String wmoHeader;
// Text of the WMO header
@Transient
@DynamicSerializeElement
private String wmoHeader;
@Transient
@DynamicSerializeElement
private Integer satId;
@Transient
@DynamicSerializeElement
private Integer satId;
@Transient
@DynamicSerializeElement
private Integer satInstrument;
@Transient
@DynamicSerializeElement
private Integer satInstrument;
@Transient
@DynamicSerializeElement
private Integer qualityInfo;
@Transient
@DynamicSerializeElement
private Integer qualityInfo;
@Transient
@DynamicSerializeElement
private Integer sounderChannels;
@Transient
@DynamicSerializeElement
private Integer sounderChannels;
@Transient
@DynamicSerializeElement
private Double solarElevation;
@Transient
@DynamicSerializeElement
private Double solarElevation;
// The profiler observation time.
@Transient
@DynamicSerializeElement
private Calendar timeObs;
// The profiler observation time.
@Transient
@DynamicSerializeElement
private Calendar timeObs;
@Transient
@DynamicSerializeElement
private List<GOESSoundingLevel> soundingLevels;
@Transient
@DynamicSerializeElement
private List<GOESSoundingLevel> soundingLevels;
/**
* Create an empty ProfilerObs object.
*/
public GOESSounding() {
}
/**
* Create an empty ProfilerObs object.
*/
public GOESSounding() {
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public GOESSounding(String uri) {
super(uri);
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public GOESSounding(String uri) {
super(uri);
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getTimeObs() {
return timeObs;
}
/**
* Get the observation time for this data.
*
* @return The data observation time.
*/
public Calendar getTimeObs() {
return timeObs;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
/**
* Set the observation time for this data.
*
* @param timeObs
* The data observation time.
*/
public void setTimeObs(Calendar timeObs) {
this.timeObs = timeObs;
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Set the WMOHeader of the file that contained this data.
*
* @return The wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* Set the WMOHeader of the file that contained this data.
*
* @return The wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* Get the WMOHeader of the file that contained this data.
*
* @param wmoHeader
* The WMOHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* Get the WMOHeader of the file that contained this data.
*
* @param wmoHeader
* The WMOHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @return the satId
*/
public Integer getSatId() {
return satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @param satId
* the satId to set
*/
public void setSatId(Integer satId) {
this.satId = satId;
}
/**
* @return the satInstrument
*/
public Integer getSatInstrument() {
return satInstrument;
}
/**
* @return the satInstrument
*/
public Integer getSatInstrument() {
return satInstrument;
}
/**
* @param satInstrument
* the satInstrument to set
*/
public void setSatInstrument(Integer satInstrument) {
this.satInstrument = satInstrument;
}
/**
* @param satInstrument
* the satInstrument to set
*/
public void setSatInstrument(Integer satInstrument) {
this.satInstrument = satInstrument;
}
/**
* @return the qualityInfo
*/
public Integer getQualityInfo() {
return qualityInfo;
}
/**
* @return the qualityInfo
*/
public Integer getQualityInfo() {
return qualityInfo;
}
/**
* @param qualityInfo
* the qualityInfo to set
*/
public void setQualityInfo(Integer qualityInfo) {
this.qualityInfo = qualityInfo;
}
/**
* @param qualityInfo
* the qualityInfo to set
*/
public void setQualityInfo(Integer qualityInfo) {
this.qualityInfo = qualityInfo;
}
/**
* Get the satellite channels used to to create the sounding data.
*
* <pre>
* bit Channel Wavelength
* # micrometers
* 1 1 14.71
* 2 2 14.37
* 3 3 14.06
* 4 4 13.64
* 5 5 13.37
* 6 6 12.66
* 7 7 12.02
* 8 8 11.03
* 9 9 9.71
* 10 10 7.43
* 11 11 7.02
* 12 12 6.51
* 13 13 4.57
* 14 14 4.52
* 15 15 4.45
* 16 16 4.13
* 17 17 3.98
* 18 18 3.74
* 19 19 0.969
* All 20 Missing value
* </pre>
*
* @return The sounder channels.
*/
public Integer getSounderChannels() {
return sounderChannels;
}
/**
* Get the satellite channels used to to create the sounding data.
*
* <pre>
* bit Channel Wavelength
* # micrometers
* 1 1 14.71
* 2 2 14.37
* 3 3 14.06
* 4 4 13.64
* 5 5 13.37
* 6 6 12.66
* 7 7 12.02
* 8 8 11.03
* 9 9 9.71
* 10 10 7.43
* 11 11 7.02
* 12 12 6.51
* 13 13 4.57
* 14 14 4.52
* 15 15 4.45
* 16 16 4.13
* 17 17 3.98
* 18 18 3.74
* 19 19 0.969
* All 20 Missing value
* </pre>
*
* @return The sounder channels.
*/
public Integer getSounderChannels() {
return sounderChannels;
}
/**
* Get the satellite channels used to to create the sounding data.
*
* @param sounderChannels
* The sounder channels.
*/
public void setSounderChannels(Integer sounderChannels) {
this.sounderChannels = sounderChannels;
}
/**
* Get the satellite channels used to to create the sounding data.
*
* @param sounderChannels
* The sounder channels.
*/
public void setSounderChannels(Integer sounderChannels) {
this.sounderChannels = sounderChannels;
}
/**
* Get the bounding box that contains this observation.
*
* @return The bounding box Geometry.
*/
public Geometry getBoxGeometry() {
return boxGeometry;
}
/**
* Get the bounding box that contains this observation.
*
* @return The bounding box Geometry.
*/
public Geometry getBoxGeometry() {
return boxGeometry;
}
/**
* Set the bounding box that contains this observation.
*
* @param boxGeometry
* The bounding box Geometry.
*/
public void setBoxGeometry(Geometry boxGeometry) {
this.boxGeometry = boxGeometry;
}
/**
* Set the bounding box that contains this observation.
*
* @param boxGeometry
* The bounding box Geometry.
*/
public void setBoxGeometry(Geometry boxGeometry) {
this.boxGeometry = boxGeometry;
}
/**
* @return the solarElevation
*/
public Double getSolarElevation() {
return solarElevation;
}
/**
* @return the solarElevation
*/
public Double getSolarElevation() {
return solarElevation;
}
/**
* @param solarElevation
* the solarElevation to set
*/
public void setSolarElevation(Double solarElevation) {
this.solarElevation = solarElevation;
}
/**
* @param solarElevation
* the solarElevation to set
*/
public void setSolarElevation(Double solarElevation) {
this.solarElevation = solarElevation;
}
/**
* @return the soundingLevels
*/
public List<GOESSoundingLevel> getSoundingLevels() {
return soundingLevels;
}
/**
* @return the soundingLevels
*/
public List<GOESSoundingLevel> getSoundingLevels() {
return soundingLevels;
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void setSoundingLevels(List<GOESSoundingLevel> soundingLevels) {
this.soundingLevels = soundingLevels;
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void setSoundingLevels(List<GOESSoundingLevel> soundingLevels) {
this.soundingLevels = soundingLevels;
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void addSoundingLevel(GOESSoundingLevel soundingLevel) {
if (soundingLevels == null) {
soundingLevels = new ArrayList<GOESSoundingLevel>();
}
soundingLevels.add(soundingLevel);
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void addSoundingLevel(GOESSoundingLevel soundingLevel) {
if (soundingLevels == null) {
soundingLevels = new ArrayList<GOESSoundingLevel>();
}
soundingLevels.add(soundingLevel);
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
public SurfaceObsLocation getLocation() {
return location;
}
public SurfaceObsLocation getLocation() {
return location;
}
@Override
public PointDataView getPointDataView() {
return this.pointDataView;
}
@Override
public PointDataView getPointDataView() {
return this.pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public String getPluginName() {
return "goessounding";
}
}

View file

@ -65,12 +65,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* 04/08/13 1293 bkowal Removed references to hdffileid.
* Apr 07, 2009 1994 bphillip Initial Creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -84,12 +86,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "grib",
indexes = {
@Index(name = "grib_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "grib", indexes = { @Index(name = "grib_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -238,7 +236,6 @@ public class GribRecord extends PersistablePluginDataObject implements
this.insertTime = (Calendar) recordToCopy.insertTime.clone();
}
this.messageData = recordToCopy.messageData;
this.pluginName = recordToCopy.pluginName;
this.gridVersion = recordToCopy.gridVersion;
if (recordToCopy.hybridCoordList != null) {
this.hybridCoordList = Arrays.copyOf(recordToCopy.hybridCoordList,
@ -278,8 +275,9 @@ public class GribRecord extends PersistablePluginDataObject implements
@Override
public Date getPersistenceTime() {
Calendar c = getInsertTime();
if (c == null)
if (c == null) {
return null;
}
return c.getTime();
}
@ -526,6 +524,7 @@ public class GribRecord extends PersistablePluginDataObject implements
this.resCompFlags = resCompFlags;
}
@Override
public void setId(int id) {
this.id = id;
}
@ -566,34 +565,37 @@ public class GribRecord extends PersistablePluginDataObject implements
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + gridVersion;
result = prime * result + Arrays.hashCode(hybridCoordList);
result = prime * result + (hybridGrid ? 1231 : 1237);
result = prime * result + (isVector ? 1231 : 1237);
result = prime * result + Arrays.hashCode(localSection);
result = prime * result + (localSectionUsed ? 1231 : 1237);
result = prime * result + localTableVersion;
result = prime * result + masterTableVersion;
result = prime * result
result = (prime * result) + gridVersion;
result = (prime * result) + Arrays.hashCode(hybridCoordList);
result = (prime * result) + (hybridGrid ? 1231 : 1237);
result = (prime * result) + (isVector ? 1231 : 1237);
result = (prime * result) + Arrays.hashCode(localSection);
result = (prime * result) + (localSectionUsed ? 1231 : 1237);
result = (prime * result) + localTableVersion;
result = (prime * result) + masterTableVersion;
result = (prime * result)
+ ((modelInfo == null) ? 0 : modelInfo.hashCode());
result = prime * result + processedDataType;
result = prime * result + productionStatus;
result = prime * result + refTimeSignificance;
result = prime * result
result = (prime * result) + processedDataType;
result = (prime * result) + productionStatus;
result = (prime * result) + refTimeSignificance;
result = (prime * result)
+ ((resCompFlags == null) ? 0 : resCompFlags.hashCode());
result = prime * result + (thinnedGrid ? 1231 : 1237);
result = prime * result + Arrays.hashCode(thinnedPts);
result = (prime * result) + (thinnedGrid ? 1231 : 1237);
result = (prime * result) + Arrays.hashCode(thinnedPts);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
GribRecord other = (GribRecord) obj;
if (!this.dataTime.getRefTimeAsCalendar().equals(
other.getDataTime().getRefTimeAsCalendar())) {
@ -606,42 +608,59 @@ public class GribRecord extends PersistablePluginDataObject implements
return false;
}
if (gridVersion != other.gridVersion)
if (gridVersion != other.gridVersion) {
return false;
if (!Arrays.equals(hybridCoordList, other.hybridCoordList))
}
if (!Arrays.equals(hybridCoordList, other.hybridCoordList)) {
return false;
if (hybridGrid != other.hybridGrid)
}
if (hybridGrid != other.hybridGrid) {
return false;
if (isVector != other.isVector)
}
if (isVector != other.isVector) {
return false;
if (!Arrays.equals(localSection, other.localSection))
}
if (!Arrays.equals(localSection, other.localSection)) {
return false;
if (localSectionUsed != other.localSectionUsed)
}
if (localSectionUsed != other.localSectionUsed) {
return false;
if (localTableVersion != other.localTableVersion)
}
if (localTableVersion != other.localTableVersion) {
return false;
if (masterTableVersion != other.masterTableVersion)
}
if (masterTableVersion != other.masterTableVersion) {
return false;
}
if (modelInfo == null) {
if (other.modelInfo != null)
if (other.modelInfo != null) {
return false;
} else if (!modelInfo.equals(other.modelInfo))
}
} else if (!modelInfo.equals(other.modelInfo)) {
return false;
if (processedDataType != other.processedDataType)
}
if (processedDataType != other.processedDataType) {
return false;
if (productionStatus != other.productionStatus)
}
if (productionStatus != other.productionStatus) {
return false;
if (refTimeSignificance != other.refTimeSignificance)
}
if (refTimeSignificance != other.refTimeSignificance) {
return false;
}
if (resCompFlags == null) {
if (other.resCompFlags != null)
if (other.resCompFlags != null) {
return false;
} else if (!resCompFlags.equals(other.resCompFlags))
}
} else if (!resCompFlags.equals(other.resCompFlags)) {
return false;
if (thinnedGrid != other.thinnedGrid)
}
if (thinnedGrid != other.thinnedGrid) {
return false;
if (!Arrays.equals(thinnedPts, other.thinnedPts))
}
if (!Arrays.equals(thinnedPts, other.thinnedPts)) {
return false;
}
return true;
}
@ -651,4 +670,9 @@ public class GribRecord extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "grib";
}
}

View file

@ -61,11 +61,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 21, 2012 bsteffen Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 21, 2012 bsteffen Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -79,12 +81,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "grid",
indexes = {
@Index(name = "grid_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "grid", indexes = { @Index(name = "grid_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
public class GridRecord extends PersistablePluginDataObject implements
ISpatialEnabled {
@ -110,7 +108,6 @@ public class GridRecord extends PersistablePluginDataObject implements
}
public GridRecord(GridRecord record) {
this.pluginName = record.getPluginName();
this.dataTime = record.getDataTime();
this.info = new GridInfoRecord(record.getInfoNotNull());
if (record.getExtraAttributes() != null) {
@ -236,24 +233,29 @@ public class GridRecord extends PersistablePluginDataObject implements
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((info == null) ? 0 : info.hashCode());
result = (prime * result) + ((info == null) ? 0 : info.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
GridRecord other = (GridRecord) obj;
if (info == null) {
if (other.info != null)
if (other.info != null) {
return false;
} else if (!info.equals(other.info))
}
} else if (!info.equals(other.info)) {
return false;
}
return true;
}
@ -263,4 +265,9 @@ public class GridRecord extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "grid";
}
}

View file

@ -25,9 +25,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.ldadmesonet.dao.LdadMesonetDao;
import com.raytheon.uf.common.pointdata.PointDataContainer;
@ -44,7 +41,8 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 10/09/09 DR2814 vkorolev Initial creation
* Oct 09, 2009 DR2814 vkorolev Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -53,108 +51,173 @@ import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
*/
public class LdadmesonetPointDataTransform {
private Log logger = LogFactory.getLog(getClass());
private LdadMesonetDao dao;
private PointDataDescription description;
//------------------Common params (From OBS plugin)----------------------------
private static final String PRESS_CHANGE3_HOUR = "pressChange3Hour";
// ------------------Common params (From OBS
// plugin)----------------------------
private static final String PRESS_CHANGE3_HOUR = "pressChange3Hour";
private static final String PRESS_CHANGE_CHAR = "pressChangeChar";
private static final String ALTIMETER = "altimeter";
private static final String WIND_GUST = "windGust";
private static final String WIND_SPEED = "windSpeed";
private static final String DEWPOINT = "dewpoint";
private static final String TEMPERATURE = "temperature";
private static final String PRES_WEATHER = "presWeather";
private static final String VISIBILITY = "visibility";
private static final String LONGITUDE = "longitude";
private static final String LATITUDE = "latitude";
private static final String ELEVATION = "elevation";
private static final String ELEVATION = "elevation";
private static final String STATION_NAME = "stationName";
private static final String DATAURI = "dataURI";
//------------------From LDAD mesonet netCDF------------------------
// ------------------From LDAD mesonet netCDF------------------------
private static final String STORAGE_TYPE = "storageType";
private static final String STATION_ID = "stationId";
private static final String DATA_PROVIDER = "dataProvider";
private static final String HOME_WFO = "homeWFO";
private static final String OBSERVATION_TIME = "observationTime";
private static final String PROVIDER_ID = "providerId";
private static final String HANDBOOK5_ID = "handbook5Id";
private static final String STATION_TYPE = "stationType";
private static final String REPORT_TIME = "reportTime";
private static final String RECEIVED_TIME = "receivedTime";
private static final String NUMERICAL_WMO_ID = "numericWMOid";
private static final String DATA_PLATFORM_TYPE = "dataPlatformType";
private static final String PLATFORM_TRUE_DIRECTION = "platformTrueDirection";
private static final String PLARFORM_TRUE_SPEED = "platformTrueSpeed";
private static final String TEMP_CHANGE_TIME = "tempChangeTime";
private static final String WET_BULB_TEMPERATURE = "wetBulbTemperature";
private static final String RH_CHANGE_TIME = "rhChangeTime";
private static final String STATION_PRESSURE = "stationPressure";
private static final String STATION_PRESS_CHANGE_TIME = "stationPressChangeTime";
private static final String WIND_DIR_CHANGE_TIME = "windDirChangeTime";
private static final String WIND_SPEED_CHANGE_TIME = "windSpeedChangeTime";
private static final String WIND_GUST_CHANGE_TIME = "windGustChangeTime";
private static final String WIND_DIR_MIN = "windDirMin";
private static final String WIND_DIR_MAX = "windDirMax";
private static final String VISIBILITY_STATUS = "visibilityStatus";
private static final String TOTAL_CLOUD_COVER = "totalCloudCover";
private static final String CLOUD_BASE_HEIGHT = "cloudBaseHeight";
private static final String LOW_LEVEL_CLOUD_TYPE = "lowLevelCloudType";
private static final String MID_LEVEL_CLOUD_TYPE = "midLevelCloudType";
private static final String HIGH_LEVEL_CLOUD_TYPE = "highLevelCloudType";
private static final String MAX_TEMP_RECORD_PERIOD = "maxTempRecordPeriod";
private static final String MAXIMUM_TEMPERATURE = "maximumTemperature";
private static final String MIN_TEMP_RECORD_PERIOD = "minTempRecordPeriod";
private static final String MINIMUM_TEMPERATURE = "minimumTemperature";
private static final String PRECIP_ACCUM = "precipAccum";
private static final String PRECIP_TYPE = "precipType";
private static final String PRECIP_INTENSITY = "precipIntensity";
private static final String TIME_SINCE_LAST_PCP = "timeSinceLastPcp";
private static final String SOLAR_RADIATION = "solarRadiation";
private static final String SOLAR_RAD_CHANGE_TIME = "solarRadChangeTime";
private static final String SEA_SURFACE_TEMP = "seaSurfaceTemp";
private static final String WAVE_PERIOD = "wavePeriod";
private static final String WAVE_HEIGHT = "waveHeight";
private static final String RAW_MESONET = "rawMessage";
private static final String REL_HUMIDITY = "relHumidity";
private static final String WIND_DIR = "windDir";
private static final String PRESSURE = "pressure";
private static final String SEA_LEVEL_PRESSURE = "seaLevelPressure";
private static final String PRECIP_RATE = "precipRate";
private static final String FUEL_TEMPERATURE = "fuelTemperature";
private static final String FUEL_MOISTURE = "fuelMoisture";
private static final String SOIL_TEMPERATURE = "soilTemperature";
private static final String SOIL_MOISTURE = "soilMoisture";
/**
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! It is important to
* keep this up to date or risk breaking backwards compatibility
*
*/
private static final String[] ALL_PARAMS = { PRESS_CHANGE3_HOUR,
PRESS_CHANGE_CHAR, ALTIMETER, WIND_GUST, WIND_SPEED, DEWPOINT,
PRESS_CHANGE_CHAR, ALTIMETER, WIND_GUST, WIND_SPEED, DEWPOINT,
TEMPERATURE, PRES_WEATHER, VISIBILITY, LONGITUDE, LATITUDE,
SEA_LEVEL_PRESSURE, STATION_NAME, DATAURI, STORAGE_TYPE, ELEVATION,
STATION_ID, DATA_PROVIDER, HOME_WFO, OBSERVATION_TIME, PROVIDER_ID,
HANDBOOK5_ID, STATION_TYPE, REPORT_TIME, RECEIVED_TIME,
NUMERICAL_WMO_ID, DATA_PLATFORM_TYPE, PLATFORM_TRUE_DIRECTION,
PLARFORM_TRUE_SPEED, TEMP_CHANGE_TIME, WET_BULB_TEMPERATURE,
RH_CHANGE_TIME, STATION_PRESSURE, STATION_PRESS_CHANGE_TIME,
WIND_DIR_CHANGE_TIME, WIND_SPEED_CHANGE_TIME,
WIND_GUST_CHANGE_TIME, WIND_DIR_MIN, WIND_DIR_MAX,
VISIBILITY_STATUS, TOTAL_CLOUD_COVER, CLOUD_BASE_HEIGHT,
LOW_LEVEL_CLOUD_TYPE, MID_LEVEL_CLOUD_TYPE, HIGH_LEVEL_CLOUD_TYPE,
MAX_TEMP_RECORD_PERIOD, MAXIMUM_TEMPERATURE,
MIN_TEMP_RECORD_PERIOD, MINIMUM_TEMPERATURE, PRECIP_ACCUM, PRECIP_TYPE,
PRECIP_INTENSITY, TIME_SINCE_LAST_PCP, SOLAR_RADIATION,
SOLAR_RAD_CHANGE_TIME, SEA_SURFACE_TEMP, WAVE_PERIOD, WAVE_HEIGHT,
RAW_MESONET, REL_HUMIDITY, WIND_DIR, PRESSURE, SEA_LEVEL_PRESSURE,
PRECIP_RATE, FUEL_TEMPERATURE, FUEL_MOISTURE, SOIL_TEMPERATURE,
SOIL_MOISTURE
};
STATION_ID, DATA_PROVIDER, HOME_WFO, OBSERVATION_TIME, PROVIDER_ID,
HANDBOOK5_ID, STATION_TYPE, REPORT_TIME, RECEIVED_TIME,
NUMERICAL_WMO_ID, DATA_PLATFORM_TYPE, PLATFORM_TRUE_DIRECTION,
PLARFORM_TRUE_SPEED, TEMP_CHANGE_TIME, WET_BULB_TEMPERATURE,
RH_CHANGE_TIME, STATION_PRESSURE, STATION_PRESS_CHANGE_TIME,
WIND_DIR_CHANGE_TIME, WIND_SPEED_CHANGE_TIME,
WIND_GUST_CHANGE_TIME, WIND_DIR_MIN, WIND_DIR_MAX,
VISIBILITY_STATUS, TOTAL_CLOUD_COVER, CLOUD_BASE_HEIGHT,
LOW_LEVEL_CLOUD_TYPE, MID_LEVEL_CLOUD_TYPE, HIGH_LEVEL_CLOUD_TYPE,
MAX_TEMP_RECORD_PERIOD, MAXIMUM_TEMPERATURE,
MIN_TEMP_RECORD_PERIOD, MINIMUM_TEMPERATURE, PRECIP_ACCUM,
PRECIP_TYPE, PRECIP_INTENSITY, TIME_SINCE_LAST_PCP,
SOLAR_RADIATION, SOLAR_RAD_CHANGE_TIME, SEA_SURFACE_TEMP,
WAVE_PERIOD, WAVE_HEIGHT, RAW_MESONET, REL_HUMIDITY, WIND_DIR,
PRESSURE, SEA_LEVEL_PRESSURE, PRECIP_RATE, FUEL_TEMPERATURE,
FUEL_MOISTURE, SOIL_TEMPERATURE, SOIL_MOISTURE };
public static final String ALL_PARAMS_LIST;
static {
@ -192,11 +255,12 @@ public class LdadmesonetPointDataTransform {
if (pdo.length > 0) {
Map<File, PointDataContainer> pointMap = new HashMap<File, PointDataContainer>();
for (PluginDataObject p : pdo) {
if (!(p instanceof MesonetLdadRecord))
if (!(p instanceof MesonetLdadRecord)) {
continue;
}
File f = this.dao.getFullFilePath(p);
PointDataContainer pdc = pointMap.get(f);
@ -213,228 +277,198 @@ public class LdadmesonetPointDataTransform {
return pdo;
}
// private PointDataDescription getDescription(String type)
// throws JAXBException {
// InputStream is = this.getClass().getResourceAsStream(
// "/res/pointdata/" + type + ".xml");
// if (is == null) {
// throw new RuntimeException("Cannot find descriptor for: " + type);
// }
// return PointDataDescription.fromStream(is);
//
// }
private PointDataView buildView(PointDataContainer container,
MesonetLdadRecord record) {
MesonetLdadRecord record) {
PointDataView pdv = container.append();
// if (record.getStationName()!=null) {
// pdv.setString(STATION_NAME, record.getStationName());
// }
if (record.getRawMessage()!=null) {
pdv.setString(RAW_MESONET, record.getRawMessage());
}
if (record.getSeaLevelPressure()!=null) {
pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure());
}
// if (record.getLocation()!=null) {
// pdv.setFloat(LATITUDE, (float) record.getLatitude());
// pdv.setFloat(LONGITUDE, (float) record.getLongitude());
// pdv.setFloat(ELEVATION, record.getElevation());
// }
if (record.getObservationTime()!=null) {
if (record.getRawMessage() != null) {
pdv.setString(RAW_MESONET, record.getRawMessage());
}
if (record.getSeaLevelPressure() != null) {
pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure());
}
if (record.getObservationTime() != null) {
pdv.setLong(OBSERVATION_TIME, record.getDataTime().getRefTime()
.getTime());
}
if (record.getVisibility()!=null) {
pdv.setFloat(VISIBILITY, record.getVisibility());
}
if (record.getTemperature()!=null) {
pdv.setFloat(TEMPERATURE, record.getTemperature());
}
if (record.getDewpoint()!=null) {
pdv.setFloat(DEWPOINT, record.getDewpoint());
}
if (record.getWindSpeed()!=null) {
pdv.setFloat(WIND_SPEED, record.getWindSpeed());
}
if (record.getWindGust()!=null) {
pdv.setFloat(WIND_GUST, record.getWindGust());
}
if (record.getAltimeter()!=null) {
pdv.setFloat(ALTIMETER, record.getAltimeter());
}
if (record.getPressChangeChar()!=null) {
pdv.setInt(PRESS_CHANGE_CHAR, record.getPressChangeChar()
.intValue());
}
if (record.getPressChange3Hour()!=null) {
pdv.setFloat(PRESS_CHANGE3_HOUR, record.getPressChange3Hour());
}
//pdv.setString(DATAURI, record.getDataURI());
//--------------------------------------LDAD mesonet specific------------------------
// if (record.getDataProvider()!=null) {
// pdv.setString(DATA_PROVIDER, record.getDataProvider());
// }
// if (record.getHomeWFO()!=null) {
// pdv.setString(HOME_WFO, record.getHomeWFO());
// }
// if (record.getProviderId()!=null) {
// pdv.setString(PROVIDER_ID, record.getProviderId());
// }
// if (record.getHandbook5Id()!=null) {
// pdv.setString(HANDBOOK5_ID, record.getHandbook5Id());
// }
// if (record.getStationType()!=null) {
// pdv.setString(STATION_TYPE, record.getStationType());
// }
if (record.getReportTime()!=null) {
pdv.setLong(REPORT_TIME, record.getReportTime());
}
if (record.getReceivedTime()!=null) {
pdv.setLong(RECEIVED_TIME, record.getReceivedTime().longValue());
}
if (record.getNumericWMOid()!=null) {
pdv.setLong(NUMERICAL_WMO_ID, record.getNumericWMOid());
}
if (record.getDataPlatformType()!=null) {
pdv.setInt(DATA_PLATFORM_TYPE, record.getDataPlatformType().intValue());
}
if (record.getPlatformTrueDirection()!=null) {
pdv.setFloat(PLATFORM_TRUE_DIRECTION, record.getPlatformTrueDirection());
}
if (record.getPlatformTrueSpeed()!=null) {
pdv.setFloat(PLARFORM_TRUE_SPEED, record.getPlatformTrueSpeed());
}
if (record.getTempChangeTime()!=null) {
pdv.setLong(TEMP_CHANGE_TIME, record.getTempChangeTime()
.longValue());
}
if (record.getWetBulbTemperature()!=null) {
pdv.setFloat(WET_BULB_TEMPERATURE, record.getWetBulbTemperature());
}
if (record.getRhChangeTime()!=null) {
pdv.setLong(RH_CHANGE_TIME, record.getRhChangeTime().longValue());
}
if (record.getStationPressure()!=null) {
pdv.setFloat(STATION_PRESSURE, record.getStationPressure());
}
if (record.getStationPressChangeTime()!=null) {
pdv.setLong(STATION_PRESS_CHANGE_TIME, record.getStationPressChangeTime().longValue());
}
if (record.getWindDirChangeTime()!=null) {
pdv.setLong(WIND_DIR_CHANGE_TIME, record.getWindDirChangeTime()
.longValue());
}
if (record.getWindSpeedChangeTime()!=null) {
pdv.setLong(WIND_SPEED_CHANGE_TIME, record.getWindSpeedChangeTime()
.longValue());
}
if (record.getWindGustChangeTime()!=null) {
pdv.setLong(WIND_GUST_CHANGE_TIME, record.getWindGustChangeTime()
.longValue());
}
if (record.getWindDirMin()!=null) {
pdv.setFloat(WIND_DIR_MIN, record.getWindDirMin());
}
if (record.getWindDirMax()!=null) {
pdv.setFloat(WIND_DIR_MAX, record.getWindDirMax());
}
if (record.getVisibilityStatus()!=null) {
pdv.setString(VISIBILITY_STATUS, record.getVisibilityStatus());
}
if (record.getTotalCloudCover()!=null) {
pdv.setFloat(TOTAL_CLOUD_COVER, record.getTotalCloudCover());
}
if (record.getCloudBaseHeight()!=null) {
pdv.setInt(CLOUD_BASE_HEIGHT, record.getCloudBaseHeight()
.intValue());
}
if (record.getLowLevelCloudType()!=null) {
pdv.setInt(LOW_LEVEL_CLOUD_TYPE, record.getLowLevelCloudType()
.intValue());
}
if (record.getMidLevelCloudType()!=null) {
pdv.setInt(MID_LEVEL_CLOUD_TYPE, record.getMidLevelCloudType()
.intValue());
}
if (record.getHighLevelCloudType()!=null) {
pdv.setInt(HIGH_LEVEL_CLOUD_TYPE, record.getHighLevelCloudType()
.intValue());
}
if (record.getMinTempRecordPeriod()!=null) {
pdv.setInt(MAX_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod()
.intValue());
}
if (record.getMaximumTemperature()!=null) {
pdv.setFloat(MAXIMUM_TEMPERATURE, record.getMaximumTemperature());
}
if (record.getMinTempRecordPeriod()!=null) {
pdv.setInt(MIN_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod()
.intValue());
}
if (record.getMinimumTemperature()!=null) {
pdv.setFloat(MINIMUM_TEMPERATURE, record.getMinimumTemperature());
}
if (record.getPrecipAccum()!=null) {
pdv.setFloat(PRECIP_ACCUM, record.getPrecipAccum());
}
if (record.getPrecipType()!=null) {
pdv.setInt(PRECIP_TYPE, record.getPrecipType().intValue());
}
if (record.getPrecipIntensity()!=null) {
pdv.setInt(PRECIP_INTENSITY, record.getPrecipIntensity().intValue());
}
if (record.getTimeSinceLastPcp()!=null) {
pdv.setLong(TIME_SINCE_LAST_PCP, record.getTimeSinceLastPcp()
.longValue());
}
if (record.getSolarRadiation()!=null) {
pdv.setFloat(SOLAR_RADIATION, record.getSolarRadiation());
}
if (record.getSolarRadChangeTime()!=null) {
pdv.setLong(SOLAR_RAD_CHANGE_TIME, record.getSolarRadChangeTime().longValue());
}
if (record.getSeaSurfaceTemp()!=null) {
pdv.setFloat(SEA_SURFACE_TEMP, record.getSeaSurfaceTemp());
}
if (record.getWavePeriod()!=null) {
pdv.setFloat(WAVE_PERIOD, record.getWavePeriod());
}
if (record.getWaveHeight()!=null) {
pdv.setFloat(WAVE_HEIGHT, record.getWaveHeight());
}
if (record.getRelHumidity()!=null) {
pdv.setFloat(REL_HUMIDITY, record.getRelHumidity());
}
if (record.getWindDir()!=null) {
pdv.setFloat(WIND_DIR, record.getWindDir());
}
if (record.getPressure()!=null) {
pdv.setFloat(PRESSURE, record.getPressure());
}
if (record.getSeaLevelPressure()!=null) {
pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure());
}
if (record.getPrecipRate()!=null) {
pdv.setFloat(PRECIP_RATE, record.getPrecipRate());
}
if (record.getFuelTemperature()!=null) {
pdv.setFloat(FUEL_TEMPERATURE, record.getFuelTemperature());
}
if (record.getFuelMoisture()!=null) {
pdv.setFloat(FUEL_MOISTURE, record.getFuelMoisture());
}
if (record.getSoilTemperature()!=null) {
pdv.setFloat(SOIL_TEMPERATURE, record.getSoilTemperature());
}
if (record.getSoilMoisture()!=null) {
pdv.setFloat(SOIL_MOISTURE, record.getSoilMoisture());
}
return pdv;
}
if (record.getVisibility() != null) {
pdv.setFloat(VISIBILITY, record.getVisibility());
}
if (record.getTemperature() != null) {
pdv.setFloat(TEMPERATURE, record.getTemperature());
}
if (record.getDewpoint() != null) {
pdv.setFloat(DEWPOINT, record.getDewpoint());
}
if (record.getWindSpeed() != null) {
pdv.setFloat(WIND_SPEED, record.getWindSpeed());
}
if (record.getWindGust() != null) {
pdv.setFloat(WIND_GUST, record.getWindGust());
}
if (record.getAltimeter() != null) {
pdv.setFloat(ALTIMETER, record.getAltimeter());
}
if (record.getPressChangeChar() != null) {
pdv.setInt(PRESS_CHANGE_CHAR, record.getPressChangeChar()
.intValue());
}
if (record.getPressChange3Hour() != null) {
pdv.setFloat(PRESS_CHANGE3_HOUR, record.getPressChange3Hour());
}
// --------------------------------------LDAD mesonet
// specific------------------------
if (record.getReportTime() != null) {
pdv.setLong(REPORT_TIME, record.getReportTime());
}
if (record.getReceivedTime() != null) {
pdv.setLong(RECEIVED_TIME, record.getReceivedTime().longValue());
}
if (record.getNumericWMOid() != null) {
pdv.setLong(NUMERICAL_WMO_ID, record.getNumericWMOid());
}
if (record.getDataPlatformType() != null) {
pdv.setInt(DATA_PLATFORM_TYPE, record.getDataPlatformType()
.intValue());
}
if (record.getPlatformTrueDirection() != null) {
pdv.setFloat(PLATFORM_TRUE_DIRECTION,
record.getPlatformTrueDirection());
}
if (record.getPlatformTrueSpeed() != null) {
pdv.setFloat(PLARFORM_TRUE_SPEED, record.getPlatformTrueSpeed());
}
if (record.getTempChangeTime() != null) {
pdv.setLong(TEMP_CHANGE_TIME, record.getTempChangeTime()
.longValue());
}
if (record.getWetBulbTemperature() != null) {
pdv.setFloat(WET_BULB_TEMPERATURE, record.getWetBulbTemperature());
}
if (record.getRhChangeTime() != null) {
pdv.setLong(RH_CHANGE_TIME, record.getRhChangeTime().longValue());
}
if (record.getStationPressure() != null) {
pdv.setFloat(STATION_PRESSURE, record.getStationPressure());
}
if (record.getStationPressChangeTime() != null) {
pdv.setLong(STATION_PRESS_CHANGE_TIME, record
.getStationPressChangeTime().longValue());
}
if (record.getWindDirChangeTime() != null) {
pdv.setLong(WIND_DIR_CHANGE_TIME, record.getWindDirChangeTime()
.longValue());
}
if (record.getWindSpeedChangeTime() != null) {
pdv.setLong(WIND_SPEED_CHANGE_TIME, record.getWindSpeedChangeTime()
.longValue());
}
if (record.getWindGustChangeTime() != null) {
pdv.setLong(WIND_GUST_CHANGE_TIME, record.getWindGustChangeTime()
.longValue());
}
if (record.getWindDirMin() != null) {
pdv.setFloat(WIND_DIR_MIN, record.getWindDirMin());
}
if (record.getWindDirMax() != null) {
pdv.setFloat(WIND_DIR_MAX, record.getWindDirMax());
}
if (record.getVisibilityStatus() != null) {
pdv.setString(VISIBILITY_STATUS, record.getVisibilityStatus());
}
if (record.getTotalCloudCover() != null) {
pdv.setFloat(TOTAL_CLOUD_COVER, record.getTotalCloudCover());
}
if (record.getCloudBaseHeight() != null) {
pdv.setInt(CLOUD_BASE_HEIGHT, record.getCloudBaseHeight()
.intValue());
}
if (record.getLowLevelCloudType() != null) {
pdv.setInt(LOW_LEVEL_CLOUD_TYPE, record.getLowLevelCloudType()
.intValue());
}
if (record.getMidLevelCloudType() != null) {
pdv.setInt(MID_LEVEL_CLOUD_TYPE, record.getMidLevelCloudType()
.intValue());
}
if (record.getHighLevelCloudType() != null) {
pdv.setInt(HIGH_LEVEL_CLOUD_TYPE, record.getHighLevelCloudType()
.intValue());
}
if (record.getMinTempRecordPeriod() != null) {
pdv.setInt(MAX_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod()
.intValue());
}
if (record.getMaximumTemperature() != null) {
pdv.setFloat(MAXIMUM_TEMPERATURE, record.getMaximumTemperature());
}
if (record.getMinTempRecordPeriod() != null) {
pdv.setInt(MIN_TEMP_RECORD_PERIOD, record.getMinTempRecordPeriod()
.intValue());
}
if (record.getMinimumTemperature() != null) {
pdv.setFloat(MINIMUM_TEMPERATURE, record.getMinimumTemperature());
}
if (record.getPrecipAccum() != null) {
pdv.setFloat(PRECIP_ACCUM, record.getPrecipAccum());
}
if (record.getPrecipType() != null) {
pdv.setInt(PRECIP_TYPE, record.getPrecipType().intValue());
}
if (record.getPrecipIntensity() != null) {
pdv.setInt(PRECIP_INTENSITY, record.getPrecipIntensity().intValue());
}
if (record.getTimeSinceLastPcp() != null) {
pdv.setLong(TIME_SINCE_LAST_PCP, record.getTimeSinceLastPcp()
.longValue());
}
if (record.getSolarRadiation() != null) {
pdv.setFloat(SOLAR_RADIATION, record.getSolarRadiation());
}
if (record.getSolarRadChangeTime() != null) {
pdv.setLong(SOLAR_RAD_CHANGE_TIME, record.getSolarRadChangeTime()
.longValue());
}
if (record.getSeaSurfaceTemp() != null) {
pdv.setFloat(SEA_SURFACE_TEMP, record.getSeaSurfaceTemp());
}
if (record.getWavePeriod() != null) {
pdv.setFloat(WAVE_PERIOD, record.getWavePeriod());
}
if (record.getWaveHeight() != null) {
pdv.setFloat(WAVE_HEIGHT, record.getWaveHeight());
}
if (record.getRelHumidity() != null) {
pdv.setFloat(REL_HUMIDITY, record.getRelHumidity());
}
if (record.getWindDir() != null) {
pdv.setFloat(WIND_DIR, record.getWindDir());
}
if (record.getPressure() != null) {
pdv.setFloat(PRESSURE, record.getPressure());
}
if (record.getSeaLevelPressure() != null) {
pdv.setFloat(SEA_LEVEL_PRESSURE, record.getSeaLevelPressure());
}
if (record.getPrecipRate() != null) {
pdv.setFloat(PRECIP_RATE, record.getPrecipRate());
}
if (record.getFuelTemperature() != null) {
pdv.setFloat(FUEL_TEMPERATURE, record.getFuelTemperature());
}
if (record.getFuelMoisture() != null) {
pdv.setFloat(FUEL_MOISTURE, record.getFuelMoisture());
}
if (record.getSoilTemperature() != null) {
pdv.setFloat(SOIL_TEMPERATURE, record.getSoilTemperature());
}
if (record.getSoilMoisture() != null) {
pdv.setFloat(SOIL_MOISTURE, record.getSoilMoisture());
}
return pdv;
}
public static MesonetLdadRecord toMesonetLdadRecord(PointDataView pdv) {
@ -445,14 +479,13 @@ public class LdadmesonetPointDataTransform {
pdv.getString(STATION_ID));
Double lat = pdv.getNumber(LATITUDE).doubleValue();
Double lon = pdv.getNumber(LONGITUDE).doubleValue();
loc.assignLocation(lat,lon);
loc.assignLocation(lat, lon);
loc.setElevation(pdv.getNumber(ELEVATION).intValue());
mr.setLocation(loc);
mr.setPluginName("ldadmesonet");
mr.setReportType(pdv.getString(STORAGE_TYPE));
mr.setProviderId(pdv.getString(PROVIDER_ID));
mr.setPressChange3Hour(pdv.getNumber(PRESS_CHANGE3_HOUR).floatValue());
mr.setPressChangeChar((short) pdv.getInt(PRESS_CHANGE_CHAR));
mr.setPressChangeChar((short) pdv.getInt(PRESS_CHANGE_CHAR));
mr.setSeaLevelPressure(pdv.getNumber(SEA_LEVEL_PRESSURE).floatValue());
mr.setTemperature(pdv.getNumber(TEMPERATURE).floatValue());
mr.setVisibility(pdv.getNumber(VISIBILITY).floatValue());
@ -461,50 +494,53 @@ public class LdadmesonetPointDataTransform {
mr.setWindSpeed(pdv.getFloat(WIND_SPEED));
mr.setDataURI(pdv.getString(DATAURI));
mr.setReceivedTime(pdv.getNumber(RECEIVED_TIME).doubleValue());
//----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
mr.setTempChangeTime(pdv.getNumber(TEMP_CHANGE_TIME).doubleValue());
mr.setWetBulbTemperature(pdv.getFloat(WET_BULB_TEMPERATURE));
mr.setRhChangeTime((Double) pdv.getNumber(RH_CHANGE_TIME));
mr.setStationPressure(pdv.getFloat(STATION_PRESSURE));
mr.setStationPressChangeTime((Double) pdv.getNumber(STATION_PRESS_CHANGE_TIME));
mr.setWindDirChangeTime((Double) pdv.getNumber(WIND_DIR_CHANGE_TIME));
mr.setWindSpeedChangeTime((Double) pdv.getNumber(WIND_SPEED_CHANGE_TIME));
mr.setWindGustChangeTime((Double) pdv.getNumber(WIND_GUST_CHANGE_TIME));
mr.setWetBulbTemperature(pdv.getFloat(WET_BULB_TEMPERATURE));
mr.setRhChangeTime((Double) pdv.getNumber(RH_CHANGE_TIME));
mr.setStationPressure(pdv.getFloat(STATION_PRESSURE));
mr.setStationPressChangeTime((Double) pdv
.getNumber(STATION_PRESS_CHANGE_TIME));
mr.setWindDirChangeTime((Double) pdv.getNumber(WIND_DIR_CHANGE_TIME));
mr.setWindSpeedChangeTime((Double) pdv
.getNumber(WIND_SPEED_CHANGE_TIME));
mr.setWindGustChangeTime((Double) pdv.getNumber(WIND_GUST_CHANGE_TIME));
mr.setWindDirMin(pdv.getFloat(WIND_DIR_MIN));
mr.setWindDirMax(pdv.getFloat(WIND_DIR_MAX));
mr.setVisibilityStatus(pdv.getString(VISIBILITY_STATUS ));
mr.setTotalCloudCover(pdv.getFloat(TOTAL_CLOUD_COVER ));
mr.setVisibilityStatus(pdv.getString(VISIBILITY_STATUS));
mr.setTotalCloudCover(pdv.getFloat(TOTAL_CLOUD_COVER));
mr.setCloudBaseHeight((Short) pdv.getNumber(CLOUD_BASE_HEIGHT));
mr.setLowLevelCloudType((Short) pdv.getNumber(LOW_LEVEL_CLOUD_TYPE));
mr.setMidLevelCloudType((Short) pdv.getNumber(MID_LEVEL_CLOUD_TYPE ));
mr.setHighLevelCloudType((Short) pdv.getNumber(HIGH_LEVEL_CLOUD_TYPE ));
mr.setMaxTempRecordPeriod((Short) pdv.getNumber(MAX_TEMP_RECORD_PERIOD ));
mr.setMaximumTemperature(pdv.getFloat(MAXIMUM_TEMPERATURE ));
mr.setMinTempRecordPeriod((Short) pdv.getNumber(MIN_TEMP_RECORD_PERIOD ));
mr.setMaximumTemperature(pdv.getFloat(MINIMUM_TEMPERATURE ));
mr.setPrecipAccum(pdv.getFloat(PRECIP_ACCUM ));
mr.setPrecipType((Short) pdv.getNumber(PRECIP_TYPE ));
mr.setPrecipIntensity((Short) pdv.getNumber(PRECIP_INTENSITY ));
mr.setTimeSinceLastPcp((Double) pdv.getNumber(TIME_SINCE_LAST_PCP ));
mr.setSolarRadiation(pdv.getFloat(SOLAR_RADIATION ));
mr.setSolarRadChangeTime((Double) pdv.getNumber(SOLAR_RAD_CHANGE_TIME ));
mr.setSeaSurfaceTemp(pdv.getFloat(SEA_SURFACE_TEMP ));
mr.setWavePeriod(pdv.getFloat(WAVE_PERIOD ));
mr.setWaveHeight(pdv.getFloat(WAVE_HEIGHT ));
mr.setMidLevelCloudType((Short) pdv.getNumber(MID_LEVEL_CLOUD_TYPE));
mr.setHighLevelCloudType((Short) pdv.getNumber(HIGH_LEVEL_CLOUD_TYPE));
mr.setMaxTempRecordPeriod((Short) pdv.getNumber(MAX_TEMP_RECORD_PERIOD));
mr.setMaximumTemperature(pdv.getFloat(MAXIMUM_TEMPERATURE));
mr.setMinTempRecordPeriod((Short) pdv.getNumber(MIN_TEMP_RECORD_PERIOD));
mr.setMaximumTemperature(pdv.getFloat(MINIMUM_TEMPERATURE));
mr.setPrecipAccum(pdv.getFloat(PRECIP_ACCUM));
mr.setPrecipType((Short) pdv.getNumber(PRECIP_TYPE));
mr.setPrecipIntensity((Short) pdv.getNumber(PRECIP_INTENSITY));
mr.setTimeSinceLastPcp((Double) pdv.getNumber(TIME_SINCE_LAST_PCP));
mr.setSolarRadiation(pdv.getFloat(SOLAR_RADIATION));
mr.setSolarRadChangeTime((Double) pdv.getNumber(SOLAR_RAD_CHANGE_TIME));
mr.setSeaSurfaceTemp(pdv.getFloat(SEA_SURFACE_TEMP));
mr.setWavePeriod(pdv.getFloat(WAVE_PERIOD));
mr.setWaveHeight(pdv.getFloat(WAVE_HEIGHT));
mr.setRawMessage(pdv.getString(RAW_MESONET));
mr.setRelHumidity(pdv.getFloat(REL_HUMIDITY));
mr.setWindDir(pdv.getFloat(WIND_DIR ));
mr.setPressure(pdv.getFloat(PRESSURE ));
mr.setSeaLevelPressure(pdv.getFloat(SEA_LEVEL_PRESSURE ));
mr.setPrecipRate(pdv.getFloat(PRECIP_RATE ));
mr.setFuelTemperature(pdv.getFloat(FUEL_TEMPERATURE ));
mr.setFuelMoisture(pdv.getFloat(FUEL_MOISTURE ));
mr.setSoilTemperature(pdv.getFloat(SOIL_TEMPERATURE ));
mr.setSoilMoisture(pdv.getFloat(SOIL_MOISTURE ));
mr.setRelHumidity(pdv.getFloat(REL_HUMIDITY));
mr.setWindDir(pdv.getFloat(WIND_DIR));
mr.setPressure(pdv.getFloat(PRESSURE));
mr.setSeaLevelPressure(pdv.getFloat(SEA_LEVEL_PRESSURE));
mr.setPrecipRate(pdv.getFloat(PRECIP_RATE));
mr.setFuelTemperature(pdv.getFloat(FUEL_TEMPERATURE));
mr.setFuelMoisture(pdv.getFloat(FUEL_MOISTURE));
mr.setSoilTemperature(pdv.getFloat(SOIL_TEMPERATURE));
mr.setSoilMoisture(pdv.getFloat(SOIL_MOISTURE));
return mr;
}
public static MesonetLdadRecord[] toMesonetLdadRecords(PointDataContainer container) {
public static MesonetLdadRecord[] toMesonetLdadRecords(
PointDataContainer container) {
List<MesonetLdadRecord> records = new ArrayList<MesonetLdadRecord>();
container.setCurrentSz(container.getAllocatedSz());
for (int i = 0; i < container.getCurrentSz(); i++) {

View file

@ -68,11 +68,13 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 1, 2009 jkorman Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Oct 01, 2009 jkorman Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -86,475 +88,477 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "lsr",
indexes = {
@Index(name = "lsr_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "lsr", indexes = { @Index(name = "lsr_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class LocalStormReport extends PersistablePluginDataObject implements
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final int MISSING = -9999;
public static final Unit<Temperature> TEMPERATURE_UNIT = SI.KELVIN;
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Pressure> PRESSURE_UNIT = SI.PASCAL;
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Length> WAVE_UNIT = SI.METER;
public static final Unit<Length> VISIBILITY_UNIT = NonSI.MILE;
public static final Unit<DataAmount> CLOUD_COVER = NonSI.OCTET;
//
@DataURI(position = 1)
@Column
@XmlElement
@DynamicSerializeElement
private LSREventType eventType;
// Correction indicator from wmo header
@DataURI(position = 2)
@Column
@XmlElement
@DynamicSerializeElement
private String corIndicator;
@Embedded
@DataURI(position = 3, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
// Text of the WMO header
@Transient
@XmlElement
@DynamicSerializeElement
private String wmoHeader = "";
// Text of the office
@XmlElement
@DynamicSerializeElement
private String officeid = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String cityLoc = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String source = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String countyLoc = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String stateLoc = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String remarks = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private Float magnitude = -9999.0f;
// 0 = unknown
// 1 = estimated
// 2 = measured
// 3 =
// 4 =
@Transient
@XmlElement
@DynamicSerializeElement
private Integer magQual = MISSING;
//
@Transient
@XmlElement
@DynamicSerializeElement
private Integer injuries = MISSING;
//
@Transient
@XmlElement
@DynamicSerializeElement
private Integer fatalities = MISSING;
/**
* Empty default constructor
*/
public LocalStormReport() {
}
/**
* Construct an instance of this class using the supplied datauri.
*
* @param dataUri
*/
public LocalStormReport(String dataUri) {
super(dataUri);
}
/**
* @return the eventType
*/
public LSREventType getEventType() {
return eventType;
}
/**
* @param eventType
* the eventType to set
*/
public void setEventType(LSREventType eventType) {
this.eventType = eventType;
}
/**
* @return the corIndicator
*/
public String getCorIndicator() {
return corIndicator;
}
/**
* @param corIndicator
* the corIndicator to set
*/
public void setCorIndicator(String corIndicator) {
this.corIndicator = corIndicator;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @return the officeid
*/
public String getOfficeid() {
return officeid;
}
/**
* @param officeid
* the officeid to set
*/
public void setOfficeid(String officeid) {
this.officeid = officeid;
}
/**
* @return the cityLoc
*/
public String getCityLoc() {
return cityLoc;
}
/**
* @param cityLoc
* the cityLoc to set
*/
public void setCityLoc(String cityLoc) {
this.cityLoc = cityLoc;
}
/**
* @return the source
*/
public String getSource() {
return source;
}
/**
* @param source
* the source to set
*/
public void setSource(String source) {
this.source = source;
}
/**
* @return the countyLoc
*/
public String getCountyLoc() {
return countyLoc;
}
/**
* @param countyLoc
* the countyLoc to set
*/
public void setCountyLoc(String countyLoc) {
this.countyLoc = countyLoc;
}
/**
* @return the stateLoc
*/
public String getStateLoc() {
return stateLoc;
}
/**
* @param stateLoc
* the stateLoc to set
*/
public void setStateLoc(String stateLoc) {
this.stateLoc = stateLoc;
}
/**
* @return the remarks
*/
public String getRemarks() {
return remarks;
}
/**
* @param remarks
* the remarks to set
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
}
/**
* @return the magnitude
*/
public Float getMagnitude() {
return magnitude;
}
/**
* @param magnitude
* the magnitude to set
*/
public void setMagnitude(Float magnitude) {
this.magnitude = magnitude;
}
/**
* @return the magQual
*/
public Integer getMagQual() {
return magQual;
}
/**
* @param magQual
* the magQual to set
*/
public void setMagQual(Integer magQual) {
this.magQual = magQual;
}
/**
* @return the injuries
*/
public Integer getInjuries() {
return injuries;
}
/**
* @param injuries
* the injuries to set
*/
public void setInjuries(Integer injuries) {
this.injuries = injuries;
}
/**
* @return the fatalities
*/
public Integer getFatalities() {
return fatalities;
}
/**
* @param fatalities
* the fatalities to set
*/
public void setFatalities(Integer fatalities) {
this.fatalities = fatalities;
}
/**
* Set the data uri for this observation.
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
super.setDataURI(dataURI);
identifier = dataURI;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
public SurfaceObsLocation getLocation() {
return location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get whether the location for this observation is defined.
*
* @return Is this location defined.
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Calendar c = getDataTime().getRefTimeAsCalendar();
if (c != null) {
sb.append(String.format("LSR:%1$tY%1$tm%1$td%1$tH%1$tM",
getDataTime().getRefTimeAsCalendar()));
} else {
sb.append("LSR:YYYYMMDDHHmm");
}
sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude()));
sb.append(String.format("%s:", cityLoc));
sb.append(String.format("%s:", eventType.getEventName()));
sb.append(String.format("%5.2f:%s", getMagnitude(), getEventType()
.getEventUnits()));
return sb.toString();
}
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
private static final long serialVersionUID = 1L;
private static final int MISSING = -9999;
public static final Unit<Temperature> TEMPERATURE_UNIT = SI.KELVIN;
public static final Unit<Velocity> WIND_SPEED_UNIT = SI.METERS_PER_SECOND;
public static final Unit<Angle> WIND_DIR_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Pressure> PRESSURE_UNIT = SI.PASCAL;
public static final Unit<Angle> LOCATION_UNIT = NonSI.DEGREE_ANGLE;
public static final Unit<Length> WAVE_UNIT = SI.METER;
public static final Unit<Length> VISIBILITY_UNIT = NonSI.MILE;
public static final Unit<DataAmount> CLOUD_COVER = NonSI.OCTET;
//
@DataURI(position = 1)
@Column
@XmlElement
@DynamicSerializeElement
private LSREventType eventType;
// Correction indicator from wmo header
@DataURI(position = 2)
@Column
@XmlElement
@DynamicSerializeElement
private String corIndicator;
@Embedded
@DataURI(position = 3, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
// Text of the WMO header
@Transient
@XmlElement
@DynamicSerializeElement
private String wmoHeader = "";
// Text of the office
@XmlElement
@DynamicSerializeElement
private String officeid = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String cityLoc = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String source = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String countyLoc = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String stateLoc = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private String remarks = "";
//
@Transient
@XmlElement
@DynamicSerializeElement
private Float magnitude = -9999.0f;
// 0 = unknown
// 1 = estimated
// 2 = measured
// 3 =
// 4 =
@Transient
@XmlElement
@DynamicSerializeElement
private Integer magQual = MISSING;
//
@Transient
@XmlElement
@DynamicSerializeElement
private Integer injuries = MISSING;
//
@Transient
@XmlElement
@DynamicSerializeElement
private Integer fatalities = MISSING;
/**
* Empty default constructor
*/
public LocalStormReport() {
}
/**
* Construct an instance of this class using the supplied datauri.
*
* @param dataUri
*/
public LocalStormReport(String dataUri) {
super(dataUri);
}
/**
* @return the eventType
*/
public LSREventType getEventType() {
return eventType;
}
/**
* @param eventType
* the eventType to set
*/
public void setEventType(LSREventType eventType) {
this.eventType = eventType;
}
/**
* @return the corIndicator
*/
public String getCorIndicator() {
return corIndicator;
}
/**
* @param corIndicator
* the corIndicator to set
*/
public void setCorIndicator(String corIndicator) {
this.corIndicator = corIndicator;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @return the officeid
*/
public String getOfficeid() {
return officeid;
}
/**
* @param officeid
* the officeid to set
*/
public void setOfficeid(String officeid) {
this.officeid = officeid;
}
/**
* @return the cityLoc
*/
public String getCityLoc() {
return cityLoc;
}
/**
* @param cityLoc
* the cityLoc to set
*/
public void setCityLoc(String cityLoc) {
this.cityLoc = cityLoc;
}
/**
* @return the source
*/
public String getSource() {
return source;
}
/**
* @param source
* the source to set
*/
public void setSource(String source) {
this.source = source;
}
/**
* @return the countyLoc
*/
public String getCountyLoc() {
return countyLoc;
}
/**
* @param countyLoc
* the countyLoc to set
*/
public void setCountyLoc(String countyLoc) {
this.countyLoc = countyLoc;
}
/**
* @return the stateLoc
*/
public String getStateLoc() {
return stateLoc;
}
/**
* @param stateLoc
* the stateLoc to set
*/
public void setStateLoc(String stateLoc) {
this.stateLoc = stateLoc;
}
/**
* @return the remarks
*/
public String getRemarks() {
return remarks;
}
/**
* @param remarks
* the remarks to set
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
}
/**
* @return the magnitude
*/
public Float getMagnitude() {
return magnitude;
}
/**
* @param magnitude
* the magnitude to set
*/
public void setMagnitude(Float magnitude) {
this.magnitude = magnitude;
}
/**
* @return the magQual
*/
public Integer getMagQual() {
return magQual;
}
/**
* @param magQual
* the magQual to set
*/
public void setMagQual(Integer magQual) {
this.magQual = magQual;
}
/**
* @return the injuries
*/
public Integer getInjuries() {
return injuries;
}
/**
* @param injuries
* the injuries to set
*/
public void setInjuries(Integer injuries) {
this.injuries = injuries;
}
/**
* @return the fatalities
*/
public Integer getFatalities() {
return fatalities;
}
/**
* @param fatalities
* the fatalities to set
*/
public void setFatalities(Integer fatalities) {
this.fatalities = fatalities;
}
/**
* Set the data uri for this observation.
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
super.setDataURI(dataURI);
identifier = dataURI;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
public SurfaceObsLocation getLocation() {
return location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get whether the location for this observation is defined.
*
* @return Is this location defined.
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
@Override
public Amount getValue(String paramName) {
return null;
}
@Override
public String getString(String paramName) {
return null;
}
@Override
public String[] getStrings(String paramName) {
return null;
}
@Override
public Collection<Amount> getValues(String paramName) {
return null;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Calendar c = getDataTime().getRefTimeAsCalendar();
if (c != null) {
sb.append(String.format("LSR:%1$tY%1$tm%1$td%1$tH%1$tM",
getDataTime().getRefTimeAsCalendar()));
} else {
sb.append("LSR:YYYYMMDDHHmm");
}
sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude()));
sb.append(String.format("%s:", cityLoc));
sb.append(String.format("%s:", eventType.getEventName()));
sb.append(String.format("%5.2f:%s", getMagnitude(), getEventType()
.getEventUnits()));
return sb.toString();
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "lsr";
}
}

View file

@ -66,13 +66,14 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* MAR 27, 2013 1746 dhladky MADIS data record creation
* Mar 27, 2013 1746 dhladky MADIS data record creation
* May 15, 2013 1658 djohnson Add sequence.
* May 16, 2013 753 dhladky Restored dataUri as unique key
* June 03, 2013 1763 dhladky Added ValMap lookups for QCD
* July 08, 2013 2171 dhladky Removed dataURI
* July 12, 2013 2096 mpduff Changed temperature unit to F.
* July 14, 2013 2180 dhladky GUI update for mouse over display
* Jun 03, 2013 1763 dhladky Added ValMap lookups for QCD
* Jul 08, 2013 2171 dhladky Removed dataURI
* Jul 12, 2013 2096 mpduff Changed temperature unit to F.
* Jul 14, 2013 2180 dhladky GUI update for mouse over display
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author dhladky
@ -564,7 +565,8 @@ public class MadisRecord extends PersistablePluginDataObject implements
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 16, 2013 dhladky Initial creation
* Mar 16, 2013 dhladky Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author dhladky
@ -572,21 +574,22 @@ public class MadisRecord extends PersistablePluginDataObject implements
*/
@XmlEnum
public enum QCD {
//C - Coarse pass, passed level 1
//S - Screened, passed levels 1 and 2
//V - Verified, passed levels 1, 2, and 3
//X - Rejected/erroneous, failed level 1
//Q - Questioned, passed level 1, failed 2 or 3
//G - Subjective good
//B - Subjective bad
@XmlEnumValue(QCD.V) VERIFIED("V"),
@XmlEnumValue(QCD.S) SCREENED("S"),
@XmlEnumValue(QCD.Q) QUESTIONED("Q"),
@XmlEnumValue(QCD.B) BAD("B"),
@XmlEnumValue(QCD.C) COARSEPASS("C"),
@XmlEnumValue(QCD.G) GOOD("G"),
@XmlEnumValue(QCD.Z) MISSING("Z"),
@XmlEnumValue(QCD.X) REJECTED("X");
// C - Coarse pass, passed level 1
// S - Screened, passed levels 1 and 2
// V - Verified, passed levels 1, 2, and 3
// X - Rejected/erroneous, failed level 1
// Q - Questioned, passed level 1, failed 2 or 3
// G - Subjective good
// B - Subjective bad
@XmlEnumValue(QCD.V)
VERIFIED("V"), @XmlEnumValue(QCD.S)
SCREENED("S"), @XmlEnumValue(QCD.Q)
QUESTIONED("Q"), @XmlEnumValue(QCD.B)
BAD("B"), @XmlEnumValue(QCD.C)
COARSEPASS("C"), @XmlEnumValue(QCD.G)
GOOD("G"), @XmlEnumValue(QCD.Z)
MISSING("Z"), @XmlEnumValue(QCD.X)
REJECTED("X");
private static final String V = "V";
@ -1138,7 +1141,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
result = (prime * result)
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
return result;
}
@ -1164,4 +1167,9 @@ public class MadisRecord extends PersistablePluginDataObject implements
}
return true;
}
@Override
public String getPluginName() {
return PLUGIN_NAME;
}
}

View file

@ -43,10 +43,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 2, 2011 bsteffen Initial creation
* Dec 02, 2011 bsteffen Initial creation
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -84,4 +85,8 @@ public class CrimssRecord extends NPPSoundingRecord {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "crimss";
}
}

View file

@ -43,10 +43,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 15, 2013 mschenke Initial creation
* Jan 15, 2013 mschenke Initial creation
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -88,7 +89,6 @@ public class NucapsRecord extends NPPSoundingRecord {
public static final String PDV_QUALITY_FLAG = "Quality_Flag";
public NucapsRecord() {
setPluginName(PLUGIN_NAME);
}
@Override
@ -98,4 +98,8 @@ public class NucapsRecord extends NPPSoundingRecord {
return super.getDataURI();
}
@Override
public String getPluginName() {
return PLUGIN_NAME;
}
}

View file

@ -53,11 +53,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 30, 2011 mschenke Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Nov 30, 2011 mschenke Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -71,12 +73,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "viirs",
indexes = {
@Index(name = "viirs_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "viirs", indexes = { @Index(name = "viirs_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
public class VIIRSDataRecord extends PersistablePluginDataObject implements
ISpatialEnabled {
@ -127,7 +125,6 @@ public class VIIRSDataRecord extends PersistablePluginDataObject implements
private VIIRSSpatialCoverage coverage;
public VIIRSDataRecord() {
setPluginName(VIIRSDataRecord.class.getAnnotation(Table.class).name());
}
/*
@ -256,8 +253,9 @@ public class VIIRSDataRecord extends PersistablePluginDataObject implements
@Override
public Date getPersistenceTime() {
Calendar c = getInsertTime();
if (c == null)
if (c == null) {
return null;
}
return c.getTime();
}
@ -296,10 +294,16 @@ public class VIIRSDataRecord extends PersistablePluginDataObject implements
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "viirs";
}
}

View file

@ -71,20 +71,21 @@ import com.vividsolutions.jts.geom.Geometry;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080103 384 jkorman Initial Coding.
* 20090408 952 jsanchez Updated getValue and getStrings methods.
* Added getMessageData method.
* 20090521 2338 jsanchez Changed the unit of the alititude.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* ======================================
* AWIPS2 DR Work
* 08/09/2012 1011 jkorman Added separate max icing level as well
* as separated code to generate distinct max icing/turbulence levels. Removed
* code that used "display" boolean to determine data access.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Jan 03, 2008 384 jkorman Initial Coding.
* Apr 08, 2009 952 jsanchez Updated getValue and getStrings methods.
* Added getMessageData method.
* May 21, 2009 2338 jsanchez Changed the unit of the alititude.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Aug 09, 2012 1011 jkorman Added separate max icing level as well
* as separated code to generate distinct
* max icing/turbulence levels. Removed
* code that used "display" boolean to
* determine data access.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
*
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author jkorman
@ -97,12 +98,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "pirep",
indexes = {
@Index(name = "pirep_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "pirep", indexes = { @Index(name = "pirep_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -635,14 +632,14 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled,
a = new Amount(this.getLatitude(), LOCATION_UNIT);
} else if (STA_LON.equals(pName)) {
a = new Amount(this.getLongitude(), LOCATION_UNIT);
} else if (UA_FLTLVL.equals(pName) && getFlightLevel() != null) {
} else if (UA_FLTLVL.equals(pName) && (getFlightLevel() != null)) {
a = new Amount(this.getFlightLevel().intValue(), ALTITUDE_UNIT);
} else if (UA_TOPHGT.equals(pName) && maxTurbcLayerData != null
&& maxTurbcLayerData.getTopLayerHeight() != null) {
} else if (UA_TOPHGT.equals(pName) && (maxTurbcLayerData != null)
&& (maxTurbcLayerData.getTopLayerHeight() != null)) {
a = new Amount(maxTurbcLayerData.getTopLayerHeight().intValue(),
ALTITUDE_UNIT);
} else if (UA_BOTHGT.equals(pName) && maxTurbcLayerData != null
&& maxTurbcLayerData.getBaseLayerHeight() != null) {
} else if (UA_BOTHGT.equals(pName) && (maxTurbcLayerData != null)
&& (maxTurbcLayerData.getBaseLayerHeight() != null)) {
a = new Amount(maxTurbcLayerData.getBaseLayerHeight().intValue(),
ALTITUDE_UNIT);
}
@ -675,7 +672,7 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled,
retData = new String[] { intensity };
}
}
} else if ("ICT".matches(paramName) && maxIcingLayerData != null) {
} else if ("ICT".matches(paramName) && (maxIcingLayerData != null)) {
if (maxIcingLayerData != null) {
String type = maxIcingLayerData.getDataType();
if (type != null) {
@ -791,7 +788,7 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled,
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
result = (prime * result)
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
return result;
}
@ -805,21 +802,26 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled,
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
PirepRecord other = (PirepRecord) obj;
if (getDataURI() == null) {
if (other.getDataURI() != null) {
return false;
}
} else if (!getDataURI().equals(other.getDataURI()))
} else if (!getDataURI().equals(other.getDataURI())) {
return false;
}
return true;
}
@Override
@Column
@Access(AccessType.PROPERTY)
@ -843,4 +845,8 @@ public class PirepRecord extends PluginDataObject implements ISpatialEnabled,
return maxIcingLayerData;
}
}
@Override
public String getPluginName() {
return "pirep";
}
}

View file

@ -59,6 +59,7 @@ import com.vividsolutions.jts.geom.Geometry;
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* May 15, 2013 1869 bsteffen Remove DataURI from goes/poes soundings.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -73,184 +74,174 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "poessounding",
indexes = {
@Index(name = "poessounding_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "poessounding", indexes = { @Index(name = "poessounding_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@DynamicSerialize
public class POESSounding extends PersistablePluginDataObject implements
ISpatialEnabled, IPointData {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
// The profiler observation time.
// @Column
// @DynamicSerializeElement
// @XmlElement
// private Calendar timeObs;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
private String wmoHeader;
// @XmlAttribute
// @DynamicSerializeElement
// private Long fcstSeconds;
@Transient
private Set<POESSoundingLevel> soundingLevels;
// Text of the WMO header
@Column(length = 32)
@DynamicSerializeElement
private String wmoHeader;
@Embedded
@DataURI(position = 1, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
@Transient
private Set<POESSoundingLevel> soundingLevels;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DataURI(position = 1, embedded = true)
@DynamicSerializeElement
private SurfaceObsLocation location;
/**
* Create an empty ProfilerObs object.
*/
public POESSounding() {
}
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public POESSounding(String uri) {
super(uri);
}
/**
* Create an empty ProfilerObs object.
*/
public POESSounding() {
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Constructor for DataURI construction through base class. This is used by
* the notification service.
*
* @param uri
* A data uri applicable to this class.
* @param tableDef
* The table definitions for this class.
*/
public POESSounding(String uri) {
super(uri);
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Set the WMOHeader of the file that contained this data.
*
* @return The wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* Was this location defined from the station catalog? False if not.
*
* @return Was this location defined from the station catalog?
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Get the WMOHeader of the file that contained this data.
*
* @param wmoHeader
* The WMOHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* Set the WMOHeader of the file that contained this data.
*
* @return The wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @return the soundingLevels
*/
public Set<POESSoundingLevel> getSoundingLevels() {
return soundingLevels;
}
/**
* Get the WMOHeader of the file that contained this data.
*
* @param wmoHeader
* The WMOHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void setSoundingLevels(Set<POESSoundingLevel> soundingLevels) {
this.soundingLevels = soundingLevels;
}
/**
* @return the soundingLevels
*/
public Set<POESSoundingLevel> getSoundingLevels() {
return soundingLevels;
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void addSoundingLevel(POESSoundingLevel soundingLevel) {
if (soundingLevels == null) {
soundingLevels = new HashSet<POESSoundingLevel>();
}
soundingLevels.add(soundingLevel);
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void setSoundingLevels(Set<POESSoundingLevel> soundingLevels) {
this.soundingLevels = soundingLevels;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
/**
* @param soundingLevels
* the soundingLevels to set
*/
public void addSoundingLevel(POESSoundingLevel soundingLevel) {
if (soundingLevels == null) {
soundingLevels = new HashSet<POESSoundingLevel>();
}
soundingLevels.add(soundingLevel);
}
public SurfaceObsLocation getLocation() {
return location;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
public SurfaceObsLocation getLocation() {
return location;
}
@Override
public PointDataView getPointDataView() {
return this.pointDataView;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
@Override
public PointDataView getPointDataView() {
return this.pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public String getPluginName() {
return "poessounding";
}
}

View file

@ -74,13 +74,15 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 01/25/10 3796 D. Hladky Initial release
* Apr 04, 2013 1846 bkowal Added an index on refTime and forecastTime
* 04/08/13 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* Jan 25, 2010 3796 D. Hladky Initial release
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 06, 2013 2228 njensen Use deserialize(byte[])
* Aug 06, 2013 2228 njensen Use deserialize(byte[])
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -330,14 +332,14 @@ public class PrecipRateRecord extends PersistablePluginDataObject implements
}
if (dataRec != null) {
for (int i = 0; i < dataRec.length; i++) {
if (dataRec[i].getName().equals("Data")) {
setRawData(((ByteDataRecord) dataRec[i]).getByteData());
} else if (dataRec[i].getName().equals("Angles")) {
setAngleData(((FloatDataRecord) dataRec[i]).getFloatData());
} else if (dataRec[i].getName().equals("DHRMap")) {
for (IDataRecord element : dataRec) {
if (element.getName().equals("Data")) {
setRawData(((ByteDataRecord) element).getByteData());
} else if (element.getName().equals("Angles")) {
setAngleData(((FloatDataRecord) element).getFloatData());
} else if (element.getName().equals("DHRMap")) {
try {
ByteDataRecord byteData = (ByteDataRecord) dataRec[i];
ByteDataRecord byteData = (ByteDataRecord) element;
Object o = DynamicSerializationManager.getManager(
SerializationType.Thrift).deserialize(
byteData.getByteData());
@ -611,4 +613,9 @@ public class PrecipRateRecord extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "preciprate";
}
}

View file

@ -71,14 +71,16 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 20080303 969 jkorman Initial implementation.
* 20090413 2251 jsanchez Implemented IDecoderGettable methods
* and plotted Profiler plots.
* 20090610 2489 jsanchez Updated the windSpeeed & windDirection.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Mar 03, 2008 969 jkorman Initial implementation.
* Apr 13, 2009 2251 jsanchez Implemented IDecoderGettable methods and
* plotted Profiler plots.
* Jun 10, 2009 2489 jsanchez Updated the windSpeeed & windDirection.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -92,12 +94,8 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "profiler",
indexes = {
@Index(name = "profiler_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "profiler", indexes = { @Index(name = "profiler_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -607,18 +605,20 @@ public class ProfilerObs extends PersistablePluginDataObject implements
// Adjust to agl heights!
Integer height = l.getLevelHeight() - getElevation();
if (level == 1500 && height <= 1500 && height >= 1250) {
if ((level == 1500) && (height <= 1500)
&& (height >= 1250)) {
retValue = l;
} else if (level == 1250 && height <= 1500
&& height > 1125) {
} else if ((level == 1250) && (height <= 1500)
&& (height > 1125)) {
retValue = l;
} else if (level == 1000 && height <= 1125
&& height > 875) {
} else if ((level == 1000) && (height <= 1125)
&& (height > 875)) {
retValue = l;
} else if (level == 750 && height <= 875
&& height > 625) {
} else if ((level == 750) && (height <= 875)
&& (height > 625)) {
retValue = l;
} else if (level == 500 && height <= 625 && height > 0) {
} else if ((level == 500) && (height <= 625)
&& (height > 0)) {
retValue = l;
}
// No need to go higher than this.
@ -697,4 +697,9 @@ public class ProfilerObs extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "profiler";
}
}

View file

@ -64,14 +64,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/24/09 2027 D. Hladky Initial release
* 4/27/12 #562 dgilling Rename getters/setters to
* match Java conventions.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* 04/08/13 #1293 bkowal Removed references to hdffileid.
* Feb 24, 2009 2027 D. Hladky Initial release
* Apr 27, 2012 562 dgilling Rename getters/setters to match Java
* conventions.
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -85,17 +87,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "qpf",
indexes = {
@Index(name = "qpf_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "qpf", indexes = { @Index(name = "qpf_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class QPFRecord extends PersistablePluginDataObject
implements ISpatialEnabled, IMonitorProcessing {
public class QPFRecord extends PersistablePluginDataObject implements
ISpatialEnabled, IMonitorProcessing {
private static final long serialVersionUID = 767763365671L;
@ -515,9 +513,9 @@ public class QPFRecord extends PersistablePluginDataObject
try {
IDataRecord[] dataRec = dataStore.retrieve(getDataURI());
for (int i = 0; i < dataRec.length; i++) {
if (dataRec[i] instanceof FloatDataRecord) {
setDataArray(((FloatDataRecord) dataRec[i]).getFloatData());
for (IDataRecord element : dataRec) {
if (element instanceof FloatDataRecord) {
setDataArray(((FloatDataRecord) element).getFloatData());
}
}
} catch (Exception se) {
@ -592,4 +590,9 @@ public class QPFRecord extends PersistablePluginDataObject
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "qpf";
}
}

View file

@ -118,19 +118,22 @@ import com.vividsolutions.jts.geom.Coordinate;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 02/14/2007 139 Phillippe Initial creation
* 09/14/2007 379 jkorman Added populateDataStore() and
* getPersistenceTime() from new IPersistable
* 10/09/2007 465 randerso Updated to better represent level 3 data
* 20071129 472 jkorman Added IDecoderGettable interface.
* 03/04/2013 DCS51 zwang Handle MIGFA product
* Feb 14, 2007 139 Phillippe Initial creation
* Sep 14, 2007 379 jkorman Added populateDataStore() and
* getPersistenceTime() from new
* IPersistable
* Oct 09, 2007 465 randerso Updated to better represent level 3 data
* Nov 29, 2007 472 jkorman Added IDecoderGettable interface.
* Mar 04, 2013 DCS51 zwang Handle MIGFA product
* Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar
* HDF5.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -144,12 +147,8 @@ import com.vividsolutions.jts.geom.Coordinate;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "radar",
indexes = {
@Index(name = "radar_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "radar", indexes = { @Index(name = "radar_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -384,7 +383,6 @@ public class RadarRecord extends PersistablePluginDataObject implements
public RadarRecord(RadarRecord that) {
this.id = that.id;
this.dataURI = that.dataURI;
this.pluginName = that.pluginName;
this.dataTime = that.dataTime;
this.insertTime = that.insertTime;
this.messageData = that.messageData;
@ -614,18 +612,18 @@ public class RadarRecord extends PersistablePluginDataObject implements
public void setRawDataValue(int radial, int bin, byte value) {
byte[] rawData = getRawData();
if (rawData != null && numRadials != null && numBins != null) {
if ((rawData != null) && (numRadials != null) && (numBins != null)) {
if ((radial < numRadials) && (bin < numBins)) {
rawData[radial * numBins + bin] = value;
rawData[(radial * numBins) + bin] = value;
}
}
}
public byte getRawDataValue(int radial, int bin) {
byte[] rawData = getRawData();
if (rawData != null && numRadials != null && numBins != null) {
if ((rawData != null) && (numRadials != null) && (numBins != null)) {
if ((radial < numRadials) && (bin < numBins)) {
return rawData[radial * numBins + bin];
return rawData[(radial * numBins) + bin];
}
}
return 0;
@ -638,9 +636,9 @@ public class RadarRecord extends PersistablePluginDataObject implements
short[] rawShortData = getRawShortData();
byte[] rawData = getRawData();
if (rawShortData != null) {
return rawShortData[radial * numBins + bin];
return rawShortData[(radial * numBins) + bin];
} else if (rawData != null) {
return (short) (rawData[radial * numBins + bin] & 0xFF);
return (short) (rawData[(radial * numBins) + bin] & 0xFF);
}
}
return 0;
@ -652,9 +650,9 @@ public class RadarRecord extends PersistablePluginDataObject implements
short[] rawShortData = getRawShortData();
byte[] rawData = getRawData();
if (rawShortData != null) {
return rawShortData[radial * numBins + bin] & 0xFFFF;
return rawShortData[(radial * numBins) + bin] & 0xFFFF;
} else if (rawData != null) {
return rawData[radial * numBins + bin] & 0xFF;
return rawData[(radial * numBins) + bin] & 0xFF;
}
}
return 0;
@ -892,7 +890,7 @@ public class RadarRecord extends PersistablePluginDataObject implements
pix = new double[] { 129, 149 };
}
double[] data = { offset, offset + (nLevels - 1) * scale };
double[] data = { offset, offset + ((nLevels - 1) * scale) };
rval = new PiecewisePixel(getUnitObject(), pix, data);
} else {
@ -1127,7 +1125,7 @@ public class RadarRecord extends PersistablePluginDataObject implements
}
// distance
double mag = Math.sqrt(i * i + j * j);
double mag = Math.sqrt((i * i) + (j * j));
// 1 i or j is 1/4 km, so convert to meters
mag *= 250;
@ -1201,19 +1199,19 @@ public class RadarRecord extends PersistablePluginDataObject implements
private <T> void addPacketData(double i, double j, String stormID,
int type, RadarProductType productType, T currData,
boolean needToConvert) {
// Convert x/y to lon/lat
if (needToConvert) {
Coordinate coor;
// for MIGFA, i/j unit is 1km, for other radar products, unit is 1/4km
if (type == 140) {
coor = convertStormLatLon(i * 4.0, j * 4.0);
}
else {
// Convert x/y to lon/lat
if (needToConvert) {
Coordinate coor;
// for MIGFA, i/j unit is 1km, for other radar products, unit is
// 1/4km
if (type == 140) {
coor = convertStormLatLon(i * 4.0, j * 4.0);
} else {
coor = convertStormLatLon(i, j);
}
}
i = coor.x;
j = coor.y;
}
@ -1496,11 +1494,11 @@ public class RadarRecord extends PersistablePluginDataObject implements
convertLatLon = true;
Map<MapValues, String> map = new HashMap<MapValues, String>();
for (GenericDataParameter param : packet.getParams()
.values()) {
GFMAttributeIDs id = null;
GFMAttributeIDs id = null;
id = GFMAttributeIDs.getAttribute(param.getId());
if (id != null) {
@ -1517,7 +1515,7 @@ public class RadarRecord extends PersistablePluginDataObject implements
for (GenericDataComponent currComponent : packet
.getFeatures().values()) {
currFeature = (AreaComponent) currComponent;
//first point of GFM
// first point of GFM
i = currFeature.getPoints().get(0).getCoordinate1();
j = currFeature.getPoints().get(0).getCoordinate2();
@ -1525,7 +1523,7 @@ public class RadarRecord extends PersistablePluginDataObject implements
currFeature, convertLatLon);
}
continue PACKET;
}else if (currPacket instanceof GenericDataPacket) {
} else if (currPacket instanceof GenericDataPacket) {
// Generic Packet will contain most of the data for the
// product, so, in general, nothing probably needs to be
// done here
@ -1753,4 +1751,9 @@ public class RadarRecord extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "radar";
}
}

View file

@ -57,21 +57,22 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 02/14/07 139 bphillip Initial Creation
* 20070914 379 jkorman Added populateDataStore() and
* getPersistenceTime() from new IPersistable
* 20071129 472 jkorman Added IDecoderGettable interface.
* 20081106 1515 jkorman Changed units length from 16 to 26
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* - AWIPS2 Baseline Repository --------
* 07/30/2012 798 jkorman Support for common satellite data.
* 03/25/2013 1823 dgilling Replace underscores with spaces in URI
* Feb 14, 2007 139 bphillip Initial Creation
* Sep 14, 2007 379 jkorman Added populateDataStore() and
* getPersistenceTime() from new
* IPersistable
* Nov 29, 2007 472 jkorman Added IDecoderGettable interface.
* Nov 06, 2008 1515 jkorman Changed units length from 16 to 26
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Jul 30, 2012 798 jkorman Support for common satellite data.
* Mar 25, 2013 1823 dgilling Replace underscores with spaces in URI
* constructor.
* 04/08/2013 1293 bkowal Removed references to hdffileid.
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
*
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* </pre>
*
* @author bphillip
@ -213,7 +214,6 @@ public class SatelliteRecord extends PersistablePluginDataObject implements
* No-arg constructor.
*/
public SatelliteRecord() {
setPluginName(PLUGIN_ID);
}
/**
@ -410,4 +410,9 @@ public class SatelliteRecord extends PersistablePluginDataObject implements
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "satellite";
}
}

View file

@ -67,15 +67,17 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 03/17/10 2521 D. Hladky Initial release
* 02/01/13 1649 D. Hladky better logging,
* Mar 17, 2010 2521 D. Hladky Initial release
* Feb 01, 2013 1649 D. Hladky better logging,
* Feb 28, 2013 1731 bsteffen Optimize construction of scan resource.
* Apr 04, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 06, 2013 2228 njensen Use deserialize(byte[])
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -402,4 +404,9 @@ public class ScanRecord extends PersistablePluginDataObject {
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "scan";
}
}

View file

@ -57,11 +57,13 @@ import com.vividsolutions.jts.geom.Geometry;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 4, 2010 jsanchez Initial creation
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Jan 04, 2010 jsanchez Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
@ -75,229 +77,231 @@ import com.vividsolutions.jts.geom.Geometry;
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(
appliesTo = "svrwx",
indexes = {
@Index(name = "svrwx_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
}
)
@org.hibernate.annotations.Table(appliesTo = "svrwx", indexes = { @Index(name = "svrwx_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class SvrWxRecord extends PersistablePluginDataObject implements
ISpatialEnabled, IPointData {
ISpatialEnabled, IPointData {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
@Embedded
@DynamicSerializeElement
private PointDataView pointDataView;
// Text of the WMO header
@Transient
@XmlElement
@DynamicSerializeElement
private String wmoHeader = "";
// Text of the WMO header
@Transient
@XmlElement
@DynamicSerializeElement
private String wmoHeader = "";
@Embedded
@DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
@Embedded
@DataURI(position = 2, embedded = true)
@XmlElement
@DynamicSerializeElement
private SurfaceObsLocation location;
@Transient
@XmlElement
@DynamicSerializeElement
protected String eventKey;
@Transient
@XmlElement
@DynamicSerializeElement
protected String eventKey;
@XmlElement
@DynamicSerializeElement
@Column
@DataURI(position = 1)
protected String reportType;
@XmlElement
@DynamicSerializeElement
@Column
@DataURI(position = 1)
protected String reportType;
@Transient
@XmlElement
@DynamicSerializeElement
protected String details;
@Transient
@XmlElement
@DynamicSerializeElement
protected String details;
@Transient
@XmlElement
@DynamicSerializeElement
protected String greenTime;
@Transient
@XmlElement
@DynamicSerializeElement
protected String greenTime;
/**
* Empty default constructor
*/
public SvrWxRecord() {
}
/**
* Empty default constructor
*/
public SvrWxRecord() {
}
/**
* Construct an instance of this class using the supplied datauri.
*
* @param dataUri
*/
public SvrWxRecord(String dataUri) {
super(dataUri);
}
/**
* Construct an instance of this class using the supplied datauri.
*
* @param dataUri
*/
public SvrWxRecord(String dataUri) {
super(dataUri);
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @return the wmoHeader
*/
public String getWmoHeader() {
return wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* @param wmoHeader
* the wmoHeader to set
*/
public void setWmoHeader(String wmoHeader) {
this.wmoHeader = wmoHeader;
}
/**
* Set the data uri for this observation.
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
super.setDataURI(dataURI);
identifier = dataURI;
}
/**
* Set the data uri for this observation.
*
* @param dataURI
*/
@Override
public void setDataURI(String dataURI) {
super.setDataURI(dataURI);
identifier = dataURI;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
@Override
public SurfaceObsLocation getSpatialObject() {
return location;
}
public SurfaceObsLocation getLocation() {
return location;
}
public SurfaceObsLocation getLocation() {
return location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
public void setLocation(SurfaceObsLocation location) {
this.location = location;
}
public String getEventKey() {
return eventKey;
}
public String getEventKey() {
return eventKey;
}
public void setEventKey(String eventKey) {
this.eventKey = eventKey;
}
public void setEventKey(String eventKey) {
this.eventKey = eventKey;
}
public String getGreenTime() {
return greenTime;
}
public String getGreenTime() {
return greenTime;
}
public void setGreenTime(String greenTime) {
this.greenTime = greenTime;
}
public void setGreenTime(String greenTime) {
this.greenTime = greenTime;
}
public String getDetails() {
return details;
}
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
public void setDetails(String details) {
this.details = details;
}
public String getReportType() {
return reportType;
}
public String getReportType() {
return reportType;
}
public void setReportType(String reportType) {
this.reportType = reportType;
}
public void setReportType(String reportType) {
this.reportType = reportType;
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get this observation's geometry.
*
* @return The geometry for this observation.
*/
public Geometry getGeometry() {
return location.getGeometry();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry latitude.
*
* @return The geometry latitude.
*/
public double getLatitude() {
return location.getLatitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the geometry longitude.
*
* @return The geometry longitude.
*/
public double getLongitude() {
return location.getLongitude();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the station identifier for this observation.
*
* @return the stationId
*/
public String getStationId() {
return location.getStationId();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get the elevation, in meters, of the observing platform or location.
*
* @return The observation elevation, in meters.
*/
public Integer getElevation() {
return location.getElevation();
}
/**
* Get whether the location for this observation is defined.
*
* @return Is this location defined.
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
/**
* Get whether the location for this observation is defined.
*
* @return Is this location defined.
*/
public Boolean getLocationDefined() {
return location.getLocationDefined();
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public PointDataView getPointDataView() {
return pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public void setPointDataView(PointDataView pointDataView) {
this.pointDataView = pointDataView;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Calendar c = getDataTime().getRefTimeAsCalendar();
if (c != null) {
sb.append(String.format("SvrWx:%1$tY%1$tm%1$td%1$tH%1$tM",
getDataTime().getRefTimeAsCalendar()));
} else {
sb.append("SvrWx:YYYYMMDDHHmm");
}
sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude()));
return sb.toString();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Calendar c = getDataTime().getRefTimeAsCalendar();
if (c != null) {
sb.append(String.format("SvrWx:%1$tY%1$tm%1$td%1$tH%1$tM",
getDataTime().getRefTimeAsCalendar()));
} else {
sb.append("SvrWx:YYYYMMDDHHmm");
}
sb.append(String.format("%6.2f %7.2f:", getLatitude(), getLongitude()));
return sb.toString();
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "svrwx";
}
}

Some files were not shown because too many files have changed in this diff Show more