diff --git a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java index 55204a29b3..41f30e9b68 100644 --- a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java +++ b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java @@ -100,6 +100,7 @@ import com.vividsolutions.jts.geom.Coordinate; * rules. * Apr 09, 2014 2947 bsteffen Improve flexibility of sat derived * parameters, implement ImageProvider + * May 06, 2014 njensen Improve error message * * * @@ -257,7 +258,7 @@ public class SatResource extends initializeFirstFrame((SatelliteRecord) pdo); } catch (VizException e) { throw new IllegalStateException( - "Unable to initialize the satellite resource"); + "Unable to initialize the satellite resource", e); } initialized = true; } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridInfoRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridInfoRecord.java index 7a40edd823..1ed01e29bb 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridInfoRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/GridInfoRecord.java @@ -36,6 +36,7 @@ import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.gridcoverage.GridCoverage; import com.raytheon.uf.common.gridcoverage.convert.GridCoverageConverter; import com.raytheon.uf.common.parameter.Parameter; +import com.raytheon.uf.common.parameter.ParameterConverter; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -106,7 +107,7 @@ public class GridInfoRecord extends PersistableDataObject { @ManyToOne @PrimaryKeyJoinColumn - @DataURI(position = 4, embedded = true) + @DataURI(position = 4, converter = ParameterConverter.class) @DynamicSerializeElement private Parameter parameter; diff --git a/edexOsgi/com.raytheon.uf.common.parameter/src/com/raytheon/uf/common/parameter/Parameter.java b/edexOsgi/com.raytheon.uf.common.parameter/src/com/raytheon/uf/common/parameter/Parameter.java index b7ecd7d3bb..6479a8a49b 100644 --- a/edexOsgi/com.raytheon.uf.common.parameter/src/com/raytheon/uf/common/parameter/Parameter.java +++ b/edexOsgi/com.raytheon.uf.common.parameter/src/com/raytheon/uf/common/parameter/Parameter.java @@ -34,7 +34,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; @@ -71,7 +70,6 @@ public class Parameter extends PersistableDataObject implements @Id @DynamicSerializeElement @XmlElement - @DataURI(position = 0) private String abbreviation; @Column(nullable = false) diff --git a/edexOsgi/com.raytheon.uf.common.parameter/src/com/raytheon/uf/common/parameter/ParameterConverter.java b/edexOsgi/com.raytheon.uf.common.parameter/src/com/raytheon/uf/common/parameter/ParameterConverter.java new file mode 100644 index 0000000000..7ebeab9c80 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.parameter/src/com/raytheon/uf/common/parameter/ParameterConverter.java @@ -0,0 +1,59 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.uf.common.parameter; + +import com.raytheon.uf.common.dataplugin.annotations.DataURIFieldConverter; +import com.raytheon.uf.common.parameter.lookup.ParameterLookup; + +/** + * A DataURIFieldConverter that ensures that a String parameter abbreviation + * will be looked up to potentially contain all the fields. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * May 6, 2014  2060       njensen     Initial creation
+ * 
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class ParameterConverter implements DataURIFieldConverter { + + @Override + public String toString(Parameter field) { + return field.getAbbreviation(); + } + + @Override + public Parameter fromString(String string) { + Parameter p = ParameterLookup.getInstance().getParameter(string); + if (p == null) { + p = new Parameter(string); + } + return p; + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.dat.utils/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.dat.utils/META-INF/MANIFEST.MF index c3cbd9a5dc..d74ea2f075 100644 --- a/edexOsgi/com.raytheon.uf.edex.dat.utils/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.dat.utils/META-INF/MANIFEST.MF @@ -2,11 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: DatUtils Plug-in Bundle-SymbolicName: com.raytheon.uf.edex.dat.utils -Bundle-Version: 1.12.1174.qualifier +Bundle-Version: 1.14.0.qualifier Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Import-Package: com.raytheon.uf.common.dataplugin.ffmp, - com.raytheon.uf.common.dataplugin.grid, +Import-Package: com.raytheon.uf.common.dataplugin.grid, com.raytheon.uf.common.dataplugin.scan.data, com.raytheon.uf.common.localization, com.raytheon.uf.common.monitor.xml, @@ -14,7 +13,6 @@ Import-Package: com.raytheon.uf.common.dataplugin.ffmp, org.apache.commons.logging Export-Package: com.raytheon.uf.edex.dat.utils Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.2", - com.raytheon.uf.common.dataplugin.ffmp;bundle-version="1.12.2", com.raytheon.uf.common.monitor;bundle-version="1.12.2", - com.raytheon.uf.common.dataplugin.shef;bundle-version="1.12.1174", - com.raytheon.uf.edex.menus;bundle-version="1.0.0" + com.raytheon.uf.edex.menus;bundle-version="1.0.0", + com.raytheon.uf.common.parameter diff --git a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java index 539109ba4c..b4703b2e96 100644 --- a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java +++ b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/FreezingLevel.java @@ -1,5 +1,3 @@ -package com.raytheon.uf.edex.dat.utils; - /** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. @@ -19,6 +17,9 @@ package com.raytheon.uf.edex.dat.utils; * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ + +package com.raytheon.uf.edex.dat.utils; + import java.util.ArrayList; import java.util.Calendar; import java.util.Date;