Omaha #3356 updates for improved level lookup

Change-Id: I32ca44114fb18770bff22c6d0c9173e8fa49a362

Former-commit-id: 62b84b2fb3 [formerly 0ca90b58d7ca85d5bfc8fc525415115ac8451c5b]
Former-commit-id: ae9cffaaea
This commit is contained in:
Nate Jensen 2014-09-09 14:00:17 -05:00
parent 644c0acbfe
commit 1c77f66608
29 changed files with 341 additions and 555 deletions

View file

@ -20,7 +20,6 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174", com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
com.raytheon.viz.core;bundle-version="1.12.1174", com.raytheon.viz.core;bundle-version="1.12.1174",
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174", com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
com.raytheon.uf.common.comm;bundle-version="1.12.1174",
com.raytheon.viz.alerts;bundle-version="1.12.1174", com.raytheon.viz.alerts;bundle-version="1.12.1174",
com.raytheon.uf.viz.npp;bundle-version="1.0.0", com.raytheon.uf.viz.npp;bundle-version="1.0.0",
com.raytheon.uf.common.style;bundle-version="1.0.0", com.raytheon.uf.common.style;bundle-version="1.0.0",

View file

@ -28,14 +28,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest; import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
@ -47,6 +39,13 @@ import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.library.DerivParamField; import com.raytheon.uf.common.derivparam.library.DerivParamField;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod; import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode; import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
@ -66,7 +65,8 @@ import com.raytheon.viz.alerts.observers.ProductAlertObserver;
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jan 18, 2012 mschenke Initial creation * Jan 18, 2012 mschenke Initial creation
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -104,7 +104,7 @@ public class VIIRSDataInventory extends AbstractInventory implements
private List<Level> viirsLevels = new ArrayList<Level>(); private List<Level> viirsLevels = new ArrayList<Level>();
public VIIRSDataInventory() throws CommunicationException { public VIIRSDataInventory() {
entireAtmosphere = LevelFactory.getInstance().getLevel( entireAtmosphere = LevelFactory.getInstance().getLevel(
VIIRS_LEVEL_NAME, 0.0); VIIRS_LEVEL_NAME, 0.0);
ProductAlertObserver.addObserver(PLUGIN_NAME, this); ProductAlertObserver.addObserver(PLUGIN_NAME, this);
@ -274,6 +274,7 @@ public class VIIRSDataInventory extends AbstractInventory implements
try { try {
return walkTree(null, sources, parameters, levels, true, true, null); return walkTree(null, sources, parameters, levels, true, true, null);
} catch (InterruptedException e) { } catch (InterruptedException e) {
// no-op
} }
return new ArrayList<AbstractRequestableNode>(0); return new ArrayList<AbstractRequestableNode>(0);
} }

View file

