CM-MERGE:OB13.5.6-1,-2 into 14.1.3
Former-commit-id:8874d41872
[formerlyef5c74dece
[formerlyc1b3f9d180
] [formerly8874d41872
[formerly b859032bcec187616adfd414dd1ce5fe27829e9e]]] Former-commit-id:ef5c74dece
[formerlyc1b3f9d180
] Former-commit-id:ef5c74dece
Former-commit-id:64a10ce12d
This commit is contained in:
parent
6d59ee458c
commit
f512b9c51e
7 changed files with 186 additions and 127 deletions
|
@ -27,7 +27,6 @@ import java.io.FileWriter;
|
|||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
@ -35,14 +34,14 @@ import java.util.Map;
|
|||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import javax.xml.bind.JAXB;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.ListenerList;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
|
||||
import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
||||
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
|
||||
|
@ -51,6 +50,8 @@ import com.raytheon.uf.common.localization.LocalizationContext;
|
|||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.LocalizationFileInputStream;
|
||||
import com.raytheon.uf.common.localization.LocalizationFileOutputStream;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -60,7 +61,6 @@ import com.raytheon.uf.common.time.SimulatedTime;
|
|||
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
|
||||
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.points.PointsDataManager;
|
||||
import com.raytheon.viz.awipstools.common.RangeRing;
|
||||
|
@ -85,14 +85,14 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* 04-07-10 #4614 randerso Reworked to use localization files
|
||||
* 07-11-12 #875 rferrel Move points to PointsDataManager.
|
||||
* 04-02-14 DR 16351 D. Friedman Fix updates to storm track from preferences. (backport from 14.2.2)
|
||||
* 06-03-24 3191 njensen Improved saving/loading storm track data
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ToolsDataManager implements ILocalizationFileObserver,
|
||||
IPropertyChangeListener {
|
||||
public class ToolsDataManager implements ILocalizationFileObserver {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ToolsDataManager.class);
|
||||
|
||||
|
@ -102,13 +102,9 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
|||
|
||||
private static final String P_RANGERING_LOCATIONS = "rangeRingLocations";
|
||||
|
||||
private static final String P_STORMTRACK_SPEED = "stormSpeed";
|
||||
private static final String TOOLS_DIR = "awipsTools";
|
||||
|
||||
private static final String P_STORMTRACK_ANGLE = "stormAngle";
|
||||
|
||||
private static final String P_STORMTRACK_POINTS = "stormCoordinates";
|
||||
|
||||
private static final String P_STORMTRACK_DATE = "stormDate";
|
||||
private static final String STORM_TRACK_FILE = "stormTrackData.xml";
|
||||
|
||||
private static final int[] DEFAULT_LINE_RADIUS = { 120, 120, 120, 120, 240,
|
||||
240, 216, 216, 360, 360 };
|
||||
|
@ -139,8 +135,6 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
|||
|
||||
private boolean stormTrackDirty = false;
|
||||
|
||||
private String site;
|
||||
|
||||
private LocalizationFile userToolsDir;
|
||||
|
||||
private IPathManager pathMgr;
|
||||
|
@ -155,19 +149,19 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
|||
}
|
||||
|
||||
private ToolsDataManager() {
|
||||
site = LocalizationManager.getInstance().getCurrentSite();
|
||||
|
||||
pathMgr = PathManagerFactory.getPathManager();
|
||||
pointsManager = PointsDataManager.getInstance();
|
||||
LocalizationContext userCtx = pathMgr.getContext(
|
||||
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
|
||||
|
||||
userToolsDir = pathMgr.getLocalizationFile(userCtx, "awipsTools"
|
||||
+ File.separator + site);
|
||||
/*
|
||||
* TODO: Since it's already under the user localization, why does it
|
||||
* then want to have the site underneath that? If anyone knows, please
|
||||
* document it and remove this TODO. PointsManager does a similar thing.
|
||||
*/
|
||||
userToolsDir = pathMgr.getLocalizationFile(userCtx, TOOLS_DIR
|
||||
+ IPathManager.SEPARATOR
|
||||
+ LocalizationManager.getInstance().getCurrentSite());
|
||||
userToolsDir.addFileUpdatedObserver(this);
|
||||
|
||||
CorePlugin.getDefault().getPreferenceStore()
|
||||
.addPropertyChangeListener(this);
|
||||
}
|
||||
|
||||
public Collection<String> getBaselineNames() {
|
||||
|
@ -252,67 +246,73 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
|||
}
|
||||
|
||||
private void loadStormData() {
|
||||
stormData = new StormTrackData();
|
||||
HierarchicalPreferenceStore store = (HierarchicalPreferenceStore) CorePlugin
|
||||
.getDefault().getPreferenceStore();
|
||||
store.setDefault(P_STORMTRACK_SPEED, 35.0);
|
||||
double speed = store.getDouble(P_STORMTRACK_SPEED);
|
||||
stormData.setMotionSpeed(speed);
|
||||
|
||||
store.setDefault(P_STORMTRACK_ANGLE, 60.0);
|
||||
double angle = store.getDouble(P_STORMTRACK_ANGLE);
|
||||
stormData.setMotionDirection(angle);
|
||||
|
||||
long date = store.getLong(P_STORMTRACK_DATE);
|
||||
if (date > 0) {
|
||||
stormData.setDate(new Date(date));
|
||||
}
|
||||
String[] points = store.getStringArray(P_STORMTRACK_POINTS);
|
||||
if (points != null) {
|
||||
setCoordinates(stormData, points);
|
||||
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||
LocalizationFile f = pathMgr.getLocalizationFile(
|
||||
userToolsDir.getContext(), userToolsDir.getName()
|
||||
+ IPathManager.SEPARATOR + STORM_TRACK_FILE);
|
||||
if (f.exists()) {
|
||||
LocalizationFileInputStream is = null;
|
||||
try {
|
||||
is = f.openInputStream();
|
||||
stormData = JAXB.unmarshal(is, StormTrackData.class);
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Error loading storm track data", e);
|
||||
stormData = defaultStormTrackData();
|
||||
} finally {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"Error closing storm track data input stream",
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
stormData = defaultStormTrackData();
|
||||
}
|
||||
|
||||
stormTrackDirty = false;
|
||||
}
|
||||
|
||||
private void setCoordinates(StormTrackData data, String[] points) {
|
||||
Coordinate[] coords = new Coordinate[points.length];
|
||||
for (int i = 0; i < points.length; ++i) {
|
||||
String[] latLon = points[i].split("[ ]");
|
||||
try {
|
||||
coords[i] = new Coordinate(Double.parseDouble(latLon[0]),
|
||||
Double.parseDouble(latLon[1]));
|
||||
} catch (NumberFormatException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error reading storm track coordinates", e);
|
||||
coords = new Coordinate[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
data.setCoordinates(coords);
|
||||
/**
|
||||
* Creates and returns a default storm track data
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static StormTrackData defaultStormTrackData() {
|
||||
StormTrackData data = new StormTrackData();
|
||||
data.setMotionSpeed(35.0);
|
||||
data.setMotionDirection(60.0);
|
||||
data.setDate(SimulatedTime.getSystemTime().getTime());
|
||||
return data;
|
||||
}
|
||||
|
||||
private void storeStormData() {
|
||||
synchronized (stormLock) {
|
||||
// Update the store time
|
||||
stormData.setDate(SimulatedTime.getSystemTime().getTime());
|
||||
HierarchicalPreferenceStore store = (HierarchicalPreferenceStore) CorePlugin
|
||||
.getDefault().getPreferenceStore();
|
||||
store.setValue(P_STORMTRACK_SPEED, stormData.getMotionSpeed());
|
||||
store.setValue(P_STORMTRACK_ANGLE, stormData.getMotionDirection());
|
||||
Coordinate[] coordinates = stormData.getCoordinates();
|
||||
if (coordinates != null) {
|
||||
String[] coords = new String[coordinates.length];
|
||||
for (int i = 0; i < coordinates.length; ++i) {
|
||||
coords[i] = coordinates[i].x + " " + coordinates[i].y;
|
||||
}
|
||||
store.setValue(P_STORMTRACK_POINTS, coords);
|
||||
}
|
||||
store.setValue(P_STORMTRACK_DATE, stormData.getDate().getTime());
|
||||
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||
LocalizationFile f = pathMgr.getLocalizationFile(
|
||||
userToolsDir.getContext(), userToolsDir.getName()
|
||||
+ IPathManager.SEPARATOR + STORM_TRACK_FILE);
|
||||
LocalizationFileOutputStream os = null;
|
||||
try {
|
||||
store.save();
|
||||
} catch (IOException e) {
|
||||
os = f.openOutputStream();
|
||||
JAXB.marshal(stormData, os);
|
||||
os.closeAndSave();
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error saving storm track data", e);
|
||||
try {
|
||||
if (os != null) {
|
||||
os.close();
|
||||
}
|
||||
} catch (IOException e1) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"Error closing storm track data output stream", e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -593,11 +593,18 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
|||
*/
|
||||
@Override
|
||||
public void fileUpdated(FileUpdatedMessage message) {
|
||||
/*
|
||||
* This will receive messages about points updates too, but since the
|
||||
* PointsManager is listening for those we don't care.
|
||||
*/
|
||||
String fileName = new File(message.getFileName()).getName();
|
||||
if (fileName.startsWith(BASELINE_PREFIX)) {
|
||||
baselineFileUpdated(fileName);
|
||||
} else {
|
||||
pointsManager.fileUpdated(message);
|
||||
} else if (fileName.equals(STORM_TRACK_FILE)) {
|
||||
stormTrackDirty = true;
|
||||
for (Object listener : stormListeners.getListeners()) {
|
||||
((IToolChangedListener) listener).toolChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -642,44 +649,4 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
|||
stormListeners.remove(listener);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse
|
||||
* .jface.util.PropertyChangeEvent)
|
||||
*/
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent event) {
|
||||
String key = event.getProperty();
|
||||
if ((P_STORMTRACK_ANGLE.equals(key) || P_STORMTRACK_DATE.equals(key)
|
||||
|| P_STORMTRACK_POINTS.equals(key) || P_STORMTRACK_SPEED
|
||||
.equals(key)) && stormData != null) {
|
||||
synchronized (stormLock) {
|
||||
Object value = event.getNewValue();
|
||||
if (P_STORMTRACK_ANGLE.equals(key) && value instanceof Double) {
|
||||
stormData.setMotionDirection((Double) value);
|
||||
} else if (P_STORMTRACK_DATE.equals(key)
|
||||
&& value instanceof Long) {
|
||||
stormData.setDate(new Date((Long) value));
|
||||
} else if (P_STORMTRACK_POINTS.equals(key)
|
||||
&& value instanceof String[]) {
|
||||
setCoordinates(stormData, (String[]) value);
|
||||
} else if (P_STORMTRACK_SPEED.equals(key)
|
||||
&& value instanceof Double) {
|
||||
stormData.setMotionSpeed((Double) value);
|
||||
} else {
|
||||
/* Incompatible value indicates update from preference
|
||||
* store. We will want to reload.
|
||||
*/
|
||||
stormTrackDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// fire listeners
|
||||
for (Object listener : stormListeners.getListeners()) {
|
||||
((IToolChangedListener) listener).toolChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,18 @@ package com.raytheon.viz.awipstools.common;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import com.raytheon.uf.common.serialization.adapters.CoordAdapter;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Data representing a storm track that can be saved to XML
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -32,20 +40,29 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 12, 2009 bwoodle Initial creation
|
||||
* Jun 03, 2014 3191 njensen Added xml annotations
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bwoodle
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlRootElement
|
||||
public class StormTrackData {
|
||||
|
||||
@XmlJavaTypeAdapter(DateAdapter.class)
|
||||
@XmlElement(name = "stormDate")
|
||||
private Date date;
|
||||
|
||||
@XmlElement(name = "stormAngle")
|
||||
private double motionDirection;
|
||||
|
||||
@XmlElement(name = "stormSpeed")
|
||||
private double motionSpeed;
|
||||
|
||||
@XmlJavaTypeAdapter(CoordAdapter.class)
|
||||
@XmlElement(name = "stormCoordinates")
|
||||
private Coordinate[] coordinates;
|
||||
|
||||
public StormTrackData() {
|
||||
|
@ -123,4 +140,19 @@ public class StormTrackData {
|
|||
return date != null && !Double.isNaN(motionDirection)
|
||||
&& !Double.isNaN(motionSpeed);
|
||||
}
|
||||
|
||||
private static class DateAdapter extends XmlAdapter<Long, Date> {
|
||||
|
||||
@Override
|
||||
public Date unmarshal(Long v) throws Exception {
|
||||
return new Date(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long marshal(Date v) throws Exception {
|
||||
return v.getTime();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -99,6 +99,7 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* 06-11-2013 DR 16234 D. Friedman Fix pivot index when frames count is reduced.
|
||||
* 06-24-2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
* 04-07-2014 DR 17232 D. Friedman Make sure pivot indexes are valid.
|
||||
* 06-03-14 3191 njensen Fix postData to not retrieve
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1394,7 +1395,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
}
|
||||
|
||||
private void postData(StormTrackState state) {
|
||||
StormTrackData data = dataManager.getStormTrackData();
|
||||
StormTrackData data = new StormTrackData();
|
||||
Coordinate[] coords = new Coordinate[state.timePoints.length];
|
||||
for (int i = 0; i < coords.length; ++i) {
|
||||
coords[i] = new Coordinate(state.timePoints[i].coord);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
# to get correct offsets for Alaska
|
||||
# 04/17/14 2934 dgilling Remove alias for TPCSurgeProb D2D database.
|
||||
# 05/09/2014 3148 randerso Add tpHPCndfd to D2DAccumulativeElements for HPCERP
|
||||
# 05/29/2014 3224 randerso Added "SPC":8 to D2DDBVERSIONS
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# USEFUL DEFINES
|
||||
|
@ -1006,6 +1007,7 @@ D2DDBVERSIONS = {
|
|||
"TPCProb": 30,
|
||||
"CRMTopo": 1,
|
||||
"NED": 1,
|
||||
"SPC": 8,
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<alias base="GeH">geh</alias>
|
||||
<alias base="GH">gh</alias>
|
||||
<alias base="GVV">gvv</alias>
|
||||
<alias base="HAILPROB">hailprob</alias>
|
||||
<alias base="Heli">heli</alias>
|
||||
<alias base="HIdx">hidx</alias>
|
||||
<alias base="HTSGW">htsgw</alias>
|
||||
|
@ -45,14 +46,20 @@
|
|||
<alias base="PoT">pot</alias>
|
||||
<alias base="P">p</alias>
|
||||
<alias base="PR">pr</alias>
|
||||
<alias base="PRSVR">prsvr</alias>
|
||||
<alias base="PRSIGSV">prsigsv</alias>
|
||||
<alias base="PVV">pvv</alias>
|
||||
<alias base="PW">pw</alias>
|
||||
<alias base="RH">rh</alias>
|
||||
<alias base="SCP">scp</alias>
|
||||
<alias base="SHF">shf</alias>
|
||||
<alias base="SH">sh</alias>
|
||||
<alias base="SIGHAILPROB">sighailprob</alias>
|
||||
<alias base="SIGTRNDPROB">sigtrndprob</alias>
|
||||
<alias base="SIGWINDPROB">sigwindprob</alias>
|
||||
<alias base="SLI">sli</alias>
|
||||
<alias base="SnD">snd</alias>
|
||||
<alias base="SRCONO">srcono</alias>
|
||||
<alias base="SVV">svv</alias>
|
||||
<alias base="SWDIR">swdir</alias>
|
||||
<alias base="SWELL">swell</alias>
|
||||
|
@ -78,6 +85,7 @@
|
|||
<alias base="WEASD">weasd</alias>
|
||||
<alias base="WGH">wgh</alias>
|
||||
<alias base="WGS">wgs</alias>
|
||||
<alias base="WINDPROB">windprob</alias>
|
||||
<alias base="WS">ws</alias>
|
||||
<alias base="WVDIR">wvdir</alias>
|
||||
<alias base="WVHGT">wvhgt</alias>
|
||||
|
|
|
@ -209,4 +209,19 @@
|
|||
<level>SFC</level>
|
||||
</levels>
|
||||
</gridParameterInfo>
|
||||
<gridParameterInfo xsi:type="parameterInfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<short_name>srcono</short_name>
|
||||
<long_name>Convective Outlook</long_name>
|
||||
<units>1</units>
|
||||
<udunits>category</udunits>
|
||||
<uiname>srcono</uiname>
|
||||
<valid_range>0.0</valid_range>
|
||||
<valid_range>100.0</valid_range>
|
||||
<fillValue>-99999.0</fillValue>
|
||||
<n3D>0</n3D>
|
||||
<levelsDesc>SFC</levelsDesc>
|
||||
<levels>
|
||||
<level>SFC</level>
|
||||
</levels>
|
||||
</gridParameterInfo>
|
||||
</gridParamInfo>
|
||||
|
|
|
@ -118,6 +118,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
|||
* type is not READING like in A1 code.
|
||||
* 04/29/2014 3088 mpduff Change logging class, clean up/optimization.
|
||||
* Updated with more performance fixes.
|
||||
* 06/02/2014 mpduff Fix for caching of range checks.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -291,6 +292,39 @@ public class PostShef {
|
|||
/** Forecast query results */
|
||||
private Object[] queryForecastResults;
|
||||
|
||||
/** Location range data found flag */
|
||||
private boolean locRangeFound = false;
|
||||
|
||||
/** Default range data found flag */
|
||||
private boolean defRangeFound = false;
|
||||
|
||||
/** Valid date range flag */
|
||||
private boolean validDateRange = false;
|
||||
|
||||
/** Gross range minimum value */
|
||||
private double grossRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/** Gross range maximum value */
|
||||
private double grossRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/** Reasonable range minimum value */
|
||||
private double reasonRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/** Reasonable range maximum value */
|
||||
private double reasonRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/** Alert upper limit value */
|
||||
private double alertUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/** Alarm upper limit value */
|
||||
private double alarmUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/** Alert lower limit value */
|
||||
private double alertLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/** Alarm lower limit value */
|
||||
private double alarmLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param date
|
||||
|
@ -475,7 +509,7 @@ public class PostShef {
|
|||
data.setCreationDateObj(d);
|
||||
data.setCreationDate("1970-01-01 00:00:00");
|
||||
}
|
||||
|
||||
|
||||
locId = data.getLocationId();
|
||||
String key = locId + prodId + data.getObservationTime();
|
||||
if (idLocations.containsKey(key)) {
|
||||
|
@ -1069,6 +1103,18 @@ public class PostShef {
|
|||
useTs = null;
|
||||
basisTimeValues = null;
|
||||
previousQueryForecast = null;
|
||||
locRangeFound = false;
|
||||
defRangeFound = false;
|
||||
validDateRange = false;
|
||||
grossRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||
grossRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||
reasonRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||
reasonRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||
alertUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
alarmUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
alertLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
alarmLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2571,14 +2617,6 @@ public class PostShef {
|
|||
long qualityCode = ShefConstants.DEFAULT_QC_VALUE;
|
||||
String monthdaystart = null;
|
||||
String monthdayend = null;
|
||||
double grossRangeMin = missing;
|
||||
double grossRangeMax = missing;
|
||||
double reasonRangeMin = missing;
|
||||
double reasonRangeMax = missing;
|
||||
double alertUpperLimit = missing;
|
||||
double alarmUpperLimit = missing;
|
||||
double alertLowerLimit = missing;
|
||||
double alarmLowerLimit = missing;
|
||||
|
||||
alertAlarm = ShefConstants.NO_ALERTALARM;
|
||||
|
||||
|
@ -2597,10 +2635,6 @@ public class PostShef {
|
|||
return ShefConstants.QC_MANUAL_FAILED;
|
||||
}
|
||||
|
||||
boolean locRangeFound = false;
|
||||
boolean defRangeFound = false;
|
||||
boolean validDateRange = false;
|
||||
|
||||
boolean executeQuery = true;
|
||||
if (!qualityCheckFlag) {
|
||||
// If qualityCheckFlag is false the the query has already been
|
||||
|
|
Loading…
Add table
Reference in a new issue