Issue #2060 fill in units on GridRecords created from URIs
Change-Id: Ic7c1594c1442d8463c5050bdefb434995ffc7f8a Former-commit-id:7cea97ab15
[formerly71b4227061
[formerly 949d132cf3260db5f75ea665f21601ab91440958]] Former-commit-id:71b4227061
Former-commit-id:3719c41d2b
This commit is contained in:
parent
a57f0e338d
commit
1d38804eb2
6 changed files with 70 additions and 12 deletions
|
@ -100,6 +100,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* rules.
|
* rules.
|
||||||
* Apr 09, 2014 2947 bsteffen Improve flexibility of sat derived
|
* Apr 09, 2014 2947 bsteffen Improve flexibility of sat derived
|
||||||
* parameters, implement ImageProvider
|
* parameters, implement ImageProvider
|
||||||
|
* May 06, 2014 njensen Improve error message
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -257,7 +258,7 @@ public class SatResource extends
|
||||||
initializeFirstFrame((SatelliteRecord) pdo);
|
initializeFirstFrame((SatelliteRecord) pdo);
|
||||||
} catch (VizException e) {
|
} catch (VizException e) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"Unable to initialize the satellite resource");
|
"Unable to initialize the satellite resource", e);
|
||||||
}
|
}
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.GridCoverage;
|
||||||
import com.raytheon.uf.common.gridcoverage.convert.GridCoverageConverter;
|
import com.raytheon.uf.common.gridcoverage.convert.GridCoverageConverter;
|
||||||
import com.raytheon.uf.common.parameter.Parameter;
|
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.DynamicSerialize;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ public class GridInfoRecord extends PersistableDataObject<Integer> {
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@PrimaryKeyJoinColumn
|
@PrimaryKeyJoinColumn
|
||||||
@DataURI(position = 4, embedded = true)
|
@DataURI(position = 4, converter = ParameterConverter.class)
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private Parameter parameter;
|
private Parameter parameter;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
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.dataplugin.persist.PersistableDataObject;
|
||||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
|
@ -71,7 +70,6 @@ public class Parameter extends PersistableDataObject implements
|
||||||
@Id
|
@Id
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
@XmlElement
|
@XmlElement
|
||||||
@DataURI(position = 0)
|
|
||||||
private String abbreviation;
|
private String abbreviation;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
|
|
@ -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.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
*
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* May 6, 2014 2060 njensen Initial creation
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author njensen
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ParameterConverter implements DataURIFieldConverter<Parameter> {
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -2,11 +2,10 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: DatUtils Plug-in
|
Bundle-Name: DatUtils Plug-in
|
||||||
Bundle-SymbolicName: com.raytheon.uf.edex.dat.utils
|
Bundle-SymbolicName: com.raytheon.uf.edex.dat.utils
|
||||||
Bundle-Version: 1.12.1174.qualifier
|
Bundle-Version: 1.14.0.qualifier
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
Import-Package: com.raytheon.uf.common.dataplugin.ffmp,
|
Import-Package: com.raytheon.uf.common.dataplugin.grid,
|
||||||
com.raytheon.uf.common.dataplugin.grid,
|
|
||||||
com.raytheon.uf.common.dataplugin.scan.data,
|
com.raytheon.uf.common.dataplugin.scan.data,
|
||||||
com.raytheon.uf.common.localization,
|
com.raytheon.uf.common.localization,
|
||||||
com.raytheon.uf.common.monitor.xml,
|
com.raytheon.uf.common.monitor.xml,
|
||||||
|
@ -14,7 +13,6 @@ Import-Package: com.raytheon.uf.common.dataplugin.ffmp,
|
||||||
org.apache.commons.logging
|
org.apache.commons.logging
|
||||||
Export-Package: com.raytheon.uf.edex.dat.utils
|
Export-Package: com.raytheon.uf.edex.dat.utils
|
||||||
Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.2",
|
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.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
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
package com.raytheon.uf.edex.dat.utils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This software was developed and / or modified by Raytheon Company,
|
* This software was developed and / or modified by Raytheon Company,
|
||||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
* 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
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
package com.raytheon.uf.edex.dat.utils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
Loading…
Add table
Reference in a new issue