@ -27,16 +27,14 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.level.MasterLevel; import com.raytheon.uf.common.dataplugin.level.MasterLevel;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
import com.raytheon.uf.common.style.level.SingleLevel;
import com.raytheon.uf.common.style.level.Level.LevelType; import com.raytheon.uf.common.style.level.Level.LevelType;
import com.raytheon.uf.common.style.level.SingleLevel;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.exception.VizCommunicationException;
import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData; import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
@ -52,6 +50,7 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Nov 5, 2009 randerso Initial creation * Nov 5, 2009 randerso Initial creation
* Jan 8, 2010 4205 jelkins add equals checking for OA resources * Jan 8, 2010 4205 jelkins add equals checking for OA resources
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -197,30 +196,27 @@ public class OAResourceData extends AbstractRequestableResourceData {
if (this.levelKey.equals(ALL_TILTS)) { if (this.levelKey.equals(ALL_TILTS)) {
LevelFactory factory = LevelFactory.getInstance(); LevelFactory factory = LevelFactory.getInstance();
List<DataTime> timesWithLevels = new ArrayList<DataTime>(); List<DataTime> timesWithLevels = new ArrayList<DataTime>();
try { MasterLevel ml = factory.getMasterLevel("TILT");
MasterLevel ml = factory.getMasterLevel("TILT"); Set<Level> allLevels = LevelMappingFactory.getInstance(
Set<Level> allLevels = LevelMappingFactory.getInstance( LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) .getAllLevels();
.getAllLevels(); List<Level> levels = new ArrayList<Level>();
List<Level> levels = new ArrayList<Level>(); for (Level l : allLevels) {
for (Level l : allLevels) { if (l.getMasterLevel().equals(ml)) {
if (l.getMasterLevel().equals(ml)) { levels.add(l);
levels.add(l);
}
} }
for (int i = 0; i < times.length; ++i) {
for (int j = 0; j < levels.size(); ++j) {
DataTime time = times[i].clone();
time.setLevelValue(levels.get(j).getLevelonevalue());
if (time.isSpatial()) {
timesWithLevels.add(time);
}
}
}
} catch (CommunicationException e) {
throw new VizCommunicationException(e);
} }
for (int i = 0; i < times.length; ++i) {
for (int j = 0; j < levels.size(); ++j) {
DataTime time = times[i].clone();
time.setLevelValue(levels.get(j).getLevelonevalue());
if (time.isSpatial()) {
timesWithLevels.add(time);
}
}
}
return timesWithLevels return timesWithLevels
.toArray(new DataTime[timesWithLevels.size()]); .toArray(new DataTime[timesWithLevels.size()]);
} else { } else {

View file

@ -26,7 +26,6 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.8.0",
com.raytheon.uf.common.serialization, com.raytheon.uf.common.serialization,
com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.dataquery, com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.derivparam;bundle-version="1.14.0", com.raytheon.uf.common.derivparam;bundle-version="1.14.0",
com.raytheon.uf.common.pointdata;bundle-version="1.13.0", com.raytheon.uf.common.pointdata;bundle-version="1.13.0",
com.raytheon.uf.viz.d2d.core, com.raytheon.uf.viz.d2d.core,

View file

@ -34,7 +34,6 @@ import java.util.Set;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
@ -72,6 +71,7 @@ import com.raytheon.viz.grid.rsc.GridResourceData;
* DbQueryRequest. * DbQueryRequest.
* Sep 19, 2013 2391 mpduff refactored some methods to common class. * Sep 19, 2013 2391 mpduff refactored some methods to common class.
* Jan 23, 2014 2711 bsteffen Get all levels from LevelFactory. * Jan 23, 2014 2711 bsteffen Get all levels from LevelFactory.
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -156,119 +156,115 @@ public class GridProductBrowserDataDefinition extends
@Override @Override
protected String[] queryData(String param, protected String[] queryData(String param,
Map<String, RequestConstraint> queryList) { Map<String, RequestConstraint> queryList) {
try { if (getInventory() == null) {
if (getInventory() == null) { return super.queryData(param, queryList);
return super.queryData(param, queryList); } else {
} else { Collection<String> sources = null;
Collection<String> sources = null; Collection<String> params = null;
Collection<String> params = null; Collection<Level> levels = null;
Collection<Level> levels = null; BlockingQueue<String> returnQueue = new LinkedBlockingQueue<String>();
BlockingQueue<String> returnQueue = new LinkedBlockingQueue<String>(); for (Entry<String, RequestConstraint> queryParam : queryList
for (Entry<String, RequestConstraint> queryParam : queryList .entrySet()) {
.entrySet()) { String key = queryParam.getKey();
String key = queryParam.getKey(); String value = queryParam.getValue().getConstraintValue();
String value = queryParam.getValue().getConstraintValue(); if (key.equals(GridInventory.MODEL_NAME_QUERY)) {
if (key.equals(GridInventory.MODEL_NAME_QUERY)) { sources = Arrays.asList(value);
sources = Arrays.asList(value); } else if (key.equals(GridInventory.PARAMETER_QUERY)) {
} else if (key.equals(GridInventory.PARAMETER_QUERY)) { params = Arrays.asList(value);
params = Arrays.asList(value); } else if (key.equals(GridInventory.MASTER_LEVEL_QUERY)) {
} else if (key.equals(GridInventory.MASTER_LEVEL_QUERY)) { if (levels == null) {
if (levels == null) { levels = new ArrayList<Level>(LevelFactory
levels = new ArrayList<Level>(LevelFactory .getInstance().getAllLevels());
.getInstance().getAllLevels()); }
} Iterator<Level> iter = levels.iterator();
Iterator<Level> iter = levels.iterator(); while (iter.hasNext()) {
while (iter.hasNext()) { if (!iter.next().getMasterLevel().getName()
if (!iter.next().getMasterLevel().getName() .equals(value)) {
.equals(value)) { iter.remove();
iter.remove();
}
} }
}
} else if (key.equals(GridInventory.LEVEL_ONE_QUERY)) { } else if (key.equals(GridInventory.LEVEL_ONE_QUERY)) {
double doubleValue = Double.parseDouble(value); double doubleValue = Double.parseDouble(value);
if (levels == null) { if (levels == null) {
levels = new ArrayList<Level>( levels = new ArrayList<Level>(
LevelMappingFactory LevelMappingFactory
.getInstance( .getInstance(
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
.getAllLevels()); .getAllLevels());
}
Iterator<Level> iter = levels.iterator();
while (iter.hasNext()) {
if (iter.next().getLevelonevalue() != doubleValue) {
iter.remove();
} }
Iterator<Level> iter = levels.iterator(); }
while (iter.hasNext()) { } else if (key.equals(GridInventory.LEVEL_TWO_QUERY)) {
if (iter.next().getLevelonevalue() != doubleValue) { double doubleValue = Double.parseDouble(value);
iter.remove(); if (levels == null) {
} levels = new ArrayList<Level>(
LevelMappingFactory
.getInstance(
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
.getAllLevels());
}
Iterator<Level> iter = levels.iterator();
while (iter.hasNext()) {
if (iter.next().getLeveltwovalue() != doubleValue) {
iter.remove();
} }
} else if (key.equals(GridInventory.LEVEL_TWO_QUERY)) {
double doubleValue = Double.parseDouble(value);
if (levels == null) {
levels = new ArrayList<Level>(
LevelMappingFactory
.getInstance(
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
.getAllLevels());
}
Iterator<Level> iter = levels.iterator();
while (iter.hasNext()) {
if (iter.next().getLeveltwovalue() != doubleValue) {
iter.remove();
}
}
} else if (key.equals(GridInventory.LEVEL_ID_QUERY)) {
levels = Arrays.asList(LevelFactory.getInstance()
.getLevel(value));
} }
} } else if (key.equals(GridInventory.LEVEL_ID_QUERY)) {
levels = Arrays.asList(LevelFactory.getInstance().getLevel(
if (param.equals(GridInventory.MODEL_NAME_QUERY)) { value));
try {
getInventory().checkSources(sources, params, levels,
returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
return returnQueue.toArray(new String[0]);
} else if (param.equals(GridInventory.PARAMETER_QUERY)) {
try {
getInventory().checkParameters(sources, params, levels,
false, returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
return returnQueue.toArray(new String[0]);
} else if (param.equals(GridInventory.MASTER_LEVEL_QUERY)) {
try {
getInventory().checkLevels(sources, params, levels,
returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
Set<String> masterlevels = new HashSet<String>();
LevelFactory lf = LevelFactory.getInstance();
for (String levelid : returnQueue) {
Level level = lf.getLevel(levelid);
masterlevels.add(level.getMasterLevel().getName());
}
return masterlevels.toArray(new String[0]);
} else if (param.equals(GridInventory.LEVEL_ID_QUERY)) {
try {
getInventory().checkLevels(sources, params, levels,
returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
return returnQueue.toArray(new String[0]);
} }
} }
} catch (CommunicationException e) {
statusHandler.handle(Priority.ERROR, "Unable to query data for " if (param.equals(GridInventory.MODEL_NAME_QUERY)) {
+ productName, e); try {
getInventory().checkSources(sources, params, levels,
returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
return returnQueue.toArray(new String[0]);
} else if (param.equals(GridInventory.PARAMETER_QUERY)) {
try {
getInventory().checkParameters(sources, params, levels,
false, returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
return returnQueue.toArray(new String[0]);
} else if (param.equals(GridInventory.MASTER_LEVEL_QUERY)) {
try {
getInventory().checkLevels(sources, params, levels,
returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
Set<String> masterlevels = new HashSet<String>();
LevelFactory lf = LevelFactory.getInstance();
for (String levelid : returnQueue) {
Level level = lf.getLevel(levelid);
masterlevels.add(level.getMasterLevel().getName());
}
return masterlevels.toArray(new String[0]);
} else if (param.equals(GridInventory.LEVEL_ID_QUERY)) {
try {
getInventory().checkLevels(sources, params, levels,
returnQueue);
} catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
return returnQueue.toArray(new String[0]);
}
} }
return new String[0]; return new String[0];
} }
@ -282,15 +278,10 @@ public class GridProductBrowserDataDefinition extends
@Override @Override
public List<ProductBrowserLabel> formatData(String param, public List<ProductBrowserLabel> formatData(String param,
String[] parameters) { String[] parameters) {
try { List<ProductBrowserLabel> labels = GridProductBrowserDataFormatter
List<ProductBrowserLabel> labels = GridProductBrowserDataFormatter .formatGridData(param, parameters);
.formatGridData(param, parameters); if (labels != null && !labels.isEmpty()) {
if (labels != null && !labels.isEmpty()) { return labels;
return labels;
}
} catch (CommunicationException e) {
statusHandler.handle(Priority.ERROR, "Unable to format data for "
+ productName, e);
} }
return super.formatData(param, parameters); return super.formatData(param, parameters);
@ -308,26 +299,14 @@ public class GridProductBrowserDataDefinition extends
RequestConstraint levelRC = queryList RequestConstraint levelRC = queryList
.remove(GridInventory.LEVEL_ID_QUERY); .remove(GridInventory.LEVEL_ID_QUERY);
// Convert Level id to level one and level two values. // Convert Level id to level one and level two values.
try { Level level = LevelFactory.getInstance().getLevel(
Level level = LevelFactory.getInstance().getLevel( levelRC.getConstraintValue());
levelRC.getConstraintValue()); queryList.put(GridInventory.LEVEL_ONE_QUERY, new RequestConstraint(
queryList level.getLevelOneValueAsString()));
.put(GridInventory.LEVEL_ONE_QUERY, queryList.put(GridInventory.LEVEL_TWO_QUERY, new RequestConstraint(
new RequestConstraint(level level.getLevelTwoValueAsString()));
.getLevelOneValueAsString())); queryList.put(GridInventory.MASTER_LEVEL_QUERY,
queryList new RequestConstraint(level.getMasterLevel().getName()));
.put(GridInventory.LEVEL_TWO_QUERY,
new RequestConstraint(level
.getLevelTwoValueAsString()));
queryList
.put(GridInventory.MASTER_LEVEL_QUERY,
new RequestConstraint(level.getMasterLevel()
.getName()));
} catch (CommunicationException e) {
statusHandler.handle(Priority.ERROR,
"Unable to get product parameters for " + productName,
e);
}
} }
return queryList; return queryList;
} }

View file

@ -26,7 +26,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo; import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup; import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
@ -47,6 +46,7 @@ import com.raytheon.viz.grid.inv.GridInventory;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Sep 19, 2013 2391 mpduff Initial creation * Sep 19, 2013 2391 mpduff Initial creation
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -64,10 +64,9 @@ public class GridProductBrowserDataFormatter {
* @param parameters * @param parameters
* List of parameters * List of parameters
* @return List of ProductBrowserLabel objects * @return List of ProductBrowserLabel objects
* @throws CommunicationException
*/ */
public static List<ProductBrowserLabel> formatGridData(String param, public static List<ProductBrowserLabel> formatGridData(String param,
String[] parameters) throws CommunicationException { String[] parameters) {
List<ProductBrowserLabel> labels = new ArrayList<ProductBrowserLabel>(); List<ProductBrowserLabel> labels = new ArrayList<ProductBrowserLabel>();
if (GridInventory.MODEL_NAME_QUERY.equals(param)) { if (GridInventory.MODEL_NAME_QUERY.equals(param)) {
DatasetInfoLookup lookup = DatasetInfoLookup.getInstance(); DatasetInfoLookup lookup = DatasetInfoLookup.getInstance();

View file

@ -26,8 +26,6 @@ import javax.measure.converter.UnitConverter;
import javax.measure.unit.Unit; import javax.measure.unit.Unit;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.HDF5Util; import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
@ -40,10 +38,8 @@ import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord; import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord; import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.gridcoverage.GridCoverage; import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.parameter.Parameter; import com.raytheon.uf.common.parameter.Parameter;
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.viz.core.exception.VizException; import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.viz.grid.util.RadarAdapter; import com.raytheon.viz.grid.util.RadarAdapter;
import com.raytheon.viz.grid.util.SliceUtil; import com.raytheon.viz.grid.util.SliceUtil;
@ -59,6 +55,7 @@ import com.raytheon.viz.grid.util.SliceUtil;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Mar 18, 2010 4473 rjpeter Initial creation * Mar 18, 2010 4473 rjpeter Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -67,8 +64,6 @@ import com.raytheon.viz.grid.util.SliceUtil;
*/ */
public class RadarRequestableData extends GridRequestableData { public class RadarRequestableData extends GridRequestableData {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(RadarRequestableData.class);
private final RadarRecord radarSource; private final RadarRecord radarSource;
@ -89,13 +84,9 @@ public class RadarRequestableData extends GridRequestableData {
this.source = "radar"; this.source = "radar";
this.dataTime = source.getDataTime(); this.dataTime = source.getDataTime();
this.space = RadarAdapter.getInstance().getCoverage(); this.space = RadarAdapter.getInstance().getCoverage();
try { this.level = LevelFactory.getInstance().getLevel("TILT",
this.level = LevelFactory.getInstance().getLevel("TILT", source.getPrimaryElevationAngle());
source.getPrimaryElevationAngle());
} catch (CommunicationException e1) {
statusHandler
.handle(Priority.PROBLEM, e1.getLocalizedMessage(), e1);
}
this.parameter = parameterAbbrev; this.parameter = parameterAbbrev;
this.parameterName = ""; this.parameterName = "";
this.unit = unit; this.unit = unit;
@ -109,7 +100,6 @@ public class RadarRequestableData extends GridRequestableData {
this.parameterName, unit); this.parameterName, unit);
record.setParameter(parameter); record.setParameter(parameter);
record.setDataTime(source.getDataTime()); record.setDataTime(source.getDataTime());
record.constructDataURI();
setGridSource(record); setGridSource(record);
} catch (Exception e) { } catch (Exception e) {
throw new VizException(e); throw new VizException(e);

View file

@ -21,10 +21,6 @@ package com.raytheon.viz.grid.data;
import javax.measure.unit.SI; import javax.measure.unit.SI;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.TimeAndSpace;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo; import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfo;
import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup; import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
import com.raytheon.uf.common.dataplugin.grid.util.StaticGridData; import com.raytheon.uf.common.dataplugin.grid.util.StaticGridData;
@ -33,9 +29,9 @@ import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.datastorage.Request; import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord; import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.gridcoverage.GridCoverage; import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.inventory.TimeAndSpace;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.viz.grid.util.SliceUtil; import com.raytheon.viz.grid.util.SliceUtil;
/** /**
@ -48,6 +44,7 @@ import com.raytheon.viz.grid.util.SliceUtil;
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jan 15, 2010 rjpeter Initial creation * Jan 15, 2010 rjpeter Initial creation
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -56,8 +53,6 @@ import com.raytheon.viz.grid.util.SliceUtil;
*/ */
public class StaticGridRequestableData extends AbstractRequestableData { public class StaticGridRequestableData extends AbstractRequestableData {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(StaticGridRequestableData.class);
private StaticGridDataType dataType; private StaticGridDataType dataType;
@ -74,11 +69,7 @@ public class StaticGridRequestableData extends AbstractRequestableData {
} else { } else {
this.unit = SI.METER; this.unit = SI.METER;
} }
try { this.level = LevelFactory.getInstance().getLevel("SFC", 0.0);
this.level = LevelFactory.getInstance().getLevel("SFC", 0.0);
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
}
} }
/* /*

View file

@ -26,22 +26,18 @@ import javax.measure.unit.SI;
import org.geotools.coverage.grid.GridGeometry2D; import org.geotools.coverage.grid.GridGeometry2D;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.datastorage.Request; import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord; import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.gridcoverage.GridCoverage; import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData; import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException; import com.raytheon.uf.common.inventory.exception.DataCubeException;
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.topo.TopoException; import com.raytheon.uf.common.topo.TopoException;
import com.raytheon.uf.common.topo.TopoQuery; import com.raytheon.uf.common.topo.TopoQuery;
import com.raytheon.viz.grid.util.SliceUtil; import com.raytheon.viz.grid.util.SliceUtil;
/** /**
* requestable data that queries the topo datastore and transforms the data into * Requestable data that queries the topo datastore and transforms the data into
* the correct coverage. * the correct coverage.
* *
* <pre> * <pre>
@ -52,6 +48,7 @@ import com.raytheon.viz.grid.util.SliceUtil;
* Jan 15, 2010 rjpeter Initial creation * Jan 15, 2010 rjpeter Initial creation
* Feb 15, 2013 1638 mschenke Got rid of viz/edex topo classes * Feb 15, 2013 1638 mschenke Got rid of viz/edex topo classes
* and moved into common * and moved into common
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -60,8 +57,6 @@ import com.raytheon.viz.grid.util.SliceUtil;
*/ */
public class TopoRequestableData extends AbstractRequestableData { public class TopoRequestableData extends AbstractRequestableData {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(TopoRequestableData.class);
// need to move to a static timed cache // need to move to a static timed cache
private static Map<GridCoverage, FloatDataRecord> topoCache = new HashMap<GridCoverage, FloatDataRecord>(); private static Map<GridCoverage, FloatDataRecord> topoCache = new HashMap<GridCoverage, FloatDataRecord>();
@ -71,11 +66,7 @@ public class TopoRequestableData extends AbstractRequestableData {
this.parameter = "staticTopo"; this.parameter = "staticTopo";
this.parameterName = "Topography"; this.parameterName = "Topography";
this.unit = SI.METER; this.unit = SI.METER;
try { this.level = LevelFactory.getInstance().getLevel("SFC", 0.0);
this.level = LevelFactory.getInstance().getLevel("SFC", 0.0);
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
}
} }
/* /*

View file

@ -33,16 +33,6 @@ import java.util.Map.Entry;
import java.util.NavigableSet; import java.util.NavigableSet;
import java.util.Set; import java.util.Set;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.CubeLevel;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode.Dependency;
import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridInfoConstants; import com.raytheon.uf.common.dataplugin.grid.GridInfoConstants;
import com.raytheon.uf.common.dataplugin.grid.GridInfoRecord; import com.raytheon.uf.common.dataplugin.grid.GridInfoRecord;
@ -64,6 +54,15 @@ import com.raytheon.uf.common.derivparam.library.DerivParamMethod.MethodType;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode; import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.derivparam.tree.StaticDataLevelNode; import com.raytheon.uf.common.derivparam.tree.StaticDataLevelNode;
import com.raytheon.uf.common.gridcoverage.GridCoverage; import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode.Dependency;
import com.raytheon.uf.common.inventory.tree.CubeLevel;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
@ -95,6 +94,7 @@ import com.raytheon.viz.grid.util.RadarAdapter;
* parameters. * parameters.
* Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived * Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived
* parameters to common * parameters to common
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -256,15 +256,7 @@ public class GridInventory extends AbstractInventory implements
return null; return null;
} }
if (nodes.get(0) instanceof AbstractDerivedDataNode) { if (nodes.get(0) instanceof AbstractDerivedDataNode) {
try { updater.addNode((AbstractDerivedDataNode) nodes.get(0));
updater.addNode((AbstractDerivedDataNode) nodes.get(0));
} catch (VizException e) {
statusHandler
.handle(Priority.PROBLEM,
"Error occured in Grid Inventory: Grid Update may be broken",
e);
return null;
}
} }
return nodes.get(0); return nodes.get(0);
} catch (InterruptedException e) { } catch (InterruptedException e) {
@ -275,6 +267,7 @@ public class GridInventory extends AbstractInventory implements
return null; return null;
} }
@Override
protected DataTree createBaseTree() throws DataCubeException { protected DataTree createBaseTree() throws DataCubeException {
DataTree newTree = getTreeFromEdex(); DataTree newTree = getTreeFromEdex();
if (newTree == null) { if (newTree == null) {
@ -349,8 +342,8 @@ public class GridInventory extends AbstractInventory implements
// This should query all times for this model. // This should query all times for this model.
DataTime[] timesArray; DataTime[] timesArray;
try { try {
timesArray = CatalogQuery.performTimeQuery(newQuery, timesArray = CatalogQuery.performTimeQuery(newQuery, false,
false, null); null);
} catch (VizException e) { } catch (VizException e) {
throw new DataCubeException(e); throw new DataCubeException(e);
} }
@ -476,18 +469,11 @@ public class GridInventory extends AbstractInventory implements
List<AbstractRequestableNode> nodes = walkTree(null, List<AbstractRequestableNode> nodes = walkTree(null,
sourcesToProcess, paramsToProcess, levelsToProcess, sourcesToProcess, paramsToProcess, levelsToProcess,
true, true, null); true, true, null);
try {
for (AbstractRequestableNode node : nodes) { for (AbstractRequestableNode node : nodes) {
if (node instanceof AbstractDerivedDataNode) { if (node instanceof AbstractDerivedDataNode) {
updater.addNode((AbstractDerivedDataNode) node); updater.addNode((AbstractDerivedDataNode) node);
}
} }
} catch (VizException e) {
statusHandler
.handle(Priority.PROBLEM,
"Error occured in Grid Inventory: Grid Update may be broken",
e);
} }
return nodes; return nodes;
} catch (InterruptedException e) { } catch (InterruptedException e) {
@ -694,8 +680,7 @@ public class GridInventory extends AbstractInventory implements
@Override @Override
protected LevelNode getCubeNode(SourceNode sNode, DerivParamField field, protected LevelNode getCubeNode(SourceNode sNode, DerivParamField field,
Deque<StackEntry> stack, Set<StackEntry> nodata) Deque<StackEntry> stack, Set<StackEntry> nodata) {
throws CommunicationException {
StackEntry se = new StackEntry(sNode.getValue(), field.getParam(), StackEntry se = new StackEntry(sNode.getValue(), field.getParam(),
Long.MIN_VALUE); Long.MIN_VALUE);
if (stack.contains(se)) { if (stack.contains(se)) {
@ -748,6 +733,7 @@ public class GridInventory extends AbstractInventory implements
return null; return null;
} }
@Override
protected Object resolvePluginStaticData(SourceNode sNode, protected Object resolvePluginStaticData(SourceNode sNode,
DerivParamField field, Level level) { DerivParamField field, Level level) {
String fieldParamAbbrev = field.getParam(); String fieldParamAbbrev = field.getParam();
@ -766,6 +752,7 @@ public class GridInventory extends AbstractInventory implements
return null; return null;
} }
@Override
protected AbstractDerivedDataNode createDerivedNode(DerivParamDesc desc, protected AbstractDerivedDataNode createDerivedNode(DerivParamDesc desc,
DerivParamMethod method, Level level, List<Object> fields, DerivParamMethod method, Level level, List<Object> fields,
SourceNode source) { SourceNode source) {

View file

@ -27,10 +27,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode.Dependency;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
@ -39,13 +35,11 @@ import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode; import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.derivparam.tree.OrLevelNode; import com.raytheon.uf.common.derivparam.tree.OrLevelNode;
import com.raytheon.uf.common.gridcoverage.GridCoverage; import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode.Dependency;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.parameter.Parameter; import com.raytheon.uf.common.parameter.Parameter;
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.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.alerts.AlertMessage; import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.viz.alerts.IAlertObserver; import com.raytheon.viz.alerts.IAlertObserver;
import com.raytheon.viz.alerts.observers.ProductAlertObserver; import com.raytheon.viz.alerts.observers.ProductAlertObserver;
import com.raytheon.viz.grid.util.RadarAdapter; import com.raytheon.viz.grid.util.RadarAdapter;
@ -60,6 +54,7 @@ import com.raytheon.viz.grid.util.RadarAdapter;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Mar 25, 2010 bsteffen Initial creation * Mar 25, 2010 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -67,8 +62,6 @@ import com.raytheon.viz.grid.util.RadarAdapter;
* @version 1.0 * @version 1.0
*/ */
public class GridUpdater implements IAlertObserver { public class GridUpdater implements IAlertObserver {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(GridUpdater.class);
private class UpdateValue { private class UpdateValue {
public int timeOffset; public int timeOffset;
@ -152,8 +145,7 @@ public class GridUpdater implements IAlertObserver {
ProductAlertObserver.removeObserver(GridInventory.PLUGIN_NAME, this); ProductAlertObserver.removeObserver(GridInventory.PLUGIN_NAME, this);
} }
public synchronized void addNode(AbstractDerivedDataNode node) public synchronized void addNode(AbstractDerivedDataNode node) {
throws VizException {
List<Dependency> dependencies = node.getDependencies(); List<Dependency> dependencies = node.getDependencies();
if ((dependencies == null) || dependencies.isEmpty()) { if ((dependencies == null) || dependencies.isEmpty()) {
return; return;
@ -224,17 +216,11 @@ public class GridUpdater implements IAlertObserver {
} }
GridMapKey updateKey = new GridMapKey(alert.decodedAlert); GridMapKey updateKey = new GridMapKey(alert.decodedAlert);
GridTimeCache.getInstance().clearTimes(updateKey); GridTimeCache.getInstance().clearTimes(updateKey);
LevelNode lNode = null; Level level = LevelFactory.getInstance().getLevel(
try { updateKey.masterLevel, updateKey.levelone,
Level level = LevelFactory.getInstance().getLevel( updateKey.leveltwo);
updateKey.masterLevel, updateKey.levelone, LevelNode lNode = inventory.getNode(updateKey.modelName,
updateKey.leveltwo); updateKey.parameter, level);
lNode = inventory.getNode(updateKey.modelName,
updateKey.parameter, level);
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
}
if (lNode == null) { if (lNode == null) {
inventory.reinitTree(); inventory.reinitTree();
@ -292,16 +278,7 @@ public class GridUpdater implements IAlertObserver {
.get(GridConstants.SECONDARY_ID)); .get(GridConstants.SECONDARY_ID));
fakeRec.setLocation((GridCoverage) alert.decodedAlert fakeRec.setLocation((GridCoverage) alert.decodedAlert
.get(GridConstants.LOCATION)); .get(GridConstants.LOCATION));
try { datauris.add(fakeRec.getDataURI());
fakeRec.constructDataURI();
datauris.add(fakeRec.getDataURI());
} catch (PluginException e) {
statusHandler
.handle(Priority.PROBLEM,
"Unable to generate updates for derived product",
e);
}
} }
} }
myUpdates.addAll(datauris); myUpdates.addAll(datauris);

View file

@ -7,19 +7,14 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.TimeAndSpace;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.radar.RadarStation; import com.raytheon.uf.common.dataplugin.radar.RadarStation;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType; import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.inventory.TimeAndSpace;
import com.raytheon.uf.common.parameter.Parameter; import com.raytheon.uf.common.parameter.Parameter;
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.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.alerts.AlertMessage; import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.viz.alerts.IAlertObserver; import com.raytheon.viz.alerts.IAlertObserver;
@ -41,6 +36,7 @@ import com.raytheon.viz.grid.util.RadarProductCodeMapping;
* Sep 20, 2012 bsteffen Initial creation * Sep 20, 2012 bsteffen Initial creation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Feb 21, 2014 DR 16744 D. Friedman Support thin client updates * Feb 21, 2014 DR 16744 D. Friedman Support thin client updates
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -48,8 +44,6 @@ import com.raytheon.viz.grid.util.RadarProductCodeMapping;
* @version 1.0 * @version 1.0
*/ */
public class RadarUpdater implements IAlertObserver { public class RadarUpdater implements IAlertObserver {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(RadarUpdater.class);
protected static final int CACHE_SIZE = 100; protected static final int CACHE_SIZE = 100;
@ -151,10 +145,12 @@ public class RadarUpdater implements IAlertObserver {
@Override @Override
public void alertArrived(Collection<AlertMessage> alertMessages) { public void alertArrived(Collection<AlertMessage> alertMessages) {
ProductAlertObserver.processDataURIAlerts(convertRadarAlertsToGridDatauris(alertMessages)); ProductAlertObserver
.processDataURIAlerts(convertRadarAlertsToGridDatauris(alertMessages));
} }
public Set<String> convertRadarAlertsToGridDatauris(Collection<AlertMessage> alertMessages) { public Set<String> convertRadarAlertsToGridDatauris(
Collection<AlertMessage> alertMessages) {
RadarStation configuredRadar = RadarAdapter.getInstance() RadarStation configuredRadar = RadarAdapter.getInstance()
.getConfiguredRadar(); .getConfiguredRadar();
if (configuredRadar == null) { if (configuredRadar == null) {
@ -191,14 +187,8 @@ public class RadarUpdater implements IAlertObserver {
} }
Double elevationAngle = (Double) obj; Double elevationAngle = (Double) obj;
cache.remove(new CacheKey(productCode, elevationAngle)); cache.remove(new CacheKey(productCode, elevationAngle));
Level level = null; Level level = LevelFactory.getInstance().getLevel(
try { RadarAdapter.CUBE_MASTER_LEVEL_NAME, elevationAngle);
level = LevelFactory.getInstance().getLevel(
RadarAdapter.CUBE_MASTER_LEVEL_NAME, elevationAngle);
} catch (CommunicationException e1) {
statusHandler.handle(Priority.PROBLEM,
e1.getLocalizedMessage(), e1);
}
GridRecord fakeRec = new GridRecord(); GridRecord fakeRec = new GridRecord();
fakeRec.setDataTime(time); fakeRec.setDataTime(time);
@ -206,13 +196,8 @@ public class RadarUpdater implements IAlertObserver {
Parameter param = new Parameter(paramAbbrev); Parameter param = new Parameter(paramAbbrev);
fakeRec.setParameter(param); fakeRec.setParameter(param);
fakeRec.setLevel(level); fakeRec.setLevel(level);
try {
fakeRec.constructDataURI(); datauris.add(fakeRec.getDataURI());
datauris.add(fakeRec.getDataURI());
} catch (PluginException e) {
statusHandler.handle(Priority.PROBLEM,
"Unable to generate updates for derived product", e);
}
} }
return datauris; return datauris;
} }

View file

@ -19,7 +19,6 @@
**/ **/
package com.raytheon.viz.grid.rsc; package com.raytheon.viz.grid.rsc;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapping; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapping;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
@ -38,7 +37,8 @@ import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
* *
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Sep 20, 2012 bsteffen Initial creation * Sep 20, 2012 bsteffen Initial creation
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -143,18 +143,13 @@ public class GridNameGenerator extends AbstractNameGenerator {
} }
private String lookupPlane(Level level) { private String lookupPlane(Level level) {
try { LevelMapping mapping = LevelMappingFactory.getInstance(
LevelMapping mapping = LevelMappingFactory.getInstance( LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) .getLevelMappingForLevel(level);
.getLevelMappingForLevel(level); if (mapping == null) {
if (mapping == null) {
return level.getMasterLevel().getName();
}
return mapping.getDisplayName();
} catch (CommunicationException e) {
return level.getMasterLevel().getName(); return level.getMasterLevel().getName();
} }
return mapping.getDisplayName();
} }
public void setPlaneLabelString(String planeLabelString) { public void setPlaneLabelString(String planeLabelString) {

View file

@ -34,12 +34,6 @@ import org.opengis.referencing.crs.ProjectedCRS;
import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransform;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.radar.RadarRecord; import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
@ -57,6 +51,11 @@ import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.gridcoverage.StereographicGridCoverage; import com.raytheon.uf.common.gridcoverage.StereographicGridCoverage;
import com.raytheon.uf.common.gridcoverage.exception.GridCoverageException; import com.raytheon.uf.common.gridcoverage.exception.GridCoverageException;
import com.raytheon.uf.common.gridcoverage.lookup.GridCoverageLookup; import com.raytheon.uf.common.gridcoverage.lookup.GridCoverageLookup;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
@ -84,6 +83,7 @@ import com.raytheon.viz.radar.util.StationUtils;
* Mar 23, 2010 #4473 rjpeter Initial creation * Mar 23, 2010 #4473 rjpeter Initial creation
* Feb 21, 2014 DR 16744 D. Friedman Add getUpdateConstraints * Feb 21, 2014 DR 16744 D. Friedman Add getUpdateConstraints
* Apr 1, 2014 DR 17220 D. Friedman Handle uninitialized grid inventory * Apr 1, 2014 DR 17220 D. Friedman Handle uninitialized grid inventory
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -313,12 +313,7 @@ public class RadarAdapter {
* @param level * @param level
*/ */
private void initTopoParam(SourceNode modelNameNode) { private void initTopoParam(SourceNode modelNameNode) {
Level sfc = null; Level sfc = LevelFactory.getInstance().getLevel("SFC", 0.0);
try {
sfc = LevelFactory.getInstance().getLevel("SFC", 0.0);
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
}
DerivParamDesc topo = new DerivParamDesc(); DerivParamDesc topo = new DerivParamDesc();
topo.setAbbreviation("Topo"); topo.setAbbreviation("Topo");
topo.setName("Topography"); topo.setName("Topography");

View file

@ -30,7 +30,6 @@ import java.util.Set;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
@ -38,9 +37,6 @@ import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.localization.PathManagerFactory;
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.viz.core.exception.VizException; import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.map.MapDescriptor; import com.raytheon.uf.viz.core.map.MapDescriptor;
import com.raytheon.uf.viz.datacube.DataCubeContainer; import com.raytheon.uf.viz.datacube.DataCubeContainer;
@ -58,6 +54,7 @@ import com.raytheon.viz.pointdata.util.PointDataInventory;
* ------------- -------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Sep 18, 2013 2391 mpduff Initial creation * Sep 18, 2013 2391 mpduff Initial creation
* Jun 06, 2014 2061 bsteffen Remove old PlotResource * Jun 06, 2014 2061 bsteffen Remove old PlotResource
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -69,9 +66,6 @@ public class PlotModels {
/** The only instance */ /** The only instance */
private static final PlotModels instance = new PlotModels(); private static final PlotModels instance = new PlotModels();
private final IUFStatusHandler statusHandler = UFStatus
.getHandler(PlotModels.class);
/** Constant */ /** Constant */
private final String PLOTLOCATION = "plotModels"; private final String PLOTLOCATION = "plotModels";
@ -195,19 +189,14 @@ public class PlotModels {
List<String> validLevels = new ArrayList<String>(); List<String> validLevels = new ArrayList<String>();
if (possibleLevels != null) { if (possibleLevels != null) {
for (String levelid : possibleLevels) { for (String levelid : possibleLevels) {
try { Level level = LevelFactory.getInstance().getLevel(
Level level = LevelFactory.getInstance().getLevel( Long.parseLong(levelid));
Long.parseLong(levelid)); validLevels
validLevels .add(LevelMappingFactory
.add(LevelMappingFactory .getInstance(
.getInstance( LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) .getLevelMappingForLevel(level)
.getLevelMappingForLevel(level) .getDisplayName());
.getDisplayName());
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
} }
} }
return validLevels.toArray(new String[0]); return validLevels.toArray(new String[0]);

View file

@ -28,14 +28,6 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
@ -46,6 +38,13 @@ import com.raytheon.uf.common.derivparam.library.DerivParamField;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod; import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod.MethodType; import com.raytheon.uf.common.derivparam.library.DerivParamMethod.MethodType;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode; import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.inventory.tree.DataTree;
import com.raytheon.uf.common.inventory.tree.LevelNode;
import com.raytheon.uf.common.inventory.tree.ParameterNode;
import com.raytheon.uf.common.inventory.tree.SourceNode;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
@ -63,7 +62,8 @@ import com.raytheon.uf.viz.core.exception.VizException;
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Apr 13, 2010 bsteffen Initial creation * Apr 13, 2010 bsteffen Initial creation
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -279,15 +279,10 @@ public abstract class AbstractPointDataInventory extends AbstractInventory {
} }
public static Level getStationLevel() { public static Level getStationLevel() {
try { return LevelMappingFactory
return LevelMappingFactory .getInstance(
.getInstance( LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) .getLevelMappingForKey("Station").getLevels().get(0);
.getLevelMappingForKey("Station").getLevels().get(0);
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
return null;
}
} }
} }

View file

@ -25,10 +25,6 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
@ -36,6 +32,9 @@ import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord; import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.derivparam.inv.AvailabilityContainer; import com.raytheon.uf.common.derivparam.inv.AvailabilityContainer;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator; import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.pointdata.PointDataContainer; import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus;
@ -61,6 +60,7 @@ import com.raytheon.viz.pointdata.PointDataRequest;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jun 1, 2009 brockwoo Initial creation * Jun 1, 2009 brockwoo Initial creation
* Nov 21, 2009 #3576 rjpeter Refactored use of DerivParamDesc. * Nov 21, 2009 #3576 rjpeter Refactored use of DerivParamDesc.
* Sep 09, 2014 3356 njensen Remove CommunicationException
* </pre> * </pre>
* *
* @author brockwoo * @author brockwoo
@ -78,7 +78,7 @@ public class PointDataCubeAdapter extends DefaultDataCubeAdapter {
"goessounding", "bufrascat", "poessounding", "profiler", "bufrua", "goessounding", "bufrascat", "poessounding", "profiler", "bufrua",
"ldadmesonet", "ldadhydro", "qc", "fssobs", "bufrmosAVN", "ldadmesonet", "ldadhydro", "qc", "fssobs", "bufrmosAVN",
"bufrmosETA", "bufrmosGFS", "bufrmosHPC", "bufrmosLAMP", "bufrmosETA", "bufrmosGFS", "bufrmosHPC", "bufrmosLAMP",
"bufrmosMRF", "bufrmosNGM", "airep", "pirep", "nctaf"}; "bufrmosMRF", "bufrmosNGM", "airep", "pirep", "nctaf" };
protected AbstractPointDataInventory inventory; protected AbstractPointDataInventory inventory;
@ -131,14 +131,11 @@ public class PointDataCubeAdapter extends DefaultDataCubeAdapter {
} }
List<Level> levels; List<Level> levels;
try { levels = LevelMappingFactory
levels = LevelMappingFactory .getInstance(
.getInstance( LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) .getLevelMappingForKey(levelKey).getLevels();
.getLevelMappingForKey(levelKey).getLevels();
} catch (CommunicationException e) {
throw new DataCubeException(e);
}
List<AbstractRequestableNode> nodes; List<AbstractRequestableNode> nodes;
try { try {
nodes = inventory.getNodes(source, Arrays.asList(parameters), nodes = inventory.getNodes(source, Arrays.asList(parameters),

View file

@ -28,7 +28,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
@ -69,6 +68,7 @@ import com.raytheon.viz.alerts.observers.ProductAlertObserver;
* ------------- -------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Apr 09, 2014 2947 bsteffen Initial creation * Apr 09, 2014 2947 bsteffen Initial creation
* May 06, 2014 3117 bsteffen Update for new data. * May 06, 2014 3117 bsteffen Update for new data.
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -106,11 +106,7 @@ public class SatelliteInventory extends AbstractInventory implements
@Override @Override
public synchronized void initTree(Map<String, DerivParamDesc> derParLibrary) public synchronized void initTree(Map<String, DerivParamDesc> derParLibrary)
throws DataCubeException { throws DataCubeException {
try { level = LevelFactory.getInstance().getLevel("EA", 0.0);
level = LevelFactory.getInstance().getLevel("EA", 0.0);
} catch (CommunicationException e) {
throw new DataCubeException(e);
}
coverages = new SatelliteCoverageCache(); coverages = new SatelliteCoverageCache();
super.initTree(derParLibrary); super.initTree(derParLibrary);
} }
@ -251,7 +247,8 @@ public class SatelliteInventory extends AbstractInventory implements
try { try {
initTree(derParLibrary); initTree(derParLibrary);
} catch (DataCubeException e) { } catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
} }
return; return;
} }

View file

@ -29,7 +29,6 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.util.GridLevelTranslator; import com.raytheon.uf.common.dataplugin.grid.util.GridLevelTranslator;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapping; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapping;
@ -84,6 +83,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* graph plugin * graph plugin
* Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived * Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived
* parameters to common * parameters to common
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -359,24 +359,14 @@ public abstract class AbstractDataCatalog implements IDataCatalog {
Collection<Level> levels = Collections.emptyList(); Collection<Level> levels = Collections.emptyList();
if (planesKey.startsWith("spatial-")) { if (planesKey.startsWith("spatial-")) {
try { levels = LevelUtilities.getOrderedSetOfStandardLevels(planesKey
levels = LevelUtilities.getOrderedSetOfStandardLevels(planesKey .replace("spatial-", ""));
.replace("spatial-", ""));
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
}
} else { } else {
try { LevelMappingFactory lmf = LevelMappingFactory
LevelMappingFactory lmf = LevelMappingFactory .getInstance(LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE);
.getInstance(LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE); LevelMapping lm = lmf.getLevelMappingForKey(planesKey);
LevelMapping lm = lmf.getLevelMappingForKey(planesKey); if (lm != null) {
if (lm != null) { levels = lm.getLevels();
levels = lm.getLevels();
}
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
} }
} }
ParamLevelMatchCriteria match = new ParamLevelMatchCriteria(); ParamLevelMatchCriteria match = new ParamLevelMatchCriteria();

View file

@ -35,7 +35,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.Job;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapping; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapping;
@ -64,6 +63,7 @@ import com.raytheon.viz.volumebrowser.vbui.VolumeBrowserAction;
* Jul 25, 2013 2112 bsteffen Fix volume browser sounding errors. * Jul 25, 2013 2112 bsteffen Fix volume browser sounding errors.
* Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived * Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived
* parameters to common * parameters to common
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -152,7 +152,7 @@ public abstract class AbstractInventoryDataCatalog extends AbstractDataCatalog {
inventory.checkLevels(fSourcesToProcess, fParamsToProcess, inventory.checkLevels(fSourcesToProcess, fParamsToProcess,
null, levelQueue); null, levelQueue);
} catch (InterruptedException e) { } catch (InterruptedException e) {
; // no-op
} }
return Status.OK_STATUS; return Status.OK_STATUS;
} }
@ -176,27 +176,21 @@ public abstract class AbstractInventoryDataCatalog extends AbstractDataCatalog {
String levelStr = levelQueue.poll(); String levelStr = levelQueue.poll();
while (levelStr != null) { while (levelStr != null) {
// Convert levels into planes. // Convert levels into planes.
try { Level level = LevelFactory.getInstance().getLevel(levelStr);
Level level = LevelFactory.getInstance().getLevel(levelStr);
if (levels3D.contains(level)) { if (levels3D.contains(level)) {
for (String plane : get3DPlanes(sourcesToProcess)) { for (String plane : get3DPlanes(sourcesToProcess)) {
request.addAvailablePlane(plane); request.addAvailablePlane(plane);
}
} }
request.addAvailablePlane("spatial-" }
+ level.getMasterLevel().getName()); request.addAvailablePlane("spatial-"
LevelMapping lm = LevelMappingFactory + level.getMasterLevel().getName());
.getInstance( LevelMapping lm = LevelMappingFactory.getInstance(
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
.getLevelMappingForLevel(level); .getLevelMappingForLevel(level);
if (lm != null) { if (lm != null) {
request.addAvailablePlane(lm.getKey()); request.addAvailablePlane(lm.getKey());
}
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
} }
levelStr = levelQueue.poll(); levelStr = levelQueue.poll();
@ -211,7 +205,7 @@ public abstract class AbstractInventoryDataCatalog extends AbstractDataCatalog {
try { try {
Thread.sleep(10); Thread.sleep(10);
} catch (InterruptedException e) { } catch (InterruptedException e) {
; // no-op
} }
} }
} }
@ -247,9 +241,10 @@ public abstract class AbstractInventoryDataCatalog extends AbstractDataCatalog {
if (inventory != null) { if (inventory != null) {
try { try {
inventory.checkSources(null, null, null, returnQueue); inventory.checkSources(null, null, null, returnQueue);
} catch (InterruptedException e) { } catch (InterruptedException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
} e);
}
} }
List<String> result = new ArrayList<String>(returnQueue); List<String> result = new ArrayList<String>(returnQueue);
result.retainAll(MenuItemManager.getInstance() result.retainAll(MenuItemManager.getInstance()
@ -288,23 +283,12 @@ public abstract class AbstractInventoryDataCatalog extends AbstractDataCatalog {
for (String plane : selectedPlanes) { for (String plane : selectedPlanes) {
Collection<Level> levels = Collections.emptyList(); Collection<Level> levels = Collections.emptyList();
if (plane.startsWith("spatial-")) { if (plane.startsWith("spatial-")) {
try { levels = LevelUtilities.getOrderedSetOfStandardLevels(plane
levels = LevelUtilities .replace("spatial-", ""));
.getOrderedSetOfStandardLevels(plane.replace(
"spatial-", ""));
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
} else { } else {
LevelMapping lm = lmf.getLevelMappingForKey(plane); LevelMapping lm = lmf.getLevelMappingForKey(plane);
if (lm != null) { if (lm != null) {
try { levels = lm.getLevels();
levels = lm.getLevels();
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
} }
} }
for (Level l : levels) { for (Level l : levels) {

View file

@ -36,7 +36,6 @@ import org.geotools.geometry.jts.ReferencedEnvelope;
import org.opengis.geometry.BoundingBox; import org.opengis.geometry.BoundingBox;
import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransform;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.GridConstants; import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
@ -88,6 +87,7 @@ import com.vividsolutions.jts.geom.LineString;
* Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived * Jan 30, 2014 #2725 ekladstrup updated exception handling during move of derived
* parameters to common * parameters to common
* Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5 * Mar 11, 2014 #2718 randerso Changes for GeoTools 10.5
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -188,16 +188,12 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
} else { } else {
// Get all possible levels for the selected levels // Get all possible levels for the selected levels
List<Level> selectedLevels = Collections.emptyList(); List<Level> selectedLevels = Collections.emptyList();
try { LevelMappingFactory lmf = LevelMappingFactory
LevelMappingFactory lmf = LevelMappingFactory .getInstance(LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE);
.getInstance(LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE); selectedLevels = new ArrayList<Level>(lmf
selectedLevels = new ArrayList<Level>(lmf .getLevelMappingForKey(catalogEntry.selectedPlanesKey)
.getLevelMappingForKey( .getLevels());
catalogEntry.selectedPlanesKey).getLevels());
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM,
e.getLocalizedMessage(), e);
}
RequestConstraint masterRC = new RequestConstraint(null, RequestConstraint masterRC = new RequestConstraint(null,
ConstraintType.IN); ConstraintType.IN);
RequestConstraint oneRC = new RequestConstraint(null, RequestConstraint oneRC = new RequestConstraint(null,
@ -346,32 +342,23 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
@Override @Override
protected Collection<? extends Level> get3DLevels() { protected Collection<? extends Level> get3DLevels() {
ArrayList<Level> all = new ArrayList<Level>(); ArrayList<Level> all = new ArrayList<Level>();
try {
NavigableSet<Level> tilts = LevelUtilities NavigableSet<Level> tilts = LevelUtilities
.getOrderedSetOfStandardLevels("TILT"); .getOrderedSetOfStandardLevels("TILT");
if (tilts != null) { if (tilts != null) {
all.addAll(tilts); all.addAll(tilts);
}
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
} }
try {
NavigableSet<Level> pres = LevelUtilities NavigableSet<Level> pres = LevelUtilities
.getOrderedSetOfStandardLevels("MB"); .getOrderedSetOfStandardLevels("MB");
if (pres != null) { if (pres != null) {
all.addAll(pres); all.addAll(pres);
}
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
} }
try {
NavigableSet<Level> theta = LevelUtilities NavigableSet<Level> theta = LevelUtilities
.getOrderedSetOfStandardLevels("K"); .getOrderedSetOfStandardLevels("K");
if (theta != null) { if (theta != null) {
all.addAll(theta); all.addAll(theta);
}
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
} }
return all; return all;
@ -387,7 +374,7 @@ public class GridDataCatalog extends AbstractInventoryDataCatalog {
ViewMenu viewSelection = VolumeBrowserAction.getVolumeBrowserDlg() ViewMenu viewSelection = VolumeBrowserAction.getVolumeBrowserDlg()
.getDialogSettings().getViewSelection(); .getDialogSettings().getViewSelection();
if (viewSelection == ViewMenu.PLANVIEW) { if (viewSelection == ViewMenu.PLANVIEW) {
;// // no-op
} else if (viewSelection == ViewMenu.TIMESERIES) { } else if (viewSelection == ViewMenu.TIMESERIES) {
pointLetters.add(VolumeBrowserAction.getVolumeBrowserDlg() pointLetters.add(VolumeBrowserAction.getVolumeBrowserDlg()
.getDialogSettings().getPointsSelection().getName()); .getDialogSettings().getPointsSelection().getName());

View file

@ -32,7 +32,6 @@ import java.util.Set;
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory; import com.raytheon.uf.common.dataplugin.level.mapping.LevelMappingFactory;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
@ -80,6 +79,7 @@ import com.vividsolutions.jts.geom.LineString;
* with hodo. * with hodo.
* Aug 15, 2013 2260 bsteffen Switch poessounding to NSharp. * Aug 15, 2013 2260 bsteffen Switch poessounding to NSharp.
* Jul 23, 2014 3410 bclement location changed to floats * Jul 23, 2014 3410 bclement location changed to floats
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -400,15 +400,10 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog {
*/ */
@Override @Override
protected Collection<? extends Level> get3DLevels() { protected Collection<? extends Level> get3DLevels() {
try { return LevelMappingFactory
return LevelMappingFactory .getInstance(
.getInstance( LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE)
LevelMappingFactory.VOLUMEBROWSER_LEVEL_MAPPING_FILE) .getLevelMappingForKey("Station").getLevels();
.getLevelMappingForKey("Station").getLevels();
} catch (CommunicationException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
return Collections.emptyList();
}
} }
@Override @Override
@ -441,12 +436,10 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog {
AbstractRequestableResourceData resourceData = super AbstractRequestableResourceData resourceData = super
.getResourceData(catalogEntry, resourceType); .getResourceData(catalogEntry, resourceType);
// TODO this should be configurable, and shared with PLAN_VIEW // TODO this should be configurable, and shared with PLAN_VIEW
if (sourceText if (sourceText.equals("RaobOA")) {
.equals("RaobOA")) {
BinOffset binOffset = new BinOffset(3600, 3600); BinOffset binOffset = new BinOffset(3600, 3600);
resourceData.setBinOffset(binOffset); resourceData.setBinOffset(binOffset);
} else if (sourceText } else if (sourceText.equals("MetarOA")) {
.equals("MetarOA")) {
BinOffset binOffset = new BinOffset(1800, 1800); BinOffset binOffset = new BinOffset(1800, 1800);
resourceData.setBinOffset(binOffset); resourceData.setBinOffset(binOffset);
} }
@ -559,7 +552,7 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog {
ViewMenu viewSelection = VolumeBrowserAction.getVolumeBrowserDlg() ViewMenu viewSelection = VolumeBrowserAction.getVolumeBrowserDlg()
.getDialogSettings().getViewSelection(); .getDialogSettings().getViewSelection();
if (viewSelection == ViewMenu.PLANVIEW) { if (viewSelection == ViewMenu.PLANVIEW) {
;// // no-op
} else if (viewSelection == ViewMenu.TIMESERIES) { } else if (viewSelection == ViewMenu.TIMESERIES) {
String name = VolumeBrowserAction.getVolumeBrowserDlg() String name = VolumeBrowserAction.getVolumeBrowserDlg()
.getDialogSettings().getPointsSelection().getName(); .getDialogSettings().getPointsSelection().getName();

View file

@ -45,7 +45,6 @@ import com.raytheon.edex.plugin.gfe.db.dao.GFED2DDao;
import com.raytheon.edex.plugin.gfe.paraminfo.GridParamInfo; import com.raytheon.edex.plugin.gfe.paraminfo.GridParamInfo;
import com.raytheon.edex.plugin.gfe.paraminfo.GridParamInfoLookup; import com.raytheon.edex.plugin.gfe.paraminfo.GridParamInfoLookup;
import com.raytheon.edex.plugin.gfe.paraminfo.ParameterInfo; import com.raytheon.edex.plugin.gfe.paraminfo.ParameterInfo;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory; import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory;
import com.raytheon.uf.common.dataplugin.gfe.RemapGrid; import com.raytheon.uf.common.dataplugin.gfe.RemapGrid;
@ -117,6 +116,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
* 05/22/2014 #3071 randerso Improved error logging * 05/22/2014 #3071 randerso Improved error logging
* 06/24/2014 #3317 randerso Don't allow database to be created if it exceeds D2DDBVERSIONS and * 06/24/2014 #3317 randerso Don't allow database to be created if it exceeds D2DDBVERSIONS and
* should be purged. * should be purged.
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -1237,15 +1237,10 @@ public class D2DGridDatabase extends VGridDatabase {
private Level getD2DLevel(String gfeLevel) { private Level getD2DLevel(String gfeLevel) {
List<Level> levels = Collections.emptyList(); List<Level> levels = Collections.emptyList();
try { LevelMapping lm = LevelMappingFactory.getInstance(
LevelMapping lm = LevelMappingFactory.getInstance( GFE_LEVEL_MAPPING_FILE).getLevelMappingForKey(gfeLevel);
GFE_LEVEL_MAPPING_FILE).getLevelMappingForKey(gfeLevel); if (lm != null) {
levels = lm.getLevels();
if (lm != null) {
levels = lm.getLevels();
}
} catch (CommunicationException e) {
// do nothing
} }
Level level = null; Level level = null;
@ -1260,12 +1255,8 @@ public class D2DGridDatabase extends VGridDatabase {
private String getGFELevel(Level d2dLevel) { private String getGFELevel(Level d2dLevel) {
LevelMapping levelMapping; LevelMapping levelMapping;
try { levelMapping = LevelMappingFactory.getInstance(GFE_LEVEL_MAPPING_FILE)
levelMapping = LevelMappingFactory.getInstance( .getLevelMappingForLevel(d2dLevel);
GFE_LEVEL_MAPPING_FILE).getLevelMappingForLevel(d2dLevel);
} catch (CommunicationException e) {
levelMapping = null;
}
String gfeLevel = null; String gfeLevel = null;
if (levelMapping == null) { if (levelMapping == null) {

View file

@ -19,7 +19,7 @@
factory-method="getInstance" /> factory-method="getInstance" />
<bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup" <bean id="gribTableLookup" class="com.raytheon.edex.util.grib.GribTableLookup"
factory-method="getInstance" depends-on="gridRegistered" /> factory-method="getInstance" depends-on="gridRegistered, queryDataRegistered" />
<bean id="gribModelLookup" <bean id="gribModelLookup"
class="com.raytheon.edex.plugin.grib.util.GribModelLookup" class="com.raytheon.edex.plugin.grib.util.GribModelLookup"

View file

@ -54,7 +54,6 @@ import com.raytheon.edex.plugin.grib.util.GridModel;
import com.raytheon.edex.util.grib.Grib1TableMap; import com.raytheon.edex.util.grib.Grib1TableMap;
import com.raytheon.edex.util.grib.GribParamTranslator; import com.raytheon.edex.util.grib.GribParamTranslator;
import com.raytheon.edex.util.grib.GribTableLookup; import com.raytheon.edex.util.grib.GribTableLookup;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
@ -99,6 +98,7 @@ import com.raytheon.uf.common.util.mapping.MultipleMappingException;
* files. * files.
* Oct 15, 2013 2473 bsteffen Removed deprecated and unused code. * Oct 15, 2013 2473 bsteffen Removed deprecated and unused code.
* Jul 30, 2014 3469 bsteffen Improve logging of invalid files. * Jul 30, 2014 3469 bsteffen Improve logging of invalid files.
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -1258,8 +1258,6 @@ public class Grib1Decoder extends AbstractDecoder {
try { try {
return LevelMapper.getInstance().lookupLevel(levelName, "grib", return LevelMapper.getInstance().lookupLevel(levelName, "grib",
levelOneValue, levelTwoValue, levelUnit); levelOneValue, levelTwoValue, levelUnit);
} catch (CommunicationException e) {
throw new GribException("Error requesting levels", e);
} catch (MultipleLevelMappingException e) { } catch (MultipleLevelMappingException e) {
statusHandler.handle(Priority.WARN, e.getLocalizedMessage(), e); statusHandler.handle(Priority.WARN, e.getLocalizedMessage(), e);
return e.getArbitraryLevelMapping(); return e.getArbitraryLevelMapping();

View file

@ -21,7 +21,6 @@
package com.raytheon.edex.plugin.grib.decoderpostprocessors; package com.raytheon.edex.plugin.grib.decoderpostprocessors;
import com.raytheon.edex.plugin.grib.exception.GribException; import com.raytheon.edex.plugin.grib.exception.GribException;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.GridRecord; import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level; import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
@ -38,6 +37,7 @@ import com.raytheon.uf.common.parameter.Parameter;
* ------------- -------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Apr 07, 2011 6619 bphillip Initial creation * Apr 07, 2011 6619 bphillip Initial creation
* Oct 15, 2013 2473 bsteffen Remove deprecated method calls. * Oct 15, 2013 2473 bsteffen Remove deprecated method calls.
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -60,13 +60,9 @@ public class LapsPostProcessor implements IDecoderPostProcessor {
String levelName = record.getLevel().getMasterLevel().getName(); String levelName = record.getLevel().getMasterLevel().getName();
boolean modelInfoModified = false; boolean modelInfoModified = false;
if (levelName.equals(FHAG)) { if (levelName.equals(FHAG)) {
try { Level sfcLevel = LevelFactory.getInstance().getLevel(SFC, 0);
Level sfcLevel = LevelFactory.getInstance().getLevel(SFC, 0); record.setLevel(sfcLevel);
record.setLevel(sfcLevel); modelInfoModified = true;
modelInfoModified = true;
} catch (CommunicationException e) {
throw new GribException("Error modifying LAPS records.", e);
}
} }
if (record.getParameter().getAbbreviation().equals(PMSL)) { if (record.getParameter().getAbbreviation().equals(PMSL)) {

View file

@ -64,7 +64,8 @@ import com.raytheon.uf.common.util.mapping.Mapper;
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use * Feb 14, 2013 1614 bsteffen Refactor data access framework to use
* single request. * single request.
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids. * Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
* Jul 30, 2014 3184 njensen Ranemd valid identifiers to optional * Jul 30, 2014 3184 njensen Renamed valid identifiers to optional
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* *
* </pre> * </pre>
@ -223,21 +224,19 @@ public class GridDataAccessFactory extends AbstractGridDataPluginFactory
double leveltwo = requestLevel.getLeveltwovalue(); double leveltwo = requestLevel.getLeveltwovalue();
String master = requestLevel.getMasterLevel().getName(); String master = requestLevel.getMasterLevel().getName();
Unit<?> unit = requestLevel.getMasterLevel().getUnit(); Unit<?> unit = requestLevel.getMasterLevel().getUnit();
try {
// instead of doing reverse mapping just do a forward // instead of doing reverse mapping just do a forward
// mapping on everything they requested and compare to what // mapping on everything they requested and compare to what
// they got. // they got.
Set<Level> levels = LevelMapper.getInstance().lookupLevels( Set<Level> levels = LevelMapper.getInstance().lookupLevels(
master, namespace, levelone, leveltwo, unit); master, namespace, levelone, leveltwo, unit);
for (Level l : levels) { for (Level l : levels) {
if (level.equals(l)) { if (level.equals(l)) {
level = requestLevel; level = requestLevel;
break; break;
}
} }
} catch (CommunicationException e) {
throw new DataRetrievalException(e);
} }
if (level == requestLevel) { if (level == requestLevel) {
// we found one. // we found one.
break; break;

View file

@ -1,8 +0,0 @@
#Fri Feb 03 13:25:55 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
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

@ -26,7 +26,6 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.dataplugin.grid.GridInfoConstants; import com.raytheon.uf.common.dataplugin.grid.GridInfoConstants;
import com.raytheon.uf.common.dataplugin.grid.GridInfoRecord; import com.raytheon.uf.common.dataplugin.grid.GridInfoRecord;
import com.raytheon.uf.common.dataplugin.level.LevelFactory; import com.raytheon.uf.common.dataplugin.level.LevelFactory;
@ -51,6 +50,7 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* May 21, 2012 bsteffen Initial creation * May 21, 2012 bsteffen Initial creation
* Mar 27, 2013 1821 bsteffen Speed up GridInfoCache. * Mar 27, 2013 1821 bsteffen Speed up GridInfoCache.
* Sep 09, 2014 3356 njensen Remove CommunicationException
* *
* </pre> * </pre>
* *
@ -245,14 +245,8 @@ public class GridInfoCache {
record.getLocation().getId())); record.getLocation().getId()));
record.setParameter(ParameterLookup.getInstance().getParameter( record.setParameter(ParameterLookup.getInstance().getParameter(
record.getParameter().getAbbreviation())); record.getParameter().getAbbreviation()));
try { record.setLevel(LevelFactory.getInstance().getLevel(
record.setLevel(LevelFactory.getInstance().getLevel( record.getLevel().getId()));
record.getLevel().getId()));
} catch (CommunicationException e) {
// This should never hit and if it does ignore it, the only side
// affect is thatthe level in the record will not be the same as
// the other records on the same level.
}
primaryCache.put(record, record); primaryCache.put(record, record);
} }