From 648bb0e3677aa805b1ac9b5d2a9cc5ea4ddf69f6 Mon Sep 17 00:00:00 2001 From: David Gillingham Date: Wed, 28 Oct 2015 13:21:07 -0500 Subject: [PATCH] Omaha #5003: Update A2 baseline code to utilize apache commons-lang version 3. Change-Id: I2b23399b2cfd3d37a41f89cb3c3173ca628caecb Former-commit-id: b9c41fe3354a90a03440e1ea67991e6ecd5885c0 --- .../META-INF/MANIFEST.MF | 4 +- .../uf/viz/archive/ui/ArchiveTableComp.java | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../uf/viz/d2d/core/time/D2DTimeMatcher.java | 5 +- .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 5 +- .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 5 +- .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 9 +- .../META-INF/MANIFEST.MF | 3 +- .../com.raytheon.viz.bcd/META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 4 +- .../rsc/AbstractDataAccessResource.java | 2 +- .../rsc/geometry/GenericGeometryResource.java | 2 +- .../rsc/grid/GenericGridResource.java | 2 +- .../META-INF/MANIFEST.MF | 3 +- .../com.raytheon.viz.gfe/META-INF/MANIFEST.MF | 6 +- .../com/raytheon/viz/gfe/core/UIFormat.java | 2 +- .../gfe/core/griddata/DiscreteGridData.java | 2 +- .../gfe/core/griddata/WeatherGridData.java | 2 +- .../AbstractSpatialDisplayManager.java | 14 +- .../raytheon/viz/gfe/core/parm/ABVParmID.java | 2 +- .../viz/gfe/core/parm/ParmListeners.java | 2 +- .../formatterlauncher/CallToActionsDlg.java | 2 +- .../viz/gfe/dialogs/sbu/ServiceBackupDlg.java | 2 +- .../viz/gfe/rsc/zones/ZoneDbResource.java | 2 +- .../ui/zoneselector/ZoneSelectorResource.java | 2 +- .../com.raytheon.viz.lpi/META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 4 +- .../mpe/ui/rsc/PlotGriddedFreezeResource.java | 19 +- .../mpe/ui/rsc/PlotGriddedPrecipResource.java | 7 +- .../mpe/ui/rsc/PlotGriddedTempResource.java | 19 +- .../com.raytheon.viz.mpe/META-INF/MANIFEST.MF | 4 +- .../raytheon/viz/mpe/core/MPEDataManager.java | 70 +- .../META-INF/MANIFEST.MF | 2 +- .../viz/pointdata/PointDataRequest.java | 3 +- .../viz/pointdata/rsc/PlotResource.java | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../viz/redbook/rsc/RedbookResource.java | 11 +- .../viz/redbook/rsc/RedbookResourceData.java | 2 +- .../rsc/RedbookUpperAirResource.java | 49 +- .../rsc/RedbookUpperAirResourceData.java | 2 +- .../com.raytheon.viz.spi/META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 4 +- .../config/AbstractDbSourceDataAdaptor.java | 9 +- .../com/raytheon/viz/warngen/gis/Area.java | 6 +- .../warngen/gis/ClosestPointComparator.java | 4 +- .../raytheon/viz/warngen/gis/WatchUtil.java | 14 +- .../src/com/raytheon/viz/warngen/gis/Wx.java | 27 +- .../viz/warngen/gui/BulletListManager.java | 5 +- .../warngen/text/AbstractLockingBehavior.java | 13 +- .../META-INF/MANIFEST.MF | 2 +- .../svcbu/ImportConfRequestHandler.java | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../edex/plugin/grib/util/Grib1Parameter.java | 3 +- .../edex/plugin/grib/util/GribLevel.java | 3 +- .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 4 +- .../dataplugin/satellite/SatMapCoverage.java | 44 +- .../counts/DerivedTempToWVPixelConverter.java | 12 +- .../units/counts/DerivedWVPixel.java | 2 +- .../counts/DerivedWVPixelToTempConverter.java | 2 +- .../generic/GenericFromPixelConverter.java | 12 +- .../satellite/units/generic/GenericPixel.java | 12 +- .../generic/GenericToPixelConverter.java | 12 +- .../units/goes/PercentOfNormalTPWPixel.java | 2 +- .../units/goes/PolarPrecipWaterPixel.java | 2 +- .../units/goes/SounderCloudAmountPixel.java | 36 +- .../goes/SounderCloudTopHeightPixel.java | 36 +- .../units/goes/SounderLiftedIndexPixel.java | 36 +- .../units/goes/SounderPrecipWaterPixel.java | 36 +- .../units/goes/SounderSkinTempPixel.java | 36 +- .../convert/CloudHeightToPixelConverter.java | 155 ++-- .../convert/CloudPercentToPixelConverter.java | 2 +- .../convert/CloudPixelToHeightConverter.java | 146 +-- .../convert/CloudPixelToPercentConverter.java | 126 +-- .../LiftedIndexPixelToTempConverter.java | 106 +-- .../LiftedIndexTempToPixelConverter.java | 116 +-- .../goes/convert/PercentToPixelConverter.java | 12 +- .../goes/convert/PixelToPercentConverter.java | 14 +- .../PolarPrecipLengthToPixelConverter.java | 14 +- .../PolarPrecipPixelToLengthConverter.java | 6 +- .../convert/SkinTempPixelToTempConverter.java | 106 +-- .../convert/SkinTempTempToPixelConverter.java | 116 +-- .../SounderPrecipLengthToPixelConverter.java | 116 +-- .../SounderPrecipPixelToLengthConverter.java | 106 +-- .../satellite/units/ir/IRPixel.java | 36 +- .../units/ir/IRPixelToTempConverter.java | 106 +-- .../units/ir/IRTempToPixelConverter.java | 2 +- .../units/water/BlendedTPWPixel.java | 2 +- .../water/PrecipLengthToPixelConverter.java | 122 +-- .../satellite/units/water/PrecipPixel.java | 36 +- .../water/PrecipPixelToLengthConverter.java | 112 +-- .../water/RainfallPixelToRateConverter.java | 121 +-- .../units/water/RainfallRatePixel.java | 39 +- .../water/RainfallRateToPixelConverter.java | 134 +-- .../META-INF/MANIFEST.MF | 5 +- .../META-INF/MANIFEST.MF | 8 +- .../dataplugin/text/db/AfosToAwips.java | 12 +- .../dataplugin/text/db/AfosToAwipsId.java | 12 +- .../dataplugin/text/db/StateMatchPK.java | 22 +- .../dataplugin/text/db/StdTextProduct.java | 2 +- .../dataplugin/text/db/StdTextProductId.java | 35 +- .../dataplugin/text/db/TextProductInfoPK.java | 16 +- .../dataplugin/text/db/WatchWarnPK.java | 18 +- .../META-INF/MANIFEST.MF | 6 +- .../config/GeospatialConfiguration.java | 2 +- .../warning/config/PathcastConfiguration.java | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../uf/common/gridcoverage/GridCoverage.java | 2 +- .../LambertConformalGridCoverage.java | 2 +- .../gridcoverage/MercatorGridCoverage.java | 2 +- .../gridcoverage/PolarStereoGridCoverage.java | 2 +- .../StereographicGridCoverage.java | 2 +- .../lookup/GridCoverageSpatialMap.java | 2 +- .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 4 +- .../com/raytheon/uf/common/nc4/NcBase.java | 16 +- .../META-INF/MANIFEST.MF | 4 +- .../uf/common/plugin/nwsauth/xml/UserXML.java | 4 +- .../META-INF/MANIFEST.MF | 4 +- .../encoder/ContentSlotBasedEncoder.java | 22 +- .../META-INF/MANIFEST.MF | 4 +- .../remote/script/RemoteScriptRunRequest.java | 4 +- .../META-INF/MANIFEST.MF | 10 +- .../common/tafqueue/TafQueueVftConfigMgr.java | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../raytheon/uf/edex/ogc/common/OgcLayer.java | 373 ++++---- .../uf/edex/ogc/common/db/LayerCollector.java | 4 +- .../edex/ogc/common/db/LayerTransformer.java | 719 ++++++++------- .../ogc/common/filter/ComparisonFilter.java | 32 +- .../common/gml3_1_1/EnvelopeConverter.java | 66 +- .../common/gml3_2_1/EnvelopeConverter.java | 2 +- .../common/gml3_2_1/GeometryConverter.java | 4 +- .../edex/ogc/common/http/OgcHttpHandler.java | 2 +- .../ogc/common/spatial/CoordinateUtil.java | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../edex/plugin/npp/viirs/VIIRSDecoder.java | 11 +- .../META-INF/MANIFEST.MF | 5 +- .../META-INF/MANIFEST.MF | 4 +- .../ingest/RedbookNdmMenuSubscriber.java | 2 +- .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 4 +- .../edex/plugin/text/dao/AfosToAwipsDao.java | 11 +- .../plugin/text/dao/StdTextProductDao.java | 2 +- .../text/ingest/AfosToAwipsListener.java | 2 +- .../META-INF/MANIFEST.MF | 4 +- .../ebxml/services/RegistryRESTServices.java | 2 +- .../ebxml/util/EbxmlExceptionUtil.java | 2 +- .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 4 +- .../wfs/filter/v1_1_0/QueryFilterVisitor.java | 859 +++++++++--------- .../v2_0_0/AbstractQueryFilterVisitor.java | 15 +- .../filter/v2_0_0/QueryExpressionVisitor.java | 2 +- .../uf/edex/wfs/reg/WfsRegistryImpl.java | 170 ++-- .../META-INF/MANIFEST.MF | 3 +- .../META-INF/MANIFEST.MF | 3 +- 158 files changed, 2578 insertions(+), 2508 deletions(-) diff --git a/cave/com.raytheon.uf.viz.archive/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.archive/META-INF/MANIFEST.MF index be6e378e31..b97e565602 100644 --- a/cave/com.raytheon.uf.viz.archive/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.archive/META-INF/MANIFEST.MF @@ -2,11 +2,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Archive Bundle-SymbolicName: com.raytheon.uf.viz.archive;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.ui;bundle-version="3.8.2", org.eclipse.core.runtime, - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", org.apache.commons.io;bundle-version="2.4.0", com.raytheon.viz.ui;bundle-version="1.12.1174", com.raytheon.uf.common.serialization;bundle-version="1.12.1174", diff --git a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveTableComp.java b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveTableComp.java index 921cbcccd8..d67f4884a1 100644 --- a/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveTableComp.java +++ b/cave/com.raytheon.uf.viz.archive/src/com/raytheon/uf/viz/archive/ui/ArchiveTableComp.java @@ -24,7 +24,7 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; diff --git a/cave/com.raytheon.uf.viz.d2d.core/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.d2d.core/META-INF/MANIFEST.MF index 536cda76d0..afd31b02b9 100644 --- a/cave/com.raytheon.uf.viz.d2d.core/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.d2d.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Core Plug-in Bundle-SymbolicName: com.raytheon.uf.viz.d2d.core;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.core.runtime, org.eclipse.ui, @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.core.runtime, com.raytheon.uf.viz.core.rsc;bundle-version="1.0.0", com.raytheon.uf.viz.core.maps;bundle-version="1.12.1174", com.raytheon.viz.ui;bundle-version="1.12.1174", - org.apache.commons.lang;bundle-version="2.3.0" + org.apache.commons.lang3;bundle-version="3.4.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.uf.viz.d2d.core, diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java index 34447eb03c..0c796e1c28 100644 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java +++ b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/D2DTimeMatcher.java @@ -33,7 +33,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -1048,8 +1048,9 @@ public class D2DTimeMatcher extends AbstractTimeMatcher { IRenderableDisplay paneDisplay = pane.getRenderableDisplay(); IDescriptor paneDescriptor = paneDisplay != null ? paneDisplay .getDescriptor() : null; - if (paneDescriptor == descriptor) + if (paneDescriptor == descriptor) { return true; + } } } return false; diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.monitor.ffmp/META-INF/MANIFEST.MF index 835206dfaf..a3a5f338f2 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Ffmp Plug-in Bundle-SymbolicName: com.raytheon.uf.viz.monitor.ffmp;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.uf.viz.monitor.ffmp.Activator Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.ui, @@ -14,7 +14,6 @@ Require-Bundle: org.eclipse.ui, com.raytheon.viz.ui;bundle-version="1.10.13", com.raytheon.uf.viz.monitor;bundle-version="1.11.1", com.raytheon.uf.common.dataplugin.ffmp;bundle-version="1.11.9", - org.apache.commons.lang;bundle-version="2.3.0", com.raytheon.uf.viz.d2d.core;bundle-version="1.11.15", com.raytheon.uf.viz.localization, com.raytheon.uf.common.serialization, diff --git a/cave/com.raytheon.uf.viz.monitor.safeseas/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.monitor.safeseas/META-INF/MANIFEST.MF index f79bfc979d..f69d83b57a 100644 --- a/cave/com.raytheon.uf.viz.monitor.safeseas/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.monitor.safeseas/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Safeseas Plug-in Bundle-SymbolicName: com.raytheon.uf.viz.monitor.safeseas;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, @@ -20,7 +20,6 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.viz.monitor.fog;bundle-version="1.12.1174" Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy -Import-Package: com.raytheon.viz.pointdata, - org.apache.commons.lang +Import-Package: com.raytheon.viz.pointdata Export-Package: com.raytheon.uf.viz.monitor.safeseas.resources Bundle-ClassPath: com.raytheon.uf.viz.monitor.safeseas.jar diff --git a/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF index b4e473be09..c6da873345 100644 --- a/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Monitor Plug-in Bundle-SymbolicName: com.raytheon.uf.viz.monitor;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.uf.viz.monitor.Activator Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.ui, @@ -13,7 +13,6 @@ Require-Bundle: org.eclipse.ui, org.geotools;bundle-version="2.4.0", com.raytheon.viz.alerts;bundle-version="1.10.13", com.raytheon.uf.common.monitor;bundle-version="1.11.17", - org.apache.commons.lang;bundle-version="2.3.0", com.raytheon.uf.common.wxmath Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.uf.viz.monitor, diff --git a/cave/com.raytheon.uf.viz.stats/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.stats/META-INF/MANIFEST.MF index 4ebf054218..01bae8cbac 100644 --- a/cave/com.raytheon.uf.viz.stats/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.stats/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Stats Bundle-SymbolicName: com.raytheon.uf.viz.stats;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, @@ -13,8 +13,7 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.common.util;bundle-version="1.12.1174", com.google.guava;bundle-version="1.0.0", com.raytheon.uf.common.units;bundle-version="1.0.0", - com.raytheon.uf.common.event;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0" + com.raytheon.uf.common.event;bundle-version="1.0.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.uf.viz.stats.collector, diff --git a/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF index 098014f18b..214bd58361 100644 --- a/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF @@ -24,7 +24,6 @@ Require-Bundle: org.eclipse.ui, com.raytheon.viz.ui.personalities.awips;bundle-version="1.12.1174", com.raytheon.uf.viz.application;bundle-version="1.0.0", com.raytheon.uf.common.tafqueue;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", com.raytheon.uf.common.auth;bundle-version="1.12.1174", com.raytheon.uf.viz.datacube, com.raytheon.uf.common.dataplugin.taf diff --git a/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF index 1e17761e4d..93499930de 100644 --- a/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Avnconfig Plug-in Bundle-SymbolicName: com.raytheon.viz.avnconfig;singleton:=true -Bundle-Version: 1.15.0.qualifier +Bundle-Version: 1.15.1.qualifier Bundle-Activator: com.raytheon.viz.avnconfig.Activator Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.ui, @@ -10,8 +10,8 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.viz.core, com.raytheon.viz.ui;bundle-version="1.11.9", org.geotools, - org.apache.commons.lang;bundle-version="2.3.0", - com.raytheon.viz.pointdata;bundle-version="1.15.0" + com.raytheon.viz.pointdata;bundle-version="1.15.0", + org.apache.commons.configuration;bundle-version="1.10.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: com.raytheon.uf.common.dataplugin.persist, @@ -22,8 +22,7 @@ Import-Package: com.raytheon.uf.common.dataplugin.persist, com.raytheon.uf.common.pointdata.spatial, com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.time, - com.raytheon.uf.common.util, - org.apache.commons.configuration + com.raytheon.uf.common.util Export-Package: com.raytheon.viz.avncommon, com.raytheon.viz.avnconfig Bundle-ClassPath: com.raytheon.viz.avnconfig.jar diff --git a/cave/com.raytheon.viz.awipstools/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.awipstools/META-INF/MANIFEST.MF index a8b0c61750..1874a041fe 100644 --- a/cave/com.raytheon.viz.awipstools/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.awipstools/META-INF/MANIFEST.MF @@ -2,13 +2,12 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Awipstools Plug-in Bundle-SymbolicName: com.raytheon.viz.awipstools;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.awipstools.Activator Bundle-Vendor: Raytheon Eclipse-RegisterBuddy: org.apache.velocity, com.raytheon.uf.viz.core.rsc Require-Bundle: org.eclipse.core.runtime, org.eclipse.ui, - org.apache.commons.lang, com.raytheon.viz.ui, javax.measure, com.raytheon.uf.common.pointdata, diff --git a/cave/com.raytheon.viz.bcd/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.bcd/META-INF/MANIFEST.MF index cc55c60389..40e0e955cc 100644 --- a/cave/com.raytheon.viz.bcd/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.bcd/META-INF/MANIFEST.MF @@ -2,14 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: BCD Plug-in Bundle-SymbolicName: com.raytheon.viz.bcd;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, com.raytheon.viz.core, com.raytheon.viz.ui, org.geotools, - org.apache.commons.lang, com.raytheon.uf.viz.core.maps;bundle-version="1.0.0", com.raytheon.uf.common.pointdata;bundle-version="1.12.1174" Bundle-ActivationPolicy: lazy diff --git a/cave/com.raytheon.viz.dataaccess/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.dataaccess/META-INF/MANIFEST.MF index d07a314ca3..63f952d4a7 100644 --- a/cave/com.raytheon.viz.dataaccess/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.dataaccess/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Viz Data Access Bundle-SymbolicName: com.raytheon.viz.dataaccess -Bundle-Version: 1.15.0.qualifier +Bundle-Version: 1.15.1.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy @@ -10,7 +10,7 @@ Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.14.0", com.raytheon.uf.common.dataaccess;bundle-version="1.0.0", com.raytheon.uf.common.colormap;bundle-version="1.12.1174", javax.measure;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.common.style;bundle-version="1.0.0", com.raytheon.uf.common.numeric;bundle-version="1.14.0", com.raytheon.uf.viz.core.grid;bundle-version="1.15.0", diff --git a/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/AbstractDataAccessResource.java b/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/AbstractDataAccessResource.java index 1f2bd30890..4ccba2e9aa 100644 --- a/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/AbstractDataAccessResource.java +++ b/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/AbstractDataAccessResource.java @@ -21,7 +21,7 @@ package com.raytheon.viz.dataaccess.rsc; import java.util.Arrays; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.IGraphicsTarget; diff --git a/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/geometry/GenericGeometryResource.java b/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/geometry/GenericGeometryResource.java index edd09301c4..b1fa77808c 100644 --- a/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/geometry/GenericGeometryResource.java +++ b/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/geometry/GenericGeometryResource.java @@ -25,7 +25,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.opengis.referencing.crs.CoordinateReferenceSystem; import com.raytheon.uf.common.dataaccess.geom.IGeometryData; diff --git a/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/grid/GenericGridResource.java b/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/grid/GenericGridResource.java index cf98d4233f..38f22bfc8c 100644 --- a/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/grid/GenericGridResource.java +++ b/cave/com.raytheon.viz.dataaccess/src/com/raytheon/viz/dataaccess/rsc/grid/GenericGridResource.java @@ -26,7 +26,7 @@ import java.util.Map; import javax.measure.unit.UnitFormat; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.geotools.coverage.grid.GridGeometry2D; import org.opengis.referencing.crs.CoordinateReferenceSystem; diff --git a/cave/com.raytheon.viz.geotiff/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.geotiff/META-INF/MANIFEST.MF index 6cf04801fc..5b6a1f8d21 100644 --- a/cave/com.raytheon.viz.geotiff/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.geotiff/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Geotiff Plug-in Bundle-SymbolicName: com.raytheon.viz.geotiff;singleton:=true -Bundle-Version: 1.14.1.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.geotiff.Activator Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.ui, @@ -10,7 +10,6 @@ Require-Bundle: org.eclipse.ui, com.raytheon.viz.core, org.geotools, com.raytheon.viz.ui, - org.apache.commons.lang, com.raytheon.uf.viz.core.maps;bundle-version="1.12.1174" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/cave/com.raytheon.viz.gfe/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.gfe/META-INF/MANIFEST.MF index 2c35e9c8ca..ab2a1d23e0 100644 --- a/cave/com.raytheon.viz.gfe/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.gfe/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GFE Plug-in Bundle-SymbolicName: com.raytheon.viz.gfe;singleton:=true -Bundle-Version: 1.15.1.qualifier +Bundle-Version: 1.15.2.qualifier Bundle-Activator: com.raytheon.viz.gfe.Activator Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.ui, @@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.viz.spellchecker;bundle-version="1.0.0";resolution:=optional, javax.measure, com.raytheon.viz.ui, - org.apache.commons.lang, org.jep, org.apache.velocity, com.raytheon.viz.core.contours, @@ -38,7 +37,8 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.common.plugin.nwsauth;bundle-version="1.14.0", com.raytheon.uf.viz.core.grid;bundle-version="1.15.0", com.raytheon.uf.common.dataaccess;bundle-version="1.15.0", - com.raytheon.uf.viz.core.point;bundle-version="1.15.0" + com.raytheon.uf.viz.core.point;bundle-version="1.15.0", + org.apache.commons.lang3;bundle-version="3.4.0" Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.viz.gfe, com.raytheon.viz.gfe.constants, diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/UIFormat.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/UIFormat.java index 86b7b67460..34288277c9 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/UIFormat.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/UIFormat.java @@ -25,7 +25,7 @@ import java.util.Arrays; import java.util.List; import java.util.TimeZone; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java index 7545ad856c..95bc1a1c6e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java @@ -25,7 +25,7 @@ import java.util.Arrays; import java.util.Date; import java.util.List; -import org.apache.commons.lang.mutable.MutableByte; +import org.apache.commons.lang3.mutable.MutableByte; import org.geotools.geometry.jts.JTS; import org.opengis.metadata.spatial.PixelOrientation; import org.opengis.referencing.FactoryException; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java index a2e03963c5..610638f62e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java @@ -24,7 +24,7 @@ import java.util.Arrays; import java.util.Date; import java.util.List; -import org.apache.commons.lang.mutable.MutableByte; +import org.apache.commons.lang3.mutable.MutableByte; import org.geotools.geometry.jts.JTS; import org.opengis.metadata.spatial.PixelOrientation; import org.opengis.referencing.FactoryException; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/AbstractSpatialDisplayManager.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/AbstractSpatialDisplayManager.java index 57428c73fd..dc70e03d93 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/AbstractSpatialDisplayManager.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/internal/AbstractSpatialDisplayManager.java @@ -25,11 +25,10 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.commands.ICommandService; -import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.DataTime; @@ -42,7 +41,6 @@ import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.ResourceList; import com.raytheon.uf.viz.core.rsc.ResourceProperties; -import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.viz.gfe.Activator; import com.raytheon.viz.gfe.GFEOperationFailedException; import com.raytheon.viz.gfe.actions.ShowISCMarkersAction; @@ -164,6 +162,7 @@ public abstract class AbstractSpatialDisplayManager implements * * @see com.raytheon.viz.gfe.core.ISpatialDisplayManager#getActivatedParm() */ + @Override public Parm getActivatedParm() { return activeParm; } @@ -186,6 +185,7 @@ public abstract class AbstractSpatialDisplayManager implements * addActivatedParmChangedListener * (com.raytheon.viz.gfe.core.msgs.IActivatedParmChangedListener) */ + @Override public void addActivatedParmChangedListener( IActivatedParmChangedListener listener) { Validate.notNull(listener, "Attempting to add null listener"); @@ -199,6 +199,7 @@ public abstract class AbstractSpatialDisplayManager implements * removeActivatedParmChangedListener * (com.raytheon.viz.gfe.core.msgs.IActivatedParmChangedListener) */ + @Override public void removeActivatedParmChangedListener( IActivatedParmChangedListener parmChangeListener) { this.activatedParmChangedListeners.remove(parmChangeListener); @@ -238,6 +239,7 @@ public abstract class AbstractSpatialDisplayManager implements * addGridVisibilityChangedListener * (com.raytheon.viz.gfe.core.msgs.IGridVisibilityChangedListener) */ + @Override public void addGridVisibilityChangedListener( IGridVisibilityChangedListener listener) { Validate.notNull(listener, "Attempting to add null listener"); @@ -251,6 +253,7 @@ public abstract class AbstractSpatialDisplayManager implements * removeGridVisibilityChangedListener * (com.raytheon.viz.gfe.core.msgs.IGridVisibilityChangedListener) */ + @Override public void removeGridVisibilityChangedListener( IGridVisibilityChangedListener parmChangeListener) { this.gridVisibilityChangedListeners.remove(parmChangeListener); @@ -491,6 +494,7 @@ public abstract class AbstractSpatialDisplayManager implements * com.raytheon.viz.gfe.core.ISpatialDisplayManager#activateParm(com.raytheon * .viz.gfe.core.parm.Parm) */ + @Override public void activateParm(Parm parmToActivate) throws GFEOperationFailedException { // Keep any resources on descriptors in sync @@ -504,11 +508,11 @@ public abstract class AbstractSpatialDisplayManager implements if (props.isSystemResource()) { continue; } - Parm parm = ((GFEResource) rsc).getParm(); + Parm parm = rsc.getParm(); if (parm.equals(parmToActivate)) { props.setVisible(true); } - ((GFEResource) rsc).reset(); + rsc.reset(); } } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ABVParmID.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ABVParmID.java index f6918039b2..2a6660451c 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ABVParmID.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ABVParmID.java @@ -24,7 +24,7 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; -import org.apache.commons.lang.mutable.MutableInt; +import org.apache.commons.lang3.mutable.MutableInt; import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java index 340b772e17..6b17fc033c 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java @@ -19,7 +19,7 @@ **/ package com.raytheon.viz.gfe.core.parm; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import org.eclipse.core.runtime.ListenerList; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/CallToActionsDlg.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/CallToActionsDlg.java index 41f729df1a..e98b5107ff 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/CallToActionsDlg.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/CallToActionsDlg.java @@ -22,7 +22,7 @@ package com.raytheon.viz.gfe.dialogs.formatterlauncher; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang.WordUtils; +import org.apache.commons.lang3.text.WordUtils; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.ScrolledComposite; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java index e6697c37e6..3e2ce9898e 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/sbu/ServiceBackupDlg.java @@ -33,7 +33,7 @@ import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.eclipse.core.runtime.FileLocator; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/zones/ZoneDbResource.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/zones/ZoneDbResource.java index 92a1cd2f4a..c81039e895 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/zones/ZoneDbResource.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/zones/ZoneDbResource.java @@ -35,7 +35,7 @@ import java.util.Random; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.swt.graphics.RGB; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ui/zoneselector/ZoneSelectorResource.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ui/zoneselector/ZoneSelectorResource.java index e43f17c071..71a952c7bf 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ui/zoneselector/ZoneSelectorResource.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ui/zoneselector/ZoneSelectorResource.java @@ -29,7 +29,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.ArrayBlockingQueue; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; diff --git a/cave/com.raytheon.viz.lpi/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.lpi/META-INF/MANIFEST.MF index c3c1d0cc12..51ca6ecbcc 100644 --- a/cave/com.raytheon.viz.lpi/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.lpi/META-INF/MANIFEST.MF @@ -10,7 +10,6 @@ Require-Bundle: org.eclipse.ui, com.raytheon.viz.core, com.raytheon.viz.ui, org.geotools, - org.apache.commons.lang, com.raytheon.uf.viz.core.maps;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.viz.lpi diff --git a/cave/com.raytheon.viz.mpe.ui/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.mpe.ui/META-INF/MANIFEST.MF index 690867eccb..cd70fd8f8d 100644 --- a/cave/com.raytheon.viz.mpe.ui/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.mpe.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: MPE Ui Plug-in Bundle-SymbolicName: com.raytheon.viz.mpe.ui;singleton:=true -Bundle-Version: 1.15.0.qualifier +Bundle-Version: 1.15.1.qualifier Bundle-Activator: com.raytheon.viz.mpe.ui.Activator Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.core.runtime, @@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.core.runtime, com.raytheon.viz.mpe, com.raytheon.viz.core.contours, javax.measure, - org.apache.commons.lang, + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.viz.app.launcher, com.raytheon.uf.common.mpe, com.raytheon.uf.common.hydro, diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedFreezeResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedFreezeResource.java index 850e2adff9..109b671f1a 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedFreezeResource.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedFreezeResource.java @@ -32,7 +32,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.Unit; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.eclipse.swt.graphics.RGB; import org.geotools.coverage.grid.GridGeometry2D; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -97,9 +97,9 @@ public class PlotGriddedFreezeResource extends IMpeResource { MPEDisplayManager displayMgr = null; - + private DailyQcUtils dqc = DailyQcUtils.getInstance(); - + private DrawDQCStations ddq = DrawDQCStations.getInstance(); private GriddedImageDisplay gridDisplay; @@ -130,9 +130,9 @@ public class PlotGriddedFreezeResource extends private List colorSet; -// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid(); + // Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid(); -// Pcp pcp = DailyQcUtils.pcp; + // Pcp pcp = DailyQcUtils.pcp; public PlotGriddedFreezeResource(MPEDisplayManager displayMgr, LoadProperties loadProperties, List colorSet) { @@ -213,7 +213,8 @@ public class PlotGriddedFreezeResource extends cm.read_file(file, num, dqc.pcp); - buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi * dqc.getHrap_grid().maxj); + buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi + * dqc.getHrap_grid().maxj); /* Get value in the HRAP grid bins. */ for (j = dqc.getHrap_grid().maxj - 1; j >= 0; j--) { @@ -264,7 +265,8 @@ public class PlotGriddedFreezeResource extends buf.rewind(); Rectangle extent = new Rectangle(dqc.getHrap_grid().hrap_minx, - dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi, dqc.getHrap_grid().maxj); + dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi, + dqc.getHrap_grid().maxj); if (extent.x == 0 && extent.y == 0) { Rectangle coord = null; @@ -433,8 +435,7 @@ public class PlotGriddedFreezeResource extends @Override protected void paintInternal(IGraphicsTarget target, PaintProperties paintProps) throws VizException { - if (buf == null || dqc.grids_flag != 1 - || displayMgr.isZflag() != true) { + if (buf == null || dqc.grids_flag != 1 || displayMgr.isZflag() != true) { return; } diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedPrecipResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedPrecipResource.java index 22bc92509e..76a5bc6f24 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedPrecipResource.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedPrecipResource.java @@ -32,7 +32,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.Unit; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.eclipse.swt.graphics.RGB; import org.geotools.coverage.grid.GridGeometry2D; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -470,13 +470,14 @@ public class PlotGriddedPrecipResource extends @Override protected void paintInternal(IGraphicsTarget target, PaintProperties paintProps) throws VizException { - if (buf == null || (DailyQcUtils.grids_flag != 1 && DailyQcUtils.contour_flag != 1) + if (buf == null + || (DailyQcUtils.grids_flag != 1 && DailyQcUtils.contour_flag != 1) || displayMgr.isQpf() != true) { return; } Set mode = displayMgr.getDisplayMode(); - System.out.println("Mode is: "+mode.toString()); + System.out.println("Mode is: " + mode.toString()); if (mode.contains(DisplayMode.Image)) { if (gridDisplay == null) { diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java index 62a37e7c7e..09fcaf5e49 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java @@ -32,7 +32,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.Unit; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.eclipse.swt.graphics.RGB; import org.geotools.coverage.grid.GridGeometry2D; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -100,9 +100,9 @@ public class PlotGriddedTempResource extends IMpeResource { private DailyQcUtils dqc = DailyQcUtils.getInstance(); - + private DrawDQCStations ddq = DrawDQCStations.getInstance(); - + MPEDisplayManager displayMgr = null; private GriddedImageDisplay2 gridDisplay; @@ -133,9 +133,9 @@ public class PlotGriddedTempResource extends private final List colorSet; -// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid(); + // Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid(); -// Pcp pcp = DailyQcUtils.pcp; + // Pcp pcp = DailyQcUtils.pcp; public PlotGriddedTempResource(MPEDisplayManager displayMgr, LoadProperties loadProperties, List colorSet) { @@ -223,7 +223,8 @@ public class PlotGriddedTempResource extends cm.read_file(file, num, dqc.pcp); - buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi * dqc.getHrap_grid().maxj); + buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi + * dqc.getHrap_grid().maxj); /* Get value in the HRAP grid bins. */ for (j = dqc.getHrap_grid().maxj - 1; j >= 0; j--) { @@ -276,7 +277,8 @@ public class PlotGriddedTempResource extends buf.rewind(); Rectangle extent = new Rectangle(dqc.getHrap_grid().hrap_minx, - dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi, dqc.getHrap_grid().maxj); + dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi, + dqc.getHrap_grid().maxj); if (extent.x == 0 && extent.y == 0) { Rectangle coord = null; @@ -446,8 +448,7 @@ public class PlotGriddedTempResource extends protected void paintInternal(IGraphicsTarget target, PaintProperties paintProps) throws VizException { - if (buf == null || dqc.grids_flag != 1 - || displayMgr.isMaxmin() != true) { + if (buf == null || dqc.grids_flag != 1 || displayMgr.isMaxmin() != true) { return; } diff --git a/cave/com.raytheon.viz.mpe/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.mpe/META-INF/MANIFEST.MF index d602f27a96..3d2b73a78a 100644 --- a/cave/com.raytheon.viz.mpe/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.mpe/META-INF/MANIFEST.MF @@ -2,14 +2,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Mpe Plug-in Bundle-SymbolicName: com.raytheon.viz.mpe -Bundle-Version: 1.12.1174.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.mpe.Activator Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.geotools, com.raytheon.viz.core, - org.apache.commons.lang, + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.viz.hydrocommon, javax.persistence;bundle-version="1.0.0", javax.measure;bundle-version="1.0.0", diff --git a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/core/MPEDataManager.java b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/core/MPEDataManager.java index c2c09fbfcb..aa4fca4eec 100644 --- a/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/core/MPEDataManager.java +++ b/cave/com.raytheon.viz.mpe/src/com/raytheon/viz/mpe/core/MPEDataManager.java @@ -40,7 +40,7 @@ import java.util.TimeZone; import javax.persistence.Table; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; import org.opengis.metadata.spatial.PixelOrientation; import com.raytheon.uf.common.dataplugin.shef.tables.Hourlypc; @@ -154,9 +154,9 @@ public class MPEDataManager { private short[] unbiasedRadarData; private double rwBiasValUsed; -// private double daaBiasValUsed; - - + + // private double daaBiasValUsed; + private double memSpanUsed; private String editBias; @@ -209,21 +209,18 @@ public class MPEDataManager { } /* - public double getDAABiasValUsed() { - return daaBiasValUsed; - } - */ - + * public double getDAABiasValUsed() { return daaBiasValUsed; } + */ + public void setRwBiasValUsed(double rwBiasValUsed) { this.rwBiasValUsed = rwBiasValUsed; } /* - public void setDAABiasValUsed(double daaBiasValUsed) { - this.daaBiasValUsed = daaBiasValUsed; - } - */ - + * public void setDAABiasValUsed(double daaBiasValUsed) { + * this.daaBiasValUsed = daaBiasValUsed; } + */ + /** * @return the memSpanUsed */ @@ -766,8 +763,8 @@ public class MPEDataManager { } public Map getDateMap(boolean update) { - - getDates(update); + + getDates(update); return dateMap; } @@ -781,7 +778,8 @@ public class MPEDataManager { for (Object[] item : results) { // note db stores west longitude as positive so must negate MPERadarLoc radarLoc = new MPERadarLoc((String) item[0], - ((Number) item[1]).doubleValue(), -((Number) item[2]).doubleValue()); + ((Number) item[1]).doubleValue(), + -((Number) item[2]).doubleValue()); radarList.add(radarLoc); } } catch (VizException e) { @@ -833,7 +831,8 @@ public class MPEDataManager { } radarData.setRadAvail(radAvail); - radarData.setRwBiasValUsed(((Number) item[3]).doubleValue()); + radarData + .setRwBiasValUsed(((Number) item[3]).doubleValue()); radarData.setMemSpanUsed(((Number) item[4]).doubleValue()); radarData.setEditBias((String) item[5]); radarData.setIgnoreRadar(!"n".equals(item[6])); @@ -868,26 +867,28 @@ public class MPEDataManager { return radarResultList; } - public Map readSPRadarData(Date date) - { - //reads DPA radar data - return readRadarData(date, "rwradarresult"); - + public Map readSPRadarData(Date date) { + // reads DPA radar data + return readRadarData(date, "rwradarresult"); + } - - public Map readDPRadarData(Date date) - { - //reads DAA radar data - return readRadarData(date, "daaradarresult"); + + public Map readDPRadarData(Date date) { + // reads DAA radar data + return readRadarData(date, "daaradarresult"); } - - + public Map readRadarData(Date date, String tableName) { getRadars(); StringBuffer sqlQuery = new StringBuffer(); - sqlQuery.append("select radid,num_gages, rad_avail, rw_bias_val_used, mem_span_used, edit_bias, ignore_radar from " + - tableName + " where obstime='" + sdf.format(date) + "' and radid in("); - System.out.println("Datestring actually passed in query to radar table: " + sdf.format(date)); + sqlQuery.append("select radid,num_gages, rad_avail, rw_bias_val_used, mem_span_used, edit_bias, ignore_radar from " + + tableName + + " where obstime='" + + sdf.format(date) + + "' and radid in("); + System.out + .println("Datestring actually passed in query to radar table: " + + sdf.format(date)); for (int i = 0; i < radarList.size(); i++) { sqlQuery.append("'"); sqlQuery.append(radarList.get(i).getId()); @@ -926,7 +927,8 @@ public class MPEDataManager { } radarData.setRadAvail(radAvail); - radarData.setRwBiasValUsed(((Number) item[3]).doubleValue()); + radarData + .setRwBiasValUsed(((Number) item[3]).doubleValue()); radarData.setMemSpanUsed(((Number) item[4]).doubleValue()); radarData.setEditBias((String) item[5]); radarData.setIgnoreRadar(!"n".equals(item[6])); diff --git a/cave/com.raytheon.viz.pointdata/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.pointdata/META-INF/MANIFEST.MF index fbd19db39b..ee45fd9b46 100644 --- a/cave/com.raytheon.viz.pointdata/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.pointdata/META-INF/MANIFEST.MF @@ -11,7 +11,7 @@ Require-Bundle: org.apache.batik;bundle-version="1.6", org.eclipse.core.runtime;bundle-version="3.8", com.raytheon.uf.viz.core;bundle-version="1.14.3", com.raytheon.viz.ui;bundle-version="1.14.0", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", javax.measure, com.raytheon.uf.viz.localization, org.jep;bundle-version="2.3.0", diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PointDataRequest.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PointDataRequest.java index 3320a1e4cf..21b9402aa5 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PointDataRequest.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PointDataRequest.java @@ -22,7 +22,7 @@ package com.raytheon.viz.pointdata; import java.util.HashMap; import java.util.Map; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType; @@ -242,7 +242,6 @@ public class PointDataRequest { new RequestConstraint( PointDataServerRequest.REQUEST_MODE_2D)); - PointDataServerRequest request = new PointDataServerRequest(rcMap); Object result = ThriftClient.sendRequest(request); diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java index 99c6750547..69adfb8a93 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java @@ -30,7 +30,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import org.eclipse.swt.graphics.RGB; import org.opengis.coverage.grid.GridEnvelope; import org.opengis.referencing.crs.CoordinateReferenceSystem; diff --git a/cave/com.raytheon.viz.redbook/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.redbook/META-INF/MANIFEST.MF index e8838a5ea5..738db1692f 100644 --- a/cave/com.raytheon.viz.redbook/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.redbook/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Redbook Plug-in Bundle-SymbolicName: com.raytheon.viz.redbook;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.redbook.Activator Bundle-Vendor: Raytheon Require-Bundle: org.apache.batik, @@ -11,7 +11,7 @@ Require-Bundle: org.apache.batik, com.raytheon.viz.core, org.geotools, com.raytheon.viz.ui, - org.apache.commons.lang, + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.common.serialization, com.raytheon.uf.common.pointdata;bundle-version="1.11.26", com.raytheon.viz.pointdata, diff --git a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java index d9d3913095..13460d3c42 100644 --- a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java +++ b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java @@ -25,7 +25,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import org.opengis.referencing.crs.CoordinateReferenceSystem; import com.raytheon.uf.common.dataplugin.HDF5Util; @@ -114,8 +114,9 @@ public class RedbookResource extends font.dispose(); font = null; } - for (RedbookFrame frame : this.redbookFrames.values()) + for (RedbookFrame frame : this.redbookFrames.values()) { frame.dispose(); + } } /* @@ -205,8 +206,9 @@ public class RedbookResource extends @Override public void remove(DataTime dataTime) { RedbookFrame frame = this.redbookFrames.remove(dataTime); - if (frame != null) + if (frame != null) { frame.dispose(); + } } /* @@ -219,8 +221,9 @@ public class RedbookResource extends @Override protected void initInternal(IGraphicsTarget target) throws VizException { for (RedbookFrame frame : this.redbookFrames.values()) { - if (!frame.hasInited()) + if (!frame.hasInited()) { frame.init(target); + } } } diff --git a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResourceData.java b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResourceData.java index bc24021ae6..f02e630db1 100644 --- a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResourceData.java +++ b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResourceData.java @@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord; diff --git a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResource.java b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResource.java index d4aa9b209d..b6213e529a 100644 --- a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResource.java +++ b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResource.java @@ -27,7 +27,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -135,8 +135,9 @@ public class RedbookUpperAirResource extends */ @Override protected void disposeInternal() { - for (UAFrame frame : this.frames.values()) + for (UAFrame frame : this.frames.values()) { frame.dispose(); + } if (font != null) { font.dispose(); @@ -181,8 +182,9 @@ public class RedbookUpperAirResource extends return; } RedbookWMOMap.Info info = map.getValue(wmo.getConstraintValue()); - if (info != null && info.name != null) + if (info != null && info.name != null) { this.humanReadableName = info.name; + } } } @@ -230,8 +232,9 @@ public class RedbookUpperAirResource extends public void remove(DataTime dataTime) { dataTimes.remove(dataTime); UAFrame frame = frames.remove(dataTime); - if (frame != null) + if (frame != null) { frame.dispose(); + } } /* @@ -274,17 +277,19 @@ public class RedbookUpperAirResource extends UAFrame frame = frames.get(displayedDataTime); if (frame != null) { - if (frame.isReadyToPaint()) + if (frame.isReadyToPaint()) { frame.paint(target, paintProps); - else + } else { job.upadte(); + } } } private void invalidateAll() { synchronized (job) { - for (UAFrame frame : frames.values()) + for (UAFrame frame : frames.values()) { frame.invalidate(); + } } } @@ -378,8 +383,9 @@ public class RedbookUpperAirResource extends } public void init(IGraphicsTarget target) { - if (pointData == null) + if (pointData == null) { retrieveAndDecodeData(); + } PlotModelFactory pmf; @@ -426,20 +432,22 @@ public class RedbookUpperAirResource extends } synchronized (job) { - if (!plotSettingsChanged) + if (!plotSettingsChanged) { valid = true; + } } } public void dispose() { synchronized (this) { - if (images != null) + if (images != null) { for (int i = 0; i < images.length; ++i) { if (images[i] != null) { images[i].dispose(); images[i] = null; } } + } valid = false; redbookRecord = null; pointData = null; @@ -448,8 +456,9 @@ public class RedbookUpperAirResource extends public void paint(IGraphicsTarget target, PaintProperties paintProps) throws VizException { - if (pointData == null || images == null) + if (pointData == null || images == null) { return; + } IExtent pe = paintProps.getView().getExtent(); @@ -470,24 +479,27 @@ public class RedbookUpperAirResource extends int threshold; - if (netZoom <= 0.8) + if (netZoom <= 0.8) { threshold = 0; - else if (netZoom <= 1.5) + } else if (netZoom <= 1.5) { threshold = 1; - else if (netZoom <= 2.5) + } else if (netZoom <= 2.5) { threshold = 2; - else + } else { threshold = 3; + } for (int i = 0; i < pointData.getCurrentSz(); ++i) { - if (images[i] == null) + if (images[i] == null) { continue; + } PointDataView pdv = pointData.readRandom(i); int zoomLevel = pdv.getInt(RedbookUpperAirDecoder.P_ZOOM_LEVEL); - if (zoomLevel > threshold) + if (zoomLevel > threshold) { continue; + } double[] worldCoord = new double[] { pdv.getFloat(RedbookUpperAirDecoder.P_LONGITUDE), @@ -512,8 +524,9 @@ public class RedbookUpperAirResource extends stationPixelLocation[1] + scaleValue, 0 }; if (ul[0] > pe.getMaxX() || ul[1] > pe.getMaxY() - || lr[0] < pe.getMinX() || lr[1] < pe.getMinY()) + || lr[0] < pe.getMinX() || lr[1] < pe.getMinY()) { continue; + } PixelCoverage pc = new PixelCoverage(new Coordinate(ul[0], ul[1], ul[2]), new Coordinate(ur[0], ur[1], ur[2]), diff --git a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResourceData.java b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResourceData.java index 37a36c2399..78547f34c4 100644 --- a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResourceData.java +++ b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbookua/rsc/RedbookUpperAirResourceData.java @@ -22,7 +22,7 @@ package com.raytheon.viz.redbookua.rsc; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord; diff --git a/cave/com.raytheon.viz.spi/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.spi/META-INF/MANIFEST.MF index e4b3fac88f..921cbe2fdd 100644 --- a/cave/com.raytheon.viz.spi/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.spi/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SPI Plug-in Bundle-SymbolicName: com.raytheon.viz.spi;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.spi.Activator Bundle-Vendor: Raytheon Require-Bundle: org.eclipse.ui, @@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.ui, com.raytheon.viz.ui, org.geotools, com.raytheon.viz.pointdata, - org.apache.commons.lang, com.raytheon.uf.viz.core.maps;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.viz.spi diff --git a/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF index 7b79a016f8..70b4e72ba6 100644 --- a/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.warngen/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Warngen Plug-in Bundle-SymbolicName: com.raytheon.viz.warngen;singleton:=true -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Activator: com.raytheon.viz.warngen.Activator Bundle-Vendor: Raytheon Eclipse-RegisterBuddy: com.raytheon.uf.viz.core.rsc, org.apache.velocity @@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.ui, com.raytheon.viz.ui, org.apache.velocity;bundle-version="1.7.0", javax.measure, - org.apache.commons.lang, + org.apache.commons.lang3;bundle-version="3.4.0", org.geotools, com.raytheon.viz.awipstools, com.raytheon.viz.texteditor, diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/AbstractDbSourceDataAdaptor.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/AbstractDbSourceDataAdaptor.java index 1948729f1d..5d5f268612 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/AbstractDbSourceDataAdaptor.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/config/AbstractDbSourceDataAdaptor.java @@ -15,7 +15,7 @@ import java.util.Set; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.GeodeticCalculator; import org.opengis.referencing.operation.MathTransform; @@ -185,8 +185,8 @@ abstract public class AbstractDbSourceDataAdaptor { ptFields.toArray(new String[ptFields.size()]), searchArea, filter, SearchMode.INTERSECTS); } - perfLog.logDuration("Retrieve location data for '" + pointSource + "'", - System.currentTimeMillis() - t0); + perfLog.logDuration("Retrieve location data for '" + pointSource + + "'", System.currentTimeMillis() - t0); } catch (SpatialException e) { throw new VizException("Error querying " + pointSource + " table: " + e.getLocalizedMessage(), e); @@ -309,7 +309,8 @@ abstract public class AbstractDbSourceDataAdaptor { iter.remove(); } } - SpatialQueryResult[] ptFeaturesFiltered = ptFeaturesList.toArray(new SpatialQueryResult[ptFeaturesList.size()]); + SpatialQueryResult[] ptFeaturesFiltered = ptFeaturesList + .toArray(new SpatialQueryResult[ptFeaturesList.size()]); Geometry localPCGeom = null; if (pcGeom != null) { diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java index b3e9a15b0f..356dffcd4c 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java @@ -27,7 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration; import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration.AreaType; @@ -35,6 +35,7 @@ import com.raytheon.uf.common.dataplugin.warning.config.GeospatialConfiguration; import com.raytheon.uf.common.dataplugin.warning.config.WarngenConfiguration; import com.raytheon.uf.common.dataplugin.warning.gis.GeospatialData; import com.raytheon.uf.common.dataplugin.warning.portions.GisUtil; +import com.raytheon.uf.common.dataplugin.warning.portions.GisUtil.Direction; import com.raytheon.uf.common.dataplugin.warning.portions.PortionsUtil; import com.raytheon.uf.common.dataplugin.warning.util.CountyUserData; import com.raytheon.uf.common.dataplugin.warning.util.GeometryUtil; @@ -50,12 +51,11 @@ import com.raytheon.uf.common.status.PerformanceStatus; 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.viz.warngen.gis.GisUtil.Direction; -import com.raytheon.uf.common.dataplugin.warning.portions.GisUtil.Direction; import com.raytheon.viz.warngen.gui.WarngenLayer; import com.raytheon.viz.warngen.util.Abbreviation; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.prep.PreparedGeometry; +//import com.raytheon.viz.warngen.gis.GisUtil.Direction; /** * Area diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/ClosestPointComparator.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/ClosestPointComparator.java index 9959d97e89..a9a1edc198 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/ClosestPointComparator.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/ClosestPointComparator.java @@ -25,7 +25,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; /** * TODO Add Description @@ -94,7 +94,7 @@ public class ClosestPointComparator implements Comparator { ClosestPoint[] points = null; if (array1 != null && array2 != null) { - points = (ClosestPoint[]) ArrayUtils.addAll(array1, array2); + points = ArrayUtils.addAll(array1, array2); } else if (array1 != null && array2 == null) { points = array1; } else if (array1 == null && array2 != null) { diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/WatchUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/WatchUtil.java index 4ec890af5f..9ca7a065fc 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/WatchUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/WatchUtil.java @@ -38,7 +38,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.SI; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import com.raytheon.uf.common.activetable.ActiveTableRecord; import com.raytheon.uf.common.activetable.OperationalActiveTableRecord; @@ -280,11 +280,15 @@ public class WatchUtil { DbQueryRequest request = new DbQueryRequest(); request.setEntityClass(entityClass); - request.addConstraint(START_TIME_FIELD, - new RequestConstraint(TimeUtil.formatToSqlTimestamp(startConstraintTime), + request.addConstraint( + START_TIME_FIELD, + new RequestConstraint(TimeUtil + .formatToSqlTimestamp(startConstraintTime), ConstraintType.LESS_THAN_EQUALS)); - request.addConstraint(END_TIME_FIELD, - new RequestConstraint(TimeUtil.formatToSqlTimestamp(simulatedTime), + request.addConstraint( + END_TIME_FIELD, + new RequestConstraint(TimeUtil + .formatToSqlTimestamp(simulatedTime), ConstraintType.GREATER_THAN_EQUALS)); request.addConstraint("phensig", new RequestConstraint(phenSig.toString(), ConstraintType.IN)); diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Wx.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Wx.java index 270aa2ad0c..2d8dfdb57a 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Wx.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Wx.java @@ -42,7 +42,7 @@ import javax.measure.unit.SI; import javax.measure.unit.Unit; import javax.measure.unit.UnitFormat; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.GeodeticCalculator; import org.opengis.referencing.FactoryException; @@ -271,8 +271,10 @@ public class Wx { String trxFileStr = pathcastConfiguration .getAreaNotationTranslationFile(); if (trxFileStr != null) { - File trxFile = WarnFileUtil.findFileInLocalizationIncludingBackupSite( - areaNotationAbbrevField, localizedSite, null).getFile(); + File trxFile = WarnFileUtil + .findFileInLocalizationIncludingBackupSite( + areaNotationAbbrevField, localizedSite, null) + .getFile(); if (!trxFile.exists()) { throw new WarngenException( "Translation file does not exist: " + trxFileStr); @@ -537,8 +539,7 @@ public class Wx { pathcasts.remove(pathcasts.size() - 1); } - perfLog.logDuration("Get pathcast", - System.currentTimeMillis() - t0); + perfLog.logDuration("Get pathcast", System.currentTimeMillis() - t0); return pathcasts.toArray(new PathCast[pathcasts.size()]); } catch (Exception e) { statusHandler.handle(Priority.PROBLEM, @@ -614,8 +615,8 @@ public class Wx { + variable + "'", t); } } - perfLog.logDuration("Get closestPoints", - System.currentTimeMillis() - t0); + perfLog.logDuration("Get closestPoints", System.currentTimeMillis() + - t0); return pointsMap; } @@ -976,8 +977,9 @@ public class Wx { List points, double stormtrackAngle) { // convert storm track angle to geometry angle in range of (0,360) double convertedAngle = 90.0 - stormtrackAngle; - if (convertedAngle < 0.0) + if (convertedAngle < 0.0) { convertedAngle += 360.0; + } Iterator iter = points.iterator(); List removedPoints = new ArrayList(); @@ -985,10 +987,12 @@ public class Wx { ClosestPoint cp = iter.next(); double d = Math.abs(convertedAngle - computeAngle(centroid, cp.point)); - if (d > 180.0) + if (d > 180.0) { d = 360.0 - d; - if (d > 90.0) + } + if (d > 90.0) { removedPoints.add(cp); + } } return removedPoints; } @@ -996,8 +1000,9 @@ public class Wx { private double computeAngle(Point p, Coordinate c) { double angle = Math.atan2(c.y - p.getY(), c.x - p.getX()) * 180 / Math.PI; - if (angle < 0) + if (angle < 0) { angle += 360; + } return angle; } } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/BulletListManager.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/BulletListManager.java index d0b6896822..70f9d4cbf9 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/BulletListManager.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/BulletListManager.java @@ -8,7 +8,7 @@ import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord; import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction; @@ -430,8 +430,7 @@ public class BulletListManager { private void loadBullets(Bullet[] bullets, DamInfoBullet[] damInfoBullets) { this.bullets = bullets; if (damInfoBullets != null) { - this.bullets = (Bullet[]) ArrayUtils - .addAll(bullets, damInfoBullets); + this.bullets = ArrayUtils.addAll(bullets, damInfoBullets); } } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java index 551e071de2..c0d2c84a03 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/text/AbstractLockingBehavior.java @@ -27,7 +27,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction; import com.raytheon.uf.common.dataplugin.warning.util.WarnFileUtil; @@ -217,7 +217,8 @@ abstract public class AbstractLockingBehavior { // should not be locked. For some reason, this differs from followups as // stated in DR 15110. Need verification from NWS. This is a variance? if (!isMarineProduct()) { - StringBuilder newText = new StringBuilder(firstBulletText.length() + 1024); + StringBuilder newText = new StringBuilder( + firstBulletText.length() + 1024); Matcher m = null; boolean first = true; for (String line : firstBulletText.split("\\n", -1)) { @@ -240,10 +241,11 @@ abstract public class AbstractLockingBehavior { int endIndex = line.toUpperCase().indexOf(" IN "); String textForSearch = null; - if (endIndex == -1) + if (endIndex == -1) { textForSearch = line; - else + } else { textForSearch = line.substring(0, endIndex); + } for (AffectedAreas affectedArea : affectedAreas) { String name = affectedArea.getName(); String areaNotation = affectedArea.getAreaNotation(); @@ -290,7 +292,8 @@ abstract public class AbstractLockingBehavior { Matcher m = WarnGenPatterns.firstBulletPtrn.matcher(firstBulletText); firstBulletText = m.replaceAll(WarnGenPatterns.REPLACEMENT); - this.text = new StringBuffer(text).replace(start, end, firstBulletText).toString(); + this.text = new StringBuffer(text).replace(start, end, firstBulletText) + .toString(); } /** diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF index d48805e038..068c9b86b0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF @@ -24,7 +24,7 @@ Require-Bundle: com.raytheon.uf.common.dataplugin.gfe;bundle-version="1.12.1174" com.raytheon.uf.common.dataplugin.grid;bundle-version="1.0.0", com.raytheon.uf.common.util;bundle-version="1.12.1174", com.google.guava;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.common.python.concurrent;bundle-version="1.0.0", com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174", com.raytheon.uf.edex.esb.camel;bundle-version="1.12.1174" diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ImportConfRequestHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ImportConfRequestHandler.java index a1217c3859..6fb17bf959 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ImportConfRequestHandler.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ImportConfRequestHandler.java @@ -19,7 +19,7 @@ **/ package com.raytheon.edex.plugin.gfe.server.handler.svcbu; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; import com.raytheon.edex.plugin.gfe.svcbackup.SvcBackupUtil; import com.raytheon.uf.common.dataplugin.gfe.request.ImportConfRequest; diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.grib/META-INF/MANIFEST.MF index 741e417733..31be7a709c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.grib/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Grib Plug-in Bundle-SymbolicName: com.raytheon.edex.plugin.grib -Bundle-Version: 1.15.1.qualifier +Bundle-Version: 1.15.2.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: com.raytheon.edex.common;bundle-version="1.14.0", com.raytheon.uf.common.awipstools, @@ -16,7 +16,7 @@ Require-Bundle: com.raytheon.edex.common;bundle-version="1.14.0", com.raytheon.uf.edex.plugin.grid, com.raytheon.uf.edex.python.decoder, org.apache.camel;bundle-version="2.12.3", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", javax.measure, ucar.nc2, org.jep;bundle-version="3.3.0" diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/Grib1Parameter.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/Grib1Parameter.java index 4f46da5620..0e8528a14d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/Grib1Parameter.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/Grib1Parameter.java @@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -127,6 +127,7 @@ public class Grib1Parameter { this.id = hashCode(); } + @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); builder.append(center); diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/GribLevel.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/GribLevel.java index f271d4fc47..8d18076e17 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/GribLevel.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/util/GribLevel.java @@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -122,6 +122,7 @@ public class GribLevel { this.id = hashCode(); } + @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); builder.append(center); diff --git a/edexOsgi/com.raytheon.edex.uengine/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.uengine/META-INF/MANIFEST.MF index 0f9a7e8a95..1cf8f81f99 100644 --- a/edexOsgi/com.raytheon.edex.uengine/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.uengine/META-INF/MANIFEST.MF @@ -29,5 +29,4 @@ Require-Bundle: com.raytheon.uf.edex.core;bundle-version="1.12.1174", com.raytheon.uf.common.python;bundle-version="1.12.1174", com.raytheon.uf.common.util;bundle-version="1.12.1174", org.apache.commons.configuration;bundle-version="1.6.0", - org.apache.commons.lang;bundle-version="2.3.0", org.apache.commons.pool2;bundle-version="2.4.2" diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/META-INF/MANIFEST.MF index 04493f6167..20086fdc7e 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/META-INF/MANIFEST.MF @@ -2,13 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Satellite Common Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.satellite -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", com.raytheon.uf.common.serialization;bundle-version="1.12.1174", javax.persistence;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", javax.measure;bundle-version="1.0.0", com.raytheon.uf.common.dataaccess;bundle-version="1.0.0", com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatMapCoverage.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatMapCoverage.java index 80c0339777..688cb1a678 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatMapCoverage.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/SatMapCoverage.java @@ -36,7 +36,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import org.geotools.coverage.grid.GridEnvelope2D; import org.geotools.coverage.grid.GridGeometry2D; import org.geotools.geometry.Envelope2D; @@ -401,42 +401,56 @@ public class SatMapCoverage extends PersistableDataObject implements @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } SatMapCoverage other = (SatMapCoverage) obj; - if (projection != other.projection) + if (projection != other.projection) { return false; + } String crsWKT = getCrsWKT(); String otherCrsWKT = other.getCrsWKT(); if (crsWKT == null) { - if (otherCrsWKT != null) + if (otherCrsWKT != null) { return false; - } else if (!crsWKT.equals(otherCrsWKT)) + } + } else if (!crsWKT.equals(otherCrsWKT)) { return false; - if (Double.doubleToLongBits(dx) != Double.doubleToLongBits(other.dx)) + } + if (Double.doubleToLongBits(dx) != Double.doubleToLongBits(other.dx)) { return false; - if (Double.doubleToLongBits(dy) != Double.doubleToLongBits(other.dy)) + } + if (Double.doubleToLongBits(dy) != Double.doubleToLongBits(other.dy)) { return false; + } if (Double.doubleToLongBits(minX) != Double - .doubleToLongBits(other.minX)) + .doubleToLongBits(other.minX)) { return false; + } if (Double.doubleToLongBits(minY) != Double - .doubleToLongBits(other.minY)) + .doubleToLongBits(other.minY)) { return false; + } if (nx == null) { - if (other.nx != null) + if (other.nx != null) { return false; - } else if (!nx.equals(other.nx)) + } + } else if (!nx.equals(other.nx)) { return false; + } if (ny == null) { - if (other.ny != null) + if (other.ny != null) { return false; - } else if (!ny.equals(other.ny)) + } + } else if (!ny.equals(other.ny)) { return false; + } return true; } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedTempToWVPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedTempToWVPixelConverter.java index af26b019b8..cc8a94d44f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedTempToWVPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedTempToWVPixelConverter.java @@ -23,14 +23,14 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; public class DerivedTempToWVPixelConverter extends UnitConverter { private static final long serialVersionUID = 1L; - + private static UnitConverter kelvinToCelsius = SI.KELVIN - .getConverterTo(SI.CELSIUS); + .getConverterTo(SI.CELSIUS); /* * (non-Javadoc) @@ -40,15 +40,15 @@ public class DerivedTempToWVPixelConverter extends UnitConverter { @Override public double convert(double aTemp) throws ConversionException { aTemp = kelvinToCelsius.convert(aTemp); - + double result = 145 - aTemp; - + if (result < 0) { result = 0; } else if (result > 255) { result = 255; } - + return result; } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixel.java index eceac94f38..8ede425073 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixel.java @@ -25,7 +25,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; public class DerivedWVPixel extends DerivedUnit { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixelToTempConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixelToTempConverter.java index 7ea571f598..f3d46ce392 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixelToTempConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/counts/DerivedWVPixelToTempConverter.java @@ -23,7 +23,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; public class DerivedWVPixelToTempConverter extends UnitConverter { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericFromPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericFromPixelConverter.java index 016ef0d242..03f7c53247 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericFromPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericFromPixelConverter.java @@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.generic; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 16, 2010            jsanchez     Initial creation
- *
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ public class GenericFromPixelConverter extends UnitConverter { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericPixel.java index 0db89a93d1..9883a863e0 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericPixel.java @@ -23,23 +23,23 @@ import javax.measure.converter.UnitConverter; import javax.measure.quantity.Dimensionless; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 16, 2010            jsanchez     Initial creation
- *
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ public class GenericPixel extends Unit { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericToPixelConverter.java index 82d7da6f0d..0c2ce60d88 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/generic/GenericToPixelConverter.java @@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.generic; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 16, 2010            jsanchez     Initial creation
- *
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ public class GenericToPixelConverter extends UnitConverter { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PercentOfNormalTPWPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PercentOfNormalTPWPixel.java index feb3948edd..0a810d3ed8 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PercentOfNormalTPWPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PercentOfNormalTPWPixel.java @@ -23,7 +23,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.quantity.Dimensionless; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.PixelToPercentConverter; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PolarPrecipWaterPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PolarPrecipWaterPixel.java index a470516e21..d56cb94551 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PolarPrecipWaterPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/PolarPrecipWaterPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.PolarPrecipPixelToLengthConverter; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudAmountPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudAmountPixel.java index 573f8a4e4e..e400469c1c 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudAmountPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudAmountPixel.java @@ -25,7 +25,7 @@ import javax.measure.quantity.Dimensionless; import javax.measure.unit.DerivedUnit; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixelToPercentConverter; @@ -45,26 +45,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixel */ public class SounderCloudAmountPixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof SounderCloudAmountPixel); - } + @Override + public boolean equals(Object anObject) { + return (anObject instanceof SounderCloudAmountPixel); + } - @Override - public Unit getStandardUnit() { - return Unit.ONE; - } + @Override + public Unit getStandardUnit() { + return Unit.ONE; + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new CloudPixelToPercentConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new CloudPixelToPercentConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudTopHeightPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudTopHeightPixel.java index 70e62dc664..7f5850817d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudTopHeightPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderCloudTopHeightPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixelToHeightConverter; @@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixel */ public class SounderCloudTopHeightPixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof SounderCloudTopHeightPixel); - } + @Override + public boolean equals(Object anObject) { + return (anObject instanceof SounderCloudTopHeightPixel); + } - @Override - public Unit getStandardUnit() { - return SI.METRE; - } + @Override + public Unit getStandardUnit() { + return SI.METRE; + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new CloudPixelToHeightConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new CloudPixelToHeightConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderLiftedIndexPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderLiftedIndexPixel.java index 06e26a5941..3577f88ac6 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderLiftedIndexPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderLiftedIndexPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.LiftedIndexPixelToTempConverter; @@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.LiftedInde */ public class SounderLiftedIndexPixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof SounderLiftedIndexPixel); - } + @Override + public boolean equals(Object anObject) { + return (anObject instanceof SounderLiftedIndexPixel); + } - @Override - public Unit getStandardUnit() { - return SI.KELVIN; - } + @Override + public Unit getStandardUnit() { + return SI.KELVIN; + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new LiftedIndexPixelToTempConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new LiftedIndexPixelToTempConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderPrecipWaterPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderPrecipWaterPixel.java index 03f1edbfea..43ab50f5ea 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderPrecipWaterPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderPrecipWaterPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SounderPrecipPixelToLengthConverter; @@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SounderPre */ public class SounderPrecipWaterPixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof SounderPrecipWaterPixel); - } + @Override + public boolean equals(Object anObject) { + return (anObject instanceof SounderPrecipWaterPixel); + } - @Override - public Unit getStandardUnit() { - return SI.METRE; - } + @Override + public Unit getStandardUnit() { + return SI.METRE; + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new SounderPrecipPixelToLengthConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new SounderPrecipPixelToLengthConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderSkinTempPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderSkinTempPixel.java index c83683b4e7..9561c0450d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderSkinTempPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/SounderSkinTempPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SkinTempPixelToTempConverter; @@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SkinTempPi */ public class SounderSkinTempPixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof SounderSkinTempPixel); - } + @Override + public boolean equals(Object anObject) { + return (anObject instanceof SounderSkinTempPixel); + } - @Override - public Unit getStandardUnit() { - return SI.KELVIN; - } + @Override + public Unit getStandardUnit() { + return SI.KELVIN; + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new SkinTempPixelToTempConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new SkinTempPixelToTempConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudHeightToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudHeightToPixelConverter.java index 78a012375e..31baacd7ed 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudHeightToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudHeightToPixelConverter.java @@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a cloud height in meters to a pixel value (calculation is done in @@ -44,90 +44,91 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class CloudHeightToPixelConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter meterToFoot = SI.METRE.getConverterTo(NonSI.FOOT); + private static UnitConverter meterToFoot = SI.METRE + .getConverterTo(NonSI.FOOT); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert( double) - */ - @Override - public double convert(double aHeight) throws ConversionException { - double result = 0.0; + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert( double) + */ + @Override + public double convert(double aHeight) throws ConversionException { + double result = 0.0; - // value is in meters, but below calculates pixel based on value being - // ft/100 MSL - aHeight = meterToFoot.convert(aHeight); - - if (aHeight < 1) { - result = 0; - } else if (aHeight <= 17.7) { - result = (aHeight / 17.7) + 75.0; - } else if (aHeight <= 50) { - result = (24.0 / 32.3 * (aHeight - 17.7)) + 76.0; - } else if (aHeight <= 87.5) { - result = (25.0 / 37.5 * (aHeight - 50.0)) + 100.0; - } else if (aHeight <= 129.9) { - result = (25.0 / 42.4 * (aHeight - 87.5)) + 125.0; - } else if (aHeight <= 179.1) { - result = (25.0 / 49.2 * (aHeight - 129.9)) + 150.0; - } else if (aHeight <= 238) { - result = (25.0 / 58.9 * (aHeight - 179.1)) + 175.0; - } else if (aHeight <= 312.3) { - result = (25.0 / 74.3 * (aHeight - 238.0)) + 200.0; - } else { - result = (30.0 / 134.4 * (aHeight - 312.3)) + 225.0; - } + // value is in meters, but below calculates pixel based on value being + // ft/100 MSL + aHeight = meterToFoot.convert(aHeight); - if (result < 0) { - result = 0; - } else if (result > 255) { - result = 255; - } + if (aHeight < 1) { + result = 0; + } else if (aHeight <= 17.7) { + result = (aHeight / 17.7) + 75.0; + } else if (aHeight <= 50) { + result = (24.0 / 32.3 * (aHeight - 17.7)) + 76.0; + } else if (aHeight <= 87.5) { + result = (25.0 / 37.5 * (aHeight - 50.0)) + 100.0; + } else if (aHeight <= 129.9) { + result = (25.0 / 42.4 * (aHeight - 87.5)) + 125.0; + } else if (aHeight <= 179.1) { + result = (25.0 / 49.2 * (aHeight - 129.9)) + 150.0; + } else if (aHeight <= 238) { + result = (25.0 / 58.9 * (aHeight - 179.1)) + 175.0; + } else if (aHeight <= 312.3) { + result = (25.0 / 74.3 * (aHeight - 238.0)) + 200.0; + } else { + result = (30.0 / 134.4 * (aHeight - 312.3)) + 225.0; + } - return result; - } + if (result < 0) { + result = 0; + } else if (result > 255) { + result = 255; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof CloudHeightToPixelConverter); - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof CloudHeightToPixelConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new CloudPixelToHeightConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new CloudPixelToHeightConverter(); + } + + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPercentToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPercentToPixelConverter.java index 478f5972ff..a402c4c98f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPercentToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPercentToPixelConverter.java @@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a cloud amount percent to a pixel value diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToHeightConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToHeightConverter.java index e248cabf7d..0d18699944 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToHeightConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToHeightConverter.java @@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a pixel value representing cloud height to a height above MSL in @@ -44,85 +44,85 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class CloudPixelToHeightConverter extends UnitConverter { - private static final long serialVersionUID = 1L; - - private static UnitConverter footToMeter = (NonSI.FOOT) - .getConverterTo(SI.METRE); + private static final long serialVersionUID = 1L; - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = 0.0; + private static UnitConverter footToMeter = (NonSI.FOOT) + .getConverterTo(SI.METRE); - if (aPixel <= 75) { - result = 0.0; - } else if (aPixel <= 76) { - result = 17.7 * (aPixel - 75.0); - } else if (aPixel <= 100) { - result = (32.3 / 24.0 * (aPixel - 76.0)) + 17.7; - } else if (aPixel <= 125) { - result = (37.5 / 25.0 * (aPixel - 100.0)) + 50.0; - } else if (aPixel <= 150) { - result = (42.4 / 25.0 * (aPixel - 125.0)) + 87.5; - } else if (aPixel <= 175) { - result = (49.2 / 25.0 * (aPixel - 150.0)) + 129.9; - } else if (aPixel <= 200) { - result = (58.9 / 25.0 * (aPixel - 175.0)) + 179.1; - } else if (aPixel <= 225) { - result = (74.3 / 25.0 * (aPixel - 200.0)) + 238.0; - } else { - result = (134.4 / 30.0 * (aPixel - 225.0)) + 312.3; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = 0.0; - // above converts pixel to ft/100 MSL, but we need to change it to - // meters - result = footToMeter.convert(result); + if (aPixel <= 75) { + result = 0.0; + } else if (aPixel <= 76) { + result = 17.7 * (aPixel - 75.0); + } else if (aPixel <= 100) { + result = (32.3 / 24.0 * (aPixel - 76.0)) + 17.7; + } else if (aPixel <= 125) { + result = (37.5 / 25.0 * (aPixel - 100.0)) + 50.0; + } else if (aPixel <= 150) { + result = (42.4 / 25.0 * (aPixel - 125.0)) + 87.5; + } else if (aPixel <= 175) { + result = (49.2 / 25.0 * (aPixel - 150.0)) + 129.9; + } else if (aPixel <= 200) { + result = (58.9 / 25.0 * (aPixel - 175.0)) + 179.1; + } else if (aPixel <= 225) { + result = (74.3 / 25.0 * (aPixel - 200.0)) + 238.0; + } else { + result = (134.4 / 30.0 * (aPixel - 225.0)) + 312.3; + } - return result; - } + // above converts pixel to ft/100 MSL, but we need to change it to + // meters + result = footToMeter.convert(result); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof CloudPixelToHeightConverter); - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof CloudPixelToHeightConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new CloudHeightToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new CloudHeightToPixelConverter(); + } + + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToPercentConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToPercentConverter.java index 358a740426..d7c566c437 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToPercentConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/CloudPixelToPercentConverter.java @@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a pixel value of cloud amount to a cloud amount in percent @@ -41,74 +41,74 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class CloudPixelToPercentConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = 0.0; + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = 0.0; - if (aPixel <= 75) { - result = 0.0; - } else if (aPixel <= 76) { - result = aPixel - 75.0; - } else if (aPixel <= 166) { - result = (49.0 / 90.0 * (aPixel - 76.0)) + 1.0; - } else if (aPixel <= 167) { - result = aPixel - 116.0; - } else if (aPixel <= 253) { - result = (24.0 / 43.0 * (aPixel - 167.0)) + 51.0; - } else if (aPixel <= 254) { - result = aPixel - 154.0; - } else { - result = 100.0; - } + if (aPixel <= 75) { + result = 0.0; + } else if (aPixel <= 76) { + result = aPixel - 75.0; + } else if (aPixel <= 166) { + result = (49.0 / 90.0 * (aPixel - 76.0)) + 1.0; + } else if (aPixel <= 167) { + result = aPixel - 116.0; + } else if (aPixel <= 253) { + result = (24.0 / 43.0 * (aPixel - 167.0)) + 51.0; + } else if (aPixel <= 254) { + result = aPixel - 154.0; + } else { + result = 100.0; + } - return result / 100; - } + return result / 100; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof CloudPixelToPercentConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof CloudPixelToPercentConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new CloudPercentToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new CloudPercentToPixelConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexPixelToTempConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexPixelToTempConverter.java index 295ed0839b..19ec7d8544 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexPixelToTempConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexPixelToTempConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a pixel representing Lifted Index to temperature in Celsius @@ -41,65 +41,65 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class LiftedIndexPixelToTempConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter celsiusToKelvin = SI.CELSIUS - .getConverterTo(SI.KELVIN); + private static UnitConverter celsiusToKelvin = SI.CELSIUS + .getConverterTo(SI.KELVIN); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = 25 - (aPixel / 5); + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = 25 - (aPixel / 5); - // above converts pixel to Celsius, but we need to change it to - // Kelvin - result = celsiusToKelvin.convert(result); + // above converts pixel to Celsius, but we need to change it to + // Kelvin + result = celsiusToKelvin.convert(result); - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof LiftedIndexPixelToTempConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof LiftedIndexPixelToTempConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new LiftedIndexTempToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new LiftedIndexTempToPixelConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return true; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return true; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexTempToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexTempToPixelConverter.java index 269bc8fae8..15a4fb91bc 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexTempToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexTempToPixelConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a Lifted Index in temperature Kelvin to a pixel value @@ -41,71 +41,71 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class LiftedIndexTempToPixelConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter kelvinToCelsius = SI.KELVIN - .getConverterTo(SI.CELSIUS); + private static UnitConverter kelvinToCelsius = SI.KELVIN + .getConverterTo(SI.CELSIUS); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aTemp) throws ConversionException { + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aTemp) throws ConversionException { - // value is in kelvin, but below calculates pixel based on value being - // celsius - aTemp = kelvinToCelsius.convert(aTemp); + // value is in kelvin, but below calculates pixel based on value being + // celsius + aTemp = kelvinToCelsius.convert(aTemp); - double result = -5 * (aTemp - 25); - if (result < 0) { - result = 0.0; - } else if (result > 255) { - result = 255; - } + double result = -5 * (aTemp - 25); + if (result < 0) { + result = 0.0; + } else if (result > 255) { + result = 255; + } - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof LiftedIndexTempToPixelConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof LiftedIndexTempToPixelConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new LiftedIndexPixelToTempConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new LiftedIndexPixelToTempConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return true; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return true; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PercentToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PercentToPixelConverter.java index 425e8a3d01..27ae6e7577 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PercentToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PercentToPixelConverter.java @@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * May 11, 2010            jsanchez     Initial creation
- *
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ public class PercentToPixelConverter extends UnitConverter { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PixelToPercentConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PixelToPercentConverter.java index 30de0a87b5..6e357ddb08 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PixelToPercentConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PixelToPercentConverter.java @@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * May 11, 2010            jsanchez     Initial creation
- *
+ * 
  * 
- * + * * @author jsanchez - * @version 1.0 + * @version 1.0 */ public class PixelToPercentConverter extends UnitConverter { @@ -51,7 +51,7 @@ public class PixelToPercentConverter extends UnitConverter { */ @Override public double convert(double aPixel) throws ConversionException { - return aPixel/100; + return aPixel / 100; } /* diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipLengthToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipLengthToPixelConverter.java index c35848c56d..e8378d66ea 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipLengthToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipLengthToPixelConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts meters of total precipitation of water to a pixel value @@ -59,19 +59,17 @@ public class PolarPrecipLengthToPixelConverter extends UnitConverter { aLength = meterToMillimeter.convert(aLength); double result = 0.0; - - if (aLength < 1 ) { + + if (aLength < 1) { result = 0.0; } else if (aLength <= 70) { result = aLength + 176; - } - else if (aLength <= 75) { + } else if (aLength <= 75) { result = (18900 - aLength) / 75; - } - else { + } else { result = 255; } - + if (result < 0) { result = 0; } else if (result > 255) { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipPixelToLengthConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipPixelToLengthConverter.java index 77b00bef88..762a26d7d5 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipPixelToLengthConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/PolarPrecipPixelToLengthConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a pixel representation of total precipitation of water to meters @@ -39,7 +39,7 @@ import org.apache.commons.lang.builder.HashCodeBuilder; * * @author jsanchez */ -public class PolarPrecipPixelToLengthConverter extends UnitConverter { +public class PolarPrecipPixelToLengthConverter extends UnitConverter { private static final long serialVersionUID = 1L; @@ -55,7 +55,7 @@ public class PolarPrecipPixelToLengthConverter extends UnitConverter { public double convert(double aPixel) throws ConversionException { double result = 0.0; - + if (aPixel < 1) { result = 0.0; } else if (aPixel <= 251) { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempPixelToTempConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempPixelToTempConverter.java index 030fbe2731..4d4b102c89 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempPixelToTempConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempPixelToTempConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a skin temperature pixel to a temperature in Kelvin @@ -41,65 +41,65 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class SkinTempPixelToTempConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter celsiusToKelvin = SI.CELSIUS - .getConverterTo(SI.KELVIN); + private static UnitConverter celsiusToKelvin = SI.CELSIUS + .getConverterTo(SI.KELVIN); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = 63.0 - (aPixel / 2.0); + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = 63.0 - (aPixel / 2.0); - // above converts pixel to Celsius, but we need to change it to - // Kelvin - result = celsiusToKelvin.convert(result); + // above converts pixel to Celsius, but we need to change it to + // Kelvin + result = celsiusToKelvin.convert(result); - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof SkinTempPixelToTempConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof SkinTempPixelToTempConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new SkinTempTempToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new SkinTempTempToPixelConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return true; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return true; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempTempToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempTempToPixelConverter.java index 0b9f19d8ab..ef11658cd7 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempTempToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SkinTempTempToPixelConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a skin temperature in Kelvin to a pixel value @@ -41,71 +41,71 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class SkinTempTempToPixelConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter kelvinToCelsius = SI.KELVIN - .getConverterTo(SI.CELSIUS); + private static UnitConverter kelvinToCelsius = SI.KELVIN + .getConverterTo(SI.CELSIUS); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aTemp) throws ConversionException { - // value is in kelvin, but below calculates pixel based on value being - // celsius - aTemp = kelvinToCelsius.convert(aTemp); + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aTemp) throws ConversionException { + // value is in kelvin, but below calculates pixel based on value being + // celsius + aTemp = kelvinToCelsius.convert(aTemp); - double result = (63.0 - aTemp) * 2.0; + double result = (63.0 - aTemp) * 2.0; - if (result < 0) { - result = 0; - } else if (result > 255) { - result = 255; - } + if (result < 0) { + result = 0; + } else if (result > 255) { + result = 255; + } - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof SkinTempTempToPixelConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof SkinTempTempToPixelConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new SkinTempPixelToTempConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new SkinTempPixelToTempConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return true; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return true; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipLengthToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipLengthToPixelConverter.java index d88f3305d6..c9098a9457 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipLengthToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipLengthToPixelConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts meters of total precipitation of water to a pixel value @@ -41,72 +41,72 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class SounderPrecipLengthToPixelConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI - .MILLI(SI.METRE)); + private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI + .MILLI(SI.METRE)); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aLength) throws ConversionException { + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aLength) throws ConversionException { - // value is in meters, but below calculates pixel based on value being - // millimeters - aLength = meterToMillimeter.convert(aLength); + // value is in meters, but below calculates pixel based on value being + // millimeters + aLength = meterToMillimeter.convert(aLength); - double result = aLength * 200.0 / 67.0; + double result = aLength * 200.0 / 67.0; - if (result < 0) { - result = 0; - } else if (result > 255) { - result = 255; - } + if (result < 0) { + result = 0; + } else if (result > 255) { + result = 255; + } - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof SounderPrecipLengthToPixelConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof SounderPrecipLengthToPixelConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new SounderPrecipPixelToLengthConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new SounderPrecipPixelToLengthConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return true; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return true; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipPixelToLengthConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipPixelToLengthConverter.java index d4cec96f19..94937a9a5c 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipPixelToLengthConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/SounderPrecipPixelToLengthConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a pixel representation of total precipitation of water to meters @@ -41,65 +41,65 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class SounderPrecipPixelToLengthConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE)) - .getConverterTo(SI.METRE); + private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE)) + .getConverterTo(SI.METRE); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = aPixel * 67.0 / 200.0; + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = aPixel * 67.0 / 200.0; - // above converts pixel to millimeters, but we need to change it to - // meters - result = millimeterToMeter.convert(result); + // above converts pixel to millimeters, but we need to change it to + // meters + result = millimeterToMeter.convert(result); - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof SounderPrecipPixelToLengthConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof SounderPrecipPixelToLengthConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new SounderPrecipLengthToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new SounderPrecipLengthToPixelConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return true; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return true; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixel.java index f90a017de5..8df34d24ce 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Represents a pixel value on a satellite IR image @@ -43,26 +43,26 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class IRPixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof IRPixel); - } + @Override + public boolean equals(Object anObject) { + return (anObject instanceof IRPixel); + } - @Override - public Unit getStandardUnit() { - return SI.KELVIN; - } + @Override + public Unit getStandardUnit() { + return SI.KELVIN; + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new IRPixelToTempConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new IRPixelToTempConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixelToTempConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixelToTempConverter.java index 9eba7e2bb0..6df53a0428 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixelToTempConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRPixelToTempConverter.java @@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.ir; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a pixel value from 0-255 into a temperature in Kelvin @@ -40,64 +40,64 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class IRPixelToTempConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = 0.0; + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = 0.0; - if (aPixel >= 180) { - result = 418.15 - aPixel; - } else { - result = 328.15 - (aPixel / 2.0); - } + if (aPixel >= 180) { + result = 418.15 - aPixel; + } else { + result = 328.15 - (aPixel / 2.0); + } - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof IRPixelToTempConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof IRPixelToTempConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new IRTempToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new IRTempToPixelConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRTempToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRTempToPixelConverter.java index 10e95725c2..30d6e18b1e 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRTempToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/ir/IRTempToPixelConverter.java @@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.ir; import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a temperature value in Kelvin to a pixel value. diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/BlendedTPWPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/BlendedTPWPixel.java index 33af077670..2e7ab0e829 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/BlendedTPWPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/BlendedTPWPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Represents a pixel value on a satellite blended total precipitable water(TPW) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipLengthToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipLengthToPixelConverter.java index d6c73aa232..b1b67aa5c8 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipLengthToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipLengthToPixelConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * TODO class description @@ -41,75 +41,75 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class PrecipLengthToPixelConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI - .MILLI(SI.METRE)); + private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI + .MILLI(SI.METRE)); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPrecip) throws ConversionException { - double result = 0.0; + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPrecip) throws ConversionException { + double result = 0.0; - // value is in meters, but below calculates pixel based on value being - // millimeters - aPrecip = meterToMillimeter.convert(aPrecip); + // value is in meters, but below calculates pixel based on value being + // millimeters + aPrecip = meterToMillimeter.convert(aPrecip); - if (aPrecip > 0 && aPrecip <= 75) { - result = aPrecip + 176.0; - } + if (aPrecip > 0 && aPrecip <= 75) { + result = aPrecip + 176.0; + } - if (result < 0) { - result = 0.0; - } else if (result > 255) { - result = 255; - } + if (result < 0) { + result = 0.0; + } else if (result > 255) { + result = 255; + } - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof PrecipLengthToPixelConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof PrecipLengthToPixelConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new PrecipPixelToLengthConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new PrecipPixelToLengthConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixel.java index ef9637f826..f554f9ac59 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixel.java @@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Represents a pixel value on a POES or DMSP satellite precipitation image @@ -43,26 +43,26 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class PrecipPixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof PrecipPixel); + @Override + public boolean equals(Object anObject) { + return (anObject instanceof PrecipPixel); - } + } - @Override - public Unit getStandardUnit() { - return SI.METRE; - } + @Override + public Unit getStandardUnit() { + return SI.METRE; + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new PrecipPixelToLengthConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new PrecipPixelToLengthConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixelToLengthConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixelToLengthConverter.java index 5ba69109bf..cd46f08eea 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixelToLengthConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/PrecipPixelToLengthConverter.java @@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException; import javax.measure.converter.UnitConverter; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * TODO class description @@ -41,68 +41,68 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class PrecipPixelToLengthConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE)) - .getConverterTo(SI.METRE); + private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE)) + .getConverterTo(SI.METRE); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = 0.0; - if (aPixel > 176 && aPixel <= 251) { - result = aPixel - 176.0; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = 0.0; + if (aPixel > 176 && aPixel <= 251) { + result = aPixel - 176.0; + } - // above converts pixel to millimeters, but we need to change it to - // meters - result = millimeterToMeter.convert(result); + // above converts pixel to millimeters, but we need to change it to + // meters + result = millimeterToMeter.convert(result); - return result; - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof PrecipPixelToLengthConverter); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof PrecipPixelToLengthConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new PrecipLengthToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new PrecipLengthToPixelConverter(); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallPixelToRateConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallPixelToRateConverter.java index e62d473a50..5eae4c3ecf 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallPixelToRateConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallPixelToRateConverter.java @@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a rainfall rate pixel from a satellite image to a rate of mm/hr @@ -43,71 +43,72 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class RainfallPixelToRateConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter milimtrPerHrToMtrPerSec = ((SI.MILLI(SI.METRE)).divide(NonSI.HOUR)) - .getConverterTo((SI.METRE).divide(SI.SECOND)); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aPixel) throws ConversionException { - double result = 0.0; + private static UnitConverter milimtrPerHrToMtrPerSec = ((SI.MILLI(SI.METRE)) + .divide(NonSI.HOUR)).getConverterTo((SI.METRE).divide(SI.SECOND)); - if (aPixel <= 108) { - result = 0.0; - } else if (aPixel <= 133) { - result = (aPixel - 108.0) * 6.0 / 25.0; - } else if (aPixel <= 168) { - result = 6 + ((aPixel - 133.0) * 14.0 / 35.0); - } else { - result = (aPixel / 2.0) - 64.0; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aPixel) throws ConversionException { + double result = 0.0; - result = milimtrPerHrToMtrPerSec.convert(result); - return result; - } + if (aPixel <= 108) { + result = 0.0; + } else if (aPixel <= 133) { + result = (aPixel - 108.0) * 6.0 / 25.0; + } else if (aPixel <= 168) { + result = 6 + ((aPixel - 133.0) * 14.0 / 35.0); + } else { + result = (aPixel / 2.0) - 64.0; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof RainfallPixelToRateConverter); - } + result = milimtrPerHrToMtrPerSec.convert(result); + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof RainfallPixelToRateConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new RainfallRateToPixelConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new RainfallRateToPixelConverter(); + } + + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRatePixel.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRatePixel.java index 823e505f82..60aebfcdc2 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRatePixel.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRatePixel.java @@ -27,7 +27,7 @@ import javax.measure.unit.NonSI; import javax.measure.unit.SI; import javax.measure.unit.Unit; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Represents a pixel value of a rainfall rate (mm/hr) on a POES or DMSP @@ -46,27 +46,26 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class RainfallRatePixel extends DerivedUnit { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @Override - public boolean equals(Object anObject) { - return (anObject instanceof RainfallRatePixel); - } + @Override + public boolean equals(Object anObject) { + return (anObject instanceof RainfallRatePixel); + } - @SuppressWarnings("unchecked") - @Override - public Unit getStandardUnit() { - return (Unit) (SI.MILLI(SI.METRE)) - .divide(NonSI.HOUR); - } + @SuppressWarnings("unchecked") + @Override + public Unit getStandardUnit() { + return (Unit) (SI.MILLI(SI.METRE)).divide(NonSI.HOUR); + } - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } - @Override - public UnitConverter toStandardUnit() { - return new RainfallPixelToRateConverter(); - } + @Override + public UnitConverter toStandardUnit() { + return new RainfallPixelToRateConverter(); + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRateToPixelConverter.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRateToPixelConverter.java index dc809f520c..3f6fbddc86 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRateToPixelConverter.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/water/RainfallRateToPixelConverter.java @@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter; import javax.measure.unit.NonSI; import javax.measure.unit.SI; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; /** * Converts a rainfall rate of mm/hr to a pixel value @@ -43,77 +43,79 @@ import org.apache.commons.lang.builder.HashCodeBuilder; */ public class RainfallRateToPixelConverter extends UnitConverter { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private static UnitConverter mtrPerSecToMilimtrPerHr = ((SI.METRE).divide(SI.SECOND)) - .getConverterTo((SI.MILLI(SI.METRE)).divide(NonSI.HOUR)); - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#convert(double) - */ - @Override - public double convert(double aRate) throws ConversionException { - double result = 0.0; - - aRate = mtrPerSecToMilimtrPerHr.convert(aRate); - if (aRate == 0) { - result = 0.0; - } else if (aRate <= 6.0) { - result = (aRate * 25.0 / 6.0) + 108.0; - } else if (aRate <= 20.0) { - result = 133.0 + (35.0 / 14.0 * (aRate - 6.0)); - } else { - result = 2.0 * (aRate + 64.0); - } + private static UnitConverter mtrPerSecToMilimtrPerHr = ((SI.METRE) + .divide(SI.SECOND)).getConverterTo((SI.MILLI(SI.METRE)) + .divide(NonSI.HOUR)); - if (result < 0) { - result = 0.0; - } else if (result > 255) { - result = 255.0; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#convert(double) + */ + @Override + public double convert(double aRate) throws ConversionException { + double result = 0.0; - return result; - } + aRate = mtrPerSecToMilimtrPerHr.convert(aRate); + if (aRate == 0) { + result = 0.0; + } else if (aRate <= 6.0) { + result = (aRate * 25.0 / 6.0) + 108.0; + } else if (aRate <= 20.0) { + result = 133.0 + (35.0 / 14.0 * (aRate - 6.0)); + } else { + result = 2.0 * (aRate + 64.0); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aConverter) { - return (aConverter instanceof RainfallRateToPixelConverter); - } + if (result < 0) { + result = 0.0; + } else if (result > 255) { + result = 255.0; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#hashCode() - */ - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } + return result; + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#inverse() - */ - @Override - public UnitConverter inverse() { - return new RainfallPixelToRateConverter(); - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#equals(java.lang.Object) + */ + @Override + public boolean equals(Object aConverter) { + return (aConverter instanceof RainfallRateToPixelConverter); + } - /* - * (non-Javadoc) - * - * @see javax.measure.converter.UnitConverter#isLinear() - */ - @Override - public boolean isLinear() { - return false; - } + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#hashCode() + */ + @Override + public int hashCode() { + return HashCodeBuilder.reflectionHashCode(this); + } + + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#inverse() + */ + @Override + public UnitConverter inverse() { + return new RainfallPixelToRateConverter(); + } + + /* + * (non-Javadoc) + * + * @see javax.measure.converter.UnitConverter#isLinear() + */ + @Override + public boolean isLinear() { + return false; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.taf/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.taf/META-INF/MANIFEST.MF index 993602be52..bd140cd5b6 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.taf/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.taf/META-INF/MANIFEST.MF @@ -2,11 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 1 Bundle-Name: Taf Plug-in Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.taf -Bundle-Version: 1.15.0.qualifier +Bundle-Version: 1.15.1.qualifier Bundle-Vendor: RAYTHEON Export-Package: com.raytheon.uf.common.dataplugin.taf -Require-Bundle: org.apache.commons.lang, - javax.persistence +Require-Bundle: javax.persistence Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Import-Package: com.raytheon.uf.common.dataplugin, com.raytheon.uf.common.dataplugin.annotations, diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.text/META-INF/MANIFEST.MF index 72e2868bbb..3146577bf8 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/META-INF/MANIFEST.MF @@ -2,12 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Textdb Plug-in Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.text -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Require-Bundle: com.raytheon.uf.common.serialization, org.hibernate, - com.raytheon.uf.common.localization;bundle-version="1.12.1174" + com.raytheon.uf.common.localization;bundle-version="1.12.1174", + org.apache.commons.lang3;bundle-version="3.4.0" Import-Package: com.raytheon.uf.common.dataplugin.persist, com.raytheon.uf.common.message, com.raytheon.uf.common.serialization, @@ -17,8 +18,7 @@ Import-Package: com.raytheon.uf.common.dataplugin.persist, com.raytheon.uf.common.status, com.raytheon.uf.common.util, com.raytheon.uf.common.wmo, - javax.persistence, - org.apache.commons.lang.builder + javax.persistence Export-Package: com.raytheon.uf.common.dataplugin.text;uses:="com.raytheon.uf.common.dataplugin.text.db,com.raytheon.uf.common.serialization", com.raytheon.uf.common.dataplugin.text.alarms, com.raytheon.uf.common.dataplugin.text.db;uses:="com.raytheon.uf.common.dataplugin.persist,com.raytheon.uf.common.wmo,com.raytheon.uf.common.serialization", diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwips.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwips.java index 319845e12f..a011afe25c 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwips.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwips.java @@ -23,9 +23,9 @@ import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.Table; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; import org.hibernate.annotations.Index; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; @@ -103,15 +103,18 @@ public class AfosToAwips extends PersistableDataObject implements id.setAfosid(afosid); } + @Override public String toString() { return new ToStringBuilder(this).append("afosid", getAfosid()) .append("wmottaaii", getWmottaaii()) .append("wmocccc", getWmocccc()).toString(); } + @Override public boolean equals(Object other) { - if (!(other instanceof AfosToAwips)) + if (!(other instanceof AfosToAwips)) { return false; + } AfosToAwips castOther = (AfosToAwips) other; return new EqualsBuilder() .append(this.getAfosid(), castOther.getAfosid()) @@ -119,6 +122,7 @@ public class AfosToAwips extends PersistableDataObject implements .append(this.getWmocccc(), castOther.getWmocccc()).isEquals(); } + @Override public int hashCode() { return new HashCodeBuilder().append(getAfosid()).append(getWmottaaii()) .append(getWmocccc()).toHashCode(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwipsId.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwipsId.java index 737704f7e0..4421a15302 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwipsId.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/AfosToAwipsId.java @@ -22,9 +22,9 @@ package com.raytheon.uf.common.dataplugin.text.db; import javax.persistence.Column; import javax.persistence.Embeddable; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.serialization.ISerializableObject; @@ -97,15 +97,18 @@ public class AfosToAwipsId extends PersistableDataObject implements this.afosid = afosid; } + @Override public String toString() { return new ToStringBuilder(this).append("afosid", getAfosid()) .append("wmottaaii", getWmottaaii()) .append("wmocccc", getWmocccc()).toString(); } + @Override public boolean equals(Object other) { - if (!(other instanceof AfosToAwipsId)) + if (!(other instanceof AfosToAwipsId)) { return false; + } AfosToAwipsId castOther = (AfosToAwipsId) other; return new EqualsBuilder() .append(this.getAfosid(), castOther.getAfosid()) @@ -113,6 +116,7 @@ public class AfosToAwipsId extends PersistableDataObject implements .append(this.getWmocccc(), castOther.getWmocccc()).isEquals(); } + @Override public int hashCode() { return new HashCodeBuilder().append(getAfosid()).append(getWmottaaii()) .append(getWmocccc()).toHashCode(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StateMatchPK.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StateMatchPK.java index f07ca7d8a7..63f6878b37 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StateMatchPK.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StateMatchPK.java @@ -26,9 +26,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -88,21 +88,25 @@ public class StateMatchPK extends PersistableDataObject { this.ccc = ccc; } + @Override public String toString() { - return new ToStringBuilder(this).append("state", getState()).append( - "xxx", getXxx()).append("ccc", getCcc()).toString(); + return new ToStringBuilder(this).append("state", getState()) + .append("xxx", getXxx()).append("ccc", getCcc()).toString(); } + @Override public boolean equals(Object other) { - if (!(other instanceof StateMatchPK)) + if (!(other instanceof StateMatchPK)) { return false; + } StateMatchPK castOther = (StateMatchPK) other; return new EqualsBuilder() - .append(this.getState(), castOther.getState()).append( - this.getXxx(), castOther.getXxx()).append( - this.getCcc(), castOther.getCcc()).isEquals(); + .append(this.getState(), castOther.getState()) + .append(this.getXxx(), castOther.getXxx()) + .append(this.getCcc(), castOther.getCcc()).isEquals(); } + @Override public int hashCode() { return new HashCodeBuilder().append(getState()).append(getXxx()) .append(getCcc()).toHashCode(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProduct.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProduct.java index 6707926d63..1e30d64e45 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProduct.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProduct.java @@ -36,7 +36,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; import org.hibernate.annotations.Index; import org.hibernate.annotations.Type; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProductId.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProductId.java index 3ccb969253..247c16026f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProductId.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/StdTextProductId.java @@ -26,9 +26,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.serialization.ISerializableObject; @@ -171,27 +171,32 @@ public class StdTextProductId extends PersistableDataObject implements this.dataCrc = dataCrc; } + @Override public String toString() { - return new ToStringBuilder(this).append("wmoid", getWmoid()).append( - "site", getSite()).append("cccid", getCccid()).append("nnnid", - getNnnid()).append("xxxid", getXxxid()).append("hdrtime", - getHdrtime()).append("dataCrc", getDataCrc()).toString(); + return new ToStringBuilder(this).append("wmoid", getWmoid()) + .append("site", getSite()).append("cccid", getCccid()) + .append("nnnid", getNnnid()).append("xxxid", getXxxid()) + .append("hdrtime", getHdrtime()) + .append("dataCrc", getDataCrc()).toString(); } + @Override public boolean equals(Object other) { - if (!(other instanceof StdTextProductId)) + if (!(other instanceof StdTextProductId)) { return false; + } StdTextProductId castOther = (StdTextProductId) other; return new EqualsBuilder() - .append(this.getWmoid(), castOther.getWmoid()).append( - this.getSite(), castOther.getSite()).append( - this.getCccid(), castOther.getCccid()).append( - this.getNnnid(), castOther.getNnnid()).append( - this.getXxxid(), castOther.getXxxid()).append( - this.getHdrtime(), castOther.getHdrtime()).append( - this.getDataCrc(), castOther.getDataCrc()).isEquals(); + .append(this.getWmoid(), castOther.getWmoid()) + .append(this.getSite(), castOther.getSite()) + .append(this.getCccid(), castOther.getCccid()) + .append(this.getNnnid(), castOther.getNnnid()) + .append(this.getXxxid(), castOther.getXxxid()) + .append(this.getHdrtime(), castOther.getHdrtime()) + .append(this.getDataCrc(), castOther.getDataCrc()).isEquals(); } + @Override public int hashCode() { return new HashCodeBuilder().append(getWmoid()).append(getSite()) .append(getCccid()).append(getNnnid()).append(getXxxid()) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/TextProductInfoPK.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/TextProductInfoPK.java index 8f9390972f..cbf4b6ea6b 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/TextProductInfoPK.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/TextProductInfoPK.java @@ -26,8 +26,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -91,21 +91,25 @@ public class TextProductInfoPK extends PersistableDataObject { this.xxxid = xxxid; } + @Override public String toString() { return new StringBuilder(cccid).append(":").append(nnnid).append(":") .append(xxxid).toString(); } + @Override public boolean equals(Object other) { - if (!(other instanceof TextProductInfoPK)) + if (!(other instanceof TextProductInfoPK)) { return false; + } TextProductInfoPK castOther = (TextProductInfoPK) other; return new EqualsBuilder() - .append(this.getCccid(), castOther.getCccid()).append( - this.getNnnid(), castOther.getNnnid()).append( - this.getXxxid(), castOther.getXxxid()).isEquals(); + .append(this.getCccid(), castOther.getCccid()) + .append(this.getNnnid(), castOther.getNnnid()) + .append(this.getXxxid(), castOther.getXxxid()).isEquals(); } + @Override public int hashCode() { return new HashCodeBuilder().append(getCccid()).append(getNnnid()) .append(getXxxid()).toHashCode(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/WatchWarnPK.java b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/WatchWarnPK.java index ff0806ee2e..8e2fee3b3f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/WatchWarnPK.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.text/src/com/raytheon/uf/common/dataplugin/text/db/WatchWarnPK.java @@ -26,9 +26,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -76,20 +76,24 @@ public class WatchWarnPK extends PersistableDataObject { this.script = script; } + @Override public String toString() { return new ToStringBuilder(this).append("productid", getProductid()) .append("script", getScript()).toString(); } + @Override public boolean equals(Object other) { - if (!(other instanceof WatchWarnPK)) + if (!(other instanceof WatchWarnPK)) { return false; + } WatchWarnPK castOther = (WatchWarnPK) other; - return new EqualsBuilder().append(this.getProductid(), - castOther.getProductid()).append(this.getScript(), - castOther.getScript()).isEquals(); + return new EqualsBuilder() + .append(this.getProductid(), castOther.getProductid()) + .append(this.getScript(), castOther.getScript()).isEquals(); } + @Override public int hashCode() { return new HashCodeBuilder().append(getProductid()).append(getScript()) .toHashCode(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/META-INF/MANIFEST.MF index 28df832155..f37556c718 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Warning Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.warning -Bundle-Version: 1.15.0.qualifier +Bundle-Version: 1.15.1.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: com.raytheon.uf.common.dataplugin.warning, @@ -14,7 +14,6 @@ Export-Package: com.raytheon.uf.common.dataplugin.warning, com.raytheon.uf.common.dataplugin.warning.util Import-Package: com.raytheon.uf.common.time, javax.persistence, - org.apache.commons.lang, org.hibernate.annotations Require-Bundle: org.geotools, com.raytheon.uf.common.dataplugin, @@ -25,4 +24,5 @@ Require-Bundle: org.geotools, com.raytheon.uf.common.status, com.raytheon.uf.common.dataaccess, com.raytheon.uf.common.dataquery;bundle-version="1.0.0", - javax.measure;bundle-version="1.0.0" + javax.measure;bundle-version="1.0.0", + org.apache.commons.lang3;bundle-version="3.4.0" diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/GeospatialConfiguration.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/GeospatialConfiguration.java index 6af9a71f2b..b3ffcdbb82 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/GeospatialConfiguration.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/GeospatialConfiguration.java @@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; /** * diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/PathcastConfiguration.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/PathcastConfiguration.java index dde516e1c0..78c267f05d 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/PathcastConfiguration.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/PathcastConfiguration.java @@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; -import org.apache.commons.lang.Validate; +import org.apache.commons.lang3.Validate; /** * Pathcast diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF index e60e3af0e1..bc43e6a7bd 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF @@ -19,5 +19,5 @@ Require-Bundle: com.raytheon.uf.common.serialization, com.raytheon.uf.common.status, com.raytheon.uf.common.dataplugin, com.raytheon.uf.common.dataquery, - org.apache.commons.lang, + org.apache.commons.lang3;bundle-version="3.4.0", org.apache.commons.beanutils diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java index 8d9e5a161a..209771edc7 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java @@ -41,7 +41,7 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import org.geotools.coverage.grid.GridGeometry2D; import org.hibernate.annotations.Type; import org.opengis.metadata.spatial.PixelOrientation; diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/LambertConformalGridCoverage.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/LambertConformalGridCoverage.java index a044e8b487..9cfd99d02d 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/LambertConformalGridCoverage.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/LambertConformalGridCoverage.java @@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.geospatial.MapUtil; diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/MercatorGridCoverage.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/MercatorGridCoverage.java index 496a815acd..d04a24feb3 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/MercatorGridCoverage.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/MercatorGridCoverage.java @@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import org.geotools.geometry.DirectPosition2D; import org.opengis.metadata.spatial.PixelOrientation; import org.opengis.referencing.crs.CoordinateReferenceSystem; diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/PolarStereoGridCoverage.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/PolarStereoGridCoverage.java index 8e7d263f0b..75385bbe9a 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/PolarStereoGridCoverage.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/PolarStereoGridCoverage.java @@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.geospatial.MapUtil; diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/StereographicGridCoverage.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/StereographicGridCoverage.java index e94ce3bec1..a2fd04b300 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/StereographicGridCoverage.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/StereographicGridCoverage.java @@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.geospatial.MapUtil; diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/lookup/GridCoverageSpatialMap.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/lookup/GridCoverageSpatialMap.java index b43e5461c1..0245f2bd5b 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/lookup/GridCoverageSpatialMap.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/lookup/GridCoverageSpatialMap.java @@ -26,7 +26,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.gridcoverage.GridCoverage; diff --git a/edexOsgi/com.raytheon.uf.common.mpe/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.mpe/META-INF/MANIFEST.MF index c181cf4ba4..ef683faaf1 100644 --- a/edexOsgi/com.raytheon.uf.common.mpe/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.mpe/META-INF/MANIFEST.MF @@ -2,10 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Mpe Plug-in Bundle-SymbolicName: com.raytheon.uf.common.mpe -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: org.geotools, - org.apache.commons.lang, javax.persistence;bundle-version="1.0.0", javax.measure;bundle-version="1.0.0", com.raytheon.uf.common.serialization.comm, diff --git a/edexOsgi/com.raytheon.uf.common.nc4/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.nc4/META-INF/MANIFEST.MF index f7624137d6..713fbba0e4 100644 --- a/edexOsgi/com.raytheon.uf.common.nc4/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.nc4/META-INF/MANIFEST.MF @@ -2,11 +2,11 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Nc4 Bundle-SymbolicName: com.raytheon.uf.common.nc4 -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: com.raytheon.uf.common.nc4, com.raytheon.uf.common.nc4.cf Require-Bundle: edu.mit.ll.netcdf;bundle-version="1.3.0", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.common.status;bundle-version="1.12.1174" diff --git a/edexOsgi/com.raytheon.uf.common.nc4/src/com/raytheon/uf/common/nc4/NcBase.java b/edexOsgi/com.raytheon.uf.common.nc4/src/com/raytheon/uf/common/nc4/NcBase.java index 873de732fe..4adf40ac62 100644 --- a/edexOsgi/com.raytheon.uf.common.nc4/src/com/raytheon/uf/common/nc4/NcBase.java +++ b/edexOsgi/com.raytheon.uf.common.nc4/src/com/raytheon/uf/common/nc4/NcBase.java @@ -11,7 +11,7 @@ package com.raytheon.uf.common.nc4; import java.util.Arrays; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; import edu.mit.ll.netcdf.LLNetcdfAttrJNI; import edu.mit.ll.netcdf.LLNetcdfException; @@ -20,20 +20,20 @@ import edu.mit.ll.netcdf.LLNetcdfException; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 7, 2013            bclement     Initial creation
- *
+ * 
  * 
- * + * * @author bclement - * @version 1.0 + * @version 1.0 */ public abstract class NcBase { - + protected int fileId; protected int varId; @@ -44,7 +44,7 @@ public abstract class NcBase { this.fileId = fileId; this.varId = varId; } - + /** * Add attribute. This method can only be called when file is in define mode * before {@link Netcdf#endFileDefinition()} is called. diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF index 8d6776a1e2..0b3625a9e2 100644 --- a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Nws Auth Plug-in Bundle-SymbolicName: com.raytheon.uf.common.plugin.nwsauth -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.2", @@ -10,7 +10,7 @@ Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.2", com.raytheon.uf.common.status;bundle-version="1.12.1174", com.raytheon.uf.common.localization;bundle-version="1.12.1174", com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", - org.apache.commons.lang;bundle-version="2.3.0" + org.apache.commons.lang3;bundle-version="3.4.0" Export-Package: com.raytheon.uf.common.plugin.nwsauth, com.raytheon.uf.common.plugin.nwsauth.exception, com.raytheon.uf.common.plugin.nwsauth.xml diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/xml/UserXML.java b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/xml/UserXML.java index 15827c47e0..9aeccacbfe 100644 --- a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/xml/UserXML.java +++ b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/xml/UserXML.java @@ -28,8 +28,8 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.auth.user.IAuthenticationData; import com.raytheon.uf.common.auth.user.IUser; diff --git a/edexOsgi/com.raytheon.uf.common.registry.ebxml/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.registry.ebxml/META-INF/MANIFEST.MF index c4dc384bb0..6cbe1a9ce7 100644 --- a/edexOsgi/com.raytheon.uf.common.registry.ebxml/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.registry.ebxml/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: com.raytheon.uf.common.registry.ebxml Bundle-SymbolicName: com.raytheon.uf.common.registry.ebxml -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: com.raytheon.uf.common.registry, @@ -29,7 +29,7 @@ Require-Bundle: org.apache.commons.codec;bundle-version="1.4.0", org.apache.http;bundle-version="4.1.2", com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", org.springframework;bundle-version="2.5.6", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", org.apache.commons.cxf;bundle-version="1.0.0", com.raytheon.uf.common.localization;bundle-version="1.12.1174" Import-Package: com.sun.xml.bind.marshaller, diff --git a/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/ContentSlotBasedEncoder.java b/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/ContentSlotBasedEncoder.java index 1ff369ba68..37df836c62 100644 --- a/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/ContentSlotBasedEncoder.java +++ b/edexOsgi/com.raytheon.uf.common.registry.ebxml/src/com/raytheon/uf/common/registry/ebxml/encoder/ContentSlotBasedEncoder.java @@ -26,8 +26,8 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType; import oasis.names.tc.ebxml.regrep.xsd.rim.v4.ValueType; import oasis.names.tc.ebxml.regrep.xsd.rim.v4.VersionInfoType; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; import com.raytheon.uf.common.registry.ebxml.RegistryUtil; import com.raytheon.uf.common.serialization.SerializationException; @@ -67,7 +67,7 @@ abstract class ContentSlotBasedEncoder returnedSlots = registryObjectType.getSlot(); // Figure out which version we have and it's class VersionInfoType vit = registryObjectType.getVersionInfo(); - String className = registryObjectType.getSlotValue(RegistryUtil.registryObjectClassName); + String className = registryObjectType + .getSlotValue(RegistryUtil.registryObjectClassName); // Walk the returned slots looking for the "content" slot for (SlotType s : returnedSlots) { @@ -93,7 +94,8 @@ abstract class ContentSlotBasedEncoder children; + protected List children; - protected String name; + protected String name; - protected String title; + protected String title; - protected List keywords; + protected List keywords; - protected String abs; + protected String abs; - protected List styles; + protected List styles; - protected OgcGeoBoundingBox geoBoundingBox; + protected OgcGeoBoundingBox geoBoundingBox; - protected List boundingBox; + protected List boundingBox; - protected List crs; + protected List crs; - protected double minScaleDenom = Double.NaN; + protected double minScaleDenom = Double.NaN; - protected double maxScaleDenom = Double.NaN; + protected double maxScaleDenom = Double.NaN; - protected boolean opaque; + protected boolean opaque; - protected int sizeRecord = 0; + protected int sizeRecord = 0; - protected List dimensions; + protected List dimensions; - public static String keySeparator = "/"; + public static String keySeparator = "/"; - public void addCRS(String crs) { - this.crs = addToList(this.crs, crs); - } + public void addCRS(String crs) { + this.crs = addToList(this.crs, crs); + } - protected List addToList(List l, T item) { - if (l == null) { - l = new ArrayList(); - } - l.add(item); - return l; - } + protected List addToList(List l, T item) { + if (l == null) { + l = new ArrayList(); + } + l.add(item); + return l; + } - public void addBoundingBox(OgcBoundingBox bbox) { - this.boundingBox = addToList(boundingBox, bbox); - } + public void addBoundingBox(OgcBoundingBox bbox) { + this.boundingBox = addToList(boundingBox, bbox); + } - public void addStyle(OgcStyle style) { - this.styles = addToList(styles, style); - } + public void addStyle(OgcStyle style) { + this.styles = addToList(styles, style); + } - public void addChildLayer(OgcLayer child) { - this.children = addToList(children, child); - } + public void addChildLayer(OgcLayer child) { + this.children = addToList(children, child); + } - public void addDimension(OgcDimension dimention) { - this.dimensions = addToList(dimensions, dimention); - } + public void addDimension(OgcDimension dimention) { + this.dimensions = addToList(dimensions, dimention); + } - public void addKeyword(String keyword) { - this.keywords = addToList(keywords, keyword); - } + public void addKeyword(String keyword) { + this.keywords = addToList(keywords, keyword); + } - public String getKey() { - return getKey(name); - } + public String getKey() { + return getKey(name); + } - public String[] separateKey() { - return separateKey(name); - } + public String[] separateKey() { + return separateKey(name); + } - /** - * @return the unique key for the source of the layer - */ - public static String getKey(String layerName) { - if (layerName == null) { - return null; - } - return separateKey(layerName)[0]; - } + /** + * @return the unique key for the source of the layer + */ + public static String getKey(String layerName) { + if (layerName == null) { + return null; + } + return separateKey(layerName)[0]; + } public static String decodeLayerName(String layerName) { if (layerName == null) { @@ -141,171 +140,171 @@ public class OgcLayer { } } - public static String[] separateKey(String layerName) { + public static String[] separateKey(String layerName) { String lname = decodeLayerName(layerName); if (lname == null) { return null; } lname = StringUtils.strip(lname, OgcLayer.keySeparator); - return lname.split(OgcLayer.keySeparator, 2); - } + return lname.split(OgcLayer.keySeparator, 2); + } - public String getFullTitle() { - return getKey() + keySeparator + title; - } + public String getFullTitle() { + return getKey() + keySeparator + title; + } - public static String createName(String key, String name) { - try { - return URLEncoder.encode(key + keySeparator + name, "UTF-8"); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - } + public static String createName(String key, String name) { + try { + return URLEncoder.encode(key + keySeparator + name, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + } - /** - * @return the dimentions - */ - public List getDimensions() { - return dimensions; - } + /** + * @return the dimentions + */ + public List getDimensions() { + return dimensions; + } - /** - * @param dimensions - * the dimentions to set - */ - public void setDimensions(List dimensions) { - this.dimensions = dimensions; - } + /** + * @param dimensions + * the dimentions to set + */ + public void setDimensions(List dimensions) { + this.dimensions = dimensions; + } - public OgcLayer getParent() { - return parent; - } + public OgcLayer getParent() { + return parent; + } - public void setParent(OgcLayer parent) { - this.parent = parent; - } + public void setParent(OgcLayer parent) { + this.parent = parent; + } - public List getChildren() { - return children; - } + public List getChildren() { + return children; + } - public void setChildren(List children) { - this.children = children; - } + public void setChildren(List children) { + this.children = children; + } - public List getStyles() { - return styles; - } + public List getStyles() { + return styles; + } - public void setStyles(List styles) { - this.styles = styles; - } + public void setStyles(List styles) { + this.styles = styles; + } - /** - * @return the geoBoundingBox - */ - public OgcGeoBoundingBox getGeoBoundingBox() { - return geoBoundingBox; - } + /** + * @return the geoBoundingBox + */ + public OgcGeoBoundingBox getGeoBoundingBox() { + return geoBoundingBox; + } - /** - * @param geoBoundingBox - * the geoBoundingBox to set - */ - public void setGeoBoundingBox(OgcGeoBoundingBox geoBoundingBox) { - this.geoBoundingBox = geoBoundingBox; - } + /** + * @param geoBoundingBox + * the geoBoundingBox to set + */ + public void setGeoBoundingBox(OgcGeoBoundingBox geoBoundingBox) { + this.geoBoundingBox = geoBoundingBox; + } - public List getCrs() { - return crs; - } + public List getCrs() { + return crs; + } - public void setCrs(List crs) { - this.crs = crs; - } + public void setCrs(List crs) { + this.crs = crs; + } - /** - * @return the boundingBox - */ - public List getBoundingBox() { - return boundingBox; - } + /** + * @return the boundingBox + */ + public List getBoundingBox() { + return boundingBox; + } - /** - * @param boundingBox - * the boundingBox to set - */ - public void setBoundingBox(List boundingBox) { - this.boundingBox = boundingBox; - } + /** + * @param boundingBox + * the boundingBox to set + */ + public void setBoundingBox(List boundingBox) { + this.boundingBox = boundingBox; + } - public double getMinScaleDenom() { - return minScaleDenom; - } + public double getMinScaleDenom() { + return minScaleDenom; + } - public void setMinScaleDenom(double minScaleDenom) { - this.minScaleDenom = minScaleDenom; - } + public void setMinScaleDenom(double minScaleDenom) { + this.minScaleDenom = minScaleDenom; + } - public double getMaxScaleDenom() { - return maxScaleDenom; - } + public double getMaxScaleDenom() { + return maxScaleDenom; + } - public void setMaxScaleDenom(double maxScaleDenom) { - this.maxScaleDenom = maxScaleDenom; - } + public void setMaxScaleDenom(double maxScaleDenom) { + this.maxScaleDenom = maxScaleDenom; + } - public boolean isOpaque() { - return opaque; - } + public boolean isOpaque() { + return opaque; + } - public void setOpaque(boolean opaque) { - this.opaque = opaque; - } + public void setOpaque(boolean opaque) { + this.opaque = opaque; + } - public String getName() { - return name; - } + public String getName() { + return name; + } - /** - * @param key - * a key that is used in all layers from the layer's source - * @param name - */ - public void setName(String key, String name) { - this.name = createName(key, name); - } + /** + * @param key + * a key that is used in all layers from the layer's source + * @param name + */ + public void setName(String key, String name) { + this.name = createName(key, name); + } - public String getTitle() { - return title; - } + public String getTitle() { + return title; + } - public void setTitle(String title) { - this.title = title; - } + public void setTitle(String title) { + this.title = title; + } - public List getKeywords() { - return keywords; - } + public List getKeywords() { + return keywords; + } - public void setKeywords(List keywords) { - this.keywords = keywords; - } + public void setKeywords(List keywords) { + this.keywords = keywords; + } - public String getAbs() { - return abs; - } + public String getAbs() { + return abs; + } - public void setAbs(String abs) { - this.abs = abs; - } + public void setAbs(String abs) { + this.abs = abs; + } - public int getSizeRecord() { - return sizeRecord; - } + public int getSizeRecord() { + return sizeRecord; + } - public void setSizeRecord(int sizeRecord) { - this.sizeRecord = sizeRecord; - } + public void setSizeRecord(int sizeRecord) { + this.sizeRecord = sizeRecord; + } } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java index c8ed17019f..32bc328e1f 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/db/LayerCollector.java @@ -24,7 +24,7 @@ import java.util.Calendar; import java.util.Date; import java.util.Set; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.time.DateUtils; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -180,7 +180,7 @@ public abstract class LayerCollector lcache; - protected static String timeUnit = "ISO8601"; + protected static String timeUnit = "ISO8601"; public static final Pattern frontDot = Pattern .compile("^(-?[0-9]*\\.?[0-9]+)(.*)$"); @@ -93,36 +93,36 @@ public class LayerTransformer lcache) { - this.key = key; - this.lcache = lcache; - } + this.key = key; + this.lcache = lcache; + } - /** - * @param name - * @return null if layer not found - * @throws DataAccessLayerException - */ + /** + * @param name + * @return null if layer not found + * @throws DataAccessLayerException + */ public L find(String name) throws OgcException { - return lcache.getLayer(name); - } + return lcache.getLayer(name); + } - /** - * @param layer - * @param dimension - * @return null if layer/dimension not found - * @throws DataAccessLayerException - */ + /** + * @param layer + * @param dimension + * @return null if layer/dimension not found + * @throws DataAccessLayerException + */ public DIMENSION getDimension(String layer, String dimension) throws OgcException { L l = find(layer); @@ -130,7 +130,7 @@ public class LayerTransformer getDimValuesAsDouble(SimpleDimension dim) { - TreeSet rval = new TreeSet(); - if (dim == null) { - return rval; - } - for (String val : dim.getValues()) { - try { - Matcher m = frontDot.matcher(val); - if (m.matches()) { - val = m.group(1); - } else { - m = backDot.matcher(val); - if (m.matches()) { - val = m.group(1); - } - } - rval.add(Double.parseDouble(val)); - } catch (Throwable e) { - // continue - } - } - return rval; - } + /** + * @param dim + * @return empty set if dim is null or doesn't have any parsable values + */ + public static TreeSet getDimValuesAsDouble(SimpleDimension dim) { + TreeSet rval = new TreeSet(); + if (dim == null) { + return rval; + } + for (String val : dim.getValues()) { + try { + Matcher m = frontDot.matcher(val); + if (m.matches()) { + val = m.group(1); + } else { + m = backDot.matcher(val); + if (m.matches()) { + val = m.group(1); + } + } + rval.add(Double.parseDouble(val)); + } catch (Throwable e) { + // continue + } + } + return rval; + } - /** - * @param layer - * @return - */ + /** + * @param layer + * @return + */ public List getBoundingBoxes(L layer) { - String crs = layer.getTargetCrsCode(); - double minx = layer.getTargetMinx(); - double maxx = layer.getTargetMaxx(); - double miny = layer.getTargetMiny(); - double maxy = layer.getTargetMaxy(); - OgcBoundingBox rval = new OgcBoundingBox(crs, minx, maxx, miny, maxy); - return Arrays.asList(rval); - } + String crs = layer.getTargetCrsCode(); + double minx = layer.getTargetMinx(); + double maxx = layer.getTargetMaxx(); + double miny = layer.getTargetMiny(); + double maxy = layer.getTargetMaxy(); + OgcBoundingBox rval = new OgcBoundingBox(crs, minx, maxx, miny, maxy); + return Arrays.asList(rval); + } - public static String getCrsName(CoordinateReferenceSystem crs) { - if (crs == null) { - return null; - } - Set ids = crs.getIdentifiers(); - if (ids == null || ids.isEmpty()) { - return crs.getName().toString(); - } else { - return ids.iterator().next().toString(); - } - } + public static String getCrsName(CoordinateReferenceSystem crs) { + if (crs == null) { + return null; + } + Set ids = crs.getIdentifiers(); + if (ids == null || ids.isEmpty()) { + return crs.getName().toString(); + } else { + return ids.iterator().next().toString(); + } + } - /** - * @param layer - * @return - */ + /** + * @param layer + * @return + */ public static > OgcGeoBoundingBox getGeoBoundingBox( L layer) { - Polygon crs84Bounds = layer.getCrs84Bounds(); - if (crs84Bounds == null) { - return null; - } - ReferencedEnvelope env = JTS.toEnvelope(crs84Bounds); - return new OgcGeoBoundingBox(env); - } + Polygon crs84Bounds = layer.getCrs84Bounds(); + if (crs84Bounds == null) { + return null; + } + ReferencedEnvelope env = JTS.toEnvelope(crs84Bounds); + return new OgcGeoBoundingBox(env); + } - /** - * @param layer - * @param tformat - * @return - */ + /** + * @param layer + * @param tformat + * @return + */ public static > List getTimes(L layer) { - return getTimes(layer, TimeFormat.LIST); - } + return getTimes(layer, TimeFormat.LIST); + } - /** - * @param layer - * @param tformat - * @return - */ + /** + * @param layer + * @param tformat + * @return + */ public static > List getTimes(L layer, TimeFormat tformat) { - List rval; - // TODO this could be adapted to a pattern that allows for formatters to - // be externally added - switch (tformat) { - case LIST: - rval = getTimesAsList(layer); - break; - case HOUR_RANGES: - rval = getTimesAsHourRanges(layer); - break; - default: - throw new IllegalArgumentException("No handler for time format: " - + tformat); - } - return rval; - } + List rval; + // TODO this could be adapted to a pattern that allows for formatters to + // be externally added + switch (tformat) { + case LIST: + rval = getTimesAsList(layer); + break; + case HOUR_RANGES: + rval = getTimesAsHourRanges(layer); + break; + default: + throw new IllegalArgumentException("No handler for time format: " + + tformat); + } + return rval; + } - /** - * @param layer - * @return - */ + /** + * @param layer + * @return + */ protected static > List getTimesAsHourRanges( L layer) { - Set times = layer.getTimes(); - if (times == null || times.isEmpty()) { - return new ArrayList(0); - } - if ( times.size() % 2 != 0){ - String msg = "Odd number of times for layer " + layer.getName() - + ". Should be even to construct time ranges."; - log.warn(msg + " Dropping last time"); - } + Set times = layer.getTimes(); + if (times == null || times.isEmpty()) { + return new ArrayList(0); + } + if (times.size() % 2 != 0) { + String msg = "Odd number of times for layer " + layer.getName() + + ". Should be even to construct time ranges."; + log.warn(msg + " Dropping last time"); + } - Iterator iter = times.iterator(); - int ranges = times.size() / 2; - List rval = new ArrayList(ranges); - for (int i = 0; i < ranges; ++i) { - Date start = iter.next(); - Date end = iter.next(); - rval.add(formatRange(start, end)); - } + Iterator iter = times.iterator(); + int ranges = times.size() / 2; + List rval = new ArrayList(ranges); + for (int i = 0; i < ranges; ++i) { + Date start = iter.next(); + Date end = iter.next(); + rval.add(formatRange(start, end)); + } - return rval; - } + return rval; + } - protected static String formatRange(Date start, Date end) { - return format(start) + '/' + format(end) + "/0"; - } + protected static String formatRange(Date start, Date end) { + return format(start) + '/' + format(end) + "/0"; + } - /** - * End a range started by startRange() - * - * @param d - * start of range - * @param i - * iterator to rest of times that possibly include the rest of - * the range - * @param sb - * where the formatted output goes - * @return the start of the next range, null if there are no more ranges - */ - protected static Date endRange(Date d, Iterator i, StringBuilder sb) { - long milliStart = d.getTime(); - long milliPrev = milliStart; - Date rval = null; - Date prev = null; - Date curr = null; - while (i.hasNext()) { - curr = i.next(); + /** + * End a range started by startRange() + * + * @param d + * start of range + * @param i + * iterator to rest of times that possibly include the rest of + * the range + * @param sb + * where the formatted output goes + * @return the start of the next range, null if there are no more ranges + */ + protected static Date endRange(Date d, Iterator i, StringBuilder sb) { + long milliStart = d.getTime(); + long milliPrev = milliStart; + Date rval = null; + Date prev = null; + Date curr = null; + while (i.hasNext()) { + curr = i.next(); if (curr.getTime() - milliPrev > TimeUtil.MILLIS_PER_HOUR) { - // we've reached the end of the range return rval - rval = curr; - break; - } - prev = curr; - milliPrev = prev.getTime(); - } - if (prev == null) { - // iterator didn't have anything + // we've reached the end of the range return rval + rval = curr; + break; + } + prev = curr; + milliPrev = prev.getTime(); + } + if (prev == null) { + // iterator didn't have anything prev = new Date(milliStart + TimeUtil.MILLIS_PER_HOUR); - } else { - // we want the range to end at the next hour + } else { + // we want the range to end at the next hour prev = new Date(prev.getTime() + TimeUtil.MILLIS_PER_HOUR); - } - sb.append(format(prev)); - // FIXME 0 indicates a continuum range, we should support discrete - // periods in the range - sb.append("/0"); - return rval; - } + } + sb.append(format(prev)); + // FIXME 0 indicates a continuum range, we should support discrete + // periods in the range + sb.append("/0"); + return rval; + } - public static String format(Date d) { - Calendar c = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT")); - c.setTime(d); - return DatatypeConverter.printDateTime(c); - } + public static String format(Date d) { + Calendar c = GregorianCalendar.getInstance(TimeZone.getTimeZone("GMT")); + c.setTime(d); + return DatatypeConverter.printDateTime(c); + } - protected static void startRange(StringBuilder sb, Date d) { - sb.append(format(d)); - sb.append('/'); - } + protected static void startRange(StringBuilder sb, Date d) { + sb.append(format(d)); + sb.append('/'); + } protected static > List getTimesAsList( L layer) { - Set times = layer.getTimes(); - if (times == null || times.isEmpty()) { - return new ArrayList(0); - } - TreeSet sorted = new TreeSet(times); - Iterator i = sorted.iterator(); - List rval = new ArrayList(sorted.size()); - while (i.hasNext()) { - rval.add(format(i.next())); - } - return rval; - } + Set times = layer.getTimes(); + if (times == null || times.isEmpty()) { + return new ArrayList(0); + } + TreeSet sorted = new TreeSet(times); + Iterator i = sorted.iterator(); + List rval = new ArrayList(sorted.size()); + while (i.hasNext()) { + rval.add(format(i.next())); + } + return rval; + } - public TreeSet getAllTimes() throws OgcException { - TreeSet rval = new TreeSet(); + public TreeSet getAllTimes() throws OgcException { + TreeSet rval = new TreeSet(); List layers = getLayers(); for (L l : layers) { - rval.addAll(l.getTimes()); - } - return rval; - } + rval.addAll(l.getTimes()); + } + return rval; + } public List getLayers() throws OgcException { - return lcache.getLayers(); - } + return lcache.getLayers(); + } - public List getLayersAsOgc(TimeFormat tformat, StyleLookup lookup) - throws OgcException { - return transform(getLayers(), tformat, lookup); - } + public List getLayersAsOgc(TimeFormat tformat, StyleLookup lookup) + throws OgcException { + return transform(getLayers(), tformat, lookup); + } - public List getLayersAsOgc(StyleLookup lookup) - throws OgcException { - return getLayersAsOgc(TimeFormat.LIST, lookup); - } + public List getLayersAsOgc(StyleLookup lookup) + throws OgcException { + return getLayersAsOgc(TimeFormat.LIST, lookup); + } - /** - * @param layers - * @return - */ - protected List transform(List layers, - TimeFormat tformat, StyleLookup lookup) { - List rval = new ArrayList(layers.size()); + /** + * @param layers + * @return + */ + protected List transform(List layers, TimeFormat tformat, + StyleLookup lookup) { + List rval = new ArrayList(layers.size()); for (L simple : layers) { - rval.add(transform(simple, tformat, lookup)); - } - return rval; - } + rval.add(transform(simple, tformat, lookup)); + } + return rval; + } - /** - * Transform a simple layer as represented in the data storage area to an - * OgcLayer that can be viewed through getCapabilities - *

- * Override this method to add additional Dimensions. - * - * @param layer - * @return - */ - public OgcLayer transform(L layer, TimeFormat tformat, - StyleLookup lookup) { - OgcLayer rval = new OgcLayer(); - String name = layer.getName(); - rval.setName(key, name); - rval.setTitle(name); - setStylesForLayer(rval.getName(), layer, rval, lookup); - OgcDimension timeDim = new OgcDimension("time", timeUnit, - layer.getTimeEntries()); - String defaultTime = layer.getDefaultTimeEntry(); - timeDim.setDefaultVal(defaultTime); - rval.addDimension(timeDim); - for (OgcDimension dim : getDims(layer, layer.getDimensions())) { - rval.addDimension(dim); - } - rval.setGeoBoundingBox(getGeoBoundingBox(layer)); - rval.setBoundingBox(getBoundingBoxes(layer)); - // rval.setCrs(Arrays.asList(layer.getTargetCrs())); - return rval; - } + /** + * Transform a simple layer as represented in the data storage area to an + * OgcLayer that can be viewed through getCapabilities + *

+ * Override this method to add additional Dimensions. + * + * @param layer + * @return + */ + public OgcLayer transform(L layer, TimeFormat tformat, StyleLookup lookup) { + OgcLayer rval = new OgcLayer(); + String name = layer.getName(); + rval.setName(key, name); + rval.setTitle(name); + setStylesForLayer(rval.getName(), layer, rval, lookup); + OgcDimension timeDim = new OgcDimension("time", timeUnit, + layer.getTimeEntries()); + String defaultTime = layer.getDefaultTimeEntry(); + timeDim.setDefaultVal(defaultTime); + rval.addDimension(timeDim); + for (OgcDimension dim : getDims(layer, layer.getDimensions())) { + rval.addDimension(dim); + } + rval.setGeoBoundingBox(getGeoBoundingBox(layer)); + rval.setBoundingBox(getBoundingBoxes(layer)); + // rval.setCrs(Arrays.asList(layer.getTargetCrs())); + return rval; + } - public static String getTimeRange(Date d) { - Date start = DateUtils.truncate(d, Calendar.HOUR); - Date end = DateUtils.addHours(start, 1); - return format(start) + '/' + format(end); - } + public static String getTimeRange(Date d) { + Date start = DateUtils.truncate(d, Calendar.HOUR); + Date end = DateUtils.addHours(start, 1); + return format(start) + '/' + format(end); + } - protected void setStylesForLayer(String layerName, L layer, - OgcLayer rval, StyleLookup lookup) { - if (lookup != null) { - String style = lookup.lookup(layer.getName()); - if (style != null) { - OgcStyle ogcstyle = new OgcStyle(style); - ogcstyle.setLegendUrl(createLegendUrl(layerName, style)); - ogcstyle.setDefault(true); - rval.setStyles(Arrays.asList(ogcstyle)); - } - } - } + protected void setStylesForLayer(String layerName, L layer, OgcLayer rval, + StyleLookup lookup) { + if (lookup != null) { + String style = lookup.lookup(layer.getName()); + if (style != null) { + OgcStyle ogcstyle = new OgcStyle(style); + ogcstyle.setLegendUrl(createLegendUrl(layerName, style)); + ogcstyle.setDefault(true); + rval.setStyles(Arrays.asList(ogcstyle)); + } + } + } - public static String createLegendUrl(String layerName, String styleName) { - String url = "&layer=" + layerName + "&style=" + styleName - + "&format=image/png"; - return url.replaceAll(" ", "%20"); - } + public static String createLegendUrl(String layerName, String styleName) { + String url = "&layer=" + layerName + "&style=" + styleName + + "&format=image/png"; + return url.replaceAll(" ", "%20"); + } - /** - * @param layer - * @return - */ + /** + * @param layer + * @return + */ protected OgcDimension[] getDims(L layer, Set dims) { - if (dims == null) { - return new OgcDimension[0]; - } + if (dims == null) { + return new OgcDimension[0]; + } List rval = new ArrayList(dims.size()); for (DIMENSION dim : dims) { - OgcDimension ogcdim = transform(layer, dim); - if (ogcdim != null) { - rval.add(ogcdim); - } - } - return rval.toArray(new OgcDimension[rval.size()]); - } + OgcDimension ogcdim = transform(layer, dim); + if (ogcdim != null) { + rval.add(ogcdim); + } + } + return rval.toArray(new OgcDimension[rval.size()]); + } - /** - * @param simpleDimension - * @return - */ + /** + * @param simpleDimension + * @return + */ protected OgcDimension transform(L layer, DIMENSION dim) { - if (dim == null || dim.getName() == null || dim.getValues() == null) { - return null; - } - OgcDimension rval; - List values = new ArrayList(dim.getValues()); - if (dim.getUnits() == null) { - rval = new OgcDimension(dim.getName(), values); - } else { - rval = new OgcDimension(dim.getName(), dim.getUnits(), values); - } - rval.setDefaultVal(dim.getDefaultValue(layer)); - return rval; - } + if (dim == null || dim.getName() == null || dim.getValues() == null) { + return null; + } + OgcDimension rval; + List values = new ArrayList(dim.getValues()); + if (dim.getUnits() == null) { + rval = new OgcDimension(dim.getName(), values); + } else { + rval = new OgcDimension(dim.getName(), dim.getUnits(), values); + } + rval.setDefaultVal(dim.getDefaultValue(layer)); + return rval; + } protected OgcLayer transform(L layer, StyleLookup lookup) { - return transform(layer, TimeFormat.LIST, lookup); - } + return transform(layer, TimeFormat.LIST, lookup); + } - /** - * @param layerName - * @return null if layer name isn't found - * @throws DataAccessLayerException - */ - public Date getLatestTime(String layerName) throws OgcException { + /** + * @param layerName + * @return null if layer name isn't found + * @throws DataAccessLayerException + */ + public Date getLatestTime(String layerName) throws OgcException { L simpleLayer = find(layerName); - return getLatestTime(simpleLayer); - } + return getLatestTime(simpleLayer); + } - /** - * @param layer - * @return null if layer name isn't found - */ + /** + * @param layer + * @return null if layer name isn't found + */ public static > Date getLatestTime(L layer) { - if (layer == null) { - return null; - } - Set times = layer.getTimes(); - TreeSet sorted = new TreeSet(times); - return sorted.last(); - } + if (layer == null) { + return null; + } + Set times = layer.getTimes(); + TreeSet sorted = new TreeSet(times); + return sorted.last(); + } - /** - * @return the key - */ - public String getKey() { - return key; - } + /** + * @return the key + */ + public String getKey() { + return key; + } - /** - * @param key - * the key to set - */ - public void setKey(String key) { - this.key = key; - } + /** + * @param key + * the key to set + */ + public void setKey(String key) { + this.key = key; + } - /** - * @return - * @throws OgcException - */ + /** + * @return + * @throws OgcException + */ public TreeSet getLatestTimes() throws OgcException { List layers = getLayers(); - TreeSet rval = new TreeSet(); + TreeSet rval = new TreeSet(); for (L l : layers) { - TreeSet times = new TreeSet(l.getTimes()); - rval.add(times.last()); - } - return rval; - } + TreeSet times = new TreeSet(l.getTimes()); + rval.add(times.last()); + } + return rval; + } /** * @return the lcache diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/ComparisonFilter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/ComparisonFilter.java index 6df4742aee..1a07ed35a2 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/ComparisonFilter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/filter/ComparisonFilter.java @@ -12,7 +12,7 @@ package com.raytheon.uf.edex.ogc.common.filter; import java.lang.reflect.Field; import java.math.BigDecimal; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.edex.ogc.common.util.ConvertService; @@ -34,13 +34,13 @@ import com.raytheon.uf.edex.ogc.common.util.ConvertService; * @version 1.0 */ public class ComparisonFilter extends AbstractPdoFilter { - + public static enum CompOp { EQ, LT, LTE, GT, GTE, NEQ, NULL }; protected String field; - + protected CompOp op; protected Object value; @@ -212,26 +212,34 @@ public class ComparisonFilter extends AbstractPdoFilter { */ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } ComparisonFilter other = (ComparisonFilter) obj; if (field == null) { - if (other.field != null) + if (other.field != null) { return false; - } else if (!field.equals(other.field)) + } + } else if (!field.equals(other.field)) { return false; - if (op != other.op) + } + if (op != other.op) { return false; + } if (value == null) { - if (other.value != null) + if (other.value != null) { return false; - } else if (!value.equals(other.value)) + } + } else if (!value.equals(other.value)) { return false; + } return true; } - + } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java index a9d3ddcf1b..02eafc7ed5 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_1_1/EnvelopeConverter.java @@ -28,7 +28,7 @@ import net.opengis.gml.v_3_1_1.CoordinatesType; import net.opengis.gml.v_3_1_1.DirectPositionType; import net.opengis.gml.v_3_1_1.EnvelopeType; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.edex.ogc.common.OgcException; import com.raytheon.uf.edex.ogc.common.OgcException.Code; @@ -111,8 +111,7 @@ public class EnvelopeConverter { * @return * @throws Exception */ - public Coordinate[] getCoordinates(EnvelopeType env) - throws OgcException { + public Coordinate[] getCoordinates(EnvelopeType env) throws OgcException { int dims = getDims(env); if (env.isSetLowerCorner() && env.isSetUpperCorner()) { return translate(env.getLowerCorner(), env.getUpperCorner(), dims); @@ -128,7 +127,7 @@ public class EnvelopeConverter { } throw new OgcException(Code.InvalidFormat, "Unsupported envelope format"); - } + } /** * Convert direct positions to JTS bounding box. Output will only include @@ -142,13 +141,13 @@ public class EnvelopeConverter { */ protected Coordinate[] translate(DirectPositionType lower, DirectPositionType upper, int dims) throws OgcException { - List lowers = lower.getValue(); - List uppers = upper.getValue(); + List lowers = lower.getValue(); + List uppers = upper.getValue(); if (lowers == null || uppers == null || lowers.size() < dims || uppers.size() < dims) { throw new OgcException(Code.InvalidFormat, "Unsupported envelope format"); - } + } Coordinate l; Coordinate u; if (dims == 2) { @@ -162,7 +161,7 @@ public class EnvelopeConverter { "Unsupported envelope format"); } return new Coordinate[] { l, u }; - } + } /** * Convert list of direct positions to JTS coordinates. Output will only @@ -204,8 +203,7 @@ public class EnvelopeConverter { * @throws Exception */ protected Coordinate[] handleCoordinates(CoordinatesType coordinates, - int dims) - throws OgcException { + int dims) throws OgcException { try { List coords = CoordinateUtil.parseCoordinates(coordinates .getValue()); @@ -223,13 +221,13 @@ public class EnvelopeConverter { * @param doubles * @return */ - protected DirectPositionType createPos(String[] doubles) { - Double[] rval = new Double[doubles.length]; - for (int i = 0; i < doubles.length; ++i) { - rval[i] = Double.parseDouble(doubles[i]); - } - return createPos(rval); - } + protected DirectPositionType createPos(String[] doubles) { + Double[] rval = new Double[doubles.length]; + for (int i = 0; i < doubles.length; ++i) { + rval[i] = Double.parseDouble(doubles[i]); + } + return createPos(rval); + } /** * Convert coordtype to direct position @@ -239,18 +237,18 @@ public class EnvelopeConverter { * @throws Exception */ protected DirectPositionType createPos(CoordType coord) throws OgcException { - Double[] rval; - if (coord.isSetZ()) { - rval = new Double[] { coord.getX().doubleValue(), - coord.getY().doubleValue(), coord.getZ().doubleValue() }; - } else if (coord.isSetY()) { - rval = new Double[] { coord.getX().doubleValue(), - coord.getY().doubleValue() }; - } else { - rval = new Double[] { coord.getX().doubleValue() }; - } - return createPos(rval); - } + Double[] rval; + if (coord.isSetZ()) { + rval = new Double[] { coord.getX().doubleValue(), + coord.getY().doubleValue(), coord.getZ().doubleValue() }; + } else if (coord.isSetY()) { + rval = new Double[] { coord.getX().doubleValue(), + coord.getY().doubleValue() }; + } else { + rval = new Double[] { coord.getX().doubleValue() }; + } + return createPos(rval); + } /** * Create direct position type from double values in strings @@ -258,10 +256,10 @@ public class EnvelopeConverter { * @param doubles * @return */ - protected DirectPositionType createPos(Double... coords) { - DirectPositionType rval = new DirectPositionType(); - rval.setValue(Arrays.asList(coords)); - return rval; - } + protected DirectPositionType createPos(Double... coords) { + DirectPositionType rval = new DirectPositionType(); + rval.setValue(Arrays.asList(coords)); + return rval; + } } diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java index 744437ed19..d187e9dc4a 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/EnvelopeConverter.java @@ -28,7 +28,7 @@ import net.opengis.gml.v_3_2_1.CoordinatesType; import net.opengis.gml.v_3_2_1.DirectPositionType; import net.opengis.gml.v_3_2_1.EnvelopeType; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.edex.ogc.common.OgcException; import com.raytheon.uf.edex.ogc.common.OgcException.Code; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java index 0fb297d454..f266f24eb7 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/gml3_2_1/GeometryConverter.java @@ -54,7 +54,7 @@ import net.opengis.gml.v_3_2_1.PointPropertyType; import net.opengis.gml.v_3_2_1.PointType; import net.opengis.gml.v_3_2_1.PolygonType; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; import org.geotools.geometry.jts.JTS; import com.vividsolutions.jts.geom.Coordinate; @@ -92,7 +92,7 @@ public class GeometryConverter { protected final GeometryFactory factory = new GeometryFactory(); protected final ObjectFactory gmlFactory = new ObjectFactory(); - + private static final String DIGIT_STR = "Ee-.0123456789"; private static final Set DIGIT_SET; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java index 52e0831b4e..fe5c03a4ff 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/http/OgcHttpHandler.java @@ -36,7 +36,7 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.apache.commons.collections.map.CaseInsensitiveMap; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.http.AcceptHeaderParser; import com.raytheon.uf.common.http.AcceptHeaderValue; diff --git a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CoordinateUtil.java b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CoordinateUtil.java index dba9cdfd25..60bdf35b22 100644 --- a/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CoordinateUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.ogc.common/src/com/raytheon/uf/edex/ogc/common/spatial/CoordinateUtil.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; /** * Utility methods for parsing coordinates from GML strings diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/META-INF/MANIFEST.MF index 573b1af846..70810445be 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: VIIRS Edex Plugin Bundle-SymbolicName: com.raytheon.uf.edex.plugin.npp.viirs -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.1174", @@ -11,7 +11,7 @@ Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.1174", javax.persistence;bundle-version="1.0.0", com.raytheon.uf.common.dataplugin.npp.viirs;bundle-version="1.0.0", ucar.nc2;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.edex.plugin.npp;bundle-version="1.0.0", com.raytheon.uf.common.status;bundle-version="1.12.1174", com.raytheon.uf.common.localization;bundle-version="1.12.1174", diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSDecoder.java index b15e2de145..c37ffa6c5f 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSDecoder.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSDecoder.java @@ -25,7 +25,7 @@ import java.util.Calendar; import java.util.HashMap; import java.util.Map; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import ucar.ma2.Array; import ucar.nc2.Attribute; @@ -134,8 +134,7 @@ public class VIIRSDecoder extends AbstractNPPDecoder { LocalizationFile mappingFile = PathManagerFactory.getPathManager() .getStaticLocalizationFile(VIIRS_MAPPING_FILE); in = mappingFile.openInputStream(); - mapping = (VIIRSHeaderMapping) manager - .unmarshalFromInputStream(in); + mapping = (VIIRSHeaderMapping) manager.unmarshalFromInputStream(in); } catch (Exception e) { throw new RuntimeException( "Error deserializing VIIRS header mapping file", e); @@ -247,15 +246,15 @@ public class VIIRSDecoder extends AbstractNPPDecoder { missingValues[i] = Float .parseFloat(split[i]); } - } else if(attr.getDataType().isNumeric()){ - if(attr.isArray()){ + } else if (attr.getDataType().isNumeric()) { + if (attr.isArray()) { missingValues = new float[attr.getLength()]; for (int i = 0; i < missingValues.length; i += 1) { missingValues[i] = attr .getNumericValue(i) .floatValue(); } - }else{ + } else { missingValues = new float[] { attr .getNumericValue().floatValue() }; } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.npp/META-INF/MANIFEST.MF index 08580cea7f..3ab81bd202 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.npp/META-INF/MANIFEST.MF @@ -2,11 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: NPP Common EDEX Bundle-SymbolicName: com.raytheon.uf.edex.plugin.npp -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.1174";visibility:=reexport, ucar.nc2;bundle-version="1.0.0";visibility:=reexport, - org.geotools;bundle-version="2.6.4", - org.apache.commons.lang;bundle-version="2.3.0" + org.geotools;bundle-version="2.6.4" Export-Package: com.raytheon.uf.edex.plugin.npp diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.redbook/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.redbook/META-INF/MANIFEST.MF index aca44efc8e..b43b639e08 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.redbook/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.redbook/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Redbook Plug-in Bundle-SymbolicName: com.raytheon.uf.edex.plugin.redbook -Bundle-Version: 1.15.0.qualifier +Bundle-Version: 1.15.1.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: com.raytheon.edex.common, javax.persistence, @@ -11,7 +11,7 @@ Require-Bundle: com.raytheon.edex.common, com.raytheon.uf.edex.ndm;bundle-version="1.14.0", com.raytheon.uf.edex.menus;bundle-version="1.0.0", com.raytheon.uf.common.dataplugin.redbook;bundle-version="1.14.0", - org.apache.commons.lang;bundle-version="2.3.0" + org.apache.commons.lang3;bundle-version="3.4.0" Export-Package: com.raytheon.uf.edex.plugin.redbook, com.raytheon.uf.edex.plugin.redbook.decoder Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.redbook/src/com/raytheon/uf/edex/plugin/redbook/ingest/RedbookNdmMenuSubscriber.java b/edexOsgi/com.raytheon.uf.edex.plugin.redbook/src/com/raytheon/uf/edex/plugin/redbook/ingest/RedbookNdmMenuSubscriber.java index 4d2104a999..4c082aa9a9 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.redbook/src/com/raytheon/uf/edex/plugin/redbook/ingest/RedbookNdmMenuSubscriber.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.redbook/src/com/raytheon/uf/edex/plugin/redbook/ingest/RedbookNdmMenuSubscriber.java @@ -25,7 +25,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/META-INF/MANIFEST.MF index bd61ea5495..4ec1b97bbd 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.satellite.mcidas/META-INF/MANIFEST.MF @@ -2,13 +2,12 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: McIDAS Satellite Plug-in Bundle-SymbolicName: com.raytheon.uf.edex.plugin.satellite.mcidas -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: Raytheon Require-Bundle: com.raytheon.edex.common, com.raytheon.uf.edex.decodertools;bundle-version="1.0.0", org.geotools, javax.measure, - org.apache.commons.lang, javax.persistence, com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0", com.raytheon.edex.plugin.satellite;bundle-version="1.12.1174" diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF index 57a6176c29..c93a486dc7 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Text Plug-in Bundle-SymbolicName: com.raytheon.uf.edex.plugin.text -Bundle-Version: 1.15.1.qualifier +Bundle-Version: 1.15.2.qualifier Bundle-Vendor: RAYTHEON -Require-Bundle: org.apache.commons.lang, +Require-Bundle: org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.edex.common, javax.persistence, com.raytheon.uf.common.serialization.comm, diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/AfosToAwipsDao.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/AfosToAwipsDao.java index 4c5c3c0f5d..1bb8c24041 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/AfosToAwipsDao.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/AfosToAwipsDao.java @@ -26,7 +26,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.Criteria; @@ -126,6 +126,7 @@ public class AfosToAwipsDao extends CoreDao { /** * @see org.hibernate.jdbc.Work#execute(java.sql.Connection) */ + @Override public void execute(Connection c) throws SQLException { PreparedStatement ps = null; rval = new AfosWmoIdDataContainer(); @@ -138,8 +139,10 @@ public class AfosToAwipsDao extends CoreDao { while (rs.next()) { AfosToAwips id = new AfosToAwips(); - // make sure that the afosid is 9 characters space-padded long - String afosid = String.format("%-9s", rs.getString(1).trim()); + // make sure that the afosid is 9 characters + // space-padded long + String afosid = String.format("%-9s", rs.getString(1) + .trim()); id.setAfosid(afosid); id.setWmottaaii(ttaaii); id.setWmocccc(cccc); @@ -208,6 +211,7 @@ public class AfosToAwipsDao extends CoreDao { /** * @see org.hibernate.jdbc.Work#execute(java.sql.Connection) */ + @Override public void execute(Connection c) throws SQLException { PreparedStatement ps = null; rval = new AfosWmoIdDataContainer(); @@ -306,6 +310,7 @@ public class AfosToAwipsDao extends CoreDao { * * @see org.hibernate.jdbc.Work#execute(java.sql.Connection) */ + @Override public void execute(Connection c) throws SQLException { PreparedStatement ps = null; String awipsId = "%" + nnn + xxx; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/StdTextProductDao.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/StdTextProductDao.java index b1b5874dd7..b565a03c55 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/StdTextProductDao.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/dao/StdTextProductDao.java @@ -37,7 +37,7 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.Criteria; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/ingest/AfosToAwipsListener.java b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/ingest/AfosToAwipsListener.java index cbeebab918..5f3874cef7 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/ingest/AfosToAwipsListener.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.text/src/com/raytheon/uf/edex/plugin/text/ingest/AfosToAwipsListener.java @@ -28,7 +28,7 @@ import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.dataplugin.text.AfosWmoIdDataContainer; import com.raytheon.uf.common.dataplugin.text.db.AfosToAwips; diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF index b51dee557e..80008552ab 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Registry Bundle-SymbolicName: com.raytheon.uf.edex.registry.ebxml -Bundle-Version: 1.14.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.uf.common.registry.schemas.ebxml;bundle-version="1.0.0", @@ -27,7 +27,7 @@ Require-Bundle: com.raytheon.uf.common.registry.schemas.ebxml;bundle-version="1. com.raytheon.uf.common.registry.ebxml, com.raytheon.uf.common.stats;bundle-version="1.0.0", com.raytheon.uf.common.registry.event;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.edex.database;bundle-version="1.0.0", com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", javax.mail;bundle-version="1.0.0", diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryRESTServices.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryRESTServices.java index dfca0b27b4..2a76db2af2 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryRESTServices.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/services/RegistryRESTServices.java @@ -29,7 +29,7 @@ import javax.xml.bind.JAXBException; import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType; -import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.cxf.clustering.FailoverFeature; import org.apache.cxf.clustering.SequentialStrategy; import org.apache.cxf.feature.Feature; diff --git a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/util/EbxmlExceptionUtil.java b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/util/EbxmlExceptionUtil.java index 67d470cfb2..498804d03e 100644 --- a/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/util/EbxmlExceptionUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/ebxml/util/EbxmlExceptionUtil.java @@ -36,7 +36,7 @@ import oasis.names.tc.ebxml.regrep.xsd.spi.v4.CatalogingExceptionType; import oasis.names.tc.ebxml.regrep.xsd.spi.v4.FilteringExceptionType; import oasis.names.tc.ebxml.regrep.xsd.spi.v4.ValidationExceptionType; -import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; import com.raytheon.uf.common.registry.constants.ErrorSeverity; import com.raytheon.uf.common.status.IUFStatusHandler; diff --git a/edexOsgi/com.raytheon.uf.edex.tafqueue/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.tafqueue/META-INF/MANIFEST.MF index 7323523e30..2af3f60324 100644 --- a/edexOsgi/com.raytheon.uf.edex.tafqueue/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.tafqueue/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Tafqueue Bundle-SymbolicName: com.raytheon.uf.edex.tafqueue -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.1174", @@ -11,7 +11,6 @@ Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.1174", com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", com.raytheon.uf.common.status;bundle-version="1.12.1174", javax.persistence;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", com.raytheon.uf.common.auth;bundle-version="1.12.1174", com.raytheon.uf.edex.auth;bundle-version="1.12.1174", com.raytheon.uf.common.plugin.nwsauth;bundle-version="1.12.1174" diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF index 4024bf9b55..e5d06ea227 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.wfs/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Wfs Bundle-SymbolicName: com.raytheon.uf.edex.wfs -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: org.geotools;bundle-version="2.6.4", @@ -12,7 +12,7 @@ Require-Bundle: org.geotools;bundle-version="2.6.4", org.codehaus.jackson;bundle-version="1.7.3", net.opengis;bundle-version="1.0.2", ogc.tools.gml;bundle-version="1.0.2", - org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.lang3;bundle-version="3.4.0", com.raytheon.uf.common.status;bundle-version="1.12.1174", com.raytheon.uf.edex.log;bundle-version="1.12.1174", com.raytheon.uf.common.localization;bundle-version="1.12.1174", diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java index 10932ea09a..4bad7bd849 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v1_1_0/QueryFilterVisitor.java @@ -35,7 +35,7 @@ import net.opengis.filter.v_1_1_0.PropertyIsNullType; import net.opengis.gml.v_3_1_1.AbstractGeometryType; import net.opengis.gml.v_3_1_1.EnvelopeType; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.geotools.geometry.jts.JTS; import org.hibernate.criterion.Conjunction; import org.hibernate.criterion.Criterion; @@ -73,474 +73,469 @@ import com.vividsolutions.jts.geom.Geometry; */ public class QueryFilterVisitor implements OgcFilterVisitor { - protected IUFStatusHandler log = UFStatus.getHandler(this.getClass()); + protected IUFStatusHandler log = UFStatus.getHandler(this.getClass()); - protected GeometryConverter geomConverter = new GeometryConverter(); + protected GeometryConverter geomConverter = new GeometryConverter(); - protected EnvelopeConverter envConverter = new EnvelopeConverter(); + protected EnvelopeConverter envConverter = new EnvelopeConverter(); - protected QueryExpressionVisitor exprVisitor = new QueryExpressionVisitor(); + protected QueryExpressionVisitor exprVisitor = new QueryExpressionVisitor(); - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#equal(com.raytheon.uf.edex - * .filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, - * java.lang.Object) - */ - @Override - public Criterion equal(ExpressionProcessor left, - ExpressionProcessor right, - boolean matchCase, Object obj) throws Exception { - VisitorBag bag = (VisitorBag) obj; - Entry e = getBinaryProps(left, right, bag); - return Restrictions.eq(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#equal(com.raytheon.uf.edex + * .filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, + * java.lang.Object) + */ + @Override + public Criterion equal(ExpressionProcessor left, ExpressionProcessor right, + boolean matchCase, Object obj) throws Exception { + VisitorBag bag = (VisitorBag) obj; + Entry e = getBinaryProps(left, right, bag); + return Restrictions.eq(e.getKey(), e.getValue()); + } - protected Entry getBinaryProps(ExpressionProcessor left, - ExpressionProcessor right, VisitorBag bag) throws Exception { - String prop = (String) left.accept(exprVisitor, bag); - String value = (String) right.accept(exprVisitor, bag); - Class ent = bag.getRootEntity(); - String[] path = parseProp(prop); - String field = StringUtils.join(path, "."); - String entityField = bag.filterField(field); - if (!field.equals(entityField)) { - path = entityField.split("\\."); - } + protected Entry getBinaryProps(ExpressionProcessor left, + ExpressionProcessor right, VisitorBag bag) throws Exception { + String prop = (String) left.accept(exprVisitor, bag); + String value = (String) right.accept(exprVisitor, bag); + Class ent = bag.getRootEntity(); + String[] path = parseProp(prop); + String field = StringUtils.join(path, "."); + String entityField = bag.filterField(field); + if (!field.equals(entityField)) { + path = entityField.split("\\."); + } Object val = ConvertService.get().convertAsType(value, ent, path); - return new SimpleEntry(entityField, val); - } + return new SimpleEntry(entityField, val); + } - protected String[] parseProp(String prop) { - // TODO we may want to keep the namespaces - String[] rval = prop.trim().split("\\/"); - for (int i = 0; i < rval.length; ++i) { - int index = rval[i].lastIndexOf(':'); - if (index > -1) { - rval[i] = rval[i].substring(index + 1); - } - } - return rval; - } + protected String[] parseProp(String prop) { + // TODO we may want to keep the namespaces + String[] rval = prop.trim().split("\\/"); + for (int i = 0; i < rval.length; ++i) { + int index = rval[i].lastIndexOf(':'); + if (index > -1) { + rval[i] = rval[i].substring(index + 1); + } + } + return rval; + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#notEqual(com.raytheon.uf - * .edex.filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, - * java.lang.Object) - */ - @Override - public Criterion notEqual(ExpressionProcessor left, - ExpressionProcessor right, - boolean matchCase, Object obj) throws Exception { - VisitorBag bag = (VisitorBag) obj; - Entry e = getBinaryProps(left, right, bag); - return Restrictions.ne(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#notEqual(com.raytheon.uf + * .edex.filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, + * java.lang.Object) + */ + @Override + public Criterion notEqual(ExpressionProcessor left, + ExpressionProcessor right, boolean matchCase, Object obj) + throws Exception { + VisitorBag bag = (VisitorBag) obj; + Entry e = getBinaryProps(left, right, bag); + return Restrictions.ne(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#lessThan(com.raytheon.uf - * .edex.filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, - * java.lang.Object) - */ - @Override - public Criterion lessThan(ExpressionProcessor left, - ExpressionProcessor right, - boolean matchCase, Object obj) throws Exception { - VisitorBag bag = (VisitorBag) obj; - Entry e = getBinaryProps(left, right, bag); - return Restrictions.lt(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#lessThan(com.raytheon.uf + * .edex.filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, + * java.lang.Object) + */ + @Override + public Criterion lessThan(ExpressionProcessor left, + ExpressionProcessor right, boolean matchCase, Object obj) + throws Exception { + VisitorBag bag = (VisitorBag) obj; + Entry e = getBinaryProps(left, right, bag); + return Restrictions.lt(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#greaterThan(com.raytheon - * .uf.edex.filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, - * java.lang.Object) - */ - @Override - public Criterion greaterThan(ExpressionProcessor left, - ExpressionProcessor right, boolean matchCase, Object obj) - throws Exception { - VisitorBag bag = (VisitorBag) obj; - Entry e = getBinaryProps(left, right, bag); - return Restrictions.gt(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#greaterThan(com.raytheon + * .uf.edex.filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, + * java.lang.Object) + */ + @Override + public Criterion greaterThan(ExpressionProcessor left, + ExpressionProcessor right, boolean matchCase, Object obj) + throws Exception { + VisitorBag bag = (VisitorBag) obj; + Entry e = getBinaryProps(left, right, bag); + return Restrictions.gt(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#greaterThanEqual(com.raytheon - * .uf.edex.filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, - * java.lang.Object) - */ - @Override - public Criterion greaterThanEqual(ExpressionProcessor left, - ExpressionProcessor right, boolean matchCase, Object obj) - throws Exception { - VisitorBag bag = (VisitorBag) obj; - Entry e = getBinaryProps(left, right, bag); - return Restrictions.ge(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#greaterThanEqual(com.raytheon + * .uf.edex.filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, + * java.lang.Object) + */ + @Override + public Criterion greaterThanEqual(ExpressionProcessor left, + ExpressionProcessor right, boolean matchCase, Object obj) + throws Exception { + VisitorBag bag = (VisitorBag) obj; + Entry e = getBinaryProps(left, right, bag); + return Restrictions.ge(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#lessThanEqual(com.raytheon - * .uf.edex.filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, - * java.lang.Object) - */ - @Override - public Criterion lessThanEqual(ExpressionProcessor left, - ExpressionProcessor right, boolean matchCase, Object obj) - throws Exception { - VisitorBag bag = (VisitorBag) obj; - Entry e = getBinaryProps(left, right, bag); - return Restrictions.le(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#lessThanEqual(com.raytheon + * .uf.edex.filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, boolean, + * java.lang.Object) + */ + @Override + public Criterion lessThanEqual(ExpressionProcessor left, + ExpressionProcessor right, boolean matchCase, Object obj) + throws Exception { + VisitorBag bag = (VisitorBag) obj; + Entry e = getBinaryProps(left, right, bag); + return Restrictions.le(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#isLike(net.opengis.filter - * .v_1_1_0.PropertyIsLikeType, java.lang.Object) - */ - @Override - public Criterion isLike(PropertyIsLikeType op, Object obj) - throws Exception { - // FIXME this is not correct, needs to take wildcard, anychar and - // escapes into account - VisitorBag bag = (VisitorBag) obj; - String prop = (String) op.getPropertyName().getContent().get(0); - String value = (String) op.getLiteral().getContent().get(0); - return Restrictions.like(bag.filterField(prop), value, - MatchMode.ANYWHERE); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#isLike(net.opengis.filter + * .v_1_1_0.PropertyIsLikeType, java.lang.Object) + */ + @Override + public Criterion isLike(PropertyIsLikeType op, Object obj) throws Exception { + // FIXME this is not correct, needs to take wildcard, anychar and + // escapes into account + VisitorBag bag = (VisitorBag) obj; + String prop = (String) op.getPropertyName().getContent().get(0); + String value = (String) op.getLiteral().getContent().get(0); + return Restrictions.like(bag.filterField(prop), value, + MatchMode.ANYWHERE); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#isNull(net.opengis.filter - * .v_1_1_0.PropertyIsNullType, java.lang.Object) - */ - @Override - public Criterion isNull(PropertyIsNullType op, Object obj) - throws Exception { - VisitorBag bag = (VisitorBag) obj; - String field = (String) op.getPropertyName().getContent().get(0); - return Restrictions.isNull(bag.filterField(field)); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#isNull(net.opengis.filter + * .v_1_1_0.PropertyIsNullType, java.lang.Object) + */ + @Override + public Criterion isNull(PropertyIsNullType op, Object obj) throws Exception { + VisitorBag bag = (VisitorBag) obj; + String field = (String) op.getPropertyName().getContent().get(0); + return Restrictions.isNull(bag.filterField(field)); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#between(com.raytheon.uf. - * edex.filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, - * com.raytheon.uf.edex.filter.ExpressionProcessor, java.lang.Object) - */ - @Override - public Criterion between(ExpressionProcessor lower, - ExpressionProcessor exp, - ExpressionProcessor upper, Object obj) throws Exception { - VisitorBag bag = (VisitorBag) obj; + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#between(com.raytheon.uf. + * edex.filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, + * com.raytheon.uf.edex.filter.ExpressionProcessor, java.lang.Object) + */ + @Override + public Criterion between(ExpressionProcessor lower, + ExpressionProcessor exp, ExpressionProcessor upper, Object obj) + throws Exception { + VisitorBag bag = (VisitorBag) obj; - Entry lowerPart = getBinaryProps(exp, lower, bag); - Entry upperPart = getBinaryProps(exp, upper, bag); + Entry lowerPart = getBinaryProps(exp, lower, bag); + Entry upperPart = getBinaryProps(exp, upper, bag); - return Restrictions.between(lowerPart.getKey(), lowerPart.getValue(), - upperPart.getValue()); - } + return Restrictions.between(lowerPart.getKey(), lowerPart.getValue(), + upperPart.getValue()); + } - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.edex.filter.OgcFilterVisitor#and(java.util.List, - * java.lang.Object) - */ - @Override - public Criterion and(List filters, Object obj) - throws Exception { - Conjunction rval = Restrictions.conjunction(); - acceptAll(filters, obj, rval); - return rval; - } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.filter.OgcFilterVisitor#and(java.util.List, + * java.lang.Object) + */ + @Override + public Criterion and(List filters, Object obj) + throws Exception { + Conjunction rval = Restrictions.conjunction(); + acceptAll(filters, obj, rval); + return rval; + } - protected void acceptAll(List filters, Object obj, - Junction junc) throws Exception { - Iterator i = filters.iterator(); - while (i.hasNext()) { - junc.add((Criterion) i.next().accept(this, obj)); - } - } + protected void acceptAll(List filters, Object obj, + Junction junc) throws Exception { + Iterator i = filters.iterator(); + while (i.hasNext()) { + junc.add((Criterion) i.next().accept(this, obj)); + } + } - protected List addAll(List l1, List l2) { - if (l1 == null) { - return l2; - } - if (l2 == null) { - return l1; - } - ArrayList rval = new ArrayList(l1.size() + l2.size()); - rval.addAll(l1); - rval.addAll(l2); - return rval; - } + protected List addAll(List l1, List l2) { + if (l1 == null) { + return l2; + } + if (l2 == null) { + return l1; + } + ArrayList rval = new ArrayList(l1.size() + l2.size()); + rval.addAll(l1); + rval.addAll(l2); + return rval; + } - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.edex.filter.OgcFilterVisitor#or(java.util.List, - * java.lang.Object) - */ - @Override - public Criterion or(List filters, Object obj) - throws Exception { - Disjunction rval = Restrictions.disjunction(); - acceptAll(filters, obj, rval); - return rval; - } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.edex.filter.OgcFilterVisitor#or(java.util.List, + * java.lang.Object) + */ + @Override + public Criterion or(List filters, Object obj) + throws Exception { + Disjunction rval = Restrictions.disjunction(); + acceptAll(filters, obj, rval); + return rval; + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#not(com.raytheon.uf.edex - * .filter.FilterProcessor, java.lang.Object) - */ - @Override - public Criterion not(FilterProcessor filter, Object obj) throws Exception { - return Restrictions.not((Criterion) filter.accept(this, obj)); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#not(com.raytheon.uf.edex + * .filter.FilterProcessor, java.lang.Object) + */ + @Override + public Criterion not(FilterProcessor filter, Object obj) throws Exception { + return Restrictions.not((Criterion) filter.accept(this, obj)); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#spatialEquals(net.opengis - * .filter.v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion spatialEquals(BinarySpatialOpType op, Object obj) - throws Exception { - VisitorBag bag = (VisitorBag) obj; - Entry e = getBinarySpatial(op, bag); - return SpatialRestrictions.eq(bag.filterField(e.getKey()), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#spatialEquals(net.opengis + * .filter.v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion spatialEquals(BinarySpatialOpType op, Object obj) + throws Exception { + VisitorBag bag = (VisitorBag) obj; + Entry e = getBinarySpatial(op, bag); + return SpatialRestrictions + .eq(bag.filterField(e.getKey()), e.getValue()); + } + protected Entry getBinarySpatial( + BinarySpatialOpType binary, VisitorBag bag) throws Exception { + List lst = binary.getPropertyName().getContent(); + String str = getStringWarn(lst, "Unsupported property name type"); + String prop = StringUtils.join(parseProp(str), '.'); + Geometry shape = getGeometry(binary); + return new SimpleEntry(bag.filterField(prop), shape); + } - protected Entry getBinarySpatial( - BinarySpatialOpType binary, VisitorBag bag) throws Exception { - List lst = binary.getPropertyName().getContent(); - String str = getStringWarn(lst, "Unsupported property name type"); - String prop = StringUtils.join(parseProp(str), '.'); - Geometry shape = getGeometry(binary); - return new SimpleEntry(bag.filterField(prop), shape); - } + protected Geometry getGeometry(BinarySpatialOpType binary) throws Exception { + JAXBElement env = binary.getEnvelope(); + JAXBElement geom = binary.getGeometry(); + Geometry shape; + if (env != null && !env.isNil()) { + Envelope envelope = envConverter.convert(env.getValue()); + shape = geomConverter.convert(envelope); + } else if (geom != null && !geom.isNil()) { + shape = geomConverter.convert(geom.getValue()); + } else { + throw new Exception("Unsupported geometry format"); + } + return shape; + } - protected Geometry getGeometry(BinarySpatialOpType binary) throws Exception { - JAXBElement env = binary.getEnvelope(); - JAXBElement geom = binary.getGeometry(); - Geometry shape; - if (env != null && !env.isNil()) { - Envelope envelope = envConverter.convert(env.getValue()); - shape = geomConverter.convert(envelope); - } else if (geom != null && !geom.isNil()) { - shape = geomConverter.convert(geom.getValue()); - } else { - throw new Exception("Unsupported geometry format"); - } - return shape; - } + protected String getStringWarn(List lst, String msg) { + if (lst.size() != 1) { + log.warn(msg); + } + return (String) lst.get(0); + } - protected String getStringWarn(List lst, String msg) { - if (lst.size() != 1) { - log.warn(msg); - } - return (String) lst.get(0); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#disjoint(net.opengis.filter + * .v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion disjoint(BinarySpatialOpType op, Object obj) + throws Exception { + Entry e = getBinarySpatial(op, (VisitorBag) obj); + return SpatialRestrictions.disjoint(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#disjoint(net.opengis.filter - * .v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion disjoint(BinarySpatialOpType op, Object obj) - throws Exception { - Entry e = getBinarySpatial(op, (VisitorBag) obj); - return SpatialRestrictions.disjoint(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#touches(net.opengis.filter + * .v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion touches(BinarySpatialOpType op, Object obj) + throws Exception { + Entry e = getBinarySpatial(op, (VisitorBag) obj); + return SpatialRestrictions.touches(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#touches(net.opengis.filter - * .v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion touches(BinarySpatialOpType op, Object obj) - throws Exception { - Entry e = getBinarySpatial(op, (VisitorBag) obj); - return SpatialRestrictions.touches(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#within(net.opengis.filter + * .v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion within(BinarySpatialOpType op, Object obj) + throws Exception { + Entry e = getBinarySpatial(op, (VisitorBag) obj); + return SpatialRestrictions.within(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#within(net.opengis.filter - * .v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion within(BinarySpatialOpType op, Object obj) - throws Exception { - Entry e = getBinarySpatial(op, (VisitorBag) obj); - return SpatialRestrictions.within(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#overlaps(net.opengis.filter + * .v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion overlaps(BinarySpatialOpType op, Object obj) + throws Exception { + Entry e = getBinarySpatial(op, (VisitorBag) obj); + return SpatialRestrictions.overlaps(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#overlaps(net.opengis.filter - * .v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion overlaps(BinarySpatialOpType op, Object obj) - throws Exception { - Entry e = getBinarySpatial(op, (VisitorBag) obj); - return SpatialRestrictions.overlaps(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#crosses(net.opengis.filter + * .v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion crosses(BinarySpatialOpType op, Object obj) + throws Exception { + Entry e = getBinarySpatial(op, (VisitorBag) obj); + return SpatialRestrictions.crosses(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#crosses(net.opengis.filter - * .v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion crosses(BinarySpatialOpType op, Object obj) - throws Exception { - Entry e = getBinarySpatial(op, (VisitorBag) obj); - return SpatialRestrictions.crosses(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#intersects(net.opengis.filter + * .v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion intersects(BinarySpatialOpType op, Object obj) + throws Exception { + Entry e = getBinarySpatial(op, (VisitorBag) obj); + return SpatialRestrictions.intersects(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#intersects(net.opengis.filter - * .v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion intersects(BinarySpatialOpType op, Object obj) - throws Exception { - Entry e = getBinarySpatial(op, (VisitorBag) obj); - return SpatialRestrictions.intersects(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#contains(net.opengis.filter + * .v_1_1_0.BinarySpatialOpType, java.lang.Object) + */ + @Override + public Criterion contains(BinarySpatialOpType op, Object obj) + throws Exception { + Entry e = getBinarySpatial(op, (VisitorBag) obj); + return SpatialRestrictions.contains(e.getKey(), e.getValue()); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#contains(net.opengis.filter - * .v_1_1_0.BinarySpatialOpType, java.lang.Object) - */ - @Override - public Criterion contains(BinarySpatialOpType op, Object obj) - throws Exception { - Entry e = getBinarySpatial(op, (VisitorBag) obj); - return SpatialRestrictions.contains(e.getKey(), e.getValue()); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#dWithin(net.opengis.filter + * .v_1_1_0.DistanceBufferType, java.lang.Object) + */ + @Override + public Object dWithin(DistanceBufferType op, Object obj) throws Exception { + throw new Exception("dWithin queries not supported"); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#dWithin(net.opengis.filter - * .v_1_1_0.DistanceBufferType, java.lang.Object) - */ - @Override - public Object dWithin(DistanceBufferType op, Object obj) - throws Exception { - throw new Exception("dWithin queries not supported"); - } + // public RangeParameter getDistance(DistanceBufferType dist, RangeOperand + // op, + // VisitorBag bag) throws Exception { + // List lst = dist.getPropertyName().getContent(); + // String str = getStringWarn(lst, "Unsupported property name type"); + // String prop = StringUtils.join(parseProp(str), '.'); + // AbstractGeometryType geom = dist.getGeometry().getValue(); + // Geometry res = geomConverter.convert(geom); + // if (!(res instanceof Point)) { + // throw new Exception("Unsupported distance geometry" + // + res.getClass()); + // } + // double distance = 0;// FIXME jaxb classes do not contain distance value + // RangeParameter param = new RangeParameter(prop, (Point) res, distance, + // op); + // throw new Exception("Distance types not supported"); + // // return rval; + // } - // public RangeParameter getDistance(DistanceBufferType dist, RangeOperand - // op, - // VisitorBag bag) throws Exception { - // List lst = dist.getPropertyName().getContent(); - // String str = getStringWarn(lst, "Unsupported property name type"); - // String prop = StringUtils.join(parseProp(str), '.'); - // AbstractGeometryType geom = dist.getGeometry().getValue(); - // Geometry res = geomConverter.convert(geom); - // if (!(res instanceof Point)) { - // throw new Exception("Unsupported distance geometry" - // + res.getClass()); - // } - // double distance = 0;// FIXME jaxb classes do not contain distance value - // RangeParameter param = new RangeParameter(prop, (Point) res, distance, - // op); - // throw new Exception("Distance types not supported"); - // // return rval; - // } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#beyond(net.opengis.filter + * .v_1_1_0.DistanceBufferType, java.lang.Object) + */ + @Override + public Object beyond(DistanceBufferType op, Object obj) throws Exception { + throw new Exception("Beyond queries not supported"); + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#beyond(net.opengis.filter - * .v_1_1_0.DistanceBufferType, java.lang.Object) - */ - @Override - public Object beyond(DistanceBufferType op, Object obj) - throws Exception { - throw new Exception("Beyond queries not supported"); - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.filter.OgcFilterVisitor#bbox(net.opengis.filter. - * v_1_1_0.BBOXType, java.lang.Object) - */ - @Override - public Criterion bbox(BBOXType op, Object obj) throws Exception { - VisitorBag bag = (VisitorBag) obj; - List lst = op.getPropertyName().getContent(); - String str = getStringWarn(lst, "Unsupported property name type"); - String prop = StringUtils.join(parseProp(str), '.'); - EnvelopeType value = op.getEnvelope().getValue(); - Envelope env = envConverter.convert(value); - return SpatialRestrictions.within(bag.filterField(prop), - JTS.toGeometry(env)); - } + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.edex.filter.OgcFilterVisitor#bbox(net.opengis.filter. + * v_1_1_0.BBOXType, java.lang.Object) + */ + @Override + public Criterion bbox(BBOXType op, Object obj) throws Exception { + VisitorBag bag = (VisitorBag) obj; + List lst = op.getPropertyName().getContent(); + String str = getStringWarn(lst, "Unsupported property name type"); + String prop = StringUtils.join(parseProp(str), '.'); + EnvelopeType value = op.getEnvelope().getValue(); + Envelope env = envConverter.convert(value); + return SpatialRestrictions.within(bag.filterField(prop), + JTS.toGeometry(env)); + } /* * (non-Javadoc) diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java index 1284eaeade..ce537a8ba7 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/AbstractQueryFilterVisitor.java @@ -29,7 +29,7 @@ import net.opengis.gml.v_3_2_1.TimeInstantType; import net.opengis.gml.v_3_2_1.TimePeriodType; import net.opengis.gml.v_3_2_1.TimePositionType; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Junction; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -84,13 +84,14 @@ public abstract class AbstractQueryFilterVisitor implements IFilter2Visitor { */ protected Operand getBinaryProps(ExpressionProcessor left, ExpressionProcessor right, VisitorBag bag) throws Exception { - + OpField field = getRef(left, bag); - //If the field is explicitly ignored in the filter, return null so it is not processed further - if(field.value == null) { + // If the field is explicitly ignored in the filter, return null so it + // is not processed further + if (field.value == null) { return null; } - + Object value = right.accept(exprVisitor, bag); if (!field.sql) { @@ -161,8 +162,8 @@ public abstract class AbstractQueryFilterVisitor implements IFilter2Visitor { Junction junc) throws Exception { Iterator i = filters.iterator(); while (i.hasNext()) { - Criterion crit = (Criterion)i.next().accept(this, obj); - if(crit != null) { + Criterion crit = (Criterion) i.next().accept(this, obj); + if (crit != null) { junc.add(crit); } } diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java index 04173e5c5c..7d7954c7a1 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/filter/v2_0_0/QueryExpressionVisitor.java @@ -22,7 +22,7 @@ package com.raytheon.uf.edex.wfs.filter.v2_0_0; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; diff --git a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java index 7f395b031f..71b624a703 100644 --- a/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java +++ b/edexOsgi/com.raytheon.uf.edex.wfs/src/com/raytheon/uf/edex/wfs/reg/WfsRegistryImpl.java @@ -35,7 +35,7 @@ import javax.xml.parsers.ParserConfigurationException; import net.opengis.gml.v_3_1_1.ObjectFactory; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; import org.w3c.dom.Node; import com.raytheon.uf.common.serialization.MarshalOptions; @@ -73,12 +73,12 @@ public class WfsRegistryImpl implements IWfsRegistry { protected final Map byKey = new HashMap(); - protected final Map byFeature = new HashMap(); + protected final Map byFeature = new HashMap(); - protected final Map byAlias = new HashMap(); - - protected Class[] jaxbClasses = new Class[] { ObjectFactory.class, - net.opengis.wfs.v_1_1_0.ObjectFactory.class, + protected final Map byAlias = new HashMap(); + + protected Class[] jaxbClasses = new Class[] { ObjectFactory.class, + net.opengis.wfs.v_1_1_0.ObjectFactory.class, net.opengis.filter.v_1_1_0.ObjectFactory.class, org.w3.xmlschema.ObjectFactory.class, Unique.class, net.opengis.wfs.v_2_0_0.ObjectFactory.class, @@ -96,13 +96,13 @@ public class WfsRegistryImpl implements IWfsRegistry { protected volatile OgcJaxbManager jaxbManager; - protected final IUFStatusHandler log = UFStatus.getHandler(this.getClass()); + protected final IUFStatusHandler log = UFStatus.getHandler(this.getClass()); protected volatile long currentVersion = 0; - protected volatile long jaxbContextVersion = 0; + protected volatile long jaxbContextVersion = 0; - protected String prefix = "wfs"; + protected String prefix = "wfs"; protected final ReadWriteLock lock = new ReentrantReadWriteLock(); @@ -112,14 +112,14 @@ public class WfsRegistryImpl implements IWfsRegistry { protected String path; - static { - NS_MAP.put(OgcNamespace.EDEX, OgcPrefix.EDEX); - NS_MAP.put(OgcNamespace.GML, OgcPrefix.GML); - NS_MAP.put(OgcNamespace.OGC, OgcPrefix.OGC); - NS_MAP.put(OgcNamespace.OWS, OgcPrefix.OWS); - NS_MAP.put(OgcNamespace.WFS, OgcPrefix.WFS); - NS_MAP.put(OgcNamespace.XSI, OgcPrefix.XSI); - NS_MAP.put(OgcNamespace.XLINK, OgcPrefix.XLINK); + static { + NS_MAP.put(OgcNamespace.EDEX, OgcPrefix.EDEX); + NS_MAP.put(OgcNamespace.GML, OgcPrefix.GML); + NS_MAP.put(OgcNamespace.OGC, OgcPrefix.OGC); + NS_MAP.put(OgcNamespace.OWS, OgcPrefix.OWS); + NS_MAP.put(OgcNamespace.WFS, OgcPrefix.WFS); + NS_MAP.put(OgcNamespace.XSI, OgcPrefix.XSI); + NS_MAP.put(OgcNamespace.XLINK, OgcPrefix.XLINK); NS_MAP.put(OgcNamespace.SMIL, OgcPrefix.SMIL); NS_MAP.put(OgcNamespace.OWS110, OgcPrefix.OWS + "11"); NS_MAP.put(OgcNamespace.WFS20, OgcPrefix.WFS + "2"); @@ -135,12 +135,12 @@ public class WfsRegistryImpl implements IWfsRegistry { NS_MAP.put(OgcNamespace.WSA, OgcPrefix.WSA); NS_MAP.put(OgcNamespace.OWSNT, OgcPrefix.OWSNT); NS_MAP.put(OgcNamespace.NAWX15, OgcPrefix.NAWX); - } + } public WfsRegistryImpl(String port, String path) { this.port = port; this.path = path; - } + } /* * (non-Javadoc) @@ -149,23 +149,23 @@ public class WfsRegistryImpl implements IWfsRegistry { * com.raytheon.uf.edex.wfs.reg.WfsRegistry#register(com.raytheon.uf.edex * .wfs.reg.WfsSource) */ - @Override + @Override public IWfsRegistry register(final IWfsSource source) - throws RegistryException { + throws RegistryException { Lock write = lock.writeLock(); write.lock(); try { addByKey(source); addByFeature(source); addByAlias(source); - jaxbClasses = (Class[]) ArrayUtils.addAll(jaxbClasses, + jaxbClasses = ArrayUtils.addAll(jaxbClasses, source.getJaxbClasses()); currentVersion++; } finally { write.unlock(); } - return this; - } + return this; + } /** * @return @@ -189,17 +189,17 @@ public class WfsRegistryImpl implements IWfsRegistry { write.unlock(); } } - return jaxbManager; - } + return jaxbManager; + } /** * @param xml * @return * @throws JAXBException */ - public Object unmarshal(String xml) throws JAXBException { + public Object unmarshal(String xml) throws JAXBException { return getManager().unmarshalFromXml(xml); - } + } public Object unmarshal(Node node) throws JAXBException { return getManager().unmarshal(node); @@ -221,9 +221,9 @@ public class WfsRegistryImpl implements IWfsRegistry { * @return * @throws JAXBException */ - public String marshal(Object obj) throws JAXBException { + public String marshal(Object obj) throws JAXBException { return getManager().marshalToXml(obj, MarshalOptions.UNFORMATTED); - } + } public String marshal(Object obj, boolean fragment) throws JAXBException { MarshalOptions options = new MarshalOptions(false, fragment); @@ -235,7 +235,8 @@ public class WfsRegistryImpl implements IWfsRegistry { return getManager().marshalToNode(obj); } - public String marshal(Object obj, MarshalOptions options) throws JAXBException { + public String marshal(Object obj, MarshalOptions options) + throws JAXBException { return getManager().marshalToXml(obj, options); } @@ -256,14 +257,14 @@ public class WfsRegistryImpl implements IWfsRegistry { * @param source * @throws RegistryException */ - protected void addByKey(IWfsSource source) throws RegistryException { - String key = source.getKey(); - if (byKey.containsKey(key)) { - throw new RegistryException("WFS Source already exists with key: " - + key); - } - byKey.put(source.getKey(), source); - } + protected void addByKey(IWfsSource source) throws RegistryException { + String key = source.getKey(); + if (byKey.containsKey(key)) { + throw new RegistryException("WFS Source already exists with key: " + + key); + } + byKey.put(source.getKey(), source); + } /** * Catalog source by provided feature types @@ -271,13 +272,13 @@ public class WfsRegistryImpl implements IWfsRegistry { * @param source * @throws RegistryException */ - protected void addByFeature(IWfsSource source) throws RegistryException { - for (WfsFeatureType f : source.listFeatureTypes()) { - QualifiedName feature = f.getName(); - if (byFeature.containsKey(feature)) { - throw new RegistryException( - "Already providing a feature with name: " + feature); - } + protected void addByFeature(IWfsSource source) throws RegistryException { + for (WfsFeatureType f : source.listFeatureTypes()) { + QualifiedName feature = f.getName(); + if (byFeature.containsKey(feature)) { + throw new RegistryException( + "Already providing a feature with name: " + feature); + } String prefix = NS_MAP.get(feature.getNamespace()); if (prefix == null) { prefix = (feature.getPrefix() != null @@ -286,11 +287,11 @@ public class WfsRegistryImpl implements IWfsRegistry { NS_MAP.put(feature.getNamespace(), prefix); } - byFeature.put(f.getName(), source); - } - } - - protected void addByAlias(IWfsSource source) throws RegistryException { + byFeature.put(f.getName(), source); + } + } + + protected void addByAlias(IWfsSource source) throws RegistryException { for (WfsFeatureType f : source.getAliases()) { QualifiedName feature = f.getName(); if (byAlias.containsKey(feature)) { @@ -314,17 +315,17 @@ public class WfsRegistryImpl implements IWfsRegistry { * * @param source */ - protected void removeAll(IWfsSource source) { - IWfsSource removed = byKey.remove(source.getKey()); - if (removed != null) { - for (WfsFeatureType f : removed.listFeatureTypes()) { - byFeature.remove(f.getName()); - } - for (WfsFeatureType f : removed.getAliases()) { + protected void removeAll(IWfsSource source) { + IWfsSource removed = byKey.remove(source.getKey()); + if (removed != null) { + for (WfsFeatureType f : removed.listFeatureTypes()) { + byFeature.remove(f.getName()); + } + for (WfsFeatureType f : removed.getAliases()) { byAlias.remove(f.getName()); } - } - } + } + } /* * (non-Javadoc) @@ -333,8 +334,8 @@ public class WfsRegistryImpl implements IWfsRegistry { * com.raytheon.uf.edex.wfs.reg.WfsRegistry#unregister(com.raytheon.uf.edex * .wfs.reg.WfsSource) */ - @Override - public synchronized IWfsRegistry unregister(IWfsSource source) { + @Override + public synchronized IWfsRegistry unregister(IWfsSource source) { Lock write = lock.writeLock(); write.lock(); try { @@ -343,7 +344,7 @@ public class WfsRegistryImpl implements IWfsRegistry { write.unlock(); } return this; - } + } /** * Look up source by feature type @@ -352,28 +353,29 @@ public class WfsRegistryImpl implements IWfsRegistry { * @return * @throws WfsException */ - public IWfsSource getSource(QualifiedName feature) throws WfsException { + public IWfsSource getSource(QualifiedName feature) throws WfsException { Lock read = lock.readLock(); read.lock(); try { IWfsSource source = byFeature.get(feature); - if(source == null) { - //If a standard feature is not found see if it is an alias + if (source == null) { + // If a standard feature is not found see if it is an alias source = byAlias.get(feature); } return source; } finally { read.unlock(); } - } + } /** - * Get a list of all available feature types, no aliases should be advertised + * Get a list of all available feature types, no aliases should be + * advertised * * @return */ - public List getFeatures() { - List rval = new LinkedList(); + public List getFeatures() { + List rval = new LinkedList(); Lock read = lock.readLock(); read.lock(); try { @@ -384,22 +386,22 @@ public class WfsRegistryImpl implements IWfsRegistry { read.unlock(); } return rval; - } + } - /** - * @return the prefix - */ - public String getPrefix() { - return prefix; - } + /** + * @return the prefix + */ + public String getPrefix() { + return prefix; + } - /** - * @param prefix - * the prefix to set - */ - public void setPrefix(String prefix) { - this.prefix = prefix; - } + /** + * @param prefix + * the prefix to set + */ + public void setPrefix(String prefix) { + this.prefix = prefix; + } /* * (non-Javadoc) diff --git a/edexOsgi/gov.noaa.nws.sr.oun.dataplugin.mping/META-INF/MANIFEST.MF b/edexOsgi/gov.noaa.nws.sr.oun.dataplugin.mping/META-INF/MANIFEST.MF index 5ea0a48c47..9ee85f4584 100644 --- a/edexOsgi/gov.noaa.nws.sr.oun.dataplugin.mping/META-INF/MANIFEST.MF +++ b/edexOsgi/gov.noaa.nws.sr.oun.dataplugin.mping/META-INF/MANIFEST.MF @@ -2,14 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Mping Bundle-SymbolicName: gov.noaa.nws.sr.oun.dataplugin.mping -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.15.0.qualifier Bundle-Vendor: NWS OUN Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", com.raytheon.uf.common.serialization;bundle-version="1.12.1174", com.raytheon.edex.common;bundle-version="1.12.1174", javax.persistence;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0", javax.measure;bundle-version="1.0.0", com.raytheon.uf.common.pointdata, com.raytheon.uf.edex.pointdata, diff --git a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/META-INF/MANIFEST.MF b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/META-INF/MANIFEST.MF index 4ba2227cec..4f34943dd4 100644 --- a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/META-INF/MANIFEST.MF +++ b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/META-INF/MANIFEST.MF @@ -2,14 +2,13 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: regionalsat Bundle-SymbolicName: gov.noaa.nws.ost.edex.plugin.regionalsat -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.15.0.qualifier Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization Bundle-Vendor: NWS Require-Bundle: com.raytheon.edex.common, com.raytheon.uf.edex.decodertools;bundle-version="1.0.0", org.geotools, javax.measure, - org.apache.commons.lang, javax.persistence, com.raytheon.edex.plugin.satellite, ucar.nc2;bundle-version="1.0.0"