diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/META-INF/MANIFEST.MF index 9a6c2b0167..9569f9cbee 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/META-INF/MANIFEST.MF @@ -2,9 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Grid Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.grid -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.13.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization Export-Package: com.raytheon.uf.common.dataplugin.grid, com.raytheon.uf.common.dataplugin.grid.dataquery, @@ -14,22 +15,22 @@ Export-Package: com.raytheon.uf.common.dataplugin.grid, com.raytheon.uf.common.dataplugin.grid.request, com.raytheon.uf.common.dataplugin.grid.units, com.raytheon.uf.common.dataplugin.grid.util -Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", - com.raytheon.uf.common.gridcoverage;bundle-version="1.0.0";visibility:=reexport, - com.raytheon.uf.common.parameter;bundle-version="1.0.0";visibility:=reexport, - com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174";visibility:=reexport, - com.raytheon.uf.common.serialization;bundle-version="1.12.1174", +Require-Bundle: com.raytheon.uf.common.dataplugin, + com.raytheon.uf.common.gridcoverage;visibility:=reexport, + com.raytheon.uf.common.parameter;visibility:=reexport, + com.raytheon.uf.common.dataplugin.level;visibility:=reexport, + com.raytheon.uf.common.serialization, com.raytheon.uf.common.geospatial, com.raytheon.uf.common.localization, com.raytheon.uf.common.datastorage, - com.raytheon.uf.common.comm;bundle-version="1.12.1174", - com.raytheon.uf.common.dataquery;bundle-version="1.0.0", - com.raytheon.uf.common.util;bundle-version="1.12.1174", - com.raytheon.uf.common.dataaccess;bundle-version="1.0.0", - com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", - com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.common.comm, + com.raytheon.uf.common.dataquery, + com.raytheon.uf.common.util, + com.raytheon.uf.common.dataaccess, + com.raytheon.uf.common.serialization.comm, + com.raytheon.uf.common.status, + com.raytheon.uf.common.style, + org.apache.commons.beanutils, javax.measure, - javax.persistence;bundle-version="1.0.0", - org.hibernate;bundle-version="1.0.0" -Import-Package: com.raytheon.uf.common.style, - com.raytheon.uf.common.style.level + javax.persistence, + org.hibernate diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java index 13701da938..5e37c83a82 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridRecord.java @@ -35,7 +35,6 @@ import javax.persistence.UniqueConstraint; import org.hibernate.annotations.Index; -import com.raytheon.uf.common.dataplugin.IDecoderGettable; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.level.Level; @@ -59,15 +58,16 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * May 21, 2012 bsteffen Initial creation - * Apr 04, 2013 1846 bkowal Added an index on refTime and - * forecastTime - * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. - * May 07, 2013 1869 bsteffen Remove dataURI column from - * PluginDataObject. - * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * May 21, 2012 bsteffen Initial creation + * Apr 04, 2013 1846 bkowal Added an index on refTime and + * forecastTime + * Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation. + * May 07, 2013 1869 bsteffen Remove dataURI column from + * PluginDataObject. + * Aug 30, 2013 2298 rjpeter Make getPluginName abstract + * Dec 16, 2013 2574 bsteffen Remove getDecoderGettable. * * * @@ -184,11 +184,6 @@ public class GridRecord extends PersistablePluginDataObject implements getInfoNotNull().setEnsembleId(ensembleId); } - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } - @Override public ISpatialObject getSpatialObject() { return getLocation(); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataset/DatasetInfoLookup.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataset/DatasetInfoLookup.java index ddd42fb155..54fadee3f5 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataset/DatasetInfoLookup.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataset/DatasetInfoLookup.java @@ -42,9 +42,10 @@ import com.raytheon.uf.common.status.UFStatus; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Feb 27, 2012 bsteffen Initial creation + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Feb 27, 2012 bsteffen Initial creation + * Dec 16, 2013 2574 bsteffen Update deprecated method call. * * * @@ -97,8 +98,8 @@ public class DatasetInfoLookup { return; } try { - Object obj = manager.unmarshalFromXmlFile(file.getFile()); - DatasetInfoSet set = (DatasetInfoSet) obj; + DatasetInfoSet set = manager.unmarshalFromXmlFile( + DatasetInfoSet.class, file.getFile()); for (DatasetInfo info : set.getInfos()) { infoMap.put(info.getDatasetId(), info); } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/datastorage/GridDataRetriever.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/datastorage/GridDataRetriever.java index b403dcfab3..570f2fab72 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/datastorage/GridDataRetriever.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/datastorage/GridDataRetriever.java @@ -60,11 +60,12 @@ import com.vividsolutions.jts.geom.Coordinate; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * Nov 14, 2012 bsteffen Initial creation - * Jan 14, 2013 1469 bkowal No longer needs to retrieve the location - * of the hdf5 data directory. + * Date Ticket# Engineer Description + * ------------- -------- ----------- -------------------------- + * Nov 14, 2012 bsteffen Initial creation + * Jan 14, 2013 1469 bkowal No longer needs to retrieve the location + * of the hdf5 data directory. + * Dec 16, 2013 2574 bsteffen Fixed bugs in setRequestArea. * * * @@ -193,9 +194,9 @@ public class GridDataRetriever { double lat2) throws GridCoverageException { SubGrid subGrid = new SubGrid(); subGrid.setLowerLeftLat(Math.min(lat1, lat2)); - subGrid.setLowerLeftLon(Math.min(lat1, lat2)); - subGrid.setUpperRightLat(Math.min(lat1, lat2)); - subGrid.setUpperRightLon(Math.min(lat1, lat2)); + subGrid.setLowerLeftLon(Math.min(lon1, lon1)); + subGrid.setUpperRightLat(Math.max(lat1, lat2)); + subGrid.setUpperRightLon(Math.max(lon2, lon2)); requestCoverage = record.getLocation().trim(subGrid); int[] minIndex = { subGrid.getUpperLeftX(), subGrid.getUpperLeftY() }; int[] maxIndex = { subGrid.getUpperLeftX() + subGrid.getNX(), @@ -321,7 +322,7 @@ public class GridDataRetriever { } } - private File findStorageLocation() throws StorageException { + private File findStorageLocation() { IHDFFilePathProvider pathProvider = record.getHDFPathProvider(); String path = pathProvider.getHDFPath(record.getPluginName(), record); 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 e67295dfe0..1343b520ba 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF @@ -5,6 +5,7 @@ Bundle-SymbolicName: com.raytheon.uf.common.gridcoverage Bundle-Version: 1.13.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization Export-Package: com.raytheon.uf.common.gridcoverage, com.raytheon.uf.common.gridcoverage.convert, @@ -19,4 +20,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.lang, + org.apache.commons.beanutils diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/convert/GridCoverageConverter.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/convert/GridCoverageConverter.java index 4d9bf84d97..b10935066b 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/convert/GridCoverageConverter.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/convert/GridCoverageConverter.java @@ -19,6 +19,9 @@ **/ package com.raytheon.uf.common.gridcoverage.convert; +import org.apache.commons.beanutils.ConversionException; +import org.apache.commons.beanutils.Converter; + import com.raytheon.uf.common.dataplugin.annotations.DataURIFieldConverter; import com.raytheon.uf.common.gridcoverage.GridCoverage; import com.raytheon.uf.common.gridcoverage.lookup.GridCoverageLookup; @@ -42,7 +45,7 @@ import com.raytheon.uf.common.gridcoverage.lookup.GridCoverageLookup; * @version 1.0 */ -public class GridCoverageConverter implements DataURIFieldConverter { +public class GridCoverageConverter implements DataURIFieldConverter, Converter { @Override public String toString(Object field) { @@ -71,6 +74,19 @@ public class GridCoverageConverter implements DataURIFieldConverter { } } + @Override + public GridCoverage convert(Class clazz, Object value) { + if (value instanceof Integer) { + return fromInteger((Integer) value); + } else if (value instanceof String) { + return fromString((String) value); + } else { + throw new ConversionException("Cannot convert " + + String.valueOf(value) + " of type " + + value.getClass().getSimpleName() + " to a GridCoverage."); + } + } + public GridCoverage fromInteger(Integer integer) { if (integer != null) { GridCoverage result = GridCoverageLookup.getInstance().getCoverage( @@ -81,7 +97,7 @@ public class GridCoverageConverter implements DataURIFieldConverter { } throw new UnsupportedOperationException( "Cannot find GridCoverage with id of " - + String.valueOf(integer)); + + String.valueOf(integer)); } } diff --git a/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml b/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml index d25631cd4a..1d6ef5da44 100644 --- a/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml +++ b/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml @@ -29,4 +29,9 @@ + + + + com.raytheon.uf.common.gridcoverage.GridCoverage + \ No newline at end of file