13.2.1-6 baseline
Former-commit-id:52f48669f6
[formerlyd66ad2f77b
] [formerlyd0752de66c
] [formerly52f48669f6
[formerlyd66ad2f77b
] [formerlyd0752de66c
] [formerlya46e33f06e
[formerlyd0752de66c
[formerly 75e7c2a9423a7caa7f97143fa871be6d0ffe34bb]]]] Former-commit-id:a46e33f06e
Former-commit-id:5027d2365b
[formerlybbe92e6824
] [formerly 133f9034fb8163fb8efb8d8bbd27d7ed610a6e0d [formerly30d38334cc
]] Former-commit-id: 0cd3f4b5889bda9de32b546358edf3d8210d3ad8 [formerly0c128dd8f0
] Former-commit-id:dc55ef579a
This commit is contained in:
parent
f4db8db3c6
commit
b43935a991
346 changed files with 11816 additions and 6681 deletions
|
@ -60,9 +60,9 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" >
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153,94,19,20"
|
||||
|
@ -80,142 +80,6 @@
|
|||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="94" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="19" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="20" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
|
@ -230,9 +94,9 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" mode="SRM8"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true" >
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="154,99"
|
||||
|
@ -250,74 +114,6 @@
|
|||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" mode="SRM8"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="154" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" mode="SRM8"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="99" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
|
@ -352,9 +148,9 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="159,158"
|
||||
|
@ -372,74 +168,6 @@
|
|||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="159" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="158" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
|
@ -454,9 +182,9 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="154,99,27,25"
|
||||
|
@ -474,142 +202,6 @@
|
|||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="154" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="99" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="27" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="25" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
|
||||
|
@ -639,8 +231,7 @@
|
|||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="163,162" constraintType="IN" />
|
||||
|
@ -655,58 +246,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="163" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="162" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
|
@ -718,8 +257,7 @@
|
|||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165,164" constraintType="IN" />
|
||||
|
@ -734,58 +272,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="164" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
|
@ -812,8 +298,7 @@
|
|||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="161,160" constraintType="IN" />
|
||||
|
@ -828,58 +313,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="161" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="160" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
|
@ -891,8 +324,7 @@
|
|||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="155,28,29,30" constraintType="IN" />
|
||||
|
@ -907,110 +339,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="155" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="28" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="29" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="30" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
|
|
|
@ -6,10 +6,17 @@
|
|||
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. -->
|
||||
<!-- loads four panel HCA analysis, looks like this +++++++++++++++++++++++
|
||||
+ Z HC + Z HC + + ML + ML + +++++++++++++++++++++++ + Z HC + Z HC + + ML
|
||||
+ ML + +++++++++++++++++++++++ substitution keys: product the productCode
|
||||
to load elev a range of elevations to load seperated by two dashes. -->
|
||||
<!-- loads four panel HCA analysis, looks like this
|
||||
+++++++++++++++++++++++
|
||||
+ Z HC + Z HC +
|
||||
+ ML + ML +
|
||||
+++++++++++++++++++++++
|
||||
+ Z HC + Z HC +
|
||||
+ ML + ML +
|
||||
+++++++++++++++++++++++
|
||||
substitution keys:
|
||||
product the productCode to load
|
||||
elev a range of elevations to load seperated by two dashes. -->
|
||||
<bundle>
|
||||
<displayList>
|
||||
<displays xsi:type="d2DMapRenderableDisplay"
|
||||
|
@ -62,9 +69,9 @@
|
|||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153,94,19,20"
|
||||
|
@ -82,149 +89,13 @@
|
|||
constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation1}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation1}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="94" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation1}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="19" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation1}"
|
||||
constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="20" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
|
||||
<resource>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165,164"
|
||||
|
@ -242,74 +113,6 @@
|
|||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation1}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation1}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="164" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
|
@ -362,8 +165,7 @@
|
|||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153,94,19,20" constraintType="IN" />
|
||||
|
@ -378,116 +180,11 @@
|
|||
<constraint constraintValue="${elevation2}" constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation2}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation2}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="94" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation2}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="19" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation2}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="20" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
|
||||
<resource>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165,164" constraintType="IN" />
|
||||
|
@ -502,58 +199,6 @@
|
|||
<constraint constraintValue="${elevation2}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation2}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation2}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="164" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
|
@ -605,8 +250,7 @@
|
|||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153,94,19,20" constraintType="IN" />
|
||||
|
@ -621,116 +265,11 @@
|
|||
<constraint constraintValue="${elevation3}" constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation3}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation3}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="94" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation3}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="19" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation3}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="20" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
|
||||
<resource>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">>
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165,164" constraintType="IN" />
|
||||
|
@ -745,58 +284,6 @@
|
|||
<constraint constraintValue="${elevation3}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation3}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation3}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="164" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
|
@ -848,8 +335,7 @@
|
|||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153,94,19,20" constraintType="IN" />
|
||||
|
@ -864,116 +350,11 @@
|
|||
<constraint constraintValue="${elevation4}" constraintType="IN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation4}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation4}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="94" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation4}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="19" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation4}" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="20" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
|
||||
<resource>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165,164" constraintType="IN" />
|
||||
|
@ -988,58 +369,6 @@
|
|||
<constraint constraintValue="${elevation4}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation4}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation4}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="164" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
|
|
|
@ -48,9 +48,8 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153,94,19,20"
|
||||
|
@ -66,134 +65,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="153" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="94" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="19" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="20" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
|
@ -214,9 +85,8 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="159,158"
|
||||
|
@ -232,70 +102,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="159" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="158" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
|
@ -321,8 +127,7 @@
|
|||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="163,162" constraintType="IN" />
|
||||
|
@ -337,58 +142,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="163" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="162" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
|
@ -400,8 +153,7 @@
|
|||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData" productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165,164" constraintType="IN" />
|
||||
|
@ -416,58 +168,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="165" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability" interpolationState="false" brightness="1.0" contrast="1.0" alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="164" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
|
@ -512,9 +212,8 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="161,160"
|
||||
|
@ -530,70 +229,6 @@
|
|||
<constraint constraintValue="${elevation}" constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="161" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="primaryElevationAngle">
|
||||
<constraint constraintValue="${elevation}"
|
||||
constraintType="BETWEEN" />
|
||||
</mapping>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="160" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}"
|
||||
constraintType="EQUALS" />
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</descriptor>
|
||||
|
|
|
@ -191,9 +191,9 @@
|
|||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="bestResResourceData"
|
||||
productIdentifierKey="productCode" retrieveData="false">
|
||||
<enabler xsi:type="radarSpatialEnabler" />
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="171,172"
|
||||
|
@ -206,62 +206,6 @@
|
|||
<constraint constraintValue="radar" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="172" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="true">
|
||||
<capabilities>
|
||||
<capability xsi:type="imagingCapability"
|
||||
interpolationState="false" brightness="1.0" contrast="1.0"
|
||||
alpha="1.0" />
|
||||
<capability xsi:type="rangeRingsOverlayCapability" />
|
||||
</capabilities>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false"
|
||||
isMapLayer="false" isHoverOn="false" isVisible="true">
|
||||
</properties>
|
||||
<resourceData xsi:type="radarResourceData"
|
||||
isUpdatingOnMetadataOnly="false"
|
||||
isRequeryNecessaryOnTimeMatch="true">
|
||||
<metadataMap>
|
||||
<mapping key="productCode">
|
||||
<constraint constraintValue="171" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="icao">
|
||||
<constraint constraintValue="${icao}" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
<mapping key="pluginName">
|
||||
<constraint constraintValue="radar" constraintType="EQUALS"/>
|
||||
</mapping>
|
||||
</metadataMap>
|
||||
</resourceData>
|
||||
</resource>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.core;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.apache.commons.beanutils.ConstructorUtils;
|
||||
|
||||
|
@ -56,7 +58,7 @@ public class RecordFactory {
|
|||
private static RecordFactory instance = new RecordFactory();
|
||||
|
||||
/** Map containing the pluginName/Record class pairs */
|
||||
private Map<String, Class<PluginDataObject>> defMap;
|
||||
private Map<String, Class<PluginDataObject>> defMap = new HashMap<String, Class<PluginDataObject>>();
|
||||
|
||||
public static final String WILDCARD = "%";
|
||||
|
||||
|
@ -82,36 +84,39 @@ public class RecordFactory {
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private synchronized void loadDefMap() throws VizException {
|
||||
if (defMap == null) {
|
||||
GetPluginRecordMapRequest req = new GetPluginRecordMapRequest();
|
||||
Map<String, String> pluginRecordMap = (Map<String, String>) ThriftClient
|
||||
.sendRequest(req);
|
||||
Map<String, Class<PluginDataObject>> newDefMap = new HashMap<String, Class<PluginDataObject>>(
|
||||
pluginRecordMap.size());
|
||||
for (Map.Entry<String, String> entry : pluginRecordMap.entrySet()) {
|
||||
String pluginName = entry.getKey();
|
||||
String record = entry.getValue();
|
||||
if (record != null) {
|
||||
try {
|
||||
Class<PluginDataObject> clazz = (Class<PluginDataObject>) Class
|
||||
.forName(record);
|
||||
newDefMap.put(pluginName, clazz);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"Can't find record class for " + pluginName
|
||||
+ " plugin", e);
|
||||
System.out
|
||||
.println("DEBUG: Can't find record class for "
|
||||
+ pluginName + " plugin - alerts on "
|
||||
+ pluginName + " data will be ignored");
|
||||
}
|
||||
private void loadDefMap() throws VizException {
|
||||
GetPluginRecordMapRequest req = new GetPluginRecordMapRequest();
|
||||
Map<String, String> pluginRecordMap = (Map<String, String>) ThriftClient
|
||||
.sendRequest(req);
|
||||
for (Map.Entry<String, String> entry : pluginRecordMap.entrySet()) {
|
||||
String pluginName = entry.getKey();
|
||||
String record = entry.getValue();
|
||||
if (record != null) {
|
||||
try {
|
||||
Class<PluginDataObject> clazz = (Class<PluginDataObject>) Class
|
||||
.forName(record);
|
||||
defMap.put(pluginName, clazz);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"Can't find record class for " + pluginName
|
||||
+ " plugin", e);
|
||||
System.out.println("DEBUG: Can't find record class for "
|
||||
+ pluginName + " plugin - alerts on " + pluginName
|
||||
+ " data will be ignored");
|
||||
}
|
||||
}
|
||||
defMap = newDefMap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a collection of all supported plugins
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Collection<String> getSupportedPlugins() {
|
||||
return new TreeSet<String>(defMap.keySet());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a map of the fields and values that compose a given dataURI
|
||||
*
|
||||
|
@ -123,7 +128,6 @@ public class RecordFactory {
|
|||
*/
|
||||
public Map<String, Object> loadMapFromUri(String dataURI)
|
||||
throws VizException {
|
||||
|
||||
// If no dataURI return
|
||||
if (dataURI == null) {
|
||||
return null;
|
||||
|
@ -181,10 +185,10 @@ public class RecordFactory {
|
|||
*/
|
||||
public Class<PluginDataObject> getPluginClass(String pluginName)
|
||||
throws VizException {
|
||||
if (defMap == null) {
|
||||
loadDefMap();
|
||||
Class<PluginDataObject> retVal = null;
|
||||
if (defMap != null) {
|
||||
retVal = defMap.get(pluginName);
|
||||
}
|
||||
Class<PluginDataObject> retVal = defMap.get(pluginName);
|
||||
if (retVal == null) {
|
||||
throw new NoPluginException("Can't find record class for "
|
||||
+ pluginName + " plugin");
|
||||
|
|
|
@ -578,6 +578,8 @@ public abstract class AbstractDescriptor extends ResourceGroup implements
|
|||
}
|
||||
}
|
||||
synchronized (timeManager) {
|
||||
DataTime[] oldTimes = timeManager.frames;
|
||||
int oldIdx = this.frameIndex;
|
||||
if (info.setFrames) {
|
||||
if (info.frameTimes != null) {
|
||||
DataTime[] newTimes = Arrays.copyOf(info.frameTimes,
|
||||
|
@ -594,6 +596,14 @@ public abstract class AbstractDescriptor extends ResourceGroup implements
|
|||
timeMatchingMap = new ConcurrentHashMap<AbstractVizResource<?, ?>, DataTime[]>(
|
||||
info.timeMap);
|
||||
}
|
||||
FramesInfo currInfo = getFramesInfo();
|
||||
FramesInfo oldInfo = new FramesInfo(oldTimes, oldIdx);
|
||||
DataTime oldTime = oldInfo.getCurrentFrame();
|
||||
DataTime currTime = currInfo.getCurrentFrame();
|
||||
if ((oldTime != null && oldTime.equals(currTime) == false)
|
||||
|| (currTime != null && currTime.equals(oldTime) == false)) {
|
||||
notifyFrameChanged(oldTime, currTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -624,20 +634,8 @@ public abstract class AbstractDescriptor extends ResourceGroup implements
|
|||
* @param frame
|
||||
*/
|
||||
private void setFrameInternal(int frame) {
|
||||
FramesInfo currInfo = getFramesInfo();
|
||||
int frameIndex = currInfo.frameIndex;
|
||||
if (frame != frameIndex) {
|
||||
DataTime[] times = currInfo.frameTimes;
|
||||
DataTime oldTime = null, newTime = null;
|
||||
// Get the old and new time
|
||||
if (times != null && frameIndex >= 0 && frameIndex < times.length) {
|
||||
oldTime = times[frameIndex];
|
||||
}
|
||||
if (times != null && frame >= 0 && frame < times.length) {
|
||||
newTime = times[frame];
|
||||
}
|
||||
this.frameIndex = frame;
|
||||
notifyFrameChanged(oldTime, newTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ public class CAVELocalizationAdapter implements ILocalizationAdapter {
|
|||
return true;
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new LocalizationOpFailedException(
|
||||
"Error saving file, does not exist");
|
||||
"Error saving, file does not exist");
|
||||
} finally {
|
||||
// Make sure to close input stream
|
||||
if (in != null) {
|
||||
|
|
|
@ -777,7 +777,7 @@ public class LocalizationManager implements IPropertyChangeListener {
|
|||
}
|
||||
} catch (VizException e) {
|
||||
throw new LocalizationOpFailedException(
|
||||
"Error storing file contents to server: "
|
||||
"Error uploading file contents to localization server: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
|
|
|
@ -275,6 +275,20 @@ public abstract class AbstractRequestableResourceData extends
|
|||
Validate.isTrue(updateData instanceof Object[],
|
||||
"Update expected Object[]");
|
||||
|
||||
if (updateData instanceof PluginDataObject[]) {
|
||||
for (PluginDataObject pdo : (PluginDataObject[]) updateData) {
|
||||
DataTime time = pdo.getDataTime();
|
||||
if (binOffset != null) {
|
||||
time = binOffset.getNormalizedTime(time);
|
||||
}
|
||||
synchronized (cachedAvailableTimes) {
|
||||
if (!cachedAvailableTimes.contains(time)) {
|
||||
cachedAvailableTimes.add(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.fireChangeListeners(ChangeType.DATA_UPDATE, updateData);
|
||||
}
|
||||
|
||||
|
@ -669,7 +683,6 @@ public abstract class AbstractRequestableResourceData extends
|
|||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((binOffset == null) ? 0 : binOffset.hashCode());
|
||||
result = prime * result + (isUpdatingOnMetadataOnly ? 1231 : 1237);
|
||||
result = prime * result
|
||||
+ ((metadataMap == null) ? 0 : metadataMap.hashCode());
|
||||
result = prime * result
|
||||
|
@ -710,10 +723,6 @@ public abstract class AbstractRequestableResourceData extends
|
|||
return false;
|
||||
}
|
||||
|
||||
if (isUpdatingOnMetadataOnly != other.isUpdatingOnMetadataOnly) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isObjectsEqual(metadataMap, other.metadataMap)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -828,19 +828,23 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
|
|||
*/
|
||||
public void changeTimeMatchBasis(AbstractVizResource<?, ?> resource) {
|
||||
if (timeMatchBasis != resource) {
|
||||
TimeMatchingConfiguration config = getConfiguration(resource
|
||||
.getLoadProperties());
|
||||
TimeCache timeCache = getTimeCache(resource);
|
||||
if (timeMatchBasis != null) {
|
||||
TimeMatchingConfiguration config = getConfiguration(timeMatchBasis
|
||||
.getLoadProperties());
|
||||
config.setTimeMatchBasis(false);
|
||||
TimeCache timeCache = getTimeCache(timeMatchBasis);
|
||||
timeCache.setTimes(null, null);
|
||||
timeMatchBasis
|
||||
.unregisterListener(timeMatchBasisDisposeListener);
|
||||
}
|
||||
|
||||
timeMatchBasis = resource;
|
||||
|
||||
if (timeMatchBasis != null) {
|
||||
TimeMatchingConfiguration config = getConfiguration(timeMatchBasis
|
||||
.getLoadProperties());
|
||||
config.setTimeMatchBasis(true);
|
||||
TimeCache timeCache = getTimeCache(timeMatchBasis);
|
||||
timeCache.setTimes(null, null);
|
||||
timeMatchBasis.registerListener(timeMatchBasisDisposeListener);
|
||||
}
|
||||
|
|
|
@ -47,8 +47,6 @@ import com.raytheon.viz.ui.HistoryList;
|
|||
import com.raytheon.viz.ui.HistoryList.IHistoryListener;
|
||||
import com.raytheon.viz.ui.UiPlugin;
|
||||
import com.raytheon.viz.ui.UiUtil;
|
||||
import com.raytheon.viz.ui.actions.LoadSerializedXml;
|
||||
import com.raytheon.viz.ui.actions.SaveBundle;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
|
@ -331,28 +329,22 @@ public class HistoryListDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
private void loadAlterBundle(Bundle b) {
|
||||
try {
|
||||
String editorName = null;
|
||||
String editorName = null;
|
||||
|
||||
if (b.getDisplays().length > 0) {
|
||||
editorName = DescriptorMap.getEditorId(b.getDisplays()[0]
|
||||
.getDescriptor().getClass().getName());
|
||||
}
|
||||
|
||||
AbstractEditor editor = UiUtil.createOrOpenEditor(editorName,
|
||||
b.getDisplays());
|
||||
|
||||
for (IDisplayPane pane : editor.getDisplayPanes()) {
|
||||
pane.getRenderableDisplay().getDescriptor().getResourceList()
|
||||
.clear();
|
||||
}
|
||||
|
||||
LoadSerializedXml.loadTo(editor, b);
|
||||
HistoryList.getInstance().addBundle(b);
|
||||
} catch (VizException e) {
|
||||
final String err = "Error loading bundle";
|
||||
statusHandler.handle(Priority.PROBLEM, err, e);
|
||||
if (b.getDisplays().length > 0) {
|
||||
editorName = DescriptorMap.getEditorId(b.getDisplays()[0]
|
||||
.getDescriptor().getClass().getName());
|
||||
}
|
||||
|
||||
AbstractEditor editor = UiUtil.createOrOpenEditor(editorName,
|
||||
b.getDisplays());
|
||||
|
||||
for (IDisplayPane pane : editor.getDisplayPanes()) {
|
||||
pane.getRenderableDisplay().getDescriptor().getResourceList()
|
||||
.clear();
|
||||
}
|
||||
|
||||
ProcedureLoadJob.getInstance().enqueue(b, editor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -378,10 +370,7 @@ public class HistoryListDlg extends CaveSWTDialog {
|
|||
return;
|
||||
}
|
||||
|
||||
LoadSerializedXml.loadTo(editor, b);
|
||||
Bundle currBundle = SaveBundle.extractCurrentBundle();
|
||||
|
||||
HistoryList.getInstance().refreshLatestBundle(currBundle);
|
||||
ProcedureLoadJob.getInstance().enqueue(b, editor);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.SIGNIFICANT, "Error loading bundle",
|
||||
e);
|
||||
|
|
|
@ -28,12 +28,8 @@ import org.eclipse.core.runtime.IStatus;
|
|||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
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.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.procedures.Bundle;
|
||||
import com.raytheon.viz.ui.actions.LoadSerializedXml;
|
||||
import com.raytheon.viz.ui.BundleLoader;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
|
||||
/**
|
||||
|
@ -54,8 +50,6 @@ import com.raytheon.viz.ui.editor.AbstractEditor;
|
|||
*/
|
||||
|
||||
public class ProcedureLoadJob {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ProcedureLoadJob.class);
|
||||
|
||||
private static final ProcedureLoadJob instance = new ProcedureLoadJob();
|
||||
|
||||
|
@ -79,12 +73,7 @@ public class ProcedureLoadJob {
|
|||
AbstractEditor editor = entry.getKey();
|
||||
Bundle b = entry.getValue();
|
||||
|
||||
try {
|
||||
LoadSerializedXml.loadTo(editor, b);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error loading bundle", e);
|
||||
}
|
||||
new BundleLoader(editor, b).run();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,10 +63,10 @@ import com.raytheon.uf.viz.d2d.core.legend.D2DLegendResource.LegendMode;
|
|||
import com.raytheon.uf.viz.d2d.core.map.MapScales;
|
||||
import com.raytheon.uf.viz.d2d.core.map.MapScales.MapScale;
|
||||
import com.raytheon.uf.viz.d2d.core.map.MapScales.PartId;
|
||||
import com.raytheon.viz.ui.BundleLoader;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.HistoryList;
|
||||
import com.raytheon.viz.ui.UiUtil;
|
||||
import com.raytheon.viz.ui.actions.LoadSerializedXml;
|
||||
import com.raytheon.viz.ui.color.BackgroundColor;
|
||||
import com.raytheon.viz.ui.color.IBackgroundColorChangedListener;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
|
@ -207,12 +207,7 @@ public class SideView extends ViewPart implements IMultiPaneEditor,
|
|||
}
|
||||
|
||||
if (bundleToLoad != null) {
|
||||
try {
|
||||
LoadSerializedXml.loadTo(this, bundleToLoad);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error loading bundle view", e);
|
||||
}
|
||||
new BundleLoader(this, bundleToLoad).run();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -604,12 +599,12 @@ public class SideView extends ViewPart implements IMultiPaneEditor,
|
|||
if (editableResource != null) {
|
||||
EditableManager.makeEditable(editableResource, false);
|
||||
}
|
||||
|
||||
this.editableResource = editableResource;
|
||||
|
||||
this.editableResource = editableResource;
|
||||
if (this.editableResource != null) {
|
||||
EditableManager.makeEditable(this.editableResource, true);
|
||||
}
|
||||
|
||||
|
||||
theEditor.getBackgroundColor().setColor(BGColorMode.EDITOR,
|
||||
myRenderables[0].getBackgroundColor());
|
||||
|
||||
|
|
|
@ -99,6 +99,13 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.datadelivery.service"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.stats"
|
||||
download-size="0"
|
||||
|
|
|
@ -29,7 +29,9 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.gridcoverage;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.bandwidth;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.0.0"
|
||||
com.raytheon.uf.common.datadelivery.retrieval;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.service;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.units;bundle-version="1.0.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.viz.datadelivery;uses:="org.eclipse.ui.plugin,org.osgi.framework",
|
||||
|
|
|
@ -8,11 +8,14 @@
|
|||
class="com.raytheon.uf.common.datadelivery.bandwidth.BandwidthService" />
|
||||
|
||||
<bean id="subscriptionNotificationService"
|
||||
class="com.raytheon.uf.viz.datadelivery.subscription.SendToServerSubscriptionNotificationService" />
|
||||
class="com.raytheon.uf.common.datadelivery.service.SendToServerSubscriptionNotificationService" />
|
||||
|
||||
<bean id="permissionsService"
|
||||
class="com.raytheon.uf.viz.datadelivery.subscription.RequestFromServerPermissionsService" />
|
||||
|
||||
<bean id="groupDefinitionService"
|
||||
class="com.raytheon.uf.common.datadelivery.service.GroupDefinitionService" />
|
||||
|
||||
<bean id="subscriptionService"
|
||||
class="com.raytheon.uf.viz.datadelivery.subscription.SubscriptionService"
|
||||
factory-method="newInstance">
|
||||
|
@ -28,6 +31,7 @@
|
|||
<property name="subscriptionNotificationService" ref="subscriptionNotificationService" />
|
||||
<property name="bandwidthService" ref="bandwidthService" />
|
||||
<property name="permissionsService" ref="permissionsService" />
|
||||
<property name="groupDefinitionService" ref="groupDefinitionService" />
|
||||
</bean>
|
||||
|
||||
<bean id="systemRuleManager"
|
||||
|
|
|
@ -61,7 +61,7 @@ import org.eclipse.swt.widgets.MenuItem;
|
|||
import org.eclipse.swt.widgets.Slider;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.SubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.service.SubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
@ -91,6 +91,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
|||
* Nov 6, 2012 1269 lvenable Initial creation.
|
||||
* Dec 13, 2012 1269 lvenable Fixes and updates.
|
||||
* Jan 07, 2013 1451 djohnson Use TimeUtil.newGmtCalendar().
|
||||
* Jan 28, 2013 1529 djohnson Disable menu items if no subscriptions selected.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -886,6 +887,7 @@ public class BandwidthCanvasComp extends Composite implements IDialogClosed,
|
|||
|
||||
MenuItem viewSubs = new MenuItem(m, SWT.NONE);
|
||||
viewSubs.setText("View Selected Subscriptions...");
|
||||
viewSubs.setEnabled(imageMgr.hasSubscriptionNameChecked());
|
||||
viewSubs.addListener(SWT.Selection, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.uf.viz.datadelivery.bandwidth.ui;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -30,7 +31,7 @@ import org.eclipse.swt.graphics.Rectangle;
|
|||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
|
||||
/**
|
||||
* Bandwidth utilization graph image manager.
|
||||
|
@ -42,7 +43,9 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionP
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 28, 2012 1269 lvenable Initial creation
|
||||
* Dec 13, 2012 1269 lvenable Fixes and updates.
|
||||
* Dec 13, 2012 1269 lvenable Fixes and updates.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum on subscriptions.
|
||||
* Jan 28, 2013 1529 djohnson Add hasSubscriptionNameChecked().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -137,10 +140,11 @@ public class BandwidthImageMgr implements IGraphOptions {
|
|||
private void init(Composite parentComp, BandwidthGraphData graphData,
|
||||
Map<CanvasImages, CanvasSettings> canvasSettingsMap) {
|
||||
|
||||
priorityColorMap = new HashMap<SubscriptionPriority, RGB>();
|
||||
for (SubscriptionPriority priority : SubscriptionPriority.values()) {
|
||||
priorityColorMap.put(priority, priority.getColor());
|
||||
}
|
||||
priorityColorMap = new EnumMap<SubscriptionPriority, RGB>(
|
||||
SubscriptionPriority.class);
|
||||
priorityColorMap.put(SubscriptionPriority.LOW, new RGB(6, 122, 255));
|
||||
priorityColorMap.put(SubscriptionPriority.NORMAL, new RGB(0, 255, 0));
|
||||
priorityColorMap.put(SubscriptionPriority.HIGH, new RGB(255, 0, 0));
|
||||
|
||||
canvasImgMap = new HashMap<BandwidthImageMgr.CanvasImages, AbstractCanvasImage>();
|
||||
populateCanvasMap(parentComp, graphData, canvasSettingsMap);
|
||||
|
@ -488,4 +492,13 @@ public class BandwidthImageMgr implements IGraphOptions {
|
|||
regenerateImage(CanvasImages.X_HEADER);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether there is a checked subscription name.
|
||||
*
|
||||
* @return true if at least one subscription name is checked
|
||||
*/
|
||||
public boolean hasSubscriptionNameChecked() {
|
||||
return checkMap.containsValue(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,9 +34,9 @@ import org.eclipse.swt.widgets.Composite;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.TimeWindowData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.datadelivery.bandwidth.ui.BandwidthImageMgr.SortBy;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionPriority;
|
||||
|
||||
/**
|
||||
* The graph image class.
|
||||
|
@ -51,6 +51,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionP
|
|||
* Dec 13, 2012 1269 lvenable Fixes and updates.
|
||||
* Jan 07, 2013 1451 djohnson Use TimeUtil.newGmtCalendar().
|
||||
* Jan 04, 2013 1420 mpduff Change default priority to normal priority.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum, remove incorrect use of ordinal values.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -171,20 +172,17 @@ public class GraphImage extends AbstractCanvasImage {
|
|||
|
||||
for (String subName : subscriptionList) {
|
||||
if (imageMgr.isColorByPriority()) {
|
||||
if (graphData.getPriority(subName) == SubscriptionPriority.NORMAL
|
||||
.ordinal()) {
|
||||
if (graphData.getPriority(subName) == SubscriptionPriority.NORMAL) {
|
||||
c = new Color(
|
||||
display,
|
||||
imageMgr.getPriorityColor(SubscriptionPriority.NORMAL));
|
||||
gc.setBackground(c);
|
||||
} else if (graphData.getPriority(subName) == SubscriptionPriority.HIGH
|
||||
.ordinal()) {
|
||||
} else if (graphData.getPriority(subName) == SubscriptionPriority.HIGH) {
|
||||
c = new Color(
|
||||
display,
|
||||
imageMgr.getPriorityColor(SubscriptionPriority.HIGH));
|
||||
gc.setBackground(c);
|
||||
} else if (graphData.getPriority(subName) == SubscriptionPriority.LOW
|
||||
.ordinal()) {
|
||||
} else if (graphData.getPriority(subName) == SubscriptionPriority.LOW) {
|
||||
c = new Color(display,
|
||||
imageMgr.getPriorityColor(SubscriptionPriority.LOW));
|
||||
gc.setBackground(c);
|
||||
|
|
|
@ -21,7 +21,7 @@ package com.raytheon.uf.viz.datadelivery.bandwidth.ui;
|
|||
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.ColorDialog;
|
|||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
|
||||
/**
|
||||
* Header image for X axis.
|
||||
|
@ -45,6 +45,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionP
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 28, 2012 1269 lvenable Initial creation.
|
||||
* Dec 13, 2012 1269 lvenable Fixes and updates.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -75,7 +76,7 @@ public class XHeaderImage extends AbstractCanvasImage {
|
|||
private final String sortBy = "Sort by: ";
|
||||
|
||||
/** Map of rectangles and subscription priorities. */
|
||||
private Map<Rectangle, SubscriptionPriority> rectPriMap;
|
||||
private final Map<Rectangle, SubscriptionPriority> rectPriMap;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
@ -113,6 +113,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Dec 10, 2012 1259 bsteffen Switch Data Delivery from LatLon to referenced envelopes.
|
||||
* Dec 12, 2012 1391 bgonzale Added job for dataset retrieval.
|
||||
* Jan 08, 2012 1436 bgonzale Fixed area text box display update check.
|
||||
* Jan 14, 2012 1437 bgonzale Clear filters when creating a new configuration.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -860,6 +861,7 @@ public class DataBrowserDlg extends CaveSWTDialog implements IDataTableUpdate,
|
|||
return;
|
||||
}
|
||||
|
||||
xml = new FilterSettingsXML();
|
||||
setText(WINDOW_TITLE);
|
||||
|
||||
// Clear the area.
|
||||
|
@ -871,6 +873,8 @@ public class DataBrowserDlg extends CaveSWTDialog implements IDataTableUpdate,
|
|||
dataTypesDualList.clearSelection();
|
||||
|
||||
// Clear the filters.
|
||||
updateFilters();
|
||||
|
||||
filterExpandBar.updateFilters(dataTypesDualList.getSelectedListItems(),
|
||||
envelope);
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
package com.raytheon.uf.viz.datadelivery.common.ui;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Combo;
|
||||
|
@ -28,7 +30,7 @@ import org.eclipse.swt.widgets.Group;
|
|||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
|
||||
/**
|
||||
* This is the priority group information composite. This class is intended to
|
||||
|
@ -43,6 +45,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionP
|
|||
* Jun 27, 2012 702 jpiatt Initial creation.
|
||||
* Aug 21, 2012 712 mpduff Default to Default, and allow for setting the combo box.
|
||||
* Jan 04, 2013 1420 mpduff Add latency.
|
||||
* Jan 25, 2013 1528 djohnson Use priority enum instead of raw integers.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -60,7 +63,7 @@ public class PriorityComp extends Composite {
|
|||
private final int latency;
|
||||
|
||||
/** The priority value */
|
||||
private final int priority;
|
||||
private SubscriptionPriority priority;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -70,10 +73,11 @@ public class PriorityComp extends Composite {
|
|||
* @param latency
|
||||
* @param priority
|
||||
*/
|
||||
public PriorityComp(Composite parent, int latency, int priority) {
|
||||
public PriorityComp(Composite parent, int latency,
|
||||
SubscriptionPriority priority) {
|
||||
super(parent, SWT.NONE);
|
||||
this.latency = latency;
|
||||
this.priority = priority - 1;
|
||||
this.priority = priority;
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -127,9 +131,16 @@ public class PriorityComp extends Composite {
|
|||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
priorityCombo = new Combo(priorityComp, SWT.READ_ONLY);
|
||||
priorityCombo.setItems(priorities);
|
||||
priorityCombo.select(this.priority);
|
||||
priorityCombo.setLayoutData(gd);
|
||||
priorityCombo.setToolTipText("Select a priority");
|
||||
priorityCombo.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
priority = SubscriptionPriority.fromPriorityName(priorityCombo
|
||||
.getItem(priorityCombo.getSelectionIndex()));
|
||||
}
|
||||
});
|
||||
setPriority(priority);
|
||||
|
||||
Composite latencyComp = new Composite(subPriorityGroup, SWT.NONE);
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
|
@ -153,8 +164,8 @@ public class PriorityComp extends Composite {
|
|||
*
|
||||
* @return priority
|
||||
*/
|
||||
public int getPriorityIndex() {
|
||||
return priorityCombo.getSelectionIndex();
|
||||
public SubscriptionPriority getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -162,10 +173,9 @@ public class PriorityComp extends Composite {
|
|||
*
|
||||
* @param index
|
||||
*/
|
||||
public void setPriorityIndex(int index) {
|
||||
if (index <= priorityCombo.getItemCount()) {
|
||||
priorityCombo.select(index);
|
||||
}
|
||||
public void setPriority(SubscriptionPriority priority) {
|
||||
priorityCombo.select(priorityCombo.indexOf(priority.getPriorityName()));
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -413,6 +413,7 @@ public class UserSelectComp extends Composite implements IUpdate, IDisplay,
|
|||
u.setEnvelope(groupDefinition.getEnvelope());
|
||||
u.setNumFcstHours(subscription.getTime()
|
||||
.getSelectedTimeIndices().size());
|
||||
u.setNumEnsembleMembers(subscription.getEnsemble());
|
||||
u.determineNumberRequestedGrids(subscription.getParameter());
|
||||
|
||||
Coverage cov = new GriddedCoverage();
|
||||
|
|
|
@ -95,6 +95,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Oct 22, 2012 1284 mpduff Code Cleanup.
|
||||
* Dec 03, 2012 1285 bgonzale Added implementation of the tableLock method.
|
||||
* Update title bar text when paused.
|
||||
* Jan 22, 2013 1520 mpduff Change delete menus to hide.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -272,7 +273,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem setDefaultMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(setDefaultMI);
|
||||
setDefaultMI.setText("&Set as Default");
|
||||
setDefaultMI.setText("Set as Default");
|
||||
setDefaultMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -282,7 +283,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem loadConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(loadConfigMI);
|
||||
loadConfigMI.setText("&Load Configuration...");
|
||||
loadConfigMI.setText("Load Configuration...");
|
||||
loadConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -298,7 +299,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem saveConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(saveConfigMI);
|
||||
saveConfigMI.setText("&Save Configuration");
|
||||
saveConfigMI.setText("Save Configuration");
|
||||
saveConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -308,7 +309,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem saveConfigAsMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(saveConfigAsMI);
|
||||
saveConfigAsMI.setText("&Save Configuration As...");
|
||||
saveConfigAsMI.setText("Save Configuration As...");
|
||||
saveConfigAsMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -318,7 +319,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem deleteConfigMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
lockableMenuItems.add(deleteConfigMI);
|
||||
deleteConfigMI.setText("&Delete Configuration...");
|
||||
deleteConfigMI.setText("Delete Configuration...");
|
||||
deleteConfigMI.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
|
@ -330,7 +331,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
new MenuItem(fileMenu, SWT.SEPARATOR);
|
||||
|
||||
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
exitMI.setText("&Exit");
|
||||
exitMI.setText("Exit");
|
||||
exitMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -348,7 +349,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
// Find Menu
|
||||
MenuItem findMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||
lockableMenuItems.add(findMI);
|
||||
findMI.setText("&Find...");
|
||||
findMI.setText("Find...");
|
||||
findMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -356,10 +357,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
}
|
||||
});
|
||||
|
||||
MenuItem delPriorityMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||
lockableMenuItems.add(delPriorityMI);
|
||||
delPriorityMI.setText("&Delete by Priority");
|
||||
delPriorityMI.addSelectionListener(new SelectionAdapter() {
|
||||
MenuItem hidePriorityMI = new MenuItem(editMenu, SWT.CASCADE);
|
||||
lockableMenuItems.add(hidePriorityMI);
|
||||
hidePriorityMI.setText("Hide by Priority");
|
||||
hidePriorityMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
||||
|
@ -367,14 +368,14 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
});
|
||||
|
||||
Menu subMenu = new Menu(menuBar);
|
||||
delPriorityMI.setMenu(subMenu);
|
||||
hidePriorityMI.setMenu(subMenu);
|
||||
|
||||
createPriorityMenus(subMenu);
|
||||
|
||||
MenuItem deleteOlderMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(deleteOlderMI);
|
||||
deleteOlderMI.setText("&Delete Older Than Selected");
|
||||
deleteOlderMI.addSelectionListener(new SelectionAdapter() {
|
||||
MenuItem hideOlderMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(hideOlderMI);
|
||||
hideOlderMI.setText("Hide Older Than Selected");
|
||||
hideOlderMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
tableComp.handleDeleteOlderThan();
|
||||
|
@ -382,10 +383,10 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
});
|
||||
|
||||
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(deleteMI);
|
||||
deleteMI.setText("&Delete Notification(s)");
|
||||
deleteMI.addSelectionListener(new SelectionAdapter() {
|
||||
MenuItem hideMI = new MenuItem(editMenu, SWT.NONE);
|
||||
lockableMenuItems.add(hideMI);
|
||||
hideMI.setText("Hide Notification(s)");
|
||||
hideMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
tableComp.handleDeleteNotification();
|
||||
|
@ -401,7 +402,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||
lockableMenuItems.add(configureMI);
|
||||
configureMI.setText("&Configure Table...");
|
||||
configureMI.setText("Configure Table...");
|
||||
configureMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -411,7 +412,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
|
||||
MenuItem filterMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||
lockableMenuItems.add(filterMI);
|
||||
filterMI.setText("&Filter Table...");
|
||||
filterMI.setText("Filter Table...");
|
||||
filterMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -420,7 +421,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
});
|
||||
|
||||
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
||||
tooltipMI.setText("&Tooltips");
|
||||
tooltipMI.setText("Tooltips");
|
||||
tooltipMI.setSelection(false);
|
||||
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
@ -438,7 +439,7 @@ public class NotificationDlg extends CaveSWTDialog implements ITableChange,
|
|||
helpMenuItem.setMenu(helpMenu);
|
||||
|
||||
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
||||
helpNotTableMI.setText("&About Notification Center...");
|
||||
helpNotTableMI.setText("About Notification Center...");
|
||||
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
|
|
@ -75,7 +75,7 @@ import com.raytheon.uf.viz.datadelivery.utils.NotificationHandler;
|
|||
* Sep 06, 2012 687 mpduff Call the table selection method of the ITableChanged interface.
|
||||
* Oct 22, 2012 1284 mpduff Fix the start/end index for pagination of new records, code cleanup.
|
||||
* Nov 29, 2012 1285 bgonzale Added a refresh pause button to the Notification Center Dialog.
|
||||
*
|
||||
* Jan 22, 2013 1520 mpduff Update javadoc.
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -197,12 +197,12 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* Note: For the super class we are passing in a false for the notification
|
||||
* flag. This is turned off because the notification dialog is using the
|
||||
* NotificationHandler and it contains the necessary code that needs to be
|
||||
* executed.
|
||||
*
|
||||
*
|
||||
* @param parent
|
||||
* @param tableConfig
|
||||
* @param callback
|
||||
|
@ -287,6 +287,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
+ " not refresh, re-sort, or allow user modification"
|
||||
+ " until unchecked.");
|
||||
pauseButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
boolean isLocked = pauseButton.getSelection();
|
||||
|
||||
|
@ -320,7 +321,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the entire table list.
|
||||
*
|
||||
*
|
||||
* @return TableDataManager obj
|
||||
*/
|
||||
public TableDataManager<NotificationRowData> getMasterTableList() {
|
||||
|
@ -329,7 +330,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table list with filters applied.
|
||||
*
|
||||
*
|
||||
* @return TableDataManager obj
|
||||
*/
|
||||
public TableDataManager<NotificationRowData> getFilteredTableList() {
|
||||
|
@ -338,7 +339,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table list for display.
|
||||
*
|
||||
*
|
||||
* @return TableDataManager obj
|
||||
*/
|
||||
public ArrayList<NotificationRowData> getVisibleTableList() {
|
||||
|
@ -347,7 +348,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the rows of data to display.
|
||||
*
|
||||
*
|
||||
* @return list of Notification Row Data objects
|
||||
*/
|
||||
private ArrayList<NotificationRowData> getTableRows() {
|
||||
|
@ -359,7 +360,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
// Recalculate start/end indices for visible page
|
||||
if (numRows > endIndex && endIndex - startIndex < pageConfig) {
|
||||
endIndex = startIndex + pageConfig - 1;//numRows -1;
|
||||
endIndex = startIndex + pageConfig - 1;// numRows -1;
|
||||
if (endIndex - startIndex > pageConfig - 1) {
|
||||
startIndex = ((pageConfig * selectedPage) - (pageConfig - 1)) - 1;
|
||||
}
|
||||
|
@ -390,7 +391,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Delete table rows.
|
||||
*
|
||||
*
|
||||
* @param deleteRecordIds
|
||||
*/
|
||||
public void deleteTableDataRows(ArrayList<Integer> deleteRecordIds) {
|
||||
|
@ -408,7 +409,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table obj.
|
||||
*
|
||||
*
|
||||
* @return the table obj.
|
||||
*/
|
||||
public Table getTable() {
|
||||
|
@ -432,7 +433,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
}
|
||||
|
||||
/**
|
||||
* Action taken when deleting a notification.
|
||||
* Action taken when deleting a notification from view.
|
||||
*/
|
||||
public void handleDeleteNotification() {
|
||||
|
||||
|
@ -472,7 +473,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Action taken when tool tip is selected.
|
||||
*
|
||||
*
|
||||
* @param showToolTips
|
||||
* true when tooltips are on
|
||||
*/
|
||||
|
@ -612,7 +613,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
}
|
||||
|
||||
/**
|
||||
* Action taken when deleted notifications by time.
|
||||
* Action taken when deleted notifications from view by time.
|
||||
*/
|
||||
public void handleDeleteOlderThan() {
|
||||
|
||||
|
@ -689,8 +690,8 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
}
|
||||
|
||||
/**
|
||||
* Action taken to delete notifications by priority.
|
||||
*
|
||||
* Action taken to delete notifications from view by priority.
|
||||
*
|
||||
* @param priority
|
||||
* priority indicator
|
||||
*/
|
||||
|
@ -726,7 +727,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the start index.
|
||||
*
|
||||
*
|
||||
* @return start index
|
||||
*/
|
||||
public int getStartIndex() {
|
||||
|
@ -735,7 +736,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the end index.
|
||||
*
|
||||
*
|
||||
* @return end index
|
||||
*/
|
||||
public int getEndIndex() {
|
||||
|
@ -744,7 +745,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the selected index.
|
||||
*
|
||||
*
|
||||
* @return selected index
|
||||
*/
|
||||
public int getSelectedIndex() {
|
||||
|
@ -753,7 +754,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the table cell text.
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* The column name
|
||||
* @param rd
|
||||
|
@ -782,7 +783,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Populate the NotificationRowData objects
|
||||
*
|
||||
*
|
||||
* @param notificationRecords
|
||||
* list of notification records
|
||||
*/
|
||||
|
@ -857,7 +858,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Pass filter information.
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* user name table data
|
||||
* @param priority
|
||||
|
@ -915,11 +916,11 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Pass filter information.
|
||||
*
|
||||
*
|
||||
* @param records
|
||||
* Notification record
|
||||
* @return boolean true if passes filter
|
||||
*
|
||||
*
|
||||
*/
|
||||
public boolean passesFilter(List<NotificationRecord> records) {
|
||||
for (NotificationRecord record : records) {
|
||||
|
@ -933,10 +934,10 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/**
|
||||
* Get the column data.
|
||||
*
|
||||
*
|
||||
* @param colName
|
||||
* The column name of interest
|
||||
*
|
||||
*
|
||||
* @return The populated ColumnXML object
|
||||
*/
|
||||
private ColumnXML getColumnData(String colName) {
|
||||
|
@ -1144,7 +1145,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.datadelivery.common.ui.TableComp#handleTableMouseClick
|
||||
* (org.eclipse.swt.events.MouseEvent)
|
||||
|
@ -1156,7 +1157,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.uf.viz.datadelivery.common.ui.TableComp#
|
||||
* handleTableSelectionChange(org.eclipse.swt.events.SelectionEvent)
|
||||
*/
|
||||
|
@ -1169,7 +1170,7 @@ public class NotificationTableComp extends TableComp implements ITableFind {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.uf.viz.core.notification.INotificationObserver#
|
||||
* notificationArrived
|
||||
* (com.raytheon.uf.viz.core.notification.NotificationMessage[])
|
||||
|
|
|
@ -20,8 +20,9 @@
|
|||
package com.raytheon.uf.viz.datadelivery.services;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthService;
|
||||
import com.raytheon.uf.common.datadelivery.service.IGroupDefinitionService;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.IPermissionsService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionService;
|
||||
|
||||
/**
|
||||
|
@ -55,6 +56,8 @@ public final class DataDeliveryServices {
|
|||
|
||||
private IPermissionsService permissionsService;
|
||||
|
||||
private IGroupDefinitionService groupDefinitionService;
|
||||
|
||||
/**
|
||||
* Disabled constructor.
|
||||
*/
|
||||
|
@ -147,4 +150,24 @@ public final class DataDeliveryServices {
|
|||
public void setPermissionsService(IPermissionsService permissionsService) {
|
||||
this.permissionsService = permissionsService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the group definition service.
|
||||
*
|
||||
* @return the groupDefinitionService
|
||||
*/
|
||||
public static IGroupDefinitionService getGroupDefinitionService() {
|
||||
return INSTANCE.groupDefinitionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the group definition service.
|
||||
*
|
||||
* @param groupDefinitionService
|
||||
* the groupDefinitionService to set
|
||||
*/
|
||||
public void setGroupDefinitionService(
|
||||
IGroupDefinitionService groupDefinitionService) {
|
||||
this.groupDefinitionService = groupDefinitionService;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.eclipse.swt.widgets.Shell;
|
|||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.datadelivery.registry.ebxml.DataSetQuery;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.ActivePeriodComp;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.DeliveryOptionsComp;
|
||||
|
@ -79,6 +80,7 @@ import com.raytheon.viz.ui.presenter.components.ComboBoxConf;
|
|||
* Dec 13, 2012 1391 bgonzale Added cancel/ok selection status.
|
||||
* Jan 02, 2013 1441 djohnson Add isGroupSelected().
|
||||
* Jan 04, 2013 1420 mpduff Add latency.
|
||||
* Jan 25, 2013 1528 djohnson Use priority enum instead of raw integers.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -195,7 +197,8 @@ public class CreateSubscriptionDlg extends CaveSWTDialog implements
|
|||
// Get latency value
|
||||
SystemRuleManager ruleManager = SystemRuleManager.getInstance();
|
||||
int latency = ruleManager.getLatency(this.subscription, cycleTimes);
|
||||
int priority = ruleManager.getPriority(this.subscription, cycleTimes);
|
||||
SubscriptionPriority priority = ruleManager.getPriority(
|
||||
this.subscription, cycleTimes);
|
||||
priorityComp = new PriorityComp(mainComp, latency, priority);
|
||||
|
||||
this.createCycleGroup();
|
||||
|
@ -517,16 +520,16 @@ public class CreateSubscriptionDlg extends CaveSWTDialog implements
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return priorityComp.getPriorityIndex();
|
||||
public SubscriptionPriority getPriority() {
|
||||
return priorityComp.getPriority();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void setPriority(int i) {
|
||||
priorityComp.setPriorityIndex(i);
|
||||
public void setPriority(SubscriptionPriority priority) {
|
||||
priorityComp.setPriority(priority);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -842,14 +845,6 @@ public class CreateSubscriptionDlg extends CaveSWTDialog implements
|
|||
this.subscription = subscription;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public int getPriorityValue() {
|
||||
return priorityComp.getPriorityIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
|
|
@ -29,12 +29,14 @@ import org.eclipse.swt.widgets.Composite;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.service.IGroupDefinitionService;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
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.datadelivery.common.ui.GroupSelectComp;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.IGroupAction;
|
||||
import com.raytheon.uf.viz.datadelivery.services.DataDeliveryServices;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
|
@ -47,7 +49,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 2, 2013 1441 djohnson Initial creation
|
||||
* Jan 2, 2013 1441 djohnson Initial creation
|
||||
* Jan 18, 2013 1441 djohnson Use group definition service.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,6 +71,9 @@ public class DeleteGroupDlg extends CaveSWTDialog {
|
|||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(DeleteGroupDlg.class);
|
||||
|
||||
private final IGroupDefinitionService groupService = DataDeliveryServices
|
||||
.getGroupDefinitionService();
|
||||
|
||||
/**
|
||||
* @param shell
|
||||
* @param groupAction
|
||||
|
@ -144,8 +150,11 @@ public class DeleteGroupDlg extends CaveSWTDialog {
|
|||
+ groupName + "?")) {
|
||||
|
||||
try {
|
||||
DataDeliveryHandlers.getGroupDefinitionHandler()
|
||||
.deleteByName(groupName);
|
||||
groupService
|
||||
.deleteGroupDefinition(
|
||||
DataDeliveryHandlers
|
||||
.getGroupDefinitionHandler()
|
||||
.getByName(groupName));
|
||||
groupAction.loadGroupNames();
|
||||
return true;
|
||||
} catch (RegistryHandlerException e) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.eclipse.swt.widgets.Shell;
|
|||
import com.raytheon.uf.common.datadelivery.registry.GroupDefinition;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
|
|
@ -19,12 +19,14 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.datadelivery.subscription;
|
||||
|
||||
import com.raytheon.uf.common.auth.resp.SuccessfulExecution;
|
||||
import com.raytheon.uf.common.auth.user.IUser;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryAuthRequest;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryPermission;
|
||||
import com.raytheon.uf.common.serialization.comm.RequestRouter;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
|
||||
/**
|
||||
* {@link IPermissionsService} implementation that requests permissions from the
|
||||
|
@ -37,6 +39,7 @@ import com.raytheon.uf.viz.core.requests.ThriftClient;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 04, 2013 1441 djohnson Initial creation
|
||||
* Jan 21, 2013 1441 djohnson Use RequestRouter.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -93,8 +96,13 @@ public class RequestFromServerPermissionsService implements IPermissionsService
|
|||
*/
|
||||
private DataDeliveryAuthRequest sendAuthorizationRequest(
|
||||
DataDeliveryAuthRequest request) throws VizException {
|
||||
return (DataDeliveryAuthRequest) ThriftClient
|
||||
.sendPrivilegedRequest(request);
|
||||
try {
|
||||
return (DataDeliveryAuthRequest) ((SuccessfulExecution) RequestRouter
|
||||
.route(request, DataDeliveryConstants.DATA_DELIVERY_SERVER))
|
||||
.getResponse();
|
||||
} catch (Exception e) {
|
||||
throw new VizException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,12 +53,12 @@ import com.raytheon.uf.common.auth.user.IUser;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryPermission;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryObjectHandlers;
|
||||
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.VizApp;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.datadelivery.actions.DataBrowserAction;
|
||||
|
@ -112,6 +112,9 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* Jan 02, 2013 1441 djohnson Add ability to delete groups.
|
||||
* Jan 03, 2013 1437 bgonzale Moved configuration file management code to SubscriptionManagerConfigDlg
|
||||
* and SubscriptionConfigurationManager.
|
||||
* Jan 21, 2013 1501 djohnson Only send notification if subscription was actually activated/deactivated,
|
||||
* remove race condition of GUI thread updating the table after notification.
|
||||
* Jan 22, 2013 1520 mpduff Removed menu accelerators.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -315,7 +318,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
fileMenuItem.setMenu(fileMenu);
|
||||
|
||||
MenuItem newMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
newMI.setText("&New Subscription...");
|
||||
newMI.setText("New Subscription...");
|
||||
newMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -324,7 +327,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
MenuItem groupMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
groupMI.setText("&New Group...");
|
||||
groupMI.setText("New Group...");
|
||||
groupMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -356,7 +359,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
new MenuItem(fileMenu, SWT.SEPARATOR);
|
||||
|
||||
MenuItem exitMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
exitMI.setText("&Exit");
|
||||
exitMI.setText("Exit");
|
||||
exitMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -374,7 +377,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
settingsMenuItem.setMenu(settingsMenu);
|
||||
|
||||
MenuItem configureMI = new MenuItem(settingsMenu, SWT.NONE);
|
||||
configureMI.setText("&Configure Table...");
|
||||
configureMI.setText("Configure Table...");
|
||||
configureMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -383,7 +386,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
tooltipMI = new MenuItem(settingsMenu, SWT.CHECK);
|
||||
tooltipMI.setText("&Tooltips");
|
||||
tooltipMI.setText("Tooltips");
|
||||
tooltipMI.setSelection(false);
|
||||
tooltipMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
@ -401,7 +404,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
helpMenuItem.setMenu(helpMenu);
|
||||
|
||||
MenuItem helpNotTableMI = new MenuItem(helpMenu, SWT.NONE);
|
||||
helpNotTableMI.setText("&About Subscription Manager...");
|
||||
helpNotTableMI.setText("About Subscription Manager...");
|
||||
helpNotTableMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -421,7 +424,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
editMenuItem.setMenu(editMenu);
|
||||
|
||||
MenuItem editMI = new MenuItem(editMenu, SWT.NONE);
|
||||
editMI.setText("&Edit Subscription...");
|
||||
editMI.setText("Edit Subscription...");
|
||||
editMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -430,7 +433,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
MenuItem copyMI = new MenuItem(editMenu, SWT.NONE);
|
||||
copyMI.setText("&Copy Subscription...");
|
||||
copyMI.setText("Copy Subscription...");
|
||||
copyMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -439,7 +442,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
});
|
||||
|
||||
MenuItem deleteMI = new MenuItem(editMenu, SWT.NONE);
|
||||
deleteMI.setText("&Delete Subscription");
|
||||
deleteMI.setText("Delete Subscription");
|
||||
deleteMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
|
@ -589,8 +592,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
String msg = user.uniqueId()
|
||||
+ " is not authorized to create subscriptions";
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
DataBrowserAction action = new DataBrowserAction();
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
ExecutionEvent ee = new ExecutionEvent(null, params, null, null);
|
||||
|
@ -620,8 +623,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
+ permission;
|
||||
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
if (create) {
|
||||
if (createGroupDlg == null) {
|
||||
createGroupDlg = new CreateGroupDefinitionDlg(
|
||||
|
@ -742,8 +745,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
+ permission;
|
||||
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
String message = null;
|
||||
|
||||
if (selectionCount > 1) {
|
||||
|
@ -829,8 +832,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
+ " Subscriptions\nPermission: " + permission;
|
||||
|
||||
try {
|
||||
if (DataDeliveryServices.getPermissionsService().checkPermission(user, msg, permission)
|
||||
.isAuthorized()) {
|
||||
if (DataDeliveryServices.getPermissionsService()
|
||||
.checkPermission(user, msg, permission).isAuthorized()) {
|
||||
final List<Subscription> updatedList = new ArrayList<Subscription>();
|
||||
|
||||
int count = tableComp.getTable().getSelectionCount();
|
||||
|
@ -864,34 +867,23 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
SWT.OK, sub.getName() + " Activated",
|
||||
response.getMessageToDisplay());
|
||||
}
|
||||
updatedList.add(sub);
|
||||
|
||||
if (activate) {
|
||||
subscriptionNotificationService
|
||||
.sendSubscriptionActivatedNotification(
|
||||
sub,
|
||||
username);
|
||||
|
||||
} else {
|
||||
subscriptionNotificationService
|
||||
.sendSubscriptionDeactivatedNotification(
|
||||
sub, username);
|
||||
|
||||
if (!response.isAllowFurtherEditing()) {
|
||||
if (activate) {
|
||||
subscriptionNotificationService
|
||||
.sendSubscriptionActivatedNotification(
|
||||
sub, username);
|
||||
} else {
|
||||
subscriptionNotificationService
|
||||
.sendSubscriptionDeactivatedNotification(
|
||||
sub, username);
|
||||
}
|
||||
}
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error processing request.", e);
|
||||
}
|
||||
}
|
||||
|
||||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isDisposed() == false) {
|
||||
tableComp.updateTable(updatedList);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (VizException e) {
|
||||
|
@ -1064,10 +1056,12 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
String msg = user.uniqueId()
|
||||
+ " is not authorized to access Subscription Approval";
|
||||
|
||||
return DataDeliveryServices.getPermissionsService().checkPermissions(user, msg,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_SITE,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_USER,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_VIEW)
|
||||
return DataDeliveryServices
|
||||
.getPermissionsService()
|
||||
.checkPermissions(user, msg,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_SITE,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_USER,
|
||||
DataDeliveryPermission.SUBSCRIPTION_APPROVE_VIEW)
|
||||
.isAuthorized();
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
|
@ -1097,8 +1091,8 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
|
||||
for (Subscription subscription : subscriptions) {
|
||||
subscriptionNotificationService
|
||||
.sendDeletedSubscriptionNotification(
|
||||
subscription, username);
|
||||
.sendDeletedSubscriptionNotification(subscription,
|
||||
username);
|
||||
}
|
||||
} catch (RegistryHandlerException e) {
|
||||
exceptions.add(e);
|
||||
|
|
|
@ -46,6 +46,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.TABLE_TYPE;
|
|||
* Aug 10, 2012 1002 mpduff Change dataset size from int to long.
|
||||
* Aug 21, 2012 712 mpduff Make priorities display as 1, 2, 3.
|
||||
* Oct 2, 2012 1103 jpiatt Remove unused methods, update enum, code clean up.
|
||||
* Jan 25, 2012 1528 djohnson Priorities no longer need incrementing for display.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -67,7 +68,7 @@ public class SubscriptionManagerRowData implements ITableData<SubscriptionManage
|
|||
private boolean active = false;
|
||||
|
||||
/** Subscription priority of fulfillment. */
|
||||
private int priority = 2;
|
||||
private int priority;
|
||||
|
||||
/** Subscription description. */
|
||||
private String description = null;
|
||||
|
@ -493,7 +494,7 @@ public class SubscriptionManagerRowData implements ITableData<SubscriptionManage
|
|||
|
||||
this.setName(subscription.getName());
|
||||
this.setOwner(subscription.getOwner());
|
||||
this.setPriority(subscription.getPriority() + 1);
|
||||
this.setPriority(subscription.getPriority().getPriorityValue());
|
||||
this.setSubscriptionStart(subscription.getSubscriptionStart());
|
||||
this.setSubscriptionEnd(subscription.getSubscriptionEnd());
|
||||
this.setActive(subscription.isActive());
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IPendingSubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -70,6 +71,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
|||
* Dec 18, 2012 1443 bgonzale Open force apply prompt pop-up on the UI thread.
|
||||
* Dec 20, 2012 1413 bgonzale Added new pending approve and denied request and responses.
|
||||
* Jan 04, 2013 1441 djohnson Separated out notification methods into their own service.
|
||||
* Jan 28, 2013 1530 djohnson Reset unscheduled flag with each update.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -357,6 +359,7 @@ public class SubscriptionService implements ISubscriptionService {
|
|||
final ServiceInteraction action = new ServiceInteraction() {
|
||||
@Override
|
||||
public String call() throws RegistryHandlerException {
|
||||
subscription.setUnscheduled(false);
|
||||
DataDeliveryHandlers.getSubscriptionHandler().update(
|
||||
subscription);
|
||||
return successMessage;
|
||||
|
@ -379,6 +382,7 @@ public class SubscriptionService implements ISubscriptionService {
|
|||
@Override
|
||||
public String call() throws RegistryHandlerException {
|
||||
for (Subscription sub : subs) {
|
||||
sub.setUnscheduled(false);
|
||||
DataDeliveryHandlers.getSubscriptionHandler().update(sub);
|
||||
}
|
||||
return successMessage;
|
||||
|
@ -438,6 +442,7 @@ public class SubscriptionService implements ISubscriptionService {
|
|||
subscription).isAuthorized();
|
||||
try {
|
||||
if (authorized) {
|
||||
subscription.setUnscheduled(false);
|
||||
DataDeliveryHandlers.getSubscriptionHandler()
|
||||
.update(subscription);
|
||||
} else {
|
||||
|
|
|
@ -47,12 +47,12 @@ import org.eclipse.swt.widgets.TableColumn;
|
|||
import org.eclipse.swt.widgets.TableItem;
|
||||
|
||||
import com.raytheon.uf.common.auth.user.IUser;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.SubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.registry.PendingSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryPermission;
|
||||
import com.raytheon.uf.common.datadelivery.service.SubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryObjectHandlers;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -100,6 +100,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.TABLE_TYPE;
|
|||
* Dec 03, 2012 1279 mpduff Add ability to populate from a list of subscription names.
|
||||
* Dec 12, 2012 1391 bgonzale Added a job for subscription retrieves.
|
||||
* Jan 07, 2013 1437 bgonzale Added sort column direction updates.
|
||||
* Jan 28, 2013 1529 djohnson Disable menu items if no subscriptions are selected.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -120,7 +121,7 @@ public class SubscriptionTableComp extends TableComp implements IGroupAction {
|
|||
* Subscription action callback that is called when there is a table
|
||||
* selection.
|
||||
*/
|
||||
private ISubscriptionAction subActionCallback;
|
||||
private final ISubscriptionAction subActionCallback;
|
||||
|
||||
/** TableDataManager object. */
|
||||
private TableDataManager<SubscriptionManagerRowData> subManagerData;
|
||||
|
@ -756,11 +757,14 @@ public class SubscriptionTableComp extends TableComp implements IGroupAction {
|
|||
popupMenu.dispose();
|
||||
}
|
||||
|
||||
final boolean menuItemsEnabled = table.getSelectionIndices().length > 0;
|
||||
|
||||
// Detail popup menu
|
||||
popupMenu = new Menu(table);
|
||||
MenuItem item1 = new MenuItem(popupMenu, SWT.PUSH);
|
||||
item1.setText("Details... ");
|
||||
item1.addSelectionListener(new SelectionAdapter() {
|
||||
MenuItem detailsItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
detailsItem.setText("Details... ");
|
||||
detailsItem.setEnabled(menuItemsEnabled);
|
||||
detailsItem.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
handleDetails();
|
||||
|
@ -770,6 +774,7 @@ public class SubscriptionTableComp extends TableComp implements IGroupAction {
|
|||
if (subType == SubscriptionType.MANAGER) {
|
||||
MenuItem editItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
editItem.setText("Edit...");
|
||||
editItem.setEnabled(menuItemsEnabled);
|
||||
editItem.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
@ -780,6 +785,7 @@ public class SubscriptionTableComp extends TableComp implements IGroupAction {
|
|||
// Add the selected row to a subscription group
|
||||
MenuItem groupItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
groupItem.setText("Add to Group...");
|
||||
groupItem.setEnabled(menuItemsEnabled);
|
||||
groupItem.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
|
|
@ -33,14 +33,14 @@ import org.eclipse.swt.widgets.Table;
|
|||
import org.eclipse.swt.widgets.TableColumn;
|
||||
import org.eclipse.swt.widgets.TableItem;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.ApprovedPendingSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.BaseSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.DeniedPendingSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.PendingSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.registry.InitialPendingSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.PendingSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.service.ApprovedPendingSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.service.BaseSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.service.DeniedPendingSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.service.PendingSubscriptionNotificationResponse;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.uf.common.datadelivery.registry.PendingSubscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IPendingSubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryPermission;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryObjectHandlers;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -57,7 +58,6 @@ import com.raytheon.uf.viz.datadelivery.services.DataDeliveryServices;
|
|||
import com.raytheon.uf.viz.datadelivery.subscription.CancelForceApplyAndIncreaseLatencyDisplayText;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.IPermissionsService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.IPermissionsService.IAuthorizedPermissionResponse;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionService.ISubscriptionServiceResult;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.SubscriptionService.ForceApplyPromptResponse;
|
||||
|
|
|
@ -52,6 +52,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Jul 25, 2012 955 djohnson Use List instead of ArrayList.
|
||||
* Sep 24, 2012 1157 mpduff Use InitialPendingSubsription.
|
||||
* Dec 10, 2012 1259 bsteffen Switch Data Delivery from LatLon to referenced envelopes.
|
||||
* Jan 25, 2013 1528 djohnson Compare priorities as primitive ints.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -115,7 +116,7 @@ public class SubscriptionDiff {
|
|||
|
||||
getMap();
|
||||
|
||||
if (!(sub.getPriority().equals(pendingSub.getPriority()))) {
|
||||
if (sub.getPriority() != pendingSub.getPriority()) {
|
||||
diffMap.put("priority", true);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,10 +44,12 @@ import com.raytheon.uf.common.datadelivery.registry.InitialPendingSubscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.OpenDapGriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.PendingSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Utils.SubscriptionStatus;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IPendingSubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryPermission;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryObjectHandlers;
|
||||
|
@ -62,7 +64,6 @@ import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
|||
import com.raytheon.uf.viz.datadelivery.services.DataDeliveryServices;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.CancelForceApplyAndIncreaseLatencyDisplayText;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.GroupDefinitionManager;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionService;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionService.ISubscriptionServiceResult;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.view.ICreateSubscriptionDlgView;
|
||||
|
@ -100,6 +101,9 @@ import com.raytheon.viz.ui.presenter.components.WidgetConf;
|
|||
* Jan 02, 2013 1441 djohnson Access GroupDefinitionManager in a static fashion.
|
||||
* Jan 04, 2012 1420 mpduff Add Latency to PriorityComp.
|
||||
* Jan 11, 2013 1453 djohnson Sets cycle times on construction.
|
||||
* Jan 14, 2013 1286 djohnson Check that message to display is not null or empty, and
|
||||
* only send notification of subscription creation on OK status.
|
||||
* Jan 25, 2013 1528 djohnson Use priority enum instead of raw integers, default to existing priority on edit.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -371,6 +375,10 @@ public class CreateSubscriptionDlgPresenter {
|
|||
view.setActiveEndDateBtnEnabled(false);
|
||||
}
|
||||
|
||||
if (!create) {
|
||||
view.setPriority(subscription.getPriority());
|
||||
}
|
||||
|
||||
List<Integer> cycleTimes = subscription.getTime().getCycleTimes();
|
||||
if (cycleTimes != null) {
|
||||
List<String> cycleStrings = new ArrayList<String>();
|
||||
|
@ -502,8 +510,8 @@ public class CreateSubscriptionDlgPresenter {
|
|||
}
|
||||
|
||||
// priority
|
||||
int priorityInd = view.getPriority();
|
||||
subscription.setPriority(priorityInd);
|
||||
SubscriptionPriority priority = view.getPriority();
|
||||
subscription.setPriority(priority);
|
||||
|
||||
subscription.setOfficeID(LocalizationManager.getInstance()
|
||||
.getCurrentSite());
|
||||
|
@ -557,17 +565,21 @@ public class CreateSubscriptionDlgPresenter {
|
|||
job.addJobChangeListener(new JobChangeAdapter() {
|
||||
@Override
|
||||
public void done(final IJobChangeEvent event) {
|
||||
subscriptionNotificationService
|
||||
.sendCreatedSubscriptionNotification(
|
||||
subscription, username);
|
||||
|
||||
final IStatus status = event.getResult();
|
||||
if (status.getMessage() != null) {
|
||||
|
||||
final boolean subscriptionCreated = status.isOK();
|
||||
if (subscriptionCreated) {
|
||||
sendSubscriptionNotification(subscription,
|
||||
username);
|
||||
}
|
||||
|
||||
if (!Strings.isNullOrEmpty(status.getMessage())) {
|
||||
guiThreadTaskExecutor.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!view.isDisposed()) {
|
||||
if (status.isOK()) {
|
||||
if (subscriptionCreated) {
|
||||
view.displayPopup(
|
||||
CREATED_TITLE,
|
||||
status.getMessage());
|
||||
|
|
|
@ -0,0 +1,177 @@
|
|||
/**
|
||||
* 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.viz.datadelivery.subscription.subset;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Ensemble;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.util.CollectionUtil;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.subset.xml.SubsetXML;
|
||||
import com.raytheon.viz.ui.widgets.duallist.DualList;
|
||||
import com.raytheon.viz.ui.widgets.duallist.DualListConfig;
|
||||
import com.raytheon.viz.ui.widgets.duallist.IUpdate;
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 3, 2013 bsteffen Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class GriddedEnsembleSubsetTab {
|
||||
|
||||
private static final String NAME = "Ensemble Members";
|
||||
|
||||
private final Set<IDataSize> listeners = new HashSet<IDataSize>();
|
||||
|
||||
private final Ensemble ensemble;
|
||||
|
||||
private DualList dualList;
|
||||
|
||||
private boolean modified;
|
||||
|
||||
public GriddedEnsembleSubsetTab(Composite parentComp, Ensemble ensemble) {
|
||||
this.ensemble = ensemble;
|
||||
init(parentComp);
|
||||
}
|
||||
|
||||
private void init(Composite parentComp) {
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
|
||||
gl.horizontalSpacing = 0;
|
||||
gl.verticalSpacing = 0;
|
||||
gl.marginWidth = 0;
|
||||
gl.marginHeight = 0;
|
||||
|
||||
Group group = new Group(parentComp, SWT.NONE);
|
||||
group.setText(getName());
|
||||
group.setLayout(gl);
|
||||
group.setLayoutData(gd);
|
||||
|
||||
DualListConfig dualListConfig = new DualListConfig();
|
||||
dualListConfig.setAvailableListLabel("Available Members:");
|
||||
dualListConfig.setSelectedListLabel("Selected Memebers:");
|
||||
dualListConfig.setListHeight(125);
|
||||
dualListConfig.setListWidth(175);
|
||||
dualListConfig.setShowUpDownBtns(false);
|
||||
dualListConfig.setFullList(ensemble.getMembers());
|
||||
dualList = new DualList(group, SWT.NONE, dualListConfig,
|
||||
new IUpdate() {
|
||||
|
||||
@Override
|
||||
public void selectionChanged() {
|
||||
modified = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hasEntries(boolean entries) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
public Ensemble getEnsembleWithSelection() {
|
||||
Ensemble ensemble = new Ensemble(this.ensemble);
|
||||
ensemble.setSelectedMembers(Arrays.asList(dualList
|
||||
.getSelectedListItems()));
|
||||
return ensemble;
|
||||
}
|
||||
|
||||
private void loadFromEnsemble(Ensemble ensemble) {
|
||||
dualList.clearSelection();
|
||||
if (ensemble != null && ensemble.getSelectedMembers() != null) {
|
||||
dualList.selectItems(ensemble.getSelectedMembers().toArray(
|
||||
new String[0]));
|
||||
}
|
||||
}
|
||||
|
||||
public void populateSubscription(Subscription subscription) {
|
||||
subscription.setEnsemble(getEnsembleWithSelection());
|
||||
}
|
||||
|
||||
public void loadFromSubscription(Subscription subscription) {
|
||||
loadFromEnsemble(subscription.getEnsemble());
|
||||
}
|
||||
|
||||
public void populateSubsetXML(SubsetXML<?> subsetXml) {
|
||||
subsetXml.setEnsemble(getEnsembleWithSelection());
|
||||
}
|
||||
|
||||
public void loadFromSubsetXML(SubsetXML<?> subsetXml) {
|
||||
loadFromEnsemble(subsetXml.getEnsemble());
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return !CollectionUtil.isNullOrEmpty(dualList.getSelectedListItems());
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
public void setModified(boolean modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
public void addListener(IDataSize listener) {
|
||||
synchronized (this.listeners) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
protected void notifyListeners() {
|
||||
Collection<IDataSize> listeners;
|
||||
synchronized (this.listeners) {
|
||||
listeners = new ArrayList<IDataSize>(
|
||||
this.listeners);
|
||||
}
|
||||
for (IDataSize listener : listeners) {
|
||||
listener.updateDataSize();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -24,6 +24,7 @@ import java.io.StringWriter;
|
|||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -34,13 +35,18 @@ import java.util.TreeSet;
|
|||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.TabFolder;
|
||||
import org.eclipse.swt.widgets.TabItem;
|
||||
import org.geotools.geometry.jts.ReferencedEnvelope;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.Ordering;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Ensemble;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSetMetaData;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
|
@ -77,6 +83,8 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
|||
* Dec 10, 2012 1259 bsteffen Switch Data Delivery from LatLon to referenced envelopes.
|
||||
* Jan 04, 2013 1299 djohnson Add logging of invalid forecast hour information if it occurs again.
|
||||
* Jan 04, 2013 1420 mpduff Pass cycles in for rules.
|
||||
* Jan 18, 2013 1414 bsteffen Add ensemble tab.
|
||||
* Jan 28, 2013 1533 djohnson Update the calculated dataset size after loading subset xml.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -115,6 +123,8 @@ public class GriddedSubsetManagerDlg
|
|||
|
||||
private DataSetMetaData metaData;
|
||||
|
||||
private GriddedEnsembleSubsetTab ensembleTab;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
@ -150,6 +160,83 @@ public class GriddedSubsetManagerDlg
|
|||
super(shell, dataSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createGridTabs(TabFolder tabFolder) {
|
||||
super.createGridTabs(tabFolder);
|
||||
Ensemble e = dataSet.getEnsemble();
|
||||
if (e != null && e.getMembers() != null) {
|
||||
TabItem ensembleTabItem = new TabItem(tabFolder, SWT.NONE, 2);
|
||||
Composite ensembleComp = new Composite(tabFolder, SWT.NONE);
|
||||
ensembleComp.setLayout(new GridLayout(1, false));
|
||||
ensembleComp.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT,
|
||||
true, false));
|
||||
ensembleTabItem.setControl(ensembleComp);
|
||||
ensembleTab = new GriddedEnsembleSubsetTab(ensembleComp,
|
||||
dataSet.getEnsemble());
|
||||
ensembleTab.addListener(this);
|
||||
ensembleTabItem.setText(ensembleTab.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<String> getInvalidTabs() {
|
||||
Collection<String> invalidTabs = super.getInvalidTabs();
|
||||
if (ensembleTab != null && !ensembleTab.isValid()) {
|
||||
invalidTabs.add(ensembleTab.getName());
|
||||
}
|
||||
return invalidTabs;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void populateSubsetXML(SubsetXML<SpecificDateTimeXML> subset) {
|
||||
super.populateSubsetXML(subset);
|
||||
if (ensembleTab != null) {
|
||||
ensembleTab.populateSubsetXML(subset);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadFromSubsetXML(SubsetXML<SpecificDateTimeXML> subsetXml) {
|
||||
super.loadFromSubsetXML(subsetXml);
|
||||
if (ensembleTab != null) {
|
||||
ensembleTab.loadFromSubsetXML(subsetXml);
|
||||
}
|
||||
updateDataSize();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.datadelivery.subscription.subset.SubsetManagerDlg
|
||||
* #loadFromSubscription
|
||||
* (com.raytheon.uf.common.datadelivery.registry.Subscription)
|
||||
*/
|
||||
@Override
|
||||
protected void loadFromSubscription(Subscription subscription) {
|
||||
super.loadFromSubscription(subscription);
|
||||
if (ensembleTab != null) {
|
||||
ensembleTab.loadFromSubscription(subscription);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isDirty() {
|
||||
boolean modified = super.isDirty();
|
||||
if (!modified && ensembleTab != null) {
|
||||
modified = ensembleTab.isModified();
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setClean() {
|
||||
super.setClean();
|
||||
if (ensembleTab != null) {
|
||||
ensembleTab.setModified(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -186,6 +273,11 @@ public class GriddedSubsetManagerDlg
|
|||
|
||||
time.setSelectedTimeIndices(fcstIndices);
|
||||
subscription.setTime(time);
|
||||
|
||||
if (ensembleTab != null) {
|
||||
ensembleTab.populateSubscription(subscription);
|
||||
}
|
||||
|
||||
return subscription;
|
||||
}
|
||||
|
||||
|
@ -193,7 +285,7 @@ public class GriddedSubsetManagerDlg
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected SpecificDateTimeXML getTimeXml() {
|
||||
protected SpecificDateTimeXML getTimeXmlFromSubscription() {
|
||||
SpecificDateTimeXML timeXml = new SpecificDateTimeXML();
|
||||
Time time = this.subscription.getTime();
|
||||
List<Integer> cycleTimes = time.getCycleTimes();
|
||||
|
@ -270,7 +362,12 @@ public class GriddedSubsetManagerDlg
|
|||
// Get the temporal data
|
||||
int numFcstHours = this.timingTabControls.getSelectedFcstHours().length;
|
||||
dataSize.setNumFcstHours(numFcstHours);
|
||||
|
||||
if (ensembleTab != null) {
|
||||
dataSize.setNumEnsembleMembers(ensembleTab
|
||||
.getEnsembleWithSelection());
|
||||
} else {
|
||||
dataSize.setNumEnsembleMembers(dataSet.getEnsemble());
|
||||
}
|
||||
// Get the Areal data
|
||||
ReferencedEnvelope envelope = this.spatialTabControls.getEnvelope();
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.swt.widgets.List;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.PriorityComp;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.subset.presenter.IGriddedTimingSelectionDlgView;
|
||||
import com.raytheon.uf.viz.datadelivery.system.SystemRuleManager;
|
||||
|
@ -55,6 +56,7 @@ import com.raytheon.viz.ui.presenter.components.ListConf;
|
|||
* Oct 11, 2012 1263 jpiatt Modified for cancel button
|
||||
* Nov 20, 2012 1286 djohnson Implement displayYesNoPopup.
|
||||
* Jan 04, 2013 1420 mpduff Add Priority Composite.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -137,7 +139,8 @@ public class GriddedTimingSelectionDlg extends CaveSWTDialog implements
|
|||
// Get latency value
|
||||
SystemRuleManager ruleManager = SystemRuleManager.getInstance();
|
||||
int latency = ruleManager.getLatency(this.subscription, cycleTimes);
|
||||
int priority = ruleManager.getPriority(this.subscription, cycleTimes);
|
||||
SubscriptionPriority priority = ruleManager
|
||||
.getPriority(this.subscription, cycleTimes);
|
||||
priorityComp = new PriorityComp(shell, latency, priority);
|
||||
|
||||
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
|
||||
|
@ -337,7 +340,7 @@ public class GriddedTimingSelectionDlg extends CaveSWTDialog implements
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return priorityComp.getPriorityIndex();
|
||||
public SubscriptionPriority getPriority() {
|
||||
return priorityComp.getPriority();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
package com.raytheon.uf.viz.datadelivery.subscription.subset;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -50,6 +52,7 @@ import com.raytheon.uf.common.datadelivery.registry.DataSet;
|
|||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedCoverage;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Levels;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
|
@ -122,6 +125,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* Jan 02, 2012 1345 djohnson Use gui thread task executor.
|
||||
* Jan 04, 2012 1420 mpduff Pass the subscription in to the GriddedTimingSelectionDlg.
|
||||
* Jan 10, 2013 1444 mpduff Fix the loading of saved subsets from the saved subset tab.
|
||||
* Jan 28, 2013 1530 djohnson Break out long method chaining into local variables for debugging.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -137,9 +141,6 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(SubsetManagerDlg.class);
|
||||
|
||||
/** Tab test map */
|
||||
private final Map<String, String> tabTextMap = new HashMap<String, String>();
|
||||
|
||||
/** Subset Name text box */
|
||||
private Text nameText;
|
||||
|
||||
|
@ -180,15 +181,6 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
/** Edit flag */
|
||||
private boolean create = true;
|
||||
|
||||
/** Flag for vertical levels/parameters dirty */
|
||||
private boolean verticalParameterDirty = false;
|
||||
|
||||
/** Flag for vertical date/cycle/forecast dirty. */
|
||||
private boolean dateDirty = false;
|
||||
|
||||
/** Flag for spatial dirty */
|
||||
private boolean spatialDirty = false;
|
||||
|
||||
/** Subscription object */
|
||||
protected Subscription subscription;
|
||||
|
||||
|
@ -201,14 +193,11 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
/** Subset manager constant */
|
||||
private final String DD_SUBSET_MANAGER = "Data Delivery Subset Manager - ";
|
||||
|
||||
/** Priority Tab constant */
|
||||
private final String VERTICAL_TAB = "verticalTab";
|
||||
private final String VERTICAL_TAB = "Vertical Levels/Parameters";
|
||||
|
||||
/** Latency Tab constant */
|
||||
private final String TIMING_TAB = "timingTab";
|
||||
private final String TIMING_TAB = "Forecast Hours";
|
||||
|
||||
/** Routing Tab constant */
|
||||
private final String SPATIAL_TAB = "spatialTab";
|
||||
private final String SPATIAL_TAB = "Spatial";
|
||||
|
||||
private final ISubscriptionService subscriptionService = DataDeliveryServices
|
||||
.getSubscriptionService();
|
||||
|
@ -291,14 +280,17 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
getTabText();
|
||||
|
||||
createTabFolder();
|
||||
createInfoComp();
|
||||
createButtons();
|
||||
|
||||
if (loadDataSet) {
|
||||
populate();
|
||||
if (subsetXml != null) {
|
||||
loadFromSubsetXML(subsetXml);
|
||||
} else if (subscription != null) {
|
||||
loadFromSubscription(subscription);
|
||||
}
|
||||
}
|
||||
|
||||
shell.addShellListener(new ShellAdapter() {
|
||||
|
@ -357,13 +349,6 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
// shell.setMinimumSize(shell.getSize());
|
||||
}
|
||||
|
||||
/** Get a map of tab text values */
|
||||
private void getTabText() {
|
||||
tabTextMap.put(VERTICAL_TAB, "Vertical Levels/Parameters");
|
||||
tabTextMap.put(TIMING_TAB, "Forecast Hours");
|
||||
tabTextMap.put(SPATIAL_TAB, "Spatial");
|
||||
}
|
||||
|
||||
/** Create the tabs */
|
||||
private void createTabs(TabFolder tabFolder) {
|
||||
createGridTabs(tabFolder);
|
||||
|
@ -376,12 +361,12 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
}
|
||||
|
||||
/** Create the grid tab */
|
||||
private void createGridTabs(TabFolder tabFolder) {
|
||||
protected void createGridTabs(TabFolder tabFolder) {
|
||||
GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
|
||||
TabItem verticalTab = new TabItem(tabFolder, SWT.NONE);
|
||||
verticalTab.setText(tabTextMap.get(VERTICAL_TAB));
|
||||
verticalTab.setText(VERTICAL_TAB);
|
||||
verticalTab.setData("valid", false);
|
||||
Composite vertComp = new Composite(tabFolder, SWT.NONE);
|
||||
vertComp.setLayout(gl);
|
||||
|
@ -393,7 +378,7 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
gl = new GridLayout(1, false);
|
||||
|
||||
TabItem timingTab = new TabItem(tabFolder, SWT.NONE);
|
||||
timingTab.setText(tabTextMap.get(TIMING_TAB));
|
||||
timingTab.setText(TIMING_TAB);
|
||||
timingTab.setData("valid", false);
|
||||
Composite timingComp = new Composite(tabFolder, SWT.NONE);
|
||||
timingComp.setLayout(gl);
|
||||
|
@ -407,7 +392,7 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
gl = new GridLayout(1, false);
|
||||
|
||||
TabItem spatialTab = new TabItem(tabFolder, SWT.NONE);
|
||||
spatialTab.setText(tabTextMap.get(SPATIAL_TAB));
|
||||
spatialTab.setText(SPATIAL_TAB);
|
||||
Composite spatialComp = new Composite(tabFolder, SWT.NONE);
|
||||
spatialComp.setLayout(gl);
|
||||
spatialComp.setLayoutData(gd);
|
||||
|
@ -580,7 +565,6 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
sub.setOfficeID(LocalizationManager.getInstance().getCurrentSite());
|
||||
if (create) {
|
||||
sub.setOwner(LocalizationManager.getInstance().getCurrentUser());
|
||||
sub.setPriority(1);
|
||||
} else {
|
||||
sub.setOwner(this.subscription.getOwner());
|
||||
sub.setGroupName(this.subscription.getGroupName());
|
||||
|
@ -710,37 +694,43 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
return false;
|
||||
}
|
||||
|
||||
// Don't get the last tab, saved subsets
|
||||
Map<String, Boolean> tabsValidMap = new HashMap<String, Boolean>();
|
||||
Collection<String> invalidTabs = getInvalidTabs();
|
||||
|
||||
if (!invalidTabs.isEmpty()) {
|
||||
StringBuilder message = new StringBuilder(
|
||||
"The following tabs do not have valid entries:\n\n");
|
||||
for (String tab : invalidTabs) {
|
||||
message.append(tab + "\n");
|
||||
}
|
||||
DataDeliveryUtils.showMessage(shell, getStyle(), "Invalid Entries",
|
||||
message.toString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected Collection<String> getInvalidTabs() {
|
||||
Collection<String> invalidTabs = new ArrayList<String>(3);
|
||||
|
||||
// Get the tabs to validate
|
||||
// TODO Hardcoding the tabs for now, fix this later
|
||||
|
||||
// Validate the vertical tab
|
||||
tabsValidMap.put(VERTICAL_TAB, vTab.isValid());
|
||||
if (!vTab.isValid()) {
|
||||
invalidTabs.add(VERTICAL_TAB);
|
||||
}
|
||||
|
||||
tabsValidMap.put(TIMING_TAB, timingTabControls.isValid());
|
||||
if (!timingTabControls.isValid()) {
|
||||
invalidTabs.add(TIMING_TAB);
|
||||
}
|
||||
|
||||
// Next is spatial subset tab
|
||||
tabsValidMap.put(SPATIAL_TAB, spatialTabControls.isValid());
|
||||
|
||||
StringBuilder buf = new StringBuilder(
|
||||
"The following tabs do not have valid entries:\n\n");
|
||||
boolean showMsg = false;
|
||||
for (String tab : tabsValidMap.keySet()) {
|
||||
if (!tabsValidMap.get(tab)) {
|
||||
buf.append(tabTextMap.get(tab) + "\n");
|
||||
showMsg = true;
|
||||
}
|
||||
if (!spatialTabControls.isValid()) {
|
||||
invalidTabs.add(SPATIAL_TAB);
|
||||
}
|
||||
|
||||
if (showMsg) {
|
||||
DataDeliveryUtils.showMessage(shell, getStyle(), "Invalid Entries",
|
||||
buf.toString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return invalidTabs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -806,6 +796,15 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
}
|
||||
|
||||
SubsetXML<TIMEXML> subset = new SubsetXML<TIMEXML>();
|
||||
populateSubsetXML(subset);
|
||||
|
||||
// Have all the info, now save the file
|
||||
SubsetFileManager.getInstance().saveSubset(subset, this.shell);
|
||||
setClean();
|
||||
subsetTab.enableButtons(nameText);
|
||||
}
|
||||
|
||||
protected void populateSubsetXML(SubsetXML<TIMEXML> subset) {
|
||||
subset.setBaseSubsetName(nameText.getText());
|
||||
subset.setDatasetName(dataSet.getDataSetName());
|
||||
subset.setProviderName(dataSet.getProviderName());
|
||||
|
@ -821,12 +820,6 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
// finally the date/cycle/forecast data
|
||||
TIMEXML time = timingTabControls.getSaveInfo();
|
||||
subset.setTime(time);
|
||||
|
||||
// Have all the info, now save the file
|
||||
SubsetFileManager.getInstance().saveSubset(subset, this.shell);
|
||||
|
||||
setClean();
|
||||
subsetTab.enableButtons(nameText);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -844,58 +837,36 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
SubsetXML<TIMEXML> loadedSubsetXml = (SubsetXML<TIMEXML>) SubsetFileManager
|
||||
.getInstance().loadSubset(subsetName);
|
||||
|
||||
updateSelections(loadedSubsetXml);
|
||||
loadFromSubsetXML(loadedSubsetXml);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the dialog controls.
|
||||
*/
|
||||
private void populate() {
|
||||
if (subsetXml == null) {
|
||||
if (subscription == null) {
|
||||
return;
|
||||
}
|
||||
populateSubset();
|
||||
}
|
||||
|
||||
AreaXML area = subsetXml.getArea();
|
||||
spatialTabControls.setDataSet(this.dataSet);
|
||||
spatialTabControls.populate(area);
|
||||
|
||||
protected void loadFromSubsetXML(SubsetXML<TIMEXML> subsetXml) {
|
||||
ArrayList<VerticalXML> vertList = subsetXml.getVerticalList();
|
||||
vTab.populate(vertList, dataSet);
|
||||
|
||||
TIMEXML time = subsetXml.getTime();
|
||||
this.timingTabControls.populate(time, dataSet);
|
||||
this.nameText.setText(subsetXml.getBaseSubsetName());
|
||||
|
||||
if (this.subsetXml == subsetXml) {
|
||||
// only populate area and name if subsetXml is loading from initial
|
||||
// load, not from the saved subsets tab.
|
||||
AreaXML area = subsetXml.getArea();
|
||||
spatialTabControls.setDataSet(this.dataSet);
|
||||
spatialTabControls.populate(area);
|
||||
|
||||
this.nameText.setText(subsetXml.getBaseSubsetName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update selections with from the loadedSubsetXML object.
|
||||
*/
|
||||
private void updateSelections(SubsetXML<TIMEXML> loadedSubsetXml) {
|
||||
ArrayList<VerticalXML> vertList = loadedSubsetXml.getVerticalList();
|
||||
vTab.updateSettings(vertList);
|
||||
|
||||
TIMEXML time = loadedSubsetXml.getTime();
|
||||
timingTabControls.updateSettings(time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the subset object.
|
||||
*/
|
||||
private void populateSubset() {
|
||||
subsetXml = new SubsetXML<TIMEXML>();
|
||||
subsetXml.setDatasetName(this.dataSet.getDataSetName());
|
||||
subsetXml.setProviderName(this.dataSet.getProviderName());
|
||||
subsetXml.setSubsetName(this.subscription.getName());
|
||||
protected void loadFromSubscription(Subscription subscription) {
|
||||
this.nameText.setText(this.subscription.getName());
|
||||
|
||||
// Cycle time
|
||||
TIMEXML timeXml = getTimeXml();
|
||||
TIMEXML timeXml = getTimeXmlFromSubscription();
|
||||
|
||||
timeXml.setLatestData(true);
|
||||
|
||||
subsetXml.setTime(timeXml);
|
||||
this.timingTabControls.populate(timeXml, dataSet);
|
||||
|
||||
// Area
|
||||
AreaXML area = new AreaXML();
|
||||
|
@ -911,7 +882,8 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
area.setEnvelope(envelope);
|
||||
}
|
||||
|
||||
subsetXml.setArea(area);
|
||||
spatialTabControls.setDataSet(this.dataSet);
|
||||
spatialTabControls.populate(area);
|
||||
|
||||
// Vertical/Parameters
|
||||
Map<String, VerticalXML> levelMap = new HashMap<String, VerticalXML>();
|
||||
|
@ -938,17 +910,20 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
// Data providers have parameters with multiple level types
|
||||
// containing multiple levels
|
||||
if (levelType.getId() == 100) {
|
||||
for (int index : p.getLevels().getSelectedLevelIndices()) {
|
||||
v.addLevel(String.valueOf(p.getLevels().getLevel()
|
||||
final Levels levels = p.getLevels();
|
||||
final List<Integer> selectedLevelIndices = levels
|
||||
.getSelectedLevelIndices();
|
||||
for (int index : selectedLevelIndices) {
|
||||
v.addLevel(String.valueOf(levels.getLevel()
|
||||
.get(index)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (VerticalXML v : levelMap.values()) {
|
||||
subsetXml.addVertical(v);
|
||||
}
|
||||
ArrayList<VerticalXML> vertList = new ArrayList<VerticalXML>(
|
||||
levelMap.values());
|
||||
vTab.populate(vertList, dataSet);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -956,25 +931,22 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
*
|
||||
* @return The time object
|
||||
*/
|
||||
protected abstract TIMEXML getTimeXml();
|
||||
protected abstract TIMEXML getTimeXmlFromSubscription();
|
||||
|
||||
/**
|
||||
* If any mods have been made to the composite selections, set dirty true.
|
||||
*/
|
||||
private boolean isDirty() {
|
||||
protected boolean isDirty() {
|
||||
|
||||
verticalParameterDirty = vTab.isDirty();
|
||||
if (verticalParameterDirty) {
|
||||
if (vTab.isDirty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
dateDirty = timingTabControls.isDirty();
|
||||
if (dateDirty) {
|
||||
if (timingTabControls.isDirty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
spatialDirty = spatialTabControls.isSpatialDirty();
|
||||
if (spatialDirty) {
|
||||
if (spatialTabControls.isSpatialDirty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -984,7 +956,7 @@ public abstract class SubsetManagerDlg<DATASET extends DataSet, PRESENTER extend
|
|||
/**
|
||||
* Reset the dirty flags.
|
||||
*/
|
||||
private void setClean() {
|
||||
protected void setClean() {
|
||||
vTab.setClean();
|
||||
timingTabControls.setDirty(false);
|
||||
spatialTabControls.setSpatialDirty(false);
|
||||
|
|
|
@ -471,7 +471,7 @@ public class VerticalSubsetTab extends SubsetTab implements
|
|||
* @param dataSet
|
||||
* The DataSetMetaData object
|
||||
*/
|
||||
public void populate(ArrayList<VerticalXML> vertList, DataSet dataSet) {
|
||||
public void populate(List<VerticalXML> vertList, DataSet dataSet) {
|
||||
this.dataSet = dataSet;
|
||||
createExpandBarItems();
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.datadelivery.subscription.subset.presenter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import static com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.getMaxLatency;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
@ -44,6 +44,7 @@ import com.raytheon.viz.ui.presenter.components.ListConf;
|
|||
* Sep 27, 2012 1202 bgonzale Set selectionDate to date and cycle.
|
||||
* Oct 11, 2012 1263 jpiatt Modified for cancel flag.
|
||||
* Jan 04, 2013 1420 mpduff Add the dataset object.
|
||||
* Jan 22, 2013 1519 djohnson Use DataDeliveryUtils.getMaxLatency().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -173,7 +174,7 @@ public class GriddedTimingSelectionPresenter {
|
|||
}
|
||||
|
||||
DataDeliveryGUIUtils.latencyValidChk(view.getLatency(),
|
||||
getMaxLatency());
|
||||
getMaxLatency(dataSet));
|
||||
|
||||
// parse off the date/cycle time selected
|
||||
String[] parts = selection.split(" - ");
|
||||
|
@ -188,29 +189,6 @@ public class GriddedTimingSelectionPresenter {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Max latency value in minutes.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private int getMaxLatency() {
|
||||
List<Integer> cycleList = new ArrayList<Integer>(dataSet.getCycles());
|
||||
Collections.sort(cycleList);
|
||||
|
||||
int max = 0;
|
||||
|
||||
for (int i = 0; i < cycleList.size(); i++) {
|
||||
if (i + 1 <= cycleList.size()) {
|
||||
int tempMax = cycleList.get(i + 1) - cycleList.get(i);
|
||||
if (tempMax > max) {
|
||||
max = tempMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return max * 60;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called via the "Use Latest Data" checkbox being
|
||||
* selected/unselected.
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.datadelivery.subscription.subset.presenter;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
import com.raytheon.viz.ui.presenter.IPresenterView;
|
||||
import com.raytheon.viz.ui.presenter.components.ButtonConf;
|
||||
import com.raytheon.viz.ui.presenter.components.CheckBoxConf;
|
||||
|
@ -119,9 +120,9 @@ public interface IGriddedTimingSelectionDlgView extends IPresenterView {
|
|||
int getLatency();
|
||||
|
||||
/**
|
||||
* Get the priority value.
|
||||
* Get the priority.
|
||||
*
|
||||
* @return priority value
|
||||
* @return priority
|
||||
*/
|
||||
int getPriority();
|
||||
SubscriptionPriority getPriority();
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlElements;
|
|||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.edex.util.Util;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Ensemble;
|
||||
import com.raytheon.uf.viz.datadelivery.common.xml.AreaXML;
|
||||
import com.raytheon.uf.viz.datadelivery.common.xml.IDisplayXml;
|
||||
|
||||
|
@ -65,6 +66,9 @@ public class SubsetXML<TIMEXML extends TimeXML> implements IDisplayXml {
|
|||
|
||||
@XmlElement(name = "area", type = AreaXML.class)
|
||||
protected AreaXML area;
|
||||
|
||||
@XmlElement
|
||||
protected Ensemble ensemble;
|
||||
|
||||
@XmlElements({ @XmlElement(name = "vertical", type = VerticalXML.class) })
|
||||
protected ArrayList<VerticalXML> verticalList = new ArrayList<VerticalXML>();
|
||||
|
@ -86,6 +90,21 @@ public class SubsetXML<TIMEXML extends TimeXML> implements IDisplayXml {
|
|||
this.subsetName = subsetName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ensemble
|
||||
*/
|
||||
public Ensemble getEnsemble() {
|
||||
return ensemble;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ensemble
|
||||
* the ensemble to set
|
||||
*/
|
||||
public void setEnsemble(Ensemble ensemble) {
|
||||
this.ensemble = ensemble;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the area
|
||||
*/
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.Set;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
import com.raytheon.viz.ui.presenter.IPresenterView;
|
||||
import com.raytheon.viz.ui.presenter.components.ButtonConf;
|
||||
import com.raytheon.viz.ui.presenter.components.CheckBoxConf;
|
||||
|
@ -44,6 +45,7 @@ import com.raytheon.viz.ui.presenter.components.ComboBoxConf;
|
|||
* Dec 13, 2012 1391 bgonzale Added status methods.
|
||||
* Jan 02, 2013 1441 djohnson Add isGroupSelected.
|
||||
* Jan 04, 2013 1420 mpduff Added getters for latency and priority.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -210,14 +212,14 @@ public interface ICreateSubscriptionDlgView extends IPresenterView {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
int getPriority();
|
||||
SubscriptionPriority getPriority();
|
||||
|
||||
/**
|
||||
* Set the priority selection
|
||||
*
|
||||
* @param i
|
||||
* @param subscriptionPriority
|
||||
*/
|
||||
void setPriority(int i);
|
||||
void setPriority(SubscriptionPriority subscriptionPriority);
|
||||
|
||||
/**
|
||||
* Open the dialog
|
||||
|
@ -406,13 +408,6 @@ public interface ICreateSubscriptionDlgView extends IPresenterView {
|
|||
*/
|
||||
int getLatencyValue();
|
||||
|
||||
/**
|
||||
* Get the priority value.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getPriorityValue();
|
||||
|
||||
/**
|
||||
* Set Subscription.
|
||||
*
|
||||
|
|
|
@ -19,8 +19,12 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.datadelivery.subscription.xml;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.raytheon.uf.viz.datadelivery.system.Operator;
|
||||
import com.raytheon.uf.viz.datadelivery.system.OperatorTypes;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.NameOperationItems;
|
||||
|
@ -35,7 +39,8 @@ import com.raytheon.uf.viz.datadelivery.utils.TypeOperationItems;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 7, 2013 1420 mpduff Initial creation.
|
||||
* Jan 07, 2013 1420 mpduff Initial creation.
|
||||
* Jan 14, 2013 1286 djohnson Add static versions of the conversion methods.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,32 +49,61 @@ import com.raytheon.uf.viz.datadelivery.utils.TypeOperationItems;
|
|||
*/
|
||||
|
||||
public class OperatorAdapter extends XmlAdapter<String, Operator<?>> {
|
||||
@Override
|
||||
public Operator<?> unmarshal(String v) throws Exception {
|
||||
for (OperatorTypes ot : OperatorTypes.values()) {
|
||||
if (ot.toString().equals(v)) {
|
||||
return ot;
|
||||
}
|
||||
}
|
||||
|
||||
for (NameOperationItems noi : NameOperationItems.values()) {
|
||||
if (noi.toString().equals(v)) {
|
||||
return noi;
|
||||
}
|
||||
private static final Map<String, Operator<?>> OPERATOR_MAP;
|
||||
static {
|
||||
Map<String, Operator<?>> map = Maps.newHashMap();
|
||||
for (Operator<?> operator : NameOperationItems.values()) {
|
||||
map.put(toString(operator), operator);
|
||||
}
|
||||
|
||||
for (TypeOperationItems toi : TypeOperationItems.values()) {
|
||||
if (toi.toString().equals(v)) {
|
||||
return toi;
|
||||
}
|
||||
for (Operator<?> operator : OperatorTypes.values()) {
|
||||
map.put(toString(operator), operator);
|
||||
}
|
||||
|
||||
return null;
|
||||
for (Operator<?> operator : TypeOperationItems.values()) {
|
||||
map.put(toString(operator), operator);
|
||||
}
|
||||
OPERATOR_MAP = Collections.unmodifiableMap(map);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Operator<?> unmarshal(String v) throws Exception {
|
||||
return fromString(v);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String marshal(Operator<?> v) throws Exception {
|
||||
return v.toString();
|
||||
return toString(v);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve an {@link Operator} from its {@link String} representation.
|
||||
*
|
||||
* @param asString
|
||||
* the string representation
|
||||
* @return
|
||||
*/
|
||||
public static Operator<?> fromString(String asString) {
|
||||
return OPERATOR_MAP.get(asString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the {@link String} representation of an {@link Operator}
|
||||
* instance.
|
||||
*
|
||||
* @param operator
|
||||
* the operator
|
||||
* @return the {@link String} representation
|
||||
*/
|
||||
public static String toString(Operator<?> operator) {
|
||||
return operator.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
|
||||
/**
|
||||
* Priority rule xml object.
|
||||
*
|
||||
|
@ -34,6 +36,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 19, 2012 1420 mpduff Initial creation.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -44,20 +47,20 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
@XmlRootElement
|
||||
public class PriorityRuleXML extends RuleXML {
|
||||
@XmlElement(name = "priority")
|
||||
private Integer priority;
|
||||
private SubscriptionPriority priority;
|
||||
|
||||
/**
|
||||
* @param priority
|
||||
* the priority to set
|
||||
*/
|
||||
public void setPriority(Integer priority) {
|
||||
public void setPriority(SubscriptionPriority priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the priority
|
||||
*/
|
||||
public Integer getPriority() {
|
||||
public SubscriptionPriority getPriority() {
|
||||
return priority;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,12 +27,10 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
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.units.DataSizeUnit;
|
||||
import com.raytheon.uf.viz.datadelivery.system.CreateEditRuleDlg.FreqUnitOptions;
|
||||
import com.raytheon.uf.viz.datadelivery.system.Operator;
|
||||
import com.raytheon.uf.viz.datadelivery.system.OpsNetFieldNames;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataSizeUnit;
|
||||
|
||||
/**
|
||||
* Parent Rules xml class
|
||||
|
@ -44,6 +42,8 @@ import com.raytheon.uf.viz.datadelivery.utils.DataSizeUnit;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 19, 2012 1420 mpduff Initial creation.
|
||||
* Jan 14, 2013 1286 djohnson Correct string conversion of units and use {@link Operator}.
|
||||
* Jan 17, 2013 1357 mpduff Moved DataSizeUnit.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -53,11 +53,6 @@ import com.raytheon.uf.viz.datadelivery.utils.DataSizeUnit;
|
|||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public abstract class RuleXML {
|
||||
|
||||
/** Status Handler */
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(RuleXML.class);
|
||||
|
||||
/** Rule name */
|
||||
@XmlElement
|
||||
protected String ruleName;
|
||||
|
@ -68,7 +63,7 @@ public abstract class RuleXML {
|
|||
|
||||
/** Rule operator */
|
||||
@XmlElement
|
||||
protected String ruleOperator;
|
||||
protected Operator ruleOperator;
|
||||
|
||||
/** Rule value */
|
||||
@XmlElement
|
||||
|
@ -121,7 +116,7 @@ public abstract class RuleXML {
|
|||
*
|
||||
* @return the ruleOperator
|
||||
*/
|
||||
public String getRuleOperator() {
|
||||
public Operator getRuleOperator() {
|
||||
return ruleOperator;
|
||||
}
|
||||
|
||||
|
@ -131,7 +126,7 @@ public abstract class RuleXML {
|
|||
* @param ruleOperator
|
||||
* The operator value of the rule
|
||||
*/
|
||||
public void setRuleOperator(String ruleOperator) {
|
||||
public void setRuleOperator(Operator ruleOperator) {
|
||||
this.ruleOperator = ruleOperator;
|
||||
}
|
||||
|
||||
|
@ -192,38 +187,29 @@ public abstract class RuleXML {
|
|||
unit = getRuleUnit();
|
||||
}
|
||||
|
||||
OperatorAdapter oa = new OperatorAdapter();
|
||||
Operator oper = null;
|
||||
try {
|
||||
oper = oa.unmarshal(ruleOperator);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If Data Name
|
||||
if (OpsNetFieldNames.NAME.toString().equals(ruleField)) {
|
||||
|
||||
String dsName = sub.getDataSetName();
|
||||
|
||||
return oper.evaluate(dsName, ruleValue);
|
||||
return ruleOperator.evaluate(dsName, ruleValue);
|
||||
}
|
||||
|
||||
// If Data Type
|
||||
if (OpsNetFieldNames.TYPE.toString().equals(ruleField)) {
|
||||
String dsType = sub.getDataSetType().toString();
|
||||
|
||||
return oper.evaluate(ruleValue, dsType);
|
||||
return ruleOperator.evaluate(ruleValue, dsType);
|
||||
}
|
||||
|
||||
// If Data Size
|
||||
if (OpsNetFieldNames.SIZE.toString().equals(ruleField)) {
|
||||
long dsSizeKb = sub.getDataSetSize(); // Size in KB
|
||||
long ruleValueInt = Integer.parseInt(ruleValue);
|
||||
DataSizeUnit dsUnit = DataSizeUnit.valueOf(unit);
|
||||
DataSizeUnit dsUnit = DataSizeUnit.fromString(ruleUnit);
|
||||
ruleValueInt = dsUnit.toKB(ruleValueInt);
|
||||
|
||||
return oper.evaluate(Long.valueOf(dsSizeKb),
|
||||
return ruleOperator.evaluate(Long.valueOf(dsSizeKb),
|
||||
Long.valueOf(ruleValueInt));
|
||||
}
|
||||
|
||||
|
@ -231,7 +217,7 @@ public abstract class RuleXML {
|
|||
if (OpsNetFieldNames.FREQUENCY.toString().equals(ruleField)) {
|
||||
// Calculate frequency
|
||||
int ruleValueInt = Integer.parseInt(this.ruleValue);
|
||||
if (unit.equalsIgnoreCase("Mins")) {
|
||||
if (FreqUnitOptions.MIN.getOperation().equalsIgnoreCase(unit)) {
|
||||
ruleValueInt /= 60;
|
||||
}
|
||||
int freq = 0;
|
||||
|
@ -246,7 +232,8 @@ public abstract class RuleXML {
|
|||
freq = val - tmp;
|
||||
}
|
||||
|
||||
if (oper.evaluate(Long.valueOf(freq), Long.valueOf(ruleValueInt))) {
|
||||
if (ruleOperator.evaluate(Long.valueOf(freq),
|
||||
Long.valueOf(ruleValueInt))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.datadelivery.system;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
|
@ -35,15 +36,16 @@ import org.eclipse.swt.widgets.Layout;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.units.DataSizeUnit;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.xml.LatencyRuleXML;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.xml.OperatorAdapter;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.xml.PriorityRuleXML;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.xml.RuleXML;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryGUIUtils.SubscriptionPriority;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataSizeUnit;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.NameOperationItems;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.TypeOperationItems;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
@ -65,6 +67,9 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* Dec 18, 2012 1417 bgonzale Changed value initialization in handleSave().
|
||||
* Jan 04, 2013 1420 mpduff Remove code to apply rules changes to existing subscription,
|
||||
* rules are only for future subscriptions.
|
||||
* Jan 14, 2013 1286 djohnson Rule operators are now used as objects.
|
||||
* Jan 17, 2013 1357 mpduff Moved DataSizeUnit.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -225,6 +230,9 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
this(parent, create, null, ruleType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the rule header.
|
||||
*/
|
||||
private void createRuleHeader() {
|
||||
if (create) {
|
||||
if (PRIORITY_TYPE.equals(ruleType)) {
|
||||
|
@ -267,9 +275,9 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
protected void initializeComponents(Shell shell) {
|
||||
if (!create) {
|
||||
if (PRIORITY_TYPE.equals(ruleType)) {
|
||||
ruleXml = srm.loadPriorityRule(ruleName);
|
||||
ruleXml = srm.getPriorityRule(ruleName);
|
||||
} else {
|
||||
ruleXml = srm.loadLatencyRule(ruleName);
|
||||
ruleXml = srm.getLatencyRule(ruleName);
|
||||
}
|
||||
|
||||
if (DATASET_SIZE.equals(ruleXml.getRuleField())) {
|
||||
|
@ -409,7 +417,6 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
String item = fieldCombo.getItem(index);
|
||||
updateSelectionFields(item);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
OpsNetFieldNames[] fieldItems = OpsNetFieldNames.values();
|
||||
|
@ -448,7 +455,6 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
createFreqUnitItems();
|
||||
}
|
||||
unitsCombo.select(0);
|
||||
|
||||
}
|
||||
|
||||
if (PRIORITY_TYPE.equals(ruleType)) {
|
||||
|
@ -479,7 +485,6 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
priorityCombo.select(0);
|
||||
|
||||
} else {
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gl = new GridLayout(3, false);
|
||||
|
@ -505,19 +510,16 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
Label minutesLbl = new Label(latencySelectionComp, SWT.NONE);
|
||||
minutesLbl.setLayoutData(gd);
|
||||
minutesLbl.setText("Minutes");
|
||||
|
||||
}
|
||||
|
||||
populateFields();
|
||||
ruleDefinitionGroup.pack();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Upon edit, populate the fields.
|
||||
*/
|
||||
private void populateFields() {
|
||||
|
||||
if (!create) {
|
||||
String field = ruleXml.getRuleField();
|
||||
if (!field.isEmpty()) {
|
||||
|
@ -528,8 +530,8 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
|
||||
updateSelectionFields(field);
|
||||
|
||||
String operator = ruleXml.getRuleOperator();
|
||||
operationCombo.select(operationCombo.indexOf(operator));
|
||||
operationCombo.select(operationCombo.indexOf(OperatorAdapter
|
||||
.toString(ruleXml.getRuleOperator())));
|
||||
|
||||
String value = ruleXml.getRuleValue();
|
||||
if (!value.isEmpty()) {
|
||||
|
@ -542,17 +544,17 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
if (PRIORITY_TYPE.equals(ruleType)) {
|
||||
Integer priority = ((PriorityRuleXML) ruleXml).getPriority();
|
||||
SubscriptionPriority priority = ((PriorityRuleXML) ruleXml)
|
||||
.getPriority();
|
||||
|
||||
int o = 0;
|
||||
SubscriptionPriority[] priorityOptions = SubscriptionPriority
|
||||
.values();
|
||||
for (SubscriptionPriority item : priorityOptions) {
|
||||
if (priority == item.getPriorityValue()) {
|
||||
priorityCombo.select(o);
|
||||
if (priority == item) {
|
||||
priorityCombo.select(priorityCombo.indexOf(priority
|
||||
.getPriorityName()));
|
||||
break;
|
||||
}
|
||||
o++;
|
||||
}
|
||||
} else {
|
||||
Integer latency = ((LatencyRuleXML) ruleXml).getLatency();
|
||||
|
@ -600,7 +602,6 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
close();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -646,8 +647,15 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
|
||||
boolean valid = false;
|
||||
String fieldName = fieldCombo.getItem(fieldCombo.getSelectionIndex());
|
||||
String operator = operationCombo.getItem(operationCombo
|
||||
.getSelectionIndex());
|
||||
Operator operator = OperatorAdapter.fromString(operationCombo
|
||||
.getItem(operationCombo.getSelectionIndex()));
|
||||
|
||||
List<String> ruleNames = null;
|
||||
if (PRIORITY_TYPE.equals(ruleType)) {
|
||||
ruleNames = srm.getPriorityRuleNames();
|
||||
} else {
|
||||
ruleNames = srm.getLatencyRuleNames();
|
||||
}
|
||||
|
||||
if (create) {
|
||||
valid = DataDeliveryGUIUtils.hasText(ruleNameText);
|
||||
|
@ -661,13 +669,29 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
ruleName = ruleNameText.getText();
|
||||
|
||||
if (INVALID_PATTERN.matcher(ruleName.trim()).find()) {
|
||||
DataDeliveryUtils.showMessage(getShell(), SWT.ERROR,
|
||||
INVALID_CHARS_TITLE, INVALID_CHARS_MESSAGE);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for duplicate rule name
|
||||
if (ruleNames.contains(ruleName)) {
|
||||
DataDeliveryUtils
|
||||
.showMessage(
|
||||
shell,
|
||||
SWT.ERROR,
|
||||
"Duplicate Rule",
|
||||
"A rule titled "
|
||||
+ ruleName
|
||||
+ " already exists.\n\nPlease select a different name.");
|
||||
ruleNameText.selectAll();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (INVALID_PATTERN.matcher(ruleName.trim()).find()) {
|
||||
DataDeliveryUtils.showMessage(getShell(), SWT.ERROR,
|
||||
INVALID_CHARS_TITLE, INVALID_CHARS_MESSAGE);
|
||||
return false;
|
||||
}
|
||||
String value = null;
|
||||
if (DataDeliveryGUIUtils.hasText(ruleValue)) {
|
||||
value = ruleValue.getText();
|
||||
|
@ -709,12 +733,11 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
|
||||
if (PRIORITY_TYPE.equals(ruleType)) {
|
||||
PriorityRuleXML rule = new PriorityRuleXML();
|
||||
priorityVal = SubscriptionPriority.valueOf(priorityCombo.getText()
|
||||
.toUpperCase());
|
||||
priorityVal = SubscriptionPriority.fromPriorityName(priorityCombo
|
||||
.getText());
|
||||
for (SubscriptionPriority pri : SubscriptionPriority.values()) {
|
||||
if (pri.equals(priorityVal)) {
|
||||
priority = pri.getPriorityValue();
|
||||
(rule).setPriority(priority);
|
||||
rule.setPriority(pri);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -768,21 +791,12 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
setReturnValue(saved);
|
||||
|
||||
if (!saved) {
|
||||
DataDeliveryUtils
|
||||
.showMessage(
|
||||
getShell(),
|
||||
SWT.OK,
|
||||
"Duplicate Name",
|
||||
"A rule named "
|
||||
+ ruleName
|
||||
+ " already exists\n\nPlease select a different name.");
|
||||
ruleNameText.selectAll();
|
||||
}
|
||||
return saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the units combo.
|
||||
*/
|
||||
private void createSizeUnitItems() {
|
||||
unitsCombo.removeAll();
|
||||
DataSizeUnit[] sizeUnits = DataSizeUnit.values();
|
||||
|
@ -791,6 +805,9 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the operation combo.
|
||||
*/
|
||||
private void createSizeOpItems() {
|
||||
operationCombo.removeAll();
|
||||
OperatorTypes[] sizeOps = OperatorTypes.values();
|
||||
|
@ -799,6 +816,9 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the frequency units combo.
|
||||
*/
|
||||
private void createFreqUnitItems() {
|
||||
FreqUnitOptions[] freqUnits = FreqUnitOptions.values();
|
||||
for (FreqUnitOptions fuo : freqUnits) {
|
||||
|
@ -806,6 +826,9 @@ public class CreateEditRuleDlg extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* populate the operation combo.
|
||||
*/
|
||||
private void createNameOpItems() {
|
||||
operationCombo.removeAll();
|
||||
NameOperationItems[] nameOperation = NameOperationItems.values();
|
||||
|
|
|
@ -1,54 +1,44 @@
|
|||
/**
|
||||
* 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.common.stats.util;
|
||||
package com.raytheon.uf.viz.datadelivery.system;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* Rules file update notifier interface.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 27, 2012 mpduff Initial creation
|
||||
*
|
||||
* Jan 16, 2013 1420 mpduff Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class DataViewUtils {
|
||||
public enum DataView {
|
||||
AVG("Average"), MIN("Minimum"), MAX("Maximum"),
|
||||
SUM("Sum"), COUNT("Count");
|
||||
|
||||
private final String view;
|
||||
|
||||
private DataView(String view) {
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
public String getView() {
|
||||
return view;
|
||||
}
|
||||
}
|
||||
public interface IRulesUpdateListener {
|
||||
/**
|
||||
* Update rules.
|
||||
*/
|
||||
void update();
|
||||
}
|
|
@ -19,6 +19,10 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.datadelivery.system;
|
||||
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.xml.OperatorAdapter;
|
||||
|
||||
/**
|
||||
* Operator interface.
|
||||
*
|
||||
|
@ -28,14 +32,15 @@ package com.raytheon.uf.viz.datadelivery.system;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 7, 2013 mpduff Initial creation
|
||||
* Jan 07, 2013 mpduff Initial creation
|
||||
* Jan 14, 2013 djohnson Specify JAXB adapter on the interface.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlJavaTypeAdapter(value = OperatorAdapter.class)
|
||||
public interface Operator<T> {
|
||||
/**
|
||||
* Evaluate whether the operator would return true when comparing operandOne
|
||||
|
|
|
@ -52,6 +52,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
|||
* Sep 17, 2012 730 jpiatt Initial creation.
|
||||
* Oct 03, 2012 1241 djohnson Use {@link DataDeliveryPermission} and registry handlers.
|
||||
* Jan 04, 2012 1420 mpduff Add delete rule function.
|
||||
* Jan 14, 2013 1286 djohnson Rule list is single item selectable.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -134,7 +135,7 @@ public class SystemLatencyTab {
|
|||
gd.heightHint = 200;
|
||||
|
||||
latencyList = new List(latencyComp, SWT.BORDER | SWT.MULTI
|
||||
| SWT.V_SCROLL | SWT.H_SCROLL);
|
||||
| SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE);
|
||||
latencyList.setLayoutData(gd);
|
||||
latencyList.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
@ -262,10 +263,7 @@ public class SystemLatencyTab {
|
|||
ruleDlg = new CreateEditRuleDlg(parentComp.getShell(),
|
||||
create, ruleName, LATENCY_TYPE);
|
||||
}
|
||||
boolean reloadFlag = (Boolean) ruleDlg.open();
|
||||
if (reloadFlag) {
|
||||
loadList();
|
||||
}
|
||||
ruleDlg.open();
|
||||
} else {
|
||||
ruleDlg.bringToTop();
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ 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.util.StringUtil;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.SubscriptionService.ForceApplyPromptResponse;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.SubscriptionService.IForceApplyPromptDisplayText;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
||||
|
@ -64,6 +65,8 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* Oct 23, 2012 1286 djohnson Hook into bandwidth management.
|
||||
* Nov 20, 2012 1286 djohnson Implement IDisplay.
|
||||
* Jan 04, 2013 1420 mpduff Remove applying of rules.
|
||||
* Jan 17, 2013 1501 djohnson Close the dialog when force apply occurs,
|
||||
* and check whether changes have already been applied when OK is pressed.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -71,7 +74,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* @version 1.0
|
||||
*/
|
||||
public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
||||
IForceApplyPromptDisplayText {
|
||||
IForceApplyPromptDisplayText, IRulesUpdateListener {
|
||||
|
||||
/** Status Handler */
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
|
@ -128,10 +131,18 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
/** OK button */
|
||||
private Button okBtn;
|
||||
|
||||
/** Available bandwidth modified flag */
|
||||
private boolean availableBandwidthModified;
|
||||
|
||||
/** Available bandwidth spinner widget */
|
||||
private Spinner availBandwidthSpinner;
|
||||
|
||||
/** The system latency tab */
|
||||
private SystemLatencyTab lTab;
|
||||
|
||||
/** The system priority tab */
|
||||
private SystemPriorityTab pTab;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
@ -141,6 +152,7 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
public SystemManagementDlg(Shell parent) {
|
||||
super(parent, SWT.DIALOG_TRIM, CAVE.NONE);
|
||||
setText("Data Delivery System Management");
|
||||
SystemRuleManager.getInstance().registerAsListener(this);
|
||||
|
||||
}
|
||||
|
||||
|
@ -181,6 +193,17 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#disposed()
|
||||
*/
|
||||
@Override
|
||||
protected void disposed() {
|
||||
super.disposed();
|
||||
SystemRuleManager.getInstance().deregisterAsListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create top bar route information.
|
||||
*/
|
||||
|
@ -283,7 +306,7 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
priorityComp.setLayout(gl);
|
||||
priorityComp.setLayoutData(gd);
|
||||
priorityTab.setControl(priorityComp);
|
||||
SystemPriorityTab pTab = new SystemPriorityTab(priorityComp);
|
||||
pTab = new SystemPriorityTab(priorityComp);
|
||||
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gl = new GridLayout(1, false);
|
||||
|
@ -296,7 +319,7 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
latencyComp.setLayout(gl);
|
||||
latencyComp.setLayoutData(gd);
|
||||
latencyTab.setControl(latencyComp);
|
||||
SystemLatencyTab lTab = new SystemLatencyTab(latencyComp);
|
||||
lTab = new SystemLatencyTab(latencyComp);
|
||||
|
||||
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
|
||||
gl = new GridLayout(1, false);
|
||||
|
@ -309,6 +332,9 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
routingComp.setLayoutData(gd);
|
||||
routingTab.setControl(routingComp);
|
||||
SystemRoutingTab rTab = new SystemRoutingTab(routingComp);
|
||||
|
||||
lTab.loadList();
|
||||
pTab.loadList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -413,21 +439,26 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
sb.append("Would you like to change the bandwidth anyways?.");
|
||||
int response = DataDeliveryUtils.showMessage(getShell(),
|
||||
SWT.YES | SWT.NO, "Bandwidth Amount", sb.toString());
|
||||
boolean forceApplied = false;
|
||||
if (response == SWT.YES) {
|
||||
boolean forceApplied = SystemRuleManager
|
||||
forceApplied = SystemRuleManager
|
||||
.forceSetAvailableBandwidth(Network.OPSNET,
|
||||
bandwidth);
|
||||
if (!forceApplied) {
|
||||
if (forceApplied) {
|
||||
availableBandwidthModified = false;
|
||||
} else {
|
||||
statusHandler
|
||||
.handle(Priority.ERROR,
|
||||
"Bandwidth Change",
|
||||
"Unable to change the bandwidth for network "
|
||||
+ Network.OPSNET
|
||||
+ ". Please check the server for details.");
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return forceApplied;
|
||||
} else {
|
||||
availableBandwidthModified = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -466,4 +497,17 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay,
|
|||
"Don't know how to handle option [" + option + "]");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!shell.isDisposed()) {
|
||||
lTab.loadList();
|
||||
pTab.loadList();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -268,10 +268,7 @@ public class SystemPriorityTab {
|
|||
create, ruleName, PRIORITY_TYPE);
|
||||
}
|
||||
|
||||
boolean reloadFlag = (Boolean) ruleDlg.open();
|
||||
if (reloadFlag) {
|
||||
loadList();
|
||||
}
|
||||
ruleDlg.open();
|
||||
} else {
|
||||
ruleDlg.bringToTop();
|
||||
}
|
||||
|
|
|
@ -32,6 +32,9 @@ import javax.xml.bind.Unmarshaller;
|
|||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthService;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Network;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionPriority;
|
||||
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;
|
||||
|
@ -64,6 +67,7 @@ import com.raytheon.uf.viz.datadelivery.utils.TypeOperationItems;
|
|||
* Sep 17, 2012 730 jpiatt Initial creation.
|
||||
* Oct 23, 2012 1286 djohnson Hook into bandwidth management.
|
||||
* Jan 04, 2013 1420 mpduff Move rules into a single file.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority is now an enum.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -89,6 +93,12 @@ public class SystemRuleManager {
|
|||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(SystemRuleManager.class);
|
||||
|
||||
/** Latency Rules Localization File */
|
||||
private LocalizationFile latencyRulesLocFile;
|
||||
|
||||
/** Priority Rules Localization File */
|
||||
private LocalizationFile priorityRulesLocFile;
|
||||
|
||||
/** JAXB context */
|
||||
private JAXBContext jax;
|
||||
|
||||
|
@ -101,11 +111,21 @@ public class SystemRuleManager {
|
|||
/** Bandwidth service */
|
||||
private IBandwidthService bandwidthService;
|
||||
|
||||
/** Latency Rules XML object */
|
||||
private LatencyRulesXML latencyRules;
|
||||
|
||||
/** Priority Rules XML object */
|
||||
private PriorityRulesXML priorityRules;
|
||||
|
||||
private final List<IRulesUpdateListener> listeners = new ArrayList<IRulesUpdateListener>();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
private SystemRuleManager() {
|
||||
createContext();
|
||||
loadLatencyRules();
|
||||
loadPriorityRules();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -144,7 +164,7 @@ public class SystemRuleManager {
|
|||
* @throws JAXBException
|
||||
*/
|
||||
public List<String> getPriorityRuleNames() {
|
||||
return getPriorityRules().getRuleNames();
|
||||
return getPriorityRules(false).getRuleNames();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -154,8 +174,8 @@ public class SystemRuleManager {
|
|||
* the name of the rule
|
||||
* @return the PriorityRuleXML object
|
||||
*/
|
||||
public PriorityRuleXML loadPriorityRule(String name) {
|
||||
PriorityRulesXML priorityRules = getPriorityRules();
|
||||
public PriorityRuleXML getPriorityRule(String name) {
|
||||
PriorityRulesXML priorityRules = getPriorityRules(false);
|
||||
for (PriorityRuleXML rule : priorityRules.getRules()) {
|
||||
if (rule.getRuleName().equals(name)) {
|
||||
return rule;
|
||||
|
@ -172,8 +192,8 @@ public class SystemRuleManager {
|
|||
* the name of the rule
|
||||
* @return the LatencyRuleXML object
|
||||
*/
|
||||
public LatencyRuleXML loadLatencyRule(String name) {
|
||||
LatencyRulesXML latencyRules = getLatencyRules();
|
||||
public LatencyRuleXML getLatencyRule(String name) {
|
||||
LatencyRulesXML latencyRules = getLatencyRules(false);
|
||||
for (LatencyRuleXML rule : latencyRules.getRules()) {
|
||||
if (rule.getRuleName().equals(name)) {
|
||||
return rule;
|
||||
|
@ -190,7 +210,7 @@ public class SystemRuleManager {
|
|||
* @throws JAXBException
|
||||
*/
|
||||
public List<String> getLatencyRuleNames() {
|
||||
return getLatencyRules().getRuleNames();
|
||||
return getLatencyRules(false).getRuleNames();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -203,15 +223,22 @@ public class SystemRuleManager {
|
|||
public boolean savePriorityRules(PriorityRulesXML xmlObj) {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
|
||||
LocalizationContext context = pm.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
LocalizationFile priorityRulesLocFile = pm.getLocalizationFile(context,
|
||||
this.PRIORITY_RULE_FILE);
|
||||
|
||||
try {
|
||||
marshaller.marshal(xmlObj, priorityRulesLocFile.getFile());
|
||||
priorityRulesLocFile.save();
|
||||
return true;
|
||||
// If site, then write out, otherwise save it as site.
|
||||
if (priorityRulesLocFile.getContext().getLocalizationLevel()
|
||||
.equals(LocalizationLevel.SITE)) {
|
||||
marshaller.marshal(xmlObj, priorityRulesLocFile.getFile());
|
||||
return priorityRulesLocFile.save();
|
||||
} else {
|
||||
LocalizationContext context = pm.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
|
||||
priorityRulesLocFile = pm.getLocalizationFile(context,
|
||||
this.PRIORITY_RULE_FILE);
|
||||
addPriorityRulesFileObserver();
|
||||
marshaller.marshal(xmlObj, priorityRulesLocFile.getFile());
|
||||
return priorityRulesLocFile.save();
|
||||
}
|
||||
} catch (JAXBException e) {
|
||||
statusHandler.handle(Priority.ERROR, e.getLocalizedMessage(), e);
|
||||
} catch (LocalizationOpFailedException e) {
|
||||
|
@ -231,15 +258,22 @@ public class SystemRuleManager {
|
|||
public boolean saveLatencyRules(LatencyRulesXML xmlObj) {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
|
||||
LocalizationContext context = pm.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
LocalizationFile latencyRulesLocFile = pm.getLocalizationFile(context,
|
||||
this.LATENCY_RULE_FILE);
|
||||
|
||||
try {
|
||||
marshaller.marshal(xmlObj, latencyRulesLocFile.getFile());
|
||||
latencyRulesLocFile.save();
|
||||
return true;
|
||||
// If site, then write out, otherwise save it as site.
|
||||
if (latencyRulesLocFile.getContext().getLocalizationLevel()
|
||||
.equals(LocalizationLevel.SITE)) {
|
||||
marshaller.marshal(xmlObj, latencyRulesLocFile.getFile());
|
||||
return latencyRulesLocFile.save();
|
||||
} else {
|
||||
LocalizationContext context = pm.getContext(
|
||||
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
|
||||
|
||||
latencyRulesLocFile = pm.getLocalizationFile(context,
|
||||
this.LATENCY_RULE_FILE);
|
||||
addLatencyRulesFileObserver();
|
||||
marshaller.marshal(xmlObj, latencyRulesLocFile.getFile());
|
||||
return latencyRulesLocFile.save();
|
||||
}
|
||||
} catch (JAXBException e) {
|
||||
statusHandler.handle(Priority.ERROR, e.getLocalizedMessage(), e);
|
||||
} catch (LocalizationOpFailedException e) {
|
||||
|
@ -256,7 +290,7 @@ public class SystemRuleManager {
|
|||
* the rule name to delete
|
||||
*/
|
||||
public void deleteLatencyRule(String ruleName) {
|
||||
LatencyRulesXML latencyRules = getLatencyRules();
|
||||
LatencyRulesXML latencyRules = getLatencyRules(false);
|
||||
|
||||
for (LatencyRuleXML rule : latencyRules.getRules()) {
|
||||
if (rule.getRuleName().equals(ruleName)) {
|
||||
|
@ -274,7 +308,7 @@ public class SystemRuleManager {
|
|||
* the rule name to delete
|
||||
*/
|
||||
public void deletePriorityRule(String ruleName) {
|
||||
PriorityRulesXML priorityRules = getPriorityRules();
|
||||
PriorityRulesXML priorityRules = getPriorityRules(false);
|
||||
|
||||
for (PriorityRuleXML rule : priorityRules.getRules()) {
|
||||
if (rule.getRuleName().equals(ruleName)) {
|
||||
|
@ -293,7 +327,7 @@ public class SystemRuleManager {
|
|||
* @return true if updated
|
||||
*/
|
||||
public boolean updateRule(LatencyRuleXML rule) {
|
||||
LatencyRulesXML rulesXml = getLatencyRules();
|
||||
LatencyRulesXML rulesXml = getLatencyRules(false);
|
||||
boolean saved = rulesXml.updateRule(rule);
|
||||
if (saved) {
|
||||
return saveLatencyRules(rulesXml);
|
||||
|
@ -310,7 +344,7 @@ public class SystemRuleManager {
|
|||
* @return true if updated
|
||||
*/
|
||||
public boolean updateRule(PriorityRuleXML rule) {
|
||||
PriorityRulesXML rulesXml = getPriorityRules();
|
||||
PriorityRulesXML rulesXml = getPriorityRules(false);
|
||||
boolean saved = rulesXml.updateRule(rule);
|
||||
if (saved) {
|
||||
saved = savePriorityRules(rulesXml);
|
||||
|
@ -331,7 +365,7 @@ public class SystemRuleManager {
|
|||
* @return true if updated
|
||||
*/
|
||||
public boolean saveRule(PriorityRuleXML rule) {
|
||||
PriorityRulesXML rulesXml = getPriorityRules();
|
||||
PriorityRulesXML rulesXml = getPriorityRules(false);
|
||||
boolean saved = rulesXml.addRule(rule);
|
||||
if (saved) {
|
||||
saved = savePriorityRules(rulesXml);
|
||||
|
@ -352,7 +386,7 @@ public class SystemRuleManager {
|
|||
* @return true if updated
|
||||
*/
|
||||
public boolean saveRule(LatencyRuleXML rule) {
|
||||
LatencyRulesXML rulesXml = getLatencyRules();
|
||||
LatencyRulesXML rulesXml = getLatencyRules(false);
|
||||
boolean saved = rulesXml.addRule(rule);
|
||||
if (saved) {
|
||||
saved = saveLatencyRules(rulesXml);
|
||||
|
@ -368,19 +402,23 @@ public class SystemRuleManager {
|
|||
/**
|
||||
* Get the latency rules.
|
||||
*
|
||||
* @param reread
|
||||
* true to reread the file from disk
|
||||
*
|
||||
* @return The latency rules xml object
|
||||
*/
|
||||
private LatencyRulesXML getLatencyRules() {
|
||||
LocalizationFile lfile = getRules(this.LATENCY_RULE_FILE);
|
||||
|
||||
LatencyRulesXML latencyRules = new LatencyRulesXML();
|
||||
if (lfile != null && lfile.exists()) {
|
||||
try {
|
||||
latencyRules = (LatencyRulesXML) unmarshaller.unmarshal(lfile
|
||||
.getFile());
|
||||
} catch (JAXBException e) {
|
||||
statusHandler
|
||||
.handle(Priority.ERROR, e.getLocalizedMessage(), e);
|
||||
private LatencyRulesXML getLatencyRules(boolean reread) {
|
||||
if (latencyRules == null || reread) {
|
||||
if (this.latencyRulesLocFile != null
|
||||
&& latencyRulesLocFile.exists()) {
|
||||
try {
|
||||
latencyRules = (LatencyRulesXML) unmarshaller
|
||||
.unmarshal(latencyRulesLocFile.getFile());
|
||||
} catch (JAXBException e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
e.getLocalizedMessage(), e);
|
||||
latencyRules = new LatencyRulesXML();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -390,34 +428,26 @@ public class SystemRuleManager {
|
|||
/**
|
||||
* Get the priority rules
|
||||
*
|
||||
* @param reread
|
||||
* true to reread the file from disk
|
||||
*
|
||||
* @return The priority rules xml object
|
||||
*/
|
||||
private PriorityRulesXML getPriorityRules() {
|
||||
LocalizationFile lfile = getRules(this.PRIORITY_RULE_FILE);
|
||||
|
||||
PriorityRulesXML priorityRules = new PriorityRulesXML();
|
||||
if (lfile != null && lfile.exists()) {
|
||||
try {
|
||||
priorityRules = (PriorityRulesXML) unmarshaller.unmarshal(lfile
|
||||
.getFile());
|
||||
} catch (JAXBException e) {
|
||||
statusHandler
|
||||
.handle(Priority.ERROR, e.getLocalizedMessage(), e);
|
||||
private PriorityRulesXML getPriorityRules(boolean reread) {
|
||||
if (priorityRules == null || reread)
|
||||
if (this.priorityRulesLocFile != null
|
||||
&& priorityRulesLocFile.exists()) {
|
||||
try {
|
||||
priorityRules = (PriorityRulesXML) unmarshaller
|
||||
.unmarshal(priorityRulesLocFile.getFile());
|
||||
} catch (JAXBException e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
e.getLocalizedMessage(), e);
|
||||
priorityRules = new PriorityRulesXML();
|
||||
}
|
||||
}
|
||||
}
|
||||
return priorityRules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the rules files
|
||||
*
|
||||
* @param name
|
||||
* Rules file name to get
|
||||
* @return The localization file
|
||||
*/
|
||||
private LocalizationFile getRules(String name) {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
return pm.getStaticLocalizationFile(name);
|
||||
return priorityRules;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -442,7 +472,7 @@ public class SystemRuleManager {
|
|||
* @return
|
||||
*/
|
||||
public int getLatency(Subscription sub, Set<Integer> cycleTimes) {
|
||||
LatencyRulesXML rulesXml = this.getLatencyRules();
|
||||
LatencyRulesXML rulesXml = this.getLatencyRules(false);
|
||||
int latency = 999;
|
||||
boolean found = false;
|
||||
for (LatencyRuleXML rule : rulesXml.getRules()) {
|
||||
|
@ -470,22 +500,23 @@ public class SystemRuleManager {
|
|||
* @param cycleTimes
|
||||
* @return
|
||||
*/
|
||||
public int getPriority(Subscription sub, Set<Integer> cycleTimes) {
|
||||
PriorityRulesXML rulesXml = this.getPriorityRules();
|
||||
int priority = 3;
|
||||
boolean found = false;
|
||||
public SubscriptionPriority getPriority(Subscription sub,
|
||||
Set<Integer> cycleTimes) {
|
||||
PriorityRulesXML rulesXml = this.getPriorityRules(false);
|
||||
SubscriptionPriority priority = null;
|
||||
for (PriorityRuleXML rule : rulesXml.getRules()) {
|
||||
if (rule.matches(sub, cycleTimes)) {
|
||||
if (rule.getPriority() < priority) {
|
||||
if (priority == null
|
||||
|| rule.getPriority().getPriorityValue() < priority
|
||||
.getPriorityValue()) {
|
||||
priority = rule.getPriority();
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Default to normal priority
|
||||
if (!found) {
|
||||
priority = 2;
|
||||
if (priority == null) {
|
||||
priority = SubscriptionPriority.NORMAL;
|
||||
}
|
||||
|
||||
return priority;
|
||||
|
@ -546,4 +577,87 @@ public class SystemRuleManager {
|
|||
return getInstance().bandwidthService
|
||||
.setBandwidthForNetworkInKilobytes(network, bandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the latency rules file.
|
||||
*/
|
||||
private void loadLatencyRules() {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
this.latencyRulesLocFile = pm
|
||||
.getStaticLocalizationFile(this.LATENCY_RULE_FILE);
|
||||
addLatencyRulesFileObserver();
|
||||
getLatencyRules(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the priority rules file.
|
||||
*/
|
||||
private void loadPriorityRules() {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
this.priorityRulesLocFile = pm
|
||||
.getStaticLocalizationFile(this.PRIORITY_RULE_FILE);
|
||||
addPriorityRulesFileObserver();
|
||||
getPriorityRules(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a file observer to the latency rules file to get notified when the
|
||||
* file changes.
|
||||
*/
|
||||
private void addLatencyRulesFileObserver() {
|
||||
latencyRulesLocFile
|
||||
.addFileUpdatedObserver(new ILocalizationFileObserver() {
|
||||
@Override
|
||||
public void fileUpdated(FileUpdatedMessage message) {
|
||||
loadLatencyRules();
|
||||
fireUpdates();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a file observer to the priority rules file to get notified when the
|
||||
* file changes.
|
||||
*/
|
||||
private void addPriorityRulesFileObserver() {
|
||||
priorityRulesLocFile
|
||||
.addFileUpdatedObserver(new ILocalizationFileObserver() {
|
||||
@Override
|
||||
public void fileUpdated(FileUpdatedMessage message) {
|
||||
loadPriorityRules();
|
||||
fireUpdates();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the listeners the files changed.
|
||||
*/
|
||||
private void fireUpdates() {
|
||||
for (IRulesUpdateListener listener : listeners) {
|
||||
listener.update();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register as a listener for rules file changes.
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void registerAsListener(IRulesUpdateListener listener) {
|
||||
if (!listeners.contains(listener)) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister as a listener for rules files changed.
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void deregisterAsListener(IRulesUpdateListener listener) {
|
||||
if (listeners.contains(listener)) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,10 +25,7 @@ import java.util.Date;
|
|||
import java.util.TimeZone;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.xml.bind.annotation.XmlEnumValue;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
|
@ -55,6 +52,7 @@ import com.raytheon.uf.viz.core.VizApp;
|
|||
* Dec 17, 2012 1435 mpduff Fix ThreadLocal implementation.
|
||||
* Dec 18, 2012 1439 mpduff Change Regex to match invalid chars.
|
||||
* Jan 04, 2013 1420 mpduff Change default priority to normal priority.
|
||||
* Jan 25, 2013 1528 djohnson Subscription priority has moved up in the world to the Subscription class.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -108,67 +106,6 @@ public class DataDeliveryGUIUtils {
|
|||
/** Name Required Message */
|
||||
public static final String NAME_REQUIRED_MESSAGE = "Name required.\nA Subscription Name must be entered.";
|
||||
|
||||
/** Enumeration to use for subscription priorities */
|
||||
public static enum SubscriptionPriority {
|
||||
/** High Priority */
|
||||
@XmlEnumValue("High")
|
||||
HIGH("High", 1, new RGB(255, 0, 0)),
|
||||
/** Default Priority */
|
||||
@XmlEnumValue("Normal")
|
||||
NORMAL("Normal", 2, new RGB(0, 255, 0)),
|
||||
/** Low Priority */
|
||||
@XmlEnumValue("Low")
|
||||
LOW("Low", 3, new RGB(6, 122, 255));
|
||||
|
||||
/** Priority Setting */
|
||||
private final String priorityName;
|
||||
|
||||
/** Numeric Value of the priority */
|
||||
private Integer priorityValue;
|
||||
|
||||
/** Priority color for ui */
|
||||
private RGB color;
|
||||
|
||||
private SubscriptionPriority(String priorityName,
|
||||
Integer priorityValue, RGB color) {
|
||||
this.priorityName = priorityName;
|
||||
this.priorityValue = priorityValue;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get column name.
|
||||
*
|
||||
* @return Priority Name
|
||||
*/
|
||||
public String getPriorityName() {
|
||||
return priorityName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the integer value of the priority
|
||||
*
|
||||
* @return The integer value of the priority.
|
||||
*/
|
||||
public Integer getPriorityValue() {
|
||||
return priorityValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return priorityName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the color.
|
||||
*
|
||||
* @return the color
|
||||
*/
|
||||
public RGB getColor() {
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.eclipse.swt.widgets.Shell;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSet;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
|
@ -57,9 +58,11 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Jul 25, 2012 955 djohnson Use List instead of ArrayList, thread-safe access to DecimalFormat.
|
||||
* Aug 29, 2012 223 mpduff Add cycles to the subscription details.
|
||||
* Oct 31, 2012 1278 mpduff Moved spatial methods to SpatialUtils.
|
||||
* Nov 20, 2012 1286 djohnson Add showYesNoMessage.
|
||||
* Dec 20, 2012 1413 bgonzale Added PendingSubColumnNames.valueOfColumnName(String).
|
||||
* Jan 10, 2013 1420 mdpuff Added getMaxLatency().
|
||||
* Nov 20, 2012 1286 djohnson Add showYesNoMessage.
|
||||
* Dec 20, 2012 1413 bgonzale Added PendingSubColumnNames.valueOfColumnName(String).
|
||||
* Jan 10, 2013 1420 mdpuff Added getMaxLatency().
|
||||
* Jan 14, 2013 1286 djohnson Fix IndexOutOfBounds exception from getMaxLatency.
|
||||
* Jan 22, 2013 1519 djohnson Correct getMaxLatency() calculations.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -68,6 +71,18 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
|
||||
public class DataDeliveryUtils {
|
||||
|
||||
/**
|
||||
* Default latency applied to hourly datasets.
|
||||
*/
|
||||
public static final int HOURLY_DATASET_LATENCY_IN_MINUTES = 40;
|
||||
|
||||
/**
|
||||
* Default latency applied non-hourly datasets.
|
||||
*/
|
||||
public static final int NON_HOURLY_DATASET_LATENCY_IN_MINUTES = 75;
|
||||
|
||||
private static final int UNSET = -1;
|
||||
|
||||
/** Decimal format */
|
||||
private final static ThreadLocal<DecimalFormat> format = new ThreadLocal<DecimalFormat>() {
|
||||
|
||||
|
@ -438,7 +453,8 @@ public class DataDeliveryUtils {
|
|||
.append(newline);
|
||||
fmtStr.append("Provider : ").append(sub.getProvider()).append(newline);
|
||||
fmtStr.append("Office ID: ").append(sub.getOfficeID()).append(newline);
|
||||
fmtStr.append("Priority : ").append(sub.getPriority()).append(newline);
|
||||
fmtStr.append("Priority : ")
|
||||
.append(sub.getPriority().getPriorityValue()).append(newline);
|
||||
|
||||
fmtStr.append("Coverage: ").append(newline);
|
||||
final Coverage coverage = sub.getCoverage();
|
||||
|
@ -550,18 +566,48 @@ public class DataDeliveryUtils {
|
|||
* @return the maximum latency in minutes
|
||||
*/
|
||||
public static int getMaxLatency(Subscription subscription) {
|
||||
List<Integer> cycles = subscription.getTime().getCycleTimes();
|
||||
Collections.sort(cycles);
|
||||
int max = TimeUtil.HOURS_PER_DAY * TimeUtil.MINUTES_PER_HOUR;
|
||||
return getMaxLatency(subscription.getTime().getCycleTimes());
|
||||
}
|
||||
|
||||
for (int i = 0; i < cycles.size(); i++) {
|
||||
if (i + 1 <= cycles.size()) {
|
||||
int tempMax = cycles.get(i + 1) - cycles.get(i);
|
||||
if (tempMax > max) {
|
||||
max = tempMax;
|
||||
}
|
||||
/**
|
||||
* Get the maximum latency for the provided cycles. Calculated as the
|
||||
* maximum cyclic difference.
|
||||
*
|
||||
* @param cycles
|
||||
* The list of cycles
|
||||
* @return the maximum latency in minutes
|
||||
*/
|
||||
public static int getMaxLatency(List<Integer> cycles) {
|
||||
Collections.sort(cycles);
|
||||
int maximumTimeBetweenCycles = UNSET;
|
||||
|
||||
final int size = cycles.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
final int nextIndex = i + 1;
|
||||
if (nextIndex < size) {
|
||||
int tempMax = cycles.get(nextIndex) - cycles.get(i);
|
||||
maximumTimeBetweenCycles = Math.max(maximumTimeBetweenCycles, tempMax);
|
||||
}
|
||||
}
|
||||
return max;
|
||||
|
||||
// If there was only one cycle, then default to the number of minutes in
|
||||
// the day
|
||||
if (maximumTimeBetweenCycles == UNSET) {
|
||||
maximumTimeBetweenCycles = TimeUtil.HOURS_PER_DAY;
|
||||
}
|
||||
|
||||
return maximumTimeBetweenCycles * TimeUtil.MINUTES_PER_HOUR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the maximum latency for the provided dataSet. Calculated as the
|
||||
* maximum cyclic difference.
|
||||
*
|
||||
* @param dataSet
|
||||
* the dataset
|
||||
* @return the maximum latency in minutes
|
||||
*/
|
||||
public static int getMaxLatency(GriddedDataSet dataSet) {
|
||||
return getMaxLatency(new ArrayList<Integer>(dataSet.getCycles()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@ package com.raytheon.uf.viz.datadelivery.utils;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
||||
/**
|
||||
* Data Set Frequency Enumeration.
|
||||
*
|
||||
|
@ -30,7 +32,8 @@ import java.util.List;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 8, 2013 1420 mpduff Initial creation.
|
||||
* Jan 08, 2013 1420 mpduff Initial creation.
|
||||
* Jan 22, 2013 1519 djohnson Correct the non-hourly default latency to match requirements.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -39,8 +42,11 @@ import java.util.List;
|
|||
*/
|
||||
|
||||
public enum DataSetFrequency {
|
||||
HOURLY(40), SIX_HOURLY(115), TWELVE_HOURLY(115), DAILY(115);
|
||||
|
||||
HOURLY(DataDeliveryUtils.HOURLY_DATASET_LATENCY_IN_MINUTES), SIX_HOURLY(
|
||||
DataDeliveryUtils.NON_HOURLY_DATASET_LATENCY_IN_MINUTES), TWELVE_HOURLY(
|
||||
DataDeliveryUtils.NON_HOURLY_DATASET_LATENCY_IN_MINUTES), DAILY(
|
||||
DataDeliveryUtils.NON_HOURLY_DATASET_LATENCY_IN_MINUTES);
|
||||
|
||||
private int defaultLatency;
|
||||
|
||||
private DataSetFrequency(int defaultLatency) {
|
||||
|
@ -49,13 +55,14 @@ public enum DataSetFrequency {
|
|||
|
||||
public static DataSetFrequency fromCycleTimes(List<Integer> cycleTimes) {
|
||||
if (cycleTimes.size() > 1) {
|
||||
if ((cycleTimes.get(1) - cycleTimes.get(0)) == 1) {
|
||||
final int hoursBetweenCycles = cycleTimes.get(1) - cycleTimes.get(0);
|
||||
if (hoursBetweenCycles == 1) {
|
||||
return DataSetFrequency.HOURLY;
|
||||
} else if ((cycleTimes.get(1) - cycleTimes.get(0)) == 6) {
|
||||
} else if (hoursBetweenCycles == TimeUtil.HOURS_PER_QUARTER_DAY) {
|
||||
return DataSetFrequency.SIX_HOURLY;
|
||||
} else if ((cycleTimes.get(1) - cycleTimes.get(0)) == 12) {
|
||||
} else if (hoursBetweenCycles == TimeUtil.HOURS_PER_HALF_DAY) {
|
||||
return DataSetFrequency.TWELVE_HOURLY;
|
||||
} else if ((cycleTimes.get(1) - cycleTimes.get(0)) == 24) {
|
||||
} else if (hoursBetweenCycles == TimeUtil.HOURS_PER_DAY) {
|
||||
return DataSetFrequency.DAILY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ import com.raytheon.uf.common.datadelivery.event.notification.DeleteNotification
|
|||
import com.raytheon.uf.common.datadelivery.event.notification.DeleteNotificationResponse;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.GetNotificationRequest;
|
||||
import com.raytheon.uf.common.datadelivery.event.notification.NotificationRecord;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
|
||||
import com.raytheon.uf.common.serialization.comm.RequestRouter;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.notification.INotificationObserver;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationException;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationMessage;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.uf.viz.datadelivery.notification.xml.MessageLoadXML;
|
||||
|
||||
/**
|
||||
|
@ -29,6 +29,7 @@ import com.raytheon.uf.viz.datadelivery.notification.xml.MessageLoadXML;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 12, 2012 jsanchez Initial creation
|
||||
* Jan 22, 2013 1501 djohnson Route requests to datadelivery.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -115,10 +116,10 @@ public class NotificationHandler implements INotificationObserver {
|
|||
request.setUsername(username);
|
||||
request.setHours(hours);
|
||||
request.setMaxResults(maxResults);
|
||||
ArrayList<NotificationRecord> response = (ArrayList<NotificationRecord>) ThriftClient
|
||||
.sendRequest(request);
|
||||
ArrayList<NotificationRecord> response = (ArrayList<NotificationRecord>) RequestRouter
|
||||
.route(request, DataDeliveryConstants.DATA_DELIVERY_SERVER);
|
||||
return response;
|
||||
} catch (VizException e) {
|
||||
} catch (Exception e) {
|
||||
statusHandler.error(
|
||||
"Error trying to retrieve notifications from database", e);
|
||||
}
|
||||
|
@ -139,10 +140,10 @@ public class NotificationHandler implements INotificationObserver {
|
|||
try {
|
||||
DeleteNotificationRequest request = new DeleteNotificationRequest();
|
||||
request.setIds(ids);
|
||||
DeleteNotificationResponse response = (DeleteNotificationResponse) ThriftClient
|
||||
.sendRequest(request);
|
||||
DeleteNotificationResponse response = (DeleteNotificationResponse) RequestRouter
|
||||
.route(request, DataDeliveryConstants.DATA_DELIVERY_SERVER);
|
||||
rowsDeleted = response.getRowsDeleted();
|
||||
} catch (VizException e) {
|
||||
} catch (Exception e) {
|
||||
statusHandler.error(
|
||||
"Error trying to delete notification(s) from database", e);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.eclipse.ui.PlatformUI;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPBasin;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPBasinData;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPAggregateRecord;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPCacheRecord;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPGuidanceBasin;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPGuidanceInterpolation;
|
||||
|
@ -53,6 +54,7 @@ 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.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.HDF5Util;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
|
||||
|
@ -88,6 +90,8 @@ import com.raytheon.uf.viz.monitor.listeners.IMonitorListener;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 04/03/10 4494 D. Hladky Initial release
|
||||
* 12/07/12 1353 rferrel Changes for non-blocking FFMPSplash.
|
||||
* 01/10/13 1475 D. Hladky Cleaned up some logging.
|
||||
* 01/27/13 1478 D. Hladky revamped cache file format, removed duplicate times
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -473,28 +477,21 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @param siteKey
|
||||
* @param dataKey
|
||||
* @param source
|
||||
* @param huc
|
||||
*/
|
||||
public void insertFFMPData(FFMPBasinData data, String siteKey,
|
||||
String source, String huc) {
|
||||
public void insertFFMPData(FFMPAggregateRecord data, String siteKey,
|
||||
String source) {
|
||||
|
||||
final String fsiteKey = siteKey;
|
||||
final FFMPBasinData fdata = data;
|
||||
final String fsource = source;
|
||||
final String fhuc = huc;
|
||||
|
||||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (ffmpData.containsKey(fsiteKey)) {
|
||||
if (ffmpData.get(fsiteKey).containsKey(fsource)) {
|
||||
ffmpData.get(fsiteKey).get(fsource)
|
||||
.setBasinBuddyData(fdata, fhuc);
|
||||
}
|
||||
if (ffmpData.containsKey(siteKey)) {
|
||||
if (ffmpData.get(siteKey).containsKey(source)) {
|
||||
for (Entry<String, FFMPBasinData> entry : data.getBasinsMap()
|
||||
.entrySet()) {
|
||||
FFMPBasinData basinData = entry.getValue();
|
||||
basinData.populate(data.getTimes());
|
||||
ffmpData.get(siteKey).get(source)
|
||||
.setCacheData(basinData, basinData.getHucLevel());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -528,54 +525,35 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
public void populateFFMPBasin(String dataUri, String siteKey,
|
||||
String source, String phuc, FFMPBasin basin) throws VizException {
|
||||
|
||||
final String fdataUri = dataUri;
|
||||
final String fsiteKey = siteKey;
|
||||
final String fhuc = phuc;
|
||||
final String fsource = source;
|
||||
final FFMPBasin fbasin = basin;
|
||||
if (dataUri != null) {
|
||||
ConcurrentMap<String, String> uris = getUriMap(siteKey, source,
|
||||
phuc);
|
||||
if (!uris.containsKey(dataUri)) {
|
||||
try {
|
||||
SourceXML sourceXML = fscm.getSource(source);
|
||||
FFMPCacheRecord ffmpRec = populateFFMPRecord(true, dataUri,
|
||||
siteKey, source, phuc);
|
||||
File loc = HDF5Util.findHDF5Location(ffmpRec);
|
||||
IDataStore dataStore = DataStoreFactory.getDataStore(loc);
|
||||
|
||||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (fdataUri != null) {
|
||||
ConcurrentMap<String, String> uris = getUriMap(fsiteKey,
|
||||
fsource, fhuc);
|
||||
if (!uris.containsKey(fdataUri)) {
|
||||
try {
|
||||
SourceXML sourceXML = fscm.getSource(fsource);
|
||||
FFMPCacheRecord ffmpRec = populateFFMPRecord(true,
|
||||
fdataUri, fsiteKey, fsource, fhuc);
|
||||
// FFMPRecord ffmpRec =
|
||||
// loadRecordFromDatabase(fdataUri);
|
||||
File loc = HDF5Util.findHDF5Location(ffmpRec);
|
||||
IDataStore dataStore = DataStoreFactory
|
||||
.getDataStore(loc);
|
||||
|
||||
if (sourceXML.getSourceType().equals(
|
||||
SOURCE_TYPE.GAGE.getSourceType())
|
||||
&& fhuc.equals("ALL")) {
|
||||
ffmpRec.retrieveVirtualBasinFromDataStore(
|
||||
dataStore, fdataUri,
|
||||
getTemplates(fsiteKey), ffmpRec
|
||||
.getDataTime().getRefTime(),
|
||||
fbasin);
|
||||
} else {
|
||||
ffmpRec.retrieveBasinFromDataStore(dataStore,
|
||||
fdataUri, getTemplates(fsiteKey), fhuc,
|
||||
ffmpRec.getDataTime().getRefTime(),
|
||||
ffmpRec.getSourceName(), fbasin);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, "
|
||||
+ fdataUri, e);
|
||||
}
|
||||
if (sourceXML.getSourceType().equals(
|
||||
SOURCE_TYPE.GAGE.getSourceType())
|
||||
&& phuc.equals("ALL")) {
|
||||
ffmpRec.retrieveVirtualBasinFromDataStore(dataStore,
|
||||
dataUri, getTemplates(siteKey), ffmpRec
|
||||
.getDataTime().getRefTime(), basin);
|
||||
} else {
|
||||
ffmpRec.retrieveBasinFromDataStore(dataStore, dataUri,
|
||||
getTemplates(siteKey), phuc, ffmpRec
|
||||
.getDataTime().getRefTime(), ffmpRec
|
||||
.getSourceName(), basin);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, " + dataUri, e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -694,7 +672,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
|
||||
long timeOffset = source.getExpirationMinutes(siteKey) * 1000 * 60;
|
||||
long timeOffset = source.getExpirationMinutes(siteKey) * TimeUtil.MILLIS_PER_MINUTE;
|
||||
earliestTime = new Date(time.getTime() - timeOffset);
|
||||
}
|
||||
|
||||
|
@ -977,7 +955,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
hucsToLoad.clear();
|
||||
hucsToLoad.add("ALL");
|
||||
timeBack = new Date(resource.getMostRecentTime().getTime()
|
||||
- (3600 * 1000 * 24));
|
||||
- (TimeUtil.MILLIS_PER_HOUR * 24));
|
||||
}
|
||||
|
||||
frd.floader = new FFMPDataLoader(frd, timeBack, startTime, loadType,
|
||||
|
@ -1149,10 +1127,13 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
res.getResourceData().floader = null;
|
||||
int val = siteCount.get(res.getSiteKey());
|
||||
|
||||
// clear out the cache
|
||||
for (Entry<String, FFMPCacheRecord> entry : ffmpData.get(
|
||||
res.getSiteKey()).entrySet()) {
|
||||
entry.getValue().closeCache();
|
||||
// never opened a cache
|
||||
if (ffmpData.get(res.getSiteKey()) != null) {
|
||||
// clear out the cache
|
||||
for (Entry<String, FFMPCacheRecord> entry : ffmpData.get(
|
||||
res.getSiteKey()).entrySet()) {
|
||||
entry.getValue().closeCache();
|
||||
}
|
||||
}
|
||||
|
||||
if ((val == 1) && (siteCount.size() > 1)) {
|
||||
|
@ -2426,9 +2407,11 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
}
|
||||
} else {
|
||||
try {
|
||||
statusHandler.handle(Priority.INFO,
|
||||
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
|
||||
statusHandler.handle(Priority.DEBUG,
|
||||
"Retrieving and Populating URI: , "
|
||||
+ dataUri);
|
||||
}
|
||||
curRecord.retrieveMapFromDataStore(dataStore,
|
||||
dataUri,
|
||||
getTemplates(fffmpRec.getSiteKey()), fhuc,
|
||||
|
|
|
@ -29,8 +29,9 @@ import java.util.HashMap;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.NavigableMap;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPBasinData;
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPAggregateRecord;
|
||||
import com.raytheon.uf.common.monitor.config.FFMPRunConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.xml.FFMPRunXML;
|
||||
import com.raytheon.uf.common.monitor.xml.ProductRunXML;
|
||||
|
@ -40,6 +41,10 @@ import com.raytheon.uf.common.ohd.AppsDefaults;
|
|||
import com.raytheon.uf.common.serialization.DynamicSerializationManager;
|
||||
import com.raytheon.uf.common.serialization.DynamicSerializationManager.SerializationType;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
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.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.FFMPMonitor;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FFMPConfig;
|
||||
|
@ -57,6 +62,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.listeners.FFMPLoaderEvent;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 28 Feb, 2011 7587 dhladky Initial creation
|
||||
* 25 Jan, 2012 DR13839 gzhang Handle Uris and Huc processing
|
||||
* 01/27/13 1478 D. Hladky revamped the cache file format to help NAS overloading
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -64,8 +70,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.listeners.FFMPLoaderEvent;
|
|||
*/
|
||||
public class FFMPDataLoader extends Thread {
|
||||
|
||||
// private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
// .getHandler(FFMPDataLoader.class);
|
||||
private static final IUFStatusHandler statusHandler = UFStatus.getHandler(FFMPDataLoader.class);
|
||||
|
||||
private String sharePath = null;
|
||||
|
||||
|
@ -154,7 +159,7 @@ public class FFMPDataLoader extends Thread {
|
|||
|
||||
ProductRunXML productRun = runner.getProduct(siteKey);
|
||||
ArrayList<String> qpfSources = new ArrayList<String>();
|
||||
|
||||
String layer = config.getFFMPConfigData().getLayer();
|
||||
boolean isProductLoad = true;
|
||||
String rateURI = null;
|
||||
|
||||
|
@ -225,179 +230,159 @@ public class FFMPDataLoader extends Thread {
|
|||
hucsToLoad.add("ALL");
|
||||
}
|
||||
|
||||
for (String phuc : hucsToLoad) {
|
||||
if (isDone) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isDone) {
|
||||
return;
|
||||
// rate
|
||||
if (rateURI != null) {
|
||||
fireLoaderEvent(loadType, "Processing " + product.getRate(),
|
||||
isDone);
|
||||
for (String phuc : hucsToLoad) {
|
||||
getMonitor().processUri(isProductLoad, rateURI, siteKey,
|
||||
product.getRate(), timeBack, phuc);
|
||||
}
|
||||
fireLoaderEvent(loadType, product.getRate(), isDone);
|
||||
}
|
||||
|
||||
if (phuc.equals("VIRTUAL")) {
|
||||
// we don't do the virtuals like this
|
||||
continue;
|
||||
} else {
|
||||
// rate
|
||||
if (rateURI != null) {
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + product.getRate() + "/" + phuc,
|
||||
isDone);
|
||||
// qpes
|
||||
fireLoaderEvent(loadType, "Processing " + product.getQpe(), isDone);
|
||||
FFMPAggregateRecord qpeCache = null;
|
||||
|
||||
getMonitor().processUri(isProductLoad, rateURI,
|
||||
siteKey, product.getRate(), timeBack, phuc);
|
||||
fireLoaderEvent(loadType, product.getRate() + "/"
|
||||
+ phuc, isDone);
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
|
||||
SourceXML source = getMonitor().getSourceConfig().getSource(
|
||||
product.getQpe());
|
||||
|
||||
qpeCache = readCacheFile(source, dataKey, wfo);
|
||||
|
||||
if (qpeCache != null) {
|
||||
getMonitor().insertFFMPData(qpeCache, siteKey,
|
||||
product.getQpe());
|
||||
}
|
||||
}
|
||||
|
||||
// Use this method of QPE data retrieval if you don't have cache files
|
||||
if (!qpeURIs.isEmpty() && qpeCache == null) {
|
||||
for (String phuc : hucsToLoad) {
|
||||
if (phuc.equals(layer)
|
||||
|| phuc.equals("ALL")) {
|
||||
getMonitor().processUris(qpeURIs, isProductLoad,
|
||||
siteKey, product.getQpe(), timeBack, phuc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// qpes
|
||||
fireLoaderEvent(loadType, "Processing " + product.getQpe()
|
||||
+ "/" + phuc, isDone);
|
||||
FFMPBasinData qpeData = null;
|
||||
fireLoaderEvent(loadType, product.getQpe(), isDone);
|
||||
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
int i = 0;
|
||||
for (NavigableMap<Date, List<String>> qpfURIs : qpfs) {
|
||||
// qpf
|
||||
fireLoaderEvent(loadType, "Processing " + product.getQpf(i),
|
||||
isDone);
|
||||
FFMPAggregateRecord qpfCache = null;
|
||||
|
||||
SourceXML source = getMonitor().getSourceConfig()
|
||||
.getSource(product.getQpe());
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
|
||||
qpeData = readLoaderBuddyFile(source, phuc, dataKey,
|
||||
wfo);
|
||||
SourceXML source = getMonitor().getSourceConfig()
|
||||
.getSource(qpfSources.get(i));
|
||||
|
||||
if (qpeData != null) {
|
||||
String pdataKey = findQPFHomeDataKey(source);
|
||||
qpfCache = readCacheFile(source, pdataKey, wfo);
|
||||
|
||||
getMonitor().insertFFMPData(qpeData, siteKey,
|
||||
product.getQpe(), phuc);
|
||||
}
|
||||
}
|
||||
if (qpfCache != null) {
|
||||
for (String phuc : hucsToLoad) {
|
||||
if ((phuc.equals(layer) || phuc.equals("ALL"))
|
||||
&& loadType == LOADER_TYPE.INITIAL
|
||||
&& source.getSourceName().equals(
|
||||
config.getFFMPConfigData()
|
||||
.getIncludedQPF())) {
|
||||
if (!qpfURIs.isEmpty()) {
|
||||
|
||||
if (!qpeURIs.isEmpty() && qpeData == null) {
|
||||
if (phuc.equals(config.getFFMPConfigData().getLayer())
|
||||
|| phuc.equals("ALL")) {
|
||||
getMonitor().processUris(qpeURIs, isProductLoad,
|
||||
siteKey, product.getQpe(), timeBack, phuc);
|
||||
}
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType, product.getQpe() + "/" + phuc,
|
||||
isDone);
|
||||
|
||||
int i = 0;
|
||||
for (NavigableMap<Date, List<String>> qpfURIs : qpfs) {
|
||||
// qpf
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + product.getQpf(i) + "/" + phuc,
|
||||
isDone);
|
||||
FFMPBasinData qpfData = null;
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
|
||||
SourceXML source = getMonitor().getSourceConfig()
|
||||
.getSource(qpfSources.get(i));
|
||||
|
||||
String pdataKey = findQPFHomeDataKey(source);
|
||||
qpfData = readLoaderBuddyFile(source, phuc,
|
||||
pdataKey, wfo);
|
||||
|
||||
if (qpfData != null) {
|
||||
|
||||
if ((phuc.equals(config.getFFMPConfigData()
|
||||
.getLayer()) || phuc.equals("ALL"))
|
||||
&& loadType == LOADER_TYPE.INITIAL
|
||||
&& source.getSourceName().equals(
|
||||
config.getFFMPConfigData()
|
||||
.getIncludedQPF())) {
|
||||
if (!qpfURIs.isEmpty()) {
|
||||
|
||||
getMonitor().processUris(qpfURIs,
|
||||
isProductLoad, siteKey,
|
||||
source.getSourceName(),
|
||||
timeBack, phuc);
|
||||
}
|
||||
getMonitor().processUris(qpfURIs,
|
||||
isProductLoad, siteKey,
|
||||
source.getSourceName(), timeBack,
|
||||
phuc);
|
||||
}
|
||||
|
||||
getMonitor().insertFFMPData(qpfData, siteKey,
|
||||
source.getSourceName(), phuc);
|
||||
}
|
||||
}
|
||||
// if (isUrisProcessNeeded(qpfData,qpfURIs))
|
||||
// {/*DR13839*/
|
||||
if ((qpfData == null) && !qpfURIs.isEmpty()) {
|
||||
if (phuc.equals(config.getFFMPConfigData()
|
||||
.getLayer()) || phuc.equals("ALL")) { // old
|
||||
// code:
|
||||
// keep
|
||||
// for
|
||||
// reference*/
|
||||
// if (isHucProcessNeeded(phuc)) {/*DR13839*/
|
||||
getMonitor().processUris(qpfURIs,
|
||||
isProductLoad, siteKey,
|
||||
product.getQpf(i), timeBack, phuc);
|
||||
}
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType, product.getQpf(i) + "/"
|
||||
+ phuc, isDone);
|
||||
|
||||
i++;
|
||||
getMonitor().insertFFMPData(qpfCache, siteKey,
|
||||
source.getSourceName());
|
||||
}
|
||||
|
||||
}
|
||||
// virtuals only have data for ALL
|
||||
if (phuc.equals("ALL")) {
|
||||
// if (isUrisProcessNeeded(qpfData,qpfURIs))
|
||||
// {/*DR13839*/
|
||||
// Use this method of QPF data retrieval if you don't have cache files
|
||||
if ((qpfCache == null) && !qpfURIs.isEmpty()) {
|
||||
for (String phuc : hucsToLoad) {
|
||||
if (phuc.equals(layer)
|
||||
|| phuc.equals("ALL")) { // old
|
||||
// code:
|
||||
// keep
|
||||
// for
|
||||
// reference*/
|
||||
// if (isHucProcessNeeded(phuc)) {/*DR13839*/
|
||||
getMonitor().processUris(qpfURIs, isProductLoad,
|
||||
siteKey, product.getQpf(i), timeBack, phuc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType, product.getQpf(i), isDone);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType, "Processing " + product.getVirtual(),
|
||||
isDone);
|
||||
FFMPAggregateRecord vgbCache = null;
|
||||
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
|
||||
SourceXML source = getMonitor().getSourceConfig().getSource(
|
||||
product.getVirtual());
|
||||
|
||||
vgbCache = readCacheFile(source, dataKey, wfo);
|
||||
|
||||
if (vgbCache != null) {
|
||||
|
||||
getMonitor().insertFFMPData(vgbCache, siteKey,
|
||||
product.getVirtual());
|
||||
}
|
||||
}
|
||||
|
||||
// Use this method of Virtual data retrieval if you don't have cache files
|
||||
if ((vgbCache == null) && !virtualURIs.isEmpty()) {
|
||||
getMonitor().processUris(virtualURIs, isProductLoad, siteKey,
|
||||
product.getVirtual(), timeBack, "ALL");
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType, product.getVirtual(), isDone);
|
||||
|
||||
// process guidance all for all only, never uses cache files
|
||||
for (String type : productRun.getGuidanceTypes(product)) {
|
||||
|
||||
ArrayList<SourceXML> guidSources = productRun
|
||||
.getGuidanceSources(product, type);
|
||||
for (SourceXML guidSource : guidSources) {
|
||||
|
||||
NavigableMap<Date, List<String>> iguidURIs = guids
|
||||
.get(guidSource.getSourceName());
|
||||
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + product.getVirtual() + "/" + phuc,
|
||||
"Processing " + guidSource.getSourceName(), isDone);
|
||||
|
||||
getMonitor().processUris(iguidURIs, isProductLoad, siteKey,
|
||||
guidSource.getSourceName(), timeBack, "ALL");
|
||||
|
||||
fireLoaderEvent(loadType, guidSource.getSourceName(),
|
||||
isDone);
|
||||
FFMPBasinData vgbData = null;
|
||||
|
||||
if (loadType == LOADER_TYPE.INITIAL) {
|
||||
|
||||
SourceXML source = getMonitor().getSourceConfig()
|
||||
.getSource(product.getVirtual());
|
||||
|
||||
vgbData = readLoaderBuddyFile(source, phuc, dataKey,
|
||||
wfo);
|
||||
|
||||
if (vgbData != null) {
|
||||
|
||||
getMonitor().insertFFMPData(vgbData, siteKey,
|
||||
product.getVirtual(), phuc);
|
||||
}
|
||||
}
|
||||
|
||||
if ((vgbData == null) && !virtualURIs.isEmpty()) {
|
||||
getMonitor().processUris(virtualURIs, isProductLoad,
|
||||
siteKey, product.getVirtual(), timeBack, phuc);
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType,
|
||||
product.getVirtual() + "/" + phuc, isDone);
|
||||
}
|
||||
|
||||
// process guidance all at once
|
||||
for (String type : productRun.getGuidanceTypes(product)) {
|
||||
|
||||
ArrayList<SourceXML> guidSources = productRun
|
||||
.getGuidanceSources(product, type);
|
||||
for (SourceXML guidSource : guidSources) {
|
||||
|
||||
NavigableMap<Date, List<String>> iguidURIs = guids
|
||||
.get(guidSource.getSourceName());
|
||||
|
||||
fireLoaderEvent(loadType,
|
||||
"Processing " + guidSource.getSourceName()
|
||||
+ "/" + phuc, isDone);
|
||||
|
||||
getMonitor().processUris(iguidURIs, isProductLoad,
|
||||
siteKey, guidSource.getSourceName(), timeBack,
|
||||
phuc);
|
||||
|
||||
fireLoaderEvent(loadType, guidSource.getSourceName()
|
||||
+ "/" + phuc, isDone);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fireLoaderEvent(loadType, phuc + " Load complete", isDone);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println("FFMP Data Loader terminated...."
|
||||
+ e.getMessage());
|
||||
statusHandler.handle(Priority.PROBLEM,"General Problem in Loading FFMP Data", e);
|
||||
} finally {
|
||||
isDone = true;
|
||||
}
|
||||
|
@ -410,7 +395,7 @@ public class FFMPDataLoader extends Thread {
|
|||
}
|
||||
|
||||
long endTime = (System.currentTimeMillis()) - time;
|
||||
System.out.println("Loader took: " + endTime / 1000 + " seconds");
|
||||
System.out.println(loadType.loaderType + " Loader took: " + endTime / 1000 + " seconds");
|
||||
|
||||
fireLoaderEvent(loadType, message, isDone);
|
||||
}
|
||||
|
@ -467,19 +452,19 @@ public class FFMPDataLoader extends Thread {
|
|||
};
|
||||
|
||||
/**
|
||||
* Loads the loader buddy files
|
||||
* Loads the Cache files
|
||||
*
|
||||
* @param sourceName
|
||||
* @param huc
|
||||
* @param wfo
|
||||
* @return
|
||||
*/
|
||||
private FFMPBasinData readLoaderBuddyFile(SourceXML source, String huc,
|
||||
String pdataKey, String wfo) {
|
||||
private FFMPAggregateRecord readCacheFile(SourceXML source, String pdataKey, String wfo) {
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
String sourceName = source.getSourceName();
|
||||
File file = new File(sharePath + wfo + File.separator + sourceName
|
||||
+ "-" + siteKey + "-" + pdataKey + "-" + huc + ".bin");
|
||||
+ "-" + siteKey + "-" + pdataKey + ".bin");
|
||||
File lockFile = new File(sharePath + wfo + File.separator + sourceName
|
||||
+ "-" + siteKey + "-" + pdataKey + ".lock");
|
||||
|
||||
|
@ -489,22 +474,22 @@ public class FFMPDataLoader extends Thread {
|
|||
sleep(100);
|
||||
i++;
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.ERROR,"Took to long to load Cache Record", e);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
System.out.println("Buddy File expected path: "
|
||||
System.out.println("Cache File expected path: "
|
||||
+ file.getAbsolutePath());
|
||||
FFMPBasinData basinData = null;
|
||||
FFMPAggregateRecord cacheRecord = null;
|
||||
|
||||
if (file.exists()) {
|
||||
|
||||
System.out.println("Last mod: " + new Date(file.lastModified()));
|
||||
|
||||
if (file.lastModified() > (System.currentTimeMillis() - (6 * 1000 * 3600))) {
|
||||
if (file.lastModified() > (System.currentTimeMillis() - (6 * TimeUtil.MILLIS_PER_HOUR))) {
|
||||
|
||||
while (lockFile.exists()) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
@ -514,39 +499,42 @@ public class FFMPDataLoader extends Thread {
|
|||
sleep(100);
|
||||
i++;
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.ERROR,"ERROR in Loading Cache Record", e);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
BufferedInputStream is = null;
|
||||
GZIPInputStream gis = null;
|
||||
|
||||
try {
|
||||
|
||||
System.out.println("Loading file: " + file.getName());
|
||||
is = new BufferedInputStream(new FileInputStream(file));
|
||||
gis = new GZIPInputStream(new BufferedInputStream(new FileInputStream(file)));
|
||||
DynamicSerializationManager dsm = DynamicSerializationManager
|
||||
.getManager(SerializationType.Thrift);
|
||||
basinData = (FFMPBasinData) dsm.deserialize(is);
|
||||
cacheRecord = (FFMPAggregateRecord) dsm.deserialize(gis);
|
||||
} catch (SerializationException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.ERROR,"Serialization ERROR in Loading Cache Record", e);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.ERROR,"IO ERROR in Loading Cache Record", e);
|
||||
} finally {
|
||||
if (is != null) {
|
||||
if (gis != null) {
|
||||
try {
|
||||
is.close();
|
||||
gis.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
statusHandler.handle(Priority.ERROR,"GENRAL ERROR in Loading Cache Record", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long time2 = System.currentTimeMillis();
|
||||
System.out.println("FFMP Cache file Load took: "+ (time2 - time) + " ms");
|
||||
|
||||
return basinData;
|
||||
return cacheRecord;
|
||||
|
||||
}
|
||||
|
||||
|
@ -564,7 +552,7 @@ public class FFMPDataLoader extends Thread {
|
|||
for (ProductRunXML product : runManager.getProducts()) {
|
||||
File file = new File(sharePath + wfo + File.separator
|
||||
+ source.getSourceName() + "-" + siteKey + "-"
|
||||
+ product.getProductKey() + "-ALL.bin");
|
||||
+ product.getProductKey() + ".bin");
|
||||
|
||||
if (file.exists()) {
|
||||
return product.getProductKey();
|
||||
|
@ -572,7 +560,6 @@ public class FFMPDataLoader extends Thread {
|
|||
}
|
||||
|
||||
return siteKey;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -81,6 +81,7 @@ 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.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.DrawableString;
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
|
@ -152,7 +153,8 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* 31 July 2012 14517 mpduff Fix for blanking map on update.
|
||||
* 14 Sep 2012 1048 njensen Code cleanup
|
||||
* 07 Dec 2012 1353 rferrel Changes for non-blocking FFMPSplash dialog.
|
||||
*
|
||||
* 10 Jan 2013 1475 dhladky Some cleanup
|
||||
* 27 Jan 2013 1478 dhladky Changed gap collection to a generic list insted of Arraylist
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -2070,6 +2072,7 @@ public class FFMPResource extends
|
|||
private void drawSquare(PixelCoverage pc, IGraphicsTarget target)
|
||||
throws VizException {
|
||||
|
||||
//target.drawLine(lines)
|
||||
target.drawLine(pc.getLl().x, pc.getLl().y, 0.0, pc.getUl().x, pc
|
||||
.getUl().y, 0.0, getCapability(ColorableCapability.class)
|
||||
.getColor(), getCapability(OutlineCapability.class)
|
||||
|
@ -2455,10 +2458,6 @@ public class FFMPResource extends
|
|||
cwaBasins.clear();
|
||||
|
||||
try {
|
||||
// String aggrHuc = "HUC0";
|
||||
// if (phuc.equals("COUNTY")) {
|
||||
// aggrHuc = phuc;
|
||||
// }
|
||||
// use the envelopes from HUC0 to speed processing
|
||||
// if necessary
|
||||
Map<Long, Envelope> envMap = hucGeomFactory.getEnvelopes(
|
||||
|
@ -2472,7 +2471,7 @@ public class FFMPResource extends
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.WARN, "Domain: " + cwa
|
||||
statusHandler.handle(Priority.DEBUG, "Domain: " + cwa
|
||||
+ " Outside of site: " + getSiteKey() + " area...");
|
||||
}
|
||||
}
|
||||
|
@ -2901,7 +2900,7 @@ public class FFMPResource extends
|
|||
descriptor, 0.0f);
|
||||
if (req.shaded) {
|
||||
localShadedShape = req.target.createShadedShape(false,
|
||||
descriptor, true);
|
||||
descriptor.getGridGeometry(), true);
|
||||
}
|
||||
|
||||
JTSCompiler jtsCompiler2 = new JTSCompiler(localShadedShape,
|
||||
|
@ -3550,7 +3549,7 @@ public class FFMPResource extends
|
|||
|
||||
synchronized (tableTime) {
|
||||
Date recentTime = getMostRecentTime();
|
||||
long time = new Double(recentTime.getTime() - (1000 * 3600)
|
||||
long time = new Double(recentTime.getTime() - (TimeUtil.MILLIS_PER_HOUR)
|
||||
* getTime()).longValue();
|
||||
Date date = new Date();
|
||||
date.setTime(time);
|
||||
|
@ -3724,7 +3723,7 @@ public class FFMPResource extends
|
|||
Date oldestCurrentTime = getResourceData().getAvailableTimes()[0]
|
||||
.getRefTime();
|
||||
Date oldestTime = new Date(oldestCurrentTime.getTime()
|
||||
- (1000 * 3600 * 24));
|
||||
- (TimeUtil.MILLIS_PER_HOUR * 24));
|
||||
|
||||
SortedSet<Date> keys = monitor.getAvailableUris(getSiteKey(),
|
||||
getDataKey(), getPrimarySource(), oldestTime).keySet();
|
||||
|
@ -3771,7 +3770,7 @@ public class FFMPResource extends
|
|||
- getTableTime().getTime();
|
||||
|
||||
sliderTime = Math
|
||||
.floor(4 * (offset.doubleValue() / (1000 * 3600)) + .25) / 4;
|
||||
.floor(4 * (offset.doubleValue() / (TimeUtil.MILLIS_PER_HOUR)) + .25) / 4;
|
||||
// sliderTime = Math.floor(((offset.doubleValue() / (1000 * 3600)) +
|
||||
// .005) * 100) / 100;
|
||||
setTime(sliderTime);
|
||||
|
@ -3941,7 +3940,7 @@ public class FFMPResource extends
|
|||
*
|
||||
* @return Array of Gap data
|
||||
*/
|
||||
public ArrayList<FFMPGap> getGaps() {
|
||||
public List<FFMPGap> getGaps() {
|
||||
synchronized (timeOrderedKeys) {
|
||||
return FFMPGap.getGaps(getTimeOrderedKeys(), getResourceData()
|
||||
.getPrimarySourceXML().getExpirationMinutes(getSiteKey()),
|
||||
|
@ -4010,7 +4009,7 @@ public class FFMPResource extends
|
|||
|
||||
this.qpeSourceExpiration = monitor.getSourceConfig()
|
||||
.getSource(resourceData.getPrimarySource())
|
||||
.getExpirationMinutes(getSiteKey()) * 60 * 1000;
|
||||
.getExpirationMinutes(getSiteKey()) * TimeUtil.MILLIS_PER_MINUTE;
|
||||
}
|
||||
return qpeSourceExpiration;
|
||||
}
|
||||
|
@ -4033,7 +4032,7 @@ public class FFMPResource extends
|
|||
source = FFMPSourceConfigurationManager.getInstance()
|
||||
.getSource(getResourceData().sourceName);
|
||||
}
|
||||
qpfSourceExpiration = source.getExpirationMinutes(getSiteKey()) * 60 * 1000;
|
||||
qpfSourceExpiration = source.getExpirationMinutes(getSiteKey()) * TimeUtil.MILLIS_PER_MINUTE;
|
||||
}
|
||||
return qpfSourceExpiration;
|
||||
}
|
||||
|
@ -4056,12 +4055,12 @@ public class FFMPResource extends
|
|||
SourceXML source = getProduct().getGuidanceSourcesByType(
|
||||
guidSrc).get(0);
|
||||
guidSourceExpiration = source
|
||||
.getExpirationMinutes(getSiteKey()) * 60 * 1000;
|
||||
.getExpirationMinutes(getSiteKey()) * TimeUtil.MILLIS_PER_MINUTE;
|
||||
|
||||
} else {
|
||||
guidSourceExpiration = monitor.getSourceConfig()
|
||||
.getSource(resourceData.getPrimarySource())
|
||||
.getExpirationMinutes(getSiteKey()) * 60 * 1000;
|
||||
.getExpirationMinutes(getSiteKey()) * TimeUtil.MILLIS_PER_MINUTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4266,7 +4265,7 @@ public class FFMPResource extends
|
|||
|
||||
}
|
||||
|
||||
return 3600 * 24 * 1000;
|
||||
return 24 * TimeUtil.MILLIS_PER_HOUR;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4281,7 +4280,7 @@ public class FFMPResource extends
|
|||
if (status.isDone() && !this.getResourceData().isTertiaryLoad) {
|
||||
try {
|
||||
Date startDate = new Date(getMostRecentTime().getTime()
|
||||
- (6 * 3600 * 1000));
|
||||
- (6 * TimeUtil.MILLIS_PER_HOUR));
|
||||
FFMPMonitor.getInstance().startLoad(this, startDate,
|
||||
LOADER_TYPE.TERTIARY);
|
||||
} catch (VizException e) {
|
||||
|
|
|
@ -50,6 +50,7 @@ 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.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractNameGenerator;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
||||
|
@ -230,11 +231,8 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
DataTime mostRecentTime = availableTimes[availableTimes.length - 1];
|
||||
this.timeBack = new Date(
|
||||
(long) (mostRecentTime.getRefTime().getTime() - (cfgBasinXML
|
||||
.getTimeFrame() * 3600 * 1000)));
|
||||
.getTimeFrame() * TimeUtil.MILLIS_PER_HOUR)));
|
||||
ArrayList<String> hucsToLoad = monitor.getTemplates(siteKey).getTemplateMgr().getHucLevels();
|
||||
//ArrayList<String> hucsToLoad = new ArrayList<String>();
|
||||
//hucsToLoad.add(cfgBasinXML.getLayer());
|
||||
//hucsToLoad.add("ALL");
|
||||
// goes back X hours and pre populates the Data Hashes
|
||||
FFMPDataLoader loader = new FFMPDataLoader(this, timeBack,
|
||||
mostRecentTime.getRefTime(), LOADER_TYPE.INITIAL,
|
||||
|
@ -275,18 +273,28 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
this.domains = monitor.getRunConfig().getDomains();
|
||||
SourceXML source = monitor.getSourceConfig().getSource(
|
||||
sourceName);
|
||||
Date standAloneTime = null;
|
||||
|
||||
if (source != null) {
|
||||
// Special Loading for guidance sources, as mentioned in the comment
|
||||
if (source.getDataType().equals(SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
long oldestTime = availableTimes[0].getRefTime()
|
||||
.getTime();
|
||||
long expirationTime = source
|
||||
.getExpirationMinutes(siteKey) * TimeUtil.MILLIS_PER_MINUTE;
|
||||
standAloneTime = new Date(oldestTime
|
||||
- expirationTime);
|
||||
} else {
|
||||
// Only load current frames time
|
||||
standAloneTime = availableTimes[availableTimes.length - 1]
|
||||
.getRefTime();
|
||||
}
|
||||
|
||||
long oldestTime = availableTimes[0].getRefTime().getTime();
|
||||
long expirationTime = source.getExpirationMinutes(siteKey) * 60 * 1000;
|
||||
Date standAloneTime = new Date(oldestTime - expirationTime);
|
||||
|
||||
NavigableMap<Date, List<String>> sourceURIs = getMonitor()
|
||||
.getAvailableUris(siteKey, dataKey, sourceName,
|
||||
standAloneTime);
|
||||
.getAvailableUris(siteKey, dataKey, sourceName,
|
||||
standAloneTime);
|
||||
getMonitor().processUris(sourceURIs, false, siteKey,
|
||||
sourceName, standAloneTime, "ALL");
|
||||
sourceName, standAloneTime, "ALL");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
|||
import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
|
||||
import com.raytheon.uf.viz.npp.crimss.CrimssNSharpResourceData;
|
||||
import com.raytheon.viz.ui.MenuLoader;
|
||||
import com.raytheon.viz.ui.BundleProductLoader;
|
||||
import com.raytheon.viz.ui.UiUtil;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
import com.raytheon.viz.ui.input.EditableManager;
|
||||
|
@ -218,7 +218,7 @@ public class CrimssMapResource extends
|
|||
display.cloneDisplay());
|
||||
Bundle b = new Bundle();
|
||||
b.setDisplays(new AbstractRenderableDisplay[] { display });
|
||||
Job j = new MenuLoader(b, editor);
|
||||
Job j = new BundleProductLoader(editor, b);
|
||||
j.schedule();
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public class NwsNotAuthHandler implements INotAuthHandler {
|
|||
+ request.getClass();
|
||||
UFStatus.getHandler(NwsNotAuthHandler.class).handle(Priority.PROBLEM,
|
||||
message);
|
||||
return null;
|
||||
throw new VizException(message);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -82,7 +82,7 @@ public class NwsNotAuthHandler implements INotAuthHandler {
|
|||
}
|
||||
UFStatus.getHandler(NwsNotAuthHandler.class).handle(Priority.PROBLEM,
|
||||
message);
|
||||
return null;
|
||||
throw new VizException(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ package com.raytheon.uf.viz.productbrowser;
|
|||
* further licensing information.
|
||||
**/
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -50,7 +51,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceProperties;
|
|||
import com.raytheon.uf.viz.core.rsc.ResourceType;
|
||||
import com.raytheon.uf.viz.productbrowser.ProductBrowserPreference.PreferenceType;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.MenuLoader;
|
||||
import com.raytheon.viz.ui.BundleProductLoader;
|
||||
import com.raytheon.viz.ui.VizWorkbenchManager;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager;
|
||||
|
@ -198,12 +199,15 @@ public abstract class AbstractRequestableProductBrowserDataDefinition<T extends
|
|||
constructResource();
|
||||
}
|
||||
|
||||
private void constructResource() {
|
||||
protected void constructResource() {
|
||||
ResourcePair pair = new ResourcePair();
|
||||
pair.setResourceData(resourceData);
|
||||
pair.setLoadProperties(loadProperties);
|
||||
pair.setProperties(new ResourceProperties());
|
||||
IDescriptor currDesc = null;
|
||||
constructResource(Arrays.asList(pair));
|
||||
}
|
||||
|
||||
protected void constructResource(List<ResourcePair> pairs) {
|
||||
// retrieves the correct editor
|
||||
getEditor();
|
||||
IDisplayPaneContainer container = getEditor();
|
||||
|
@ -213,11 +217,12 @@ public abstract class AbstractRequestableProductBrowserDataDefinition<T extends
|
|||
AbstractRenderableDisplay display = (AbstractRenderableDisplay) container
|
||||
.getActiveDisplayPane().getRenderableDisplay();
|
||||
display = (AbstractRenderableDisplay) display.createNewDisplay();
|
||||
display.getDescriptor().getResourceList().add(pair);
|
||||
for (ResourcePair pair : pairs) {
|
||||
display.getDescriptor().getResourceList().add(pair);
|
||||
}
|
||||
Bundle b = new Bundle();
|
||||
b.setDisplays(new AbstractRenderableDisplay[] { display });
|
||||
new MenuLoader(b, (AbstractEditor) EditorUtil.getActiveEditor())
|
||||
.schedule();
|
||||
new BundleProductLoader(EditorUtil.getActiveVizContainer(), b).schedule();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.osgi.framework.Bundle;
|
|||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.Constants;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -30,6 +31,8 @@ import org.osgi.framework.Constants;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 12, 2010 mschenke Initial creation
|
||||
* Jan 24, 2013 1522 bkowal Halt initialization if a p2 installation
|
||||
* has been started
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -38,133 +41,162 @@ import org.osgi.framework.Constants;
|
|||
*/
|
||||
public class Activator implements BundleActivator {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.spring.dm";
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.spring.dm";
|
||||
|
||||
private static final String SPRING_PATH = "res" + IPath.SEPARATOR
|
||||
+ "spring";
|
||||
private static final String SPRING_PATH = "res" + IPath.SEPARATOR
|
||||
+ "spring";
|
||||
|
||||
private static final String SPRING_FILE_EXT = "*.xml";
|
||||
private static final String SPRING_FILE_EXT = "*.xml";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
plugin = this;
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
if (this.isInstallOperation()) {
|
||||
return;
|
||||
}
|
||||
plugin = this;
|
||||
|
||||
Map<String, OSGIXmlApplicationContext> contextMap = new HashMap<String, OSGIXmlApplicationContext>();
|
||||
Set<String> processing = new HashSet<String>();
|
||||
Bundle[] bundles = context.getBundles();
|
||||
Map<String, Bundle> bundleMap = new HashMap<String, Bundle>();
|
||||
for (Bundle b : bundles) {
|
||||
bundleMap.put(b.getSymbolicName(), b);
|
||||
}
|
||||
for (Bundle b : bundles) {
|
||||
createContext(bundleMap, contextMap, b, processing);
|
||||
}
|
||||
}
|
||||
Map<String, OSGIXmlApplicationContext> contextMap = new HashMap<String, OSGIXmlApplicationContext>();
|
||||
Set<String> processing = new HashSet<String>();
|
||||
Bundle[] bundles = context.getBundles();
|
||||
Map<String, Bundle> bundleMap = new HashMap<String, Bundle>();
|
||||
for (Bundle b : bundles) {
|
||||
bundleMap.put(b.getSymbolicName(), b);
|
||||
}
|
||||
for (Bundle b : bundles) {
|
||||
createContext(bundleMap, contextMap, b, processing);
|
||||
}
|
||||
}
|
||||
|
||||
private OSGIXmlApplicationContext createContext(
|
||||
Map<String, Bundle> bundles,
|
||||
Map<String, OSGIXmlApplicationContext> contextMap, Bundle bundle,
|
||||
Set<String> processing) {
|
||||
String bundleName = bundle.getSymbolicName();
|
||||
OSGIXmlApplicationContext appCtx = contextMap.get(bundleName);
|
||||
if (contextMap.containsKey(bundleName) == false
|
||||
&& bundleName.contains(".edex.") == false) {
|
||||
if (processing.contains(bundleName)) {
|
||||
throw new RuntimeException(
|
||||
"Found recursive spring dependency while processing plugins: "
|
||||
+ bundleName);
|
||||
}
|
||||
processing.add(bundleName);
|
||||
private OSGIXmlApplicationContext createContext(
|
||||
Map<String, Bundle> bundles,
|
||||
Map<String, OSGIXmlApplicationContext> contextMap, Bundle bundle,
|
||||
Set<String> processing) {
|
||||
String bundleName = bundle.getSymbolicName();
|
||||
OSGIXmlApplicationContext appCtx = contextMap.get(bundleName);
|
||||
if (contextMap.containsKey(bundleName) == false
|
||||
&& bundleName.contains(".edex.") == false) {
|
||||
if (processing.contains(bundleName)) {
|
||||
throw new RuntimeException(
|
||||
"Found recursive spring dependency while processing plugins: "
|
||||
+ bundleName);
|
||||
}
|
||||
processing.add(bundleName);
|
||||
|
||||
// No context created yet and not edex project, check for files
|
||||
Enumeration<?> entries = bundle.findEntries(SPRING_PATH,
|
||||
SPRING_FILE_EXT, true);
|
||||
if (entries != null) {
|
||||
List<String> files = new ArrayList<String>();
|
||||
while (entries.hasMoreElements()) {
|
||||
URL url = (URL) entries.nextElement();
|
||||
try {
|
||||
url = FileLocator.toFileURL(url);
|
||||
files.add(url.toString());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(
|
||||
"Error resolving spring file: " + url, e);
|
||||
}
|
||||
}
|
||||
if (files.size() > 0) {
|
||||
// Files found, check for dependencies
|
||||
String requiredBundlesHeader = (String) bundle.getHeaders()
|
||||
.get(Constants.REQUIRE_BUNDLE);
|
||||
// Split comma separated string from MANIFEST
|
||||
String[] requiredBundles = requiredBundlesHeader
|
||||
.split("[,]");
|
||||
List<OSGIXmlApplicationContext> parentContexts = new ArrayList<OSGIXmlApplicationContext>();
|
||||
for (String requiredBndl : requiredBundles) {
|
||||
// Extract bundle name which is first item in
|
||||
// semicolon
|
||||
// split list
|
||||
String[] bndlParts = requiredBndl.split("[;]");
|
||||
Bundle reqBndl = bundles.get(bndlParts[0]);
|
||||
if (reqBndl != null) {
|
||||
// Found bundle, process context for bundle
|
||||
OSGIXmlApplicationContext parent = createContext(
|
||||
bundles, contextMap, reqBndl, processing);
|
||||
if (parent != null) {
|
||||
// Context found, add to list
|
||||
parentContexts.add(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
// No context created yet and not edex project, check for files
|
||||
Enumeration<?> entries = bundle.findEntries(SPRING_PATH,
|
||||
SPRING_FILE_EXT, true);
|
||||
if (entries != null) {
|
||||
List<String> files = new ArrayList<String>();
|
||||
while (entries.hasMoreElements()) {
|
||||
URL url = (URL) entries.nextElement();
|
||||
try {
|
||||
url = FileLocator.toFileURL(url);
|
||||
files.add(url.toString());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(
|
||||
"Error resolving spring file: " + url, e);
|
||||
}
|
||||
}
|
||||
if (files.size() > 0) {
|
||||
// Files found, check for dependencies
|
||||
String requiredBundlesHeader = (String) bundle.getHeaders()
|
||||
.get(Constants.REQUIRE_BUNDLE);
|
||||
// Split comma separated string from MANIFEST
|
||||
String[] requiredBundles = requiredBundlesHeader
|
||||
.split("[,]");
|
||||
List<OSGIXmlApplicationContext> parentContexts = new ArrayList<OSGIXmlApplicationContext>();
|
||||
for (String requiredBndl : requiredBundles) {
|
||||
// Extract bundle name which is first item in
|
||||
// semicolon
|
||||
// split list
|
||||
String[] bndlParts = requiredBndl.split("[;]");
|
||||
Bundle reqBndl = bundles.get(bndlParts[0]);
|
||||
if (reqBndl != null) {
|
||||
// Found bundle, process context for bundle
|
||||
OSGIXmlApplicationContext parent = createContext(
|
||||
bundles, contextMap, reqBndl, processing);
|
||||
if (parent != null) {
|
||||
// Context found, add to list
|
||||
parentContexts.add(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parentContexts.size() > 0) {
|
||||
// Context with parent context
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
new OSGIGroupApplicationContext(parentContexts),
|
||||
files.toArray(new String[0]), bundle);
|
||||
} else {
|
||||
// No parent context required
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
files.toArray(new String[0]), bundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
contextMap.put(bundleName, appCtx);
|
||||
}
|
||||
processing.remove(bundleName);
|
||||
return appCtx;
|
||||
}
|
||||
if (parentContexts.size() > 0) {
|
||||
// Context with parent context
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
new OSGIGroupApplicationContext(parentContexts),
|
||||
files.toArray(new String[0]), bundle);
|
||||
} else {
|
||||
// No parent context required
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
files.toArray(new String[0]), bundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
contextMap.put(bundleName, appCtx);
|
||||
}
|
||||
processing.remove(bundleName);
|
||||
return appCtx;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Based on the command line arguments, determine whether or not an Eclipse
|
||||
* p2 repository will be installed
|
||||
*
|
||||
* @return true if an Eclipse p2 repository is going to be installed, false
|
||||
* otherwise
|
||||
*/
|
||||
private boolean isInstallOperation() {
|
||||
final String P2_DIRECTOR = "org.eclipse.equinox.p2.director";
|
||||
|
||||
/**
|
||||
* We look at the command line arguments instead of the program
|
||||
* arguments (com.raytheon.uf.viz.application.ProgramArguments) because
|
||||
* the command line arguments include almost everything that was passed
|
||||
* as an argument to the Eclipse executable instead of just what CAVE is
|
||||
* interested in.
|
||||
*/
|
||||
for (String argument : Platform.getCommandLineArgs()) {
|
||||
if (P2_DIRECTOR.equals(argument)) {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.stats;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.time;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
||||
com.google.guava;bundle-version="1.0.0"
|
||||
com.google.guava;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.units;bundle-version="1.0.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.viz.stats,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
package com.raytheon.uf.viz.stats.ui;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Grouping Composite for the Stats Graph.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -36,10 +36,13 @@ package com.raytheon.uf.viz.stats.ui;
|
|||
* @version 1.0
|
||||
*/
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
|
@ -59,22 +62,25 @@ import org.eclipse.swt.widgets.ColorDialog;
|
|||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.raytheon.uf.common.stats.data.GraphData;
|
||||
|
||||
/**
|
||||
* Composites that contains the controls to change colors and to determine what
|
||||
* is displayed.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 16, 2012 lvenable Initial creation
|
||||
*
|
||||
* Oct 16, 2012 lvenable Initial creation
|
||||
* Jan 11, 2013 1357 mpduff Implement.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author lvenable
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -106,9 +112,11 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
/** Grouping callback */
|
||||
private final IStatsGroup callback;
|
||||
|
||||
private final List<SelectionEntry> selectionEntries = new ArrayList<SelectionEntry>();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* @param parentComp
|
||||
* Parent composite.
|
||||
* @param swtStyle
|
||||
|
@ -191,12 +199,26 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
*/
|
||||
private void createControls() {
|
||||
List<String> keyArray = graphData.getKeysWithData();
|
||||
Map<String, List<String>> grpNameMap = graphData.getGroupAndNamesMap();
|
||||
|
||||
// Create the Selection Entry objects
|
||||
for (String key : keyArray) {
|
||||
SelectionEntry se = new SelectionEntry();
|
||||
String[] parts = colonPattern.split(key);
|
||||
|
||||
Set<String> grpNames = grpNameMap.keySet();
|
||||
Iterator<String> iter = grpNames.iterator();
|
||||
for (int i = 0; i < grpNames.size(); i++) {
|
||||
se.addPair(iter.next(), parts[i]);
|
||||
}
|
||||
this.selectionEntries.add(se);
|
||||
}
|
||||
|
||||
for (SelectionEntry se : selectionEntries) {
|
||||
GridData gd = new GridData(20, 10);
|
||||
Label lbl = new Label(controlComp, SWT.BORDER);
|
||||
lbl.setLayoutData(gd);
|
||||
lbl.setData(key);
|
||||
lbl.setData(se);
|
||||
lbl.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseDown(MouseEvent e) {
|
||||
|
@ -206,8 +228,9 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
});
|
||||
|
||||
Button btn = new Button(controlComp, SWT.CHECK);
|
||||
btn.setText(key);
|
||||
btn.setText(se.toString());
|
||||
btn.setSelection(true);
|
||||
btn.setData(se);
|
||||
btn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
@ -216,8 +239,8 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
}
|
||||
});
|
||||
|
||||
labelMap.put(key, lbl);
|
||||
checkBtnMap.put(key, btn);
|
||||
labelMap.put(se.toString(), lbl);
|
||||
checkBtnMap.put(se.toString(), btn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,22 +268,22 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
displaySelectionMgrDlg();
|
||||
}
|
||||
});
|
||||
// Not including this functionality in the branch.
|
||||
// gd = new GridData(buttonWidth, SWT.DEFAULT);
|
||||
// Button colorMgrBtn = new Button(buttonComp, SWT.PUSH);
|
||||
// colorMgrBtn.setText("Color Manager...");
|
||||
// colorMgrBtn.setLayoutData(gd);
|
||||
// colorMgrBtn.addSelectionListener(new SelectionAdapter() {
|
||||
// @Override
|
||||
// public void widgetSelected(SelectionEvent e) {
|
||||
// displayColorMgrDlg();
|
||||
// }
|
||||
// });
|
||||
// Not including this functionality in the branch.
|
||||
// gd = new GridData(buttonWidth, SWT.DEFAULT);
|
||||
// Button colorMgrBtn = new Button(buttonComp, SWT.PUSH);
|
||||
// colorMgrBtn.setText("Color Manager...");
|
||||
// colorMgrBtn.setLayoutData(gd);
|
||||
// colorMgrBtn.addSelectionListener(new SelectionAdapter() {
|
||||
// @Override
|
||||
// public void widgetSelected(SelectionEvent e) {
|
||||
// displayColorMgrDlg();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the check button event.
|
||||
*
|
||||
*
|
||||
* @param btn
|
||||
* Check box being checked/unchecked.
|
||||
*/
|
||||
|
@ -278,13 +301,13 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
|
||||
/**
|
||||
* Handle the color label that is being clicked.
|
||||
*
|
||||
*
|
||||
* @param lbl
|
||||
* Label that was clicked.
|
||||
*/
|
||||
private void handleLabelClickEvent(Label lbl) {
|
||||
RGB rgb = lbl.getBackground().getRGB();
|
||||
String key = (String) lbl.getData();
|
||||
String key = ((SelectionEntry) lbl.getData()).toString();
|
||||
|
||||
ColorDialog colorDlg = new ColorDialog(this.getShell());
|
||||
colorDlg.setRGB(rgb);
|
||||
|
@ -343,36 +366,30 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
if (selectionMangerDlg == null || selectionMangerDlg.isDisposed()) {
|
||||
selectionMangerDlg = new SelectionManagerDlg(getShell(), graphData,
|
||||
this);
|
||||
selectionMangerDlg.open();
|
||||
} else {
|
||||
selectionMangerDlg.bringToTop();
|
||||
}
|
||||
|
||||
selectionMangerDlg.open();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the Color Manager dialog.
|
||||
*/
|
||||
// Implementing in the next release.
|
||||
// private void displayColorMgrDlg() {
|
||||
// ColorManagerDlg dlg = new ColorManagerDlg(getShell(), graphData, this);
|
||||
// dlg.open();
|
||||
// }
|
||||
// private void displayColorMgrDlg() {
|
||||
// ColorManagerDlg dlg = new ColorManagerDlg(getShell(), graphData, this);
|
||||
// dlg.open();
|
||||
// }
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void setSelections(Map<String, Map<String, Boolean>> selectionMap) {
|
||||
List<String> keySequence = graphData.getKeySequence();
|
||||
|
||||
Map<String, List<String>> offMap = new HashMap<String, List<String>>();
|
||||
Multimap<String, String> offMap = ArrayListMultimap.create();
|
||||
for (String key : selectionMap.keySet()) {
|
||||
for (String selection : selectionMap.get(key).keySet()) {
|
||||
if (!selectionMap.get(key).get(selection)) {
|
||||
if (!offMap.containsKey(key)) {
|
||||
offMap.put(key, new ArrayList<String>());
|
||||
}
|
||||
offMap.get(key).add(selection);
|
||||
offMap.put(key, selection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -385,19 +402,18 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
}
|
||||
} else {
|
||||
for (String btnKey : checkBtnMap.keySet()) {
|
||||
String[] parts = colonPattern.split(btnKey);
|
||||
Button b = checkBtnMap.get(btnKey);
|
||||
SelectionEntry se = (SelectionEntry) b.getData();
|
||||
|
||||
for (String group : offMap.keySet()) {
|
||||
for (String part : parts) {
|
||||
int idx = keySequence.indexOf(part);
|
||||
if (idx >= 0 && offMap.get(group).contains(keySequence.get(idx))) {
|
||||
checkBtnMap.get(btnKey).setSelection(false);
|
||||
keyRgbMap.remove(btnKey);
|
||||
} else {
|
||||
checkBtnMap.get(btnKey).setSelection(true);
|
||||
keyRgbMap.put(btnKey, labelMap.get(btnKey)
|
||||
.getBackground().getRGB());
|
||||
}
|
||||
for (String key : offMap.keySet()) {
|
||||
Collection<String> valueList = offMap.get(key);
|
||||
if (valueList.contains(se.getValue(key))) {
|
||||
checkBtnMap.get(btnKey).setSelection(false);
|
||||
keyRgbMap.remove(btnKey);
|
||||
} else {
|
||||
checkBtnMap.get(btnKey).setSelection(true);
|
||||
keyRgbMap.put(btnKey, labelMap.get(btnKey)
|
||||
.getBackground().getRGB());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -405,4 +421,33 @@ public class GroupingComp extends Composite implements IGroupSelection {
|
|||
|
||||
fireCallback();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void setItemsOff(List<String> keys) {
|
||||
for (String key : keys) {
|
||||
if (checkBtnMap.containsKey(key)) {
|
||||
checkBtnMap.get(key).setSelection(false);
|
||||
keyRgbMap.remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
fireCallback();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Boolean> getStates() {
|
||||
Map<String, Boolean> stateMap = new HashMap<String, Boolean>();
|
||||
|
||||
for (Map.Entry<String, Button> state : checkBtnMap.entrySet()) {
|
||||
stateMap.put(state.getKey(), state.getValue().getSelection());
|
||||
}
|
||||
|
||||
return stateMap;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,161 @@
|
|||
/**
|
||||
* 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.viz.stats.ui;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Layout;
|
||||
import org.eclipse.swt.widgets.List;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
/**
|
||||
* Hide graph lines dialog.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 4, 2012 1357 mpduff Initial creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class HideDlg extends CaveSWTDialog {
|
||||
/** Data List Widget */
|
||||
private List dataList;
|
||||
|
||||
/** List of keys */
|
||||
private final java.util.List<String> keyList;
|
||||
|
||||
/** Callback to hide the lines */
|
||||
private final IGroupSelection callback;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param parent
|
||||
* The parent shell
|
||||
* @param keyList
|
||||
* The list of keys
|
||||
* @param callback
|
||||
* the callback
|
||||
*/
|
||||
public HideDlg(Shell parent, java.util.List<String> keyList,
|
||||
IGroupSelection callback) {
|
||||
super(parent);
|
||||
setText("Hide Graph Lines");
|
||||
|
||||
this.keyList = keyList;
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected Layout constructShellLayout() {
|
||||
// Create the main layout for the shell.
|
||||
GridLayout mainLayout = new GridLayout(1, true);
|
||||
mainLayout.marginHeight = 1;
|
||||
mainLayout.marginWidth = 1;
|
||||
return mainLayout;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
setReturnValue(false);
|
||||
|
||||
Composite mainComp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
gl.marginHeight = 0;
|
||||
gl.marginWidth = 0;
|
||||
gl.horizontalSpacing = 0;
|
||||
gl.verticalSpacing = 5;
|
||||
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
mainComp.setLayout(gl);
|
||||
mainComp.setLayoutData(gd);
|
||||
|
||||
GridData listData = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
listData.widthHint = 200;
|
||||
listData.heightHint = 300;
|
||||
dataList = new List(mainComp, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL
|
||||
| SWT.H_SCROLL);
|
||||
dataList.setLayoutData(listData);
|
||||
dataList.setItems(keyList.toArray(new String[keyList.size()]));
|
||||
|
||||
Composite buttonComp = new Composite(shell, SWT.NONE);
|
||||
buttonComp.setLayout(new GridLayout(2, false));
|
||||
buttonComp.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true,
|
||||
false));
|
||||
|
||||
int buttonWidth = 120;
|
||||
gd = new GridData(buttonWidth, SWT.DEFAULT);
|
||||
Button hideBtn = new Button(buttonComp, SWT.PUSH);
|
||||
hideBtn.setText("Hide Graph Lines");
|
||||
hideBtn.setLayoutData(gd);
|
||||
hideBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
handleHide();
|
||||
}
|
||||
});
|
||||
|
||||
gd = new GridData(buttonWidth, SWT.DEFAULT);
|
||||
Button closeBtn = new Button(buttonComp, SWT.PUSH);
|
||||
closeBtn.setText("Close");
|
||||
closeBtn.setLayoutData(gd);
|
||||
closeBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide event handler
|
||||
*/
|
||||
private void handleHide() {
|
||||
if (dataList.getSelectionCount() > 0) {
|
||||
String[] itemsToHide = dataList.getSelection();
|
||||
callback.setItemsOff(Arrays.asList(itemsToHide));
|
||||
for (String item : itemsToHide) {
|
||||
dataList.remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -19,21 +19,23 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.stats.ui;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Interface for Group Selections.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 18, 2012 728 mpduff Initial creation
|
||||
*
|
||||
* Oct 18, 2012 728 mpduff Initial creation.
|
||||
* Jan 17, 2013 1357 mpduff Added setItemsOff and getStates.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -41,8 +43,23 @@ import java.util.Map;
|
|||
public interface IGroupSelection {
|
||||
/**
|
||||
* Set the selections.
|
||||
*
|
||||
*
|
||||
* @param selectionMap
|
||||
*/
|
||||
void setSelections(Map<String, Map<String, Boolean>> selectionMap);
|
||||
|
||||
/**
|
||||
* Turn off the provided items.
|
||||
*
|
||||
* @param keys
|
||||
* keys of the items to not draw
|
||||
*/
|
||||
void setItemsOff(List<String> keys);
|
||||
|
||||
/**
|
||||
* Get the state of each item.
|
||||
*
|
||||
* @return Map of item -> checked or not checked
|
||||
*/
|
||||
Map<String, Boolean> getStates();
|
||||
}
|
||||
|
|
|
@ -24,21 +24,21 @@ import java.util.Map;
|
|||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.uf.common.stats.data.GraphData;
|
||||
|
||||
import com.raytheon.uf.common.stats.util.UnitUtils;
|
||||
|
||||
/**
|
||||
* Stats display interface.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 3, 2012 728 mpduff Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -46,29 +46,36 @@ import com.raytheon.uf.common.stats.data.GraphData;
|
|||
public interface IStatsDisplay {
|
||||
/**
|
||||
* Get the GraphData object
|
||||
*
|
||||
*
|
||||
* @return GraphData
|
||||
*/
|
||||
GraphData getGraphData();
|
||||
|
||||
/**
|
||||
* Draw grid lines flag
|
||||
*
|
||||
*
|
||||
* @return true to draw the grid lines
|
||||
*/
|
||||
boolean drawGridLines();
|
||||
|
||||
/**
|
||||
* Draw data lines flag
|
||||
*
|
||||
*
|
||||
* @return true to draw the data lines
|
||||
*/
|
||||
boolean drawDataLines();
|
||||
|
||||
/**
|
||||
* Get the group settings.
|
||||
*
|
||||
*
|
||||
* @return The group settings map
|
||||
*/
|
||||
Map<String, RGB> getGroupSettings();
|
||||
|
||||
/**
|
||||
* Get the UnitUtils object.
|
||||
*
|
||||
* @return the UnitUtils object
|
||||
*/
|
||||
UnitUtils getUnitUtils();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
/**
|
||||
* 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.viz.stats.ui;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Stats Graph Item.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 24, 2013 mpduff Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
public class SelectionEntry {
|
||||
private final Map<String, String> values = new LinkedHashMap<String, String>();
|
||||
|
||||
private boolean checked = true;
|
||||
|
||||
public SelectionEntry() {
|
||||
|
||||
}
|
||||
|
||||
public void addPair(String key, String value) {
|
||||
values.put(key, value);
|
||||
}
|
||||
|
||||
public String getValue(String key) {
|
||||
return values.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the checked
|
||||
*/
|
||||
public boolean isChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param checked
|
||||
* the checked to set
|
||||
*/
|
||||
public void setChecked(boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
for (Iterator<String> iter = values.values().iterator(); iter.hasNext();) {
|
||||
sb.append(iter.next());
|
||||
if (iter.hasNext()) {
|
||||
sb.append(":");
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -21,8 +21,10 @@ package com.raytheon.uf.viz.stats.ui;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
|
@ -44,17 +46,18 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase;
|
|||
|
||||
/**
|
||||
* Stats Selection Manager Dialog.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 18, 2012 lvenable Initial creation
|
||||
*
|
||||
* Oct 18, 2012 lvenable Initial creation
|
||||
* Jan 17, 2013 1357 mpduff Added selection state handling.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author lvenable
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -74,9 +77,9 @@ public class SelectionManagerDlg extends CaveSWTDialogBase {
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* @param parentShell
|
||||
* @param graphData
|
||||
* @param selectionEntries
|
||||
* @param callback
|
||||
*/
|
||||
public SelectionManagerDlg(Shell parentShell, GraphData graphData,
|
||||
|
@ -86,8 +89,8 @@ public class SelectionManagerDlg extends CaveSWTDialogBase {
|
|||
| CAVE.INDEPENDENT_SHELL);
|
||||
setText("Selection Manager");
|
||||
|
||||
this.graphData = graphData;
|
||||
this.callback = callback;
|
||||
this.graphData = graphData;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -202,7 +205,7 @@ public class SelectionManagerDlg extends CaveSWTDialogBase {
|
|||
|
||||
/**
|
||||
* Check the path of the item.
|
||||
*
|
||||
*
|
||||
* @param item
|
||||
* @param checked
|
||||
* @param grayed
|
||||
|
@ -232,7 +235,7 @@ public class SelectionManagerDlg extends CaveSWTDialogBase {
|
|||
|
||||
/**
|
||||
* Check or uncheck the items in the TreeItem
|
||||
*
|
||||
*
|
||||
* @param item
|
||||
* @param checked
|
||||
*/
|
||||
|
@ -261,10 +264,27 @@ public class SelectionManagerDlg extends CaveSWTDialogBase {
|
|||
for (String subKey : array) {
|
||||
TreeItem subTreeItem = new TreeItem(treeItem, SWT.NONE);
|
||||
subTreeItem.setText(subKey);
|
||||
|
||||
subTreeItem.setChecked(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Determine group checkbox setting, unchecked, grayed, checked
|
||||
TreeItem[] children = selectionTree.getItems();
|
||||
Set<Boolean> selectionSet = new HashSet<Boolean>();
|
||||
for (TreeItem item : children) {
|
||||
item.setChecked(true);
|
||||
for (TreeItem subItem : item.getItems()) {
|
||||
selectionSet.add(subItem.getChecked());
|
||||
}
|
||||
|
||||
if (selectionSet.contains(Boolean.TRUE)
|
||||
&& selectionSet.contains(Boolean.FALSE)) {
|
||||
item.setChecked(true);
|
||||
item.setGrayed(true);
|
||||
} else if (!selectionSet.contains(Boolean.TRUE)) {
|
||||
item.setChecked(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -314,6 +334,5 @@ public class SelectionManagerDlg extends CaveSWTDialogBase {
|
|||
} else {
|
||||
callback.setSelections(selectionMap);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,8 @@ import com.raytheon.viz.ui.widgets.duallist.IUpdate;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 25, 2012 mpduff Initial creation
|
||||
* Sep 25, 2012 1357 mpduff Initial creation.
|
||||
* Jan 17, 2013 1357 mpduff Added timestep settings.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -92,7 +93,7 @@ public class StatsControlDlg extends CaveSWTDialog implements IStatsControl,
|
|||
TimeUtil.MILLIS_PER_HOUR * 3, TimeUtil.MILLIS_PER_HOUR * 6,
|
||||
TimeUtil.MILLIS_PER_HOUR * 12, TimeUtil.MILLIS_PER_DAY,
|
||||
TimeUtil.MILLIS_PER_WEEK, TimeUtil.MILLIS_PER_WEEK * 2,
|
||||
TimeUtil.MILLIS_PER_MONTH };
|
||||
TimeUtil.MILLIS_PER_30_DAYS };
|
||||
|
||||
/** Date Format object */
|
||||
private final ThreadLocal<SimpleDateFormat> sdf = new ThreadLocal<SimpleDateFormat>() {
|
||||
|
@ -619,7 +620,24 @@ public class StatsControlDlg extends CaveSWTDialog implements IStatsControl,
|
|||
}
|
||||
TimeRange tr = new TimeRange(start, end);
|
||||
request.setTimeRange(tr);
|
||||
request.setTimeStep(5);
|
||||
|
||||
if (tr.getDuration() <= TimeUtil.MILLIS_PER_HOUR) {
|
||||
request.setTimeStep(5);
|
||||
} else if (tr.getDuration() <= TimeUtil.MILLIS_PER_HOUR * 3) {
|
||||
request.setTimeStep(5);
|
||||
} else if (tr.getDuration() <= TimeUtil.MILLIS_PER_HOUR * 6) {
|
||||
request.setTimeStep(10);
|
||||
} else if (tr.getDuration() <= TimeUtil.MILLIS_PER_HOUR * 12) {
|
||||
request.setTimeStep(20);
|
||||
} else if (tr.getDuration() <= TimeUtil.MILLIS_PER_HOUR * 24) {
|
||||
request.setTimeStep(40);
|
||||
} else if (tr.getDuration() <= TimeUtil.MILLIS_PER_DAY * 7) {
|
||||
request.setTimeStep(240);
|
||||
} else if (tr.getDuration() <= TimeUtil.MILLIS_PER_DAY * 14) {
|
||||
request.setTimeStep(480);
|
||||
} else {
|
||||
request.setTimeStep(1000);
|
||||
}
|
||||
|
||||
try {
|
||||
GraphDataResponse response = (GraphDataResponse) ThriftClient
|
||||
|
|
|
@ -23,15 +23,19 @@ import java.text.DecimalFormat;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.MouseAdapter;
|
||||
import org.eclipse.swt.events.MouseEvent;
|
||||
import org.eclipse.swt.events.MouseMoveListener;
|
||||
import org.eclipse.swt.events.PaintEvent;
|
||||
|
@ -47,31 +51,41 @@ import org.eclipse.swt.layout.GridData;
|
|||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Canvas;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.stats.data.DataPoint;
|
||||
import com.raytheon.uf.common.stats.data.GraphData;
|
||||
import com.raytheon.uf.common.stats.data.StatsData;
|
||||
import com.raytheon.uf.common.stats.util.DataViewUtils;
|
||||
import com.raytheon.uf.common.stats.util.DataView;
|
||||
import com.raytheon.uf.common.stats.util.UnitUtils;
|
||||
import com.raytheon.uf.common.stats.util.UnitUtils.TimeConversion;
|
||||
import com.raytheon.uf.common.stats.util.UnitUtils.UnitTypes;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.units.DataSizeUnit;
|
||||
import com.raytheon.uf.viz.core.RGBColors;
|
||||
import com.raytheon.uf.viz.stats.display.ScaleManager;
|
||||
|
||||
/**
|
||||
* Statistics graph canvas.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 3, 2012 728 mpduff Initial creation
|
||||
*
|
||||
* Oct 03, 2012 728 mpduff Initial creation.
|
||||
* Jan 17, 2013 1357 mpduff Added mouse listeners.
|
||||
* Jan 29, 2013 1523 mpduff Fix for count units.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -106,6 +120,15 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
}
|
||||
};
|
||||
|
||||
/** Decimal Format object */
|
||||
private final ThreadLocal<DecimalFormat> decFormat = new ThreadLocal<DecimalFormat>() {
|
||||
@Override
|
||||
protected DecimalFormat initialValue() {
|
||||
DecimalFormat format = new DecimalFormat("########.#");
|
||||
return format;
|
||||
}
|
||||
};
|
||||
|
||||
/** Constant */
|
||||
private final String COLON = ":";
|
||||
|
||||
|
@ -185,21 +208,18 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
/** Tooltip shell */
|
||||
private Shell tooltip;
|
||||
|
||||
/** Graph Data object */
|
||||
private GraphData graphData;
|
||||
/** Data View, avg, min, max, etc. */
|
||||
private DataView view = DataView.AVG;
|
||||
|
||||
/** Smallest value in the data set */
|
||||
private double minValue;
|
||||
/** Group selection callback */
|
||||
private IGroupSelection groupCallback;
|
||||
|
||||
/** Largest value in the data set */
|
||||
private double maxValue;
|
||||
|
||||
private String view = DataViewUtils.DataView.AVG.getView(); // Defaults to
|
||||
// average
|
||||
/** Hide dataset dialog */
|
||||
private HideDlg hideDlg;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*
|
||||
* @param parent
|
||||
* Parent composite
|
||||
* @param callback
|
||||
|
@ -214,8 +234,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
this.callback = callback;
|
||||
this.graphTitle = graphTitle;
|
||||
|
||||
this.graphData = callback.getGraphData();
|
||||
TimeRange tr = graphData.getTimeRange();
|
||||
TimeRange tr = callback.getGraphData().getTimeRange();
|
||||
String start = titleDateFormat.get().format(tr.getStart());
|
||||
String end = titleDateFormat.get().format(tr.getEnd());
|
||||
|
||||
|
@ -258,11 +277,18 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
handleMouseMoveEvent(e);
|
||||
}
|
||||
});
|
||||
|
||||
addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseDown(MouseEvent e) {
|
||||
handleMouseDownEvent(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize drawing settings.
|
||||
*
|
||||
*
|
||||
* @param gc
|
||||
* The Graphics Context
|
||||
*/
|
||||
|
@ -280,7 +306,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
/**
|
||||
* Draw on the canvas.
|
||||
*
|
||||
*
|
||||
* @param gc
|
||||
* The Graphics Context
|
||||
*/
|
||||
|
@ -327,7 +353,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
/**
|
||||
* Draw the X axis.
|
||||
*
|
||||
*
|
||||
* @param gc
|
||||
* The Graphics Context
|
||||
*/
|
||||
|
@ -342,8 +368,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
List<Date> dateList = new ArrayList<Date>();
|
||||
|
||||
SimpleDateFormat sdf = axisFormat.get();
|
||||
|
||||
TimeRange tr = graphData.getTimeRange();
|
||||
TimeRange tr = callback.getGraphData().getTimeRange();
|
||||
dateList.add(tr.getStart()); // Add the first date
|
||||
|
||||
long milliRange = tr.getDuration();
|
||||
|
@ -356,24 +381,29 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
long startMillis = tr.getStart().getTime();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
|
||||
Calendar cal = TimeUtil.newGmtCalendar();
|
||||
for (long i = tr.getStart().getTime(); i <= tr.getEnd().getTime(); i += TimeUtil.MILLIS_PER_HOUR) {
|
||||
cal.setTimeInMillis(i);
|
||||
int[] tickArray = {
|
||||
(int) (GRAPH_BORDER + (i - startMillis) / millisPerPixelX),
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT,
|
||||
(int) (GRAPH_BORDER + (i - startMillis) / millisPerPixelX),
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT + height };
|
||||
if (cal.get(Calendar.HOUR_OF_DAY) == 0) {
|
||||
if (cal.get(Calendar.HOUR_OF_DAY) == 0
|
||||
&& cal.get(Calendar.MINUTE) == 0) {
|
||||
gc.setLineWidth(3);
|
||||
} else {
|
||||
gc.setLineWidth(1);
|
||||
}
|
||||
int hour = cal.get(Calendar.HOUR_OF_DAY);
|
||||
|
||||
// Draw the tick marks
|
||||
if ((numHours / 24 <= 7) || (hour % 6) == 0) {
|
||||
gc.drawPolyline(tickArray);
|
||||
|
||||
// Draw grid lines
|
||||
if (callback.drawGridLines()) {
|
||||
boolean draw = false;
|
||||
if (numHours <= 6) {
|
||||
|
@ -386,19 +416,20 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
if (draw) {
|
||||
int[] gridLine = new int[] {
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT,
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX), GRAPH_BORDER };
|
||||
gc.drawPolyline(gridLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save the Zero hour for later
|
||||
if (hour == 0) {
|
||||
dateLocationList.add((int) (GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX));
|
||||
dateLocationList.add(Math.round(GRAPH_BORDER
|
||||
+ (i - startMillis) / millisPerPixelX));
|
||||
if (!dateList.contains(cal.getTime())) {
|
||||
dateList.add(cal.getTime());
|
||||
}
|
||||
|
@ -406,22 +437,28 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
buffer.setLength(0); // Clear the buffer
|
||||
int y = GRAPH_BORDER + GRAPH_HEIGHT + 20;
|
||||
int hr = cal.get(Calendar.HOUR_OF_DAY);
|
||||
int minute = cal.get(Calendar.MINUTE);
|
||||
|
||||
// Draw the tick marks
|
||||
if ((numHours <= 24) || (hour % 6 == 0 && numHours <= 168)) {
|
||||
if (numHours <= 3) {
|
||||
for (int j = 0; j < 60; j += 15) {
|
||||
for (int j = 0; j < TimeUtil.MINUTES_PER_HOUR; j += 15) {
|
||||
|
||||
buffer.setLength(0);
|
||||
int x = (int) (GRAPH_BORDER + (i - startMillis + j
|
||||
* TimeUtil.MILLIS_PER_MINUTE)
|
||||
int x = Math.round(GRAPH_BORDER
|
||||
+ (i - startMillis + j
|
||||
* TimeUtil.MILLIS_PER_MINUTE)
|
||||
/ millisPerPixelX);
|
||||
if (numHours == 1
|
||||
|| (numHours == 3 && (j == 0 || j == 30))) {
|
||||
String hrStr = (hr < 10) ? ZERO.concat(String
|
||||
.valueOf(hr)) : String.valueOf(hr);
|
||||
if (j == 0) {
|
||||
if (minute == 0) {
|
||||
buffer.append(hrStr).append(COLON)
|
||||
.append(MINUTE_00);
|
||||
} else {
|
||||
buffer.append(hrStr).append(COLON).append(j);
|
||||
buffer.append(hrStr).append(COLON)
|
||||
.append(minute);
|
||||
}
|
||||
int adjustment = buffer.length() * fontAveWidth / 2
|
||||
- 1;
|
||||
|
@ -429,30 +466,46 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
if (callback.drawGridLines()) {
|
||||
int[] gridLineArray = {
|
||||
(int) (GRAPH_BORDER + (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j)
|
||||
/ millisPerPixelX),
|
||||
Math.round(GRAPH_BORDER
|
||||
+ (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j) / millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT,
|
||||
(int) (GRAPH_BORDER + (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j)
|
||||
/ millisPerPixelX),
|
||||
Math.round(GRAPH_BORDER
|
||||
+ (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j) / millisPerPixelX),
|
||||
GRAPH_BORDER };
|
||||
if (hr == 0 && minute == 0) {
|
||||
gc.setLineWidth(3);
|
||||
}
|
||||
gc.drawPolyline(gridLineArray);
|
||||
gc.setLineWidth(1);
|
||||
}
|
||||
minute += 15;
|
||||
// Roll the minutes and hours, account for rolling
|
||||
// to the next hour/minute
|
||||
if (minute >= TimeUtil.MINUTES_PER_HOUR) {
|
||||
minute = 0;
|
||||
hr++;
|
||||
if (hr == TimeUtil.HOURS_PER_DAY) {
|
||||
hr = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Minor tick marks
|
||||
int[] minorTickArray = {
|
||||
(int) (GRAPH_BORDER + (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j)
|
||||
/ millisPerPixelX),
|
||||
Math.round(GRAPH_BORDER
|
||||
+ (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j) / millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT,
|
||||
(int) (GRAPH_BORDER + (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j)
|
||||
/ millisPerPixelX),
|
||||
Math.round(GRAPH_BORDER
|
||||
+ (i - startMillis + TimeUtil.MILLIS_PER_MINUTE
|
||||
* j) / millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT + height - 5 };
|
||||
gc.drawPolyline(minorTickArray);
|
||||
}
|
||||
} else {
|
||||
int x = (int) (GRAPH_BORDER + (i - startMillis)
|
||||
int x = Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX);
|
||||
String hrStr = (hr < 10) ? ZERO.concat(String.valueOf(hr))
|
||||
: String.valueOf(hr);
|
||||
|
@ -462,13 +515,13 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
if (callback.drawGridLines()) {
|
||||
if ((numHours == 24 && hr % 6 == 0)
|
||||
|| (numHours == 168 && hr == 0)) {
|
||||
|| (numHours == TimeUtil.HOURS_PER_WEEK && hr == 0)) {
|
||||
|
||||
int[] gridLineArray = {
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT,
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX), GRAPH_BORDER };
|
||||
gc.setLineWidth(1);
|
||||
gc.drawPolyline(gridLineArray);
|
||||
|
@ -477,7 +530,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
}
|
||||
}
|
||||
} else if (numHours == 336 && hour == 0) {
|
||||
int x = (int) (GRAPH_BORDER + (i - startMillis)
|
||||
int x = Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX);
|
||||
buffer.append(cal.get(Calendar.MONTH) + 1);
|
||||
buffer.append("/");
|
||||
|
@ -489,10 +542,10 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
// show every other line
|
||||
if (showLine) {
|
||||
int[] gridLineArray = {
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT,
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX), GRAPH_BORDER };
|
||||
gc.setLineWidth(1);
|
||||
gc.drawPolyline(gridLineArray);
|
||||
|
@ -503,7 +556,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
} else if (numHours == 720) {
|
||||
if (cal.get(Calendar.DAY_OF_MONTH) % 2 == 0 && hour == 0) {
|
||||
int x = (int) (GRAPH_BORDER + (i - startMillis)
|
||||
int x = Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX);
|
||||
buffer.append(cal.get(Calendar.MONTH) + 1);
|
||||
buffer.append("/");
|
||||
|
@ -513,10 +566,10 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
if (callback.drawGridLines()) {
|
||||
if (showLine) {
|
||||
int[] gridLineArray = {
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX),
|
||||
GRAPH_BORDER + GRAPH_HEIGHT,
|
||||
(int) (GRAPH_BORDER + (i - startMillis)
|
||||
Math.round(GRAPH_BORDER + (i - startMillis)
|
||||
/ millisPerPixelX), GRAPH_BORDER };
|
||||
gc.setLineWidth(1);
|
||||
gc.drawPolyline(gridLineArray);
|
||||
|
@ -556,7 +609,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
/**
|
||||
* Draw the Y axis.
|
||||
*
|
||||
*
|
||||
* @param gc
|
||||
* The Graphics Context
|
||||
*/
|
||||
|
@ -568,14 +621,21 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
gc.drawPolyline(yAxis);
|
||||
|
||||
Map<String, RGB> groupSettings = callback.getGroupSettings();
|
||||
|
||||
GraphData graphData = callback.getGraphData();
|
||||
double minVal = graphData.getMinValue(groupSettings.keySet(), view);
|
||||
double maxVal = graphData.getMaxValue(groupSettings.keySet(), view);
|
||||
if (view != DataView.COUNT) {
|
||||
UnitUtils uu = callback.getUnitUtils();
|
||||
minVal = uu.convertValue(minVal);
|
||||
maxVal = uu.convertValue(maxVal);
|
||||
}
|
||||
|
||||
setScaleValues(minVal, maxVal);
|
||||
|
||||
int numberTicks = 4;
|
||||
double inc = 5;
|
||||
double minScaleVal = 0;
|
||||
double maxScaleVal = 10;
|
||||
scalingManager = new ScaleManager(minVal, maxVal);
|
||||
numberTicks = scalingManager.getMajorTickCount();
|
||||
inc = scalingManager.getMajorTickIncrement();
|
||||
|
||||
|
@ -607,16 +667,18 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
/**
|
||||
* Draw the YAxis label.
|
||||
*
|
||||
*
|
||||
* @param gc
|
||||
* The Graphics Context
|
||||
*/
|
||||
private void drawYAxisLabel(GC gc) {
|
||||
String unit = this.graphData.getDisplayUnit();
|
||||
GraphData graphData = callback.getGraphData();
|
||||
String unit = graphData.getDisplayUnit();
|
||||
StringBuilder yAxisLabel = new StringBuilder(graphTitle);
|
||||
|
||||
if (unit != null && !unit.equalsIgnoreCase(COUNT) && unit.length() > 0
|
||||
&& !view.equals(DataViewUtils.DataView.COUNT.getView())) {
|
||||
if (isCount(unit)) {
|
||||
yAxisLabel.append(" Counts");
|
||||
} else {
|
||||
yAxisLabel.append(" (").append(unit).append(")");
|
||||
}
|
||||
|
||||
|
@ -637,9 +699,13 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
t.dispose();
|
||||
}
|
||||
|
||||
private boolean isCount(String unit) {
|
||||
return view.equals(DataView.COUNT) || COUNT.equalsIgnoreCase(unit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw the data on the canvas.
|
||||
*
|
||||
*
|
||||
* @param gc
|
||||
* The Graphics Context
|
||||
*/
|
||||
|
@ -647,6 +713,8 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
double maxScaleVal = scalingManager.getMaxScaleValue();
|
||||
double minScaleVal = scalingManager.getMinScaleValue();
|
||||
Map<String, RGB> groupSettings = callback.getGroupSettings();
|
||||
UnitUtils uu = callback.getUnitUtils();
|
||||
GraphData graphData = callback.getGraphData();
|
||||
|
||||
for (String key : graphData.getKeysWithData()) {
|
||||
if (groupSettings.containsKey(key)) {
|
||||
|
@ -672,30 +740,27 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
int lastYpix = -999;
|
||||
for (DataPoint point : dataList) {
|
||||
long x = point.getX();
|
||||
double y;
|
||||
double y = point.getValue(view);
|
||||
|
||||
if (view.equals(DataViewUtils.DataView.AVG
|
||||
.getView())) {
|
||||
y = point.getAvg();
|
||||
} else if (view.equals(DataViewUtils.DataView.MIN
|
||||
.getView())) {
|
||||
y = point.getMin();
|
||||
} else if (view.equals(DataViewUtils.DataView.MAX
|
||||
.getView())) {
|
||||
y = point.getMax();
|
||||
} else if (view.equals(DataViewUtils.DataView.SUM
|
||||
.getView())) {
|
||||
y = point.getSum();
|
||||
} else {
|
||||
y = point.getCount();
|
||||
if (view != DataView.COUNT) {
|
||||
y = uu.convertValue(y);
|
||||
}
|
||||
|
||||
int xPix = 0;
|
||||
int yPix = y2pixel(minScaleVal, maxScaleVal, y);
|
||||
int xPix = (int) ((x - startMillis)
|
||||
/ millisPerPixelX + GRAPH_BORDER);
|
||||
|
||||
long diff = x - startMillis;
|
||||
if (diff == 0) {
|
||||
xPix = GRAPH_BORDER;
|
||||
} else {
|
||||
xPix = Math
|
||||
.round((diff / millisPerPixelX + GRAPH_BORDER));
|
||||
}
|
||||
|
||||
if (xPix > GRAPH_BORDER + GRAPH_WIDTH) {
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
pointList.add(xPix);
|
||||
pointList.add(yPix);
|
||||
Rectangle rect = new Rectangle(xPix - 3, yPix - 3,
|
||||
|
@ -710,6 +775,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
lastYpix = yPix;
|
||||
}
|
||||
|
||||
// Draw each rectangle
|
||||
for (int i = 0; i < rectangleMap.get(key).size(); i++) {
|
||||
Rectangle rect = rectangleMap.get(key).get(i);
|
||||
gc.setForeground(color);
|
||||
|
@ -727,7 +793,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
/**
|
||||
* Y Value to pixel conversion.
|
||||
*
|
||||
*
|
||||
* @param yMin
|
||||
* The smallest y value
|
||||
* @param yMax
|
||||
|
@ -739,12 +805,12 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
private int y2pixel(double yMin, double yMax, double y) {
|
||||
double yDiff = yMax - yMin;
|
||||
double yValue = (GRAPH_HEIGHT / yDiff) * (y - yMin);
|
||||
return (int) (GRAPH_HEIGHT - Math.round(yValue) + GRAPH_BORDER);
|
||||
return Math.round(GRAPH_HEIGHT - Math.round(yValue) + GRAPH_BORDER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mouse move event hanler.
|
||||
*
|
||||
*
|
||||
* @param e
|
||||
* MouseEvent object
|
||||
*/
|
||||
|
@ -758,6 +824,8 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
if (graphData == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
UnitUtils uu = callback.getUnitUtils();
|
||||
for (String key : graphData.getKeys()) {
|
||||
int idx = 0;
|
||||
if (rectangleMap.containsKey(key)) {
|
||||
|
@ -771,7 +839,24 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
sb.append(key).append(colon);
|
||||
DataPoint point = graphData.getStatsData(key)
|
||||
.getData().get(idx);
|
||||
sb.append(point.getSampleText(view));
|
||||
double value = point.getValue(view);
|
||||
|
||||
if (!view.equals(DataView.COUNT)) {
|
||||
if (uu.getUnitType() == UnitTypes.DATA_SIZE) {
|
||||
value = uu.convertDataSizeValue(
|
||||
DataSizeUnit.BYTE, value);
|
||||
} else if (uu.getUnitType() == UnitTypes.TIME) {
|
||||
value = uu.convertTimeValue(
|
||||
TimeConversion.MS, (long) value);
|
||||
}
|
||||
}
|
||||
|
||||
SimpleDateFormat dateFormat = titleDateFormat.get();
|
||||
DecimalFormat decimalFormat = decFormat.get();
|
||||
|
||||
sb.append(dateFormat.format(new Date(point.getX())))
|
||||
.append("Z, ");
|
||||
sb.append(decimalFormat.format(value));
|
||||
}
|
||||
}
|
||||
idx++;
|
||||
|
@ -790,9 +875,102 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
}
|
||||
}
|
||||
|
||||
private void setScaleValues(double minVal, double maxVal) {
|
||||
scalingManager = new ScaleManager(minVal, maxVal);
|
||||
}
|
||||
|
||||
private void handleMouseDownEvent(MouseEvent e) {
|
||||
if (e.button == 3) {
|
||||
GraphData graphData = callback.getGraphData();
|
||||
if (graphData == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int x = e.x;
|
||||
int y = e.y;
|
||||
List<String> keyList = new ArrayList<String>();
|
||||
for (String key : graphData.getKeys()) {
|
||||
if (rectangleMap.containsKey(key)) {
|
||||
for (Rectangle rect : rectangleMap.get(key)) {
|
||||
if (callback.getGroupSettings().containsKey(key)) {
|
||||
// if true then data are on the graph
|
||||
if (rect.contains(x, y)) {
|
||||
keyList.add(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!keyList.isEmpty()) {
|
||||
showPopup(keyList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void showPopup(final List<String> inputList) {
|
||||
// Remove the tooltip if it is up
|
||||
if (tooltip != null && !tooltip.isDisposed()) {
|
||||
tooltip.dispose();
|
||||
}
|
||||
|
||||
// Remove any duplicate entries
|
||||
Set<String> set = new HashSet<String>(inputList);
|
||||
final List<String> keyList = new ArrayList<String>(set);
|
||||
Collections.sort(keyList);
|
||||
|
||||
Menu menu = new Menu(this.getShell(), SWT.POP_UP);
|
||||
|
||||
if (keyList.size() == 1) {
|
||||
MenuItem selectAll = new MenuItem(menu, SWT.NONE);
|
||||
selectAll.setText("Hide " + keyList.get(0));
|
||||
selectAll.addListener(SWT.Selection, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
handleHide(keyList);
|
||||
}
|
||||
});
|
||||
} else if (keyList.size() > 1) {
|
||||
MenuItem hideAll = new MenuItem(menu, SWT.NONE);
|
||||
hideAll.setText("Hide All Data At Point");
|
||||
hideAll.addListener(SWT.Selection, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
handleHide(keyList);
|
||||
}
|
||||
});
|
||||
|
||||
new MenuItem(menu, SWT.SEPARATOR);
|
||||
|
||||
MenuItem hideGraphDlgMI = new MenuItem(menu, SWT.NONE);
|
||||
hideGraphDlgMI.setText("Hide Graph Lines...");
|
||||
hideGraphDlgMI.addListener(SWT.Selection, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
showHideDlg(keyList);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// We need to make the menu visible
|
||||
menu.setVisible(true);
|
||||
}
|
||||
|
||||
private void handleHide(List<String> keyList) {
|
||||
groupCallback.setItemsOff(keyList);
|
||||
redraw();
|
||||
}
|
||||
|
||||
private void showHideDlg(List<String> keyList) {
|
||||
if (hideDlg == null || hideDlg.isDisposed()) {
|
||||
this.hideDlg = new HideDlg(getShell(), keyList, groupCallback);
|
||||
}
|
||||
hideDlg.open();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the "tooltip" mouseover.
|
||||
*
|
||||
*
|
||||
* @param parent
|
||||
* @param x
|
||||
* @param y
|
||||
|
@ -824,7 +1002,7 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Widget#dispose()
|
||||
*/
|
||||
@Override
|
||||
|
@ -836,20 +1014,20 @@ public class StatsDisplayCanvas extends Canvas {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the graph data.
|
||||
*
|
||||
* @param graphData
|
||||
* The GraphData object
|
||||
* @param view
|
||||
* The view type
|
||||
*/
|
||||
public void setGraphData(GraphData graphData) {
|
||||
this.graphData = graphData;
|
||||
public void setView(DataView view) {
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the view type.
|
||||
* @param view The view type
|
||||
* Set the group selection callback.
|
||||
*
|
||||
* @param groupCallback
|
||||
* The group callback
|
||||
*/
|
||||
public void setView(String view) {
|
||||
this.view = view;
|
||||
public void setCallback(IGroupSelection groupCallback) {
|
||||
this.groupCallback = groupCallback;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,24 +20,21 @@
|
|||
package com.raytheon.uf.viz.stats.ui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.ImageData;
|
||||
import org.eclipse.swt.graphics.ImageLoader;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Combo;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.FileDialog;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Layout;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
|
@ -48,7 +45,8 @@ import org.eclipse.swt.widgets.Shell;
|
|||
import com.raytheon.uf.common.stats.GraphDataRequest;
|
||||
import com.raytheon.uf.common.stats.GraphDataResponse;
|
||||
import com.raytheon.uf.common.stats.data.GraphData;
|
||||
import com.raytheon.uf.common.stats.util.DataViewUtils;
|
||||
import com.raytheon.uf.common.stats.util.DataView;
|
||||
import com.raytheon.uf.common.stats.util.UnitUtils;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -61,17 +59,19 @@ import com.raytheon.viz.ui.widgets.duallist.ButtonImages.ButtonImage;
|
|||
|
||||
/**
|
||||
* The Graph Data Structure.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 3, 2012 728 mpduff Initial creation
|
||||
*
|
||||
* Oct 03, 2012 728 mpduff Initial creation.
|
||||
* Jan 17, 2013 1357 mpduff Add ability to change units.
|
||||
* Jan 18, 2013 1386 mpduff Change menu text.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -101,8 +101,8 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
/** Menu bar */
|
||||
private Menu menuBar;
|
||||
|
||||
/** Save Menu Item */
|
||||
private MenuItem saveMI;
|
||||
// /** Save Menu Item */
|
||||
// private MenuItem saveMI;
|
||||
|
||||
/** Exit Menu item */
|
||||
private MenuItem exitMI;
|
||||
|
@ -143,9 +143,17 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
/** Data view combo */
|
||||
private Combo viewCombo;
|
||||
|
||||
/** Menu item map */
|
||||
private final Map<String, MenuItem> menuItemMap = new HashMap<String, MenuItem>();
|
||||
|
||||
/** The currently displayed unit */
|
||||
private String displayUnit;
|
||||
|
||||
private UnitUtils unitUtils;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* @param parent
|
||||
* Parent Shell
|
||||
* @param callback
|
||||
|
@ -204,6 +212,8 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
groupComp.setLayout(gl);
|
||||
groupComp.setLayoutData(gd);
|
||||
|
||||
displayCanvas.setCallback(groupComp);
|
||||
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, false, true);
|
||||
gl = new GridLayout(2, false);
|
||||
Composite ctrlComp = new Composite(leftComp, SWT.NONE);
|
||||
|
@ -220,11 +230,11 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
graphLabel.setText("Graph: ");
|
||||
|
||||
List<String> viewList = new ArrayList<String>();
|
||||
viewList.add(DataViewUtils.DataView.AVG.getView());
|
||||
viewList.add(DataViewUtils.DataView.MIN.getView());
|
||||
viewList.add(DataViewUtils.DataView.MAX.getView());
|
||||
viewList.add(DataViewUtils.DataView.SUM.getView());
|
||||
viewList.add(DataViewUtils.DataView.COUNT.getView());
|
||||
viewList.add(DataView.AVG.getView());
|
||||
viewList.add(DataView.MIN.getView());
|
||||
viewList.add(DataView.MAX.getView());
|
||||
viewList.add(DataView.SUM.getView());
|
||||
viewList.add(DataView.COUNT.getView());
|
||||
|
||||
gd = new GridData(SWT.LEFT, SWT.CENTER, true, false);
|
||||
viewCombo = new Combo(dataComp, SWT.READ_ONLY);
|
||||
|
@ -314,15 +324,15 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
Menu fileMenu = new Menu(menuBar);
|
||||
fileMenuItem.setMenu(fileMenu);
|
||||
|
||||
saveMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
saveMI.setText("&Save\tCtrl+S");
|
||||
saveMI.setAccelerator(SWT.CTRL + 'S');
|
||||
saveMI.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
saveGraph();
|
||||
}
|
||||
});
|
||||
// saveMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
// saveMI.setText("&Save Graph Image\tCtrl+S");
|
||||
// saveMI.setAccelerator(SWT.CTRL + 'S');
|
||||
// saveMI.addSelectionListener(new SelectionAdapter() {
|
||||
// @Override
|
||||
// public void widgetSelected(SelectionEvent event) {
|
||||
// saveGraph();
|
||||
// }
|
||||
// });
|
||||
|
||||
exitMI = new MenuItem(fileMenu, SWT.NONE);
|
||||
exitMI.setText("&Quit\tCtrl+Q");
|
||||
|
@ -371,11 +381,63 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
displayCanvas.redraw();
|
||||
}
|
||||
});
|
||||
|
||||
// Set up the display units menu choices
|
||||
MenuItem unitsMI = new MenuItem(graphMenu, SWT.CASCADE);
|
||||
unitsMI.setText("Display Units");
|
||||
|
||||
unitUtils = new UnitUtils(graphData.getEventType(),
|
||||
graphData.getDataType());
|
||||
String displayUnit = graphData.getDisplayUnit();
|
||||
unitUtils.setUnitType(displayUnit);
|
||||
unitUtils.setDisplayUnit(displayUnit);
|
||||
Set<String> units = unitUtils.getUnitOptions();
|
||||
|
||||
Menu unitsMenu = new Menu(graphMenu);
|
||||
unitsMI.setMenu(unitsMenu);
|
||||
|
||||
for (String unit : units) {
|
||||
MenuItem mi = new MenuItem(unitsMenu, SWT.CHECK);
|
||||
mi.setText(unit);
|
||||
if (unit.equals(graphData.getDisplayUnit())) {
|
||||
mi.setSelection(true);
|
||||
}
|
||||
mi.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
handleUnitsSelection(e);
|
||||
}
|
||||
});
|
||||
|
||||
menuItemMap.put(unit, mi);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the unit selection event.
|
||||
*
|
||||
* @param e
|
||||
* The selection event
|
||||
*/
|
||||
private void handleUnitsSelection(SelectionEvent e) {
|
||||
MenuItem m = (MenuItem) e.getSource();
|
||||
for (Entry<String, MenuItem> es : menuItemMap.entrySet()) {
|
||||
MenuItem mi = es.getValue();
|
||||
if (es.getKey().equals(m.getText())) {
|
||||
m.setSelection(true);
|
||||
displayUnit = m.getText();
|
||||
unitUtils.setDisplayUnit(displayUnit);
|
||||
graphData.setDisplayUnit(displayUnit);
|
||||
displayCanvas.redraw();
|
||||
} else {
|
||||
mi.setSelection(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the canvas.
|
||||
*
|
||||
*
|
||||
* @param comp
|
||||
* Composite holding the canvas
|
||||
*/
|
||||
|
@ -395,7 +457,7 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
|
||||
/**
|
||||
* Set the GraphData object.
|
||||
*
|
||||
*
|
||||
* @param graphData
|
||||
*/
|
||||
public void setGraphData(GraphData graphData) {
|
||||
|
@ -412,7 +474,7 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
|
||||
/**
|
||||
* Set the title.
|
||||
*
|
||||
*
|
||||
* @param title
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
|
@ -421,66 +483,66 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
|
||||
/**
|
||||
* Set the graph title.
|
||||
*
|
||||
*
|
||||
* @param graphTitle
|
||||
*/
|
||||
public void setGraphTitle(String graphTitle) {
|
||||
this.graphTitle = graphTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a file dialog for saving the canvas.
|
||||
*/
|
||||
private void saveGraph() {
|
||||
FileDialog dialog = new FileDialog(shell, SWT.SAVE);
|
||||
String filename = dialog.open();
|
||||
if (filename == null) {
|
||||
return;
|
||||
}
|
||||
saveCanvas(filename);
|
||||
}
|
||||
// /**
|
||||
// * Open a file dialog for saving the canvas.
|
||||
// */
|
||||
// private void saveGraph() {
|
||||
// FileDialog dialog = new FileDialog(shell, SWT.SAVE);
|
||||
// String filename = dialog.open();
|
||||
// if (filename == null) {
|
||||
// return;
|
||||
// }
|
||||
// saveCanvas(filename);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Captures the canvas and saves the result into a file in a format
|
||||
* determined by the filename extension .
|
||||
*
|
||||
* @param control
|
||||
* The control to save
|
||||
* @param fileName
|
||||
* The name of the image to be saved
|
||||
*/
|
||||
public void saveCanvas(String filename) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Display display = displayCanvas.getDisplay();
|
||||
Image image = new Image(display, displayCanvas.getBounds().width,
|
||||
displayCanvas.getBounds().height);
|
||||
GC gc = new GC(image);
|
||||
|
||||
displayCanvas.drawCanvas(gc);
|
||||
|
||||
/* Default to PNG */
|
||||
int style = SWT.IMAGE_PNG;
|
||||
|
||||
if ((filename.endsWith(".jpg") == true) || filename.endsWith("jpeg")) {
|
||||
style = SWT.IMAGE_JPEG;
|
||||
} else if (filename.endsWith(".bmp") == true) {
|
||||
style = SWT.IMAGE_BMP;
|
||||
} else {
|
||||
filename += ".png";
|
||||
}
|
||||
|
||||
ImageLoader loader = new ImageLoader();
|
||||
loader.data = new ImageData[] { image.getImageData() };
|
||||
loader.save(filename, style);
|
||||
|
||||
sb.setLength(0);
|
||||
image.dispose();
|
||||
gc.dispose();
|
||||
}
|
||||
// /**
|
||||
// * Captures the canvas and saves the result into a file in a format
|
||||
// * determined by the filename extension .
|
||||
// *
|
||||
// * @param control
|
||||
// * The control to save
|
||||
// * @param fileName
|
||||
// * The name of the image to be saved
|
||||
// */
|
||||
// public void saveCanvas(String filename) {
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// Display display = displayCanvas.getDisplay();
|
||||
// Image image = new Image(display, displayCanvas.getBounds().width,
|
||||
// displayCanvas.getBounds().height);
|
||||
// GC gc = new GC(image);
|
||||
//
|
||||
// displayCanvas.drawCanvas(gc);
|
||||
//
|
||||
// /* Default to PNG */
|
||||
// int style = SWT.IMAGE_PNG;
|
||||
//
|
||||
// if ((filename.endsWith(".jpg") == true) || filename.endsWith("jpeg")) {
|
||||
// style = SWT.IMAGE_JPEG;
|
||||
// } else if (filename.endsWith(".bmp") == true) {
|
||||
// style = SWT.IMAGE_BMP;
|
||||
// } else {
|
||||
// filename += ".png";
|
||||
// }
|
||||
//
|
||||
// ImageLoader loader = new ImageLoader();
|
||||
// loader.data = new ImageData[] { image.getImageData() };
|
||||
// loader.save(filename, style);
|
||||
//
|
||||
// sb.setLength(0);
|
||||
// image.dispose();
|
||||
// gc.dispose();
|
||||
// }
|
||||
|
||||
/**
|
||||
* Request the graph be redrawn with a new time range.
|
||||
*
|
||||
*
|
||||
* @param parameter
|
||||
* The amount of time to move
|
||||
*/
|
||||
|
@ -516,7 +578,6 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
GraphDataRequest request = new GraphDataRequest();
|
||||
request.setGrouping(this.groupList);
|
||||
request.setCategory(this.category);
|
||||
|
@ -525,7 +586,7 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
request.setField(dataTypeID);
|
||||
TimeRange newTimeRange = new TimeRange(newStart, newEnd);
|
||||
request.setTimeRange(newTimeRange);
|
||||
request.setTimeStep(5);
|
||||
request.setTimeStep((int) graphData.getTimeStep());
|
||||
try {
|
||||
GraphDataResponse response = (GraphDataResponse) ThriftClient
|
||||
.sendRequest(request);
|
||||
|
@ -544,7 +605,6 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
}
|
||||
|
||||
this.graphData = localGraphData;
|
||||
this.displayCanvas.setGraphData(graphData);
|
||||
this.displayCanvas.redraw();
|
||||
} catch (VizException e) {
|
||||
this.statusHandler.handle(Priority.ERROR, "Error Requesting Data",
|
||||
|
@ -556,7 +616,8 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
* Handler for data view combo box change.
|
||||
*/
|
||||
private void handleDataViewChange() {
|
||||
String view = viewCombo.getText();
|
||||
String viewStr = viewCombo.getText();
|
||||
DataView view = DataView.fromString(viewStr);
|
||||
this.displayCanvas.setView(view);
|
||||
this.displayCanvas.redraw();
|
||||
}
|
||||
|
@ -596,7 +657,7 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
|
||||
/**
|
||||
* Set the groups.
|
||||
*
|
||||
*
|
||||
* @param groupList
|
||||
* List of groups
|
||||
*/
|
||||
|
@ -606,7 +667,7 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
|
||||
/**
|
||||
* Set the category.
|
||||
*
|
||||
*
|
||||
* @param category
|
||||
*/
|
||||
public void setCategory(String category) {
|
||||
|
@ -615,7 +676,7 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
|
||||
/**
|
||||
* Set the event type.
|
||||
*
|
||||
*
|
||||
* @param typeID
|
||||
*/
|
||||
public void setEventType(String typeID) {
|
||||
|
@ -624,10 +685,18 @@ public class StatsGraphDlg extends CaveSWTDialog implements IStatsDisplay,
|
|||
|
||||
/**
|
||||
* Set the data type id.
|
||||
*
|
||||
*
|
||||
* @param dataTypeID
|
||||
*/
|
||||
public void setDataType(String dataTypeID) {
|
||||
this.dataTypeID = dataTypeID;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public UnitUtils getUnitUtils() {
|
||||
return this.unitUtils;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,9 +55,6 @@ import com.raytheon.uf.viz.thinclient.localization.LocalizationCachePersistence;
|
|||
import com.raytheon.uf.viz.thinclient.localization.ThinClientLocalizationInitializer;
|
||||
import com.raytheon.uf.viz.thinclient.preferences.ThinClientPreferenceConstants;
|
||||
import com.raytheon.uf.viz.thinclient.refresh.TimedRefresher;
|
||||
import com.raytheon.viz.alerts.jobs.AutoUpdater;
|
||||
import com.raytheon.viz.alerts.jobs.MenuUpdater;
|
||||
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
|
||||
import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent;
|
||||
import com.raytheon.viz.ui.personalities.awips.CAVE;
|
||||
|
||||
|
@ -188,8 +185,11 @@ public class ThinClientComponent extends CAVE implements IThinClientComponent {
|
|||
@Override
|
||||
protected void initializeObservers() {
|
||||
ThinClientNotificationManagerJob.getInstance();
|
||||
ProductAlertObserver.addObserver(null, new MenuUpdater());
|
||||
ProductAlertObserver.addObserver(null, new AutoUpdater());
|
||||
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
|
||||
if (store.getBoolean(ThinClientPreferenceConstants.P_DISABLE_JMS) == false) {
|
||||
// JMS Enabled, register product alerts
|
||||
registerProductAlerts();
|
||||
}
|
||||
}
|
||||
|
||||
public void stopComponent() {
|
||||
|
|
|
@ -56,8 +56,11 @@ import com.raytheon.uf.viz.core.procedures.BundleUtil.BundleDataItem;
|
|||
import com.raytheon.uf.viz.core.rsc.URICatalog;
|
||||
import com.raytheon.uf.viz.core.rsc.URICatalog.IURIRefreshCallback;
|
||||
import com.raytheon.uf.viz.ui.menus.xml.BundleMenuContribution;
|
||||
import com.raytheon.viz.ui.MenuLoader;
|
||||
import com.raytheon.viz.ui.actions.LoadSerializedXml;
|
||||
import com.raytheon.viz.ui.BundleLoader;
|
||||
import com.raytheon.viz.ui.BundleLoader.BundleInfoType;
|
||||
import com.raytheon.viz.ui.BundleProductLoader;
|
||||
import com.raytheon.viz.ui.UiUtil;
|
||||
import com.raytheon.viz.ui.editor.AbstractEditor;
|
||||
|
||||
/**
|
||||
* Provides an Eclipse menu contribution that loads a bundle, and is decorated
|
||||
|
@ -345,15 +348,19 @@ public class BundleContributionItem extends ContributionItem {
|
|||
|
||||
private void loadBundle(Event event) {
|
||||
try {
|
||||
Bundle bundle = BundleLoader.getBundle(
|
||||
this.menuContribution.xml.bundleFile, substitutions,
|
||||
BundleInfoType.FILE_LOCATION);
|
||||
AbstractEditor editor = UiUtil.createOrOpenEditor(
|
||||
this.menuContribution.xml.editorType, bundle.getDisplays());
|
||||
BundleLoader loader;
|
||||
if (this.menuContribution.xml.fullBundleLoad == null
|
||||
|| this.menuContribution.xml.fullBundleLoad == false) {
|
||||
MenuLoader.loadProduct(this.menuContribution.xml.editorType,
|
||||
this.menuContribution.xml.bundleFile, substitutions);
|
||||
loader = new BundleProductLoader(editor, bundle);
|
||||
} else {
|
||||
LoadSerializedXml.loadTo(PathManagerFactory.getPathManager()
|
||||
.getStaticFile(this.menuContribution.xml.bundleFile),
|
||||
substitutions);
|
||||
loader = new BundleLoader(editor, bundle);
|
||||
}
|
||||
loader.schedule();
|
||||
|
||||
if (this.menuContribution.xml.command != null) {
|
||||
ICommandService service = (ICommandService) PlatformUI
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.viz.alerts.observers;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -306,58 +307,49 @@ public class ProductAlertObserver implements INotificationObserver {
|
|||
PracticeDataURINotificationMessage uriMsg = (PracticeDataURINotificationMessage) payLoad;
|
||||
dataURIs = uriMsg.getDataURIs();
|
||||
}
|
||||
for (int i = 0; i < dataURIs.length; ++i) {
|
||||
String str = dataURIs[i];
|
||||
processDataURI(str);
|
||||
}
|
||||
|
||||
startWrappers();
|
||||
|
||||
if (dataURIs != null && dataURIs.length > 0) {
|
||||
alertsProcessed += dataURIs.length;
|
||||
}
|
||||
|
||||
long curTime = System.currentTimeMillis();
|
||||
if (curTime - ALERT_LOG_INTERVAL > lastLogTime) {
|
||||
if (alertsProcessed > 0) {
|
||||
statusHandler.handle(Priority.VERBOSE, "Processed "
|
||||
+ alertsProcessed + " alerts in the last "
|
||||
+ ((curTime - lastLogTime) / 60000)
|
||||
+ " minutes");
|
||||
alertsProcessed = 0;
|
||||
}
|
||||
lastLogTime = curTime;
|
||||
}
|
||||
processDataURIs(Arrays.asList(dataURIs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void processDerivedAlerts(Collection<String> datauris) {
|
||||
for (String datauri : datauris) {
|
||||
getInstance().processDataURI(datauri);
|
||||
/**
|
||||
* Processes the DataURIs as alert messages
|
||||
*
|
||||
* @param datauris
|
||||
*/
|
||||
public static void processDataURIAlerts(Collection<String> datauris) {
|
||||
getInstance().processDataURIs(datauris);
|
||||
}
|
||||
|
||||
private synchronized void processDataURIs(Collection<String> dataURIs) {
|
||||
for (String str : dataURIs) {
|
||||
processDataURI(str);
|
||||
}
|
||||
|
||||
startWrappers();
|
||||
|
||||
if (dataURIs != null && dataURIs.size() > 0) {
|
||||
alertsProcessed += dataURIs.size();
|
||||
}
|
||||
|
||||
long curTime = System.currentTimeMillis();
|
||||
if (curTime - ALERT_LOG_INTERVAL > lastLogTime) {
|
||||
if (alertsProcessed > 0) {
|
||||
statusHandler.handle(Priority.VERBOSE, "Processed "
|
||||
+ alertsProcessed + " alerts in the last "
|
||||
+ ((curTime - lastLogTime) / 60000) + " minutes");
|
||||
alertsProcessed = 0;
|
||||
}
|
||||
lastLogTime = curTime;
|
||||
}
|
||||
getInstance().startWrappers();
|
||||
}
|
||||
|
||||
private void processDataURI(String datauri) {
|
||||
if (datauri == null)
|
||||
return;
|
||||
try {
|
||||
Map<String, Object> attribs;
|
||||
try {
|
||||
attribs = RecordFactory.getInstance().loadMapFromUri(datauri);
|
||||
|
||||
} catch (NoPluginException e) {
|
||||
// ignore, if we hit this it means we received an alert from
|
||||
// edex about ingested data, but viz doesn't have the necessary
|
||||
// plugins to do anything with it
|
||||
return;
|
||||
} catch (Exception e1) {
|
||||
statusHandler.handle(Priority.WARN, e1.getLocalizedMessage(),
|
||||
e1);
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Object> attribs = RecordFactory.getInstance()
|
||||
.loadMapFromUri(datauri);
|
||||
AlertMessage am = new AlertMessage();
|
||||
am.dataURI = datauri;
|
||||
am.decodedAlert = Collections.unmodifiableMap(attribs);
|
||||
|
@ -379,11 +371,12 @@ public class ProductAlertObserver implements INotificationObserver {
|
|||
sendToObserver(obs, am);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM, "Error preparing updates", e);
|
||||
|
||||
} catch (NoPluginException e) {
|
||||
// ignore, if we hit this it means we received an alert from
|
||||
// edex about ingested data, but viz doesn't have the necessary
|
||||
// plugins to do anything with it
|
||||
} catch (Exception e1) {
|
||||
statusHandler.handle(Priority.WARN, e1.getLocalizedMessage(), e1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ import com.raytheon.viz.gfe.smartscript.FieldDefinition;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 10, 2008 njensen Initial creation
|
||||
* Jan 18, 2013 njensen Added garbageCollect()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
|
@ -354,4 +356,20 @@ public abstract class BaseGfePyController extends PythonScript implements
|
|||
execute("addModule", INTERFACE, argMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the python garbage collector. This should be run at the end of a
|
||||
* procedure or tool in case the custom python used tk. If the python used
|
||||
* tk and it is not garbage collected, errors about invalid threads may
|
||||
* occur when the garbage collector runs in another python interpreter.
|
||||
*/
|
||||
public void garbageCollect() {
|
||||
try {
|
||||
jep.eval("import gc");
|
||||
jep.eval("gc.collect()");
|
||||
} catch (JepException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error garbage collecting GFE python interpreter", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ import com.raytheon.viz.gfe.core.griddata.IGridData;
|
|||
* to use IFPClient
|
||||
* 02/23/12 #346 dgilling Implement a dispose method.
|
||||
* 03/01/12 #346 dgilling Re-order dispose method.
|
||||
* 01/21/12 #1504 randerso Cleaned up old debug logging to improve performance
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -411,6 +412,7 @@ public class DbParm extends Parm {
|
|||
// normal mode
|
||||
if (normal) {
|
||||
Arrays.sort(grids);
|
||||
|
||||
// Now replace the existing grids with the new ones
|
||||
replaceGrids(affectedTimeRange, grids);
|
||||
|
||||
|
@ -621,6 +623,7 @@ public class DbParm extends Parm {
|
|||
|
||||
success &= allSaved;
|
||||
}
|
||||
|
||||
// if any pending saves
|
||||
if (sgr.size() > 0) {
|
||||
if (doSave(sgr)) {
|
||||
|
@ -630,13 +633,7 @@ public class DbParm extends Parm {
|
|||
} else {
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
// if any pending saves
|
||||
if (sgr.size() > 0) {
|
||||
if (!doSave(sgr)) {
|
||||
success = false;
|
||||
}
|
||||
pendingUnlocks.clear();
|
||||
}
|
||||
|
||||
if (success) {
|
||||
|
@ -757,10 +754,10 @@ public class DbParm extends Parm {
|
|||
|
||||
List<LockRequest> lreq = new ArrayList<LockRequest>(timesToSave.size());
|
||||
for (int i = 0; i < timesToSave.size(); i++) {
|
||||
String msg = "Reverting " + getParmID() + " tr="
|
||||
+ timesToSave.get(i);
|
||||
statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
|
||||
+ msg));
|
||||
// String msg = "Reverting " + getParmID() + " tr="
|
||||
// + timesToSave.get(i);
|
||||
// statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
|
||||
// + msg));
|
||||
|
||||
boolean success = true;
|
||||
IGridData[] grids = null;
|
||||
|
|
|
@ -24,9 +24,8 @@ import java.util.Arrays;
|
|||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
|
@ -107,8 +106,11 @@ import com.raytheon.viz.ui.cmenu.AbstractRightClickAction;
|
|||
* Apr 7, 2009 randerso Initial creation
|
||||
* Jun 3, 2011 8919 rferrel Determine grid's VisMode based
|
||||
* on imageOnEdit
|
||||
* 08/20/2012 #1082 randerso Moved calcStepTimes to AbstractParmManager for
|
||||
* 08/20/2012 #1082 randerso Moved calcStepTimes to AbstractParmManager for
|
||||
* use in PngWriter
|
||||
* 11/30/2012 #1328 mschenke Made GFE use descriptor for time matching
|
||||
* and time storage and manipulation
|
||||
* 01/22/2013 #1518 randerso Removed use of Map with Parms as keys
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -256,8 +258,6 @@ public class GridCanvas extends Canvas implements IMessageClient {
|
|||
|
||||
private ArrayList<GridBar> gridBarList;
|
||||
|
||||
private Map<Parm, GridBar> parmToGridBar;
|
||||
|
||||
private Rectangle selection;
|
||||
|
||||
private MenuManager menuMgr;
|
||||
|
@ -294,7 +294,6 @@ public class GridCanvas extends Canvas implements IMessageClient {
|
|||
dataMgr = gridManager.getDataManager();
|
||||
|
||||
gridBarList = new ArrayList<GridBar>();
|
||||
parmToGridBar = new HashMap<Parm, GridBar>();
|
||||
|
||||
Parm[] displayedParms = gridManager.getDataManager().getParmManager()
|
||||
.getDisplayedParms();
|
||||
|
@ -684,10 +683,13 @@ public class GridCanvas extends Canvas implements IMessageClient {
|
|||
|
||||
if (deletions != null) {
|
||||
for (Parm parm : deletions) {
|
||||
GridBar gridBar = parmToGridBar.remove(parm);
|
||||
if (gridBar != null) {
|
||||
gridBarList.remove(gridBar);
|
||||
gridBar.dispose();
|
||||
Iterator<GridBar> iter = gridBarList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
GridBar gridBar = iter.next();
|
||||
if (gridBar.getParm().equals(parm)) {
|
||||
iter.remove();
|
||||
gridBar.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -695,11 +697,8 @@ public class GridCanvas extends Canvas implements IMessageClient {
|
|||
if (additions != null) {
|
||||
for (Parm parm : additions) {
|
||||
if (!parm.getGridInfo().isTimeIndependentParm()) {
|
||||
if (!parmToGridBar.containsKey(parm)) {
|
||||
GridBar gridBar = new GridBar(this, parm, gridManager);
|
||||
gridBarList.add(gridBar);
|
||||
parmToGridBar.put(parm, gridBar);
|
||||
}
|
||||
GridBar gridBar = new GridBar(this, parm, gridManager);
|
||||
gridBarList.add(gridBar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.viz.gfe.ifpimage;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Formatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -31,6 +30,7 @@ import java.util.TimeZone;
|
|||
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.type.Pair;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.viz.core.RGBColors;
|
||||
|
@ -42,7 +42,6 @@ import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
|||
import com.raytheon.viz.core.ColorUtil;
|
||||
import com.raytheon.viz.gfe.Activator;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.gfe.core.griddata.IGridData;
|
||||
import com.raytheon.viz.gfe.core.parm.Parm;
|
||||
import com.raytheon.viz.gfe.core.parm.ParmDisplayAttributes.VisMode;
|
||||
import com.raytheon.viz.gfe.rsc.GFELegendResource;
|
||||
|
@ -62,6 +61,10 @@ import com.raytheon.viz.gfe.rsc.GFEResource;
|
|||
* Jul 10, 2012 15186 ryu Set legend font
|
||||
* Aug 20, 2012 #1078 dgilling Fix handling of ImageLegend_color
|
||||
* setting.
|
||||
* Nov 30, 2012 #1328 mschenke Made GFE use descriptor for time matching
|
||||
* and time storage and manipulation
|
||||
* Jan 22, 2013 #1518 randerso Removed use of Map with Parms as keys,
|
||||
* really just needed a list anyway.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -100,9 +103,8 @@ public class ImageLegendResource extends GFELegendResource {
|
|||
|
||||
@Override
|
||||
public LegendEntry[] getLegendData(IDescriptor descriptor) {
|
||||
Map<Parm, ResourcePair> parmRscMap = new HashMap<Parm, ResourcePair>();
|
||||
Collection<Parm> parms = getLegendOrderedParms(descriptor, parmRscMap);
|
||||
LegendData[] data = makeLegend(parms, parmRscMap);
|
||||
List<Pair<Parm, ResourcePair>> parms = getLegendOrderedParms(descriptor);
|
||||
LegendData[] data = makeLegend(parms);
|
||||
|
||||
LegendEntry[] entries = new LegendEntry[data.length];
|
||||
for (int i = 0; i < entries.length; ++i) {
|
||||
|
@ -113,15 +115,15 @@ public class ImageLegendResource extends GFELegendResource {
|
|||
return entries;
|
||||
}
|
||||
|
||||
private LegendData[] makeLegend(Collection<Parm> parms,
|
||||
Map<Parm, ResourcePair> parmRscMap) {
|
||||
private LegendData[] makeLegend(List<Pair<Parm, ResourcePair>> parms) {
|
||||
FramesInfo currInfo = descriptor.getFramesInfo();
|
||||
DataTime curTime = currInfo.getCurrentFrame();
|
||||
|
||||
// loop through the grids
|
||||
List<LegendData> legendData = new ArrayList<LegendData>();
|
||||
for (Parm parm : parms) {
|
||||
ResourcePair rp = parmRscMap.get(parm);
|
||||
for (Pair<Parm, ResourcePair> pair : parms) {
|
||||
Parm parm = pair.getFirst();
|
||||
ResourcePair rp = pair.getSecond();
|
||||
GFEResource rsc = (GFEResource) rp.getResource();
|
||||
String parmName = parm.getParmID().getParmName();
|
||||
ResourceProperties props = rp.getProperties();
|
||||
|
@ -150,7 +152,6 @@ public class ImageLegendResource extends GFELegendResource {
|
|||
|
||||
// get the units for the time string
|
||||
String units = rsc.getParm().getGridInfo().getUnitString();
|
||||
IGridData[] gd = new IGridData[0];
|
||||
|
||||
Locale locale = Locale.getDefault();
|
||||
String lang = getLanguage();
|
||||
|
|
|
@ -56,6 +56,7 @@ import com.raytheon.viz.gfe.jobs.AsyncProgressJob;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 8, 2009 njensen Initial creation
|
||||
* Jan 18, 2013 1509 njensen Garbage collect after running procedure
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -395,6 +396,7 @@ public class ProcedureJob extends AbstractQueueJob<ProcedureRequest> {
|
|||
statusHandler.handle(Priority.PROBLEM, "Error executing procedure "
|
||||
+ procedureName, e);
|
||||
} finally {
|
||||
controller.garbageCollect();
|
||||
progressJob.done(pjStatus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,13 +23,11 @@ import static com.raytheon.viz.gfe.core.parm.ParmDisplayAttributes.VisMode.IMAGE
|
|||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
@ -37,6 +35,7 @@ import org.eclipse.swt.graphics.RGB;
|
|||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.type.Pair;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -65,6 +64,7 @@ import com.raytheon.viz.gfe.PreferenceInitializer;
|
|||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.gfe.core.ISpatialDisplayManager;
|
||||
import com.raytheon.viz.gfe.core.griddata.IGridData;
|
||||
import com.raytheon.viz.gfe.core.msgs.INewModelAvailableListener;
|
||||
import com.raytheon.viz.gfe.core.msgs.Message;
|
||||
import com.raytheon.viz.gfe.core.msgs.Message.IMessageClient;
|
||||
import com.raytheon.viz.gfe.core.msgs.ShowQuickViewDataMsg;
|
||||
|
@ -83,13 +83,18 @@ import com.raytheon.viz.ui.input.InputAdapter;
|
|||
* 03/17/2008 chammack Initial Creation.
|
||||
* 08/19/2009 2547 rjpeter Implement Test/Prac database display.
|
||||
* 07/10/2012 15186 ryu Clean up initInternal per Ron
|
||||
* 11/30/2012 #1328 mschenke Made GFE use descriptor for time matching
|
||||
* and time storage and manipulation
|
||||
* 01/22/2013 #1518 randerso Removed use of Map with Parms as keys,
|
||||
* really just needed a list anyway.
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1.0
|
||||
*/
|
||||
public class GFELegendResource extends
|
||||
AbstractLegendResource<GFELegendResourceData> implements IMessageClient {
|
||||
AbstractLegendResource<GFELegendResourceData> implements
|
||||
IMessageClient, INewModelAvailableListener {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(GFELegendResource.class);
|
||||
|
||||
|
@ -118,8 +123,6 @@ public class GFELegendResource extends
|
|||
|
||||
private class GFELegendInputHandler extends InputAdapter {
|
||||
|
||||
private boolean inDrag;
|
||||
|
||||
ResourcePair mouseDownRsc = null;
|
||||
|
||||
@Override
|
||||
|
@ -158,10 +161,9 @@ public class GFELegendResource extends
|
|||
if (rsc.getResource() instanceof GFEResource) {
|
||||
GFEResource gfeRsc = (GFEResource) rsc
|
||||
.getResource();
|
||||
DataManager
|
||||
.getCurrentInstance()
|
||||
.getSpatialDisplayManager()
|
||||
.makeVisible(gfeRsc.getParm(),
|
||||
GFELegendResource.this.dataManager
|
||||
.getSpatialDisplayManager().makeVisible(
|
||||
gfeRsc.getParm(),
|
||||
!props.isVisible(), false);
|
||||
|
||||
} else {
|
||||
|
@ -173,8 +175,7 @@ public class GFELegendResource extends
|
|||
} else if (mouseButton == 2) {
|
||||
if (rsc.getResource() instanceof GFEResource) {
|
||||
GFEResource gfeRsc = (GFEResource) rsc.getResource();
|
||||
ISpatialDisplayManager sdm = DataManager
|
||||
.getCurrentInstance()
|
||||
ISpatialDisplayManager sdm = GFELegendResource.this.dataManager
|
||||
.getSpatialDisplayManager();
|
||||
Parm parm = gfeRsc.getParm();
|
||||
|
||||
|
@ -242,7 +243,6 @@ public class GFELegendResource extends
|
|||
}.run();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public GFELegendResource(DataManager dataManager,
|
||||
GFELegendResourceData resourceData, LoadProperties loadProps) {
|
||||
super(resourceData, loadProps);
|
||||
|
@ -257,8 +257,6 @@ public class GFELegendResource extends
|
|||
} catch (Exception e) {
|
||||
mode = LegendMode.GRIDS;
|
||||
}
|
||||
|
||||
Message.registerInterest(this, ShowQuickViewDataMsg.class);
|
||||
}
|
||||
|
||||
protected void addSpaces(StringBuilder sb, int numSpace) {
|
||||
|
@ -267,23 +265,6 @@ public class GFELegendResource extends
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#finalize()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
// FIXME: this needs to be a dispose method.
|
||||
Message.unregisterInterest(this, ShowQuickViewDataMsg.class);
|
||||
|
||||
if (font != null) {
|
||||
font.dispose();
|
||||
font = null;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -319,26 +300,21 @@ public class GFELegendResource extends
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets an ordered collection of Parms to display for the legend.
|
||||
* Gets an ordered list of Parm/ResourcePair pairs to display for the
|
||||
* legend.
|
||||
*
|
||||
* @param descriptor
|
||||
* @param parmRscMap
|
||||
* optional map to create Parm->ResourcePair mapping for parms
|
||||
* returned
|
||||
* @return
|
||||
*/
|
||||
protected Collection<Parm> getLegendOrderedParms(IDescriptor descriptor,
|
||||
Map<Parm, ResourcePair> parmRscMap) {
|
||||
List<Parm> parms = new ArrayList<Parm>();
|
||||
protected List<Pair<Parm, ResourcePair>> getLegendOrderedParms(
|
||||
IDescriptor descriptor) {
|
||||
List<Pair<Parm, ResourcePair>> parms = new ArrayList<Pair<Parm, ResourcePair>>();
|
||||
for (ResourcePair rp : descriptor.getResourceList()) {
|
||||
if (rp.getResource() instanceof GFEResource) {
|
||||
Parm parm = ((GFEResource) rp.getResource()).getParm();
|
||||
if (qvGrid == null
|
||||
|| (qvGrid != null && qvGrid.getParm() == parm)) {
|
||||
parms.add(parm);
|
||||
if (parmRscMap != null) {
|
||||
parmRscMap.put(parm, rp);
|
||||
}
|
||||
parms.add(new Pair<Parm, ResourcePair>(parm, rp));
|
||||
if (qvGrid != null) {
|
||||
break;
|
||||
}
|
||||
|
@ -346,8 +322,14 @@ public class GFELegendResource extends
|
|||
}
|
||||
}
|
||||
|
||||
Collections.sort(parms);
|
||||
Collections.reverse(parms);
|
||||
Collections.sort(parms, new Comparator<Pair<Parm, ResourcePair>>() {
|
||||
|
||||
@Override
|
||||
public int compare(Pair<Parm, ResourcePair> o1,
|
||||
Pair<Parm, ResourcePair> o2) {
|
||||
return o2.getFirst().compareTo(o1.getFirst());
|
||||
}
|
||||
});
|
||||
return parms;
|
||||
}
|
||||
|
||||
|
@ -362,8 +344,7 @@ public class GFELegendResource extends
|
|||
.getActivatedParm();
|
||||
StringBuilder labelBuilder = new StringBuilder();
|
||||
|
||||
Map<Parm, ResourcePair> parmRscMap = new HashMap<Parm, ResourcePair>();
|
||||
Collection<Parm> parms = getLegendOrderedParms(descriptor, parmRscMap);
|
||||
List<Pair<Parm, ResourcePair>> parms = getLegendOrderedParms(descriptor);
|
||||
Parm qvParm = null;
|
||||
if (qvGrid != null) {
|
||||
qvParm = qvGrid.getParm();
|
||||
|
@ -374,11 +355,12 @@ public class GFELegendResource extends
|
|||
ParmID topoID = dataManager.getTopoManager().getCompositeParmID();
|
||||
|
||||
// Topmost resources: GFE Parms
|
||||
for (Parm parm : parms) {
|
||||
for (Pair<Parm, ResourcePair> pair : parms) {
|
||||
Parm parm = pair.getFirst();
|
||||
ParmID parmId = parm.getParmID();
|
||||
DatabaseID dbId = parmId.getDbId();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
ResourcePair rp = parmRscMap.get(parm);
|
||||
ResourcePair rp = pair.getSecond();
|
||||
GFEResource rsc = (GFEResource) rp.getResource();
|
||||
LegendData ld = new LegendData();
|
||||
ResourceProperties props = rp.getProperties();
|
||||
|
@ -435,33 +417,27 @@ public class GFELegendResource extends
|
|||
|
||||
// get the model name
|
||||
labelBuilder.setLength(0);
|
||||
labelBuilder.append(dbId.getModelName());
|
||||
labelBuilder.append(dbId.getShortModelId());
|
||||
|
||||
boolean iscTyped = false;
|
||||
if (dataManager.getParmManager().iscMode()
|
||||
&& dbId.equals(dataManager.getParmManager()
|
||||
.getMutableDatabase())) {
|
||||
// FIXME this is from A1 and is not consistent with the code in
|
||||
// getLongestFields
|
||||
|
||||
ParmID iscPID = dataManager.getParmManager().getISCParmID(
|
||||
parmId);
|
||||
if (iscPID.isValid()) {
|
||||
// vparms (i.e. temp hazards) can't get here
|
||||
String iscStr = "+" + iscPID.getDbId().getDbType()
|
||||
+ iscPID.getDbId().getModelName();
|
||||
labelBuilder.append(iscStr);
|
||||
iscTyped = true;
|
||||
}
|
||||
}
|
||||
// if (_showISCMode && _quickViewGrid == GridID()
|
||||
// && _grids[i].gridID().parm()->parmID().databaseID() ==
|
||||
// _dbss->dataManager()->parmMgr()->mutableDatabase())
|
||||
// {
|
||||
// unsigned int mpos = 0;
|
||||
// if (modelText.found(' ', mpos))
|
||||
// {
|
||||
// ParmID iscPID =
|
||||
// _dbss->dataManager()->parmMgr()->getISCParmID(
|
||||
// _grids[i].gridID().parm()->parmID());
|
||||
// TextString iscStr = "+" + iscPID.databaseID().type() +
|
||||
// iscPID.databaseID().model();
|
||||
// modelText.insertBefore(mpos, iscStr);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (!iscTyped) {
|
||||
String type = dbId.getDbType();
|
||||
if ((type != null) && (type.length() > 0)) {
|
||||
labelBuilder.append("_");
|
||||
labelBuilder.append(type);
|
||||
}
|
||||
}
|
||||
|
||||
labelBuilder.append(" (" + dbId.getSiteId() + ")");
|
||||
sb.append(labelBuilder.toString());
|
||||
diff = lengths[3] - labelBuilder.length();
|
||||
addSpaces(sb, diff + 1);
|
||||
|
@ -562,16 +538,14 @@ public class GFELegendResource extends
|
|||
* @param descriptor
|
||||
* @return
|
||||
*/
|
||||
private int[] getLongestFields(Collection<Parm> parms) {
|
||||
private int[] getLongestFields(List<Pair<Parm, ResourcePair>> parms) {
|
||||
// Iterator<ResourcePair> rl = descriptor.getResourceList().iterator();
|
||||
int[] sz = new int[4];
|
||||
StringBuilder labelBuilder = new StringBuilder();
|
||||
// synchronized (rl) {
|
||||
// while (rl.hasNext()) {
|
||||
for (Parm parm : parms) {
|
||||
// AbstractVizResource<?, ?> resource = rl.next().getResource();
|
||||
// if (resource instanceof GFEResource) {
|
||||
// Parm parm = ((GFEResource) resource).getParm();
|
||||
for (Pair<Parm, ResourcePair> pair : parms) {
|
||||
Parm parm = pair.getFirst();
|
||||
ParmID parmId = parm.getParmID();
|
||||
sz[0] = Math.max(sz[0], parmId.getParmName().length());
|
||||
sz[1] = Math.max(sz[1], parmId.getParmLevel().length());
|
||||
|
@ -580,52 +554,33 @@ public class GFELegendResource extends
|
|||
|
||||
DatabaseID dbId = parmId.getDbId();
|
||||
labelBuilder.setLength(0);
|
||||
labelBuilder.append(dbId.getModelName());
|
||||
labelBuilder.append(dbId.getShortModelId());
|
||||
|
||||
boolean iscTyped = false;
|
||||
if (dataManager.getParmManager().iscMode()
|
||||
&& dbId.equals(dataManager.getParmManager()
|
||||
.getMutableDatabase())) {
|
||||
// FIXME this is A1 code and is not consistent with the code in
|
||||
// getLegendDataGrids
|
||||
|
||||
ParmID iscPID = dataManager.getParmManager().getISCParmID(
|
||||
parmId);
|
||||
if (iscPID.isValid()) {
|
||||
// vparms (i.e. temp hazards) can't get here
|
||||
String iscStr = "+" + iscPID.getDbId().getDbType()
|
||||
+ iscPID.getDbId().getModelName();
|
||||
labelBuilder.append(iscStr);
|
||||
iscTyped = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!iscTyped) {
|
||||
String type = dbId.getDbType();
|
||||
if ((type != null) && (type.length() > 0)) {
|
||||
labelBuilder.append("_");
|
||||
labelBuilder.append(type);
|
||||
}
|
||||
}
|
||||
|
||||
labelBuilder.append(" (" + dbId.getSiteId() + ")");
|
||||
// TODO: FIXME
|
||||
// if (showIscMode
|
||||
// && ids[i].gridID().parm()->parmID().databaseID() ==
|
||||
// _dbss->dataManager()->parmMgr()->mutableDatabase())
|
||||
// label += "+VISC";
|
||||
sz[3] = Math.max(sz[3], labelBuilder.length());
|
||||
|
||||
// }
|
||||
sz[3] = Math.max(sz[3], labelBuilder.length());
|
||||
}
|
||||
// }
|
||||
|
||||
return sz;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void disposeInternal() {
|
||||
super.disposeInternal();
|
||||
|
||||
this.dataManager.getParmManager().removeNewModelAvailableListener(this);
|
||||
Message.unregisterInterest(this, ShowQuickViewDataMsg.class);
|
||||
|
||||
if (font != null) {
|
||||
font.dispose();
|
||||
font = null;
|
||||
}
|
||||
IDisplayPaneContainer container = getResourceContainer();
|
||||
if (container != null) {
|
||||
|
@ -633,9 +588,14 @@ public class GFELegendResource extends
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void initInternal(IGraphicsTarget target) throws VizException {
|
||||
super.initInternal(target);
|
||||
|
||||
Message.registerInterest(this, ShowQuickViewDataMsg.class);
|
||||
this.dataManager.getParmManager().addNewModelAvailableListener(this);
|
||||
|
||||
int fontNum = 3;
|
||||
if (GFEPreference.contains("SELegend_font")) {
|
||||
fontNum = GFEPreference.getIntPreference("SELegend_font");
|
||||
|
@ -689,4 +649,9 @@ public class GFELegendResource extends
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void newModelAvailable(DatabaseID additions) {
|
||||
issueRefresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
|
||||
/**
|
||||
* Implements a colorbar for continuous (scalar and vector) elements
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
|
@ -91,11 +91,13 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Aug 20, 2008 dglazesk Updated for the new ColorMap interface
|
||||
* Aug 20, 2012 1079 randerso Changed to display all discrete values for
|
||||
* non-overlapping discretes
|
||||
* Jan 9, 2013 15661 ryu Set font for drawing regular Wx/discrete parm labels.
|
||||
* Jan 10, 2013 15548 ryu Update colorbar when new discrete colormap is selected
|
||||
*
|
||||
* Jan 9, 2013 15661 ryu Set font for drawing regular Wx/discrete parm labels.
|
||||
* Jan 10, 2013 15548 ryu Update colorbar when new discrete colormap is selected
|
||||
* Jan 23, 2013 #1524 randerso Fix missing discrete color bar and error when clicking
|
||||
* on discrete color bar when no grid exists
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -139,7 +141,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
|
||||
/**
|
||||
* Constructor for the Discrete Color Bar
|
||||
*
|
||||
*
|
||||
* @param parm
|
||||
* The parm
|
||||
* @param colorbarResource
|
||||
|
@ -162,8 +164,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
DataManager dataManager = parm.getDataManager();
|
||||
ISpatialDisplayManager spatialDisplayManager = dataManager
|
||||
.getSpatialDisplayManager();
|
||||
ResourcePair resourcePair = spatialDisplayManager
|
||||
.getResourcePair(parm);
|
||||
ResourcePair resourcePair = spatialDisplayManager.getResourcePair(parm);
|
||||
AbstractVizResource<?, ?> resource = resourcePair.getResource();
|
||||
ColorMapParameters params = resource.getCapability(
|
||||
ColorMapCapability.class).getColorMapParameters();
|
||||
|
@ -172,7 +173,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.rsc.colorbar.IColorBarDisplay#dispose()
|
||||
*/
|
||||
@Override
|
||||
|
@ -193,7 +194,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
|
||||
/**
|
||||
* Gets the Discrete Color map.
|
||||
*
|
||||
*
|
||||
* @return Returns the color map used for the discrete data.
|
||||
*/
|
||||
public static ColorMap getFallbackColorMap() {
|
||||
|
@ -202,7 +203,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.core.drawables.IRenderable#paint(com.raytheon.viz.core
|
||||
* .IGraphicsTarget, com.raytheon.viz.core.drawables.PaintProperties)
|
||||
|
@ -210,7 +211,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
@Override
|
||||
public void paint(IGraphicsTarget target, PaintProperties paintProps)
|
||||
throws VizException {
|
||||
DataTime currentTime = paintProps.getDataTime();
|
||||
DataTime currentTime = paintProps.getFramesInfo().getCurrentFrame();
|
||||
if (parm == null || currentTime == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -426,7 +427,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
* Labels that do not fit their designated band on the bar will be
|
||||
* truncated. Pickup value text will always be displayed in full, so any
|
||||
* text it overlaps will not be drawn.
|
||||
*
|
||||
*
|
||||
* @param target
|
||||
* The graphics target on which to draw
|
||||
* @param colorTable
|
||||
|
@ -557,7 +558,7 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
|
||||
/**
|
||||
* Draws the colorbar once colors and patterns have been decided.
|
||||
*
|
||||
*
|
||||
* @param target
|
||||
* The graphics target on which to draw.
|
||||
* @param pixelExtent
|
||||
|
@ -657,34 +658,42 @@ public class DiscreteColorbar implements IColorBarDisplay,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.rsc.colorbar.IColorBarDisplay#getValueAt(double[],
|
||||
* int)
|
||||
*/
|
||||
@Override
|
||||
public WxValue getValueAt(double[] coord, int mouseButton) {
|
||||
PixelExtent lastExtent = colorbarResource.getExtent();
|
||||
float fractionX = (float) ((coord[0] - lastExtent.getMinX()) / (lastExtent
|
||||
.getMaxX() - lastExtent.getMinX()));
|
||||
int index = (int) (gridKeys.size() * fractionX);
|
||||
if (index >= gridKeys.size()) {
|
||||
index = gridKeys.size() - 1;
|
||||
}
|
||||
WxValue retVal = null;
|
||||
if (!gridKeys.isEmpty()) {
|
||||
PixelExtent lastExtent = colorbarResource.getExtent();
|
||||
float fractionX = (float) ((coord[0] - lastExtent.getMinX()) / (lastExtent
|
||||
.getMaxX() - lastExtent.getMinX()));
|
||||
int index = (int) (gridKeys.size() * fractionX);
|
||||
if (index >= gridKeys.size()) {
|
||||
index = gridKeys.size() - 1;
|
||||
}
|
||||
|
||||
switch (parm.getGridInfo().getGridType()) {
|
||||
case DISCRETE: {
|
||||
DiscreteWxValue castedVal = (DiscreteWxValue) gridKeys.get(index);
|
||||
return new DiscreteWxValue(castedVal.getDiscreteKey(), parm);
|
||||
}
|
||||
case WEATHER: {
|
||||
WeatherWxValue castedVal = (WeatherWxValue) gridKeys.get(index);
|
||||
return new WeatherWxValue(castedVal.getWeatherKey(), parm);
|
||||
}
|
||||
default:
|
||||
throw new IllegalArgumentException(
|
||||
"getValueAt does not support type: "
|
||||
+ parm.getGridInfo().getGridType());
|
||||
switch (parm.getGridInfo().getGridType()) {
|
||||
case DISCRETE: {
|
||||
DiscreteWxValue castedVal = (DiscreteWxValue) gridKeys
|
||||
.get(index);
|
||||
retVal = new DiscreteWxValue(castedVal.getDiscreteKey(), parm);
|
||||
break;
|
||||
}
|
||||
case WEATHER: {
|
||||
WeatherWxValue castedVal = (WeatherWxValue) gridKeys.get(index);
|
||||
retVal = new WeatherWxValue(castedVal.getWeatherKey(), parm);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new IllegalArgumentException(
|
||||
"getValueAt does not support type: "
|
||||
+ parm.getGridInfo().getGridType());
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@ import java.util.Set;
|
|||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
|
@ -98,8 +96,10 @@ import com.raytheon.viz.ui.input.InputAdapter;
|
|||
* 05Aug2008 #1405 ebabin Fix fo delta not displaying after first use.
|
||||
* 06/03/2011 #8919 rferrel No longer display color bar when
|
||||
* VisMode is GRAPHIC
|
||||
* 11/13/20112 #1298 rferrel Changes for non-blocking SetDeltaDialog.
|
||||
* 11/13/2012 #1298 rferrel Changes for non-blocking SetDeltaDialog.
|
||||
* Changes for non-blocking SetValueDialog.
|
||||
* 01/23/2013 #1524 randerso Fix error when clicking on discrete color bar when
|
||||
* no grid exists
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -175,6 +175,10 @@ public class GFEColorbarResource extends
|
|||
|
||||
private void setPickup(double[] v, int mouseButton) {
|
||||
WxValue val = colorbarDisplay.getValueAt(v, mouseButton);
|
||||
if (val == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Parm parm = getParm();
|
||||
if (parm == null) {
|
||||
throw new IllegalStateException("Parm is null from colorbar");
|
||||
|
|
|
@ -53,6 +53,7 @@ import com.raytheon.viz.gfe.smarttool.Tool;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 19, 2010 njensen Initial creation
|
||||
* Jan 18, 2013 1509 njensen Garbage collect after running tool
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -164,6 +165,7 @@ public class SmartToolJob extends AbstractQueueJob<SmartToolRequest> {
|
|||
"Error in smart tool", e);
|
||||
throw e;
|
||||
} finally {
|
||||
python.garbageCollect();
|
||||
progressJob.done(pjResult);
|
||||
req = request;
|
||||
request = null;
|
||||
|
|
|
@ -47,9 +47,12 @@ 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.datastructure.DataCubeContainer;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizCommunicationException;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.level.LevelMappingFactory;
|
||||
import com.raytheon.uf.viz.core.rsc.DisplayType;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceType;
|
||||
import com.raytheon.uf.viz.derivparam.library.DerivParamDesc;
|
||||
import com.raytheon.uf.viz.derivparam.library.DerivedParameterGenerator;
|
||||
|
@ -129,6 +132,48 @@ public class GridProductBrowserDataDefinition extends
|
|||
return new GridResourceData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void constructResource(String[] selection, ResourceType type) {
|
||||
GridInventory inventory = getInventory();
|
||||
if (inventory == null) {
|
||||
super.constructResource(selection, type);
|
||||
return;
|
||||
}
|
||||
if (type != null) {
|
||||
loadProperties.setResourceType(type);
|
||||
}
|
||||
HashMap<String, RequestConstraint> parameters = getProductParameters(
|
||||
selection, order);
|
||||
List<String> ensembles = null;
|
||||
try {
|
||||
ensembles = inventory.getEnsembles(parameters);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
}
|
||||
if (ensembles != null && ensembles.size() > 1) {
|
||||
Collections.sort(ensembles);
|
||||
List<ResourcePair> pairs = new ArrayList<ResourcePair>();
|
||||
for (String ensemble : ensembles) {
|
||||
ResourcePair pair = new ResourcePair();
|
||||
resourceData = getResourceData();
|
||||
HashMap<String, RequestConstraint> newParameters = new HashMap<String, RequestConstraint>(
|
||||
parameters);
|
||||
newParameters.put(GridConstants.ENSEMBLE_ID,
|
||||
new RequestConstraint(ensemble));
|
||||
resourceData.setMetadataMap(newParameters);
|
||||
pair.setResourceData(resourceData);
|
||||
pair.setLoadProperties(loadProperties);
|
||||
pair.setProperties(new ResourceProperties());
|
||||
pairs.add(pair);
|
||||
}
|
||||
constructResource(pairs);
|
||||
} else {
|
||||
resourceData = getResourceData();
|
||||
resourceData.setMetadataMap(parameters);
|
||||
constructResource();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] queryData(String param,
|
||||
HashMap<String, RequestConstraint> queryList) {
|
||||
|
|
|
@ -298,7 +298,7 @@ public class GridUpdater implements IAlertObserver {
|
|||
}
|
||||
}
|
||||
myUpdates.addAll(datauris);
|
||||
ProductAlertObserver.processDerivedAlerts(datauris);
|
||||
ProductAlertObserver.processDataURIAlerts(datauris);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -203,7 +203,7 @@ public class RadarUpdater implements IAlertObserver {
|
|||
"Unable to generate updates for derived product", e);
|
||||
}
|
||||
}
|
||||
ProductAlertObserver.processDerivedAlerts(datauris);
|
||||
ProductAlertObserver.processDataURIAlerts(datauris);
|
||||
}
|
||||
|
||||
private CacheKey getCacheKey(RadarRequestableLevelNode rNode) {
|
||||
|
|
|
@ -51,6 +51,7 @@ import com.raytheon.uf.viz.core.IGraphicsTarget;
|
|||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapLoader;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapParameters.PersistedParameters;
|
||||
import com.raytheon.uf.viz.core.drawables.IRenderable;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
@ -595,6 +596,13 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
|
|||
// reuse the old parameters. This is useful when the resource is
|
||||
// sharing capabilities, for example in an FFGVizGroupResource.
|
||||
newParameters = oldParameters;
|
||||
} else if (oldParameters != null) {
|
||||
newParameters.setColorMapName(oldParameters.getColorMapName());
|
||||
newParameters.setColorMap(oldParameters.getColorMap());
|
||||
PersistedParameters persisted = oldParameters.getPersisted();
|
||||
if (persisted != null) {
|
||||
newParameters.applyPersistedParameters(persisted);
|
||||
}
|
||||
}
|
||||
return newParameters;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,16 @@ public class LightningResourceData extends AbstractRequestableResourceData {
|
|||
return rsc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpdatingOnMetadataOnly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRetrieveData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the handlingPositiveStrikes
|
||||
*/
|
||||
|
|
|
@ -157,7 +157,11 @@ public class MetarPrecipResource extends
|
|||
@Override
|
||||
protected void paintInternal(IGraphicsTarget target,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
List<RenderablePrecipData> precips = data.get(paintProps.getDataTime());
|
||||
DataTime time = paintProps.getDataTime();
|
||||
if (time == null) {
|
||||
return;
|
||||
}
|
||||
List<RenderablePrecipData> precips = getPrecipData(time);
|
||||
if (precips == null) {
|
||||
dataProcessJob.schedule();
|
||||
return;
|
||||
|
@ -201,6 +205,19 @@ public class MetarPrecipResource extends
|
|||
target.drawStrings(strings);
|
||||
}
|
||||
|
||||
private List<RenderablePrecipData> getPrecipData(DataTime time) {
|
||||
List<RenderablePrecipData> currData = null;
|
||||
synchronized (data) {
|
||||
currData = data.get(time);
|
||||
}
|
||||
if (currData != null) {
|
||||
synchronized (currData) {
|
||||
return new ArrayList<RenderablePrecipData>(currData);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initInternal(IGraphicsTarget target) throws VizException {
|
||||
|
||||
|
@ -262,7 +279,7 @@ public class MetarPrecipResource extends
|
|||
Double magnification = getCapability(MagnificationCapability.class)
|
||||
.getMagnification();
|
||||
|
||||
List<RenderablePrecipData> precips = data.get(descriptor
|
||||
List<RenderablePrecipData> precips = getPrecipData(descriptor
|
||||
.getTimeForResource(this));
|
||||
|
||||
if (precips == null || precips.isEmpty()) {
|
||||
|
@ -299,12 +316,14 @@ public class MetarPrecipResource extends
|
|||
private void processReproject() {
|
||||
if (reproject) {
|
||||
reproject = false;
|
||||
for (List<RenderablePrecipData> dataList : data.values()) {
|
||||
for (RenderablePrecipData precip : dataList) {
|
||||
Coordinate latLon = precip.getLatLon();
|
||||
double[] px = descriptor.worldToPixel(new double[] {
|
||||
latLon.x, latLon.y });
|
||||
precip.string.setCoordinates(px[0], px[1], px[2]);
|
||||
synchronized (data) {
|
||||
for (List<RenderablePrecipData> dataList : data.values()) {
|
||||
for (RenderablePrecipData precip : dataList) {
|
||||
Coordinate latLon = precip.getLatLon();
|
||||
double[] px = descriptor.worldToPixel(new double[] {
|
||||
latLon.x, latLon.y });
|
||||
precip.string.setCoordinates(px[0], px[1], px[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,10 +331,12 @@ public class MetarPrecipResource extends
|
|||
}
|
||||
|
||||
private void processRemoves() {
|
||||
while (!removes.isEmpty()) {
|
||||
DataTime toRemove = removes.poll();
|
||||
this.dataTimes.remove(toRemove);
|
||||
this.data.remove(toRemove);
|
||||
synchronized (data) {
|
||||
while (!removes.isEmpty()) {
|
||||
DataTime toRemove = removes.poll();
|
||||
this.dataTimes.remove(toRemove);
|
||||
this.data.remove(toRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -354,10 +375,13 @@ public class MetarPrecipResource extends
|
|||
// No need to reprocess times after the earliest update.
|
||||
continue;
|
||||
}
|
||||
Iterator<RenderablePrecipData> iter = entry.getValue().iterator();
|
||||
while (iter.hasNext()) {
|
||||
if (newStations.contains(iter.next().getStationName())) {
|
||||
iter.remove();
|
||||
synchronized (entry.getValue()) {
|
||||
Iterator<RenderablePrecipData> iter = entry.getValue()
|
||||
.iterator();
|
||||
while (iter.hasNext()) {
|
||||
if (newStations.contains(iter.next().getStationName())) {
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
addData(time, container.getBasePrecipData(time));
|
||||
|
@ -393,6 +417,9 @@ public class MetarPrecipResource extends
|
|||
}
|
||||
int curIndex = frameInfo.getFrameIndex();
|
||||
int count = frameInfo.getFrameCount();
|
||||
if (times.length != count) {
|
||||
System.out.println("Uh oh");
|
||||
}
|
||||
// This will generate the number series 0, -1, 1, -2, 2, -3, 3...
|
||||
for (int i = 0; i < count / 2 + 1; i = i < 0 ? -i : -i - 1) {
|
||||
int index = (count + curIndex + i) % count;
|
||||
|
@ -417,27 +444,31 @@ public class MetarPrecipResource extends
|
|||
}
|
||||
}
|
||||
}
|
||||
// This will only happen if frames were removed while we were processing
|
||||
// DOn't leave any half created frames
|
||||
for (DataTime time : baseOnly) {
|
||||
this.dataTimes.remove(time);
|
||||
this.data.remove(time);
|
||||
|
||||
synchronized (data) {
|
||||
// This will only happen if frames were removed while we were
|
||||
// processing. Don't leave any half created frames
|
||||
for (DataTime time : baseOnly) {
|
||||
this.dataTimes.remove(time);
|
||||
this.data.remove(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addData(DataTime time, List<PrecipData> precips) {
|
||||
if (precips.isEmpty()) {
|
||||
if (!dataTimes.contains(time)) {
|
||||
List<RenderablePrecipData> newPrecips = Collections.emptyList();
|
||||
data.put(time, newPrecips);
|
||||
synchronized (data) {
|
||||
List<RenderablePrecipData> newPrecips = Collections
|
||||
.emptyList();
|
||||
data.put(time, newPrecips);
|
||||
}
|
||||
dataTimes.add(time);
|
||||
}
|
||||
}
|
||||
if (data.containsKey(time)) {
|
||||
precips = new ArrayList<PrecipData>(precips);
|
||||
for (RenderablePrecipData pData : data.get(time)) {
|
||||
precips.add(pData);
|
||||
}
|
||||
precips.addAll(getPrecipData(time));
|
||||
}
|
||||
Collections.sort(precips, new Comparator<PrecipData>() {
|
||||
|
||||
|
@ -480,9 +511,11 @@ public class MetarPrecipResource extends
|
|||
data.distValue = bestDist;
|
||||
newPrecips.add(data);
|
||||
}
|
||||
data.put(time, newPrecips);
|
||||
if (!dataTimes.contains(time)) {
|
||||
dataTimes.add(time);
|
||||
synchronized (data) {
|
||||
data.put(time, newPrecips);
|
||||
if (!dataTimes.contains(time)) {
|
||||
dataTimes.add(time);
|
||||
}
|
||||
}
|
||||
issueRefresh();
|
||||
}
|
||||
|
|
|
@ -67,6 +67,16 @@ public class MetarPrecipResourceData extends AbstractRequestableResourceData {
|
|||
this.duration = duration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpdatingOnMetadataOnly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRetrieveData() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
|
|
@ -102,15 +102,17 @@ public class PointMetadataContainer extends MetadataContainer {
|
|||
}
|
||||
pdc = pdca.getBaseRecords(baseParams, originalConstraints);
|
||||
for (PointDataLevelNode node : nodes) {
|
||||
IDataRecord rec = pdc.getParameterRecord(node.getParameter());
|
||||
Set<AbstractRequestableData> cacheSet = new HashSet<AbstractRequestableData>();
|
||||
cacheSet.add(new PointRequestableData(rec, pdc.getDescription(
|
||||
node.getParameter()).getUnitObject()));
|
||||
dataCache.put(node, cacheSet);
|
||||
if (!Arrays.asList("id", "latitude", "longitude", "dataURI")
|
||||
.contains(rec.getName())) {
|
||||
pdc.remove(rec.getName());
|
||||
if (pdc != null) {
|
||||
IDataRecord rec = pdc.getParameterRecord(node.getParameter());
|
||||
cacheSet.add(new PointRequestableData(rec, pdc.getDescription(
|
||||
node.getParameter()).getUnitObject()));
|
||||
if (!Arrays.asList("id", "latitude", "longitude", "dataURI")
|
||||
.contains(rec.getName())) {
|
||||
pdc.remove(rec.getName());
|
||||
}
|
||||
}
|
||||
dataCache.put(node, cacheSet);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue