VLab Issue #6412 - Fixed the problem with ParameterLookup not being registered. As per Nate Jensen recommendation updated the spring configuration to depepnd-on getParameterHandlerRegistered.

Also based on his recommendation removed parts from constructor and added them to the decode method that get singleton references for paramlookup and variable dictionary lookup. fixes #6412

Change-Id: Ie3554842b9f029dd62ff73f5edc928bc03e012e4

Former-commit-id: c28f2e9aed [formerly 0163ec2871] [formerly c28f2e9aed [formerly 0163ec2871] [formerly 9b0f630436 [formerly 2ca313195e2e610d4a198884f45dde37ebecfbc6]]]
Former-commit-id: 9b0f630436
Former-commit-id: 526bae6daf [formerly e33ed09969]
Former-commit-id: 8fe81f8959
This commit is contained in:
Jason Burks 2015-02-11 20:06:54 +00:00
parent 7585c6e288
commit b521b1d445
2 changed files with 8 additions and 17 deletions

View file

@ -8,11 +8,12 @@
<constructor-arg value="Ingest.SportLma.*" />
</bean>
<bean id="lmaDecoder" class="gov.nasa.msfc.sport.edex.plugin.lma.LmaDecoder">
<bean id="lmaDecoder" class="gov.nasa.msfc.sport.edex.plugin.lma.LmaDecoder" depends-on="getParameterHandlerRegistered">
<property name="gridCoverageLookup" ref="gridcoveragelookup"/>
<property name="levelDao" ref="sportlmalevelDao"/>
</bean>
<bean id="sportlmalevelDao" class="com.raytheon.uf.edex.plugin.level.dao.LevelDao"/>
<bean id="lmaDistRegistry" factory-bean="distributionSrv"

View file

@ -23,8 +23,6 @@ import ucar.nc2.NetcdfFile;
import ucar.nc2.Variable;
import ucar.units.SI;
import com.raytheon.edex.exception.DecoderException;
import com.raytheon.edex.plugin.AbstractDecoder;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level;
@ -57,20 +55,6 @@ public class LmaDecoder {
/** The level dao allows looking up of the levels. */
public LevelDao levelDao;
/** The Lma Vars Dict helps to match up variables in the configuration files in the localization. This allows controls of what files to lookup
* allows looking up of the Variables and names. */
private LMAVarsDict lmaVarsDict;
/** The Param lookup allows looking up of the parameters in the database. */
private ParameterLookup paramLookup;
public LmaDecoder() throws DecoderException{
paramLookup = ParameterLookup.getInstance();
lmaVarsDict = LMAVarsDict.getInstance();
}
/**
* Decode the LMA netcdf 3 files. These files contain gridded data at 17 vertical levels. The first level is the sum of all levels.
*
@ -82,6 +66,12 @@ public class LmaDecoder {
//Create an empty records to hold the data once decoded.
GridRecord[] records = null;
/** The variable dictionary used to check which variables are supported by the ingest **/
LMAVarsDict lmaVarsDict = LMAVarsDict.getInstance();
/** The Param lookup allows looking up of the parameters in the database. */
ParameterLookup paramLookup = ParameterLookup.getInstance();
//Open the netcdf file for reading.
NetcdfFile file = NetcdfFile.open(fileInput.getAbsolutePath());
try {