Merge "Omaha #3220 - Changes in the area configuration files for FSSObs monitors." into omaha_14.4.1
Former-commit-id:b7ebdc03a8
[formerlye74bfdc195
] [formerly364aff9278
] [formerlyb7ebdc03a8
[formerlye74bfdc195
] [formerly364aff9278
] [formerly174b036c56
[formerly364aff9278
[formerly e2f23221c3f8301460df2945deb8c760cdf216e9]]]] Former-commit-id:174b036c56
Former-commit-id:0da3b2aaa0
[formerlyd1171b2e18
] [formerly d1b9fbdb2c0bf0c8e5787313433654c4e2fd74c0 [formerlyad6bd4e7ff
]] Former-commit-id: a49ee09ae4e91c4e9ac250a93aece737d00614cc [formerlyeb077c4bcf
] Former-commit-id:3c7d92703e
This commit is contained in:
commit
7eda42086f
41 changed files with 1327 additions and 925 deletions
337
cave/com.raytheon.uf.viz.monitor.fog/localization/bundles/fog/fogImageTable.xml
Normal file → Executable file
337
cave/com.raytheon.uf.viz.monitor.fog/localization/bundles/fog/fogImageTable.xml
Normal file → Executable file
|
@ -20,61 +20,84 @@
|
|||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<displays xsi:type="d2DMapRenderableDisplay"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
<capability xsi:type="outlineCapability"
|
||||
lineStyle="SOLID" outlineOn="true"
|
||||
outlineWidth="1" />
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="true" isHoverOn="false"
|
||||
isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="spiResourceData" pixelSizeHint="45">
|
||||
<resourceData xsi:type="spiResourceData"
|
||||
pixelSizeHint="45">
|
||||
<filename>basemaps/MTR.spi</filename>
|
||||
<mapName>METAR Station Locations</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties>
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1" />
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b" />
|
||||
<capability xsi:type="labelableCapability" labelField="id" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<table>mapdata.marinezones</table>
|
||||
<mapName>Coastal Marine Zones</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
<capabilities>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="magnificationCapability" magnification="1.0"/>
|
||||
<capability xsi:type="densityCapability" density="1.0"/>
|
||||
<capability xsi:type="pointCapability" pointStyle="CROSS"/>
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties renderingOrderId="PLOT" isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="spiResourceData">
|
||||
<filename>basemaps/BUOY.spi</filename>
|
||||
<mapName>Fixed Buoy Locations</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties>
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability"
|
||||
lineStyle="SOLID" outlineOn="true"
|
||||
outlineWidth="1" />
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
<capability xsi:type="labelableCapability"
|
||||
labelField="id" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="true" isHoverOn="false"
|
||||
isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<table>mapdata.marinezones</table>
|
||||
<mapName>Coastal Marine Zones</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
<capabilities>
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
<capability xsi:type="outlineCapability"
|
||||
lineStyle="SOLID" outlineOn="true"
|
||||
outlineWidth="1" />
|
||||
<capability xsi:type="magnificationCapability"
|
||||
magnification="1.0" />
|
||||
<capability xsi:type="densityCapability"
|
||||
density="1.0" />
|
||||
<capability xsi:type="pointCapability"
|
||||
pointStyle="CROSS" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties renderingOrderId="PLOT"
|
||||
isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="spiResourceData">
|
||||
<filename>basemaps/BUOY.spi</filename>
|
||||
<mapName>Fixed Buoy Locations</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- *****************METARS*********************** -->
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
|
@ -82,26 +105,32 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotSource="METARS in FOG Monitor Area "
|
||||
plotModelFile="fssMetar.svg" spiFile="basemaps/MTR.spi" retrieveData="false" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotSource="METARS in FOG Monitor Area "
|
||||
plotModelFile="fssMetar.svg" spiFile="basemaps/MTR.spi"
|
||||
retrieveData="false" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="METAR, SPECI" constraintType="IN"/>
|
||||
<constraint constraintValue="METAR, SPECI"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="fog" constraintType="EQUALS"/>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0" posOffset="1800" negOffset="1800"/>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- ******************Fixed Buoys********************** -->
|
||||
|
@ -111,78 +140,95 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotSource="Fixed Buoys in FOG Monitor Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotSource="Fixed Buoys in FOG Monitor Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1004,1005" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="fog" constraintType="EQUALS"/>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1004,1005"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0" posOffset="1800" negOffset="1800"/>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- ***************Moving Buoys/Ships**************** -->
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData" plotSource="Moving Buoys/Ships in FOG Monitor Area"
|
||||
plotModelFile="fssMaritime.svg" isUpdatingOnMetadataOnly="false" retrieveData="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<binOffset posOffset="1800" negOffset="1800" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1006,1003" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="fog" constraintType="EQUALS"/>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotSource="Moving Buoys/Ships in FOG Monitor Area"
|
||||
plotModelFile="fssMaritime.svg"
|
||||
isUpdatingOnMetadataOnly="false" retrieveData="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<binOffset posOffset="1800" negOffset="1800"
|
||||
virtualOffset="0" />
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1006,1003"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- **************************Ldadmesonet************************************ -->
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities/>
|
||||
<capabilities />
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotSource="LDAD MESONET in Fog Monitor Area"
|
||||
plotModelFile="fssMetar.svg" retrieveData="false" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotSource="LDAD MESONET in Fog Monitor Area"
|
||||
plotModelFile="fssMetar.svg" retrieveData="false"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="mesonet" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="fog" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="mesonet"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
|
@ -191,30 +237,38 @@
|
|||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#ffff00"/>
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#ffff00" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotSource="MAROBs in FOG Monitor Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotSource="MAROBs in FOG Monitor Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1007" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="1007"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="fog" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0" posOffset="1800" negOffset="1800"/>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- *********************** FOG ***************** -->
|
||||
|
@ -222,29 +276,40 @@
|
|||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="colorMapCapability">
|
||||
<colorMapParameters colorMapName="fog/fog"/>
|
||||
<colorMapParameters
|
||||
colorMapName="fog/fog" />
|
||||
</capability>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#ff00ff"/>
|
||||
<capability xsi:type="imagingCapability" alpha="0.5" interpolationState="false" brightness="1.0" contrast="1.0"/>
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#ff00ff" />
|
||||
<capability xsi:type="imagingCapability"
|
||||
alpha="0.5" interpolationState="false"
|
||||
brightness="1.0" contrast="1.0" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
<perspectiveProperty xsi:type="d2dLoadProperties" overlayMatchDelta="0" overlayMatchTolerance="1.0"/>
|
||||
<perspectiveProperty
|
||||
xsi:type="d2dLoadProperties"
|
||||
overlayMatchDelta="0" overlayMatchTolerance="1.0" />
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="fogResourceData" plotSource="Fog Threat Level" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<resourceData xsi:type="fogResourceData"
|
||||
plotSource="Fog Threat Level"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fog" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fog"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<timeMatcher xsi:type="d2DTimeMatcher" deltaFilter="0" forecastFilter="0"/>
|
||||
<timeMatcher xsi:type="d2DTimeMatcher"
|
||||
deltaFilter="0" forecastFilter="0" />
|
||||
<numberOfFrames>12</numberOfFrames>
|
||||
</descriptor>
|
||||
</displays>
|
||||
|
|
26
cave/com.raytheon.uf.viz.monitor.fog/localization/menus/fog/baseFog.xml
Normal file → Executable file
26
cave/com.raytheon.uf.viz.monitor.fog/localization/menus/fog/baseFog.xml
Normal file → Executable file
|
@ -20,18 +20,22 @@
|
|||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/fog/fogImageTable.xml"
|
||||
menuText="Fog Monitor Table/Display" id="FOGMONITOR" commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogMonitor">
|
||||
<substitute key="cwa" value="${cwa}" />
|
||||
<substitute key="colormap" value="fog/fog" />
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="FogMonitorControls" />
|
||||
<contribute xsi:type="command" id="ConfigureMonitorArea" commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogAreaConfig"
|
||||
menuText="Configure Fog Monitor Area">
|
||||
menuText="Fog Monitor Table/Display" id="FOGMONITOR"
|
||||
commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogMonitor">
|
||||
<substitute key="colormap" value="fog/fog" />
|
||||
<substitute key="stations" value="${stations}" />
|
||||
</contribute>
|
||||
<contribute xsi:type="command" id="ConfigureMonitorAlgoThresh" commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogAlgoConfig"
|
||||
menuText="Configure Algorithim Thresholds">
|
||||
<contribute xsi:type="separator" id="FogMonitorControls" />
|
||||
<contribute xsi:type="command" id="ConfigureMonitorArea"
|
||||
commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogAreaConfig"
|
||||
menuText="Configure Fog Monitor Area">
|
||||
</contribute>
|
||||
<contribute xsi:type="command" id="FogAlertVisThresholds" commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogThresholdAlertVisConfig"
|
||||
menuText="Configure Visibility Thresholds for AlertViz Monitoring">
|
||||
<contribute xsi:type="command" id="ConfigureMonitorAlgoThresh"
|
||||
commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogAlgoConfig"
|
||||
menuText="Configure Algorithim Thresholds">
|
||||
</contribute>
|
||||
<contribute xsi:type="command" id="FogAlertVisThresholds"
|
||||
commandId="com.raytheon.uf.viz.monitor.fog.ui.actions.fogThresholdAlertVisConfig"
|
||||
menuText="Configure Visibility Thresholds for AlertViz Monitoring">
|
||||
</contribute>
|
||||
</menuTemplate>
|
||||
|
|
51
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/FogMonitor.java
Normal file → Executable file
51
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/FogMonitor.java
Normal file → Executable file
|
@ -87,8 +87,10 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Oct.31 2012 1297 skorolev Clean code
|
||||
* Feb 15, 2013 1638 mschenke Changed code to reference DataURI.SEPARATOR instead of URIFilter
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
* Sep 23, 2014 3356 njensen Remove unnecessary import
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -112,7 +114,7 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
private ObMultiHrsReports obData;
|
||||
|
||||
/** data holder for FOG **/
|
||||
private ObsData obsData = null;
|
||||
private ObsData obsData;
|
||||
|
||||
/** data holder for FOG ALG data **/
|
||||
private SortedMap<Date, Map<String, FOG_THREAT>> algorithmData = null;
|
||||
|
@ -126,10 +128,10 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
private FogZoneTableDlg zoneDialog;
|
||||
|
||||
/** zone table dialog **/
|
||||
private MonitoringAreaConfigDlg areaDialog;
|
||||
private MonitoringAreaConfigDlg areaDialog = null;
|
||||
|
||||
/** area config manager **/
|
||||
private FSSObsMonitorConfigurationManager fogConfig;
|
||||
private FSSObsMonitorConfigurationManager fogConfig = null;
|
||||
|
||||
/** table data for the station table **/
|
||||
private final TableData stationTableData = new TableData(
|
||||
|
@ -150,19 +152,21 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
/** Data URI pattern for fog **/
|
||||
private final Pattern fogPattern = Pattern.compile(DataURI.SEPARATOR + OBS
|
||||
+ DataURI.SEPARATOR + wildCard + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + cwa + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + wildCard + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + "fog");
|
||||
+ DataURI.SEPARATOR + wildCard);
|
||||
|
||||
/**
|
||||
* Private constructor, singleton
|
||||
*/
|
||||
private FogMonitor() {
|
||||
pluginPatterns.add(fogPattern);
|
||||
fogConfig = new FSSObsMonitorConfigurationManager(currentSite,
|
||||
MonName.fog.name());
|
||||
readTableConfig(MonitorThresholdConfiguration.FOG_THRESHOLD_CONFIG);
|
||||
fogConfig = new FSSObsMonitorConfigurationManager(MonName.fog.name());
|
||||
updateMonitoringArea();
|
||||
initObserver(OBS, this);
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.FOG);
|
||||
obData.setThresholdMgr(FogThresholdMgr.getInstance());
|
||||
obData.getZoneTableData();
|
||||
readTableConfig(MonitorThresholdConfiguration.FOG_THRESHOLD_CONFIG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -183,17 +187,15 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
return monitor;
|
||||
}
|
||||
|
||||
// TODO: Provide the changes in EDEX URIFilters when area configuration file
|
||||
// has been changed.
|
||||
/**
|
||||
* Re-initialization of monitor.
|
||||
*
|
||||
* DR#11279: When monitor area configuration is changed, this module is
|
||||
* called to re-initialize monitor using new monitor area configuration
|
||||
*/
|
||||
public static void reInitialize() {
|
||||
public void reInitialize() {
|
||||
if (monitor != null) {
|
||||
monitor = null;
|
||||
monitor.nullifyMonitor();
|
||||
monitor = new FogMonitor();
|
||||
}
|
||||
}
|
||||
|
@ -312,7 +314,12 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
*/
|
||||
@Override
|
||||
public void configUpdate(IMonitorConfigurationEvent me) {
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
fogConfig = (FSSObsMonitorConfigurationManager) me.getSource();
|
||||
updateMonitoringArea();
|
||||
if (zoneDialog != null && !zoneDialog.isDisposed()) {
|
||||
zoneDialog.refreshZoneTableData(obData);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -320,6 +327,7 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
*/
|
||||
@Override
|
||||
public void nullifyMonitor() {
|
||||
monitor.removeMonitorListener(zoneDialog);
|
||||
ProductAlertObserver.removeObserver(OBS, this);
|
||||
monitor = null;
|
||||
}
|
||||
|
@ -626,4 +634,21 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
|
|||
return zoneDialog;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads Table Configuration.
|
||||
*
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
*/
|
||||
private void updateMonitoringArea() {
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
for (String zone : fogConfig.getAreaList()) {
|
||||
List<String> stations = fogConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
7
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/threshold/FogThresholdMgr.java
Normal file → Executable file
7
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/threshold/FogThresholdMgr.java
Normal file → Executable file
|
@ -41,6 +41,7 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.FogMonitor;
|
|||
* Dec 15, 2009 #3963 lvenable Initial creation
|
||||
* Feb 03, 2014 #2757 skorolev Fixed reInitialize()
|
||||
* May 20, 2014 3086 skorolev Cleaned code.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site".
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -60,13 +61,13 @@ public class FogThresholdMgr extends AbstractThresholdMgr {
|
|||
super("DefaultFogDisplayThresholds.xml",
|
||||
"DefaultFogMonitorThresholds.xml", AppName.FOG.name()
|
||||
.toLowerCase());
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an instance of the manager class.
|
||||
* Gets an instance of the manager class.
|
||||
*
|
||||
* @return Class instance.
|
||||
*/
|
||||
|
@ -127,7 +128,7 @@ public class FogThresholdMgr extends AbstractThresholdMgr {
|
|||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (areaConfigMgr == null) {
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
}
|
||||
return areaConfigMgr;
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Jul 14 2010 6567 zhao Launch AreaConfigDlg w/o monitor
|
||||
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog.
|
||||
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,18 +64,16 @@ public class FogAreaConfigAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
if (areaDialog == null) {
|
||||
if (areaDialog == null || areaDialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
areaDialog = new FogMonitoringAreaConfigDlg(shell,
|
||||
"Fog Monitor Area Configuration");
|
||||
areaDialog.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
areaDialog = null;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
areaDialog.open();
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonDispThreshDlg;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 19 2009 3963 dhladky Initial creation.
|
||||
* Dec 6 2012 #1351 skorolev Changes for non-blocking dialogs.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -52,7 +53,7 @@ public class FogThresholdAlertVisConfigAction extends AbstractHandler {
|
|||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
if (fogMonitorDlg == null) {
|
||||
if (fogMonitorDlg == null || fogMonitorDlg.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
fogMonitorDlg = new FogMonDispThreshDlg(shell,
|
||||
|
|
68
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogMonitoringAreaConfigDlg.java
Normal file → Executable file
68
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogMonitoringAreaConfigDlg.java
Normal file → Executable file
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.uf.viz.monitor.fog.ui.dialogs;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
|
@ -27,9 +28,11 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.M
|
|||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
|
||||
import com.raytheon.uf.viz.monitor.fog.FogMonitor;
|
||||
import com.raytheon.uf.viz.monitor.fog.threshold.FogThresholdMgr;
|
||||
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* Fog Monitor area configuration dialog.
|
||||
|
@ -44,7 +47,8 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
|||
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
||||
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigManager.
|
||||
* Sep 15, 2014 2757 skorolev Removed extra dialog.
|
||||
* Sep 04, 2014 3220 skorolev Added fireConfigUpdateEvent method. Updated handler.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,8 +58,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
|||
|
||||
public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||
|
||||
/** Configuration manager for Fog monitor. */
|
||||
private static FSSObsMonitorConfigurationManager fogConfigMgr;
|
||||
private FogMonDispThreshDlg fogMonitorDlg;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -65,6 +68,7 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
public FogMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||
super(parent, title, AppName.FOG);
|
||||
FogMonitor.getInstance();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -84,27 +88,56 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
// Save the configuration xml file
|
||||
getValues();
|
||||
resetStatus();
|
||||
fogConfigMgr.saveConfigXml();
|
||||
configMgr.saveConfigXml();
|
||||
/**
|
||||
* DR#11279: re-initialize threshold manager and the monitor
|
||||
* using new monitor area configuration
|
||||
*/
|
||||
FogThresholdMgr.reInitialize();
|
||||
FogMonitor.reInitialize();
|
||||
fireConfigUpdateEvent();
|
||||
|
||||
if ((!fogConfigMgr.getAddedZones().isEmpty())
|
||||
|| (!fogConfigMgr.getAddedStations().isEmpty())) {
|
||||
if ((!configMgr.getAddedZones().isEmpty())
|
||||
|| (!configMgr.getAddedStations().isEmpty())) {
|
||||
if (editDialog() == SWT.YES) {
|
||||
FogMonDispThreshDlg fogMonitorDlg = new FogMonDispThreshDlg(
|
||||
shell, CommonConfig.AppName.FOG,
|
||||
DataUsageKey.MONITOR);
|
||||
fogMonitorDlg = new FogMonDispThreshDlg(shell,
|
||||
CommonConfig.AppName.FOG, DataUsageKey.MONITOR);
|
||||
fogMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
// Clean added zones and stations. Close dialog.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
});
|
||||
fogMonitorDlg.open();
|
||||
}
|
||||
fogConfigMgr.getAddedZones().clear();
|
||||
fogConfigMgr.getAddedStations().clear();
|
||||
// Clean added zones and stations.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fogMonitorDlg == null || fogMonitorDlg.isDisposed()) {
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire Table reload event.
|
||||
*/
|
||||
private void fireConfigUpdateEvent() {
|
||||
final IMonitorConfigurationEvent me = new IMonitorConfigurationEvent(
|
||||
configMgr);
|
||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
FogMonitor.getInstance().configUpdate(me);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -115,11 +148,11 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
* ()
|
||||
*/
|
||||
protected FSSObsMonitorConfigurationManager getInstance() {
|
||||
if (fogConfigMgr == null) {
|
||||
fogConfigMgr = new FSSObsMonitorConfigurationManager(currentSite,
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
}
|
||||
return (FSSObsMonitorConfigurationManager) fogConfigMgr;
|
||||
return (FSSObsMonitorConfigurationManager) configMgr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -130,6 +163,7 @@ public class FogMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
@Override
|
||||
protected void disposed() {
|
||||
fogConfigMgr = null;
|
||||
configMgr = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
13
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java
Normal file → Executable file
13
cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/dialogs/FogZoneTableDlg.java
Normal file → Executable file
|
@ -59,6 +59,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg;
|
|||
* Dec 03, 2012 15216/15639 zhao fixed a bug related to Link-to-Frame
|
||||
* Dec 7, 2012 1351 skorolev Changes for non-blocking dialogs.
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigMgr method.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site". Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -114,7 +115,7 @@ public class FogZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
@Override
|
||||
protected void configThreshAction() {
|
||||
if (fogThreshDlg == null) {
|
||||
if (fogThreshDlg == null || fogThreshDlg.isDisposed()) {
|
||||
fogThreshDlg = new FogMonDispThreshDlg(getParent().getShell(),
|
||||
CommonConfig.AppName.FOG, DataUsageKey.DISPLAY);
|
||||
}
|
||||
|
@ -294,10 +295,16 @@ public class FogZoneTableDlg extends ZoneTableDlg {
|
|||
// Not used
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg#
|
||||
* getMonitorAreaConfigInstance()
|
||||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
if (configMgr == null || configMgr.isPopulated()) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.fog.name());
|
||||
}
|
||||
return configMgr;
|
||||
|
|
346
cave/com.raytheon.uf.viz.monitor.safeseas/localization/bundles/safeseas/safeseasImageTable.xml
Normal file → Executable file
346
cave/com.raytheon.uf.viz.monitor.safeseas/localization/bundles/safeseas/safeseasImageTable.xml
Normal file → Executable file
|
@ -20,61 +20,84 @@
|
|||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<displays xsi:type="d2DMapRenderableDisplay"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
<capability xsi:type="outlineCapability"
|
||||
lineStyle="SOLID" outlineOn="true"
|
||||
outlineWidth="1" />
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="true" isHoverOn="false"
|
||||
isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="spiResourceData" pixelSizeHint="45">
|
||||
<resourceData xsi:type="spiResourceData"
|
||||
pixelSizeHint="45">
|
||||
<filename>basemaps/MTR.spi</filename>
|
||||
<mapName>METAR Station Locations</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties>
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1" />
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b" />
|
||||
<capability xsi:type="labelableCapability" labelField="id" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<table>mapdata.marinezones</table>
|
||||
<mapName>Coastal Marine Zones</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
<capabilities>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="magnificationCapability" magnification="1.0"/>
|
||||
<capability xsi:type="densityCapability" density="1.0"/>
|
||||
<capability xsi:type="pointCapability" pointStyle="CROSS"/>
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties renderingOrderId="PLOT" isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="spiResourceData">
|
||||
<filename>basemaps/BUOY.spi</filename>
|
||||
<mapName>Fixed Buoy Locations</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties>
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability"
|
||||
lineStyle="SOLID" outlineOn="true"
|
||||
outlineWidth="1" />
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
<capability xsi:type="labelableCapability"
|
||||
labelField="id" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="true" isHoverOn="false"
|
||||
isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<table>mapdata.marinezones</table>
|
||||
<mapName>Coastal Marine Zones</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
<capabilities>
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
<capability xsi:type="outlineCapability"
|
||||
lineStyle="SOLID" outlineOn="true"
|
||||
outlineWidth="1" />
|
||||
<capability xsi:type="magnificationCapability"
|
||||
magnification="1.0" />
|
||||
<capability xsi:type="densityCapability"
|
||||
density="1.0" />
|
||||
<capability xsi:type="pointCapability"
|
||||
pointStyle="CROSS" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties renderingOrderId="PLOT"
|
||||
isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="spiResourceData">
|
||||
<filename>basemaps/BUOY.spi</filename>
|
||||
<mapName>Fixed Buoy Locations</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- ********************METARS******************** -->
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
|
@ -82,27 +105,34 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotMissingData="false" plotSource="METARS in SAFESEAS Mon.Area "
|
||||
plotModelFile="fssMetar.svg" spiFile="basemaps/MTR.spi"
|
||||
retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotMissingData="false" plotSource="METARS in SAFESEAS Mon.Area "
|
||||
plotModelFile="fssMetar.svg" spiFile="basemaps/MTR.spi"
|
||||
retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="METAR, SPECI" constraintType="IN"/>
|
||||
<constraint constraintValue="METAR, SPECI"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="ss" constraintType="EQUALS"/>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0" posOffset="1800" negOffset="1800"/>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- *********************Fixed Buoys******************* -->
|
||||
|
@ -112,79 +142,105 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotMissingData="false" plotSource="Fixed Buoys in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotMissingData="false"
|
||||
plotSource="Fixed Buoys in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false"
|
||||
isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1004,1005" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="ss" constraintType="EQUALS"/>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1004,1005"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0" posOffset="1800" negOffset="1800"/>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- *****************Moving Buoys/Ships************** -->
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData" plotMissingData="false" plotSource="Moving Buoys/Ships in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMaritime.svg" isUpdatingOnMetadataOnly="true" retrieveData="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<binOffset posOffset="1800" negOffset="1800" virtualOffset="0"/>
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1006,1003" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="ss" constraintType="EQUALS"/>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotMissingData="false"
|
||||
plotSource="Moving Buoys/Ships in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMaritime.svg"
|
||||
isUpdatingOnMetadataOnly="true" retrieveData="false"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<binOffset posOffset="1800" negOffset="1800"
|
||||
virtualOffset="0" />
|
||||
<metadataMap>
|
||||
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1006,1003"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- **************************Mesowest************************************ -->
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities/>
|
||||
<capabilities />
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotMissingData="false" plotSource="LDAD MESONET in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMetar.svg" retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotMissingData="false"
|
||||
plotSource="LDAD MESONET in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMetar.svg" retrieveData="false"
|
||||
isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="mesonet" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="ss" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="mesonet"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
|
@ -192,30 +248,39 @@
|
|||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#ffff00"/>
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#ffff00" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotMissingData="false" plotSource="MAROBs in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotMissingData="false" plotSource="MAROBs in SAFESEAS Mon.Area"
|
||||
plotModelFile="fssMaritime.svg" retrieveData="false"
|
||||
isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="1007" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="1007"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="ss" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0" posOffset="1800" negOffset="1800"/>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- **************************************** -->
|
||||
|
@ -225,21 +290,24 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="safeSeasResourceData" plotSource="Safe Seas Table Display"
|
||||
retrieveData="true" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fog" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="safeSeasResourceData"
|
||||
plotSource="Safe Seas Table Display"
|
||||
retrieveData="true" isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fog"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<timeMatcher xsi:type="d2DTimeMatcher" deltaFilter="0" forecastFilter="0"/>
|
||||
<timeMatcher xsi:type="d2DTimeMatcher"
|
||||
deltaFilter="0" forecastFilter="0" />
|
||||
<numberOfFrames>12</numberOfFrames>
|
||||
</descriptor>
|
||||
</displays>
|
||||
|
|
20
cave/com.raytheon.uf.viz.monitor.safeseas/localization/menus/safeseas/baseSafeSeas.xml
Normal file → Executable file
20
cave/com.raytheon.uf.viz.monitor.safeseas/localization/menus/safeseas/baseSafeSeas.xml
Normal file → Executable file
|
@ -19,16 +19,20 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/safeseas/safeseasImageTable.xml" id="SAFESEASMONITOR" commandId="com.raytheon.uf.viz.monitor.safeseas.ui.actions.safeseas"
|
||||
menuText="SAFESEAS Table/Display">
|
||||
<substitute key="cwa" value="${cwa}" />
|
||||
<contribute xsi:type="bundleItem"
|
||||
file="bundles/safeseas/safeseasImageTable.xml" id="SAFESEASMONITOR"
|
||||
commandId="com.raytheon.uf.viz.monitor.safeseas.ui.actions.safeseas"
|
||||
menuText="SAFESEAS Table/Display">
|
||||
<substitute key="stations" value="${stations}" />
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="SAFESeasMonitorControls" />
|
||||
<contribute xsi:type="command" id="ConfigureMonitorArea" commandId="com.raytheon.uf.viz.monitor.safeseas.ui.actions.safeseasAreaConfig"
|
||||
menuText="Configure SAFESEAS Monitor Area">
|
||||
<contribute xsi:type="command" id="ConfigureMonitorArea"
|
||||
commandId="com.raytheon.uf.viz.monitor.safeseas.ui.actions.safeseasAreaConfig"
|
||||
menuText="Configure SAFESEAS Monitor Area">
|
||||
</contribute>
|
||||
<contribute xsi:type="command" id="SafeSeasAlertVisThresholds" commandId="com.raytheon.uf.viz.monitor.safeseas.ui.actions.safeseasThresholdAlertVisConfig"
|
||||
menuText="Configure SAFESEAS Thresholds for AlertViz Monitoring">
|
||||
<contribute xsi:type="command" id="SafeSeasAlertVisThresholds"
|
||||
commandId="com.raytheon.uf.viz.monitor.safeseas.ui.actions.safeseasThresholdAlertVisConfig"
|
||||
menuText="Configure SAFESEAS Thresholds for AlertViz Monitoring">
|
||||
</contribute>
|
||||
|
||||
|
||||
</menuTemplate>
|
52
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/SafeSeasMonitor.java
Normal file → Executable file
52
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/SafeSeasMonitor.java
Normal file → Executable file
|
@ -86,6 +86,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Oct 30, 2012 1297 skorolev Changed HashMap to Map
|
||||
* Feb 15, 2013 1638 mschenke Changed code to reference DataURI.SEPARATOR instead of URIFilter
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -109,7 +110,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
private SSMonitoringAreaConfigDlg areaDialog = null;
|
||||
|
||||
/** configuration manager **/
|
||||
private FSSObsMonitorConfigurationManager safeseasConfig;
|
||||
private FSSObsMonitorConfigurationManager ssAreaConfig = null;
|
||||
|
||||
/**
|
||||
* This object contains all observation data necessary for the table dialogs
|
||||
|
@ -152,19 +153,22 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
/** Pattern for SAFESEAS **/
|
||||
private final Pattern ssPattern = Pattern.compile(DataURI.SEPARATOR + OBS
|
||||
+ DataURI.SEPARATOR + wildCard + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + cwa + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + wildCard + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + "ss");
|
||||
+ DataURI.SEPARATOR + wildCard);
|
||||
|
||||
/**
|
||||
* Private constructor, singleton
|
||||
*/
|
||||
private SafeSeasMonitor() {
|
||||
pluginPatterns.add(ssPattern);
|
||||
safeseasConfig = new FSSObsMonitorConfigurationManager(currentSite,
|
||||
MonName.ss.name());
|
||||
readTableConfig(MonitorThresholdConfiguration.SAFESEAS_THRESHOLD_CONFIG);
|
||||
ssAreaConfig = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
updateMonitoringArea();
|
||||
initObserver(OBS, this);
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.SAFESEAS);
|
||||
obData.setThresholdMgr(SSThresholdMgr.getInstance());
|
||||
obData.getZoneTableData();
|
||||
readTableConfig(MonitorThresholdConfiguration.SAFESEAS_THRESHOLD_CONFIG);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -182,17 +186,15 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
return monitor;
|
||||
}
|
||||
|
||||
// TODO: Provide the changes in EDEX URIFilters when area configuration file
|
||||
// has been changed.
|
||||
/**
|
||||
* Re-initialization of monitor.
|
||||
*
|
||||
* DR#11279: When monitor area configuration is changed, this module is
|
||||
* called to re-initialize monitor using new monitor area configuration
|
||||
*/
|
||||
public static void reInitialize() {
|
||||
public void reInitialize() {
|
||||
if (monitor != null) {
|
||||
monitor = null;
|
||||
monitor.nullifyMonitor();
|
||||
monitor = new SafeSeasMonitor();
|
||||
}
|
||||
}
|
||||
|
@ -308,8 +310,8 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
try {
|
||||
for (String zone : safeseasConfig.getAreaList()) {
|
||||
List<String> stations = safeseasConfig.getAreaStations(zone);
|
||||
for (String zone : ssAreaConfig.getAreaList()) {
|
||||
List<String> stations = ssAreaConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -352,7 +354,12 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
*/
|
||||
@Override
|
||||
public void configUpdate(IMonitorConfigurationEvent me) {
|
||||
// Not used
|
||||
ssAreaConfig = (FSSObsMonitorConfigurationManager) me.getSource();
|
||||
updateMonitoringArea();
|
||||
if (zoneDialog != null && !zoneDialog.isDisposed()) {
|
||||
zoneDialog.refreshZoneTableData(obData);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -494,7 +501,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
*/
|
||||
public Map<String, Geometry> getMonitoringAreaGeometries() {
|
||||
if (zoneGeometries == null) {
|
||||
List<String> zones = safeseasConfig.getAreaList();
|
||||
List<String> zones = ssAreaConfig.getAreaList();
|
||||
zoneGeometries = new HashMap<String, Geometry>();
|
||||
for (String zone : zones) {
|
||||
try {
|
||||
|
@ -662,4 +669,21 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
|
|||
return zoneDialog;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads Table Configuration.
|
||||
*
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
*/
|
||||
public void updateMonitoringArea() {
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
for (String zone : ssAreaConfig.getAreaList()) {
|
||||
List<String> stations = ssAreaConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
8
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/threshold/SSThresholdMgr.java
Normal file → Executable file
8
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/threshold/SSThresholdMgr.java
Normal file → Executable file
|
@ -40,7 +40,8 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.SafeSeasMonitor;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 27, 2009 #3963 lvenable Initial creation
|
||||
* Feb 03, 2014 #2757 skorolev Fixed reInitialize().
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site".
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,8 +59,7 @@ public class SSThresholdMgr extends AbstractThresholdMgr {
|
|||
super("DefaultSSDisplayThresholds.xml",
|
||||
"DefaultSSMonitorThresholds.xml", AppName.SAFESEAS.name()
|
||||
.toLowerCase());
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
MonName.ss.name());
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public class SSThresholdMgr extends AbstractThresholdMgr {
|
|||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (areaConfigMgr == null) {
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.ss.name());
|
||||
}
|
||||
return areaConfigMgr;
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* March 5, 2012 14413 zhao Launch AreaConfigDlg w/o monitor
|
||||
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog.
|
||||
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,18 +64,16 @@ public class SafeseasAreaConfigAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
if (configDlg == null) {
|
||||
if (configDlg == null || configDlg.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
configDlg = new SSMonitoringAreaConfigDlg(shell,
|
||||
"SAFESEAS Monitor Area Configuration");
|
||||
configDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
configDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
configDlg.open();
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSDispMonThreshDlg;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 19 2009 3963 dhladky Initial creation.
|
||||
* Dec 6 2012 #1351 skorolev Changes for non-blocking dialogs.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -52,7 +53,7 @@ public class SafeseasThresholdAlertVisConfigAction extends AbstractHandler {
|
|||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
if (ssMonitorDlg == null) {
|
||||
if (ssMonitorDlg == null || ssMonitorDlg.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
ssMonitorDlg = new SSDispMonThreshDlg(shell,
|
||||
|
|
72
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSMonitoringAreaConfigDlg.java
Normal file → Executable file
72
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSMonitoringAreaConfigDlg.java
Normal file → Executable file
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.uf.viz.monitor.safeseas.ui.dialogs;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
|
@ -27,9 +28,11 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.M
|
|||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
|
||||
import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
|
||||
import com.raytheon.uf.viz.monitor.safeseas.threshold.SSThresholdMgr;
|
||||
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* SAFESEAS area configuration dialog.
|
||||
|
@ -44,7 +47,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
|||
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
||||
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigManager.
|
||||
* Sep 15, 2014 2757 skorolev Removed extra dialog.
|
||||
* Sep 04, 2014 3220 skorolev Added fireConfigUpdateEvent method. Updated handler.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,8 +57,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
|||
|
||||
public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||
|
||||
/** Configuration manager for SAFESEAS monitor. */
|
||||
private FSSObsMonitorConfigurationManager ssConfigMgr;
|
||||
private SSDispMonThreshDlg ssMonitorDlg;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -65,6 +67,7 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
public SSMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||
super(parent, title, AppName.SAFESEAS);
|
||||
SafeSeasMonitor.getInstance();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -84,26 +87,53 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
// Save the config xml file
|
||||
getValues();
|
||||
resetStatus();
|
||||
ssConfigMgr.saveConfigXml();
|
||||
/**
|
||||
* DR#11279: re-initialize threshold manager and the monitor
|
||||
* using new monitor area configuration
|
||||
*/
|
||||
configMgr.saveConfigXml();
|
||||
SSThresholdMgr.reInitialize();
|
||||
SafeSeasMonitor.reInitialize();
|
||||
if ((!ssConfigMgr.getAddedZones().isEmpty())
|
||||
|| (!ssConfigMgr.getAddedStations().isEmpty())) {
|
||||
fireConfigUpdateEvent();
|
||||
|
||||
if ((!configMgr.getAddedZones().isEmpty())
|
||||
|| (!configMgr.getAddedStations().isEmpty())) {
|
||||
if (editDialog() == SWT.YES) {
|
||||
SSDispMonThreshDlg ssMonitorDlg = new SSDispMonThreshDlg(
|
||||
shell, CommonConfig.AppName.SAFESEAS,
|
||||
ssMonitorDlg = new SSDispMonThreshDlg(shell,
|
||||
CommonConfig.AppName.SAFESEAS,
|
||||
DataUsageKey.MONITOR);
|
||||
ssMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
// Clean added zones and stations. Close dialog.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
});
|
||||
ssMonitorDlg.open();
|
||||
}
|
||||
ssConfigMgr.getAddedZones().clear();
|
||||
ssConfigMgr.getAddedStations().clear();
|
||||
// Clean added zones and stations.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ssMonitorDlg == null || ssMonitorDlg.isDisposed()) {
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire Table reload event
|
||||
*/
|
||||
private void fireConfigUpdateEvent() {
|
||||
final IMonitorConfigurationEvent me = new IMonitorConfigurationEvent(
|
||||
configMgr);
|
||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SafeSeasMonitor.getInstance().configUpdate(me);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -114,11 +144,10 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
* ()
|
||||
*/
|
||||
public FSSObsMonitorConfigurationManager getInstance() {
|
||||
if (ssConfigMgr == null) {
|
||||
ssConfigMgr = new FSSObsMonitorConfigurationManager(currentSite,
|
||||
MonName.ss.name());
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
}
|
||||
return (FSSObsMonitorConfigurationManager) ssConfigMgr;
|
||||
return (FSSObsMonitorConfigurationManager) configMgr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -129,6 +158,7 @@ public class SSMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
@Override
|
||||
protected void disposed() {
|
||||
ssConfigMgr = null;
|
||||
configMgr = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
8
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSZoneTableDlg.java
Normal file → Executable file
8
cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/ui/dialogs/SSZoneTableDlg.java
Normal file → Executable file
|
@ -57,6 +57,7 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
|
|||
* Nov 10, 2012 1297 skorolev Added initiateProdArray
|
||||
* Dec 7, 2012 #1351 skorolev Changes for non-blocking dialogs.
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigMgr method.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site". Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -127,7 +128,7 @@ public class SSZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
@Override
|
||||
protected void configThreshAction() {
|
||||
if (ssThreshDlg == null) {
|
||||
if (ssThreshDlg == null || ssThreshDlg.isDisposed()) {
|
||||
ssThreshDlg = new SSDispMonThreshDlg(getParent().getShell(),
|
||||
CommonConfig.AppName.SAFESEAS, DataUsageKey.DISPLAY);
|
||||
}
|
||||
|
@ -327,9 +328,8 @@ public class SSZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
MonName.ss.name());
|
||||
if (configMgr == null || configMgr.isPopulated()) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(MonName.ss.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
|
|
94
cave/com.raytheon.uf.viz.monitor.snow/localization/bundles/snow/snowImageTable.xml
Normal file → Executable file
94
cave/com.raytheon.uf.viz.monitor.snow/localization/bundles/snow/snowImageTable.xml
Normal file → Executable file
|
@ -20,20 +20,29 @@
|
|||
-->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor" currentAnimationMode="Temporal">
|
||||
<displays xsi:type="d2DMapRenderableDisplay"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor"
|
||||
currentAnimationMode="Temporal">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
<capability xsi:type="outlineCapability"
|
||||
lineStyle="SOLID" outlineOn="true"
|
||||
outlineWidth="1" />
|
||||
<capability xsi:type="colorableCapability"
|
||||
colorAsString="#9b9b9b" />
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="true" isHoverOn="false"
|
||||
isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000"
|
||||
minDisplayWidth="0" />
|
||||
</properties>
|
||||
<resourceData xsi:type="spiResourceData" pixelSizeHint="45">
|
||||
<resourceData xsi:type="spiResourceData"
|
||||
pixelSizeHint="45">
|
||||
<filename>basemaps/MTR.spi</filename>
|
||||
<mapName>METAR Station Locations</mapName>
|
||||
</resourceData>
|
||||
|
@ -45,27 +54,32 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotMissingData="false" plotSource="METARS in SNOW Monitor Area "
|
||||
plotModelFile="fssMetar.svg" spiFile="basemaps/MTR.spi"
|
||||
retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotMissingData="false" plotSource="METARS in SNOW Monitor Area "
|
||||
plotModelFile="fssMetar.svg" spiFile="basemaps/MTR.spi"
|
||||
retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="METAR, SPECI" constraintType="IN"/>
|
||||
<constraint constraintValue="METAR, SPECI"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="snow" constraintType="EQUALS"/>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<binOffset virtualOffset="0" posOffset="1800" negOffset="1800"/>
|
||||
<alertParser xsi:type="plotAlertParser"/>
|
||||
<binOffset virtualOffset="0"
|
||||
posOffset="1800" negOffset="1800" />
|
||||
<alertParser xsi:type="plotAlertParser" />
|
||||
</resourceData>
|
||||
</resource>
|
||||
<!-- **************************Mesowest************************************ -->
|
||||
|
@ -75,22 +89,28 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="plotResourceData" plotMissingData="false" plotSource="LDAD MESONET in SNOW Monitor Area"
|
||||
plotModelFile="fssMetar.svg" retrieveData="false" isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true" isTopOfTheHour="false">
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="plotResourceData"
|
||||
plotMissingData="false"
|
||||
plotSource="LDAD MESONET in SNOW Monitor Area"
|
||||
plotModelFile="fssMetar.svg" retrieveData="false"
|
||||
isUpdatingOnMetadataOnly="true"
|
||||
isRequeryNecessaryOnTimeMatch="true"
|
||||
isTopOfTheHour="false">
|
||||
<metadataMap>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="fssobs" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="${cwa}" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="fssobs"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="reportType">
|
||||
<constraint constraintValue="mesonet" constraintType="EQUALS"/>
|
||||
<constraint constraintValue="mesonet"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="monitorUse">
|
||||
<constraint constraintValue="snow" constraintType="EQUALS"/>
|
||||
<mapping key="location.stationId">
|
||||
<constraint constraintValue="${stations}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
|
@ -102,10 +122,14 @@
|
|||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true"/>
|
||||
<resourceData xsi:type="snowResourceData" plotSource="SNOW Table Display"/>
|
||||
<properties isSystemResource="false"
|
||||
isBlinking="false" isMapLayer="false" isHoverOn="false"
|
||||
isVisible="true" />
|
||||
<resourceData xsi:type="snowResourceData"
|
||||
plotSource="SNOW Table Display" />
|
||||
</resource>
|
||||
<timeMatcher xsi:type="d2DTimeMatcher" deltaFilter="0" forecastFilter="0"/>
|
||||
<timeMatcher xsi:type="d2DTimeMatcher"
|
||||
deltaFilter="0" forecastFilter="0" />
|
||||
<numberOfFrames>12</numberOfFrames>
|
||||
</descriptor>
|
||||
</displays>
|
||||
|
|
17
cave/com.raytheon.uf.viz.monitor.snow/localization/menus/snow/baseSnow.xml
Normal file → Executable file
17
cave/com.raytheon.uf.viz.monitor.snow/localization/menus/snow/baseSnow.xml
Normal file → Executable file
|
@ -19,15 +19,18 @@
|
|||
further_licensing_information.
|
||||
-->
|
||||
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<contribute xsi:type="bundleItem" file="bundles/snow/snowImageTable.xml" id="SNOWMONITOR" commandId="com.raytheon.uf.viz.monitor.snow.ui.actions.snow"
|
||||
menuText="SNOW Table/Display">
|
||||
<substitute key="cwa" value="${cwa}" />
|
||||
<contribute xsi:type="bundleItem" file="bundles/snow/snowImageTable.xml"
|
||||
id="SNOWMONITOR" commandId="com.raytheon.uf.viz.monitor.snow.ui.actions.snow"
|
||||
menuText="SNOW Table/Display">
|
||||
<substitute key="stations" value="${stations}" />
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="Snow monitor Controls" />
|
||||
<contribute xsi:type="command" id="ConfigureMonitorArea" commandId="com.raytheon.uf.viz.monitor.snow.ui.actions.snowAreaConfig"
|
||||
menuText="Configure SNOW Monitor Area">
|
||||
<contribute xsi:type="command" id="ConfigureMonitorArea"
|
||||
commandId="com.raytheon.uf.viz.monitor.snow.ui.actions.snowAreaConfig"
|
||||
menuText="Configure SNOW Monitor Area">
|
||||
</contribute>
|
||||
<contribute xsi:type="command" id="SNOWAlertVisThresholds" commandId="com.raytheon.uf.viz.monitor.snow.ui.actions.snowThresholdAlertVisConfig"
|
||||
menuText="Configure SNOW Thresholds for AlertViz Monitoring">
|
||||
<contribute xsi:type="command" id="SNOWAlertVisThresholds"
|
||||
commandId="com.raytheon.uf.viz.monitor.snow.ui.actions.snowThresholdAlertVisConfig"
|
||||
menuText="Configure SNOW Thresholds for AlertViz Monitoring">
|
||||
</contribute>
|
||||
</menuTemplate>
|
||||
|
|
55
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/SnowMonitor.java
Normal file → Executable file
55
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/SnowMonitor.java
Normal file → Executable file
|
@ -35,7 +35,6 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.M
|
|||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
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.viz.core.alerts.AlertMessage;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationMessage;
|
||||
import com.raytheon.uf.viz.monitor.IMonitor;
|
||||
|
@ -50,7 +49,6 @@ import com.raytheon.uf.viz.monitor.snow.listeners.ISnowResourceListener;
|
|||
import com.raytheon.uf.viz.monitor.snow.threshold.SnowThresholdMgr;
|
||||
import com.raytheon.uf.viz.monitor.snow.ui.dialogs.SnowMonitoringAreaConfigDlg;
|
||||
import com.raytheon.uf.viz.monitor.snow.ui.dialogs.SnowZoneTableDlg;
|
||||
import com.raytheon.uf.viz.monitor.util.MonitorThresholdConfiguration;
|
||||
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
|
@ -75,6 +73,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Nov. 1, 2012 1297 skorolev Changed HashMap to Map and clean code
|
||||
* Feb 15, 2013 1638 mschenke Changed code to reference DataURI.SEPARATOR instead of URIFilter
|
||||
* Apr 28, 2014 3086 skorolev Removed local getMonitorAreaConfig method.
|
||||
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -83,7 +82,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
*
|
||||
*/
|
||||
|
||||
public class SnowMonitor extends ObsMonitor {
|
||||
public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
|
||||
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(SnowMonitor.class);
|
||||
|
@ -98,13 +97,13 @@ public class SnowMonitor extends ObsMonitor {
|
|||
private SnowMonitoringAreaConfigDlg areaDialog = null;
|
||||
|
||||
/** SNOW configuration manager **/
|
||||
private FSSObsMonitorConfigurationManager snowConfig;
|
||||
private FSSObsMonitorConfigurationManager snowConfig = null;
|
||||
|
||||
/**
|
||||
* This object contains all observation data necessary for the table dialogs
|
||||
* and trending plots
|
||||
*/
|
||||
private final ObMultiHrsReports obData;
|
||||
private ObMultiHrsReports obData;
|
||||
|
||||
/** All SNOW datauri start with this */
|
||||
private final String OBS = "fssobs";
|
||||
|
@ -121,22 +120,20 @@ public class SnowMonitor extends ObsMonitor {
|
|||
/** Pattern for SNOW **/
|
||||
private final Pattern snowPattern = Pattern.compile(DataURI.SEPARATOR + OBS
|
||||
+ DataURI.SEPARATOR + wildCard + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + cwa + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + wildCard + DataURI.SEPARATOR + wildCard
|
||||
+ DataURI.SEPARATOR + "snow");
|
||||
+ DataURI.SEPARATOR + wildCard);
|
||||
|
||||
/**
|
||||
* Private constructor, singleton
|
||||
*/
|
||||
private SnowMonitor() {
|
||||
pluginPatterns.add(snowPattern);
|
||||
snowConfig = new FSSObsMonitorConfigurationManager(currentSite,
|
||||
MonName.snow.name());
|
||||
readTableConfig(MonitorThresholdConfiguration.SNOW_THRESHOLD_CONFIG);
|
||||
snowConfig = new FSSObsMonitorConfigurationManager(MonName.snow.name());
|
||||
updateMonitoringArea();
|
||||
initObserver(OBS, this);
|
||||
obData = new ObMultiHrsReports(CommonConfig.AppName.SNOW);
|
||||
obData.setThresholdMgr(SnowThresholdMgr.getInstance());
|
||||
// Pre-populate dialog with an observation (METAR) for KOMA
|
||||
obData.getZoneTableData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -153,19 +150,16 @@ public class SnowMonitor extends ObsMonitor {
|
|||
return monitor;
|
||||
}
|
||||
|
||||
// TODO: Provide the changes in EDEX URIFilters when area configuration file
|
||||
// has been changed.
|
||||
/**
|
||||
* Re-initialization of monitor.
|
||||
*
|
||||
* DR#11279: When monitor area configuration is changed, this module is
|
||||
* called to re-initialize monitor using new monitor area configuration
|
||||
*/
|
||||
public static void reInitialize() {
|
||||
if (monitor != null) {
|
||||
monitor = null;
|
||||
monitor = new SnowMonitor();
|
||||
}
|
||||
public void reInitialize() {
|
||||
if (monitor != null)
|
||||
monitor.nullifyMonitor();
|
||||
SnowMonitor.getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -261,24 +255,18 @@ public class SnowMonitor extends ObsMonitor {
|
|||
}
|
||||
|
||||
/**
|
||||
* Reads Table Configuration.
|
||||
*
|
||||
* Method that reads the table configuration and updates the zone monitor
|
||||
* threshold map
|
||||
*
|
||||
* @param file
|
||||
* -- the xml configuration filename
|
||||
*/
|
||||
public void readTableConfig(String file) {
|
||||
public void updateMonitoringArea() {
|
||||
Map<String, List<String>> zones = new HashMap<String, List<String>>();
|
||||
// create zones and station list
|
||||
try {
|
||||
for (String zone : snowConfig.getAreaList()) {
|
||||
List<String> stations = snowConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Snow failed to load configuration..."
|
||||
+ this.getClass().getName());
|
||||
for (String zone : snowConfig.getAreaList()) {
|
||||
List<String> stations = snowConfig.getAreaStations(zone);
|
||||
zones.put(zone, stations);
|
||||
}
|
||||
MonitoringArea.setPlatformMap(zones);
|
||||
}
|
||||
|
@ -315,7 +303,12 @@ public class SnowMonitor extends ObsMonitor {
|
|||
*/
|
||||
@Override
|
||||
public void configUpdate(IMonitorConfigurationEvent me) {
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
snowConfig = (FSSObsMonitorConfigurationManager) me.getSource();
|
||||
updateMonitoringArea();
|
||||
if (zoneDialog != null && !zoneDialog.isDisposed()) {
|
||||
zoneDialog.refreshZoneTableData(obData);
|
||||
fireMonitorEvent(zoneDialog.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
7
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/threshold/SnowThresholdMgr.java
Normal file → Executable file
7
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/threshold/SnowThresholdMgr.java
Normal file → Executable file
|
@ -40,7 +40,8 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants.SnowMonitor;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 27, 2009 #3963 lvenable Initial creation
|
||||
* Feb 03, 2014 #2757 skorolev Fixed reInitialize()
|
||||
* May 21, 2014 3086 skorolev Cleaned code
|
||||
* May 21, 2014 3086 skorolev Cleaned code.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site".
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,7 +59,7 @@ public class SnowThresholdMgr extends AbstractThresholdMgr {
|
|||
"DefaultSnowMonitorThresholds.xml", AppName.SNOW.name()
|
||||
.toLowerCase());
|
||||
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
init();
|
||||
}
|
||||
|
@ -123,7 +124,7 @@ public class SnowThresholdMgr extends AbstractThresholdMgr {
|
|||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (areaConfigMgr == null) {
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
areaConfigMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
}
|
||||
return areaConfigMgr;
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.viz.monitor.snow.ui.dialogs.SnowMonDispThreshDlg;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 19 2009 3963 dhladky Initial creation.
|
||||
* Dec 6 2012 #1351 skorolev Changes for non-blocking dialogs.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -52,7 +53,7 @@ public class SnowAlertVisThresholdConfigAction extends AbstractHandler {
|
|||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
if (snowMonDispThreshDlg == null) {
|
||||
if (snowMonDispThreshDlg == null || snowMonDispThreshDlg.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
snowMonDispThreshDlg = new SnowMonDispThreshDlg(shell,
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* March 5, 2012 14413 zhao Launch AreaConfigDlg w/o monitor
|
||||
* Nov.27, 2012 1297 skorolev Cleanup code for non-blocking dialog.
|
||||
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
|
||||
* Sep 19, 2014 3220 skorolev Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,18 +64,16 @@ public class SnowAreaConfigAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
if (configDlg == null) {
|
||||
if (configDlg == null || configDlg.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
configDlg = new SnowMonitoringAreaConfigDlg(shell,
|
||||
"SNOW Monitor Area Configuration");
|
||||
configDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
configDlg = null;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
configDlg.open();
|
||||
|
|
72
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowMonitoringAreaConfigDlg.java
Normal file → Executable file
72
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowMonitoringAreaConfigDlg.java
Normal file → Executable file
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.uf.viz.monitor.snow.ui.dialogs;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
|
@ -27,9 +28,11 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.M
|
|||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
import com.raytheon.uf.common.monitor.data.ObConst.DataUsageKey;
|
||||
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
|
||||
import com.raytheon.uf.viz.monitor.snow.SnowMonitor;
|
||||
import com.raytheon.uf.viz.monitor.snow.threshold.SnowThresholdMgr;
|
||||
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* SNOW Monitor area configuration dialog.
|
||||
|
@ -44,7 +47,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
|||
* Jan 29, 2014 2757 skorolev Changed OK button handler.
|
||||
* Apr 23, 2014 3054 skorolev Fixed issue with removing a new station from list.
|
||||
* Apr 28, 2014 3086 skorolev Updated snowConfigManager.
|
||||
* Sep 15, 2014 2757 skorolev Removed extra dialog.
|
||||
* Sep 04, 2014 3220 skorolev Added fireConfigUpdateEvent method. Updated handler.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -54,8 +57,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
|
|||
|
||||
public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
||||
|
||||
/** Configuration manager for SNOW monitor. */
|
||||
private FSSObsMonitorConfigurationManager snowConfigMgr;
|
||||
private SnowMonDispThreshDlg snowMonitorDlg;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -65,6 +67,7 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
public SnowMonitoringAreaConfigDlg(Shell parent, String title) {
|
||||
super(parent, title, AppName.SNOW);
|
||||
SnowMonitor.getInstance();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -75,7 +78,6 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
*/
|
||||
@Override
|
||||
protected void handleOkBtnSelection() {
|
||||
snowConfigMgr = getInstance();
|
||||
// Check for changes in the data\
|
||||
if (dataIsChanged()) {
|
||||
int choice = showMessage(shell, SWT.OK | SWT.CANCEL,
|
||||
|
@ -85,28 +87,42 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
// Save the config xml file
|
||||
getValues();
|
||||
resetStatus();
|
||||
snowConfigMgr.saveConfigXml();
|
||||
/**
|
||||
* DR#11279: re-initialize threshold manager and the monitor
|
||||
* using new monitor area configuration
|
||||
*/
|
||||
configMgr.saveConfigXml();
|
||||
SnowThresholdMgr.reInitialize();
|
||||
SnowMonitor.reInitialize();
|
||||
fireConfigUpdateEvent();
|
||||
|
||||
if ((!snowConfigMgr.getAddedZones().isEmpty())
|
||||
|| (!snowConfigMgr.getAddedStations().isEmpty())) {
|
||||
if ((!configMgr.getAddedZones().isEmpty())
|
||||
|| (!configMgr.getAddedStations().isEmpty())) {
|
||||
if (editDialog() == SWT.YES) {
|
||||
SnowMonDispThreshDlg snowMonitorDlg = new SnowMonDispThreshDlg(
|
||||
shell, CommonConfig.AppName.SNOW,
|
||||
DataUsageKey.MONITOR);
|
||||
if (snowMonitorDlg == null
|
||||
|| snowMonitorDlg.isDisposed()) {
|
||||
snowMonitorDlg = new SnowMonDispThreshDlg(shell,
|
||||
CommonConfig.AppName.SNOW,
|
||||
DataUsageKey.MONITOR);
|
||||
}
|
||||
snowMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||
|
||||
@Override
|
||||
public void dialogClosed(Object returnValue) {
|
||||
// Clean added zones and stations. Close dialog.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
});
|
||||
snowMonitorDlg.open();
|
||||
}
|
||||
snowConfigMgr.getAddedZones().clear();
|
||||
snowConfigMgr.getAddedStations().clear();
|
||||
// Clean added zones and stations.
|
||||
configMgr.getAddedZones().clear();
|
||||
configMgr.getAddedStations().clear();
|
||||
}
|
||||
}
|
||||
snowConfigMgr = null;
|
||||
}
|
||||
}
|
||||
if (snowMonitorDlg == null || snowMonitorDlg.isDisposed()) {
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -119,7 +135,7 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getInstance() {
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(currentSite,
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
}
|
||||
return (FSSObsMonitorConfigurationManager) configMgr;
|
||||
|
@ -135,4 +151,20 @@ public class SnowMonitoringAreaConfigDlg extends MonitoringAreaConfigDlg {
|
|||
protected void disposed() {
|
||||
configMgr = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire Table reload event
|
||||
*/
|
||||
private void fireConfigUpdateEvent() {
|
||||
final IMonitorConfigurationEvent me = new IMonitorConfigurationEvent(
|
||||
configMgr);
|
||||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SnowMonitor.getInstance().configUpdate(me);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
10
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowZoneTableDlg.java
Normal file → Executable file
10
cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/ui/dialogs/SnowZoneTableDlg.java
Normal file → Executable file
|
@ -54,6 +54,7 @@ import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg;
|
|||
* Nov. 8, 2012 1297 skorolev Added initiateProdArray method
|
||||
* Dec 7, 2012 1351 skorolev Changes for non-blocking dialogs
|
||||
* Apr 28, 2014 3086 skorolev Updated getConfigMgr method.
|
||||
* Sep 04, 2014 3220 skorolev Removed "site". Added check on dispose.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -120,7 +121,7 @@ public class SnowZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
@Override
|
||||
protected void configThreshAction() {
|
||||
if (snowThreshDlg == null) {
|
||||
if (snowThreshDlg == null || snowThreshDlg.isDisposed()) {
|
||||
snowThreshDlg = new SnowMonDispThreshDlg(getParent().getShell(),
|
||||
CommonConfig.AppName.SNOW, DataUsageKey.DISPLAY);
|
||||
}
|
||||
|
@ -172,7 +173,7 @@ public class SnowZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
@Override
|
||||
public void fireConfigUpdate(IMonitorConfigurationEvent imce) {
|
||||
// Not used
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -263,11 +264,10 @@ public class SnowZoneTableDlg extends ZoneTableDlg {
|
|||
*/
|
||||
@Override
|
||||
protected FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance() {
|
||||
if (configMgr == null) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(site,
|
||||
if (configMgr == null || configMgr.isPopulated()) {
|
||||
configMgr = new FSSObsMonitorConfigurationManager(
|
||||
MonName.snow.name());
|
||||
}
|
||||
return configMgr;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
13
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java
Normal file → Executable file
13
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java
Normal file → Executable file
|
@ -61,6 +61,7 @@ import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent;
|
|||
* Sep 11, 2013 2277 mschenke Got rid of ScriptCreator references
|
||||
* Feb 04, 2014 2757 skorolev Added filter for removed stations
|
||||
* May 08, 2014 3086 skorolev Added current site definition.
|
||||
* Sep 04, 2014 3220 skorolev Removed cwa and monitorUsefrom vals.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -74,10 +75,6 @@ public abstract class ObsMonitor extends Monitor {
|
|||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ObsMonitor.class);
|
||||
|
||||
/** Current Site name */
|
||||
protected String currentSite = LocalizationManager.getInstance()
|
||||
.getCurrentSite();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -240,10 +237,10 @@ public abstract class ObsMonitor extends Monitor {
|
|||
/**
|
||||
* Process products at startup
|
||||
*
|
||||
* @param monitorUse
|
||||
* @param monitorName
|
||||
*
|
||||
*/
|
||||
public void processProductAtStartup(String monitorUse) {
|
||||
public void processProductAtStartup(String monitorName) {
|
||||
|
||||
/**
|
||||
* Assume this number for MaxNumObsTimes is larger enough to cover data
|
||||
|
@ -253,10 +250,8 @@ public abstract class ObsMonitor extends Monitor {
|
|||
int MaxNumObsTimes = 240;
|
||||
Map<String, RequestConstraint> vals = new HashMap<String, RequestConstraint>();
|
||||
try {
|
||||
vals.put("cwa", new RequestConstraint(cwa));
|
||||
vals.put(FSSObsRecord.PLUGIN_NAME_ID, new RequestConstraint(
|
||||
FSSObsRecord.PLUGIN_NAME));
|
||||
vals.put("monitorUse", new RequestConstraint(monitorUse));
|
||||
|
||||
DataTime[] dataTimesAvailable = DataCubeContainer.performTimeQuery(
|
||||
vals, false);
|
||||
|
@ -291,7 +286,7 @@ public abstract class ObsMonitor extends Monitor {
|
|||
}
|
||||
} catch (DataCubeException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"No data in database at startup. " + monitorUse);
|
||||
"No data in database at startup. " + monitorName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
62
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObHourReports.java
Normal file → Executable file
62
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObHourReports.java
Normal file → Executable file
|
@ -19,11 +19,12 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.monitor.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig;
|
||||
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
|
||||
|
@ -44,7 +45,8 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec. 1, 2009 3424 zhao Initial creation.
|
||||
* Oct.29, 2012 1297 skorolev Changed HashMap to Map
|
||||
* Oct.31 2012 1297 skorolev Clean code
|
||||
* Oct.31 2012 1297 skorolev Cleaned code.
|
||||
* Sep 04 2014 3220 skorolev Added updateZones method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -62,7 +64,7 @@ public class ObHourReports {
|
|||
private Date nominalTime;
|
||||
|
||||
/**
|
||||
* application name (snow, fog, safeseas, etc)
|
||||
* application name (SNOW, FOG, SAFESEAS)
|
||||
*/
|
||||
private CommonConfig.AppName appName;
|
||||
|
||||
|
@ -71,6 +73,8 @@ public class ObHourReports {
|
|||
*/
|
||||
private Map<String, ObZoneHourReports> hourReports;
|
||||
|
||||
private AbstractThresholdMgr thresholdMgr;
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
|
@ -80,6 +84,7 @@ public class ObHourReports {
|
|||
AbstractThresholdMgr thresholdMgr) {
|
||||
this.nominalTime = nominalTime;
|
||||
this.appName = appName;
|
||||
this.thresholdMgr = thresholdMgr;
|
||||
hourReports = new HashMap<String, ObZoneHourReports>();
|
||||
Map<String, List<String>> zoneStationMap = MonitoringArea
|
||||
.getPlatformMap();
|
||||
|
@ -96,7 +101,7 @@ public class ObHourReports {
|
|||
*/
|
||||
public void addReport(ObReport report) {
|
||||
String station = report.getPlatformId();
|
||||
ArrayList<String> zones = MonitoringArea.getZoneIds(station);
|
||||
List<String> zones = MonitoringArea.getZoneIds(station);
|
||||
if (zones.size() == 0) {
|
||||
statusHandler
|
||||
.error("Error: station: "
|
||||
|
@ -108,7 +113,6 @@ public class ObHourReports {
|
|||
for (String zone : zones) {
|
||||
if (hourReports.containsKey(zone)) {
|
||||
hasZone = true;
|
||||
;
|
||||
hourReports.get(zone).addReport(report);
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +130,7 @@ public class ObHourReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get data for Zone table.
|
||||
* Gets data for Zone table.
|
||||
*
|
||||
* @return tblData
|
||||
*/
|
||||
|
@ -140,7 +144,7 @@ public class ObHourReports {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get data for Fog Table.
|
||||
* Gets data for Fog Table.
|
||||
*
|
||||
* @param algCellType
|
||||
* @return tblData
|
||||
|
@ -209,4 +213,48 @@ public class ObHourReports {
|
|||
return appName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates zones in the Hour Reports
|
||||
*/
|
||||
public void updateZones() {
|
||||
Map<String, List<String>> zoneStationMap = MonitoringArea
|
||||
.getPlatformMap();
|
||||
// remove zones or stations
|
||||
List<String> hourZones = new CopyOnWriteArrayList<String>(
|
||||
hourReports.keySet());
|
||||
for (String zone : hourZones) {
|
||||
if (hourReports.keySet().contains(zone)) {
|
||||
List<String> stations = new CopyOnWriteArrayList<String>(
|
||||
hourReports.get(zone).getZoneHourReports().keySet());
|
||||
for (String stn : stations) {
|
||||
if (!zoneStationMap.get(zone).contains(stn)) {
|
||||
hourReports.get(zone).getZoneHourReports().remove(stn);
|
||||
}
|
||||
}
|
||||
if (!zoneStationMap.keySet().contains(zone)) {
|
||||
hourReports.remove(zone);
|
||||
}
|
||||
}
|
||||
}
|
||||
// add zones
|
||||
for (String zone : zoneStationMap.keySet()) {
|
||||
List<String> stations = new CopyOnWriteArrayList<String>(
|
||||
zoneStationMap.get(zone));
|
||||
for (String stn : stations) {
|
||||
if (!hourReports.get(zone).getZoneHourReports()
|
||||
.containsKey(stn)) {
|
||||
hourReports
|
||||
.get(zone)
|
||||
.getZoneHourReports()
|
||||
.put(stn,
|
||||
new ObStnHourReports(nominalTime, zone,
|
||||
stn, appName, thresholdMgr));
|
||||
}
|
||||
}
|
||||
if (!hourReports.containsKey(zone)) {
|
||||
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
|
||||
appName, thresholdMgr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,8 +51,9 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
|
|||
* Dec 24, 2009 3424 zhao added getTrendDataSet() that returns ObTrendDataSet object
|
||||
* Jan 25, 2010 4281, 3888, 3877 wkwock/zhao added getHistTableData method
|
||||
* Oct.31, 2012 1297 skorolev Clean code.
|
||||
* Jan. 29, 2013 15654 zhao add Wind Chill calculation for SNOW
|
||||
*
|
||||
* Jan. 29, 2013 15654 zhao add Wind Chill calculation for SNOW
|
||||
* Sep 04, 2014 3220 skorolev Updated getStationTableData method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author zhao
|
||||
|
@ -265,6 +266,9 @@ public class ObMultiHrsReports {
|
|||
* object is returned.
|
||||
*/
|
||||
public TableData getStationTableData(Date nominalTime, String zone) {
|
||||
if(zone.equals("")){
|
||||
return this.getEmptyZoneTableData();
|
||||
}
|
||||
if (nominalTime == null) {
|
||||
return getEmptyStationTableData(zone);
|
||||
}
|
||||
|
|
|
@ -1283,14 +1283,9 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
|
|||
* Called when the cancel or "X" button is clicked.
|
||||
*/
|
||||
private void closeWithoutSave() {
|
||||
int choice = showMessage(shell, SWT.YES | SWT.NO, appName
|
||||
+ " Monitor Exit", "Are you sure you want to exit?");
|
||||
if (choice == SWT.YES) {
|
||||
configMgr.setAddedZones(new ArrayList<String>());
|
||||
configMgr.setAddedStations(new ArrayList<String>());
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
resetStatus();
|
||||
setReturnValue(true);
|
||||
close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,6 +53,7 @@ import com.raytheon.viz.ui.EditorUtil;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 6, 2009 lvenable Initial creation
|
||||
* Dec 18, 2009 3424 zhao Implemented tableColRightMouseAction
|
||||
* Sep 04, 2014 3220 skorolev Cleaned code.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -113,7 +114,7 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the Zone/County ID.
|
||||
* Sets the Zone/County ID.
|
||||
*
|
||||
* @param id
|
||||
* ID.
|
||||
|
@ -128,6 +129,9 @@ public class StationTableComp extends TableComp {
|
|||
* @param event
|
||||
* Mouse event.
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#tableMouseDownAction(org.eclipse.swt.events.MouseEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void tableMouseDownAction(MouseEvent event) {
|
||||
tableIndex = table.getSelectionIndex();
|
||||
|
@ -174,6 +178,9 @@ public class StationTableComp extends TableComp {
|
|||
* @param event
|
||||
* Mouse event.
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#tableMouseHoverAction(org.eclipse.swt.events.MouseEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void tableMouseHoverAction(MouseEvent event) {
|
||||
Rectangle rect;
|
||||
|
@ -199,7 +206,7 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the table data and ID.
|
||||
* Sets the table data and ID.
|
||||
*
|
||||
* @param tableData
|
||||
* Data to be displayed in the table.
|
||||
|
@ -212,11 +219,14 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add control above the table.
|
||||
* Adds control above the table.
|
||||
*
|
||||
* @param parentComp
|
||||
* Parent composite.
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#addTopTableControls(org.eclipse.swt.widgets.Composite)
|
||||
*/
|
||||
@Override
|
||||
protected void addTopTableControls(Composite parentComp) {
|
||||
controlComp = new Composite(parentComp, SWT.NONE);
|
||||
|
@ -245,7 +255,7 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the column index.
|
||||
* Gets the column index.
|
||||
*
|
||||
* @param appName
|
||||
* Application name.
|
||||
|
@ -253,30 +263,39 @@ public class StationTableComp extends TableComp {
|
|||
* Sort column.
|
||||
* @return Column index.
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#getColumnIndex(com.raytheon.uf.common.monitor.data.CommonConfig.AppName, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public int getColumnIndex(AppName appName, String sortCol) {
|
||||
return tableConfig.getTableColumnIndex(appName, sortCol);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of column keys.
|
||||
* Gets an array of column keys.
|
||||
*
|
||||
* @param appName
|
||||
* Application name.
|
||||
* @return String array of column keys.
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#getColumnKeys(com.raytheon.uf.common.monitor.data.CommonConfig.AppName)
|
||||
*/
|
||||
@Override
|
||||
protected String[] getColumnKeys(AppName appName) {
|
||||
return tableConfig.getTableColumnKeys(appName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default column width.
|
||||
* Gets the default column width.
|
||||
*
|
||||
* @param appName
|
||||
* Application name.
|
||||
* @return The default column width.
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#getDefaultColWidth(com.raytheon.uf.common.monitor.data.CommonConfig.AppName)
|
||||
*/
|
||||
@Override
|
||||
protected int getDefaultColWidth(AppName appName) {
|
||||
int colWidth = tableConfig.getTableDefaultColWidth(appName);
|
||||
|
@ -284,19 +303,22 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the column attribute data.
|
||||
* Gets the column attribute data.
|
||||
*
|
||||
* @param colName
|
||||
* Column name.
|
||||
* @return Column attribute data.
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#getColumnAttribteData(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected ColumnAttribData getColumnAttribteData(String colName) {
|
||||
return tableConfig.getTableColumnAttr(colName);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the ID lable
|
||||
* Sets the ID label.
|
||||
*
|
||||
* @param name
|
||||
*/
|
||||
|
@ -306,7 +328,10 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
|
||||
/**
|
||||
* mouse down action in the station table -- button-3 [Dec 17, 2009 zhao]
|
||||
* Mouse down action in the station table -- button-3 [Dec 17, 2009 zhao]
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#tableColRightMouseAction(org.eclipse.swt.events.MouseEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void tableColRightMouseAction(MouseEvent event) {
|
||||
|
@ -329,7 +354,6 @@ public class StationTableComp extends TableComp {
|
|||
Rectangle rect = item.getBounds(i);
|
||||
if (rect.contains(mousePt)) {
|
||||
int index = table.indexOf(item);
|
||||
System.out.println("Item " + index + "-" + i);
|
||||
if (i == 0) {
|
||||
tableCallback.launchObHistoryTable(index);
|
||||
return;
|
||||
|
@ -342,7 +366,7 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return to original map view for Zone/County Table
|
||||
* Returns to original map view for Zone/County Table
|
||||
*/
|
||||
protected void restoreMap() {
|
||||
IDisplayPaneContainer container = EditorUtil.getActiveVizContainer();
|
||||
|
@ -355,6 +379,9 @@ public class StationTableComp extends TableComp {
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.raytheon.uf.viz.monitor.ui.dialogs.TableComp#packColumns()
|
||||
*/
|
||||
@Override
|
||||
protected void packColumns() {
|
||||
for (int i = 0; i < table.getColumnCount(); i++) {
|
||||
|
|
26
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ui/dialogs/ZoneTableDlg.java
Normal file → Executable file
26
cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ui/dialogs/ZoneTableDlg.java
Normal file → Executable file
|
@ -72,7 +72,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
|
||||
/**
|
||||
* Abstrct Zone table dialog that is the foundation for all Zone dialogs.
|
||||
* Abstract Zone table dialog that is the foundation for all Zone dialogs.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -88,6 +88,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Nov.11, 2012 1297 skorolev new abstract initiateProdArray()
|
||||
* May 13, 2014 3133 njensen Updated getting ObsHistType from configMgr
|
||||
* May 15, 2014 3086 skorolev Replaced MonitorConfigurationManager with FSSObsMonitorConfigurationManager.
|
||||
* Sep 15, 2014 3220 skorolev Added refreshZoneTableData method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -238,6 +239,7 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
* Constructor
|
||||
*
|
||||
* @param parent
|
||||
* @param obData
|
||||
* @param appName
|
||||
*/
|
||||
public ZoneTableDlg(Shell parent, ObMultiHrsReports obData,
|
||||
|
@ -473,7 +475,8 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
public void updateTableDlg(ObHourReports obHrData) {
|
||||
nominalTime = obHrData.getNominalTime();
|
||||
updateZoneTable(nominalTime);
|
||||
if (!selectedZone.equals("")) {
|
||||
if (!selectedZone.equals("")
|
||||
&& obHrData.getHourReports().containsKey(selectedZone)) {
|
||||
updateStationTable(nominalTime);
|
||||
}
|
||||
updateNominalTimeLabel(nominalTime);
|
||||
|
@ -529,9 +532,12 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
// their current values
|
||||
setStnSortColumnAndDirection();
|
||||
stnTblData = obData.getStationTableData(nominalTime, selectedZone);
|
||||
stnTblData.setSortColumnAndDirection(stnSortColumn, stnSortDirection);
|
||||
stnTblData.sortData();
|
||||
stationTable.setTableData(stnTblData);
|
||||
if (stnTblData != null) {
|
||||
stnTblData.setSortColumnAndDirection(stnSortColumn,
|
||||
stnSortDirection);
|
||||
stnTblData.sortData();
|
||||
stationTable.setTableData(stnTblData);
|
||||
}
|
||||
stationTable.setZoneCountyId(selectedZone);
|
||||
stationTable.setIdLabel(selectedZoneHoverText);
|
||||
stationTable.table.redraw();
|
||||
|
@ -953,4 +959,14 @@ public abstract class ZoneTableDlg extends CaveSWTDialog implements
|
|||
* @return manager
|
||||
*/
|
||||
protected abstract FSSObsMonitorConfigurationManager getMonitorAreaConfigInstance();
|
||||
|
||||
/**
|
||||
* Refreshes Zone Table.
|
||||
*
|
||||
* @param obData
|
||||
*/
|
||||
public void refreshZoneTableData(ObMultiHrsReports obData) {
|
||||
obData.getObHourReports().updateZones();
|
||||
this.updateTableDlg(obData.getObHourReports());
|
||||
}
|
||||
}
|
||||
|
|
16
deltaScripts/14.4.1/DR3220/remove_columns_FSSObs.sh
Normal file
16
deltaScripts/14.4.1/DR3220/remove_columns_FSSObs.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
# DR 3220 - Remove metadata columns from FSSObs database
|
||||
|
||||
PSQL="/awips2/psql/bin/psql"
|
||||
|
||||
echo "INFO: Removing columns metadata cwa and monitoruse from table ffsobs"
|
||||
|
||||
${PSQL} -U awips -d metadata -c "ALTER TABLE fssobs DROP COLUMN cwa, DROP COLUMN monitoruse;"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to remove columns metadata from table fssobs"
|
||||
echo "FATAL: The update has failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: column metadata removed successfully"
|
64
edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java
Normal file → Executable file
64
edexOsgi/com.raytheon.uf.common.dataplugin.fssobs/src/com/raytheon/uf/common/dataplugin/fssobs/FSSObsRecord.java
Normal file → Executable file
|
@ -60,6 +60,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Jun 11, 2014 2061 bsteffen Remove IDecoderGettable
|
||||
* Sep 04, 2014 3220 skorolev Removed cwa and monitorUse from record.
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
@ -88,23 +89,6 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
@XmlElement
|
||||
protected boolean isNew = true;
|
||||
|
||||
// Current CWA (WFO)
|
||||
@Column
|
||||
@DataURI(position = 2)
|
||||
@DynamicSerializeElement
|
||||
@XmlElement(nillable = false)
|
||||
private String cwa;
|
||||
|
||||
// Monitor which should use this station record
|
||||
// fog = "fog"
|
||||
// safeseas = "ss"
|
||||
// snow = "snow"
|
||||
@Column
|
||||
@DataURI(position = 4)
|
||||
@DynamicSerializeElement
|
||||
@XmlElement
|
||||
private String monitorUse = "";
|
||||
|
||||
// Station name
|
||||
@Column
|
||||
@DynamicSerializeElement
|
||||
|
@ -120,7 +104,7 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
protected String reportType;
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 3, embedded = true)
|
||||
@DataURI(position = 2, embedded = true)
|
||||
@XmlElement
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
@ -383,28 +367,6 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
return isNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cwa
|
||||
*/
|
||||
public String getCwa() {
|
||||
return cwa;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param monitorUse
|
||||
* the monitorUse to set
|
||||
*/
|
||||
public void setMonitorUse(String monitorUse) {
|
||||
this.monitorUse = monitorUse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the monitorUse
|
||||
*/
|
||||
public String getMonitorUse() {
|
||||
return monitorUse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the stnName
|
||||
*/
|
||||
|
@ -442,7 +404,7 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the geometry latitude.
|
||||
* Gets the geometry latitude.
|
||||
*
|
||||
* @return The geometry latitude.
|
||||
*/
|
||||
|
@ -451,7 +413,7 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the geometry longitude.
|
||||
* Gets the geometry longitude.
|
||||
*
|
||||
* @return The geometry longitude.
|
||||
*/
|
||||
|
@ -460,7 +422,7 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the station identifier for this observation.
|
||||
* Gets the station identifier for this observation.
|
||||
*
|
||||
* @return the stationId
|
||||
*/
|
||||
|
@ -469,7 +431,7 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the elevation, in meters, of the observing platform or location.
|
||||
* Gets the elevation, in meters, of the observing platform or location.
|
||||
*
|
||||
* @return The observation elevation, in meters.
|
||||
*/
|
||||
|
@ -727,14 +689,8 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* @param cwa
|
||||
* the cwa to set
|
||||
*/
|
||||
public void setCwa(String cwa) {
|
||||
this.cwa = cwa;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets station name.
|
||||
*
|
||||
* @param stnName
|
||||
* the stnName to set
|
||||
*/
|
||||
|
@ -743,6 +699,8 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets report type.
|
||||
*
|
||||
* @param reportType
|
||||
* the reportType to set
|
||||
*/
|
||||
|
@ -751,6 +709,8 @@ public class FSSObsRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets location
|
||||
*
|
||||
* @param location
|
||||
* the location to set
|
||||
*/
|
||||
|
|
203
edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FSSObsMonitorConfigurationManager.java
Normal file → Executable file
203
edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/config/FSSObsMonitorConfigurationManager.java
Normal file → Executable file
|
@ -21,9 +21,13 @@ package com.raytheon.uf.common.monitor.config;
|
|||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
||||
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
|
@ -32,6 +36,7 @@ import com.raytheon.uf.common.localization.LocalizationFile;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.monitor.MonitorAreaUtils;
|
||||
import com.raytheon.uf.common.monitor.data.AdjacentWfoMgr;
|
||||
import com.raytheon.uf.common.monitor.events.MonitorConfigEvent;
|
||||
import com.raytheon.uf.common.monitor.events.MonitorConfigListener;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML;
|
||||
import com.raytheon.uf.common.monitor.xml.AreaIdXML.ZoneType;
|
||||
|
@ -61,6 +66,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
* Apr 23 2014 3054 skorolev Removed unnecessary parameter in the addArea method.
|
||||
* May 13 2014 3133 njensen getStationType returns String instead of ObsHistType
|
||||
* May 15 2014 3086 skorolev Renamed from MonitorConfigurationManager. Replaces three separate area configuration managers with one.
|
||||
* Sep 04 2014 3220 skorolev Added fileUpdated method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,7 +74,8 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class FSSObsMonitorConfigurationManager {
|
||||
public class FSSObsMonitorConfigurationManager implements
|
||||
ILocalizationFileObserver {
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(FSSObsMonitorConfigurationManager.class);
|
||||
|
||||
|
@ -98,7 +105,10 @@ public class FSSObsMonitorConfigurationManager {
|
|||
protected List<String> addedStations = new ArrayList<String>();
|
||||
|
||||
/** Name of plugin */
|
||||
private static String pluginName;
|
||||
private static String pluginName = null;
|
||||
|
||||
/** Monitor name */
|
||||
private static String monitorName = null;
|
||||
|
||||
/** Name of area configuration file */
|
||||
private String configFileName = null;
|
||||
|
@ -109,6 +119,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
/** List of listeners */
|
||||
private List<MonitorConfigListener> listeners = new CopyOnWriteArrayList<MonitorConfigListener>();
|
||||
|
||||
/** Current site */
|
||||
private String currentSite;
|
||||
|
||||
/** Monitor Name **/
|
||||
|
@ -116,23 +127,29 @@ public class FSSObsMonitorConfigurationManager {
|
|||
ss, fog, snow
|
||||
};
|
||||
|
||||
/** Localization Area Configuration File. */
|
||||
private LocalizationFile lacf = null;
|
||||
|
||||
/** Configuration XML is updated and saved */
|
||||
protected boolean isPopulated;
|
||||
|
||||
/** Singleton instance of this class */
|
||||
private static FSSObsMonitorConfigurationManager instance;
|
||||
private static FSSObsMonitorConfigurationManager instance = null;
|
||||
|
||||
/**
|
||||
* Private Constructor
|
||||
*
|
||||
* @param site
|
||||
* @param monitorName
|
||||
*/
|
||||
public FSSObsMonitorConfigurationManager(String site, String monitorName) {
|
||||
public FSSObsMonitorConfigurationManager(String monitorName) {
|
||||
setMonitorName(monitorName);
|
||||
setPopulated(false);
|
||||
// Avoid confusion in file path
|
||||
if (monitorName == MonName.ss.name()) {
|
||||
pluginName = "safeseas";
|
||||
} else {
|
||||
pluginName = monitorName;
|
||||
}
|
||||
currentSite = site;
|
||||
/** Path to Monitoring Area Configuration XML. */
|
||||
setConfigFileName(pluginName + File.separatorChar + "monitoringArea"
|
||||
+ File.separatorChar + "monitorAreaConfig.xml");
|
||||
|
@ -141,7 +158,6 @@ public class FSSObsMonitorConfigurationManager {
|
|||
setAdjAreaConfigFileName(pluginName + File.separatorChar
|
||||
+ "monitoringArea" + File.separatorChar
|
||||
+ "adjacentAreaConfig.xml");
|
||||
|
||||
configXml = new MonAreaConfigXML();
|
||||
adjAreaConfigXml = new MonAreaConfigXML();
|
||||
readConfigXml();
|
||||
|
@ -150,52 +166,38 @@ public class FSSObsMonitorConfigurationManager {
|
|||
/**
|
||||
* Get an instance of Configuration manager for FSSObs monitors.
|
||||
*
|
||||
* @param site
|
||||
* Current site
|
||||
* @param monitor
|
||||
* Name of monitor
|
||||
* @return
|
||||
* @return Instance of manager
|
||||
*/
|
||||
public static synchronized FSSObsMonitorConfigurationManager getInstance(
|
||||
String site, String monitor) {
|
||||
String monitor) {
|
||||
if (instance == null) {
|
||||
instance = new FSSObsMonitorConfigurationManager(site, monitor);
|
||||
instance = new FSSObsMonitorConfigurationManager(monitor);
|
||||
}
|
||||
return (FSSObsMonitorConfigurationManager) instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the XML configuration file
|
||||
*/
|
||||
public void readConfigXml() {
|
||||
try {
|
||||
readConfigXml(configFileName, adjAreaConfigFileName);
|
||||
} catch (Throwable t) {
|
||||
statusHandler.error("Could not configure " + pluginName
|
||||
+ " for site " + currentSite, t);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the XML configuration data for the current XML file name. filename:
|
||||
* monitor area config file name adjAreaFileName: adjacent areas config file
|
||||
* name
|
||||
*
|
||||
* @param filename
|
||||
* @param adjAreaFilename
|
||||
*/
|
||||
protected void readConfigXml(String filename, String adjAreaFilename) {
|
||||
public void readConfigXml() {
|
||||
boolean monitorAreaFileExists = true;
|
||||
boolean adjacentAreaFileExists = true;
|
||||
try {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
String monitorAreaFilePath = pm.getFile(
|
||||
pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE), filename)
|
||||
.getAbsolutePath();
|
||||
LocalizationContext lc = pm.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
this.currentSite = lc.getContextName();
|
||||
lacf = pm.getLocalizationFile(lc, configFileName);
|
||||
String monitorAreaFilePath = lacf.getFile().getAbsolutePath();
|
||||
MonAreaConfigXML configXmltmp = jaxb
|
||||
.unmarshalFromXmlFile(monitorAreaFilePath.toString());
|
||||
configXml = configXmltmp;
|
||||
setPopulated(true);
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.WARN,
|
||||
|
@ -210,11 +212,12 @@ public class FSSObsMonitorConfigurationManager {
|
|||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
String adjacentAreaFilePath = pm.getFile(
|
||||
pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE), adjAreaFilename)
|
||||
LocalizationLevel.SITE), adjAreaConfigFileName)
|
||||
.getAbsolutePath();
|
||||
MonAreaConfigXML configXmltmp = jaxb
|
||||
.unmarshalFromXmlFile(adjacentAreaFilePath.toString());
|
||||
adjAreaConfigXml = configXmltmp;
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.WARN,
|
||||
|
@ -297,7 +300,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
adjAreaConfigXml.addAreaId(zoneXml);
|
||||
}
|
||||
}
|
||||
saveAdjacentAreaConfigXml(adjAreaFilename);
|
||||
saveAdjacentAreaConfigXml();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR, e.getMessage());
|
||||
|
@ -305,16 +308,16 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Save the monitor area XML configuration data to the current XML file
|
||||
* Saves the monitor area XML configuration data to the current XML file
|
||||
* name.
|
||||
*/
|
||||
public void saveConfigXml() {
|
||||
// Save the xml object to disk
|
||||
String filename = this.getConfigFileName();
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE);
|
||||
LocalizationFile newXmlFile = pm.getLocalizationFile(lc, filename);
|
||||
LocalizationFile newXmlFile = pm.getLocalizationFile(lc,
|
||||
getConfigFileName());
|
||||
if (newXmlFile.getFile().getParentFile().exists() == false) {
|
||||
newXmlFile.getFile().getParentFile().mkdirs();
|
||||
}
|
||||
|
@ -322,24 +325,28 @@ public class FSSObsMonitorConfigurationManager {
|
|||
jaxb.marshalToXmlFile(configXml, newXmlFile.getFile()
|
||||
.getAbsolutePath());
|
||||
newXmlFile.save();
|
||||
lacf = newXmlFile;
|
||||
lacf.addFileUpdatedObserver(this);
|
||||
setPopulated(true);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the adjacent area XML configuration data to the current XML file
|
||||
* Saves the adjacent area XML configuration data to the current XML file
|
||||
* name.
|
||||
*
|
||||
* @param filename
|
||||
* adjacentAreaConfig.xml
|
||||
*/
|
||||
protected void saveAdjacentAreaConfigXml(String filename) {
|
||||
protected void saveAdjacentAreaConfigXml() {
|
||||
// Save the xml object to disk
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,
|
||||
LocalizationLevel.SITE);
|
||||
LocalizationFile newXmlFile = pm.getLocalizationFile(lc, filename);
|
||||
LocalizationFile newXmlFile = pm.getLocalizationFile(lc,
|
||||
getAdjAreaConfigFileName());
|
||||
if (newXmlFile.getFile().getParentFile().exists() == false) {
|
||||
newXmlFile.getFile().getParentFile().mkdirs();
|
||||
}
|
||||
|
@ -353,7 +360,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a new Area to the configuration. This method only adds the area, the
|
||||
* Adds a new Area to the configuration. This method only adds the area, the
|
||||
* other info will need to be added to the area via the other methods in
|
||||
* this class.
|
||||
*
|
||||
|
@ -383,7 +390,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a new Area to the configuration. This method only adds the area, the
|
||||
* Adds a new Area to the configuration. This method only adds the area, the
|
||||
* other info will need to be added to the area via the other methods in
|
||||
* this class.
|
||||
*
|
||||
|
@ -424,7 +431,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a station to the area.
|
||||
* Adds a station to the area.
|
||||
*
|
||||
* @param areaId
|
||||
* The area id to add the station to
|
||||
|
@ -453,7 +460,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the areas of a particular type.
|
||||
* Gets the areas of a particular type.
|
||||
*
|
||||
* @param type
|
||||
* ZoneType of the area
|
||||
|
@ -471,7 +478,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get stations associated with an area.
|
||||
* Gets stations associated with an area.
|
||||
*
|
||||
* @param areaId
|
||||
* AreaId of associated stations
|
||||
|
@ -492,7 +499,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get stations associated with an adjacent area.
|
||||
* Gets stations associated with an adjacent area.
|
||||
*
|
||||
* @param areaId
|
||||
* AreaId of associated stations
|
||||
|
@ -513,7 +520,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get stations associated with an area.
|
||||
* Gets stations associated with an area.
|
||||
*
|
||||
* @param areaId
|
||||
* AreaId of associated stations
|
||||
|
@ -534,7 +541,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get an area of a station.
|
||||
* Gets an area of a station.
|
||||
*
|
||||
* @param stationId
|
||||
* The station to get the area
|
||||
|
@ -555,7 +562,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get all the stations associated with the areas.
|
||||
* Gets all the stations associated with the areas.
|
||||
*
|
||||
* @return List of stations
|
||||
*/
|
||||
|
@ -573,7 +580,24 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get a list of all monitoring areas.
|
||||
* Get Station IDs.
|
||||
*
|
||||
* @return List of all stations IDs in the area configuration.
|
||||
*/
|
||||
public Set<String> getStationIDs() {
|
||||
List<AreaIdXML> areaXml = configXml.getAreaIds();
|
||||
Set<String> stations = new HashSet<String>();
|
||||
for (AreaIdXML area : areaXml) {
|
||||
List<StationIdXML> stationList = area.getStationIds();
|
||||
for (StationIdXML station : stationList) {
|
||||
stations.add(station.getName());
|
||||
}
|
||||
}
|
||||
return stations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of all monitoring areas.
|
||||
*
|
||||
* @return List<String> of monitor area ids
|
||||
*/
|
||||
|
@ -587,7 +611,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get a list of all adjacent areas.
|
||||
* Gets a list of all adjacent areas.
|
||||
*
|
||||
* @return ArrayList<String> of adjacent area ids
|
||||
*/
|
||||
|
@ -601,7 +625,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove a station from the area.
|
||||
* Removes a station from the area.
|
||||
*
|
||||
* @param area
|
||||
* Area to remove the station from
|
||||
|
@ -625,7 +649,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove a station from the monitoring area.
|
||||
* Removes a station from the monitoring area.
|
||||
*
|
||||
* @param station
|
||||
* The station to remove
|
||||
|
@ -645,7 +669,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get an AreaIdXML object.
|
||||
* Gets an AreaIdXML object.
|
||||
*
|
||||
* @param area
|
||||
* The area to get
|
||||
|
@ -662,7 +686,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove an area from the monitoring area.
|
||||
* Removes an area from the monitoring area.
|
||||
*
|
||||
* @param area
|
||||
* The area to remove
|
||||
|
@ -684,7 +708,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove an added area.
|
||||
* Removes an added area.
|
||||
*
|
||||
* @param area
|
||||
* The area to remove
|
||||
|
@ -804,7 +828,7 @@ public class FSSObsMonitorConfigurationManager {
|
|||
|
||||
// TODO: Include Mesonet data types.
|
||||
/**
|
||||
* Get station type.
|
||||
* Gets station type.
|
||||
*
|
||||
* @param theZone
|
||||
* @param theStation
|
||||
|
@ -882,6 +906,69 @@ public class FSSObsMonitorConfigurationManager {
|
|||
listeners.remove(ml);
|
||||
}
|
||||
|
||||
// TODO: Make a loopback to change FSSObs URI filters according to changes
|
||||
// in the configuration files.
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.common.localization.ILocalizationFileObserver#fileUpdated
|
||||
* (com.raytheon.uf.common.localization.FileUpdatedMessage)
|
||||
*/
|
||||
@Override
|
||||
public void fileUpdated(FileUpdatedMessage message) {
|
||||
if (message.getFileName().equals(getConfigFileName())) {
|
||||
try {
|
||||
// inform listeners
|
||||
for (MonitorConfigListener fl : listeners) {
|
||||
fl.configChanged(new MonitorConfigEvent(this));
|
||||
}
|
||||
statusHandler.handle(
|
||||
Priority.INFO,
|
||||
"FSSObsMonitorConfigurationManager: "
|
||||
+ message.getFileName() + " is updated.");
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(
|
||||
Priority.WARN,
|
||||
"FSSObsMonitorConfigurationManager: "
|
||||
+ message.getFileName()
|
||||
+ " couldn't be updated.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Monitor Name.
|
||||
*
|
||||
* @return monitor name
|
||||
*/
|
||||
public String getMonitorName() {
|
||||
return monitorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Monitor Name.
|
||||
*
|
||||
* @param monitorName
|
||||
*/
|
||||
public void setMonitorName(String monitorName) {
|
||||
FSSObsMonitorConfigurationManager.monitorName = monitorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flag is true if config file updated and saved.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isPopulated() {
|
||||
return isPopulated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets flag indicating that config file has been updated and saved.
|
||||
*
|
||||
* @param isPopulated
|
||||
*/
|
||||
public void setPopulated(boolean isPopulated) {
|
||||
this.isPopulated = isPopulated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
167
edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/DatMenuUtil.java
Normal file → Executable file
167
edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/DatMenuUtil.java
Normal file → Executable file
|
@ -22,8 +22,8 @@ package com.raytheon.uf.edex.dat.utils;
|
|||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
|
@ -42,6 +42,8 @@ import com.raytheon.uf.common.menus.xml.VariableSubstitution;
|
|||
import com.raytheon.uf.common.monitor.config.FFMPRunConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager.DATA_TYPE;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.config.SCANRunSiteConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.xml.FFMPRunXML;
|
||||
import com.raytheon.uf.common.monitor.xml.ProductRunXML;
|
||||
|
@ -52,7 +54,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.edex.menus.AbstractMenuUtil;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Utility for DAT menu creation.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -64,6 +66,7 @@ import com.raytheon.uf.edex.menus.AbstractMenuUtil;
|
|||
* June 6, 2011 #9827 bkowal Skip scan menu creation if the Run
|
||||
* Configuration Manager has not read a
|
||||
* FFMPRunConfig.xml file.
|
||||
* Sep 04, 2014 3220 skorolev Updated menu creation for Fog, Safeseas and Snow monitors.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -393,54 +396,22 @@ public class DatMenuUtil extends AbstractMenuUtil {
|
|||
+ "scan.xml");
|
||||
|
||||
/*************************************** OTHER ********************************/
|
||||
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||
LocalizationContext commonStaticSite = pathMgr.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
String cwa = commonStaticSite.getContextName();
|
||||
|
||||
CommonMenuContributionFile fogMenuContributionFile = new CommonMenuContributionFile();
|
||||
fogMenuContributionFile.contribution = new CommonIncludeMenuItem[1];
|
||||
|
||||
fogMenuContributionFile.contribution[0] = new CommonIncludeMenuItem();
|
||||
|
||||
fogMenuContributionFile.contribution[0] = processOtherContribution(cwa,
|
||||
"menus/fog/baseFog.xml", "menu:obs?after=FOGPLACEHOLDER",
|
||||
"Fog Monitor", fogMenuContributionFile.contribution[0]);
|
||||
|
||||
toXml(fogMenuContributionFile, "menus" + File.separator + "fog"
|
||||
+ File.separator + "index.xml");
|
||||
|
||||
CommonMenuContributionFile safeMenuContributionFile = new CommonMenuContributionFile();
|
||||
safeMenuContributionFile.contribution = new CommonIncludeMenuItem[1];
|
||||
|
||||
safeMenuContributionFile.contribution[0] = new CommonIncludeMenuItem();
|
||||
|
||||
safeMenuContributionFile.contribution[0] = processOtherContribution(
|
||||
cwa, "menus/safeseas/baseSafeSeas.xml",
|
||||
"menu:obs?before=EndOfMaritime", "SAFESEAS",
|
||||
safeMenuContributionFile.contribution[0]);
|
||||
|
||||
toXml(safeMenuContributionFile, "menus" + File.separator + "safeseas"
|
||||
+ File.separator + "index.xml");
|
||||
|
||||
CommonMenuContributionFile snowMenuContributionFile = new CommonMenuContributionFile();
|
||||
snowMenuContributionFile.contribution = new CommonIncludeMenuItem[1];
|
||||
|
||||
snowMenuContributionFile.contribution[0] = new CommonIncludeMenuItem();
|
||||
|
||||
snowMenuContributionFile.contribution[0] = processOtherContribution(
|
||||
cwa, "menus/snow/baseSnow.xml",
|
||||
"menu:obs?after=SNOWPLACEHOLDER", "SNOW",
|
||||
safeMenuContributionFile.contribution[0]);
|
||||
|
||||
toXml(snowMenuContributionFile, "menus" + File.separator + "snow"
|
||||
+ File.separator + "index.xml");
|
||||
createFogMenu();
|
||||
createSafeseasMenu();
|
||||
createSnowMenu();
|
||||
|
||||
statusHandler.info("Finished processing DAT menus.");
|
||||
override = false;
|
||||
datSite = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process Contribution.
|
||||
*
|
||||
* @param radar
|
||||
* @param filePath
|
||||
* @return
|
||||
*/
|
||||
private CommonAbstractMenuContribution processContribution(String radar,
|
||||
String filePath) {
|
||||
CommonIncludeMenuContribution subIncludeContribution = new CommonIncludeMenuContribution();
|
||||
|
@ -472,6 +443,17 @@ public class DatMenuUtil extends AbstractMenuUtil {
|
|||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process FFMP Contribution.
|
||||
*
|
||||
* @param site
|
||||
* @param source
|
||||
* @param dataKey
|
||||
* @param displayName
|
||||
* @param filePath
|
||||
* @param subIncludeContribution
|
||||
* @return
|
||||
*/
|
||||
private CommonAbstractMenuContribution processFFMPContribution(String site,
|
||||
String source, String dataKey, String displayName, String filePath,
|
||||
CommonIncludeMenuContribution subIncludeContribution) {
|
||||
|
@ -496,14 +478,105 @@ public class DatMenuUtil extends AbstractMenuUtil {
|
|||
return subIncludeContribution;
|
||||
}
|
||||
|
||||
private CommonIncludeMenuItem processOtherContribution(String cwa,
|
||||
/**
|
||||
* Creates Safeseas Menu.
|
||||
*/
|
||||
private void createSafeseasMenu() {
|
||||
FSSObsMonitorConfigurationManager ssConfig = FSSObsMonitorConfigurationManager
|
||||
.getInstance(MonName.ss.name());
|
||||
Set<String> ssStns = ssConfig.getStationIDs();
|
||||
StringBuilder stations = new StringBuilder();
|
||||
for (String s : ssStns) {
|
||||
if (stations.length() > 0) {
|
||||
stations.append(",");
|
||||
}
|
||||
stations.append(s);
|
||||
}
|
||||
String ssStations = stations.toString();
|
||||
CommonMenuContributionFile safeMenuContributionFile = new CommonMenuContributionFile();
|
||||
safeMenuContributionFile.contribution = new CommonIncludeMenuItem[1];
|
||||
safeMenuContributionFile.contribution[0] = new CommonIncludeMenuItem();
|
||||
safeMenuContributionFile.contribution[0] = processOtherContribution(
|
||||
ssStations, "menus/safeseas/baseSafeSeas.xml",
|
||||
"menu:obs?before=EndOfMaritime", "SAFESEAS",
|
||||
safeMenuContributionFile.contribution[0]);
|
||||
toXml(safeMenuContributionFile, "menus" + File.separator
|
||||
+ "safeseas" + File.separator + "index.xml");
|
||||
ssConfig = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates Fog Menu.
|
||||
*/
|
||||
private void createFogMenu() {
|
||||
FSSObsMonitorConfigurationManager fogConfig = FSSObsMonitorConfigurationManager
|
||||
.getInstance(MonName.fog.name());
|
||||
Set<String> fogStns = fogConfig.getStationIDs();
|
||||
StringBuilder stations = new StringBuilder();
|
||||
for (String s : fogStns) {
|
||||
if (stations.length() > 0) {
|
||||
stations.append(",");
|
||||
}
|
||||
stations.append(s);
|
||||
}
|
||||
String fogStations = stations.toString();
|
||||
CommonMenuContributionFile fogMenuContributionFile = new CommonMenuContributionFile();
|
||||
fogMenuContributionFile.contribution = new CommonIncludeMenuItem[1];
|
||||
fogMenuContributionFile.contribution[0] = new CommonIncludeMenuItem();
|
||||
fogMenuContributionFile.contribution[0] = processOtherContribution(
|
||||
fogStations, "menus/fog/baseFog.xml",
|
||||
"menu:obs?after=FOGPLACEHOLDER", "Fog Monitor",
|
||||
fogMenuContributionFile.contribution[0]);
|
||||
toXml(fogMenuContributionFile, "menus" + File.separator + "fog"
|
||||
+ File.separator + "index.xml");
|
||||
fogConfig = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates Snow Menu.
|
||||
*/
|
||||
private void createSnowMenu() {
|
||||
FSSObsMonitorConfigurationManager snowConfig = FSSObsMonitorConfigurationManager
|
||||
.getInstance(MonName.snow.name());
|
||||
Set<String> snowStns = snowConfig.getStationIDs();
|
||||
StringBuilder stations = new StringBuilder();
|
||||
for (String s : snowStns) {
|
||||
if (stations.length() > 0) {
|
||||
stations.append(",");
|
||||
}
|
||||
stations.append(s);
|
||||
}
|
||||
String snowStations = stations.toString();
|
||||
CommonMenuContributionFile snowMenuContributionFile = new CommonMenuContributionFile();
|
||||
snowMenuContributionFile.contribution = new CommonIncludeMenuItem[1];
|
||||
snowMenuContributionFile.contribution[0] = new CommonIncludeMenuItem();
|
||||
snowMenuContributionFile.contribution[0] = processOtherContribution(
|
||||
snowStations, "menus/snow/baseSnow.xml",
|
||||
"menu:obs?after=SNOWPLACEHOLDER", "SNOW",
|
||||
snowMenuContributionFile.contribution[0]);
|
||||
toXml(snowMenuContributionFile, "menus" + File.separator + "snow"
|
||||
+ File.separator + "index.xml");
|
||||
snowConfig = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process Other(Fog, Safaseas and Snow) Contribution.
|
||||
*
|
||||
* @param stations
|
||||
* @param filePath
|
||||
* @param installLoc
|
||||
* @param subMenuName
|
||||
* @param commonIncludeMenu
|
||||
* @return
|
||||
*/
|
||||
private CommonIncludeMenuItem processOtherContribution(String stations,
|
||||
String filePath, String installLoc, String subMenuName,
|
||||
CommonIncludeMenuItem commonIncludeMenu) {
|
||||
|
||||
commonIncludeMenu.substitutions = new VariableSubstitution[1];
|
||||
commonIncludeMenu.substitutions[0] = new VariableSubstitution();
|
||||
commonIncludeMenu.substitutions[0].key = "cwa";
|
||||
commonIncludeMenu.substitutions[0].value = cwa;
|
||||
commonIncludeMenu.substitutions[0].key = "stations";
|
||||
commonIncludeMenu.substitutions[0].value = stations;
|
||||
commonIncludeMenu.fileName = new File(filePath);
|
||||
commonIncludeMenu.installationLocation = installLoc;
|
||||
commonIncludeMenu.subMenuName = subMenuName;
|
||||
|
|
6
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/META-INF/MANIFEST.MF
Normal file → Executable file
6
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/META-INF/MANIFEST.MF
Normal file → Executable file
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Datobs
|
||||
Bundle-SymbolicName: com.raytheon.uf.edex.plugin.fssobs
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.14.1.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Require-Bundle: com.raytheon.uf.edex.cpgsrv;bundle-version="1.12.1153",
|
||||
|
@ -13,8 +13,12 @@ Export-Package: com.raytheon.uf.edex.plugin.fssobs,
|
|||
com.raytheon.uf.edex.plugin.fssobs.common
|
||||
Import-Package: com.raytheon.uf.common.monitor.config,
|
||||
com.raytheon.uf.common.monitor.cpg,
|
||||
com.raytheon.uf.common.monitor.events,
|
||||
com.raytheon.uf.common.pointdata,
|
||||
com.raytheon.uf.common.pointdata.spatial,
|
||||
com.raytheon.uf.common.status,
|
||||
com.raytheon.uf.edex.dat.utils,
|
||||
com.raytheon.uf.edex.menus,
|
||||
com.raytheon.uf.edex.plugin.fssobs,
|
||||
com.raytheon.uf.edex.pointdata,
|
||||
org.apache.commons.logging
|
||||
|
|
59
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsGenerator.java
Normal file → Executable file
59
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsGenerator.java
Normal file → Executable file
|
@ -20,17 +20,22 @@
|
|||
|
||||
package com.raytheon.uf.edex.plugin.fssobs;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.edex.urifilter.URIFilter;
|
||||
import com.raytheon.edex.urifilter.URIGenerateMessage;
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.monitor.events.MonitorConfigEvent;
|
||||
import com.raytheon.uf.common.monitor.events.MonitorConfigListener;
|
||||
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.common.time.DataTime;
|
||||
import com.raytheon.uf.edex.cpgsrv.CompositeProductGenerator;
|
||||
import com.raytheon.uf.edex.dat.utils.DatMenuUtil;
|
||||
import com.raytheon.uf.edex.plugin.fssobs.common.FSSObsConfig;
|
||||
|
||||
/**
|
||||
|
@ -45,6 +50,7 @@ import com.raytheon.uf.edex.plugin.fssobs.common.FSSObsConfig;
|
|||
* Oct 26, 2010 skorolev Initial creation
|
||||
* May 23, 2014 3086 skorolev Cleaned code.
|
||||
* Aug 18, 2014 3530 bclement removed constructDataURI() call
|
||||
* Sep 04, 2014 3220 skorolev Replaced 3 URI filters with one.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -52,14 +58,22 @@ import com.raytheon.uf.edex.plugin.fssobs.common.FSSObsConfig;
|
|||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class FSSObsGenerator extends CompositeProductGenerator {
|
||||
public class FSSObsGenerator extends CompositeProductGenerator implements
|
||||
MonitorConfigListener {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(FSSObsGenerator.class);
|
||||
|
||||
/** Name of composite generator */
|
||||
private static final String genName = "FSSObs";
|
||||
|
||||
/** Product */
|
||||
private static final String productType = "fssobs";
|
||||
|
||||
/** Sets of all stations to filter for */
|
||||
private HashSet<String> allStations = null;
|
||||
|
||||
private FSSObsMonitorConfigurationManager currManager = null;
|
||||
|
||||
/**
|
||||
* Public construction
|
||||
*/
|
||||
|
@ -79,8 +93,7 @@ public class FSSObsGenerator extends CompositeProductGenerator {
|
|||
|
||||
FSSObsConfig fss_config = null;
|
||||
try {
|
||||
fss_config = new FSSObsConfig((FSSObsURIGenrtMessage) genMessage,
|
||||
this);
|
||||
fss_config = new FSSObsConfig(genMessage, this);
|
||||
this.setPluginDao(new FSSObsDAO(productType));
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
|
@ -110,11 +123,9 @@ public class FSSObsGenerator extends CompositeProductGenerator {
|
|||
*/
|
||||
@Override
|
||||
protected void createFilters() {
|
||||
ArrayList<URIFilter> tmp = new ArrayList<URIFilter>(3);
|
||||
tmp.add(new FSSObsURIFilter(MonName.fog.name()));
|
||||
tmp.add(new FSSObsURIFilter(MonName.ss.name()));
|
||||
tmp.add(new FSSObsURIFilter(MonName.snow.name()));
|
||||
filters = tmp.toArray(new FSSObsURIFilter[tmp.size()]);
|
||||
filters = new URIFilter[1];
|
||||
filters[0] = new FSSObsURIFilter(genName, allStations);
|
||||
allStations = null;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -125,6 +136,16 @@ public class FSSObsGenerator extends CompositeProductGenerator {
|
|||
*/
|
||||
@Override
|
||||
protected void configureFilters() {
|
||||
statusHandler.handle(Priority.INFO, getGeneratorName()
|
||||
+ " process Filter Config...");
|
||||
allStations = new HashSet<String>();
|
||||
|
||||
for (MonName mname : MonName.values()) {
|
||||
currManager = new FSSObsMonitorConfigurationManager(mname.name());
|
||||
currManager.addListener(this);
|
||||
allStations.addAll(currManager.getStations());
|
||||
currManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -146,4 +167,24 @@ public class FSSObsGenerator extends CompositeProductGenerator {
|
|||
return getConfigManager().getFSSState();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.common.monitor.events.MonitorConfigListener#configChanged
|
||||
* (com.raytheon.uf.common.monitor.events.MonitorConfigEvent)
|
||||
*/
|
||||
@Override
|
||||
public void configChanged(MonitorConfigEvent fce) {
|
||||
if (fce.getSource() instanceof FSSObsMonitorConfigurationManager) {
|
||||
statusHandler
|
||||
.handle(Priority.INFO,
|
||||
"Re-configuring FSSObs URI filters...Run Area Config change");
|
||||
resetFilters();
|
||||
DatMenuUtil dmu = new DatMenuUtil();
|
||||
dmu.setDatSite(SiteUtil.getSite());
|
||||
dmu.setOverride(true);
|
||||
dmu.createMenus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
77
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsURIFilter.java
Normal file → Executable file
77
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsURIFilter.java
Normal file → Executable file
|
@ -3,13 +3,11 @@ package com.raytheon.uf.edex.plugin.fssobs;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.TimeZone;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.edex.urifilter.URIFilter;
|
||||
import com.raytheon.edex.urifilter.URIGenerateMessage;
|
||||
import com.raytheon.uf.common.dataplugin.message.DataURINotificationMessage;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
|
@ -24,6 +22,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 5, 2012 #1351 skorolev Cleaned code
|
||||
* Feb 15, 2013 1638 mschenke Moved DataURINotificationMessage to uf.common.dataplugin
|
||||
* Sep 04, 2014 3220 skorolev Removed CWA from filter.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -35,12 +34,6 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
/** Station ID **/
|
||||
private String stn;
|
||||
|
||||
/** CWA **/
|
||||
private String cwa;
|
||||
|
||||
/** Monitor's name **/
|
||||
private String monitorName;
|
||||
|
||||
/** Station coordinates **/
|
||||
private Coordinate stationCoor = null;
|
||||
|
||||
|
@ -59,8 +52,8 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
/** Current data type #METAR, #Maritime or #Mesonet **/
|
||||
private String dataType;
|
||||
|
||||
/** Current Site **/
|
||||
private String currentSite = SiteUtil.getSite();
|
||||
/** All filtered stations */
|
||||
private HashSet<String> stations = null;
|
||||
|
||||
/** Date format **/
|
||||
private static String datePattern = "yyyy-MM-dd_HH:mm:ss.S";
|
||||
|
@ -74,9 +67,12 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
* Constructor
|
||||
*
|
||||
* @param name
|
||||
* Monitor name
|
||||
* of filter
|
||||
*
|
||||
* @param stations
|
||||
* for FSSObs filter
|
||||
*/
|
||||
public FSSObsURIFilter(String name) {
|
||||
public FSSObsURIFilter(String name, HashSet<String> stations) {
|
||||
super(name);
|
||||
logger.info("FSSObsFilter " + name + " Filter construction...");
|
||||
setDataTypes(new String[] { "obs", "sfcobs", "ldadmesonet" });
|
||||
|
@ -84,9 +80,7 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
SimpleDateFormat datef = new SimpleDateFormat(datePattern);
|
||||
datef.setTimeZone(TimeZone.getTimeZone("Zulu"));
|
||||
setDateFormatter(datef);
|
||||
setCwa(currentSite);
|
||||
// Which monitor should use: fog, ss or snow
|
||||
this.setMonitorName(name);
|
||||
this.stations = stations;
|
||||
setMatchURIs();
|
||||
}
|
||||
|
||||
|
@ -97,9 +91,8 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
*/
|
||||
@Override
|
||||
public void setMatchURIs() {
|
||||
List<String> stns = FSSObsUtils.getStations(name);
|
||||
Pattern pat = Pattern.compile("#");
|
||||
for (String st : stns) {
|
||||
for (String st : stations) {
|
||||
String[] tokens = pat.split(st);
|
||||
setStn(tokens[0]);
|
||||
setDataType(tokens[1]);
|
||||
|
@ -257,24 +250,6 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
return newKey.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets CWA
|
||||
*
|
||||
* @return cwa
|
||||
*/
|
||||
public String getCwa() {
|
||||
return cwa;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets CWA
|
||||
*
|
||||
* @param cwa
|
||||
*/
|
||||
public void setCwa(String cwa) {
|
||||
this.cwa = cwa;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets station coordinates
|
||||
*
|
||||
|
@ -344,16 +319,6 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
+ uriSeperator + getStn());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.edex.urifilter.URIFilter#createGenerateMessage()
|
||||
*/
|
||||
@Override
|
||||
public URIGenerateMessage createGenerateMessage() {
|
||||
return new FSSObsURIGenrtMessage(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets station name
|
||||
*
|
||||
|
@ -391,24 +356,4 @@ public class FSSObsURIFilter extends URIFilter {
|
|||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Monitor Name.
|
||||
*
|
||||
* @return the monitorName
|
||||
*/
|
||||
public String getMonitorName() {
|
||||
return monitorName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Monitor Name.
|
||||
*
|
||||
* @param monitorName
|
||||
* the monitorName to set
|
||||
*/
|
||||
public void setMonitorName(String monitorName) {
|
||||
this.monitorName = monitorName;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,87 +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.uf.edex.plugin.fssobs;
|
||||
|
||||
import com.raytheon.edex.urifilter.URIGenerateMessage;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 15, 2010 skorolev Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author skorolev
|
||||
* @version 1.0
|
||||
*/
|
||||
@DynamicSerialize
|
||||
public class FSSObsURIGenrtMessage extends URIGenerateMessage {
|
||||
@DynamicSerializeElement
|
||||
protected String cwa;
|
||||
|
||||
@DynamicSerializeElement
|
||||
protected String monitorUse;
|
||||
|
||||
public FSSObsURIGenrtMessage(){
|
||||
}
|
||||
|
||||
public FSSObsURIGenrtMessage(FSSObsURIFilter filter) {
|
||||
super(filter);
|
||||
setCwa(filter.getCwa());
|
||||
setMonitorUse(filter.getMonitorName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cwa
|
||||
*/
|
||||
public String getCwa() {
|
||||
return cwa;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cwa the cwa to set
|
||||
*/
|
||||
public void setCwa(String cwa) {
|
||||
this.cwa = cwa;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the monitorUse
|
||||
*/
|
||||
public String getMonitorUse() {
|
||||
return monitorUse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param monitorUse the monitorUse to set
|
||||
*/
|
||||
public void setMonitorUse(String monitorUse) {
|
||||
this.monitorUse = monitorUse;
|
||||
}
|
||||
|
||||
}
|
41
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsUtils.java
Normal file → Executable file
41
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/FSSObsUtils.java
Normal file → Executable file
|
@ -19,21 +19,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.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.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -56,6 +51,7 @@ import com.raytheon.uf.edex.pointdata.PointDataQuery;
|
|||
* Jan 02, 2014 2580 skorolev Fixed FSSObs error.
|
||||
* Jan 06, 2014 2653 skorolev Corrected decoding of snincrHourly and snincrTotal.
|
||||
* Apr 28, 2014 3086 skorolev Updated getStations method.
|
||||
* Sep 04, 2014 3220 skorolev Removed getStations method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -418,39 +414,4 @@ public class FSSObsUtils {
|
|||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets stations which FSSObs monitor is using.
|
||||
*
|
||||
* @param monitor
|
||||
* @return stations
|
||||
*/
|
||||
public static List<String> getStations(String monitor) {
|
||||
String currentSite = SiteUtil.getSite();
|
||||
|
||||
List<String> stations = new ArrayList<String>();
|
||||
// Which monitor should use this station: fog, ss or snow
|
||||
if (monitor.equals(MonName.fog.name())) {
|
||||
FSSObsMonitorConfigurationManager fogConfigManager = new FSSObsMonitorConfigurationManager(
|
||||
currentSite, MonName.fog.name());
|
||||
List<String> fogStations = fogConfigManager.getStations();
|
||||
stations.addAll(fogStations);
|
||||
fogConfigManager = null;
|
||||
}
|
||||
if (monitor.equals(MonName.ss.name())) {
|
||||
FSSObsMonitorConfigurationManager ssConfigManger = new FSSObsMonitorConfigurationManager(
|
||||
currentSite, MonName.ss.name());
|
||||
List<String> ssStaitions = ssConfigManger.getStations();
|
||||
stations.addAll(ssStaitions);
|
||||
ssConfigManger = null;
|
||||
}
|
||||
if (monitor.equals(MonName.snow.name())) {
|
||||
FSSObsMonitorConfigurationManager snowConfigManager = new FSSObsMonitorConfigurationManager(
|
||||
currentSite, MonName.snow.name());
|
||||
List<String> snowStations = snowConfigManager.getStations();
|
||||
stations.addAll(snowStations);
|
||||
snowConfigManager = null;
|
||||
}
|
||||
return stations;
|
||||
}
|
||||
}
|
||||
|
|
44
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/common/FSSObsConfig.java
Normal file → Executable file
44
edexOsgi/com.raytheon.uf.edex.plugin.fssobs/src/com/raytheon/uf/edex/plugin/fssobs/common/FSSObsConfig.java
Normal file → Executable file
|
@ -22,6 +22,7 @@ package com.raytheon.uf.edex.plugin.fssobs.common;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.raytheon.edex.urifilter.URIGenerateMessage;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -29,7 +30,6 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.edex.cpgsrv.CompositeProductGenerator;
|
||||
import com.raytheon.uf.edex.plugin.fssobs.FSSObsGenerator;
|
||||
import com.raytheon.uf.edex.plugin.fssobs.FSSObsURIGenrtMessage;
|
||||
import com.raytheon.uf.edex.plugin.fssobs.FSSObsUtils;
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,7 @@ import com.raytheon.uf.edex.plugin.fssobs.FSSObsUtils;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 19, 2010 skorolev Initial creation
|
||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||
* Sep 04, 2014 3220 skorolev Removed cwa and monitorUse from data set.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,24 +60,26 @@ public class FSSObsConfig {
|
|||
*/
|
||||
private FSSObsGenerator fssgen = null;
|
||||
|
||||
private String cwa = null;
|
||||
|
||||
/**
|
||||
* FSSObs data
|
||||
*/
|
||||
private FSSObsRecord tableRow;
|
||||
|
||||
private String monitorUse;
|
||||
|
||||
/** The logger */
|
||||
protected transient final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
public FSSObsConfig(FSSObsURIGenrtMessage genMessage,
|
||||
FSSObsGenerator generator) throws Exception {
|
||||
public FSSObsConfig(URIGenerateMessage genMessage, FSSObsGenerator generator)
|
||||
throws Exception {
|
||||
|
||||
this.fssgen = generator;
|
||||
this.cwa = genMessage.getCwa();
|
||||
this.monitorUse = genMessage.getMonitorUse();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets FSSObs data table row.
|
||||
*
|
||||
* @param uri
|
||||
* @return tableRow
|
||||
*/
|
||||
public FSSObsRecord getTableRow(String uri) {
|
||||
String dt = uri.substring(1)
|
||||
.substring(0, uri.substring(1).indexOf("/"));
|
||||
|
@ -122,9 +125,6 @@ public class FSSObsConfig {
|
|||
tableRow.setSnowDepth(snowData[2]);
|
||||
tableRow.setWindChill(snowData[3]);
|
||||
tableRow.setFrostbiteTime(snowData[4]);
|
||||
|
||||
tableRow.setCwa(cwa);
|
||||
tableRow.setMonitorUse(monitorUse);
|
||||
tableRow.setPlatformId(tableRow.getLocation().getStationId());
|
||||
|
||||
return tableRow;
|
||||
|
@ -132,25 +132,17 @@ public class FSSObsConfig {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param monitorUse
|
||||
* the monitorUse to set
|
||||
* Gets CPG generator
|
||||
*
|
||||
* @return cpg generator
|
||||
*/
|
||||
public void setMonitorUse(String monitorUse) {
|
||||
this.monitorUse = monitorUse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the monitorUse
|
||||
*/
|
||||
public String getMonitorUse() {
|
||||
return monitorUse;
|
||||
}
|
||||
|
||||
public CompositeProductGenerator getGenerator() {
|
||||
return fssgen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets FSSObs data table row.
|
||||
*
|
||||
* @param tableRow
|
||||
* the tableRow to set
|
||||
*/
|
||||
|
|
32
edexOsgi/com.raytheon.uf.edex.plugin.loctables/src/com/raytheon/uf/edex/plugin/loctables/ingest/LocationTablesIngest.java
Normal file → Executable file
32
edexOsgi/com.raytheon.uf.edex.plugin.loctables/src/com/raytheon/uf/edex/plugin/loctables/ingest/LocationTablesIngest.java
Normal file → Executable file
|
@ -28,7 +28,6 @@ import java.util.Map;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
|
||||
import com.raytheon.uf.edex.ndm.ingest.IDataSetIngester;
|
||||
|
@ -56,6 +55,7 @@ import com.raytheon.uf.edex.plugin.loctables.util.store.ObStationStoreStrategy;
|
|||
* Apr 08, 2010 jkorman Initial creation
|
||||
* Mar 06, 2014 2876 mpduff New NDM plugin.
|
||||
* Apr 28, 2014 3086 skorolev Updated setupLocalFiles method
|
||||
* Sep 04, 2014 3220 skorolev Removed parameter currentSite from FSSObs configuration managers.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -77,6 +77,12 @@ public class LocationTablesIngest implements INationalDatasetSubscriber {
|
|||
private LocationTablesIngest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Location Tables Ingest.
|
||||
*
|
||||
* @param pluginName
|
||||
* @param ingester
|
||||
*/
|
||||
public LocationTablesIngest(String pluginName, IDataSetIngester ingester) {
|
||||
this.ingester = ingester;
|
||||
|
||||
|
@ -86,7 +92,7 @@ public class LocationTablesIngest implements INationalDatasetSubscriber {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Setup Handlers.
|
||||
*/
|
||||
private void setupHandlers() {
|
||||
|
||||
|
@ -116,16 +122,18 @@ public class LocationTablesIngest implements INationalDatasetSubscriber {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup local FSSObs managers.
|
||||
*/
|
||||
private void setupLocalFiles() {
|
||||
String currentSite = SiteUtil.getSite();
|
||||
|
||||
List<FSSObsMonitorConfigurationManager> monitors = new ArrayList<FSSObsMonitorConfigurationManager>();
|
||||
monitors.add(FSSObsMonitorConfigurationManager.getInstance(currentSite,
|
||||
MonName.fog.name()));
|
||||
monitors.add(FSSObsMonitorConfigurationManager.getInstance(currentSite,
|
||||
MonName.ss.name()));
|
||||
monitors.add(FSSObsMonitorConfigurationManager.getInstance(currentSite,
|
||||
MonName.snow.name()));
|
||||
|
||||
monitors.add(FSSObsMonitorConfigurationManager.getInstance(MonName.fog
|
||||
.name()));
|
||||
monitors.add(FSSObsMonitorConfigurationManager.getInstance(MonName.ss
|
||||
.name()));
|
||||
monitors.add(FSSObsMonitorConfigurationManager.getInstance(MonName.snow
|
||||
.name()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -146,6 +154,7 @@ public class LocationTablesIngest implements INationalDatasetSubscriber {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets Handler.
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
|
@ -168,8 +177,9 @@ public class LocationTablesIngest implements INationalDatasetSubscriber {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets Handlers.
|
||||
*
|
||||
* @return
|
||||
* @return handlers
|
||||
*/
|
||||
public Map<String, TableHandler> getHandlers() {
|
||||
return handlers;
|
||||
|
|
Loading…
Add table
Reference in a new issue