Issue #1869 Remove DataURI column from ldadmesonet.
Former-commit-id:bbe2667522
[formerly 6bf797d6e0b3334f15c1ac68c9433b9e3ec39c79] Former-commit-id:080b43444a
This commit is contained in:
parent
186f7169af
commit
89fe0b301d
14 changed files with 86 additions and 331 deletions
|
@ -21,7 +21,6 @@
|
|||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADMesoPlot.xml"
|
||||
menuText="30 min stn plot" id="local30minstnplot">
|
||||
<dataURI>/ldadmesonet/%</dataURI>
|
||||
<substitute key="svg" value="ldadMesoDesign.svg"/>
|
||||
<substitute key="legend" value="30 min Local Data Plot"/>
|
||||
<substitute key="posOffset" value="900"/>
|
||||
|
@ -29,7 +28,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADMesoQCPlot.xml"
|
||||
menuText="30 min stn plot + QC" id="local30minstnQCplot">
|
||||
<dataURI>/qc/%</dataURI>
|
||||
<substitute key="svgPrefix" value="ldadQC"/>
|
||||
<substitute key="legend" value="30 min LDAD QC Plot"/>
|
||||
<substitute key="posOffset" value="900"/>
|
||||
|
@ -40,7 +38,6 @@
|
|||
<contribute xsi:type="subMenu" menuText="Other Local Plots">
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADMesoPlot.xml"
|
||||
menuText="15 min stn plot" id="local15minstnplot">
|
||||
<dataURI>/ldadmesonet/%</dataURI>
|
||||
<substitute key="svg" value="ldadMesoDesign.svg"/>
|
||||
<substitute key="legend" value="15 min Local Data Plot"/>
|
||||
<substitute key="posOffset" value="450"/>
|
||||
|
@ -48,7 +45,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADMesoQCPlot.xml"
|
||||
menuText="15 min stn plot + QC" id="local15minstnQCplot">
|
||||
<dataURI>/qc/%</dataURI>
|
||||
<substitute key="svgPrefix" value="ldadQC"/>
|
||||
<substitute key="legend" value="15 min LDAD QC Plot"/>
|
||||
<substitute key="posOffset" value="450"/>
|
||||
|
@ -58,7 +54,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADMesoPlot.xml"
|
||||
menuText="5 min stn plot" id="local5minstnplot">
|
||||
<dataURI>/ldadmesonet/%</dataURI>
|
||||
<substitute key="svg" value="ldadMesoDesign.svg"/>
|
||||
<substitute key="legend" value="5 min Local Data Plot"/>
|
||||
<substitute key="posOffset" value="150"/>
|
||||
|
@ -66,7 +61,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADMesoPlot.xml"
|
||||
menuText="1 min stn plot" id="local1minstnplot">
|
||||
<dataURI>/ldadmesonet/%</dataURI>
|
||||
<substitute key="svg" value="ldadMesoDesign.svg"/>
|
||||
<substitute key="legend" value="1 min Local Data Plot"/>
|
||||
<substitute key="posOffset" value="30"/>
|
||||
|
@ -74,7 +68,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADMesoPlot.xml"
|
||||
menuText="WindCh/HeatIdx" id="localWindChHeatIdx">
|
||||
<dataURI>/ldadmesonet/%</dataURI>
|
||||
<substitute key="svg" value="ldadMesoHiWcDesign.svg"/>
|
||||
<substitute key="legend" value="Local WindChill/HeatIndex Plot"/>
|
||||
<substitute key="posOffset" value="900"/>
|
||||
|
@ -87,7 +80,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADHydroPlot.xml"
|
||||
menuText="3 hr Precip" id="local3hrPrecip">
|
||||
<dataURI>/ldadhydro/%</dataURI>
|
||||
<substitute key="svg" value="ldadHydro3hrPrecipDesign.svg"/>
|
||||
<substitute key="legend" value="3 hr Precip Plot"/>
|
||||
<substitute key="posOffset" value="5400"/>
|
||||
|
@ -95,7 +87,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADHydroPlot.xml"
|
||||
menuText="1 hr Precip" id="local1hrPrecip">
|
||||
<dataURI>/ldadhydro/%</dataURI>
|
||||
<substitute key="svg" value="ldadHydro1hrPrecipDesign.svg"/>
|
||||
<substitute key="legend" value="1 hr Precip Plot"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -103,7 +94,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADHydroPlot.xml"
|
||||
menuText="30 min Precip" id="local30minPrecip">
|
||||
<dataURI>/ldadhydro/%</dataURI>
|
||||
<substitute key="svg" value="ldadHydro30minPrecipDesign.svg"/>
|
||||
<substitute key="legend" value="30 min Precip Plot"/>
|
||||
<substitute key="posOffset" value="900"/>
|
||||
|
@ -111,7 +101,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADHydroPlot.xml"
|
||||
menuText="15 min Precip" id="local15minPrecip">
|
||||
<dataURI>/ldadhydro/%</dataURI>
|
||||
<substitute key="svg" value="ldadHydro15minPrecipDesign.svg"/>
|
||||
<substitute key="legend" value="15 min Precip Plot"/>
|
||||
<substitute key="posOffset" value="450"/>
|
||||
|
@ -119,7 +108,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/LDADHydroPlot.xml"
|
||||
menuText="5 min Precip" id="local5minPrecip">
|
||||
<dataURI>/ldadhydro/%</dataURI>
|
||||
<substitute key="svg" value="ldadHydro5minPrecipDesign.svg"/>
|
||||
<substitute key="legend" value="5 min Precip Plot"/>
|
||||
<substitute key="posOffset" value="150"/>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="NWS MSL Pressure" id="msasMSLnwsPressure">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msasMSLnwsPressure"/>
|
||||
<substitute key="legend" value="msas MSLP-nws Obs(mb*10)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -31,7 +30,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="MSAS MSL Pressure" id="msasMAPSPressure">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msasMAPSPressure"/>
|
||||
<substitute key="legend" value="msas MSL Obs(mb*10)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -41,7 +39,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="Altimeter" id="msasAltimeter">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msasAltimeter"/>
|
||||
<substitute key="legend" value="msas altimeter Obs(mb*10)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -51,7 +48,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="3hr Pressure Change" id="msas3hrPressureChange">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msas3hrPressureChange"/>
|
||||
<substitute key="legend" value="msas 3hr press change Obs(mb*10)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -61,7 +57,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="Wind" id="msasWind">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msasWind"/>
|
||||
<substitute key="legend" value="msas wind Obs(kts)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -71,7 +66,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="Potential Temp" id="msasPotentialTemp">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msasPotentialTemp"/>
|
||||
<substitute key="legend" value="msas theta Obs(K)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -81,7 +75,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="Dewpoint" id="msasDewpoint">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msasDewpoint"/>
|
||||
<substitute key="legend" value="msas dewpoint Obs(F)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -91,7 +84,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MsasQCPlot.xml"
|
||||
menuText="Dewpoint Depression" id="msasDewpointDepression">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svgPrefix" value="msasDewpointDepression"/>
|
||||
<substitute key="legend" value="msas dewpoint dep Obs(F)"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
|
|
@ -21,24 +21,17 @@
|
|||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/maritimeFixedBuoy.xml"
|
||||
menuText="Fixed Buoys" id="FixedBuoys"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1005/%</dataURI>
|
||||
</contribute>
|
||||
productInterval="3600" productOffset="1800" />
|
||||
<contribute xsi:type="bundleItem" file="bundles/maritimeMoving.xml"
|
||||
menuText="Moving Maritime" id="MovingMaritime"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1003/%</dataURI>
|
||||
</contribute>
|
||||
productInterval="3600" productOffset="1800" />
|
||||
<contribute xsi:type="bundleItem" file="bundles/maritimeMAROB.xml"
|
||||
menuText="MAROB" id="MAROB"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1007/%</dataURI>
|
||||
</contribute>
|
||||
productInterval="3600" productOffset="1800" />
|
||||
<contribute xsi:type="subMenu" menuText="Other Maritime Plots">
|
||||
<contribute xsi:type="bundleItem" file="bundles/SeaStatePlot.xml"
|
||||
menuText="Fixed Sea State" id="FixedSeaState"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%</dataURI>
|
||||
<substitute key="svg" value="seaStateDesign.svg"/>
|
||||
<substitute key="legend" value="Fixed Buoys Sea State"/>
|
||||
<substitute key="reportType" value="1004,1005"/>
|
||||
|
@ -46,7 +39,6 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/SeaStatePlot.xml"
|
||||
menuText="Moving Sea State" id="MovingSeaState"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%</dataURI>
|
||||
<substitute key="svg" value="seaStateDesign.svg"/>
|
||||
<substitute key="legend" value="Moving Buoys/Ships Sea State"/>
|
||||
<substitute key="reportType" value="1003,1006"/>
|
||||
|
@ -54,7 +46,6 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/SeaStatePlot.xml"
|
||||
menuText="MAROB Sea State" id="MAROBSeaState"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1007/%</dataURI>
|
||||
<substitute key="svg" value="seaStateDesign.svg"/>
|
||||
<substitute key="legend" value="MAROB Sea State"/>
|
||||
<substitute key="reportType" value="1007"/>
|
||||
|
@ -62,7 +53,6 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/MaritimePlot.xml"
|
||||
menuText="Maritime Clouds/Vis" id="MaritimeCloudVis"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1003/%</dataURI>
|
||||
<substitute key="svg" value="maritimeCvDesign.svg"/>
|
||||
<substitute key="legend" value="Maritime Clouds and Visibility"/>
|
||||
<substitute key="reportType" value="1003"/>
|
||||
|
@ -70,7 +60,6 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/MaritimePlot.xml"
|
||||
menuText="MAROB Clouds/Vis" id="MarobCloudsVis"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1007/%</dataURI>
|
||||
<substitute key="svg" value="maritimeCvDesign.svg"/>
|
||||
<substitute key="legend" value="MAROB Clouds and Visibility"/>
|
||||
<substitute key="reportType" value="1007"/>
|
||||
|
@ -91,7 +80,6 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/Scatterometer.xml"
|
||||
menuText="ASCAT Winds 25 km" id="ASCATWinds"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/bufrascat/%</dataURI>
|
||||
<substitute key="legend" value="ASCAT"/>
|
||||
<substitute key="svg" value="ascatPlotDesign.svg"/>
|
||||
<substitute key="plugin" value="bufrascat"/>
|
||||
|
|
|
@ -25,12 +25,9 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="subMenu" menuText="Other Plots">
|
||||
<contribute xsi:type="bundleItem" file="bundles/15minSurfacePlot.xml"
|
||||
menuText="15 min Plot" id="15MinSurfacePlot">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
</contribute>
|
||||
menuText="15 min Plot" id="15MinSurfacePlot" />
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPlot.xml"
|
||||
menuText="24Hr Chg" id="24HrChg">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svg" value="metar24ChgDesign.svg"/>
|
||||
<substitute key="legend" value="METAR 24H Change"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -38,7 +35,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPlot.xml"
|
||||
menuText="Ceil/Vis Plot (AGL)" id="CeilVisPlotAGL">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svg" value="metarCvDesign.svg"/>
|
||||
<substitute key="legend" value="Ceiling (agl) and Visibility"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -46,7 +42,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPlot.xml"
|
||||
menuText="Ceil/Vis Plot (MSL)" id="CeilVisPlotMSL">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svg" value="metarCvMslDesign.svg"/>
|
||||
<substitute key="legend" value="Ceiling (msl) and Visibility"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -54,7 +49,6 @@
|
|||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPlot.xml"
|
||||
menuText="Wind Ch/HeatIdx" id="WindChHeatIdx">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="svg" value="metarHiWcDesign.svg"/>
|
||||
<substitute key="legend" value="Wind Chill/Heat Index plot"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
|
@ -67,28 +61,24 @@
|
|||
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPrecipPlot.xml"
|
||||
menuText="24hr Precip" id="24HrPrecip">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="duration" value="24"/>
|
||||
<substitute key="posOffset" value="21600"/>
|
||||
<substitute key="negOffset" value="0"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPrecipPlot.xml"
|
||||
menuText="6hr Precip" id="6HrPrecip">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="duration" value="6"/>
|
||||
<substitute key="posOffset" value="10800"/>
|
||||
<substitute key="negOffset" value="10800"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPrecipPlot.xml"
|
||||
menuText="3hr Precip" id="3HrPrecip">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="duration" value="3"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
<substitute key="negOffset" value="9000"/>
|
||||
</contribute>
|
||||
<contribute xsi:type="bundleItem" file="bundles/MetarPrecipPlot.xml"
|
||||
menuText="1hr Precip" id="1HrPrecip">
|
||||
<dataURI>/obs/%</dataURI>
|
||||
<substitute key="duration" value="1"/>
|
||||
<substitute key="posOffset" value="1800"/>
|
||||
<substitute key="negOffset" value="1800"/>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/SynSurfacePlot.xml"
|
||||
menuText="6 hr Precip" id="synoptic6hrPrecip"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1001/%</dataURI>
|
||||
<substitute key="svg" value="synopticPrcp6Design.svg"/>
|
||||
<substitute key="legend" value="Synoptic 6hr Precip Plot"/>
|
||||
<substitute key="posOffset" value="0"/>
|
||||
|
@ -39,7 +38,6 @@
|
|||
<contribute xsi:type="bundleItem" file="bundles/SynSurfacePlot.xml"
|
||||
menuText="24 hr Precip" id="synoptic24hrPrecip"
|
||||
productInterval="3600" productOffset="1800">
|
||||
<dataURI>/sfcobs/%/1001/%</dataURI>
|
||||
<substitute key="svg" value="synopticPrcp24Design.svg"/>
|
||||
<substitute key="legend" value="Synoptic 24hr Precip Plot"/>
|
||||
<substitute key="posOffset" value="0"/>
|
||||
|
|
|
@ -27,6 +27,7 @@ import java.util.TreeSet;
|
|||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
|
||||
import com.raytheon.uf.common.dataplugin.request.GetPluginRecordMapRequest;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -43,10 +44,12 @@ import com.raytheon.uf.viz.core.requests.ThriftClient;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 7/24/07 353 bphillip Initial creation
|
||||
* 10/8/2008 1532 bphillip Refactored to incorporate annotation support
|
||||
* Mar 5, 2013 1753 njensen Improved debug message
|
||||
* Jul 24, 2007 353 bphillip Initial creation
|
||||
* Oct 08, 2008 1532 bphillip Refactored to incorporate annotation
|
||||
* support
|
||||
* Mar 05, 2013 1753 njensen Improved debug message
|
||||
* Mar 29, 2013 1638 mschenke Added dataURI mapping methods
|
||||
* May 15, 2013 1869 bsteffen Move uri map creation to DataURIUtil.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -132,44 +135,20 @@ public class RecordFactory {
|
|||
return null;
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
String[] tokens = dataURI.replaceAll("_", " ").split(DataURI.SEPARATOR);
|
||||
String[] tokens = dataURI.split(DataURI.SEPARATOR, 3);
|
||||
String pluginName = tokens[1];
|
||||
|
||||
map.put("pluginName", pluginName);
|
||||
PluginDataObject obj = null;
|
||||
try {
|
||||
obj = this.getPluginClass(pluginName).newInstance();
|
||||
|
||||
for (int i = 2; i < tokens.length; i++) {
|
||||
if (!tokens[i].equals("%") && !tokens[i].trim().isEmpty()) {
|
||||
String fieldName = PluginDataObject.getDataURIFieldName(
|
||||
obj.getClass(), i - 2);
|
||||
if (fieldName == null) {
|
||||
continue;
|
||||
}
|
||||
// fieldName = fieldName
|
||||
// .substring(fieldName.lastIndexOf(".") + 1);
|
||||
Object value = obj.getDataURIFieldValue(i - 2, tokens[i]);
|
||||
map.put(fieldName, value);
|
||||
} else if (tokens[i].equals("%")) {
|
||||
String fieldName = PluginDataObject.getDataURIFieldName(
|
||||
obj.getClass(), i - 2);
|
||||
// fieldName = fieldName
|
||||
// .substring(fieldName.lastIndexOf(".") + 1);
|
||||
map.put(fieldName, WILDCARD);
|
||||
}
|
||||
|
||||
}
|
||||
Map<String, Object> map = DataURIUtil.createDataURIMap(dataURI,
|
||||
getPluginClass(pluginName));
|
||||
map.put("dataURI", dataURI);
|
||||
return map;
|
||||
} catch (NoPluginException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Unable to create property map for "
|
||||
+ dataURI, e);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,6 +56,7 @@ import com.raytheon.viz.pointdata.rsc.retrieve.PointDataPlotInfoRetriever;
|
|||
* Feb 17, 2009 njensen Initial creation
|
||||
* Jun 29, 2009 2538 jsanchez Implemented Metars.
|
||||
* May 14, 2013 1869 bsteffen Get plots working without dataURI
|
||||
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -164,7 +165,6 @@ public class PlotResourceData extends AbstractRequestableResourceData {
|
|||
pluginProps.put("lsr", new PluginPlotProperties(true, false));
|
||||
pluginProps.put("tcg", new PluginPlotProperties(true, false));
|
||||
pluginProps.put("svrwx", new PluginPlotProperties(true, false));
|
||||
pluginProps.put("ldadmesonet", new PluginPlotProperties(true, false));
|
||||
pluginProps.put("ldadhydro", new PluginPlotProperties(true, false));
|
||||
pluginProps.put("qc", new PluginPlotProperties(true, false));
|
||||
pluginProps.put("textPoints", new PluginPlotProperties(true, false));
|
||||
|
@ -188,7 +188,7 @@ public class PlotResourceData extends AbstractRequestableResourceData {
|
|||
pluginProps.put("bufrmosLAMP", new PluginPlotProperties());
|
||||
pluginProps.put("bufrmosMRF", new PluginPlotProperties());
|
||||
pluginProps.put("bufrmosNGM", new PluginPlotProperties());
|
||||
|
||||
pluginProps.put("ldadmesonet", new PluginPlotProperties());
|
||||
|
||||
ParsedURL.registerHandler(new LocalizationParsedURLHandler());
|
||||
}
|
||||
|
|
|
@ -41,5 +41,6 @@ dropDatauriAndAddConstraint bufrmosavn bufrmosavn_location_id_reftime_forecastti
|
|||
dropDatauriAndAddConstraint bufrmoshpc bufrmoshpc_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
|
||||
dropDatauriAndAddConstraint goessounding goessounding_stationid_reftime_latitude_longitude_key "(stationid, reftime, latitude, longitude)"
|
||||
dropDatauriAndAddConstraint poessounding poessounding_stationid_reftime_latitude_longitude_key "(stationid, reftime, latitude, longitude)"
|
||||
dropDatauriAndAddConstraint ldadmesonet ldadmesonet_stationid_reftime_reportType_dataProvider_latitude_longitude_key "(stationid, reftime, reportType, dataProvider, latitude, longitude)"
|
||||
|
||||
echo "INFO: dataURI columns dropped successfully"
|
||||
|
|
|
@ -20,20 +20,8 @@
|
|||
package com.raytheon.uf.common.dataplugin.ldadmesonet;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import javax.measure.quantity.Angle;
|
||||
import javax.measure.quantity.Length;
|
||||
import javax.measure.quantity.Pressure;
|
||||
import javax.measure.quantity.Temperature;
|
||||
import javax.measure.quantity.Velocity;
|
||||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
import javax.persistence.Access;
|
||||
import javax.persistence.AccessType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
|
@ -41,15 +29,9 @@ import javax.persistence.SequenceGenerator;
|
|||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
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 org.hibernate.annotations.Index;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
|
@ -71,11 +53,13 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ----------- ---------- ----------- --------------------------
|
||||
* 9/4/09 vkorolev Initial creation
|
||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||
* Sep 04, 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.
|
||||
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -85,7 +69,9 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
|
||||
@Entity
|
||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "ldadmesonetseq")
|
||||
@Table(name = "ldadmesonet", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
||||
@Table(name = "ldadmesonet", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||
"stationid", "reftime", "reportType", "dataProvider", "latitude",
|
||||
"longitude" }) })
|
||||
/*
|
||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||
* forecastTime is unlikely to be used.
|
||||
|
@ -96,51 +82,17 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
@Index(name = "ldadmesonet_refTimeIndex", columnNames = { "refTime", "forecastTime" } )
|
||||
}
|
||||
)
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@DynamicSerialize
|
||||
public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable, IPointData, IPersistable {
|
||||
ISpatialEnabled, IPointData, IPersistable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final String OBS_TIME_FMT = "%1$tY/%<tm/%<td %<tH:%<tM:%<tS";
|
||||
|
||||
public static final String OBS_TEXT = "text";
|
||||
|
||||
public static final Unit<Length> LENGTH_UNIT = SI.METER;
|
||||
|
||||
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;
|
||||
|
||||
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
|
||||
static {
|
||||
PARM_MAP.put("T", SFC_TEMP);
|
||||
PARM_MAP.put("DpT", SFC_DWPT);
|
||||
PARM_MAP.put("WS", SFC_WNDSPD);
|
||||
PARM_MAP.put("WD", SFC_WNDDIR);
|
||||
PARM_MAP.put("WGS", SFC_WNDGST);
|
||||
PARM_MAP.put("ASET", "SFC.PRESS.ALTIMETER");
|
||||
PARM_MAP.put("PMSL", PRES_SLP);
|
||||
PARM_MAP.put("NLAT", STA_LAT);
|
||||
PARM_MAP.put("NLON", STA_LON);
|
||||
PARM_MAP.put("STA", "STA");
|
||||
PARM_MAP.put("stationId", "STA");
|
||||
PARM_MAP.put("message", OBS_TEXT);
|
||||
PARM_MAP.put(OBS_TEXT, OBS_TEXT);
|
||||
}
|
||||
private static final String OBS_TIME_FMT = "%1$tY/%<tm/%<td %<tH:%<tM:%<tS";
|
||||
|
||||
//
|
||||
@DataURI(position = 1)
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String reportType;
|
||||
|
||||
|
@ -148,26 +100,22 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
@DataURI(position = 2)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlAttribute
|
||||
private String dataProvider; // Typical data providers: CDoT, KDoT, UDFCD,
|
||||
|
||||
// etc.
|
||||
|
||||
// Home WFO Id for the LDAD data
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private String homeWFO;
|
||||
|
||||
// Date and time of observation
|
||||
@Column
|
||||
@XmlAttribute
|
||||
@DynamicSerializeElement
|
||||
private Calendar observationTime; // observationTime
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 3, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location; // latitude, longitude, elevation,
|
||||
|
||||
|
@ -177,13 +125,11 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
@Column
|
||||
// @DataURI(position = 3)
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String providerId; // * "110" "FA6026DA" Data Provider station Id
|
||||
|
||||
// Alphanumeric station name
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String stationName; // * "Ralston_Res" "BEN CREEK AIRSTRIP"
|
||||
|
||||
// ?????????????????
|
||||
|
@ -191,19 +137,16 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Handbook Id (AFOS id or SHEF id)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String handbook5Id; // * "" ????????????????
|
||||
|
||||
// LDAD mesonet station type.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String stationType; // * "STO" "RAWS" ????????????
|
||||
|
||||
// Date and time data was processed by the data provider (e.g ALERT)
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Long reportTime; // * 1.247436157E9 time data was processed by the
|
||||
|
||||
// provider
|
||||
|
@ -211,7 +154,6 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Date and time the data was received
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double receivedTime; // * time data was received - seconds since
|
||||
|
||||
// 1-1-1970
|
||||
|
@ -219,13 +161,11 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// numeric WMO identification number
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Long numericWMOid; // numeric WMO identification
|
||||
|
||||
// Data platform type.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short dataPlatformType; // short -32767 moving (e.g. floating buoy
|
||||
|
||||
// or ship)
|
||||
|
@ -233,19 +173,16 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Data platform true direction.
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float platformTrueDirection; // data platform true direction degree
|
||||
|
||||
// Data platform true speed
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float platformTrueSpeed; // data platform true speed meter/sec
|
||||
|
||||
// Air temperature - time of last change (ALERT)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double tempChangeTime; // time of temperature last change - seconds
|
||||
|
||||
// since 1970-1-1 00:00:00.0
|
||||
|
@ -253,31 +190,26 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Wet bulb temperature
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float wetBulbTemperature; // kelvin
|
||||
|
||||
// Relative humidity - time of last change (ALERT)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double rhChangeTime; // time of last relative humidity change
|
||||
|
||||
// Station pressure
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float stationPressure;
|
||||
|
||||
// Station pressure - time of last change (ALERT)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double stationPressChangeTime; // time of last station press change
|
||||
|
||||
// 3 Hour pressure change character
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short pressChangeChar; // long_name =
|
||||
|
||||
// "character of pressure change";
|
||||
|
@ -294,73 +226,61 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// 3 Hour pressure change value
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float pressChange3Hour; // pascal 3 hour pressure change
|
||||
|
||||
// Wind direction - time of last change (ALERT)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double windDirChangeTime; // seconds since 1970-1-1 00:00:00.0
|
||||
|
||||
// Wind speed - time of last change (ALERT)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double windSpeedChangeTime;
|
||||
|
||||
// Wind gust - time of last change (ALERT)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double windGustChangeTime;
|
||||
|
||||
// Wind direction, "minimum", at mininum windspeed
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float windDirMin; // degree
|
||||
|
||||
// Wind direction, "maximum", at gust
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float windDirMax; // degree
|
||||
|
||||
// Sky Cover Group
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String skyCover; // char ref FMH-1
|
||||
|
||||
// Altitude of the cloud bases of the cloud groups in "skyCover"
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float skyLayerBase; // sky cover layer base - meter
|
||||
|
||||
// Visibility
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float visibility; // meter
|
||||
|
||||
// not in cdl
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String visibilityStatus;
|
||||
|
||||
// Fraction of sky covered by clouds, fraction of sky covered by clouds
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float totalCloudCover; // tenths
|
||||
|
||||
// Height of the lowest cloud layer
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short cloudBaseHeight; // cloudBaseHeight:long_name =
|
||||
|
||||
// "height of the lowest cloud layer";
|
||||
|
@ -380,13 +300,11 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Present Weather
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String presWeather; // present weather ref FMH-1
|
||||
|
||||
// Low level cloud type
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short lowLevelCloudType; // lowLevelCloudType:long_name =
|
||||
|
||||
// "low level cloud type";
|
||||
|
@ -407,7 +325,6 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Middle level cloud type
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short midLevelCloudType; // midLevelCloudType:long_name =
|
||||
|
||||
// "middle level cloud type";
|
||||
|
@ -427,7 +344,6 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// High level cloud type
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short highLevelCloudType; // highLevelCloudType:long_name =
|
||||
|
||||
// "high level cloud type";
|
||||
|
@ -449,7 +365,6 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Maximum temperature recording period
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short maxTempRecordPeriod; // maxTempRecordPeriod:long_name =
|
||||
|
||||
// "maximum temperature recording period";
|
||||
|
@ -467,13 +382,11 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Maximum temperature
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float maximumTemperature; // kelvin
|
||||
|
||||
// Minimum temperature recording period
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short minTempRecordPeriod; // minTempRecordPeriod:long_name =
|
||||
|
||||
// "minimum temperature recording period";
|
||||
|
@ -491,7 +404,6 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Minimum temperature
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float minimumTemperature; // kelvin
|
||||
|
||||
// precip accumulation unknown time
|
||||
|
@ -503,13 +415,11 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// difference in time of the stored report versus midnight.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float precipAccum;
|
||||
|
||||
// Precipitation type
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short precipType; // precipType:long_name = "precipitation type";
|
||||
|
||||
// precipType:value0 = "no precipitation";
|
||||
|
@ -522,7 +432,6 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Precipitation intensity
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Short precipIntensity; // precipIntensity:long_name =
|
||||
|
||||
// "precipitation intensity";
|
||||
|
@ -535,127 +444,106 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
// Time elapsed since last precipitation
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double timeSinceLastPcp; // seconds
|
||||
|
||||
// Solar radiation
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float solarRadiation; // watt/meter2
|
||||
|
||||
// Solar radiation - time of last change (ALERT)
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Double solarRadChangeTime; // seconds since 1970-1-1 00:00:00.0
|
||||
|
||||
// Sea surface temperature
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float seaSurfaceTemp; // kelvin
|
||||
|
||||
// Wave period
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float wavePeriod; // second
|
||||
|
||||
// Wave height
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float waveHeight; // meter
|
||||
|
||||
// Raw text LDAD mesonet message
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String rawMessage;
|
||||
|
||||
// Air Temperature in Kelvin
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float temperature; // temperature
|
||||
|
||||
// Dew point temperature in degrees Kelvin.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float dewpoint; // dewpoint
|
||||
|
||||
// Relative Humidity in percent.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float relHumidity; // relHumidity
|
||||
|
||||
// Wind direction in angular degrees. Integer
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float windDir;
|
||||
|
||||
// Observation wind speed in meters per second.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float windSpeed; // float windSpeed
|
||||
|
||||
// Wind gust in meters per second.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float windGust;
|
||||
|
||||
// Observation pressure in Pa.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float pressure; // Float stationPressure
|
||||
|
||||
// Sea level pressure
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float seaLevelPressure; // Float seaLevelPressure
|
||||
|
||||
// Altimeter setting in Pa.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float altimeter;
|
||||
|
||||
// Precipitation rate in m/sec.
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float precipRate; // float - precipitation rate
|
||||
|
||||
// not in cdl
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float fuelTemperature;
|
||||
|
||||
// not in cdl
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float fuelMoisture;
|
||||
|
||||
// not in cdl
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float soilTemperature;
|
||||
|
||||
// not in cdl
|
||||
@Transient
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private Float soilMoisture;
|
||||
|
||||
@Embedded
|
||||
|
@ -926,73 +814,6 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
return location;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class implements IDecoderGettable so return this instance.
|
||||
*
|
||||
* @return The reference to this instance.
|
||||
*/
|
||||
@Override
|
||||
public IDecoderGettable getDecoderGettable() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public String getString(String paramName) {
|
||||
String retValue = null;
|
||||
String pName = PARM_MAP.get(paramName);
|
||||
if ("STA".matches(pName)) {
|
||||
retValue = getStationId();
|
||||
} else if (OBS_TEXT.equals(pName)) {
|
||||
retValue = getStationId();
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getStrings(String paramName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Amount getValue(String paramName) {
|
||||
Amount a = null;
|
||||
String pName = PARM_MAP.get(paramName);
|
||||
|
||||
if (SFC_TEMP.equals(pName)) {
|
||||
a = new Amount(temperature, TEMPERATURE_UNIT);
|
||||
} else if (SFC_DWPT.equals(pName)) {
|
||||
a = new Amount(dewpoint, TEMPERATURE_UNIT);
|
||||
} else if (SFC_WNDSPD.equals(pName)) {
|
||||
a = new Amount(windSpeed, WIND_SPEED_UNIT);
|
||||
} else if (SFC_WNDGST.equals(pName)) {
|
||||
a = new Amount(windGust, WIND_SPEED_UNIT);
|
||||
} else if (SFC_WNDDIR.equals(pName)) {
|
||||
a = new Amount(windDir, WIND_DIR_UNIT);
|
||||
} else if (PRES_ALTSG.equals(pName)) {
|
||||
a = new Amount(altimeter, PRESSURE_UNIT);
|
||||
} else if (STA_LAT.equals(pName)) {
|
||||
a = new Amount(getLatitude(), LOCATION_UNIT);
|
||||
} else if (STA_LON.equals(pName)) {
|
||||
a = new Amount(getLongitude(), LOCATION_UNIT);
|
||||
} else if (PRES_SLP.equals(pName)) {
|
||||
a = new Amount(seaLevelPressure, PRESSURE_UNIT);
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public Collection<Amount> getValues(String paramName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param providerId
|
||||
* the providerId to set
|
||||
|
@ -1841,10 +1662,4 @@ public class MesonetLdadRecord extends PersistablePluginDataObject implements
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Column
|
||||
@Access(AccessType.PROPERTY)
|
||||
public String getDataURI() {
|
||||
return super.getDataURI();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,10 +39,12 @@ import com.raytheon.uf.common.dataplugin.PluginException;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 10/07/2008 1533 bphillip Initial Checkin
|
||||
* Oct 07, 2008 1533 bphillip Initial Checkin
|
||||
* Mar 29, 2013 1638 mschenke Added method for recursively getting all
|
||||
* dataURI fields for an object
|
||||
* Apr 18, 2013 1638 mschenke Moved dataURI map generation into here from PluginDataObject
|
||||
* Apr 18, 2013 1638 mschenke Moved dataURI map generation into here
|
||||
* from PluginDataObject
|
||||
* May 15, 2013 1869 bsteffen Move uri map creation from RecordFactory.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -107,6 +109,32 @@ public class DataURIUtil {
|
|||
throw new PluginException("Error constructing dataURI mapping", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, Object> createDataURIMap(String dataURI, Class<PluginDataObject> clazz)
|
||||
throws PluginException {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
String[] tokens = dataURI.replaceAll("_", " ").split(DataURI.SEPARATOR);
|
||||
|
||||
map.put("pluginName", tokens[1]);
|
||||
PluginDataObject obj = null;
|
||||
try {
|
||||
obj = clazz.newInstance();
|
||||
|
||||
for (int i = 2; i < tokens.length; i++) {
|
||||
String fieldName = PluginDataObject.getDataURIFieldName(
|
||||
obj.getClass(), i - 2);
|
||||
if (fieldName == null) {
|
||||
continue;
|
||||
}
|
||||
Object value = obj.getDataURIFieldValue(i - 2, tokens[i]);
|
||||
map.put(fieldName, value);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new PluginException("Error constructing dataURI mapping", e);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public Field[] getAllDataURIFields(Class<?> obj) {
|
||||
List<Field> fields = new ArrayList<Field>();
|
||||
|
|
|
@ -21,11 +21,16 @@ package com.raytheon.uf.edex.plugin.fssobs;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Scanner;
|
||||
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialQuery;
|
||||
import com.raytheon.uf.common.geospatial.SpatialQueryFactory;
|
||||
import com.raytheon.uf.common.monitor.config.FogMonitorConfigurationManager;
|
||||
|
@ -35,6 +40,7 @@ import com.raytheon.uf.common.pointdata.PointDataContainer;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.database.plugin.PluginFactory;
|
||||
import com.raytheon.uf.edex.pointdata.PointDataQuery;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +52,9 @@ import com.raytheon.uf.edex.pointdata.PointDataQuery;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 12, 2010 skorolev Initial creation
|
||||
* Nov 26, 2012 1297 skorolev Changed ArrayList to List.Clean code
|
||||
* Nov 12, 2010 skorolev Initial creation
|
||||
* Nov 26, 2012 1297 skorolev Changed ArrayList to List.Clean code
|
||||
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -191,8 +198,20 @@ public class FSSObsUtils {
|
|||
PointDataQuery request = null;
|
||||
PointDataContainer result = null;
|
||||
try {
|
||||
Class<PluginDataObject> clazz = PluginFactory.getInstance()
|
||||
.getPluginRecordClass(plgn.ldadmesonet.toString());
|
||||
Map<String, RequestConstraint> rcMap = RequestConstraint
|
||||
.toConstraintMapping(DataURIUtil.createDataURIMap(uri,
|
||||
clazz));
|
||||
// Not actually in db
|
||||
rcMap.remove("pluginName");
|
||||
request = new PointDataQuery(plgn.ldadmesonet.toString());
|
||||
request.addParameter(slct, uri, equ);
|
||||
for (Entry<String, RequestConstraint> entry : rcMap.entrySet()) {
|
||||
RequestConstraint rc = entry.getValue();
|
||||
String value = rc.getConstraintValue();
|
||||
String type = rc.getConstraintType().getOperand();
|
||||
request.addParameter(entry.getKey(), value, type);
|
||||
}
|
||||
request.setParameters(FSSObsDataTransform.MESOWEST_PARAMS_LIST);
|
||||
result = request.execute();
|
||||
if (result != null) {
|
||||
|
|
|
@ -25,5 +25,4 @@
|
|||
<parameter name="stationId" queryName="location.stationId" type="STRING" />
|
||||
<parameter name="reportType" queryName="reportType" type="STRING" />
|
||||
<parameter name="dataProvider" queryName="dataProvider" type="STRING" />
|
||||
<parameter name="dataURI" queryName="dataURI" type="STRING" />
|
||||
</pointDataDbDescription>
|
|
@ -33,7 +33,6 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.TimeZone;
|
||||
|
@ -51,7 +50,6 @@ import com.raytheon.edex.plugin.IBinaryDecoder;
|
|||
import com.raytheon.edex.plugin.ldad.common.DecodedData;
|
||||
import com.raytheon.edex.plugin.ldad.common.LdadField;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.ldadmesonet.MesonetLdadRecord;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
|
@ -66,9 +64,10 @@ import com.raytheon.uf.common.time.DataTime;
|
|||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* ate Ticket# Engineer Description
|
||||
* Date Ticket# Engineer Description
|
||||
* ----------- ---------- ----------- --------------------------
|
||||
* 9/4/09 vkorolev Initial creation
|
||||
* Sep 04, 2009 vkorolev Initial creation
|
||||
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
|
||||
* </pre>
|
||||
*
|
||||
* @author vkorolev
|
||||
|
@ -248,7 +247,6 @@ public class MesonetDecoder<E> extends AbstractDecoder implements
|
|||
DataTime dt = new DataTime(ot);
|
||||
record.setDataTime(dt);
|
||||
record.setLocation(location);
|
||||
record.constructDataURI();
|
||||
record.setRawMessage(record.toMessage());
|
||||
retVal.add(record);
|
||||
}
|
||||
|
@ -265,8 +263,6 @@ public class MesonetDecoder<E> extends AbstractDecoder implements
|
|||
logger.error(traceId + " - SecurityException:" + e);
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.error(traceId + " - IllegalArgumentException:" + e);
|
||||
} catch (PluginException e) {
|
||||
logger.error(traceId + " - PluginException:" + e);
|
||||
}
|
||||
}
|
||||
return retVal.toArray(new PluginDataObject[retVal.size()]);
|
||||
|
|
|
@ -23,7 +23,6 @@ package com.raytheon.uf.edex.pointdata;
|
|||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.pointdata.PointDataServerRequest;
|
||||
import com.raytheon.uf.common.pointdata.PointDataThriftContainer;
|
||||
|
@ -37,8 +36,9 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 16, 2011 #8070 ekladstrup Initial creation
|
||||
* Aug 09, 2011 #9696 gzhou add handle for request from nativeLib
|
||||
* Feb 16, 2011 8070 ekladstrup Initial creation
|
||||
* Aug 09, 2011 9696 gzhou add handle for request from nativeLib
|
||||
* May 15, 2013 1869 bsteffen Remove DataURI column from ldadmesonet.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -98,7 +98,7 @@ public class PointDataServerRequestHandler implements
|
|||
for (String key : map.keySet()) {
|
||||
RequestConstraint rc = map.get(key);
|
||||
String value = rc.getConstraintValue();
|
||||
String type = constraintTypeToString(rc.getConstraintType());
|
||||
String type = rc.getConstraintType().getOperand();
|
||||
query.addParameter(key, value, type);
|
||||
}
|
||||
|
||||
|
@ -124,42 +124,4 @@ public class PointDataServerRequestHandler implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* converts a ConstraintType enum into a string
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
private String constraintTypeToString(ConstraintType type) {
|
||||
String rval;
|
||||
|
||||
// EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, LESS_THAN,
|
||||
// LESS_THAN_EQUALS, BETWEEN, IN, LIKE, ILIKE, ISNULL
|
||||
if (type == ConstraintType.EQUALS) {
|
||||
rval = "=";
|
||||
} else if (type == ConstraintType.NOT_EQUALS) {
|
||||
rval = "!=";
|
||||
} else if (type == ConstraintType.GREATER_THAN) {
|
||||
rval = ">";
|
||||
} else if (type == ConstraintType.GREATER_THAN_EQUALS) {
|
||||
rval = ">=";
|
||||
} else if (type == ConstraintType.LESS_THAN) {
|
||||
rval = "<";
|
||||
} else if (type == ConstraintType.LESS_THAN_EQUALS) {
|
||||
rval = "<=";
|
||||
} else if (type == ConstraintType.BETWEEN) {
|
||||
rval = "between";
|
||||
} else if (type == ConstraintType.IN) {
|
||||
rval = "in";
|
||||
} else if (type == ConstraintType.LIKE) {
|
||||
rval = "like";
|
||||
} else if (type == ConstraintType.ILIKE) {
|
||||
rval = "ilike";
|
||||
} else {
|
||||
rval = "=";
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue