Issue #2473 Remove deprecated grib functionality

Change-Id: I14f7df9fc9eb09a7569193efbf17c75d6af6ca23

Former-commit-id: 9d903e94114cacee2a6abec6f83880fa8b978180
This commit is contained in:
Ben Steffensmeier 2013-10-14 17:38:00 -05:00
parent 5173e00254
commit 94560e37c8
51 changed files with 178 additions and 5365 deletions

View file

@ -61,12 +61,6 @@
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.common.dataplugin.grib"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.viz.pointdata"
download-size="0"

View file

@ -0,0 +1,24 @@
#!/bin/bash
# DR #2473 drops all deprecated grib data from the database
PSQL="/awips2/psql/bin/psql"
SQL_COMMAND="
delete from plugin_info where name = 'grib';
drop table if exists grib, grib_models;
drop sequence if exists gribseq;
"
echo "INFO: Dropping grib tables."
${PSQL} -U awips -d metadata -c "${SQL_COMMAND}"
echo "INFO: Removing grib site localization files"
find /awips2/edex/data/utility/edex_static/site/ -iname 'gribPathkeys.xml' -exec rm -v {} \;
find /awips2/edex/data/utility/edex_static/site -iname 'gribPurgeRules.xml' -exec rm -v {} \;
rm -rv /awips2/edex/data/utility/common_static/site/*/grib/
echo "INFO: The update finished successfully."
exit 0

View file

@ -9,15 +9,6 @@ export IH_DB_NAME=hd_ob92oax
### end of localization variables ###
### flag to control grib deprecation ###
if [ -z "$gribMode" ]; then
# uncomment only one of the following two lines
#export gribMode=deprecated
export gribMode=future
fi
## end of grib deprecation flag ###
# setup environment for HPE
export DATA_ARCHIVE_ROOT=/tmp/sbn

View file

@ -167,7 +167,6 @@
<include>time-common.xml</include>
<include>auth-common.xml</include>
<include>nwsauth-request.xml</include>
<include>grib-common.xml</include>
<include>grib-decode.xml</include>
<include>grid-staticdata-process.xml</include>
<include>level-common.xml</include>
@ -312,7 +311,6 @@
<include>eventbus-common.xml</include>
</mode>
<mode name="grib">
<include>grib-common.xml</include>
<include>grib-decode.xml</include>
<include>grid-staticdata-process.xml</include>
<include>grib-distribution.xml</include>
@ -333,7 +331,6 @@
<mode name="gfe">
<include>.*gfe.*</include>
<include>serialize-request.xml</include>
<include>grib-spring.xml</include>
<include>level-spring.xml</include>
<include>distribution-spring.xml</include>
<include>manualIngest-spring.xml</include>
@ -409,7 +406,6 @@
<include>obs-dpa-ingest.xml</include>
<include>obs-ogc.xml</include>-->
<!-- grid specific services
<include>grib-common.xml</include>
<include>grid-staticdata-process.xml</include>
<include>gridcoverage-.*.xml</include>
<include>grib-distribution.xml</include>

View file

@ -1,59 +0,0 @@
/**
* 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.edex.plugin.gfe.paraminfo;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Deprecated use GridParamInfo
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 24, 2010 #6372 bphillip Initial creation
*
* </pre>
*
* @author bphillip
* @version 1.0
*/
@XmlRootElement(name = "gribParamInfo")
@XmlAccessorType(XmlAccessType.NONE)
@Deprecated
public class GribParamInfo extends GridParamInfo {
public ArrayList<ParameterInfo> getGribParamInfo() {
return super.getGridParamInfo();
}
@XmlElements({ @XmlElement(name = "gribParameterInfo", type = ParameterInfo.class) })
public void setGribParamInfo(ArrayList<ParameterInfo> gribParamInfo) {
super.setGridParamInfo(gribParamInfo);
}
}

View file

@ -34,7 +34,6 @@ import javax.xml.bind.Unmarshaller;
import com.raytheon.uf.common.dataplugin.grid.mapping.DatasetIdMapper;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
@ -50,17 +49,19 @@ import com.raytheon.uf.common.util.mapping.MultipleMappingException;
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 24, 2010 #6372 bphillip Initial creation
* Jan 25, 2012 DR 14305 ryu Read site parameterInfo files
* Sep 12, 2012 #1117 dgilling Implement method to retrieve all
* parm names for a given model.
* Feb 15, 2013 1598 bsteffen Make GridParamInfoLookup filter on
* extension.
* Mar 20, 2013 #1774 randerso Added getModelInfo,
* added Dflt if no levels specified
* Apr 30, 2013 1961 bsteffen Add ability to disable grib tables.
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Jun 24, 2010 6372 bphillip Initial creation
* Jan 25, 2012 14305 ryu Read site parameterInfo files
* Sep 12, 2012 1117 dgilling Implement method to retrieve all parm
* names for a given model.
* Feb 15, 2013 1598 bsteffen Make GridParamInfoLookup filter on
* extension.
* Mar 20, 2013 1774 randerso Added getModelInfo,
* added Dflt if no levels specified
* Apr 30, 2013 1961 bsteffen Add ability to disable grib tables.
* Oct 14, 2013 2473 bsteffen Remove lookup of deprecated grib files.
*
*
* </pre>
*
@ -74,12 +75,6 @@ public class GridParamInfoLookup {
/** The singleton instance */
private static GridParamInfoLookup instance;
/**
* Temporary boolean to enable or disable loading deprecated grib
* definitions
*/
private static boolean loadGribDefs = false;
/** Parameter information map */
private Map<String, GridParamInfo> modelParamMap;
@ -95,17 +90,6 @@ public class GridParamInfoLookup {
return instance;
}
public static synchronized boolean enableLoadGribDefs() {
GridParamInfoLookup.loadGribDefs = true;
if(instance != null){
System.err.println("setLoadGribDefs was called too late.");
// this will trigger a complete reload. In testing it is never
// called too late, this is paranoia code.
instance = null;
}
return GridParamInfoLookup.loadGribDefs;
}
/**
* Creates a new GribParamInfoLookup instance
*/
@ -190,16 +174,9 @@ public class GridParamInfoLookup {
private void init() {
Unmarshaller um = null;
try {
if (loadGribDefs) {
JAXBContext context = JAXBContext.newInstance(
ParameterInfo.class, GridParamInfo.class,
GribParamInfo.class);
um = context.createUnmarshaller();
} else {
JAXBContext context = JAXBContext.newInstance(
ParameterInfo.class, GridParamInfo.class);
um = context.createUnmarshaller();
}
JAXBContext context = JAXBContext.newInstance(ParameterInfo.class,
GridParamInfo.class);
um = context.createUnmarshaller();
} catch (JAXBException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
return;
@ -219,41 +196,11 @@ public class GridParamInfoLookup {
if (!modelParamMap.containsKey(key)) {
modelParamMap.put(key, paramInfo);
}
if (paramInfo instanceof GribParamInfo) {
statusHandler.info("Loaded deprecated gribParamInfo for "
+ key);
}
} catch (JAXBException e) {
statusHandler.handle(Priority.PROBLEM,
"Error unmarshalling grid parameter information", e);
}
}
if (loadGribDefs) {
// Deprecated grib SITE level files.
files = pm.listFiles(pm.getContext(LocalizationType.EDEX_STATIC,
LocalizationLevel.SITE), "grib" + IPathManager.SEPARATOR
+ "parameterInfo", new String[] { ".xml" }, true, true);
for (LocalizationFile file : files) {
statusHandler.info("Loading deprecated paramInfo file: "
+ file.getFile());
String name = file.getFile().getName().replace(".xml", "");
// Do not override grid files.
if (modelParamMap.get(name) != null) {
continue;
}
try {
GridParamInfo paramInfo = (GridParamInfo) um.unmarshal(file
.getFile());
modelParamMap.put(name, paramInfo);
} catch (JAXBException e) {
statusHandler
.handle(Priority.PROBLEM,
"Error unmarshalling grid parameter information",
e);
}
}
}
for (GridParamInfo gridParamInfo : modelParamMap.values()) {
for (String parmName : gridParamInfo.getParmNames()) {
ParameterInfo parameterInfo = gridParamInfo

View file

@ -5,31 +5,25 @@ Bundle-SymbolicName: com.raytheon.edex.plugin.grib
Bundle-Version: 1.12.1174.qualifier
Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization
Bundle-Vendor: RAYTHEON
Require-Bundle: javax.measure,
javax.persistence,
com.raytheon.edex.common,
Require-Bundle: com.raytheon.edex.common,
com.raytheon.edex.uengine,
org.apache.commons.lang,
org.apache.commons.configuration,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.status,
com.raytheon.uf.edex.python.decoder,
com.raytheon.uf.edex.awipstools,
com.raytheon.uf.common.awipstools,
ucar.nc2,
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.dataplugin.grid,
com.raytheon.uf.common.dataplugin.grid,
com.raytheon.uf.common.parameter,
com.raytheon.uf.edex.plugin.grid,
com.raytheon.uf.common.dataplugin.grib
Import-Package: com.raytheon.edex.exception,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.dataplugin.grid,
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.status,
com.raytheon.uf.common.parameter,
com.raytheon.uf.edex.awipstools,
com.raytheon.uf.edex.plugin.grid,
com.raytheon.uf.edex.python.decoder,
org.apache.camel,
org.apache.commons.logging
Export-Package: com.raytheon.edex.objects.hibernate.grib,
com.raytheon.edex.plugin.grib,
org.apache.commons.configuration,
org.apache.commons.lang,
org.apache.commons.logging,
javax.measure,
ucar.nc2
Export-Package: com.raytheon.edex.plugin.grib,
com.raytheon.edex.plugin.grib.exception,
com.raytheon.edex.plugin.grib.spatial,
com.raytheon.edex.plugin.grib.util,

View file

@ -3,7 +3,6 @@ com.raytheon.edex.plugin.grib.util.GribLevel
com.raytheon.edex.plugin.grib.util.GribParameter
com.raytheon.edex.plugin.grib.util.Grib1Parameter
com.raytheon.edex.plugin.grib.util.Grib1ParameterSet
com.raytheon.edex.util.grib.GridLevels
com.raytheon.edex.util.grib.Grib1TableMap
com.raytheon.edex.util.grib.CompositeModel
com.raytheon.edex.plugin.grib.spatial.FileData

View file

@ -1,41 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="gribPathProvider" class="com.raytheon.uf.common.dataplugin.grib.GribPathProvider" />
<bean id="gribProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" value="grib" />
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.grib" />
<property name="dao" value="com.raytheon.edex.plugin.grib.dao.GribDao" />
<property name="record" value="com.raytheon.uf.common.dataplugin.grib.GribRecord" />
<property name="dependencyFQNs">
<list>
<value>com.raytheon.uf.common.dataplugin.level</value>
<value>com.raytheon.uf.common.parameter</value>
<value>com.raytheon.uf.common.gridcoverage</value>
</list>
</property>
<property name="pathProvider">
<ref bean="gribPathProvider"/>
</property>
<property name="compression" value="LZF"/>
</bean>
<bean id="gribRegistered" factory-bean="pluginRegistry" factory-method="register"
depends-on="levelRegistered,parameterRegistered,gridcoverageRegistered">
<constructor-arg value="grib"/>
<constructor-arg ref="gribProperties"/>
</bean>
<bean id="gfeLoadGribParamInfo"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass">
<value>com.raytheon.edex.plugin.gfe.paraminfo.GridParamInfoLookup</value>
</property>
<property name="targetMethod">
<value>enableLoadGribDefs</value>
</property>
</bean>
</beans>

View file

@ -1,134 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="gribDecoder" class="com.raytheon.edex.plugin.grib.GribDecoder" />
<bean id="ingest-grib" class="org.apache.camel.component.jms.JmsComponent">
<constructor-arg ref="jmsGribConfig" />
<property name="taskExecutor" ref="gribThreadPool" />
</bean>
<bean id="jmsGribConfig" class="org.apache.camel.component.jms.JmsConfiguration"
factory-bean="jmsDurableConfig" factory-method="copy"/>
<bean id="gribThreadPool"
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
<property name="corePoolSize" value="${grib-decode.count.threads}" />
<property name="maxPoolSize" value="${grib-decode.count.threads}" />
</bean>
<bean id="gribGridPointLock" class="com.raytheon.edex.plugin.grib.GribGridPointLock">
<constructor-arg value="${grib-decode.count.gridpoints}"/>
<constructor-arg value="${grib-decode.count.threads}"/>
</bean>
<bean id="gribSplitter" class="com.raytheon.edex.plugin.grib.GribSplitter" />
<bean id="useLatestAggregationStrategy" class="org.apache.camel.processor.aggregate.UseLatestAggregationStrategy" />
<bean id="gribDecodeCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="grib-decode"/>
</bean>
<bean id="gribPostProcessor"
class="com.raytheon.edex.plugin.grib.decoderpostprocessors.GribPostProcessor"
factory-method="getInstance" />
<bean id="gridToGribConverter"
class="com.raytheon.edex.plugin.grib.GridToGribConverter" factory-method="getInstance" />
<bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup"
factory-method="getInstance" depends-on="gridRegistered" />
<bean id="gribModelLookup"
class="com.raytheon.edex.plugin.grib.util.GribModelLookup"
factory-method="getInstance" init-method="initCommonStaticModels"/>
<bean id="gribSpatialCache"
class="com.raytheon.edex.plugin.grib.spatial.GribSpatialCache"
factory-method="getInstance" depends-on="gridcoveragelookup"/>
<bean id="ncgribFilenameProcessor" class="com.raytheon.edex.plugin.grib.filenameprocessor.NcgribFileNameProcessor" />
<camelContext id="grib-decode" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="gribFileEndpoint" uri="file:${edex.home}/data/sbn/grib?noop=true&amp;idempotent=false" />
<endpoint id="gribSplitJmsEndpoint" uri="jms-durable:queue:Ingest.GribSplit"/>
<endpoint id="gribDecodeJmsEndpoint" uri="ingest-grib:queue:Ingest.GribDecode?concurrentConsumers=${grib-decode.count.threads}"/>
<route id="gribFileConsumerRoute">
<from ref="gribFileEndpoint" />
<bean ref="fileToString" />
<bean ref="ncgribFilenameProcessor" />
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.GribSplit" />
</route>
<!-- Begin Grib Decode Route -->
<route id="gribSplitIngestRoute">
<from ref="gribSplitJmsEndpoint" />
<doTry>
<pipeline>
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<bean ref="stringToFile" />
<!-- strategyRef is needed because of camel bug https://issues.apache.org/activemq/browse/CAMEL-3333,
without the strategy it uses the original message in the multicast and it loses the largeFileLock header -->
<split strategyRef="useLatestAggregationStrategy">
<method bean="gribSplitter" method="split" />
<to uri="jms-durable:queue:Ingest.GribDecode" />
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="gribDecodeIngestRoute">
<from ref="gribDecodeJmsEndpoint" />
<doTry>
<pipeline>
<bean ref="gribGridPointLock" method="reserve"/>
<bean ref="gribDecoder" />
<!-- send for processing -->
<bean ref="gribPostProcessor" method="process" />
<multicast parallelProcessing="false">
<!-- send to persistence -->
<to uri="direct-vm:persistIndexAlert" />
<!-- send to transform -->
<to uri="direct-vm:gridToGrib"/>
</multicast>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR"/>
</doCatch>
<doFinally>
<bean ref="gribGridPointLock" method="release"/>
</doFinally>
</doTry>
</route>
<route id="gridToGrib">
<from uri="direct-vm:gridToGrib"/>
<bean ref="gridToGribConverter" method="convert"/>
<bean ref="index" method="index"/>
<bean ref="toDataURI" method="toDataURI"/>
<to uri="vm:stageNotification"/>
</route>
</camelContext>
</beans>

View file

@ -1,17 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="gridDataQueryHandler" class="com.raytheon.edex.plugin.grib.handler.GridDataHandler" />
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.grib.request.GridDataRequestMessage"/>
<constructor-arg ref="gridDataQueryHandler"/>
</bean>
<bean id="deleteAllModelDataHandler" class="com.raytheon.edex.plugin.grib.handler.DeleteAllModelDataHandler" />
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.grib.request.DeleteAllModelDataRequest"/>
<constructor-arg ref="deleteAllModelDataHandler"/>
</bean>
</beans>

View file

@ -1,6 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<!-- In the future this file doesn't exist. -->
</beans>

View file

@ -1,116 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="gribDecoder" class="com.raytheon.edex.plugin.grib.GribDecoder" />
<bean id="ingest-grib" class="org.apache.camel.component.jms.JmsComponent">
<constructor-arg ref="jmsGribConfig" />
<property name="taskExecutor" ref="gribThreadPool" />
</bean>
<bean id="jmsGribConfig" class="org.apache.camel.component.jms.JmsConfiguration"
factory-bean="jmsDurableConfig" factory-method="copy"/>
<bean id="gribThreadPool"
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
<property name="corePoolSize" value="${grib-decode.count.threads}" />
<property name="maxPoolSize" value="${grib-decode.count.threads}" />
</bean>
<bean id="gribGridPointLock" class="com.raytheon.edex.plugin.grib.GribGridPointLock">
<constructor-arg value="${grib-decode.count.gridpoints}"/>
<constructor-arg value="${grib-decode.count.threads}"/>
</bean>
<bean id="gribSplitter" class="com.raytheon.edex.plugin.grib.GribSplitter" />
<bean id="useLatestAggregationStrategy" class="org.apache.camel.processor.aggregate.UseLatestAggregationStrategy" />
<bean id="gribDecodeCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="grib-decode"/>
</bean>
<bean id="gribPostProcessor"
class="com.raytheon.edex.plugin.grib.decoderpostprocessors.GribPostProcessor"
factory-method="getInstance" />
<bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup"
factory-method="getInstance" depends-on="gridRegistered" />
<bean id="gribModelLookup"
class="com.raytheon.edex.plugin.grib.util.GribModelLookup"
factory-method="getInstance" />
<bean id="gribSpatialCache"
class="com.raytheon.edex.plugin.grib.spatial.GribSpatialCache"
factory-method="getInstance" depends-on="gridcoveragelookup"/>
<bean id="ncgribFilenameProcessor" class="com.raytheon.edex.plugin.grib.filenameprocessor.NcgribFileNameProcessor" />
<camelContext id="grib-decode" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="gribFileEndpoint" uri="file:${edex.home}/data/sbn/grib?noop=true&amp;idempotent=false" />
<endpoint id="gribSplitJmsEndpoint" uri="jms-durable:queue:Ingest.GribSplit"/>
<endpoint id="gribDecodeJmsEndpoint" uri="ingest-grib:queue:Ingest.GribDecode?concurrentConsumers=${grib-decode.count.threads}"/>
<route id="gribFileConsumerRoute">
<from ref="gribFileEndpoint" />
<bean ref="fileToString" />
<bean ref="ncgribFilenameProcessor" />
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.GribSplit" />
</route>
<!-- Begin Grib Decode Route -->
<route id="gribSplitIngestRoute">
<from ref="gribSplitJmsEndpoint" />
<doTry>
<pipeline>
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<bean ref="stringToFile" />
<!-- strategyRef is needed because of camel bug https://issues.apache.org/activemq/browse/CAMEL-3333,
without the strategy it uses the original message in the multicast and it loses the largeFileLock header -->
<split strategyRef="useLatestAggregationStrategy">
<method bean="gribSplitter" method="split" />
<to uri="jms-durable:queue:Ingest.GribDecode" />
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="gribDecodeIngestRoute">
<from ref="gribDecodeJmsEndpoint" />
<doTry>
<pipeline>
<bean ref="gribGridPointLock" method="reserve"/>
<bean ref="gribDecoder" />
<!-- send for processing -->
<bean ref="gribPostProcessor" method="process" />
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR"/>
</doCatch>
<doFinally>
<bean ref="gribGridPointLock" method="release"/>
</doFinally>
</doTry>
</route>
</camelContext>
</beans>

View file

@ -1,6 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<!-- In the future this file doesn't exist. -->
</beans>

View file

@ -1,4 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<import resource="../spring.${gribMode}/grib-common.xml" />
</beans>

View file

@ -1,4 +1,116 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<import resource="../spring.${gribMode}/grib-decode.xml" />
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="gribDecoder" class="com.raytheon.edex.plugin.grib.GribDecoder" />
<bean id="ingest-grib" class="org.apache.camel.component.jms.JmsComponent">
<constructor-arg ref="jmsGribConfig" />
<property name="taskExecutor" ref="gribThreadPool" />
</bean>
<bean id="jmsGribConfig" class="org.apache.camel.component.jms.JmsConfiguration"
factory-bean="jmsDurableConfig" factory-method="copy"/>
<bean id="gribThreadPool"
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
<property name="corePoolSize" value="${grib-decode.count.threads}" />
<property name="maxPoolSize" value="${grib-decode.count.threads}" />
</bean>
<bean id="gribGridPointLock" class="com.raytheon.edex.plugin.grib.GribGridPointLock">
<constructor-arg value="${grib-decode.count.gridpoints}"/>
<constructor-arg value="${grib-decode.count.threads}"/>
</bean>
<bean id="gribSplitter" class="com.raytheon.edex.plugin.grib.GribSplitter" />
<bean id="useLatestAggregationStrategy" class="org.apache.camel.processor.aggregate.UseLatestAggregationStrategy" />
<bean id="gribDecodeCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="grib-decode"/>
</bean>
<bean id="gribPostProcessor"
class="com.raytheon.edex.plugin.grib.decoderpostprocessors.GribPostProcessor"
factory-method="getInstance" />
<bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup"
factory-method="getInstance" depends-on="gridRegistered" />
<bean id="gribModelLookup"
class="com.raytheon.edex.plugin.grib.util.GribModelLookup"
factory-method="getInstance" />
<bean id="gribSpatialCache"
class="com.raytheon.edex.plugin.grib.spatial.GribSpatialCache"
factory-method="getInstance" depends-on="gridcoveragelookup"/>
<bean id="ncgribFilenameProcessor" class="com.raytheon.edex.plugin.grib.filenameprocessor.NcgribFileNameProcessor" />
<camelContext id="grib-decode" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="gribFileEndpoint" uri="file:${edex.home}/data/sbn/grib?noop=true&amp;idempotent=false" />
<endpoint id="gribSplitJmsEndpoint" uri="jms-durable:queue:Ingest.GribSplit"/>
<endpoint id="gribDecodeJmsEndpoint" uri="ingest-grib:queue:Ingest.GribDecode?concurrentConsumers=${grib-decode.count.threads}"/>
<route id="gribFileConsumerRoute">
<from ref="gribFileEndpoint" />
<bean ref="fileToString" />
<bean ref="ncgribFilenameProcessor" />
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.GribSplit" />
</route>
<!-- Begin Grib Decode Route -->
<route id="gribSplitIngestRoute">
<from ref="gribSplitJmsEndpoint" />
<doTry>
<pipeline>
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>
<bean ref="stringToFile" />
<!-- strategyRef is needed because of camel bug https://issues.apache.org/activemq/browse/CAMEL-3333,
without the strategy it uses the original message in the multicast and it loses the largeFileLock header -->
<split strategyRef="useLatestAggregationStrategy">
<method bean="gribSplitter" method="split" />
<to uri="jms-durable:queue:Ingest.GribDecode" />
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="gribDecodeIngestRoute">
<from ref="gribDecodeJmsEndpoint" />
<doTry>
<pipeline>
<bean ref="gribGridPointLock" method="reserve"/>
<bean ref="gribDecoder" />
<!-- send for processing -->
<bean ref="gribPostProcessor" method="process" />
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:grib?level=ERROR"/>
</doCatch>
<doFinally>
<bean ref="gribGridPointLock" method="release"/>
</doFinally>
</doTry>
</route>
</camelContext>
</beans>

View file

@ -1,4 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<import resource="../spring.${gribMode}/grib-request.xml" />
</beans>

View file

@ -1,119 +0,0 @@
/**
* 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.edex.objects.hibernate.grib;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import javax.measure.unit.Unit;
import javax.measure.unit.UnitFormat;
import org.hibernate.HibernateException;
import org.hibernate.usertype.UserType;
public class UnitType implements UserType {
private static final int[] SQL_TYPES = { Types.VARCHAR };
@Override
public Object assemble(Serializable cached, Object owner)
throws HibernateException {
return cached;
}
@Override
public Object deepCopy(Object value) throws HibernateException {
return value;
}
@Override
public Serializable disassemble(Object value) throws HibernateException {
return (Serializable) value;
}
@Override
public boolean equals(Object x, Object y) throws HibernateException {
if (x == null) {
return false;
} else {
return ((Unit<?>) x).equals(y);
}
}
@Override
public int hashCode(Object x) throws HibernateException {
return 0;
}
@Override
public boolean isMutable() {
return false;
}
@Override
public Object nullSafeGet(ResultSet resultSet, String[] names, Object owner)
throws HibernateException, SQLException {
Unit<?> unit = null;
try {
String unitName = resultSet.getString(names[0]);
if (unitName == null) {
unit = Unit.ONE;
} else if (unitName.equals("")) {
unit = Unit.ONE;
} else {
unit = (Unit<?>) UnitFormat.getUCUMInstance().parseObject(
unitName);
}
} catch (Exception e) {
e.printStackTrace();
}
return unit;
}
@Override
public void nullSafeSet(PreparedStatement statement, Object value, int index)
throws HibernateException, SQLException {
if (value == null) {
statement.setString(index, null);
} else {
statement.setString(index, value.toString());
}
}
@Override
public Object replace(Object original, Object target, Object owner)
throws HibernateException {
return original;
}
@Override
public Class<?> returnedClass() {
return Unit.class;
}
@Override
public int[] sqlTypes() {
return UnitType.SQL_TYPES;
}
}

View file

@ -1,151 +0,0 @@
/**
* 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.edex.plugin.grib;
import com.raytheon.edex.plugin.grib.util.GribModelCache;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grib.GribModel;
import com.raytheon.uf.common.dataplugin.grib.GribRecord;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.edex.database.DataAccessLayerException;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 04, 2012 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class GridToGribConverter {
private static GridToGribConverter instance = new GridToGribConverter();
public static GridToGribConverter getInstance() {
return instance;
}
private GridToGribConverter() {
}
public GribRecord[] convert(GridRecord[] records) throws PluginException,
DataAccessLayerException {
GribRecord[] result = new GribRecord[records.length];
for (int i = 0; i < records.length; i += 1) {
GridRecord grid = records[i];
GribRecord grib = new GribRecord();
GribModel model = new GribModel();
grib.setDataTime(grid.getDataTime());
model.setModelName(grid.getDatasetId());
if ((grid.getSecondaryId() != null)
&& grid.getSecondaryId().startsWith("Version")) {
grib.setGridVersion(Integer.parseInt(grid.getSecondaryId()
.replace("Version", "")));
}
if ("ctl1".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(1);
model.setTypeEnsemble(1);
} else if ("ctl2".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(2);
model.setTypeEnsemble(1);
} else if ("n1".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(3);
model.setTypeEnsemble(2);
} else if ("p1".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(4);
model.setTypeEnsemble(3);
} else if ("n2".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(5);
model.setTypeEnsemble(2);
} else if ("p2".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(6);
model.setTypeEnsemble(3);
} else if ("n3".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(7);
model.setTypeEnsemble(2);
} else if ("p3".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(8);
model.setTypeEnsemble(3);
} else if ("n4".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(9);
model.setTypeEnsemble(2);
} else if ("p4".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(10);
model.setTypeEnsemble(3);
} else if ("n5".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(11);
model.setTypeEnsemble(2);
} else if ("p5".equals(grid.getEnsembleId())) {
model.setPerturbationNumber(12);
model.setTypeEnsemble(3);
}
Object centerid = grid.getExtraAttribute("centerid");
if ((centerid != null) && (centerid instanceof Integer)) {
model.setCenterid((Integer) centerid);
}
Object subcenterid = grid.getExtraAttribute("subcenterid");
if ((subcenterid != null) && (subcenterid instanceof Integer)) {
model.setSubcenterid((Integer) subcenterid);
}
Object genprocess = grid.getExtraAttribute("genprocess");
if ((genprocess != null) && (genprocess instanceof Integer)) {
model.setGenprocess((Integer) genprocess);
}
Object backGenprocess = grid.getExtraAttribute("backGenprocess");
if ((backGenprocess != null) && (backGenprocess instanceof Integer)) {
model.setBackGenprocess((Integer) backGenprocess);
}
Object pdsTemplate = grid.getExtraAttribute("pdsTemplate");
if ((pdsTemplate != null) && (pdsTemplate instanceof Integer)) {
model.setPdsTemplate((Integer) pdsTemplate);
}
Object gridid = grid.getExtraAttribute("gridid");
if ((gridid != null) && (gridid instanceof String)) {
model.setGridid((String) gridid);
}
Object numForecasts = grid.getExtraAttribute("numForecasts");
if ((numForecasts != null) && (numForecasts instanceof Integer)) {
model.setNumForecasts((Integer) numForecasts);
}
model.setLevel(grid.getLevel());
model.setLocation(grid.getLocation());
model.setParameterAbbreviation(grid.getParameter()
.getAbbreviation());
model.setParameterName(grid.getParameter().getName());
model.setParameterUnit(grid.getParameter().getUnitString());
model = GribModelCache.getInstance().getModel(model);
grib.setModelInfo(model);
grib.constructDataURI();
result[i] = grib;
}
return result;
}
}

View file

@ -1,487 +0,0 @@
/**
* 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.edex.plugin.grib.dao;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grib.GribModel;
import com.raytheon.uf.common.dataplugin.grib.GribPathProvider;
import com.raytheon.uf.common.dataplugin.grib.GribRecord;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.level.MasterLevel;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.dataquery.db.QueryResult;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.common.datastorage.IDataStore.StoreOp;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.StorageException;
import com.raytheon.uf.common.datastorage.StorageProperties;
import com.raytheon.uf.common.datastorage.StorageStatus;
import com.raytheon.uf.common.datastorage.records.AbstractStorageRecord;
import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.edex.core.EDEXUtil;
import com.raytheon.uf.edex.core.EdexException;
import com.raytheon.uf.edex.core.dataplugin.PluginRegistry;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.plugin.PluginDao;
import com.raytheon.uf.edex.database.query.DatabaseQuery;
/**
* Deprecated, use grid
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* 5/31/12 #674 dgilling Re-factor so all purge methods
* call updateCaches().
* 11/05/12 #1310 dgilling Remove code from updateCatches()
* that sent notification to D2DParmIdCache.
* 01/14/13 #1469 bkowal Removed the hdf5 data directory
* 04/08/13 #1293 bkowal Removed references to hdffileid.
* 05/08/13 1814 rjpeter Added time to live to topic message
* </pre>
*
* @author bphillip
* @version 1
*/
@Deprecated
public class GribDao extends PluginDao {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(GribDao.class);
private static final String LOCAL_SECTION = "localSection";
private static final String HYBRID_LEVELS = "hybridLevels";
private static final String THINNED_PTS = "thinnedPts";
private static final String PURGE_MODEL_CACHE_TOPIC = "jms-generic:topic:purgeGribModelCache?timeToLive=60000";
/**
* Creates a new GribPyDao object
*
* @param pluginName
* The name of the plugin. In this case, grib.
* @throws PluginException
* If problems occur instantiating dao
*/
public GribDao(String pluginName) throws PluginException {
super(pluginName);
}
public GribDao() throws PluginException {
this("grib");
}
@Override
public void purgeExpiredData() throws PluginException {
super.purgeExpiredData();
updateCaches();
}
private List<Integer> purgeGribModelOrphans()
throws DataAccessLayerException {
QueryResult result = (QueryResult) executeNativeSql("select id from awips.grib_models where id not in(select distinct(modelinfo_id) from awips.grib)");
List<Integer> orphanedIds = new ArrayList<Integer>();
for (int i = 0; i < result.getResultCount(); i++) {
orphanedIds.add((Integer) result.getRowColumnValue(i, 0));
}
if (!orphanedIds.isEmpty()) {
DatabaseQuery deleteQuery = new DatabaseQuery(GribModel.class);
deleteQuery.addQueryParam("id", orphanedIds, "in");
deleteByCriteria(deleteQuery);
}
return orphanedIds;
}
@Override
public void purgeAllData() throws PluginException {
super.purgeAllData();
updateCaches();
}
/**
* @throws PluginException
*/
private void updateCaches() throws PluginException {
try {
List<Integer> orphanedIds = purgeGribModelOrphans();
EDEXUtil.getMessageProducer().sendAsyncUri(PURGE_MODEL_CACHE_TOPIC,
orphanedIds);
} catch (DataAccessLayerException e) {
statusHandler.error("Error purging orphaned grib model entries", e);
throw new PluginException("Error updating GribModelCache", e);
} catch (EdexException e1) {
statusHandler.error(
"Error sending message to purge grib model topic", e1);
throw new PluginException("Error updating GribModelCache", e1);
}
}
@Override
protected IDataStore populateDataStore(IDataStore dataStore,
IPersistable obj) throws Exception {
GribRecord gribRec = (GribRecord) obj;
if ((gribRec.getMessageData() != null)
&& !gribRec.getModelInfo().getParameterName().equals("Missing")) {
AbstractStorageRecord storageRecord = null;
AbstractStorageRecord localSection = null;
AbstractStorageRecord hybridLevels = null;
AbstractStorageRecord thinnedPts = null;
/*
* Stores the binary data to the HDF5 data store
*/
if (gribRec.getMessageData() instanceof float[]) {
if ((gribRec.getSpatialObject() != null)
&& (gribRec.getMessageData() != null)) {
long[] sizes = new long[] {
(gribRec.getSpatialObject()).getNx(),
(gribRec.getSpatialObject()).getNy() };
storageRecord = new FloatDataRecord("Data",
gribRec.getDataURI(),
(float[]) gribRec.getMessageData(), 2, sizes);
} else {
throw new Exception(
"Cannot create data record, spatialData = "
+ gribRec.getSpatialObject()
+ " and messageData = "
+ gribRec.getMessageData());
}
} else if (gribRec.getMessageData() instanceof byte[]) {
storageRecord = new ByteDataRecord("Data",
gribRec.getDataURI(), (byte[]) gribRec.getMessageData());
} else {
throw new PluginException("Invalid message data type: "
+ gribRec.getMessageData().getClass());
}
/*
* Stores any data from the local section if present
*/
if (gribRec.isLocalSectionUsed()) {
localSection = new IntegerDataRecord(LOCAL_SECTION,
gribRec.getDataURI(), gribRec.getLocalSection());
localSection.setCorrelationObject(gribRec);
dataStore.addDataRecord(localSection);
}
/*
* Stores any hybrid coordinate data if present
*/
if (gribRec.isHybridGrid()) {
hybridLevels = new FloatDataRecord(HYBRID_LEVELS,
gribRec.getDataURI(), gribRec.getHybridCoordList());
hybridLevels.setCorrelationObject(gribRec);
dataStore.addDataRecord(hybridLevels);
}
/*
* Stores any thinned point data for quasi-regular grids if present
*/
if (gribRec.isThinnedGrid()) {
thinnedPts = new IntegerDataRecord(THINNED_PTS,
gribRec.getDataURI(), gribRec.getThinnedPts());
thinnedPts.setCorrelationObject(gribRec);
dataStore.addDataRecord(thinnedPts);
}
storageRecord.setCorrelationObject(gribRec);
StorageProperties sp = new StorageProperties();
String compression = PluginRegistry.getInstance()
.getRegisteredObject(pluginName).getCompression();
if (compression != null) {
sp.setCompression(StorageProperties.Compression
.valueOf(compression));
}
sp.setChunked(true);
dataStore.addDataRecord(storageRecord, sp);
}
return dataStore;
}
@Override
public IDataStore getDataStore(IPersistable obj) {
String persistDir = PLUGIN_HDF5_DIR.replace("grib", "grid")
+ pathProvider.getHDFPath(this.pluginName, obj)
+ File.separator;
String archive = pathProvider.getHDFFileName(this.pluginName, obj);
File persistFile = new File(persistDir, archive);
/* connect to the data store and retrieve the data */
return DataStoreFactory.getDataStore(persistFile);
}
@Override
protected String getHDF5Path(String productKey) {
return super.getHDF5Path(productKey).replace("grib", "grid");
}
@Override
public List<IDataRecord[]> getHDF5Data(List<PluginDataObject> objects,
int tileSet) throws PluginException {
List<IDataRecord[]> retVal = new ArrayList<IDataRecord[]>();
for (PluginDataObject rec : objects) {
IDataRecord[] record = null;
if (rec instanceof GribRecord) {
GribRecord obj = (GribRecord) rec;
try {
IDataStore dataStore = getDataStore(obj);
String abbrev = obj.getModelInfo()
.getParameterAbbreviation();
if (GribPathProvider.STATIC_PARAMETERS.contains(abbrev)) {
record = new IDataRecord[4];
record[0] = dataStore
.retrieve("/", abbrev, Request.ALL);
retVal.add(record);
} else {
/* connect to the data store and retrieve the data */
record = new IDataRecord[1];
record[0] = dataStore.retrieve(GribPathProvider
.getInstance().getGroup(obj), "Data",
Request.ALL);
retVal.add(record);
}
} catch (StorageException e) {
throw new PluginException("Error getting HDF5 data", e);
} catch (FileNotFoundException e) {
throw new PluginException("Error getting HDF5 data", e);
}
}
}
return retVal;
}
@Override
public void persistRecords(PluginDataObject... records)
throws PluginException {
List<PluginDataObject> toPersist = new ArrayList<PluginDataObject>();
for (PluginDataObject record : records) {
GribRecord rec = (GribRecord) record;
GribModel model = rec.getModelInfo();
if ((model.getParameterName() == null)
|| model.getParameterName().equals("Missing")) {
logger.info("Discarding record due to missing or unknown parameter mapping: "
+ record);
} else {
boolean validLevel = false;
Level level = model.getLevel();
if (level != null) {
MasterLevel ml = level.getMasterLevel();
if ((ml != null)
&& !LevelFactory.UNKNOWN_LEVEL.equals(ml.getName())) {
validLevel = true;
}
}
if (validLevel) {
toPersist.add(rec);
} else {
logger.info("Discarding record due to missing or unknown level mapping: "
+ record);
}
}
}
super.persistRecords(toPersist.toArray(new PluginDataObject[toPersist
.size()]));
}
@Override
public PluginDataObject[] persistToDatabase(PluginDataObject... records) {
return super.persistToDatabase(verifyRecords(records));
}
@Override
public StorageStatus persistToHDF5(PluginDataObject... records)
throws PluginException {
return super.persistToHDF5(verifyRecords(records));
}
private PluginDataObject[] verifyRecords(PluginDataObject... records) {
List<PluginDataObject> toPersist = new ArrayList<PluginDataObject>();
for (PluginDataObject record : records) {
GribRecord rec = (GribRecord) record;
GribModel model = rec.getModelInfo();
if ((model.getParameterName() == null)
|| model.getParameterName().equals("Missing")) {
logger.info("Discarding record due to missing or unknown parameter mapping: "
+ record);
} else {
boolean validLevel = false;
Level level = model.getLevel();
if (level != null) {
MasterLevel ml = level.getMasterLevel();
if ((ml != null)
&& !LevelFactory.UNKNOWN_LEVEL.equals(ml.getName())) {
validLevel = true;
}
}
if (validLevel) {
toPersist.add(rec);
} else {
logger.info("Discarding record due to missing or unknown level mapping: "
+ record);
}
}
}
return toPersist.toArray(new GribRecord[toPersist.size()]);
}
public boolean isSTopoInDb(GribRecord record) {
Session s = getHibernateTemplate().getSessionFactory().openSession();
try {
Criteria baseCriteria = s.createCriteria(GribRecord.class);
Criterion baseCritia = Restrictions.and(
Restrictions.eq("modelInfo", record.getModelInfo()),
Restrictions.eq("dataTime", record.getDataTime()));
baseCriteria.add(baseCritia);
List<?> results = baseCriteria.list();
if (results.isEmpty()) {
return false;
} else {
return true;
}
} finally {
if (s != null) {
s.flush();
s.close();
}
}
}
public List<StorageException> replaceRecord(GribRecord pdo)
throws PluginException {
List<StorageException> exceptions = new ArrayList<StorageException>();
IPersistable persistable = pdo;
// get the directory
String directory = pdo.getPluginName() + File.separator
+ pathProvider.getHDFPath(pdo.getPluginName(), pdo);
File dataStoreFile = new File(directory + File.separator
+ pathProvider.getHDFFileName(pdo.getPluginName(), persistable));
IDataStore dataStore = DataStoreFactory.getDataStore(dataStoreFile);
try {
populateDataStore(dataStore, persistable);
} catch (Exception e) {
throw new PluginException("Error populating data store", e);
}
StorageStatus s = null;
try {
s = dataStore.store(StoreOp.REPLACE);
// add exceptions to a list for aggregation
exceptions.addAll(Arrays.asList(s.getExceptions()));
} catch (StorageException e) {
logger.error("Error persisting to HDF5", e);
}
return exceptions;
}
public int purgeModelData(final String modelName) {
Integer recordsDeleted = (Integer) txTemplate
.execute(new TransactionCallback() {
@SuppressWarnings("unchecked")
@Override
public Object doInTransaction(TransactionStatus status) {
int rval = 0;
HibernateTemplate ht = getHibernateTemplate();
Session sess = ht.getSessionFactory()
.getCurrentSession();
Query modelIdQuery = sess
.createQuery("SELECT distinct id from GribModel where modelName = :modelName");
modelIdQuery.setString("modelName", modelName);
List<Integer> mIds = modelIdQuery.list();
for (Integer mId : mIds) {
Query query = sess
.createQuery("DELETE from GribRecord where modelInfo.id = :mId");
query.setInteger("mId", mId);
rval += query.executeUpdate();
}
return rval;
}
});
try {
updateCaches();
} catch (PluginException e) {
statusHandler.handle(Priority.PROBLEM,
"Could not update grib cache.", e);
}
return recordsDeleted;
}
public void purgeHdf5ModelData(final String modelName)
throws FileNotFoundException, StorageException {
IDataStore dataStore = DataStoreFactory.getDataStore(new File(
getHDF5Path("modelInfo.modelName=" + modelName)));
dataStore.deleteFiles(null);
}
}

View file

@ -1,163 +0,0 @@
/**
* 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.edex.plugin.grib.dao;
import java.io.FileNotFoundException;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.StatelessSession;
import org.hibernate.Transaction;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
import com.raytheon.uf.common.dataplugin.grib.GribModel;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.database.DataAccessLayerException;
import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig;
/**
* Deprecated, use grid
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
*
* </pre>
*
* @author bphillip
* @version 1
*/
@Deprecated
public class GribModelDao extends CoreDao {
private static final IUFStatusHandler handler = UFStatus
.getHandler(GribModelDao.class);
/**
* Creates a new GribModelDao
*/
public GribModelDao() {
super(DaoConfig.forClass(GribModel.class));
}
/**
* Checks the database to see if a model matching the provided model exists
* already
*
* @param model
* The model to check
* @return The model object from the database.
* @throws DataAccessLayerException
* If problems occur while querying
*/
public GribModel checkModel(GribModel model)
throws DataAccessLayerException {
if (model.getId() == null) {
model.generateId();
}
return (GribModel) this.queryById(model.getId());
}
@SuppressWarnings("unchecked")
public List<String> getModelNamesForCoverage(final int coverageId) {
return (List<String>) txTemplate.execute(new TransactionCallback() {
@Override
public Object doInTransaction(TransactionStatus status) {
HibernateTemplate ht = getHibernateTemplate();
Session sess = ht.getSessionFactory().getCurrentSession();
Criteria crit = sess.createCriteria(GribModel.class);
Criterion where = Restrictions.eq("location.id", coverageId);
crit.add(where);
crit.setProjection(Projections.distinct(Projections
.property("modelName")));
return crit.list();
}
});
}
public int deleteModelAndAssociatedData(final String modelName) {
int rval = 0;
// try/catch until successful or 3 tries
// have to retry in case purge is running same time or
// inserts that will cause PK violations.
int times = 0;
boolean retry = true;
HibernateTemplate ht = getHibernateTemplate();
while (retry) {
retry = false;
StatelessSession sess = null;
Transaction tx = null;
try {
GribDao recordDao = new GribDao();
recordDao.purgeModelData(modelName);
try {
recordDao.purgeHdf5ModelData(modelName);
} catch (FileNotFoundException e) {
// ignore
}
sess = ht.getSessionFactory().openStatelessSession();
tx = sess.beginTransaction();
rval += sess
.createQuery(
"DELETE FROM GribModel where modelName = :modelName")
.setString("modelName", modelName).executeUpdate();
tx.commit();
} catch (Exception e) {
if (tx != null) {
tx.rollback();
}
times++;
if (times < 3) {
retry = true;
} else {
handler.error(
"Failed " + times
+ " times to delete record/hdf5 for model "
+ modelName
+ ". Manual clean up may be required.", e);
}
} finally {
if (sess != null) {
sess.close();
}
tx = null;
sess = null;
}
}
return rval;
}
}

View file

@ -1,59 +0,0 @@
/**
* 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.edex.plugin.grib.handler;
import com.raytheon.edex.plugin.grib.dao.GribModelDao;
import com.raytheon.uf.common.dataplugin.grib.request.DeleteAllModelDataRequest;
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
/**
* Request handler for <code>DeleteAllModelDataRequest</code>.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 25, 2012 dgilling Initial creation
*
* </pre>
*
* @author dgilling
* @version 1.0
*/
public class DeleteAllModelDataHandler implements
IRequestHandler<DeleteAllModelDataRequest> {
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.common.serialization.comm.IRequestHandler#handleRequest
* (com.raytheon.uf.common.serialization.comm.IServerRequest)
*/
@Override
public Integer handleRequest(DeleteAllModelDataRequest request)
throws Exception {
return new GribModelDao().deleteModelAndAssociatedData(request
.getModelName());
}
}

View file

@ -1,122 +0,0 @@
/**
* 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.edex.plugin.grib.handler;
import java.sql.Timestamp;
import java.util.Arrays;
import java.util.List;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.grib.GribThriftContainer;
import com.raytheon.uf.common.dataplugin.grib.GribThriftRecord;
import com.raytheon.uf.common.dataplugin.grib.request.GridDataRequestMessage;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataquery.db.QueryParam.QueryOperand;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.edex.database.query.DatabaseQuery;
import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 12, 2010 brockwoo Initial creation
*
* </pre>
*
* @author brockwoo
* @version 1.0
*/
public class GridDataHandler implements IRequestHandler<GridDataRequestMessage> {
@Override
public Object handleRequest(GridDataRequestMessage request)
throws Exception {
GridDao dao = new GridDao();
DatabaseQuery query = new DatabaseQuery(GridRecord.class);
if (request.getModelName() != null
&& !"".equals(request.getModelName())) {
query.addQueryParam(GridConstants.DATASET_ID,
request.getModelName(), QueryOperand.EQUALS);
}
if (request.getLevelOne() != Level.INVALID_VALUE) {
query.addQueryParam(GridConstants.LEVEL_ONE, request.getLevelOne(),
QueryOperand.EQUALS);
if (request.getLevelType() != null) {
query.addQueryParam(GridConstants.MASTER_LEVEL_NAME,
request.getLevelType(), QueryOperand.EQUALS);
}
query.addQueryParam(GridConstants.LEVEL_TWO, request.getLevelTwo(),
QueryOperand.EQUALS);
}
if (request.getParameterAbbreviation() != null
&& !"".equals(request.getParameterAbbreviation())) {
query.addQueryParam(GridConstants.PARAMETER_ABBREVIATION,
request.getParameterAbbreviation(), QueryOperand.EQUALS);
}
if (request.getStartTime() != GridDataRequestMessage.MISSING) {
Timestamp stamp = new Timestamp(request.getStartTime());
DataTime newTime = new DataTime(stamp, request.getForecastTime());
query.addQueryParam("dataTime", newTime, QueryOperand.EQUALS);
}
GribThriftContainer container = new GribThriftContainer();
try {
PluginDataObject[] records = null;
records = dao.getFullRecord(query, -1);
if (records != null && records.length > 0) {
List<IDataRecord[]> hdfRecords = dao.getHDF5Data(
Arrays.asList(records), -1);
if (hdfRecords.size() != records.length) {
container.setNumOfRecords(-1);
return container;
}
GribThriftRecord thriftRecords[] = new GribThriftRecord[records.length];
for (int i = 0; i < records.length; i++) {
thriftRecords[i] = new GribThriftRecord();
IDataRecord[] data = hdfRecords.get(i);
GridRecord thisGribRecord = (GridRecord) records[i];
GridDataRequestMessage thisGribInfo = new GridDataRequestMessage();
thisGribInfo.setInfoFromRecord(thisGribRecord);
thriftRecords[i].setMessage(thisGribInfo);
thriftRecords[i].setDataFields(data);
}
container.setRecords(thriftRecords);
}
} catch (Exception e) {
container.setNumOfRecords(-1);
}
return container;
}
}

View file

@ -1,130 +0,0 @@
/**
* 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.edex.plugin.grib.util;
import java.lang.ref.WeakReference;
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
import com.raytheon.edex.plugin.grib.dao.GribModelDao;
import com.raytheon.uf.common.dataplugin.grib.GribModel;
import com.raytheon.uf.edex.database.DataAccessLayerException;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 29, 2010 rjpeter Initial creation
* </pre>
*
* @author rjpeter
* @version 1.0
*/
public class GribModelCache {
private static GribModelCache instance;
private Map<Integer, WeakReference<GribModel>> modelMap = new WeakHashMap<Integer, WeakReference<GribModel>>();
private Map<Integer, Object> threadSyncMap = new WeakHashMap<Integer, Object>();
private GribModelCache() {
}
public static synchronized GribModelCache getInstance() {
if (instance == null) {
instance = new GribModelCache();
}
return instance;
}
public GribModel getModel(GribModel modelToLookup)
throws DataAccessLayerException {
if (modelToLookup.getId() == null) {
modelToLookup.generateId();
}
Integer key = modelToLookup.getId();
GribModel rval = null;
WeakReference<GribModel> reference = modelMap.get(key);
if (reference == null || (rval = reference.get()) == null) {
// quick check for in memory reference failed, grab sync lock and
// check database
synchronized (getThreadSyncObject(key)) {
// due to sync lock need to double check map
reference = modelMap.get(key);
if (reference == null || (rval = reference.get()) == null) {
// was no prior sync'd thread
GribModelDao dao = new GribModelDao();
rval = dao.checkModel(modelToLookup);
if (rval == null) {
rval = modelToLookup;
dao.saveOrUpdate(rval);
}
modelMap.put(rval.getId(), new WeakReference<GribModel>(
rval));
}
}
}
// double check the location information hasn't changed
if (modelToLookup.getLocation().getId() != rval.getLocation().getId()) {
synchronized (getThreadSyncObject(key)) {
rval = modelToLookup;
GribModelDao dao = new GribModelDao();
dao.saveOrUpdate(rval);
modelMap.put(rval.getId(), new WeakReference<GribModel>(rval));
}
}
return rval;
}
public void purgeCache(List<Integer> modelKeys) {
synchronized (modelMap) {
for (Integer key : modelKeys) {
modelMap.remove(key);
}
}
}
private synchronized Object getThreadSyncObject(Integer key) {
Object rval = threadSyncMap.get(key);
if (rval == null) {
rval = new Object();
threadSyncMap.put(key, rval);
}
return rval;
}
}

View file

@ -19,9 +19,7 @@
**/
package com.raytheon.edex.plugin.grib.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -30,22 +28,16 @@ import javax.xml.bind.JAXB;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.raytheon.edex.plugin.grib.exception.GribException;
import com.raytheon.edex.plugin.grib.spatial.GribSpatialCache;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoSet;
import com.raytheon.uf.common.dataplugin.grid.mapping.DatasetIdMapper;
import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.util.mapping.Alias;
import com.raytheon.uf.common.util.mapping.AliasList;
import com.raytheon.uf.common.util.mapping.MultipleMappingException;
/**
@ -56,12 +48,13 @@ import com.raytheon.uf.common.util.mapping.MultipleMappingException;
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 29, 2013 DR 15715 dhuffman Near line 202; Transposed edex site and base precedence
* per DR: loading was in reverse.
* Apr 30, 2013 bsteffen Initial javadoc
* Apr 30, 2013 1961 bsteffen Add ability to disable grib tables.
* Date Ticket# Engineer Description
* ------------- -------- ----------- --------------------------
* Apr 29, 2013 15715 dhuffman Near line 202; Transposed edex site and
* base precedence per DR: loading was in
* reverse.
* Apr 30, 2013 1961 bsteffen Add ability to disable grib tables.
* Oct 14, 2013 2473 bsteffen Remove lookup of deprecated grib files.
*
* </pre>
*
@ -244,106 +237,6 @@ public class GribModelLookup {
}
}
/**
* GribModels files used to be in common and contained information used on
* viz. This information has been moved to datasetInfo files and now the
* gribModel files should only be used on edex. To ease this transition this
* method will search for any old common files and generate datasetInfo
* files. At some point in the future all files should be converted and this
* method can be removed.
*
*
* @return
* @throws GribException
*/
public Boolean initCommonStaticModels() {
GridModelSet modelSet = new GridModelSet();
LocalizationContext commonStaticSite = PathManagerFactory
.getPathManager().getContext(
LocalizationContext.LocalizationType.COMMON_STATIC,
LocalizationContext.LocalizationLevel.SITE);
LocalizationFile[] legacyFiles = PathManagerFactory.getPathManager()
.listFiles(new LocalizationContext[] { commonStaticSite },
"grid" + IPathManager.SEPARATOR + "models", // Win32
new String[] { ".xml" }, false, true);
List<Alias> aliasList = new ArrayList<Alias>(legacyFiles.length * 64);
for (LocalizationFile modelFile : legacyFiles) {
try {
logger.info("Loading deprecated gribModel file: "
+ modelFile.getFile());
GridModelSet fileSet = JAXB.unmarshal(modelFile.getFile(),
GridModelSet.class);
modelSet.addModels(fileSet.getModels());
ArrayList<DatasetInfo> infoList = new ArrayList<DatasetInfo>(
fileSet.getModels().size());
for (GridModel model : fileSet.getModels()) {
DatasetInfo info = new DatasetInfo();
info.setDatasetId(model.getName());
info.setTitle(model.getTitle());
info.setDt(model.getDt());
info.setAlias(model.getAlias());
infoList.add(info);
if (model.getParamInfo() != null) {
aliasList.add(new Alias(model.getName(), model
.getParamInfo()));
}
}
LocalizationFile file = PathManagerFactory.getPathManager()
.getLocalizationFile(
commonStaticSite,
"/grid/datasetInfo/imported-"
+ modelFile.getFile().getName());
if (!file.exists()) {
DatasetInfoSet infoSet = new DatasetInfoSet();
infoSet.setInfos(infoList);
JAXB.marshal(infoSet, file.getFile());
file.save();
}
} catch (Exception e) {
logger.error("Unable to unmarshal grib models file:"
+ modelFile, e);
}
}
if (!aliasList.isEmpty()) {
LocalizationFile file = PathManagerFactory.getPathManager()
.getLocalizationFile(
commonStaticSite,
"/grid/dataset/alias/gfeParamInfo.xml");
if (!file.exists()) {
LocalizationContext commonStaticBase = PathManagerFactory
.getPathManager()
.getContext(
LocalizationContext.LocalizationType.COMMON_STATIC,
LocalizationContext.LocalizationLevel.BASE);
LocalizationFile baseFile = PathManagerFactory.getPathManager()
.getLocalizationFile(commonStaticBase,
"/grid/dataset/alias/gfeParamInfo.xml");
AliasList al = null;
if (baseFile.exists()) {
al = JAXB.unmarshal(baseFile.getFile(), AliasList.class);
al.getAliasList().addAll(aliasList);
} else {
al = new AliasList();
al.setAliasList(aliasList);
al.setNamespace("gfeParamInfo");
}
JAXB.marshal(al, file.getFile());
try {
file.save();
} catch (LocalizationOpFailedException e) {
statusHandler.handle(Priority.PROBLEM,
"Unable to save gfe ParamInfo aliases", e);
}
}
}
if (modelSet.getModels() != null) {
addModels(modelSet);
}
return modelSet.getModels() != null && !modelSet.getModels().isEmpty();
}
private String toKey(Integer center, Integer subcenter, String grid,
Integer process) {

View file

@ -1,124 +0,0 @@
/**
* 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.edex.util.grib;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.uf.edex.core.props.PropertiesFactory;
/**
* Factory class for retrieving level names and parameter names based on
* information extracted from a grib file.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 9/26/07 381 bphillip initial check in
*
*
* </pre>
*/
public class GribPropertiesFactory {
private XMLConfiguration lookup;
/** The instance */
private static GribPropertiesFactory instance;
private int undefinedCounter = 0;
/**
* Gets the singleton instance of GribPropertiesFactory
*
* @return The singleton instance of GribPropertiesFactory
*/
public synchronized static GribPropertiesFactory getInstance() {
if (instance == null) {
instance = new GribPropertiesFactory();
}
return instance;
}
/**
* Constructs a new GribPropertiesFactory
*/
public GribPropertiesFactory() {
String resDir = PropertiesFactory.getInstance().getEnvProperties()
.getEnvValue("RESFOLDER");
lookup = new XMLConfiguration();
try {
lookup.load(resDir + "/tablelookup.xml");
} catch (ConfigurationException e) {
e.printStackTrace();
}
}
/**
* Retrieves the appropriate grib1 parameter table <br>
* Refer to the parameter tables located in the res/parameters directory of
* this plugin
*
* @param center
* The orignating center
* @param subCenter
* The originating sub-center
* @param tableVersion
* The table version
* @return The parameter configuration
* @throws Exception
* If a parameter table does not exist for this
* center/sub-center/tableversion combination
*/
public String getConfig(int center, int subCenter, int tableVersion)
throws DecoderException {
// Attempt to retrieve the correct table
String tableName = lookup.getString("center_" + String.valueOf(center)
+ ".subcenter_" + String.valueOf(subCenter) + ".version_"
+ String.valueOf(tableVersion));
// No table was found. Look for a default table to use with this
// center/subcenter.
if (tableName == null) {
tableName = lookup.getString("center_" + String.valueOf(center)
+ ".subcenter_-1.version_" + String.valueOf(tableVersion));
}
// If no default table is defined, decoding cannot continue
if (tableName == null) {
throw new DecoderException(
"Parameter table does not exist for Center: " + center
+ " Sub-Center: " + subCenter + " Version: "
+ tableVersion);
}
return tableName;
}
public int getUndefinedCounter() {
return undefinedCounter++;
}
}

View file

@ -1,76 +0,0 @@
/**
* 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.edex.util.grib;
import java.util.HashMap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.serialization.ISerializableObject;
/**
* Contains a map of short level names to their full name in the database.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 5, 2008 njensen Initial creation
* Aug 22, 2008 1502 dglazesk JAXB Annotations added
*
* </pre>
*
* @author njensen
* @version 1.0
*/
/**
* @XmlAccessType intentionally left off so that the default JAXB marshallers
* and unmarshallers can properly deal with the XML.
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "levels")
public class GridLevels implements ISerializableObject {
private HashMap<String, String> map = new HashMap<String, String>();
/**
* Constructor for JAXB.
*/
public GridLevels() {
}
/**
* @return the map
*/
public HashMap<String, String> getMap() {
return map;
}
/**
* @param map
* the map to set
*/
public void setMap(HashMap<String, String> map) {
this.map = map;
}
}

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pathKeySet>
<pathKey>
<key>modelInfo.modelName</key>
<order>0</order>
</pathKey>
<pathKey>
<key>modelInfo.level.masterLevel.name</key>
<order>0</order>
</pathKey>
</pathKeySet>

View file

@ -1,736 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<purgeRuleSet>
<key>modelInfo.modelName</key>
<!-- Default rule for data not covered by any rules, 2 versions up to 7 days-->
<defaultRule>
<versionsToKeep>2</versionsToKeep>
<period>07-00:00:00</period>
</defaultRule>
<!-- Purge rule for the NAM80 (ETA) model -->
<rule>
<keyValue>ETA</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the RUC80 (RUC) model -->
<rule>
<keyValue>RUC</keyValue>
<versionsToKeep>8</versionsToKeep>
</rule>
<!-- Purge rule for the GFS180 (AVN) model -->
<rule>
<keyValue>AVN</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the LAPS model -->
<rule>
<keyValue>LAPS</keyValue>
<versionsToKeep>30</versionsToKeep>
</rule>
<!-- Purge rule for the NGM80 (NGM) model -->
<rule>
<keyValue>NGM</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the gfsLR (MRF) model -->
<rule>
<keyValue>MRF</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the MSAS model -->
<rule>
<keyValue>MSAS</keyValue>
<versionsToKeep>24</versionsToKeep>
</rule>
<!-- Purge rule for the GFS360 (GFS201) model -->
<rule>
<keyValue>GFS201</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the gfsLR (mrfNH) model -->
<rule>
<keyValue>mrfNH</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the GFS90 (GFS213) model -->
<rule>
<keyValue>GFS213</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the NGM90 (NGM213) model -->
<rule>
<keyValue>NGM213</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the NGM180 (NGM202) model -->
<rule>
<keyValue>NGM202</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the GFS80 (AVN211) model -->
<rule>
<keyValue>AVN211</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the NAM40 (mesoEta212) model -->
<rule>
<keyValue>mesoEta212</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the NAM20 (mesoEta215) model -->
<rule>
<keyValue>mesoEta215</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rules for the GFSensemble models -->
<rule>
<keyValue>ENSEMBLE</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE37</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE38</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE39</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE40</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE41</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE42</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE43</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ENSEMBLE44</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the NAMWX (ETA212) model -->
<rule>
<keyValue>ETA212</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the gfs190 (MRF203) model -->
<rule>
<keyValue>MRF203</keyValue>
<versionsToKeep>3</versionsToKeep>
</rule>
<!-- Purge rule for the GFS190 (AVN203) model -->
<rule>
<keyValue>AVN203</keyValue>
<versionsToKeep>3</versionsToKeep>
</rule>
<!-- Purge rule for the GFS150 (MRF204) model -->
<rule>
<keyValue>MRF204</keyValue>
<versionsToKeep>3</versionsToKeep>
</rule>
<!-- Purge rule for the GFS150 (MRF205) model -->
<rule>
<keyValue>MRF205</keyValue>
<versionsToKeep>3</versionsToKeep>
</rule>
<!-- Purge rule for the NGM95 (NGM207) model -->
<rule>
<keyValue>NGM207</keyValue>
<versionsToKeep>3</versionsToKeep>
</rule>
<!-- Purge rule for the NAM95 (NAM95) model -->
<rule>
<keyValue>NAM207</keyValue>
<versionsToKeep>3</versionsToKeep>
</rule>
<!-- Purge rule for the ECMWF (ECMF-NorthernHemisphere) model -->
<rule>
<keyValue>ECMF-NorthernHemisphere</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF1</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF2</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF3</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF4</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF5</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF6</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF7</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF8</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF9</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF10</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF11</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>ECMF12</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the UKMET (UKMET-NorthernHemisphere) model -->
<rule>
<keyValue>UKMET-NorthernHemisphere</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET37</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET38</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET39</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET40</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET41</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET42</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET43</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>UKMET44</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the AVN (AVN-NorthernHemisphere) model -->
<rule>
<keyValue>AVN-NorthernHemisphere</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN37</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN38</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN39</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN40</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN41</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN42</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN43</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<rule>
<keyValue>AVN44</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the GWW (GWW233) model -->
<rule>
<keyValue>GWW233</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the RFCqpf (RFCqpf) model -->
<rule>
<keyValue>RFCqpf</keyValue>
<versionsToKeep>5</versionsToKeep>
</rule>
<!-- Purge rule for the RUC40 (RUC236) model -->
<rule>
<keyValue>RUC236</keyValue>
<versionsToKeep>8</versionsToKeep>
</rule>
<!-- Purge rule for the GFS75 (AVN225) model -->
<rule>
<keyValue>AVN225</keyValue>
<versionsToKeep>3</versionsToKeep>
</rule>
<!-- Purge rule for the WNAwave (WNAWAVE238) model -->
<rule>
<keyValue>WNAWAVE238</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the AK-NAM40 (mesoEta216) model -->
<rule>
<keyValue>mesoEta216</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the AK-NAM20 (mesoEta217) model -->
<rule>
<keyValue>mesoEta217</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the NAM12 (ETA218) model -->
<rule>
<keyValue>ETA218</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the AK-NAM12 (ETA242) model -->
<rule>
<keyValue>ETA242</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HPCqpf (HPCqpf) model -->
<rule>
<keyValue>HPCqpf</keyValue>
<versionsToKeep>5</versionsToKeep>
</rule>
<!-- Purge rule for the ENPwave (ENPWAVE253) model -->
<rule>
<keyValue>ENPWAVE253</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HPCdelta (HPCdelta) model -->
<rule>
<keyValue>HPCdelta</keyValue>
<versionsToKeep>4</versionsToKeep>
</rule>
<!-- Purge rule for the TPC-HurWind (HurWind226) model -->
<rule>
<keyValue>HurWind226</keyValue>
<versionsToKeep>4</versionsToKeep>
</rule>
<!-- Purge rule for the CPCoutlook-Long (CPCoutlook211) model -->
<rule>
<keyValue>CPCoutlook211</keyValue>
<versionsToKeep>14</versionsToKeep>
</rule>
<!-- Purge rule for the RTG-SST-HR-Analysis (RTGSSTHR) model -->
<rule>
<keyValue>RTGSSTHR</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the NICICE (NICICE) model -->
<rule>
<keyValue>NICICE</keyValue>
<versionsToKeep>2</versionsToKeep>
</rule>
<!-- Purge rule for the DGEX (DGEX185) model -->
<rule>
<keyValue>DGEX185</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HPCGuide (HPCGuide) model -->
<rule>
<keyValue>HPCGuide</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HPCGuide (HPCGuide 2.5km) model -->
<rule>
<keyValue>HPCGuide-2.5km</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the GFSGuide (GFSGuide) model -->
<rule>
<keyValue>GFSGuide</keyValue>
<versionsToKeep>8</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the GFS40 (GFS212) model -->
<rule>
<keyValue>GFS212</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the AK-GFS (GFS160) model -->
<rule>
<keyValue>GFS160</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the PR-GFS (GFS254) model -->
<rule>
<keyValue>GFS254</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the SJU-GFS (GFS161) model -->
<rule>
<keyValue>GFS161</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the MPE (MPE-Local) model -->
<rule>
<keyValue>MPE-Local</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<!-- Purge rule for the TPCWindProb (TPCWindProb) model -->
<rule>
<keyValue>TPCWindProb</keyValue>
<versionsToKeep>8</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the GriddedMOS (MOSGuide) model -->
<rule>
<keyValue>MOSGuide</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the QPE models -->
<rule>
<keyValue>QPE</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-TUA</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-ACR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-STR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-RSA</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-ORN</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-RHA</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-KRF</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-MSR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-TAR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-PTR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-TIR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-ALR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<rule>
<keyValue>QPE-FWR</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<!-- End RFC QPE models -->
<!-- Purge rule for the OPCWave-W-ATL (OPCWave180) model -->
<rule>
<keyValue>OPCWave180</keyValue>
<versionsToKeep>8</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the OPCWave-NE-PAC (OPCWave181) model -->
<rule>
<keyValue>OPCWave181</keyValue>
<versionsToKeep>8</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the OPCWave-TE-PAC (OPCWave182) model -->
<rule>
<keyValue>OPCWave182</keyValue>
<versionsToKeep>8</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the RTMA (RTMA) model -->
<rule>
<keyValue>RTMA</keyValue>
<versionsToKeep>24</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the SREF (SREF212) model -->
<rule>
<keyValue>SREF212</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the RTG-SST-Analysis (RTGSST) model -->
<rule>
<keyValue>RTGSST</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the GFSLAMP-Grid (GFSLAMPTstorm) model -->
<rule>
<keyValue>GFSLAMPTstorm</keyValue>
<versionsToKeep>24</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the ECMWF-HiRes (ECMWF-HiRes) model -->
<rule>
<keyValue>ECMWF-HiRes</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HPC (HPCqpfNDFD) model -->
<rule>
<keyValue>HPCqpfNDFD</keyValue>
<versionsToKeep>42</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the NamDNG5 (NamDNG5) model -->
<rule>
<keyValue>NamDNG5</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the TPCSurgeProb (TPCSurgeProb) model -->
<rule>
<keyValue>TPCSurgeProb</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the PHISH (PHISH) model -->
<rule>
<keyValue>PHISH</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HPE (HPE) model -->
<rule>
<keyValue>HPE</keyValue>
<period>00-12:00:00</period>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the BiasHPE (BHPE) model -->
<rule>
<keyValue>BHPE</keyValue>
<period>00-12:00:00</period>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the GlobalWave (GlobalWave) model -->
<rule>
<keyValue>GlobalWave</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the AKwave10 (AKwave10) model -->
<rule>
<keyValue>AKWave10</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the AKwave4 (AKwave4) model -->
<rule>
<keyValue>AKWave4</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the EPwave10 (EPwave10) model -->
<rule>
<keyValue>EPWave10</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the WCwave10 (WCwave10) model -->
<rule>
<keyValue>WCWave10</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the WCwave4 (WCwave4) model -->
<rule>
<keyValue>WCWave4</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the WNAwave10 (WNAwave10) model -->
<rule>
<keyValue>WNAWave10</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the WNAwave4 (WNAwave4) model -->
<rule>
<keyValue>WNAWave4</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the AK-GriddedMOS (MOSGuide-AK) model -->
<rule>
<keyValue>MOSGuide-AK</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HI-RTMA (HI-RTMA) model -->
<rule>
<keyValue>HI_RTMA</keyValue>
<versionsToKeep>24</versionsToKeep>
</rule>
<!-- Purge rule for the HiResW-ARW-East (HiResW-ARW-East) model -->
<rule>
<keyValue>HiRes-ARW-East</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-ARW-West (HiResW-ARW-West) model -->
<rule>
<keyValue>HiRes-ARW-West</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-ARW-AK (HiResW-ARW-AK) model -->
<rule>
<keyValue>HiRes-ARW-AK</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-ARW-HI (HiResW-ARW-HI) model -->
<rule>
<keyValue>HiRes-ARW-HI</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-ARW-SJU (HiResW-ARW-SJU) model -->
<rule>
<keyValue>HiRes-ARW-SJU</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-NMM-East (HiResW-NMM-East) model -->
<rule>
<keyValue>HiRes-NMM-East</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-NMM-West (HiResW-NMM-West) model -->
<rule>
<keyValue>HiRes-NMM-West</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-NMM-AK (HiResW-NMM-AK) model -->
<rule>
<keyValue>HiRes-NMM-AK</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-NMM-HI (HiResW-NMM-HI) model -->
<rule>
<keyValue>HiRes-NMM-HI</keyValue>
<versionsToKeep>2</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the HiResW-NMM-SJU (HiResW-NMM-SJU) model -->
<rule>
<keyValue>HiRes-NMM-SJU</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the GRLKwave (GRLKwave) model -->
<rule>
<keyValue>GRLKwave</keyValue>
<versionsToKeep>1</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the CPCoutlook-Short (CPCoutlook-Short) model -->
<rule>
<keyValue>CPCoutlook-Short</keyValue>
<versionsToKeep>5</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the CPCoutlook-Medium (CPCoutlook-Medium) model -->
<rule>
<keyValue>CPCoutlook-Medium</keyValue>
<versionsToKeep>7</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the CPCoutlook-Short-AK (CPCoutlook-Short-AK) model -->
<rule>
<keyValue>CPCoutlook-Short-AK</keyValue>
<versionsToKeep>5</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the CPCoutlook-Medium (CPCoutlook-Medium-AK) model -->
<rule>
<keyValue>CPCoutlook-Medium-AK</keyValue>
<versionsToKeep>7</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
<!-- Purge rule for the SPCGuide (SPCGuide) model -->
<rule>
<keyValue>SPCGuide</keyValue>
<versionsToKeep>5</versionsToKeep>
<modTimeToWait>00-00:15:00</modTimeToWait>
</rule>
</purgeRuleSet>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="test-bin" path="test"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.common.dataplugin.grib</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.5</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>

View file

@ -1,7 +0,0 @@
#Thu Mar 26 10:30:29 CDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -1,27 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Grib Plug-in
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.grib
Bundle-Version: 1.12.1174.qualifier
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Bundle-Vendor: Raytheon
Require-Bundle: javax.measure,
javax.persistence,
org.apache.commons.lang,
org.geotools,
com.raytheon.edex.common,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.serialization,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.status,
com.raytheon.uf.common.localization,
com.raytheon.uf.common.dataplugin.grid;bundle-version="1.0.0"
Import-Package: com.raytheon.uf.common.dataplugin.grid,
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.gridcoverage,
com.raytheon.uf.common.gridcoverage.exception,
com.raytheon.uf.common.parameter
Export-Package: com.raytheon.uf.common.dataplugin.grib,
com.raytheon.uf.common.dataplugin.grib.request
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View file

@ -1,2 +0,0 @@
com.raytheon.uf.common.dataplugin.grib.GribModel
com.raytheon.uf.common.dataplugin.grib.GribRecord

View file

@ -1,6 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
res,\
res/

View file

@ -1,39 +0,0 @@
/**
* 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.
**/
CREATE INDEX "gribModelInfo_idx"
ON grib
USING btree
(modelinfo_id);
CREATE INDEX "gribGfeParmId_idx"
ON grib_models
USING btree
(parameterabbreviation, level_id, modelname);
CREATE INDEX "gribGfeParmId2_idx"
ON grib
USING btree
(modelinfo_id, reftime);
CREATE INDEX "gribGfeModel_idx"
ON grib_models
USING btree
(modelname);

View file

@ -1,21 +0,0 @@
/**
* 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.
**/
update cluster_task set extraInfo = 0 where name = 'grib' and details = 'spatialCache';

View file

@ -1,880 +0,0 @@
/**
* 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.dataplugin.grib;
import java.text.ParsePosition;
import java.util.Calendar;
import javax.measure.unit.Unit;
import javax.measure.unit.UnitFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* Deprecated, use grid
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
*
* </pre>
*
* @author bphillip
* @version 1
*/
@Entity
@Table(name = "grib_models")
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@Deprecated
public class GribModel extends PersistableDataObject {
private static final long serialVersionUID = 4417959632479879335L;
/** The id */
@Id
@DynamicSerializeElement
private Integer id;
/** The originating center ID */
@Column
@XmlAttribute
@DynamicSerializeElement
private int centerid;
/** The national subcenter ID */
@Column
@XmlAttribute
@DynamicSerializeElement
private int subcenterid;
/** The generating process number */
@Column
@XmlAttribute
@DynamicSerializeElement
private int genprocess;
/** The backgenprocess number */
@Column
@XmlAttribute
@DynamicSerializeElement
private int backGenprocess;
/** The name of the grib parameter */
@Column
@XmlAttribute
@DynamicSerializeElement
private String parameterName;
/**
* The abbreviation for the grib parameter. For accumulation and probability
* parameters, the duration is appended
*/
@Column
@DataURI(position = 1)
@XmlAttribute
@DynamicSerializeElement
private String parameterAbbreviation;
/** The unit for this grib parameter */
@Column
@XmlAttribute
@DynamicSerializeElement
private String parameterUnit;
/** The grid number */
@Column
@XmlAttribute
@DynamicSerializeElement
private String gridid;
@Column
@XmlAttribute
@DynamicSerializeElement
private int gridNumber;
/**
* The pds template number (grib 2) from which this information was
* extracted
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private int pdsTemplate;
/** The type of ensemble forecast (See Code table 4.6) */
@Column
@XmlAttribute
@DynamicSerializeElement
@DataURI(position = 3)
private Integer typeEnsemble;
/** The perturbation number of the ensemble */
@Column
@XmlAttribute
@DynamicSerializeElement
@DataURI(position = 4)
private Integer perturbationNumber;
/** The number of forecasts in the ensemble */
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer numForecasts;
/** The unique model name (i.e.NAM212) */
@Column
@DataURI(position = 0)
@XmlAttribute
@DynamicSerializeElement
private String modelName;
/** The database insert time of the object */
@Column(columnDefinition = "timestamp without time zone default now()", insertable = false, updatable = true)
private Calendar insertTime;
/** The spatial information */
@ManyToOne
@PrimaryKeyJoinColumn
@XmlElement
@DynamicSerializeElement
private GridCoverage location;
@ManyToOne
@PrimaryKeyJoinColumn
@XmlElement
@DynamicSerializeElement
@DataURI(position = 2, embedded = true)
private Level level;
/**
* Creates and empty GribModel object
*/
public GribModel() {
}
/**
* Copy constructor
*/
public GribModel(GribModel copy) {
this.backGenprocess = copy.backGenprocess;
this.centerid = copy.centerid;
this.genprocess = copy.genprocess;
this.gridid = copy.gridid;
this.gridNumber = copy.gridNumber;
this.id = copy.id;
if (copy.insertTime != null) {
this.insertTime = (Calendar) copy.insertTime.clone();
}
this.level = copy.level;
this.location = copy.location;
this.modelName = copy.modelName;
this.numForecasts = copy.numForecasts;
this.parameterAbbreviation = copy.parameterAbbreviation;
this.parameterName = copy.parameterName;
this.parameterUnit = copy.parameterUnit;
this.pdsTemplate = copy.pdsTemplate;
this.perturbationNumber = copy.perturbationNumber;
this.subcenterid = copy.subcenterid;
this.typeEnsemble = copy.typeEnsemble;
}
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(" Id: ").append(id).append("\n");
buffer.append(" PDS Template: ").append(pdsTemplate)
.append("\n");
buffer.append(" Center: ").append(centerid).append("\n");
buffer.append(" Subcenter: ").append(subcenterid)
.append("\n");
buffer.append(" Model Name: ").append(modelName)
.append("\n");
buffer.append(" Generating Process: ").append(genprocess)
.append("\n");
buffer.append(" Parameter Name: ").append(parameterName)
.append("\n");
buffer.append("Parameter Abbreviation: ").append(parameterAbbreviation)
.append("\n");
buffer.append(" Parameter Unit: ")
.append(getParamterUnitPrettyString()).append("\n");
if (level != null) {
buffer.append(" Level Name: ")
.append(level.getMasterLevel().getName()).append("\n");
buffer.append(" Level One Value: ")
.append(level.getLevelonevalue()).append("\n");
buffer.append(" Level Two Value: ")
.append(level.getLeveltwovalue()).append("\n");
buffer.append(" Level Unit: ")
.append(getLevelUnitPrettyString()).append("\n");
} else {
}
buffer.append(" Type Ensemble: ").append(typeEnsemble)
.append("\n");
buffer.append(" Perturbation Number: ").append(perturbationNumber)
.append("\n");
buffer.append(" Num Forecasts: ").append(numForecasts)
.append("\n");
if (location == null) {
buffer.append("Location is NULL").append("\n");
} else {
buffer.append(location.toString()).append("\n");
}
return buffer.toString();
}
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
builder.append(modelName);
builder.append(parameterName);
builder.append(parameterAbbreviation);
builder.append(level);
builder.append(typeEnsemble);
builder.append(perturbationNumber);
return builder.toHashCode();
}
/**
* Generates a unique id from the hashcode of this object
*/
public void generateId() {
this.id = hashCode();
}
/**
* Gets the level unit as a javax.measure.Unit<?> object. If the level unit
* string cannot be successfully converted to a javax.measure.Unit<?>
* object, Unit.ONE is returned
*
* @return The level unit as a javax.measure.Unit<?> object
*/
public Unit<?> getLevelUnitObject() {
Unit<?> retVal = Unit.ONE;
if (level != null) {
Unit<?> tmp = level.getMasterLevel().getUnit();
if (tmp != null) {
retVal = tmp;
}
}
return retVal;
}
/**
* Gets the level unit as a pretty string meaning superscripts and
* subscripts are printed accordingly
*
* @return The level unit as a pretty string
*/
public String getLevelUnitPrettyString() {
Unit<?> unitObj = getLevelUnitObject();
if (unitObj.equals(Unit.ONE)) {
return "";
} else {
return unitObj.toString();
}
}
/**
* Gets the parameter unit as a javax.measure.Unit<?> object. If the
* parameter unit string cannot be successfully converted to a
* javax.measure.Unit<?> object, Unit.ONE is returned
*
* @return The parameter unit as a javax.measure.Unit<?> object
*/
public Unit<?> getParameterUnitObject() {
Unit<?> retVal = Unit.ONE;
if (this.parameterUnit != null) {
try {
retVal = UnitFormat.getUCUMInstance().parseProductUnit(
this.parameterUnit, new ParsePosition(0));
} catch (Exception e) {
// Unable to parse
retVal = Unit.ONE;
}
}
return retVal;
}
/**
* Gets the parameter unit as a pretty string meaning superscripts and
* subscripts are printed accordingly
*
* @return The parameter unit as a pretty string
*/
public String getParamterUnitPrettyString() {
Unit<?> unitObj = getParameterUnitObject();
if (unitObj.equals(Unit.ONE)) {
return this.parameterUnit;
} else {
return unitObj.toString();
}
}
/**
* Gets the id
*
* @return The id
*/
public Integer getId() {
return id;
}
/**
* Sets the id
*
* @param id
* The id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* Gets the center id
*
* @return The center id
*/
public int getCenterid() {
return centerid;
}
/**
* Sets the subcenter id
*
* @param centerid
* The subcenter id
*/
public void setCenterid(int centerid) {
this.centerid = centerid;
}
/**
* Gets the subcenter id
*
* @return The subcenter id
*/
public int getSubcenterid() {
return subcenterid;
}
/**
* Sets the subcenter id
*
* @param subcenterid
* The subcenter id
*/
public void setSubcenterid(int subcenterid) {
this.subcenterid = subcenterid;
}
/**
* Gets the genprocess
*
* @return The genprocess
*/
public int getGenprocess() {
return genprocess;
}
/**
* Sets the genproces
*
* @param genprocess
* The genprocess
*/
public void setGenprocess(int genprocess) {
this.genprocess = genprocess;
}
/**
* Gets the parameter name
*
* @return parameterName
*/
public String getParameterName() {
return parameterName;
}
/**
* Sets the parameter name
*
* @param parameterName
* The parameter nam
*/
public void setParameterName(String parameterName) {
this.parameterName = parameterName;
}
/**
* Gets the parameter abbreviation
*
* @return The parameter abbreviation
*/
public String getParameterAbbreviation() {
return parameterAbbreviation;
}
/**
* Sets the parameter abbreviation
*
* @param parameterAbbreviation
* The parameter abbreviation
*/
public void setParameterAbbreviation(String parameterAbbreviation) {
this.parameterAbbreviation = parameterAbbreviation;
}
/**
* Gets the parameter unit
*
* @return The parameter unit
*/
public String getParameterUnit() {
return parameterUnit;
}
/**
* Sets the parameter unit
*
* @param parameterUnit
* The parameter unit
*/
public void setParameterUnit(String parameterUnit) {
this.parameterUnit = parameterUnit;
}
/**
* Gets the level name
*
* @return The level name
*/
public String getLevelName() {
String rval = null;
if (level != null) {
rval = level.getMasterLevel().getName();
}
return rval;
}
/**
* Gets the level one value
*
* @return The level one value
*/
public Double getLevelOneValue() {
Double rval = null;
if (level != null) {
rval = level.getLevelonevalue();
}
return rval;
}
/**
* Gets the level two value
*
* @return The level two value
*/
public Double getLevelTwoValue() {
Double rval = null;
if (level != null) {
rval = level.getLeveltwovalue();
}
return rval;
}
/**
* Gets the level unit
*
* @return The level unit
*/
public String getLevelUnit() {
String rval = null;
if (level != null) {
rval = level.getMasterLevel().getUnitString();
}
return rval;
}
/**
* Gets the level info
*
* @return The level info
*/
public String getLevelInfo() {
String rval = null;
if (level != null) {
rval = level.getLevelInfo();
}
return rval;
}
/**
* Gets the grid id
*
* @return The grid id
*/
public String getGridid() {
return gridid;
}
/**
* Sets the grid id
*
* @param gridid
* The grid id
*/
public void setGridid(String gridid) {
this.gridid = gridid;
try {
gridNumber = Integer.parseInt(gridid);
} catch (NumberFormatException e) {
gridNumber = -1;
}
}
/**
* Gets the database insert time
*
* @return The database insert time
*/
public Calendar getInsertTime() {
return insertTime;
}
/**
* Sets the database insert time
*
* @param insertTime
* The database insert time
*/
public void setInsertTime(Calendar insertTime) {
this.insertTime = insertTime;
}
/**
* Gets the spatial information
*
* @return The spatial information
*/
public GridCoverage getLocation() {
return location;
}
/**
* Sets the spatial information
*
* @param location
* The spatial information
*/
public void setLocation(GridCoverage location) {
this.location = location;
}
/**
* Gets the level information
*
* @return The level information
*/
public Level getLevel() {
return level;
}
/**
* Sets the level information
*
* @param level
* The level information
*/
public void setLevel(Level level) {
this.level = level;
}
/**
* Gets the ensemble type
*
* @return The ensemble type
*/
public Integer getTypeEnsemble() {
return typeEnsemble;
}
/**
* Sets the ensemble type
*
* @param typeEnsemble
* The ensemble type
*/
public void setTypeEnsemble(Integer typeEnsemble) {
this.typeEnsemble = typeEnsemble;
}
/**
* Gets the perturbation number
*
* @return The perturbation number
*/
public Integer getPerturbationNumber() {
return perturbationNumber;
}
/**
* Sets the perturbation number
*
* @param perturbationNumber
* The perturbation number
*/
public void setPerturbationNumber(Integer perturbationNumber) {
this.perturbationNumber = perturbationNumber;
}
/**
* Gets the number of ensemble forecasts
*
* @return The number of ensemble forecasts
*/
public Integer getNumForecasts() {
return numForecasts;
}
/**
* Sets the number of ensemble forecasts
*
* @param numForecasts
* The number of ensemble forecasts
*/
public void setNumForecasts(Integer numForecasts) {
this.numForecasts = numForecasts;
}
/**
* Gets the background generating process
*
* @return The background generating process
*/
public int getBackGenprocess() {
return backGenprocess;
}
/**
* Sets the background generating process
*
* @param backGenprocess
* The background generating process
*/
public void setBackGenprocess(int backGenprocess) {
this.backGenprocess = backGenprocess;
}
/**
* Gets the pds template number
*
* @return The pds template number
*/
public int getPdsTemplate() {
return pdsTemplate;
}
/**
* Sets the pds template number
*
* @param pdsTemplate
* The pds template number
*/
public void setPdsTemplate(int pdsTemplate) {
this.pdsTemplate = pdsTemplate;
}
public String getModelName() {
return modelName;
}
public String getModelTitle() {
String rval = null;
if (modelName != null) {
DatasetInfo model = DatasetInfoLookup.getInstance().getInfo(
modelName);
if (model != null) {
rval = model.getTitle();
} else {
rval = modelName;
}
}
return rval;
}
public void setModelName(String modelName) {
this.modelName = modelName;
}
public int getGridNumber() {
return gridNumber;
}
public void setGridNumber(int gridNumber) {
this.gridNumber = gridNumber;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
} else if (!obj.getClass().equals(this.getClass())) {
return false;
}
GribModel rhs = (GribModel) obj;
if (centerid != rhs.centerid) {
return false;
} else if (genprocess != rhs.genprocess) {
return false;
} else if (gridNumber != rhs.gridNumber) {
return false;
} else if (pdsTemplate != rhs.pdsTemplate) {
return false;
} else if (subcenterid != rhs.subcenterid) {
return false;
} else if (backGenprocess != rhs.backGenprocess) {
return false;
}
if (gridid == null) {
if (rhs.gridid != null) {
return false;
}
} else if (!gridid.equals(rhs.gridid)) {
return false;
}
if (insertTime == null) {
if (rhs.insertTime != null) {
return false;
}
} else if (!insertTime.equals(rhs.insertTime)) {
return false;
}
if (level == null) {
if (rhs.level != null) {
return false;
}
} else if (!level.equals(rhs.level)) {
return false;
}
if (location == null) {
if (rhs.location != null) {
return false;
}
} else if (!location.equals(rhs.location)) {
return false;
}
if (modelName == null) {
if (rhs.modelName != null) {
return false;
}
} else if (!modelName.equals(rhs.modelName)) {
return false;
}
if (numForecasts == null) {
if (rhs.numForecasts != null) {
return false;
}
} else if (!numForecasts.equals(rhs.numForecasts)) {
return false;
}
if (parameterAbbreviation == null) {
if (rhs.parameterAbbreviation != null) {
return false;
}
} else if (!parameterAbbreviation.equals(rhs.parameterAbbreviation)) {
return false;
}
if (parameterName == null) {
if (rhs.parameterName != null) {
return false;
}
} else if (!parameterName.equals(rhs.parameterName)) {
return false;
}
if (parameterUnit == null) {
if (rhs.parameterUnit != null) {
return false;
}
} else if (!parameterUnit.equals(rhs.parameterUnit)) {
return false;
}
if (perturbationNumber == null) {
if (rhs.perturbationNumber != null) {
return false;
}
} else if (!perturbationNumber.equals(rhs.perturbationNumber)) {
return false;
}
if (typeEnsemble == null) {
if (rhs.typeEnsemble != null) {
return false;
}
} else if (!typeEnsemble.equals(rhs.typeEnsemble)) {
return false;
}
return true;
}
}

View file

@ -1,221 +0,0 @@
/**
* 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.dataplugin.grib;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.persist.DefaultPathProvider;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
/**
* Deprecated, use grid
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/24/09 1994 bphillip Initial Creation
*
* </pre>
*
* @author bphillip
* @version 1
*/
@Deprecated
public class GribPathProvider extends DefaultPathProvider {
private static final DecimalFormat forecastHourFormat = new DecimalFormat(
"000");
private static final int SECONDS_PER_HOUR = 3600;
public static final String FORECAST_HR_TOKEN = "-FH-";
private static GribPathProvider instance = new GribPathProvider();
public static final List<String> STATIC_PARAMETERS;
static {
STATIC_PARAMETERS = new ArrayList<String>();
STATIC_PARAMETERS.add("staticTopo");
STATIC_PARAMETERS.add("staticXspacing");
STATIC_PARAMETERS.add("staticYspacing");
STATIC_PARAMETERS.add("staticCoriolis");
STATIC_PARAMETERS.add("staticSpacing");
}
public static GribPathProvider getInstance() {
return instance;
}
protected GribPathProvider() {
}
@Override
public String getHDFFileName(String pluginName, IPersistable persistable) {
if (persistable == null) {
throw new IllegalArgumentException(
"Expected argument persistable is null");
}
if (!(persistable instanceof GribRecord)) {
throw new IllegalArgumentException(
"Argument persistable is of wrong type. Expected "
+ GribRecord.class + " but got "
+ persistable.getClass());
} else if (pluginName == null) {
throw new IllegalArgumentException(
"Expected argument pluginName not set on object "
+ persistable.toString());
}
GribRecord pdo = (GribRecord) persistable;
StringBuffer sb = new StringBuffer(64);
sb.append(pdo.getModelInfo().getModelName());
Date refTime = pdo.getDataTime().getRefTime();
sb.append(fileNameFormat.get().format(refTime));
sb.append(FORECAST_HR_TOKEN);
if (STATIC_PARAMETERS.contains(pdo.getModelInfo()
.getParameterAbbreviation())) {
sb.append("000");
} else {
long number = pdo.getDataTime().getFcstTime() / SECONDS_PER_HOUR;
String numberString = null;
synchronized (forecastHourFormat) {
numberString = forecastHourFormat.format(number);
}
sb.append(numberString);
}
sb.append(".h5");
return sb.toString();
}
public String formatTime(Date date) {
return fileNameFormat.get().format(date);
}
@Override
public String getHDFPath(String pluginName, IPersistable persistable) {
return super.getHDFPath(GridConstants.GRID, persistable);
}
@Override
public List<String> getKeyNames(String pluginName) {
List<String> keys = super.getKeyNames(GridConstants.GRID);
List<String> newKeys = new ArrayList<String>(keys.size());
for (String key : keys) {
if (key.equals(GridConstants.DATASET_ID)) {
newKeys.add("modelInfo.modelName");
} else if (key.equals(GridConstants.MASTER_LEVEL_NAME)) {
newKeys.add("modelInfo.level.masterLevel.name");
} else if (key.equals(GridConstants.PARAMETER_ABBREVIATION)) {
newKeys.add("modelInfo.parameterAbbreviation");
} else if (key.equals(GridConstants.LEVEL_ONE)) {
newKeys.add("modelInfo.level.levelonevalue");
} else if (key.equals(GridConstants.LEVEL_TWO)) {
newKeys.add("modelInfo.level.leveltwovalue");
} else {
newKeys.add(key);
}
}
return newKeys;
}
public String getGroup(GribRecord record) {
StringBuilder datauri = new StringBuilder("/grid/");
datauri.append(record.getDataTime().toString().replace(" ", "_"));
datauri.append("/");
datauri.append(record.getModelInfo().getModelName());
// secondaryid
datauri.append("/");
if (record.getGridVersion() != 0) {
datauri.append("Version");
datauri.append(record.getGridVersion());
} else {
datauri.append("null");
}
datauri.append("/");
if (record.getModelInfo().getPerturbationNumber() != null) {
switch (record.getModelInfo().getPerturbationNumber()) {
case 1:
datauri.append("ctl1");
break;
case 2:
datauri.append("ctl2");
break;
case 3:
datauri.append("n1");
break;
case 4:
datauri.append("p1");
break;
case 5:
datauri.append("n2");
break;
case 6:
datauri.append("p2");
break;
case 7:
datauri.append("n3");
break;
case 8:
datauri.append("p3");
break;
case 9:
datauri.append("n4");
break;
case 10:
datauri.append("p4");
break;
case 11:
datauri.append("n5");
break;
case 12:
datauri.append("p5");
break;
default:
datauri.append("null");
}
} else {
datauri.append("null");
}
datauri.append("/");
datauri.append(record.getModelInfo().getLocation().getId());
datauri.append("/");
datauri.append(record.getModelInfo().getParameterAbbreviation());
datauri.append("/");
datauri.append(record.getModelInfo().getLevelName());
datauri.append("/");
datauri.append(record.getModelInfo().getLevelOneValue());
datauri.append("/");
datauri.append(record.getModelInfo().getLevelTwoValue());
return datauri.toString();
}
}

View file

@ -1,678 +0,0 @@
/**
* 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.dataplugin.grib;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Index;
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
import com.raytheon.uf.common.dataplugin.IPrecomputedRange;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
import com.raytheon.uf.common.dataplugin.persist.IHDFFilePathProvider;
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject;
import com.raytheon.uf.common.geospatial.ISpatialEnabled;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* Deprecated, use grid
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 07, 2009 1994 bphillip Initial Creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 08, 2013 1293 bkowal Removed references to hdffileid.
* 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
*
* </pre>
*
* @author bphillip
* @version 1
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "gribseq")
@Table(name = "grib", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
*/
@org.hibernate.annotations.Table(appliesTo = "grib", indexes = { @Index(name = "grib_refTimeIndex", columnNames = {
"refTime", "forecastTime" }) })
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@Deprecated
public class GribRecord extends PersistablePluginDataObject implements
IPersistable, ISpatialEnabled, IPrecomputedRange {
private static final long serialVersionUID = 1L;
/** GRIB master tables version number (currently 2) (See Table 1.0) */
@Column
@XmlAttribute
@DynamicSerializeElement
private int masterTableVersion;
/**
* Version number of GRIB local tables used to augment Master Tables (See
* Table 1.1)
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private int localTableVersion;
/** Significance of reference time (See Table 1.2) */
@Column
@XmlAttribute
@DynamicSerializeElement
private int refTimeSignificance;
/** Production status of processed data in the GRIB message (See Table 1.3) */
@Column
@XmlAttribute
@DynamicSerializeElement
private int productionStatus;
/** Type of processed data in this GRIB message (See Table 1.4) */
@Column
@XmlAttribute
@DynamicSerializeElement
private int processedDataType;
/** Denotes if local section is present */
@Column
@XmlAttribute
@DynamicSerializeElement
private boolean localSectionUsed;
/** The values extracted from the local section */
@Transient
@DynamicSerializeElement
private int[] localSection;
/**
* Denotes if this is a thinned grid, therefore containing a list of thinned
* points per row
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private boolean thinnedGrid;
/**
* The number of points in each row of a quasi-regular grid, if applicable
*/
@Transient
@DynamicSerializeElement
private int[] thinnedPts;
/**
* Denotes if this grid is a hybrid level grid, therefore containing a list
* of hybrid level information
*/
@Column
@XmlAttribute
@DynamicSerializeElement
private boolean hybridGrid;
/**
* The values of the optional coordinate list provided with hybrid level
* parameters
*/
@Transient
@DynamicSerializeElement
private float[] hybridCoordList;
/** The model information */
@ManyToOne(cascade = { CascadeType.REFRESH })
@PrimaryKeyJoinColumn
@DataURI(position = 1, embedded = true)
@XmlElement
@DynamicSerializeElement
private GribModel modelInfo;
private boolean isVector = false;
@Column
@XmlAttribute
@DynamicSerializeElement
@DataURI(position = 2)
private int gridVersion = 0;
@Column
@XmlAttribute
@DynamicSerializeElement
private Integer resCompFlags;
@Column
@XmlAttribute
@DynamicSerializeElement
private double dataMin;
@Column
@XmlAttribute
@DynamicSerializeElement
private double dataMax;
/**
* Creates an empty GribRecord
*/
public GribRecord() {
}
/**
* Creates a GribRecord from the provided uri
*
* @param uri
* The dataURI used to construct the record
*/
public GribRecord(String uri) {
super(uri);
}
/**
* Copy constructor
*/
public GribRecord(GribRecord recordToCopy) {
if (recordToCopy.dataTime != null) {
this.dataTime = recordToCopy.dataTime.clone();
}
this.dataURI = recordToCopy.dataURI;
this.id = recordToCopy.id;
this.identifier = recordToCopy.identifier;
if (recordToCopy.insertTime != null) {
this.insertTime = (Calendar) recordToCopy.insertTime.clone();
}
this.messageData = recordToCopy.messageData;
this.gridVersion = recordToCopy.gridVersion;
if (recordToCopy.hybridCoordList != null) {
this.hybridCoordList = Arrays.copyOf(recordToCopy.hybridCoordList,
recordToCopy.hybridCoordList.length);
}
this.hybridGrid = recordToCopy.hybridGrid;
this.isVector = recordToCopy.isVector;
if (recordToCopy.localSection != null) {
this.localSection = Arrays.copyOf(recordToCopy.localSection,
recordToCopy.localSection.length);
}
this.localSectionUsed = recordToCopy.localSectionUsed;
this.localTableVersion = recordToCopy.localTableVersion;
this.masterTableVersion = recordToCopy.masterTableVersion;
this.modelInfo = new GribModel(recordToCopy.getModelInfo());
this.processedDataType = recordToCopy.processedDataType;
this.productionStatus = recordToCopy.productionStatus;
this.refTimeSignificance = recordToCopy.refTimeSignificance;
this.resCompFlags = recordToCopy.resCompFlags;
this.thinnedGrid = recordToCopy.thinnedGrid;
if (recordToCopy.thinnedPts != null) {
this.thinnedPts = Arrays.copyOf(recordToCopy.thinnedPts,
recordToCopy.thinnedPts.length);
}
}
@Override
public IHDFFilePathProvider getHDFPathProvider() {
return GribPathProvider.getInstance();
}
@Override
public IDecoderGettable getDecoderGettable() {
return null;
}
@Override
public Date getPersistenceTime() {
Calendar c = getInsertTime();
if (c == null) {
return null;
}
return c.getTime();
}
@Override
public void setPersistenceTime(Date persistTime) {
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
c.setTime(persistTime);
setInsertTime(c);
}
@Override
public ISpatialObject getSpatialObject() {
return modelInfo.getLocation();
}
/**
* Gets the model information
*
* @return The model information
*/
public GribModel getModelInfo() {
return modelInfo;
}
/**
* Sets the model information
*
* @param modelInfo
* The model information
*/
public void setModelInfo(GribModel modelInfo) {
this.modelInfo = modelInfo;
}
/**
* Gets the master table version
*
* @return The master table version
*/
public int getMasterTableVersion() {
return masterTableVersion;
}
/**
* Sets the master table version
*
* @param masterTableVersion
* The master table version
*/
public void setMasterTableVersion(int masterTableVersion) {
this.masterTableVersion = masterTableVersion;
}
/**
* Gets the local table version
*
* @return The local table version
*/
public int getLocalTableVersion() {
return localTableVersion;
}
/**
* Sets the local table version
*
* @param localTableVersion
* The local table version
*/
public void setLocalTableVersion(int localTableVersion) {
this.localTableVersion = localTableVersion;
}
/**
* Gets the reference time significance
*
* @return The reference time significance
*/
public int getRefTimeSignificance() {
return refTimeSignificance;
}
/**
* Sets the reference time significance
*
* @param refTimeSignificance
* The reference time significance
*/
public void setRefTimeSignificance(int refTimeSignificance) {
this.refTimeSignificance = refTimeSignificance;
}
/**
* Gets the production status
*
* @return The production status
*/
public int getProductionStatus() {
return productionStatus;
}
/**
* Sets the production status
*
* @param productionStatus
* The production status
*/
public void setProductionStatus(int productionStatus) {
this.productionStatus = productionStatus;
}
/**
* Gets ths processed data type
*
* @return The processed data type
*/
public int getProcessedDataType() {
return processedDataType;
}
/**
* Sets the processed data type
*
* @param processedDataType
* The processed data type
*/
public void setProcessedDataType(int processedDataType) {
this.processedDataType = processedDataType;
}
/**
* Gets if local section is present
*
* @return localSectionUsed
*/
public boolean isLocalSectionUsed() {
return localSectionUsed;
}
/**
* Sets localSectionUsed
*
* @param localSectionUsed
* True if localsection if used, else false
*/
public void setLocalSectionUsed(boolean localSectionUsed) {
this.localSectionUsed = localSectionUsed;
}
/**
* Gets the local section data
*
* @return The local section data
*/
public int[] getLocalSection() {
return localSection;
}
/**
* Sets the local section data
*
* @param localSection
* The local section data
*/
public void setLocalSection(int[] localSection) {
this.localSection = localSection;
}
/**
* Gets the Hybrid coordinate list
*
* @return The hybrid coordinate list
*/
public float[] getHybridCoordList() {
return hybridCoordList;
}
/**
* Sets the hybrid coordinate list
*
* @param hybridCoordList
* The hybrid coordinate list
*/
public void setHybridCoordList(float[] hybridCoordList) {
this.hybridCoordList = hybridCoordList;
}
/**
* Gets the number of points in each row for a thinned grid
*
* @return The thinned row points
*/
public int[] getThinnedPts() {
return thinnedPts;
}
/**
* Sets the number of points in each row for a thinned grid
*
* @param thinnedPts
* The thinned row points
*/
public void setThinnedPts(int[] thinnedPts) {
this.thinnedPts = thinnedPts;
}
public boolean isThinnedGrid() {
return thinnedGrid;
}
public void setThinnedGrid(boolean thinnedGrid) {
this.thinnedGrid = thinnedGrid;
}
public boolean isHybridGrid() {
return hybridGrid;
}
public void setHybridGrid(boolean hybridGrid) {
this.hybridGrid = hybridGrid;
}
public boolean isVector() {
return this.isVector;
}
public void setVector(boolean isVector) {
this.isVector = isVector;
}
public int getGridVersion() {
return gridVersion;
}
public void setGridVersion(int gridVersion) {
this.gridVersion = gridVersion;
}
public Integer getResCompFlags() {
return resCompFlags;
}
public void setResCompFlags(Integer resCompFlags) {
this.resCompFlags = resCompFlags;
}
@Override
public void setId(int id) {
this.id = id;
}
/**
* @return the dataMin
*/
@Override
public double getDataMin() {
return dataMin;
}
/**
* @param dataMin
* the dataMin to set
*/
public void setDataMin(double dataMin) {
this.dataMin = dataMin;
}
/**
* @return the dataMax
*/
@Override
public double getDataMax() {
return dataMax;
}
/**
* @param dataMax
* the dataMax to set
*/
public void setDataMax(double dataMax) {
this.dataMax = dataMax;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + gridVersion;
result = (prime * result) + Arrays.hashCode(hybridCoordList);
result = (prime * result) + (hybridGrid ? 1231 : 1237);
result = (prime * result) + (isVector ? 1231 : 1237);
result = (prime * result) + Arrays.hashCode(localSection);
result = (prime * result) + (localSectionUsed ? 1231 : 1237);
result = (prime * result) + localTableVersion;
result = (prime * result) + masterTableVersion;
result = (prime * result)
+ ((modelInfo == null) ? 0 : modelInfo.hashCode());
result = (prime * result) + processedDataType;
result = (prime * result) + productionStatus;
result = (prime * result) + refTimeSignificance;
result = (prime * result)
+ ((resCompFlags == null) ? 0 : resCompFlags.hashCode());
result = (prime * result) + (thinnedGrid ? 1231 : 1237);
result = (prime * result) + Arrays.hashCode(thinnedPts);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
GribRecord other = (GribRecord) obj;
if (!this.dataTime.getRefTimeAsCalendar().equals(
other.getDataTime().getRefTimeAsCalendar())) {
// if the reftimes are not equal equality is false
return false;
} else if (this.dataTime.getFcstTime() != other.getDataTime()
.getFcstTime()) {
// if the reftimes are equal but the forecast times are not then
// equality is false
return false;
}
if (gridVersion != other.gridVersion) {
return false;
}
if (!Arrays.equals(hybridCoordList, other.hybridCoordList)) {
return false;
}
if (hybridGrid != other.hybridGrid) {
return false;
}
if (isVector != other.isVector) {
return false;
}
if (!Arrays.equals(localSection, other.localSection)) {
return false;
}
if (localSectionUsed != other.localSectionUsed) {
return false;
}
if (localTableVersion != other.localTableVersion) {
return false;
}
if (masterTableVersion != other.masterTableVersion) {
return false;
}
if (modelInfo == null) {
if (other.modelInfo != null) {
return false;
}
} else if (!modelInfo.equals(other.modelInfo)) {
return false;
}
if (processedDataType != other.processedDataType) {
return false;
}
if (productionStatus != other.productionStatus) {
return false;
}
if (refTimeSignificance != other.refTimeSignificance) {
return false;
}
if (resCompFlags == null) {
if (other.resCompFlags != null) {
return false;
}
} else if (!resCompFlags.equals(other.resCompFlags)) {
return false;
}
if (thinnedGrid != other.thinnedGrid) {
return false;
}
if (!Arrays.equals(thinnedPts, other.thinnedPts)) {
return false;
}
return true;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
@Override
public String getPluginName() {
return "grib";
}
}

View file

@ -1,70 +0,0 @@
/**
* 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.dataplugin.grib;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 9, 2010 brockwoo Initial creation
*
* </pre>
*
* @author brockwoo
* @version 1.0
*/
@DynamicSerialize
public class GribThriftContainer {
@DynamicSerializeElement
private int numOfRecords;
@DynamicSerializeElement
private GribThriftRecord[] records;
public GribThriftContainer() {
this.numOfRecords = 0;
}
public int getNumOfRecords() {
return numOfRecords;
}
public void setNumOfRecords(int numOfRecords) {
this.numOfRecords = numOfRecords;
}
public GribThriftRecord[] getRecords() {
return records;
}
public void setRecords(GribThriftRecord[] records) {
this.records = records;
this.numOfRecords = this.records.length;
}
}

View file

@ -1,153 +0,0 @@
/**
* 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.dataplugin.grib;
import com.raytheon.uf.common.dataplugin.grib.request.GridDataRequestMessage;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 9, 2010 brockwoo Initial creation
*
* </pre>
*
* @author brockwoo
* @version 1.0
*/
@DynamicSerialize
public class GribThriftRecord {
@DynamicSerializeElement
private GridDataRequestMessage message;
@DynamicSerializeElement
private float[] data;
@DynamicSerializeElement
private boolean localSection = false;
@DynamicSerializeElement
private int[] localSectionData;
@DynamicSerializeElement
private boolean hybridGrid = false;
@DynamicSerializeElement
private float[] hybridGridData;
@DynamicSerializeElement
private boolean thinnedGrid = false;
@DynamicSerializeElement
private int[] thinnedGridData;
public GridDataRequestMessage getMessage() {
return message;
}
public void setMessage(GridDataRequestMessage message) {
this.message = message;
}
public float[] getData() {
return data;
}
public void setData(float[] data) {
this.data = data;
}
public boolean isLocalSection() {
return localSection;
}
public void setLocalSection(boolean localSection) {
this.localSection = localSection;
}
public int[] getLocalSectionData() {
return localSectionData;
}
public void setLocalSectionData(int[] localSectionData) {
this.localSectionData = localSectionData;
}
public boolean isHybridGrid() {
return hybridGrid;
}
public void setHybridGrid(boolean hybridGrid) {
this.hybridGrid = hybridGrid;
}
public float[] getHybridGridData() {
return hybridGridData;
}
public void setHybridGridData(float[] hybridGridData) {
this.hybridGridData = hybridGridData;
}
public boolean isThinnedGrid() {
return thinnedGrid;
}
public void setThinnedGrid(boolean thinnedGrid) {
this.thinnedGrid = thinnedGrid;
}
public int[] getThinnedGridData() {
return thinnedGridData;
}
public void setThinnedGridData(int[] thinnedGridData) {
this.thinnedGridData = thinnedGridData;
}
public void setDataFields(IDataRecord[] data) {
if (data[0] != null) {
this.data = ((FloatDataRecord) data[0]).getFloatData();
}
if (data[1] != null) {
this.localSectionData = ((IntegerDataRecord) data[1]).getIntData();
this.localSection = true;
}
if (data[2] != null) {
this.hybridGridData = ((FloatDataRecord) data[2]).getFloatData();
this.hybridGrid = true;
}
if (data[3] != null) {
this.thinnedGridData = ((IntegerDataRecord) data[3]).getIntData();
this.thinnedGrid = true;
}
}
}

View file

@ -1,78 +0,0 @@
/**
* 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.dataplugin.grib.request;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.serialization.comm.IServerRequest;
/**
* Request object used to delete all stored data for the specified model name.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 25, 2012 dgilling Initial creation
*
* </pre>
*
* @author dgilling
* @version 1.0
*/
@DynamicSerialize
public class DeleteAllModelDataRequest implements IServerRequest {
@DynamicSerializeElement
private String modelName;
public DeleteAllModelDataRequest() {
this(null);
}
public DeleteAllModelDataRequest(String modelName) {
this.modelName = modelName;
}
public String getModelName() {
return modelName;
}
public void setModelName(String modelName) {
this.modelName = modelName;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("DeleteAllModelDataRequest [modelName=");
builder.append(modelName);
builder.append("]");
return builder.toString();
}
}

View file

@ -1,59 +0,0 @@
/**
* 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.dataplugin.grib.request;
import java.util.List;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.serialization.comm.IServerRequest;
/**
*
* Deprecated, use grid
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 20, 2011 bsteffen Initial creation
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
@DynamicSerialize
@Deprecated
public class GetCoveragesRequest implements IServerRequest {
@DynamicSerializeElement
private List<String> modelNames;
public List<String> getModelNames() {
return modelNames;
}
public void setModelNames(List<String> modelNames) {
this.modelNames = modelNames;
}
}

View file

@ -1,161 +0,0 @@
/**
* 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.dataplugin.grib.request;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
import com.raytheon.uf.common.serialization.comm.IServerRequest;
import com.raytheon.uf.common.time.DataTime;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 12, 2010 brockwoo Initial creation
*
* </pre>
*
* @author brockwoo
* @version 1.0
*/
@DynamicSerialize
public class GridDataRequestMessage implements IServerRequest {
public static final long MISSING = -999l;
@DynamicSerializeElement
private String modelName;
@DynamicSerializeElement
private double levelOne = Level.INVALID_VALUE;
@DynamicSerializeElement
private double levelTwo = Level.INVALID_VALUE;
@DynamicSerializeElement
private String levelType;
@DynamicSerializeElement
private long startTime = -999l;
@DynamicSerializeElement
private int forecastTime = 0;
@DynamicSerializeElement
private String parameterAbbreviation;
@DynamicSerializeElement
private String ensemble;
@DynamicSerializeElement
private int version = -999;
public String getModelName() {
return modelName;
}
public void setModelName(String modelName) {
this.modelName = modelName;
}
public double getLevelOne() {
return levelOne;
}
public void setLevelOne(double levelOne) {
this.levelOne = levelOne;
}
public double getLevelTwo() {
return levelTwo;
}
public void setLevelTwo(double levelTwo) {
this.levelTwo = levelTwo;
}
public String getLevelType() {
return levelType;
}
public void setLevelType(String levelType) {
this.levelType = levelType;
}
public long getStartTime() {
return startTime;
}
public void setStartTime(long startTime) {
this.startTime = startTime;
}
public int getForecastTime() {
return forecastTime;
}
public void setForecastTime(int forecastTime) {
this.forecastTime = forecastTime;
}
public String getParameterAbbreviation() {
return parameterAbbreviation;
}
public void setParameterAbbreviation(String parameterAbbreviation) {
this.parameterAbbreviation = parameterAbbreviation;
}
public String getEnsemble() {
return ensemble;
}
public void setEnsemble(String ensemble) {
this.ensemble = ensemble;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public void setInfoFromRecord(GridRecord record) {
DataTime time = record.getDataTime();
this.modelName = record.getDatasetId();
this.levelOne = record.getLevel().getLevelonevalue();
this.levelTwo = record.getLevel().getLeveltwovalue();
this.levelType = record.getLevel().getMasterLevel().getName();
this.parameterAbbreviation = record.getParameter().getAbbreviation();
if (record.getEnsembleId() != null) {
this.ensemble = record.getEnsembleId();
}
this.startTime = time.getRefTime().getTime();
this.forecastTime = time.getFcstTime();
}
}

View file

@ -1,111 +0,0 @@
/**
* 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.dataplugin.grib;
import org.opengis.metadata.spatial.PixelOrientation;
import com.raytheon.uf.common.geospatial.MapUtil;
import com.raytheon.uf.common.gridcoverage.Corner;
import com.raytheon.uf.common.gridcoverage.LambertConformalGridCoverage;
import com.raytheon.uf.common.gridcoverage.exception.GridCoverageException;
import com.vividsolutions.jts.geom.Coordinate;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 4, 2011 randerso Initial creation
*
* </pre>
*
* @author randerso
* @version 1.0
*/
public class CoverageTest {
/**
* @param args
*/
public static void main(String[] args) {
LambertConformalGridCoverage cov = new LambertConformalGridCoverage();
cov.setNx(93);
cov.setNy(65);
cov.setFirstGridPointCorner(Corner.LowerLeft);
cov.setDx(81.2705);
cov.setDy(81.2705);
cov.setLatin1(25);
cov.setLatin2(25);
cov.setLov(-95);
cov.setLa1(12.19);
cov.setLo1(-133.459);
cov.setMajorAxis(6371229.0);
cov.setMinorAxis(6371229.0);
cov.setSpacingUnit("km");
try {
cov.initialize();
Coordinate c = new Coordinate(0, 0);
PixelOrientation orient = PixelOrientation.UPPER_LEFT;
Coordinate ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
c.x = cov.getNx();
ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
c.y = cov.getNy();
ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
c.x = 0;
ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
c.x = 64 - 1;
c.y = cov.getNy() - 11;
ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
c.x = 73 - 1;
ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
c.y = cov.getNy() - 20;
ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
c.x = 64 - 1;
ll = MapUtil.gridCoordinateToLatLon(c, orient, cov);
System.out.println("grid cell: " + c + " lonLat: " + ll);
} catch (GridCoverageException e) {
e.printStackTrace();
}
}
}

View file

@ -17,13 +17,6 @@
[Enter License Description here.]
</license>
<plugin
id="com.raytheon.uf.common.dataplugin.grib"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.edex.plugin.grib"
download-size="0"

View file

@ -10,7 +10,6 @@ Require-Bundle: org.springframework;bundle-version="2.5.6",
com.raytheon.uf.edex.ogc.common;bundle-version="1.0.0",
javax.persistence;bundle-version="1.0.0",
org.apache.commons.lang;bundle-version="2.3.0",
com.raytheon.uf.common.dataplugin.grib;bundle-version="1.12.1174",
com.raytheon.uf.edex.database;bundle-version="1.0.0",
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
org.hibernate;bundle-version="1.0.0",

View file

@ -24,7 +24,6 @@
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.edex.datadelivery.retrieval"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/org.apache.commons.lang"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/org.geotools"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.common.dataplugin.grib"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.common.dataplugin"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/com.raytheon.uf.common.geospatial"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/org.hibernate"/>