Issue #2725 Move derived parameters logic to common

* Make derived parameters not use VizException
* Move derived parameters packages from the viz hierarchy
  to the common hierarchy
* Move data cube classes that don't depend on derived parameters
  to thier own plugin
* Moved DataCubeContainer and supporting frontend classes from
  viz.core to viz.datacube


Former-commit-id: eab1358602 [formerly 8b19b3601a] [formerly 06d6961c0f] [formerly eab1358602 [formerly 8b19b3601a] [formerly 06d6961c0f] [formerly 0699041518 [formerly 06d6961c0f [formerly ad4a8cfbbc6de72810492c8f1de9701d381b6019]]]]
Former-commit-id: 0699041518
Former-commit-id: 29ce7781c9 [formerly 86bf2b5ea0] [formerly eb5b00071037510aefc04c8c20411cc18c44abb0 [formerly 260d0beddc]]
Former-commit-id: 41d01092799ccea952f65c9d6b66d93b56557541 [formerly d96b56c91a]
Former-commit-id: 7b2683532a
This commit is contained in:
Everett Kladstrup 2014-03-15 15:02:17 -05:00
parent f25d331ee0
commit f815fbcb60
1134 changed files with 2228 additions and 1409 deletions

View file

@ -15,10 +15,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174",
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
com.raytheon.uf.common.derivparam;bundle-version="1.12.1174",
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
com.raytheon.uf.viz.derivparam;bundle-version="1.12.1174",
com.raytheon.viz.pointdata;bundle-version="1.12.1174",
com.raytheon.uf.common.wxmath,
gov.noaa.nws.ncep.edex.common;bundle-version="1.0.0",
@ -26,4 +24,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
com.raytheon.uf.viz.d2d.nsharp;bundle-version="1.0.0",
org.geotools;bundle-version="2.6.4",
javax.measure;bundle-version="1.0.0",
com.raytheon.viz.volumebrowser;bundle-version="1.12.1174"
com.raytheon.viz.volumebrowser;bundle-version="1.12.1174",
com.raytheon.uf.common.comm;bundle-version="1.12.1174",
com.raytheon.uf.common.derivparam;bundle-version="1.14.0"
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.viz.datacube

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.acarssounding.ACARSSoundingDataCubeAdapter

View file

@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
plugin.xml,\
res/

View file

@ -0,0 +1,13 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="acarssoundingDataCubeAdapter" class="com.raytheon.uf.viz.acarssounding.ACARSSoundingDataCubeAdapter" />
<bean id="acarssoundingDataCubeAdapterRegistered"
factory-bean="dataCubeAdapterRegistry"
factory-method="registerAdapter">
<constructor-arg ref="acarssoundingDataCubeAdapter" />
</bean>
</beans>

View file

@ -29,6 +29,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingLayer;
import com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingRecord;
@ -38,13 +39,12 @@ import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.datastorage.records.IntegerDataRecord;
import com.raytheon.uf.common.datastorage.records.LongDataRecord;
import com.raytheon.uf.common.datastorage.records.StringDataRecord;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.pointdata.PointDataContainer;
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.wxmath.ZToPsa;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.derivparam.library.DerivedParameterGenerator;
import com.raytheon.viz.pointdata.util.AbstractPointDataInventory;
import com.raytheon.viz.pointdata.util.PointDataCubeAdapter;
@ -132,7 +132,7 @@ public class ACARSSoundingDataCubeAdapter extends PointDataCubeAdapter {
pointInventory.initTree(DerivedParameterGenerator
.getDerParLibrary());
this.inventory = pointInventory;
} catch (VizException e) {
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
}
@ -141,7 +141,8 @@ public class ACARSSoundingDataCubeAdapter extends PointDataCubeAdapter {
@Override
public PointDataContainer getBaseRecords(Collection<String> baseParameters,
Map<String, RequestConstraint> queryParams) throws VizException {
Map<String, RequestConstraint> queryParams)
throws DataCubeException {
List<String> baseParams = new ArrayList<String>(baseParameters);
PluginDataObject[] pdos = getData(queryParams, null);

View file

@ -6,10 +6,12 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.raytheon.uf.viz.coopprecip.Activator
Bundle-Vendor: RAYTHEON
Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.uf.viz.core
Require-Bundle: org.eclipse.core.runtime
Require-Bundle: org.eclipse.core.runtime,
com.raytheon.uf.viz.datacube
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: com.raytheon.uf.common.dataplugin,
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.dataplugin.text,
com.raytheon.uf.common.dataplugin.text.db,
com.raytheon.uf.common.dataplugin.text.request,

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.coopprecip.CoopPrecipDataCubeAdapter

View file

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

View file

@ -0,0 +1,13 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="coopprecipDataCubeAdapter" class="com.raytheon.uf.viz.coopprecip.CoopPrecipDataCubeAdapter" />
<bean id="coopprecipDataCubeAdapterRegistered"
factory-bean="dataCubeAdapterRegistry"
factory-method="registerAdapter">
<constructor-arg ref="coopprecipDataCubeAdapter" />
</bean>
</beans>

View file

@ -29,6 +29,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
@ -43,10 +44,9 @@ import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.time.BinOffset;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
import com.raytheon.uf.viz.core.datastructure.IDataCubeAdapter;
import com.raytheon.uf.viz.core.datastructure.VizDataCubeException;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.datacube.IDataCubeAdapter;
import com.raytheon.viz.pointdata.StaticPlotInfoPV;
import com.raytheon.viz.pointdata.StaticPlotInfoPV.SPIEntry;
import com.vividsolutions.jts.geom.Coordinate;
@ -127,7 +127,7 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
@Override
public List<List<DataTime>> timeQuery(List<TimeQueryRequest> requests)
throws VizException {
throws DataCubeException {
List<List<DataTime>> results = new ArrayList<List<DataTime>>(
requests.size());
for (TimeQueryRequest request : requests) {
@ -143,7 +143,7 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
}
public DataTime[] timeQuery(Map<String, RequestConstraint> queryParams,
boolean latestOnly, BinOffset binOffset) throws VizException {
boolean latestOnly, BinOffset binOffset) throws DataCubeException {
String nnnid = getNNNid(queryParams);
@ -177,10 +177,16 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
return nnnid;
}
private PointDataContainer getData(String nnnid) throws VizException {
List<Object[]> queryResult = DirectDbQuery.executeQuery(
"select refTime, product from stdtextproducts where nnnid = '"
+ nnnid + "'", "fxa", DirectDbQuery.QueryLanguage.SQL);
private PointDataContainer getData(String nnnid) throws DataCubeException {
List<Object[]> queryResult;
try {
queryResult = DirectDbQuery.executeQuery(
"select refTime, product from stdtextproducts where nnnid = '"
+ nnnid + "'", "fxa",
DirectDbQuery.QueryLanguage.SQL);
} catch (VizException e) {
throw new DataCubeException(e);
}
List<Long> times = new ArrayList<Long>(queryResult.size());
List<String> products = new ArrayList<String>(queryResult.size());
for (Object[] objArr : queryResult) {
@ -197,7 +203,7 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
}
private PointDataContainer getFfgData(List<Long> times,
List<String> products) throws VizException {
List<String> products) throws DataCubeException {
Map<String, Coordinate> stationCoordMap = getFfgCoords();
PointDataContainer pdc = PointDataContainer.build(ffgDescription);
@ -257,7 +263,7 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
}
private PointDataContainer getRtpData(List<Long> times,
List<String> products) throws VizException {
List<String> products) throws DataCubeException {
Map<String, SPIEntry> stationCoordMap = getRtpSpi();
PointDataContainer pdc = PointDataContainer.build(rtpDescription);
@ -335,12 +341,18 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
return pdc;
}
private Map<String, Coordinate> getFfgCoords() throws VizException {
private Map<String, Coordinate> getFfgCoords() throws DataCubeException {
Map<String, Coordinate> result = new HashMap<String, Coordinate>();
String cwa = LocalizationManager.getInstance().getCurrentSite();
List<Object[]> queryResult = DirectDbQuery.executeQuery(
"select lat, lon, fips, state from mapdata.county where cwa = '"
+ cwa + "'", "maps", DirectDbQuery.QueryLanguage.SQL);
List<Object[]> queryResult;
try {
queryResult = DirectDbQuery.executeQuery(
"select lat, lon, fips, state from mapdata.county where cwa = '"
+ cwa + "'", "maps",
DirectDbQuery.QueryLanguage.SQL);
} catch (VizException e) {
throw new DataCubeException(e);
}
for (Object[] arr : queryResult) {
Number lat = (Number) arr[0];
Number lon = (Number) arr[1];
@ -350,9 +362,14 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
result.put(stationId,
new Coordinate(lon.doubleValue(), lat.doubleValue()));
}
queryResult = DirectDbQuery.executeQuery(
"select lat, lon, zone, state from mapdata.zone where cwa = '"
+ cwa + "'", "maps", DirectDbQuery.QueryLanguage.SQL);
try {
queryResult = DirectDbQuery.executeQuery(
"select lat, lon, zone, state from mapdata.zone where cwa = '"
+ cwa + "'", "maps",
DirectDbQuery.QueryLanguage.SQL);
} catch (VizException e) {
throw new DataCubeException(e);
}
for (Object[] arr : queryResult) {
Number lat = (Number) arr[0];
Number lon = (Number) arr[1];
@ -372,7 +389,8 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
@Override
public PointDataContainer getPoints(String plugin, String[] parameters,
Map<String, RequestConstraint> queryParams) throws VizException {
Map<String, RequestConstraint> queryParams)
throws DataCubeException {
return getPoints(plugin, parameters, null, queryParams);
}
@ -380,33 +398,33 @@ public class CoopPrecipDataCubeAdapter implements IDataCubeAdapter {
@Override
public PointDataContainer getPoints(String plugin, String[] parameters,
String levelKey, Map<String, RequestConstraint> queryParams)
throws VizException {
throws DataCubeException {
String nnnid = getNNNid(queryParams);
return getData(nnnid);
}
@Override
public IDataRecord[] getRecord(PluginDataObject obj)
throws VizDataCubeException {
throws DataCubeException {
return null;
}
@Override
public IDataRecord[] getRecord(PluginDataObject obj, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
return null;
}
@Override
public void getRecords(List<PluginDataObject> objs, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
}
@Override
public PluginDataObject[] getData(
Map<String, RequestConstraint> constraints, DataTime[] selectedTimes)
throws VizException {
throws DataCubeException {
return null;
}

View file

@ -27,14 +27,15 @@ import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged;
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.viz.pointdata.PlotData;
import com.raytheon.viz.pointdata.PlotInfo;
import com.raytheon.viz.pointdata.rsc.retrieve.AbstractPlotInfoRetriever;
@ -61,9 +62,14 @@ public class CoopPrecipPlotInfoRetriever extends AbstractPlotInfoRetriever {
@Override
public void getStations(IResourceDataChanged listener, DataTime time,
HashMap<String, RequestConstraint> metadataMap) throws VizException {
PointDataContainer pdc = DataCubeContainer.getPointData(metadataMap
.get("pluginName").getConstraintValue(), new String[] {
"latitude", "longitude", "time" }, metadataMap);
PointDataContainer pdc;
try {
pdc = DataCubeContainer.getPointData(metadataMap.get("pluginName")
.getConstraintValue(), new String[] { "latitude",
"longitude", "time" }, metadataMap);
} catch (DataCubeException e) {
throw new VizException(e);
}
List<PlotInfo> info = new ArrayList<PlotInfo>();
if (pdc != null) {
for (int uriCounter = 0; uriCounter < pdc.getCurrentSz(); uriCounter++) {

View file

@ -68,13 +68,13 @@
version="0.0.0"/>
<plugin
id="com.raytheon.uf.viz.derivparam"
id="com.raytheon.uf.common.derivparam"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.viz.derivparam.python"
id="com.raytheon.uf.common.derivparam.python"
download-size="0"
install-size="0"
version="0.0.0"/>
@ -133,7 +133,7 @@
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.viz.personalities.cave"
download-size="0"
@ -204,4 +204,19 @@
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="com.raytheon.uf.common.inventory"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.viz.datacube"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View file

@ -86,3 +86,5 @@ Export-Package: com.raytheon.uf.viz.core,
com.raytheon.viz.core.slice.request,
com.raytheon.viz.core.units
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.viz.datacube

View file

@ -24,16 +24,19 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.time.BinOffset;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.NoDataAvailableException;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.ResourceType;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
*
* Deprecated: Use ThriftClient or DataCubeContainer instead.
*
* Stores the contents of a entry that will be used to create a layer within
* CAVE.
@ -53,6 +56,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceType;
* @author brockwoo
* @version 1.0
*/
@Deprecated
public class LayerProperty {
private static final String TIME_FIELD = "dataTime";
@ -236,8 +240,12 @@ public class LayerProperty {
}
private void requestEntryTimes(BinOffset binOffset) throws VizException {
this.entryTimes = DataCubeContainer.performTimeQuery(
entryQueryParameters, false, binOffset);
try {
this.entryTimes = DataCubeContainer.performTimeQuery(
entryQueryParameters, false, binOffset);
} catch (DataCubeException e) {
throw new VizException(e);
}
if (this.entryTimes == null) {
throw new NoDataAvailableException();

View file

@ -37,6 +37,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.commons.lang.Validate;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
@ -52,13 +53,13 @@ import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.RecordFactory;
import com.raytheon.uf.viz.core.alerts.AbstractAlertMessageParser;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.drawables.IDescriptor;
import com.raytheon.uf.viz.core.exception.NoDataAvailableException;
import com.raytheon.uf.viz.core.exception.NoMatchingTimesException;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* Provides a base implementation for data types that are requestable from the
@ -543,8 +544,13 @@ public abstract class AbstractRequestableResourceData extends
}
List<DataTime> slice = selectedEntryTimes.subList(start, end);
PluginDataObject[] pdos = DataCubeContainer.getData(
getMetadataMap(), slice.toArray(new DataTime[0]));
PluginDataObject[] pdos;
try {
pdos = DataCubeContainer.getData(getMetadataMap(),
slice.toArray(new DataTime[0]));
} catch (DataCubeException e) {
throw new VizException(e);
}
responses.addAll(Arrays.asList(pdos));
}
@ -597,8 +603,12 @@ public abstract class AbstractRequestableResourceData extends
Map<String, RequestConstraint> constraintMap, BinOffset binOffset)
throws VizException {
Validate.notNull(constraintMap);
return DataCubeContainer.performTimeQuery(constraintMap, false,
binOffset);
try {
return DataCubeContainer.performTimeQuery(constraintMap, false,
binOffset);
} catch (DataCubeException e) {
throw new VizException(e);
}
}
/**

View file

@ -27,9 +27,9 @@ import java.util.Set;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource.ResourceStatus;
import com.raytheon.uf.viz.core.rsc.updater.DataUpdateTree;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* Manages a catalog of resource utilization

View file

@ -31,15 +31,16 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataquery.DecisionTree;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
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.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.URICatalog.IURIRefreshCallback;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
*
@ -301,7 +302,12 @@ public class URICatalog extends DecisionTree<List<IURIRefreshCallback>> {
private void doCallbacks(Map<String, RequestConstraint> map,
List<IURIRefreshCallback> runnable) throws VizException {
DataTime[] dt = DataCubeContainer.performTimeQuery(map, true);
DataTime[] dt;
try {
dt = DataCubeContainer.performTimeQuery(map, true);
} catch (DataCubeException e) {
throw new VizException(e);
}
DataTime newDataTime = null;
if (dt != null && dt.length > 0) {
newDataTime = dt[dt.length - 1];

View file

@ -36,13 +36,13 @@ import org.opengis.coverage.grid.GridEnvelope;
import com.raytheon.uf.common.colormap.image.ColorMapData;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.geospatial.MapUtil;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.viz.core.DrawableImage;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.IGraphicsTarget.RasterMode;
import com.raytheon.uf.viz.core.IMesh;

View file

@ -27,12 +27,12 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.cwat.CWATRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;

View file

@ -24,8 +24,11 @@ Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.14.0",
com.raytheon.uf.common.style,
com.raytheon.uf.common.comm,
javax.measure,
org.eclipse.swt;bundle-version="3.8.0"
Import-Package: com.raytheon.viz.core.map
org.eclipse.swt;bundle-version="3.8.0",
com.raytheon.uf.viz.datacube;bundle-version="1.14.0"
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.viz.datacube,
com.raytheon.viz.core.map
Export-Package: com.raytheon.uf.viz.d2d.xy.adapters.crosssection,
com.raytheon.uf.viz.d2d.xy.adapters.timeseries,
com.raytheon.uf.viz.d2d.xy.adapters.varheight

View file

@ -35,6 +35,7 @@ import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.geometry.DirectPosition2D;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level;
@ -46,8 +47,8 @@ import com.raytheon.uf.common.geospatial.MapUtil;
import com.raytheon.uf.common.geospatial.PointUtil;
import com.raytheon.uf.common.gridcoverage.GridCoverage;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.xy.InterpUtils;
import com.raytheon.uf.viz.xy.crosssection.adapter.AbstractCrossSectionAdapter;
import com.raytheon.uf.viz.xy.crosssection.display.CrossSectionDescriptor;
@ -196,7 +197,12 @@ public class GridCSAdapter extends AbstractCrossSectionAdapter<GridRecord> {
if (request == null) {
continue;
}
DataCubeContainer.getDataRecords(entry.getValue(), request, null);
try {
DataCubeContainer.getDataRecords(entry.getValue(), request,
null);
} catch (DataCubeException e) {
throw new VizException(e);
}
}
Coordinate[] coordinates = GeoUtil.splitLine(nx,
@ -363,8 +369,12 @@ public class GridCSAdapter extends AbstractCrossSectionAdapter<GridRecord> {
new RequestConstraint(descriptor.getHeightScale()
.getParameter()));
PluginDataObject[] pdos = DataCubeContainer.getData(metadataMap,
time);
PluginDataObject[] pdos;
try {
pdos = DataCubeContainer.getData(metadataMap, time);
} catch (DataCubeException e) {
throw new VizException(e);
}
yRecords = new HashSet<GridRecord>(pdos.length);
for (PluginDataObject pdo : pdos) {
yRecords.add((GridRecord) pdo);

View file

@ -30,6 +30,7 @@ import javax.measure.unit.Unit;
import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.referencing.GeodeticCalculator;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
@ -39,10 +40,10 @@ import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.DataTime.FLAG;
import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.interp.IInterpolation;
import com.raytheon.uf.viz.core.interp.InterpolationRequest;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.xy.InterpUtils;
import com.raytheon.uf.viz.xy.crosssection.adapter.AbstractCrossSectionAdapter;
import com.raytheon.uf.viz.xy.crosssection.graph.CrossSectionGraph;
@ -126,9 +127,15 @@ public class PointCSAdapter extends
new RequestConstraint(TimeUtil
.formatToSqlTimestamp(currentTime.getRefTime())));
}
PointDataContainer pdc = DataCubeContainer.getPointData(records.get(0)
.getPluginName(), new String[] { parameter, "stationId",
heightScale.getParameter() }, constraints);
PointDataContainer pdc;
try {
pdc = DataCubeContainer.getPointData(
records.get(0).getPluginName(), new String[] { parameter,
"stationId", heightScale.getParameter() },
constraints);
} catch (DataCubeException e) {
throw new VizException(e);
}
unit = pdc.getDescription(parameter).getUnitObject();
Unit<?> dataYUnit = pdc.getDescription(heightScale.getParameter())
.getUnitObject();

View file

@ -30,6 +30,7 @@ import java.util.WeakHashMap;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.grid.util.GridLevelTranslator;
@ -46,10 +47,10 @@ import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.style.level.SingleLevel;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.CubeUtil;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.DisplayType;
import com.raytheon.uf.viz.datacube.CubeUtil;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.xy.timeseries.adapter.AbstractTimeSeriesAdapter;
import com.raytheon.viz.core.graphing.xy.XYData;
import com.raytheon.viz.core.graphing.xy.XYDataList;
@ -288,7 +289,12 @@ public class GridTimeSeriesAdapter extends
for (GridRecord rec : gribs) {
IDataRecord[] records = cache.get(rec);
if (records == null) {
records = DataCubeContainer.getDataRecord(rec, request, null);
try {
records = DataCubeContainer.getDataRecord(rec, request,
null);
} catch (DataCubeException e) {
throw new VizException(e);
}
cache.put(rec, records);
}

View file

@ -35,6 +35,7 @@ import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.geometry.GeneralEnvelope;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.mapping.LevelMapping;
@ -51,9 +52,9 @@ import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.DataTime.FLAG;
import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.DisplayType;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.objectiveanalysis.rsc.OAGridTransformer;
import com.raytheon.uf.viz.xy.timeseries.adapter.AbstractTimeSeriesAdapter;
import com.raytheon.viz.core.graphing.xy.XYData;
@ -149,9 +150,14 @@ public class PointDataTimeSeriesAdapter extends
PointDataConstants.DATASET_FORECASTHR, parameter };
}
PointDataContainer pdc = DataCubeContainer.getPointData(
recordsToLoad[0].getPluginName(), parameters,
resourceData.getLevelKey(), constraints);
PointDataContainer pdc;
try {
pdc = DataCubeContainer.getPointData(
recordsToLoad[0].getPluginName(), parameters,
resourceData.getLevelKey(), constraints);
} catch (DataCubeException e) {
throw new VizException(e);
}
boolean isWind = pdc.getParameters().contains(parameter + "[1]");
boolean isIcon = displayType == DisplayType.ICON;

View file

@ -33,6 +33,7 @@ import javax.measure.unit.Unit;
import org.geotools.geometry.DirectPosition2D;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
import com.raytheon.uf.common.dataplugin.level.Level;
@ -46,8 +47,8 @@ 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.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.xy.InterpUtils;
import com.raytheon.uf.viz.xy.varheight.adapter.AbstractVarHeightAdapter;
import com.raytheon.viz.core.graphing.xy.XYData;
@ -227,7 +228,12 @@ public class GridVarHeightAdapter extends AbstractVarHeightAdapter<GridRecord> {
if (request == null) {
continue;
}
DataCubeContainer.getDataRecords(entry.getValue(), request, null);
try {
DataCubeContainer.getDataRecords(entry.getValue(), request,
null);
} catch (DataCubeException e) {
throw new VizException(e);
}
}
@ -383,8 +389,13 @@ public class GridVarHeightAdapter extends AbstractVarHeightAdapter<GridRecord> {
metadataMap.put(GridInventory.PARAMETER_QUERY,
new RequestConstraint(heightScale.getParameter()));
PluginDataObject[] pdos = DataCubeContainer.getData(metadataMap,
times.toArray(new DataTime[0]));
PluginDataObject[] pdos;
try {
pdos = DataCubeContainer.getData(metadataMap,
times.toArray(new DataTime[0]));
} catch (DataCubeException e) {
throw new VizException(e);
}
for (PluginDataObject pdo : pdos) {
GridRecord gRecord = (GridRecord) pdo;
Set<GridRecord> recordSet = yRecordMap.get(gRecord

View file

@ -26,6 +26,7 @@ import java.util.Map;
import javax.measure.unit.Unit;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
@ -35,9 +36,9 @@ import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.DataTime.FLAG;
import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.datastructure.CubeUtil;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.CubeUtil;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.xy.varheight.adapter.AbstractVarHeightAdapter;
import com.raytheon.viz.core.graphing.xy.XYData;
import com.raytheon.viz.core.graphing.xy.XYWindImageData;
@ -135,9 +136,15 @@ public class PointDataVarHeightAdapter extends
.formatToSqlTimestamp(currentTime.getRefTime())));
}
String parameter = resourceData.getParameter();
PointDataContainer pdc = DataCubeContainer.getPointData(records
.iterator().next().getPluginName(), new String[] { parameter,
heightScale.getParameter() }, constraints);
PointDataContainer pdc;
try {
pdc = DataCubeContainer.getPointData(records.iterator().next()
.getPluginName(),
new String[] { parameter, heightScale.getParameter() },
constraints);
} catch (DataCubeException e) {
throw new VizException(e);
}
xUnit = pdc.getDescription(parameter).getUnitObject();
yUnit = pdc.getDescription(heightScale.getParameter()).getUnitObject();
for (int uriCounter = 0; uriCounter < pdc.getAllocatedSz(); uriCounter++) {

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.viz.derivparam</name>
<name>com.raytheon.uf.viz.datacube</name>
<comment></comment>
<projects>
</projects>

View file

@ -0,0 +1,19 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Derived Parameter Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.datacube;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Require-Bundle: com.raytheon.uf.common.derivparam,
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174",
com.raytheon.uf.common.inventory;bundle-version="1.14.0",
com.raytheon.uf.common.time;bundle-version="1.12.1174",
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
com.raytheon.uf.common.dataquery;bundle-version="1.0.0",
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
com.raytheon.uf.common.pointdata;bundle-version="1.13.0",
com.raytheon.uf.common.geospatial;bundle-version="1.14.0",
com.raytheon.uf.common.status;bundle-version="1.12.1174"
Export-Package: com.raytheon.uf.viz.datacube

View file

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

View file

@ -0,0 +1,9 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="dataCubeAdapterRegistry"
class="com.raytheon.uf.viz.datacube.DataCubeAdapters"
factory-method="getInstance" />
</beans>

View file

@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.derivparam.data;
package com.raytheon.uf.viz.datacube;
import java.util.ArrayList;
import java.util.Arrays;
@ -28,6 +28,10 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
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.inventory.tree.AbstractRequestableNode;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequestSet;
@ -37,15 +41,10 @@ import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponseSet;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.derivparam.inv.AvailabilityContainer;
import com.raytheon.uf.common.derivparam.inv.MetadataContainer;
import com.raytheon.uf.common.serialization.comm.RequestRouter;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.DefaultDataCubeAdapter;
import com.raytheon.uf.viz.core.datastructure.VizDataCubeException;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.derivparam.inv.AvailabilityContainer;
import com.raytheon.uf.viz.derivparam.inv.MetadataContainer;
import com.raytheon.uf.viz.derivparam.inv.TimeAndSpace;
import com.raytheon.uf.viz.derivparam.tree.AbstractRequestableNode;
/**
* Abstract data cube adapter for standard data type that uses derived
@ -98,7 +97,7 @@ public abstract class AbstractDataCubeAdapter extends DefaultDataCubeAdapter {
*/
@Override
public List<List<DataTime>> timeQuery(List<TimeQueryRequest> requests)
throws VizException {
throws DataCubeException {
List<AvailabilityContainer> containers = new ArrayList<AvailabilityContainer>(
requests.size());
List<List<DbQueryRequest>> requestLists = new ArrayList<List<DbQueryRequest>>(
@ -131,7 +130,7 @@ public abstract class AbstractDataCubeAdapter extends DefaultDataCubeAdapter {
responseSet = (DbQueryResponseSet) RequestRouter
.route(requestSet);
} catch (Exception e) {
throw new VizException(e);
throw new DataCubeException(e);
}
responses = responseSet.getResults();
}
@ -192,7 +191,7 @@ public abstract class AbstractDataCubeAdapter extends DefaultDataCubeAdapter {
@Override
public PluginDataObject[] getData(
Map<String, RequestConstraint> constraints, DataTime[] selectedTimes)
throws VizException {
throws DataCubeException {
List<AbstractRequestableNode> requests = evaluateRequestConstraints(new HashMap<String, RequestConstraint>(
constraints));
Set<TimeAndSpace> availability = null;
@ -240,7 +239,7 @@ public abstract class AbstractDataCubeAdapter extends DefaultDataCubeAdapter {
*/
@Override
public IDataRecord[] getRecord(PluginDataObject obj)
throws VizDataCubeException {
throws DataCubeException {
return getRecord(obj, Request.ALL, null);
}
@ -254,7 +253,7 @@ public abstract class AbstractDataCubeAdapter extends DefaultDataCubeAdapter {
*/
@Override
public IDataRecord[] getRecord(PluginDataObject obj, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
getRecords(Arrays.asList(obj), req, dataset);
IDataRecord[] result = (IDataRecord[]) obj.getMessageData();
obj.setMessageData(null);
@ -276,7 +275,7 @@ public abstract class AbstractDataCubeAdapter extends DefaultDataCubeAdapter {
* @return
*/
protected abstract List<DataTime> timeAgnosticQuery(
Map<String, RequestConstraint> queryTerms) throws VizException;
Map<String, RequestConstraint> queryTerms) throws DataCubeException;
/**
* @param requesters
@ -285,5 +284,5 @@ public abstract class AbstractDataCubeAdapter extends DefaultDataCubeAdapter {
protected abstract List<PluginDataObject> getData(
Map<String, RequestConstraint> constraints,
DataTime[] selectedTimes, List<AbstractRequestableData> requesters)
throws VizException;
throws DataCubeException;
}

View file

@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.core.datastructure;
package com.raytheon.uf.viz.datacube;
import java.awt.Point;
import java.io.File;
@ -27,6 +27,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
@ -36,10 +38,6 @@ import com.raytheon.uf.common.geospatial.ISpatialEnabled;
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.Activator;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.status.StatusConstants;
/**
* Utilities for the data cube
@ -95,12 +93,12 @@ public class CubeUtil {
* @throws VizException
*/
public static IDataRecord retrieveData(PluginDataObject record, String type)
throws VizException {
throws DataCubeException {
return retrieveData(record, type, Request.ALL, null);
}
public static IDataRecord retrieveData(PluginDataObject record,
String type, Request req, String dataset) throws VizException {
String type, Request req, String dataset) throws DataCubeException {
IDataRecord dr = null;
try {
String fileName = getFilename(record, type);
@ -112,7 +110,7 @@ public class CubeUtil {
IDataStore ds = DataStoreFactory.getDataStore(new File(fileName));
dr = ds.retrieve("", group + "/" + dataset, req);
} catch (Exception e) {
throw new VizException("Error retrieving data for record.", e);
throw new DataCubeException("Error retrieving data for record.", e);
}
return dr;
@ -135,9 +133,9 @@ public class CubeUtil {
records[i].setMessageData(recs[0]);
}
}
} catch (VizDataCubeException e) {
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM,
"Error retrieving data", new VizException(
"Error retrieving data", new DataCubeException(
"Error retrieving data for record: "
+ records[i].getDataURI(), e));
}
@ -158,7 +156,7 @@ public class CubeUtil {
* @throws VizException
*/
public static float[] retrieveData(PluginDataObject[] record, int x, int y)
throws VizException {
throws DataCubeException {
retrieveData(record);
float[] endResult = new float[record.length];
for (int i = 0; i < record.length; i++) {
@ -192,7 +190,7 @@ public class CubeUtil {
* @throws VizException
*/
public static float[] retrieveData(PluginDataObject[] record,
List<Point> coords) throws VizException {
List<Point> coords) throws DataCubeException {
retrieveData(record);
float[] endResult = new float[record.length * coords.size()];
@ -221,7 +219,7 @@ public class CubeUtil {
public static float[] efficientRetirevePoint(PluginDataObject[] objects,
Point point, List<PluginDataObject> newOrderedObjects)
throws VizException {
throws DataCubeException {
float[] rval = new float[objects.length];
Map<String, List<PluginDataObject>> fileMap = new HashMap<String, List<PluginDataObject>>();
@ -259,7 +257,8 @@ public class CubeUtil {
rval[index] = data[0];
}
} catch (Exception e) {
throw new VizException("Error retrieving data for record.", e);
throw new DataCubeException(
"Error retrieving data for record.", e);
}
}
@ -268,7 +267,7 @@ public class CubeUtil {
}
public static float[][] efficientRetireve(PluginDataObject[] objects,
List<PluginDataObject> newOrderedObjects) throws VizException {
List<PluginDataObject> newOrderedObjects) throws DataCubeException {
float[][] rval = new float[objects.length][];
Map<String, List<PluginDataObject>> fileMap = new HashMap<String, List<PluginDataObject>>();
@ -305,7 +304,8 @@ public class CubeUtil {
rval[index] = data;
}
} catch (Exception e) {
throw new VizException("Error retrieving data for record.", e);
throw new DataCubeException(
"Error retrieving data for record.", e);
}
}
@ -314,7 +314,7 @@ public class CubeUtil {
}
public static List<IDataRecord> retrieveData(List<PluginDataObject> objects)
throws VizException {
throws DataCubeException {
Map<String, List<PluginDataObject>> fileMap = new HashMap<String, List<PluginDataObject>>();
for (PluginDataObject pdo : objects) {
String file = getFilename(pdo, pdo.getPluginName());
@ -347,7 +347,8 @@ public class CubeUtil {
records[objects.indexOf(objs.get(i))] = dr[i];
}
} catch (Exception e) {
throw new VizException("Error retrieving data for record.", e);
throw new DataCubeException(
"Error retrieving data for record.", e);
}
}

View file

@ -0,0 +1,150 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.datacube;
import java.util.HashMap;
import java.util.Map;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
/**
* Contains a registry of IDataCubeAdapter instances and provides the interface
* for registering new adapters
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 1, 2014 ekladstrup Initial creation
*
* </pre>
*
* @author ekladstrup
* @version 1.0
*/
public class DataCubeAdapters {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(DataCubeAdapters.class);
protected Map<String, IDataCubeAdapter> adapters = new HashMap<String, IDataCubeAdapter>();
protected Map<IDataCubeAdapter, Boolean> initializedMap = new HashMap<IDataCubeAdapter, Boolean>();
protected static DataCubeAdapters instance = new DataCubeAdapters();
/**
* Get singleton instance
*
* @return
*/
public static DataCubeAdapters getInstance() {
return instance;
}
/**
* Internal constructor, use getInstance()
*/
protected DataCubeAdapters() {
}
/**
* Add an adapter to the list of known adapters
*
* @param adapter
* @return the same adapter
*/
public IDataCubeAdapter registerAdapter(IDataCubeAdapter adapter) {
synchronized (adapters) {
String[] supportedPlugins = adapter.getSupportedPlugins();
for (String plugin : supportedPlugins) {
IDataCubeAdapter registeredAdapter = adapters.get(plugin);
if (registeredAdapter != null) {
statusHandler.handle(Priority.PROBLEM,
"Already registered "
+ registeredAdapter.getClass()
.getCanonicalName()
+ " IDataCubeAdapter for plugin \""
+ plugin + "\" ignoring "
+ adapter.getClass().getCanonicalName());
} else {
adapters.put(plugin, adapter);
statusHandler
.handle(Priority.VERBOSE, "Registered "
+ adapter.getClass().getCanonicalName()
+ " IDataCubeAdapter for plugin \""
+ plugin + "\"");
}
}
}
synchronized (initializedMap) {
initializedMap.put(adapter, false);
}
return adapter;
}
/**
* Initialize the adapters inventory if it has not already, return true if
* the inventory was initialized
*
* @param adapter
* @return true if the adapter was initialized false if it was not ( or is
* unknown to this service )
*/
public boolean initIfNeeded(IDataCubeAdapter adapter) {
boolean wasInitialized = false;
if (adapter != null) {
synchronized (adapter) {
Boolean initialized = initializedMap.get(adapter);
if (initialized == null || !initialized) {
adapter.initInventory();
initializedMap.put(adapter, true);
wasInitialized = true;
}
}
}
return wasInitialized;
}
/**
* Search for an adapter for a given plugin
*
* @param plugin
* @return the first adapter that supports the plugin, null if none are
* found
*/
public IDataCubeAdapter getAdapterForPlugin(String plugin) {
IDataCubeAdapter result = null;
synchronized (adapters) {
result = adapters.get(plugin);
}
return result;
}
}

View file

@ -17,19 +17,18 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.core.datastructure;
package com.raytheon.uf.viz.datacube;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.ServiceLoader;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
@ -40,7 +39,6 @@ import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.time.BinOffset;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.exception.VizException;
/**
* The DataCubeContainer is responsible for handling requests for data times,
@ -63,21 +61,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
*/
public class DataCubeContainer {
static List<IDataCubeAdapter> adapters = new ArrayList<IDataCubeAdapter>();
private static Map<IDataCubeAdapter, Boolean> initializedMap = new HashMap<IDataCubeAdapter, Boolean>();
static {
Iterator<IDataCubeAdapter> itr = ServiceLoader.load(
IDataCubeAdapter.class,
DataCubeContainer.class.getClassLoader()).iterator();
while (itr.hasNext()) {
IDataCubeAdapter adapter = itr.next();
adapters.add(adapter);
initializedMap.put(adapter, false);
}
}
private static Map<String, DataCubeContainer> containers = new HashMap<String, DataCubeContainer>();
private IDataCubeAdapter adapter;
@ -95,13 +78,7 @@ public class DataCubeContainer {
}
if (container.adapter != null) {
synchronized (container.adapter) {
Boolean initialized = initializedMap.get(container.adapter);
if (initialized == null || !initialized) {
container.adapter.initInventory();
initializedMap.put(container.adapter, true);
}
}
DataCubeAdapters.getInstance().initIfNeeded(container.adapter);
}
return container;
@ -109,14 +86,8 @@ public class DataCubeContainer {
private DataCubeContainer(String plugin) {
this.pluginName = plugin;
for (IDataCubeAdapter adapter : adapters) {
for (String p : adapter.getSupportedPlugins()) {
if (p.equals(plugin)) {
this.adapter = adapter;
break;
}
}
}
this.adapter = DataCubeAdapters.getInstance().getAdapterForPlugin(
plugin);
if (adapter == null) {
// Construct default adapter for plugin if none found
adapter = new DefaultDataCubeAdapter(plugin);
@ -136,7 +107,7 @@ public class DataCubeContainer {
* @throws VizDataCubeException
*/
public static IDataRecord[] getDataRecord(PluginDataObject obj)
throws VizDataCubeException {
throws DataCubeException {
return getInstance(obj.getPluginName()).adapter.getRecord(obj);
}
@ -155,7 +126,7 @@ public class DataCubeContainer {
* @throws VizDataCubeException
*/
public static IDataRecord[] getDataRecord(PluginDataObject obj,
Request req, String dataset) throws VizDataCubeException {
Request req, String dataset) throws DataCubeException {
return getInstance(obj.getPluginName()).adapter.getRecord(obj, req,
dataset);
}
@ -172,7 +143,7 @@ public class DataCubeContainer {
* @throws VizDataCubeException
*/
public static void getDataRecords(List<PluginDataObject> objs, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
if (objs == null || objs.isEmpty()) {
return;
}
@ -192,14 +163,14 @@ public class DataCubeContainer {
public static PointDataContainer getPointData(String plugin,
String[] params, Map<String, RequestConstraint> map)
throws VizException {
throws DataCubeException {
DataCubeContainer container = getInstance(plugin);
return container.adapter.getPoints(container.pluginName, params, map);
}
public static PointDataContainer getPointData(String plugin,
String[] params, String levelKey, Map<String, RequestConstraint> map)
throws VizException {
throws DataCubeException {
DataCubeContainer container = getInstance(plugin);
if (levelKey == null) {
return getPointData(container.pluginName, params, map);
@ -210,7 +181,7 @@ public class DataCubeContainer {
public static DataTime[] performTimeQuery(
Map<String, RequestConstraint> queryParams, boolean latestOnly)
throws VizException {
throws DataCubeException {
return performTimeQuery(queryParams, latestOnly, null);
}
@ -226,7 +197,7 @@ public class DataCubeContainer {
*/
public static DataTime[] performTimeQuery(
Map<String, RequestConstraint> queryParams, boolean latestOnly,
BinOffset binOffset) throws VizException {
BinOffset binOffset) throws DataCubeException {
TimeQueryRequest request = new TimeQueryRequest();
request.setQueryTerms(queryParams);
request.setBinOffset(binOffset);
@ -249,7 +220,7 @@ public class DataCubeContainer {
* @return
*/
public static List<List<DataTime>> performTimeQueries(String pluginName,
List<TimeQueryRequest> requests) throws VizException {
List<TimeQueryRequest> requests) throws DataCubeException {
if (requests.isEmpty()) {
return Collections.emptyList();
}
@ -264,7 +235,7 @@ public class DataCubeContainer {
* @return
*/
public static List<List<DataTime>> performTimeQueries(String pluginName,
TimeQueryRequest... requests) throws VizException {
TimeQueryRequest... requests) throws DataCubeException {
return getInstance(pluginName).adapter.timeQuery(Arrays
.asList(requests));
}
@ -278,7 +249,7 @@ public class DataCubeContainer {
* @return
*/
public static List<List<DataTime>> performTimeQueries(
TimeQueryRequest... requests) throws VizException {
TimeQueryRequest... requests) throws DataCubeException {
return performTimeQueries(Arrays.asList(requests));
}
@ -291,7 +262,7 @@ public class DataCubeContainer {
* @return
*/
public static List<List<DataTime>> performTimeQueries(
List<TimeQueryRequest> requests) throws VizException {
List<TimeQueryRequest> requests) throws DataCubeException {
Map<String, List<TimeQueryRequest>> requestMap = new HashMap<String, List<TimeQueryRequest>>();
for (TimeQueryRequest request : requests) {
String pluginName = request.getPluginName();
@ -330,7 +301,8 @@ public class DataCubeContainer {
* @throws VizException
*/
public static PluginDataObject[] getData(
Map<String, RequestConstraint> constraints) throws VizException {
Map<String, RequestConstraint> constraints)
throws DataCubeException {
return getData(constraints, (DataTime[]) null);
}
@ -344,7 +316,7 @@ public class DataCubeContainer {
*/
public static PluginDataObject[] getData(
Map<String, RequestConstraint> constraints, DataTime time)
throws VizException {
throws DataCubeException {
return getData(constraints, time != null ? new DataTime[] { time }
: null);
}
@ -359,7 +331,7 @@ public class DataCubeContainer {
*/
public static PluginDataObject[] getData(
Map<String, RequestConstraint> constraints, DataTime[] times)
throws VizException {
throws DataCubeException {
String pluginName = constraints.get(PluginDataObject.PLUGIN_NAME_ID)
.getConstraintValue();
return getInstance(pluginName).adapter.getData(constraints, times);

View file

@ -17,12 +17,13 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.core.datastructure;
package com.raytheon.uf.viz.datacube;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
@ -33,9 +34,8 @@ import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.serialization.comm.RequestRouter;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
/**
* Default implementation of IDataCubeAdapter, function implementations were
@ -82,15 +82,19 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
* com.raytheon.uf.viz.core.datastructure.IDataCubeAdapter#timeQuery(java
* .util.List)
*/
@SuppressWarnings("unchecked")
@Override
public List<List<DataTime>> timeQuery(List<TimeQueryRequest> requests)
throws VizException {
throws DataCubeException {
TimeQueryRequestSet set = new TimeQueryRequestSet();
set.setRequests(requests.toArray(new TimeQueryRequest[0]));
@SuppressWarnings("unchecked")
List<List<DataTime>> result = (List<List<DataTime>>) ThriftClient
.sendRequest(set);
List<List<DataTime>> result;
try {
result = (List<List<DataTime>>) RequestRouter.route(set);
} catch (Exception e) {
throw new DataCubeException(e);
}
return result;
}
@ -103,7 +107,8 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
*/
@Override
public PointDataContainer getPoints(String plugin, String[] parameters,
Map<String, RequestConstraint> queryParams) throws VizException {
Map<String, RequestConstraint> queryParams)
throws DataCubeException {
return null;
}
@ -117,7 +122,7 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
@Override
public PointDataContainer getPoints(String plugin, String[] parameters,
String levelKey, Map<String, RequestConstraint> queryParams)
throws VizException {
throws DataCubeException {
return null;
}
@ -130,14 +135,9 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
*/
@Override
public IDataRecord[] getRecord(PluginDataObject obj)
throws VizDataCubeException {
throws DataCubeException {
IDataRecord record = null;
try {
record = CubeUtil.retrieveData(obj, pluginName);
} catch (VizException e) {
throw new VizDataCubeException("Error retrieving 2D data record.",
e);
}
record = CubeUtil.retrieveData(obj, pluginName);
return new IDataRecord[] { record };
}
@ -151,14 +151,9 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
*/
@Override
public IDataRecord[] getRecord(PluginDataObject obj, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
IDataRecord record = null;
try {
record = CubeUtil.retrieveData(obj, pluginName, req, dataset);
} catch (VizException e) {
throw new VizDataCubeException("Error retrieving 2D data record.",
e);
}
record = CubeUtil.retrieveData(obj, pluginName, req, dataset);
return new IDataRecord[] { record };
}
@ -171,15 +166,10 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
*/
@Override
public void getRecords(List<PluginDataObject> objs, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
for (PluginDataObject obj : objs) {
IDataRecord record = null;
try {
record = CubeUtil.retrieveData(obj, pluginName, req, dataset);
} catch (VizException e) {
throw new VizDataCubeException(
"Error retrieving 2D grid record.", e);
}
record = CubeUtil.retrieveData(obj, pluginName, req, dataset);
obj.setMessageData(record);
}
}
@ -194,7 +184,7 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
@Override
public PluginDataObject[] getData(
Map<String, RequestConstraint> constraints, DataTime[] selectedTimes)
throws VizException {
throws DataCubeException {
DbQueryRequest request = new DbQueryRequest(constraints);
if (selectedTimes != null && selectedTimes.length > 0) {
RequestConstraint timeConstraint = new RequestConstraint();
@ -211,8 +201,12 @@ public class DefaultDataCubeAdapter implements IDataCubeAdapter {
}
request.addConstraint(PluginDataObject.DATATIME_ID, timeConstraint);
}
DbQueryResponse response = (DbQueryResponse) ThriftClient
.sendRequest(request);
DbQueryResponse response;
try {
response = (DbQueryResponse) RequestRouter.route(request);
} catch (Exception e) {
throw new DataCubeException("Server data request failed.", e);
}
return response.getEntityObjects(PluginDataObject.class);
}

View file

@ -17,11 +17,12 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.core.datastructure;
package com.raytheon.uf.viz.datacube;
import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.TimeQueryRequest;
@ -29,7 +30,6 @@ import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.exception.VizException;
/**
* The IDataCubeAdapter interface allows a class, once it implements this
@ -72,7 +72,7 @@ public interface IDataCubeAdapter {
* @return
*/
public List<List<DataTime>> timeQuery(List<TimeQueryRequest> requests)
throws VizException;
throws DataCubeException;
/**
* Returns a point data container which contains the parameters specified.
@ -88,7 +88,8 @@ public interface IDataCubeAdapter {
* @throws VizException
*/
public PointDataContainer getPoints(String plugin, String[] parameters,
Map<String, RequestConstraint> queryParams) throws VizException;
Map<String, RequestConstraint> queryParams)
throws DataCubeException;
/**
* Returns a point data container which contains the parameters specified.
@ -107,7 +108,7 @@ public interface IDataCubeAdapter {
*/
public PointDataContainer getPoints(String plugin, String[] parameters,
String levelKey, Map<String, RequestConstraint> queryParams)
throws VizException;
throws DataCubeException;
/**
* A call to getRecord will perform the specified derived parameter
@ -121,13 +122,13 @@ public interface IDataCubeAdapter {
* @throws VizDataCubeException
*/
public IDataRecord[] getRecord(PluginDataObject obj)
throws VizDataCubeException;
throws DataCubeException;
public IDataRecord[] getRecord(PluginDataObject obj, Request req,
String dataset) throws VizDataCubeException;
String dataset) throws DataCubeException;
public void getRecords(List<PluginDataObject> objs, Request req,
String dataset) throws VizDataCubeException;
String dataset) throws DataCubeException;
/**
* Builds an array of {@link PluginDataObject}s for the specified metadata
@ -143,7 +144,7 @@ public interface IDataCubeAdapter {
*/
public PluginDataObject[] getData(
Map<String, RequestConstraint> constraints, DataTime[] selectedTimes)
throws VizException;
throws DataCubeException;
/**
* If the inventory for a particular data type is large (for example, Grib),

View file

@ -8,11 +8,10 @@ Bundle-Vendor: RAYTHEON
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui;bundle-version="3.6.1",
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
com.raytheon.uf.viz.derivparam;bundle-version="1.12.1174",
com.raytheon.uf.common.derivparam;bundle-version="1.12.1174",
com.raytheon.uf.viz.localization;bundle-version="1.12.1174",
com.raytheon.viz.ui;bundle-version="1.12.1174",
javax.measure;bundle-version="1.0.0",
com.raytheon.uf.common.util;bundle-version="1.12.1174"
com.raytheon.uf.common.util;bundle-version="1.12.1174",
com.raytheon.uf.common.derivparam;bundle-version="1.14.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy

View file

@ -41,16 +41,16 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import com.raytheon.uf.common.derivparam.library.DerivParamConstantField;
import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.library.DerivParamField;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.library.IDerivParamField;
import com.raytheon.uf.common.serialization.JAXBManager;
import com.raytheon.uf.common.serialization.adapters.UnitAdapter;
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.derivparam.library.DerivParamConstantField;
import com.raytheon.uf.viz.derivparam.library.DerivParamDesc;
import com.raytheon.uf.viz.derivparam.library.DerivParamField;
import com.raytheon.uf.viz.derivparam.library.DerivParamMethod;
import com.raytheon.uf.viz.derivparam.library.IDerivParamField;
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
import com.raytheon.viz.ui.dialogs.CaveSWTWizardPage;

View file

@ -41,9 +41,9 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import com.raytheon.uf.viz.derivparam.DerivParamFunctionType;
import com.raytheon.uf.viz.derivparam.DerivParamFunctionType.FunctionArgument;
import com.raytheon.uf.viz.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.derivparam.DerivParamFunctionType;
import com.raytheon.uf.common.derivparam.DerivParamFunctionType.FunctionArgument;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
import com.raytheon.viz.ui.dialogs.CaveSWTWizardPage;

View file

@ -21,6 +21,7 @@ package com.raytheon.uf.viz.derivparam.ui.dialogs;
import java.io.File;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
@ -31,7 +32,6 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.util.FileUtil;
import com.raytheon.uf.viz.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.viz.localization.LocalizationPerspectiveUtils;
import com.raytheon.uf.viz.localization.service.ILocalizationService;
import com.raytheon.viz.ui.dialogs.CaveSWTWizard;
@ -95,7 +95,7 @@ public class DerivedParamWizard extends CaveSWTWizard {
public boolean performFinish() {
IPathManager pm = PathManagerFactory.getPathManager();
LocalizationContext userCtx = pm.getContext(
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
LocalizationType.COMMON_STATIC, LocalizationLevel.USER);
String functionContents = newFunctionPage.createFunction();
LocalizationFile functionFile = null, definitionFile = null;
if (functionContents != null) {

View file

@ -1,26 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Derived Parameter Plug-in
Bundle-SymbolicName: com.raytheon.uf.viz.derivparam;singleton:=true
Bundle-Version: 1.14.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Require-Bundle: com.raytheon.uf.common.derivparam,
com.raytheon.uf.common.time,
com.raytheon.uf.common.dataplugin.level,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.pointdata;bundle-version="1.13.0",
com.raytheon.uf.viz.core;bundle-version="1.13.0",
com.raytheon.uf.common.util,
com.raytheon.uf.common.comm,
org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.ui.workbench;bundle-version="3.8.0",
javax.measure
Export-Package: com.raytheon.uf.viz.derivparam,
com.raytheon.uf.viz.derivparam.data,
com.raytheon.uf.viz.derivparam.inv,
com.raytheon.uf.viz.derivparam.library,
com.raytheon.uf.viz.derivparam.tree

View file

@ -1,7 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
schema/,\
plugin.xml,\
localization/

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This_software_was_developed_and_/_or_modified_by_Raytheon_Company,
pursuant_to_Contract_DG133W-05-CQ-1067_with_the_US_Government.
U.S._EXPORT_CONTROLLED_TECHNICAL_DATA
This_software_product_contains_export-restricted_data_whose
export/transfer/disclosure_is_restricted_by_U.S._law._Dissemination
to_non-U.S._persons_whether_in_the_United_States_or_abroad_requires
an_export_license_or_other_authorization.
Contractor_Name:________Raytheon_Company
Contractor_Address:_____6825_Pine_Street,_Suite_340
________________________Mail_Stop_B8
________________________Omaha,_NE_68106
________________________402.291.0100
See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for
further_licensing_information.
-->
<?eclipse version="3.2"?>
<plugin>
<extension-point id="functionType" name="functionType" schema="schema/functionType.exsd"/>
</plugin>

View file

@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPAggregateRecord;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPBasin;
import com.raytheon.uf.common.dataplugin.ffmp.FFMPBasinData;
@ -53,7 +54,6 @@ 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.util.TimeUtil;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;

View file

@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.fog.FogRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
@ -35,7 +36,6 @@ import com.raytheon.uf.common.datastorage.IDataStore;
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.HDF5Util;
import com.raytheon.uf.viz.core.comm.Loader;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;

View file

@ -27,6 +27,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.fog.FogRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
@ -34,7 +35,6 @@ import com.raytheon.uf.common.datastorage.IDataStore;
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.HDF5Util;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;

View file

@ -42,6 +42,7 @@ import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.scan.ScanRecord;
import com.raytheon.uf.common.dataplugin.scan.data.CellTableDataRow;
import com.raytheon.uf.common.dataplugin.scan.data.DMDTableDataRow;
@ -71,7 +72,6 @@ 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.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;

View file

@ -35,6 +35,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.scan.ScanRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
@ -44,7 +45,6 @@ import com.raytheon.uf.common.datastorage.records.ByteDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.monitor.scan.config.SCANConfigEnums.ScanTables;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;

View file

@ -27,7 +27,8 @@ Export-Package: com.raytheon.uf.viz.monitor,
com.raytheon.uf.viz.monitor.ui.dialogs,
com.raytheon.uf.viz.monitor.util,
com.raytheon.uf.viz.monitor.xml
Import-Package: com.raytheon.uf.common.dataplugin.fssobs,
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.dataplugin.fssobs,
com.raytheon.uf.common.dataplugin.obs.metar,
com.raytheon.uf.common.dataplugin.obs.metar.util,
com.raytheon.uf.common.dataplugin.sfcobs,
@ -35,6 +36,7 @@ Import-Package: com.raytheon.uf.common.dataplugin.fssobs,
com.raytheon.uf.common.pointdata,
com.raytheon.uf.common.site,
com.raytheon.uf.viz.alertviz,
com.raytheon.uf.viz.datacube,
com.raytheon.uf.viz.monitor.data,
com.raytheon.uf.viz.monitor.util,
com.raytheon.viz.pointdata,

View file

@ -27,6 +27,7 @@ import java.util.regex.Pattern;
import org.eclipse.swt.widgets.Display;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
@ -38,10 +39,10 @@ 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.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
@ -283,7 +284,7 @@ public abstract class ObsMonitor extends Monitor {
}
}
}
} catch (final VizException e) {
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM,
"No data in database at startup. " + monitorUse);
}
@ -296,10 +297,11 @@ public abstract class ObsMonitor extends Monitor {
* @param times
* @return FSSObsRecord[]
* @throws VizException
* @throws DataCubeException
*/
private FSSObsRecord[] requestFSSObs(
Map<String, RequestConstraint> constraints, DataTime[] times)
throws VizException {
throws DataCubeException {
if (times != null) {
String[] timeStrs = new String[times.length];
for (int i = 0; i < times.length; ++i) {

View file

@ -20,14 +20,18 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.viz.productbrowser;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.uf.viz.derivparam;bundle-version="1.12.1174",
com.raytheon.uf.common.derivparam;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.uf.viz.npp;bundle-version="1.0.0",
com.raytheon.uf.common.style;bundle-version="1.0.0",
com.raytheon.uf.common.numeric;bundle-version="1.14.0"
com.raytheon.uf.common.numeric;bundle-version="1.14.0",
com.raytheon.uf.common.derivparam;bundle-version="1.14.0",
com.raytheon.uf.viz.datacube
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.npp.viirs.rsc
Import-Package: com.raytheon.uf.common.inventory.data,
com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.inventory,
com.raytheon.uf.common.inventory.tree

View file

@ -1 +0,0 @@
com.raytheon.uf.viz.npp.viirs.data.VIIRSDataCubeAdapter

View file

@ -3,4 +3,5 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
localization/
localization/,\
res/

View file

@ -0,0 +1,13 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="viirsDataCubeAdapter" class="com.raytheon.uf.viz.npp.viirs.data.VIIRSDataCubeAdapter" />
<bean id="viirsDataCubeAdapterRegistered"
factory-bean="dataCubeAdapterRegistry"
factory-method="registerAdapter">
<constructor-arg ref="viirsDataCubeAdapter" />
</bean>
</beans>

View file

@ -25,23 +25,22 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
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.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.CubeUtil;
import com.raytheon.uf.viz.core.datastructure.VizDataCubeException;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.derivparam.data.AbstractDataCubeAdapter;
import com.raytheon.uf.viz.derivparam.data.AbstractRequestableData;
import com.raytheon.uf.viz.derivparam.library.DerivParamDesc;
import com.raytheon.uf.viz.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.viz.derivparam.tree.AbstractRequestableNode;
import com.raytheon.uf.viz.derivparam.tree.AbstractRequestableNode.Dependency;
import com.raytheon.uf.viz.datacube.AbstractDataCubeAdapter;
import com.raytheon.uf.viz.datacube.CubeUtil;
import com.raytheon.uf.viz.npp.viirs.Activator;
import com.raytheon.uf.viz.npp.viirs.data.VIIRSRequestableData.VIIRSRequest;
@ -113,41 +112,36 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
*/
@Override
public IDataRecord[] getRecord(PluginDataObject pdo, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
if (dataset == null) {
dataset = VIIRSDataRecord.getDataSet(0);
}
try {
IDataRecord[] dataRecords = null;
if (pdo instanceof VIIRSRequestableDataRecord) {
VIIRSRequestableDataRecord vrdr = (VIIRSRequestableDataRecord) pdo;
// Put VIIRSSpatialCoverage from pdo in VIIRSRequest and make
// sure data records out of getData are in same coverage
VIIRSRequest request = new VIIRSRequest(req, dataset,
vrdr.getCoverage());
AbstractRequestableData requestable = vrdr.getRequestableData();
if (requestable instanceof VIIRSRequestableData) {
dataRecords = ((VIIRSRequestableData) requestable)
.getRawDataValue(request);
} else {
dataRecords = (IDataRecord[]) requestable
.getDataValue(request);
}
} else if (pdo instanceof VIIRSDataRecord) {
VIIRSDataRecord vdr = (VIIRSDataRecord) pdo;
VIIRSRequestableData requester = new VIIRSRequestableData(vdr,
inventory.getParameterLevel(vdr.getParameter()));
dataRecords = getRecord(new VIIRSRequestableDataRecord(
requester, Arrays.asList(vdr)), req, dataset);
IDataRecord[] dataRecords = null;
if (pdo instanceof VIIRSRequestableDataRecord) {
VIIRSRequestableDataRecord vrdr = (VIIRSRequestableDataRecord) pdo;
// Put VIIRSSpatialCoverage from pdo in VIIRSRequest and make
// sure data records out of getData are in same coverage
VIIRSRequest request = new VIIRSRequest(req, dataset,
vrdr.getCoverage());
AbstractRequestableData requestable = vrdr.getRequestableData();
if (requestable instanceof VIIRSRequestableData) {
dataRecords = ((VIIRSRequestableData) requestable)
.getRawDataValue(request);
} else {
dataRecords = new IDataRecord[] { CubeUtil.retrieveData(pdo,
pdo.getPluginName(), req, dataset) };
dataRecords = (IDataRecord[]) requestable.getDataValue(request);
}
return dataRecords;
} catch (VizException e) {
throw new VizDataCubeException("Error requesting viirs data: "
+ e.getLocalizedMessage(), e);
} else if (pdo instanceof VIIRSDataRecord) {
VIIRSDataRecord vdr = (VIIRSDataRecord) pdo;
VIIRSRequestableData requester = new VIIRSRequestableData(vdr,
inventory.getParameterLevel(vdr.getParameter()));
dataRecords = getRecord(new VIIRSRequestableDataRecord(requester,
Arrays.asList(vdr)), req, dataset);
} else {
dataRecords = new IDataRecord[] { CubeUtil.retrieveData(pdo,
pdo.getPluginName(), req, dataset) };
}
return dataRecords;
}
/*
@ -159,7 +153,7 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
*/
@Override
public void getRecords(List<PluginDataObject> objs, Request req,
String dataset) throws VizDataCubeException {
String dataset) throws DataCubeException {
// TODO: Need more advanced synchronizing for derived parameters
for (PluginDataObject pdo : objs) {
pdo.setMessageData(getRecord(pdo, req, dataset));
@ -187,7 +181,7 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
*/
@Override
protected List<DataTime> timeAgnosticQuery(
Map<String, RequestConstraint> queryTerms) throws VizException {
Map<String, RequestConstraint> queryTerms) throws DataCubeException {
return inventory.timeAgnosticQuery(queryTerms);
}
@ -202,7 +196,7 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
protected List<PluginDataObject> getData(
Map<String, RequestConstraint> constraints,
DataTime[] selectedTimes, List<AbstractRequestableData> requesters)
throws VizException {
throws DataCubeException {
List<PluginDataObject> results = new ArrayList<PluginDataObject>(
requesters.size());
for (AbstractRequestableData requester : requesters) {
@ -278,7 +272,8 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
*/
@Override
public PointDataContainer getPoints(String plugin, String[] parameters,
Map<String, RequestConstraint> queryParams) throws VizException {
Map<String, RequestConstraint> queryParams)
throws DataCubeException {
throw new UnsupportedOperationException(
"getPoints is not supported by viirs");
}
@ -293,7 +288,7 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
@Override
public PointDataContainer getPoints(String plugin, String[] parameters,
String levelKey, Map<String, RequestConstraint> queryParams)
throws VizException {
throws DataCubeException {
throw new UnsupportedOperationException(
"getPoints is not supported by viirs");
}

View file

@ -29,16 +29,24 @@ import java.util.Map;
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.LevelFactory;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.derivparam.tree.DataTree;
import com.raytheon.uf.common.derivparam.tree.LevelNode;
import com.raytheon.uf.common.derivparam.tree.ParameterNode;
import com.raytheon.uf.common.derivparam.tree.SourceNode;
import com.raytheon.uf.common.derivparam.inv.AbstractInventory;
import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.library.DerivParamField;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
@ -46,13 +54,6 @@ import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.derivparam.data.AbstractRequestableData;
import com.raytheon.uf.viz.derivparam.inv.AbstractInventory;
import com.raytheon.uf.viz.derivparam.library.DerivParamDesc;
import com.raytheon.uf.viz.derivparam.library.DerivParamField;
import com.raytheon.uf.viz.derivparam.library.DerivParamMethod;
import com.raytheon.uf.viz.derivparam.tree.AbstractDerivedDataNode;
import com.raytheon.uf.viz.derivparam.tree.AbstractRequestableNode;
import com.raytheon.viz.alerts.IAlertObserver;
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
@ -376,7 +377,7 @@ public class VIIRSDataInventory extends AbstractInventory implements
*/
@Override
public List<DataTime> timeAgnosticQuery(Map<String, RequestConstraint> query)
throws VizException {
throws DataCubeException {
return null;
}

View file

@ -29,10 +29,10 @@ import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.raytheon.uf.viz.derivparam.library.DerivParamDesc;
import com.raytheon.uf.viz.derivparam.library.DerivParamField;
import com.raytheon.uf.viz.derivparam.library.DerivParamMethod;
import com.raytheon.uf.viz.derivparam.library.DerivParamMethod.MethodType;
import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.library.DerivParamField;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod;
import com.raytheon.uf.common.derivparam.library.DerivParamMethod.MethodType;
/**
* Class for resolving viirs parameters dynamically. Parses parameter as

View file

@ -30,6 +30,9 @@ import org.geotools.coverage.grid.GridEnvelope2D;
import org.geotools.coverage.grid.GridGeometry2D;
import org.opengis.geometry.Envelope;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord;
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSSpatialCoverage;
@ -51,9 +54,7 @@ import com.raytheon.uf.common.numeric.filter.FillValueFilter;
import com.raytheon.uf.common.numeric.filter.InverseFillValueFilter;
import com.raytheon.uf.common.numeric.filter.UnsignedFilter;
import com.raytheon.uf.common.numeric.source.DataSource;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.derivparam.data.AbstractRequestableData;
/**
* Object capable of requesting VIIRS data for base or derived displays. Can
@ -122,7 +123,7 @@ public class VIIRSRequestableData extends AbstractRequestableData {
* @throws VizException
*/
public IDataRecord[] getRawDataValue(VIIRSRequest request)
throws VizException {
throws DataCubeException {
IDataStore store = DataStoreFactory.getDataStore(HDF5Util
.findHDF5Location(dataRecord));
try {
@ -249,7 +250,7 @@ public class VIIRSRequestableData extends AbstractRequestableData {
request.request) };
}
} catch (Exception e) {
throw new VizException("Error retrieving viirs data: "
throw new DataCubeException("Error retrieving viirs data: "
+ e.getLocalizedMessage(), e);
}
}
@ -262,7 +263,7 @@ public class VIIRSRequestableData extends AbstractRequestableData {
* (java.lang.Object)
*/
@Override
public IDataRecord[] getDataValue(Object arg) throws VizException {
public IDataRecord[] getDataValue(Object arg) throws DataCubeException {
VIIRSRequest request = (VIIRSRequest) arg;
// Get raw data
IDataRecord[] records = getRawDataValue(request);

View file

@ -21,9 +21,9 @@ package com.raytheon.uf.viz.npp.viirs.data;
import java.util.Collection;
import com.raytheon.uf.common.inventory.data.AbstractRequestableData;
import com.raytheon.uf.common.dataplugin.PluginException;
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord;
import com.raytheon.uf.viz.derivparam.data.AbstractRequestableData;
/**
* TODO Add Description

View file

@ -25,15 +25,15 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
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.npp.viirs.VIIRSDataRecord;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
import com.raytheon.uf.common.derivparam.tree.AbstractBaseDataNode;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.derivparam.data.AbstractRequestableData;
import com.raytheon.uf.viz.derivparam.inv.TimeAndSpace;
import com.raytheon.uf.viz.derivparam.tree.AbstractBaseDataNode;
/**
* VIIRS Requestable level node
@ -158,7 +158,7 @@ public class VIIRSRequestableLevelNode extends AbstractBaseDataNode {
@Override
public Set<TimeAndSpace> getAvailability(
Map<String, RequestConstraint> originalConstraints, Object response)
throws VizException {
throws DataCubeException {
Set<TimeAndSpace> result = new HashSet<TimeAndSpace>();
DbQueryResponse dbresponse = (DbQueryResponse) response;
for (Map<String, Object> map : dbresponse.getResults()) {
@ -180,7 +180,7 @@ public class VIIRSRequestableLevelNode extends AbstractBaseDataNode {
public Set<AbstractRequestableData> getData(
Map<String, RequestConstraint> orignalConstraints,
Set<TimeAndSpace> availability, Object response)
throws VizException {
throws DataCubeException {
DbQueryResponse queryResponse = (DbQueryResponse) response;
List<Map<String, Object>> results = queryResponse.getResults();
Set<AbstractRequestableData> data = new HashSet<AbstractRequestableData>(

View file

@ -32,8 +32,8 @@ import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.datastorage.records.ShortDataRecord;
import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* VIIRS Colormap data callback, requests data for VIIRSDataRecord

View file

@ -65,7 +65,6 @@ import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.IGraphicsTarget.RasterMode;
import com.raytheon.uf.viz.core.IMesh;
import com.raytheon.uf.viz.core.PixelCoverage;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.drawables.ColorMapLoader;
import com.raytheon.uf.viz.core.drawables.IImage;
import com.raytheon.uf.viz.core.drawables.PaintProperties;
@ -82,6 +81,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability;
import com.raytheon.uf.viz.core.tile.Tile;
import com.raytheon.uf.viz.core.tile.TileSetRenderable;
import com.raytheon.uf.viz.core.tile.TileSetRenderable.TileImageCreator;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.npp.viirs.Activator;
import com.raytheon.uf.viz.npp.viirs.style.VIIRSDataRecordCriteria;
import com.vividsolutions.jts.geom.Coordinate;

View file

@ -12,3 +12,5 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.npp
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.viz.datacube

View file

@ -33,14 +33,15 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.common.time.TimeRange;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* Abstract resource data for all NPP data. Groups frame times close together
@ -104,7 +105,12 @@ public abstract class AbstractNppResourceData extends
.getValidPeriod().getStart()), TimeUtil
.formatToSqlTimestamp(last.getValidPeriod().getEnd())));
PluginDataObject[] pdos = DataCubeContainer.getData(requestMap);
PluginDataObject[] pdos;
try {
pdos = DataCubeContainer.getData(requestMap);
} catch (DataCubeException e) {
throw new VizException(e);
}
List<PluginDataObject> finalList = new ArrayList<PluginDataObject>(
pdos != null ? pdos.length : 0);

View file

@ -24,15 +24,17 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.common.dataplugin.bufrua;bundle-version="1.11.17",
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
com.raytheon.uf.common.style;bundle-version="1.0.0",
com.raytheon.uf.common.numeric;bundle-version="1.14.0"
com.raytheon.uf.common.numeric;bundle-version="1.14.0",
com.raytheon.uf.common.derivparam;bundle-version="1.14.0",
com.raytheon.uf.viz.datacube
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.objectiveanalysis.rsc
Import-Package: com.raytheon.uf.common.comm,
com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.inventory.tree,
com.raytheon.uf.common.dataplugin.radar,
com.raytheon.uf.common.gridcoverage,
com.raytheon.uf.common.wxmath,
com.raytheon.uf.viz.derivparam.library,
com.raytheon.uf.viz.derivparam.tree,
com.raytheon.viz.ui,
com.raytheon.viz.ui.editor

View file

@ -32,6 +32,7 @@ import org.opengis.referencing.datum.PixelInCell;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.TransformException;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.geospatial.MapUtil;
@ -41,8 +42,8 @@ import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.util.GridUtil;
import com.raytheon.uf.common.wxmath.DistFilter;
import com.raytheon.uf.common.wxmath.ScalelessAnalysis;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* Requests point data and performs objective analysis to map then data onto a
@ -115,8 +116,13 @@ public class OAGridTransformer {
String[] parameters = { "latitude", "longitude", parameter };
PointDataContainer pdc = DataCubeContainer.getPointData(pluginName,
parameters, levelKey, constraints);
PointDataContainer pdc;
try {
pdc = DataCubeContainer.getPointData(pluginName, parameters,
levelKey, constraints);
} catch (DataCubeException e) {
throw new VizException(e);
}
if (pdc == null) {
return null;
}

View file

@ -28,18 +28,19 @@ import org.geotools.coverage.grid.GeneralGridGeometry;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.TransformException;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.inventory.tree.CubeLevel;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.derivparam.library.DerivedParameterRequest;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.pointdata.PointDataView;
import com.raytheon.uf.common.util.GridUtil;
import com.raytheon.uf.common.wxmath.DistFilter;
import com.raytheon.uf.common.wxmath.ScalelessAnalysis;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.viz.derivparam.library.DerivedParameterRequest;
import com.raytheon.uf.viz.derivparam.tree.CubeLevel;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.viz.grid.util.TiltUtils;
/**
@ -184,8 +185,13 @@ public class OATiltGridTransformer extends OAGridTransformer {
21);
String[] parameters = { "latitude", "longitude", "P", parameter };
PointDataContainer pdc = DataCubeContainer.getPointData(pluginName,
parameters, constraints);
PointDataContainer pdc;
try {
pdc = DataCubeContainer.getPointData(pluginName, parameters,
constraints);
} catch (DataCubeException e1) {
throw new VizException(e1);
}
if (pdc == null || pdc.getCurrentSz() < 1) {
return null;

View file

@ -3,13 +3,13 @@ package com.raytheon.uf.viz.preciprate;
import java.io.File;
import java.util.Map;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.preciprate.PrecipRateRecord;
import com.raytheon.uf.common.dataplugin.radar.RadarStoredData;
import com.raytheon.uf.common.dataplugin.radar.util.RadarConstants.DHRValues;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.cache.CacheObject;
import com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetriever;
import com.raytheon.viz.radar.VizRadarRecord;

View file

@ -21,10 +21,12 @@ Require-Bundle: com.raytheon.uf.common.pointdata;bundle-version="1.11.9",
com.raytheon.uf.common.colormap;bundle-version="1.11.4",
com.raytheon.uf.viz.sounding;bundle-version="1.11.16",
com.raytheon.uf.viz.xy,
com.raytheon.uf.common.sounding;bundle-version="1.0.0"
com.raytheon.uf.common.sounding;bundle-version="1.0.0",
com.raytheon.uf.viz.datacube
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.profiler,
com.raytheon.uf.viz.profiler.ui
Import-Package: com.raytheon.uf.common.dataplugin.profiler,
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.dataplugin.profiler,
com.raytheon.uf.common.dataplugin.profiler.dao

View file

@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.profiler.ProfilerObs;
import com.raytheon.uf.common.dataplugin.profiler.dao.ProfilerDataTransform;
@ -36,11 +37,11 @@ import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.pointdata.PointDataContainer;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* ProfilerResourceData
@ -91,9 +92,13 @@ public class ProfilerResourceData extends AbstractRequestableResourceData {
getMetadataMap());
constraints.put(PluginDataObject.DATATIME_ID, new RequestConstraint(
dataTimes));
PointDataContainer pdc = DataCubeContainer.getPointData(
ProfilerObs.PLUGIN_NAME, ProfilerDataTransform.MAN_PARAMS,
constraints);
PointDataContainer pdc;
try {
pdc = DataCubeContainer.getPointData(ProfilerObs.PLUGIN_NAME,
ProfilerDataTransform.MAN_PARAMS, constraints);
} catch (DataCubeException e) {
throw new VizException(e);
}
if (pdc != null) {
return ProfilerDataTransform.toProfilerRecords(pdc);
}

View file

@ -18,8 +18,10 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.common.dataplugin.qpf;bundle-version="1.0.0",
com.raytheon.uf.viz.productbrowser;bundle-version="1.12.1153",
com.raytheon.uf.common.style;bundle-version="1.0.0",
com.raytheon.uf.common.numeric;bundle-version="1.14.0"
com.raytheon.uf.common.numeric;bundle-version="1.14.0",
com.raytheon.uf.viz.datacube
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.uf.viz.qpf
Import-Package: com.raytheon.uf.common.colormap.prefs
Import-Package: com.raytheon.uf.common.colormap.prefs,
com.raytheon.uf.common.inventory.exception

View file

@ -29,6 +29,7 @@ import java.util.List;
import javax.measure.unit.Unit;
import javax.measure.unit.UnitFormat;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.qpf.QPFRecord;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
@ -36,10 +37,10 @@ import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.style.ParamLevelMatchCriteria;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.core.rsc.capabilities.DisplayTypeCapability;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.viz.grid.rsc.general.AbstractGridResource;
import com.raytheon.viz.grid.rsc.general.GeneralGridData;
@ -102,7 +103,12 @@ public class QPFResource extends AbstractGridResource<QPFResourceData> {
return Collections.emptyList();
}
QPFRecord rec = (QPFRecord) pdos.get(0);
IDataRecord[] dataRecs = DataCubeContainer.getDataRecord(rec);
IDataRecord[] dataRecs;
try {
dataRecs = DataCubeContainer.getDataRecord(rec);
} catch (DataCubeException e) {
throw new VizException(e);
}
FloatDataRecord fdr = (FloatDataRecord) dataRecs[0];
FloatBuffer data = FloatBuffer.wrap(fdr.getFloatData());
Unit<?> unit = UnitFormat.getInstance().parseObject(

View file

@ -40,6 +40,7 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
import com.raytheon.uf.common.dataplugin.radar.util.RadarDataRetriever;
import com.raytheon.uf.common.dataplugin.radar.util.TerminalRadarUtils;
@ -54,7 +55,6 @@ import com.raytheon.uf.common.message.response.ResponseMessageGeneric;
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.HDF5Util;
import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.catalog.DbQuery;
import com.raytheon.uf.viz.core.comm.Connector;

View file

@ -20,3 +20,5 @@ Bundle-ActivationPolicy: lazy
Eclipse-BuddyPolicy: registered
Export-Package: com.raytheon.uf.viz.sounding,
com.raytheon.uf.viz.sounding.providers
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.viz.datacube

View file

@ -27,13 +27,13 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.datastorage.Request;
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
import com.raytheon.uf.common.datastorage.records.IDataRecord;
import com.raytheon.uf.common.sounding.VerticalSounding;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.sounding.Activator;
/**
@ -127,7 +127,7 @@ public class SoundingDataLoadJob extends Job {
size = data.length;
pdo.setMessageData(data);
}
} catch (VizException e) {
} catch (DataCubeException e) {
e.printStackTrace();
}
System.out.println("loadData: " + (System.currentTimeMillis() - t0));

View file

@ -27,6 +27,7 @@ import java.util.Map;
import org.geotools.geometry.jts.JTS;
import org.opengis.referencing.operation.TransformException;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.bufrua.UAObs;
import com.raytheon.uf.common.dataplugin.bufrua.UAObsAdapter;
@ -41,9 +42,9 @@ import com.raytheon.uf.common.sounding.adapter.IVerticalSoundingProvider;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.BinOffset;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.sounding.Activator;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
@ -109,7 +110,7 @@ public class BufruaSoundingProvider extends
UAObs.PLUGIN_NAME, BufrUAPointDataTransform.MAN_PARAMS,
constraints);
return BufrUAPointDataTransform.toUAObsRecords(pdc);
} catch (VizException e) {
} catch (DataCubeException e) {
throw new RuntimeException("Error querying for sounding records: "
+ constraints, e);
}

View file

@ -29,6 +29,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.grid.GridConstants;
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
@ -47,9 +48,7 @@ import com.raytheon.uf.common.sounding.VerticalSounding;
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.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.datastructure.VizDataCubeException;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.viz.core.map.GeoUtil;
import com.vividsolutions.jts.geom.Coordinate;
@ -106,7 +105,7 @@ public class GridSoundingProvider extends
try {
DataCubeContainer.getDataRecords(Arrays.asList(records),
Request.ALL, null);
} catch (VizDataCubeException e) {
} catch (DataCubeException e) {
UFStatus.getHandler().handle(Priority.PROBLEM,
"Error requesting model data for sounding", e);
}
@ -188,7 +187,7 @@ public class GridSoundingProvider extends
Coordinate location) {
try {
return DataCubeContainer.getData(constraints, time);
} catch (VizException e) {
} catch (DataCubeException e) {
throw new RuntimeException("Error querying for sounding records: "
+ constraints, e);
}

View file

@ -3,6 +3,7 @@ package com.raytheon.uf.viz.spring.dm;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
@ -17,7 +18,6 @@ import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
/**
*
@ -100,6 +100,7 @@ public class Activator implements BundleActivator {
Map<String, Bundle> bundles,
Map<String, OSGIXmlApplicationContext> contextMap, Bundle bundle,
Set<String> processing) {
BundleResolver bundleResolver = new BundleResolver();
String bundleName = bundle.getSymbolicName();
OSGIXmlApplicationContext appCtx = contextMap.get(bundleName);
if (contextMap.containsKey(bundleName) == false
@ -129,27 +130,16 @@ public class Activator implements BundleActivator {
}
if (files.size() > 0) {
// Files found, check for dependencies
String requiredBundlesHeader = (String) bundle.getHeaders()
.get(Constants.REQUIRE_BUNDLE);
// Split comma separated string from MANIFEST
String[] requiredBundles = COMMA_SPLIT
.split(requiredBundlesHeader);
Collection<Bundle> requiredBundles = bundleResolver
.getRequiredBundles(bundle);
List<OSGIXmlApplicationContext> parentContexts = new ArrayList<OSGIXmlApplicationContext>();
for (String requiredBndl : requiredBundles) {
// Extract bundle name which is first item in
// semicolon
// split list
String[] bndlParts = SEMICOLON_SPLIT
.split(requiredBndl);
Bundle reqBndl = bundles.get(bndlParts[0]);
if (reqBndl != null) {
// Found bundle, process context for bundle
OSGIXmlApplicationContext parent = createContext(
bundles, contextMap, reqBndl, processing);
if (parent != null) {
// Context found, add to list
parentContexts.add(parent);
}
for (Bundle requiredBundle : requiredBundles) {
// Found bundle, process context for bundle
OSGIXmlApplicationContext parent = createContext(
bundles, contextMap, requiredBundle, processing);
if (parent != null) {
// Context found, add to list
parentContexts.add(parent);
}
}

View file

@ -0,0 +1,91 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.spring.dm;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import org.osgi.framework.Bundle;
import org.osgi.framework.namespace.BundleNamespace;
import org.osgi.framework.namespace.PackageNamespace;
import org.osgi.framework.wiring.BundleWire;
import org.osgi.framework.wiring.BundleWiring;
/**
* Resolve required bundles. Adapted from
* com.raytheon.uf.viz.core.reflect.SubClassLocator
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 3, 2014 ekladstrup Initial creation
*
* </pre>
*
* @author ekladstrup
* @version 1.0
*/
public class BundleResolver {
protected final Map<String, Collection<Bundle>> requiredBundles = new HashMap<String, Collection<Bundle>>();
public BundleResolver() {
}
/**
* Get back all the bundles this bundle depends on.
*
* @param bundle
* the bundle
* @return bundles required by bundle.
*/
public Collection<Bundle> getRequiredBundles(Bundle bundle) {
String bundleName = bundle.getSymbolicName();
Collection<Bundle> required = requiredBundles.get(bundleName);
if (required == null) {
required = new HashSet<Bundle>();
BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
if (bundleWiring != null) {
/* Get Required bundles */
for (BundleWire bw : bundleWiring
.getRequiredWires(BundleNamespace.BUNDLE_NAMESPACE)) {
required.add(bw.getProviderWiring().getBundle());
}
/* Get Bundles through import package */
for (BundleWire bw : bundleWiring
.getRequiredWires(PackageNamespace.PACKAGE_NAMESPACE)) {
required.add(bw.getProviderWiring().getBundle());
}
}
/* Avoid recursion */
required.remove(bundle);
requiredBundles.put(bundleName, required);
}
return required;
}
}

View file

@ -16,8 +16,10 @@ Require-Bundle: com.raytheon.uf.viz.core,
com.raytheon.uf.viz.thinclient;bundle-version="1.0.0",
com.raytheon.viz.grid;bundle-version="1.12.1174"
Import-Package: com.raytheon.uf.common.comm,
com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.viz.core.maps.rsc,
com.raytheon.uf.viz.datacube,
com.vividsolutions.jts.geom,
com.vividsolutions.jts.index.strtree,
com.vividsolutions.jts.io,

View file

@ -28,6 +28,7 @@ import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
@ -40,12 +41,12 @@ import com.raytheon.uf.common.time.msgs.GetServerTimeRequest;
import com.raytheon.uf.common.time.msgs.GetServerTimeResponse;
import com.raytheon.uf.viz.core.RecordFactory;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractResourceData;
import com.raytheon.uf.viz.core.rsc.updater.DataUpdateTree;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.viz.grid.inv.RadarUpdater;
import com.raytheon.viz.grid.util.RadarAdapter;
@ -119,6 +120,9 @@ public class ThinClientDataUpdateTree extends DataUpdateTree {
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
}
}
getRadarUpdates(time, messages);
@ -157,6 +161,8 @@ public class ThinClientDataUpdateTree extends DataUpdateTree {
}
} catch (VizException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
}
}

View file

@ -29,15 +29,15 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
import com.raytheon.uf.common.dataquery.requests.TimeQueryRequest;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.URICatalog;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.thinclient.Activator;
import com.raytheon.uf.viz.thinclient.preferences.ThinClientPreferenceConstants;
@ -158,7 +158,7 @@ public class ThinClientURICatalog extends URICatalog implements
try {
times = DataCubeContainer.performTimeQueries(entry.getKey(),
requestList);
} catch (VizException e) {
} catch (DataCubeException e) {
statusHandler.error("Error getting menu green times", e);
continue;
}

View file

@ -26,12 +26,12 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.vil.VILRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;

View file

@ -26,7 +26,8 @@ Require-Bundle: org.eclipse.ui,
com.raytheon.uf.viz.application;bundle-version="1.0.0",
com.raytheon.uf.common.tafqueue;bundle-version="1.0.0",
org.apache.commons.lang;bundle-version="2.3.0",
com.raytheon.uf.common.auth;bundle-version="1.12.1174"
com.raytheon.uf.common.auth;bundle-version="1.12.1174",
com.raytheon.uf.viz.datacube
Bundle-ActivationPolicy: lazy
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
Export-Package: com.raytheon.viz.aviation,
@ -41,6 +42,7 @@ Export-Package: com.raytheon.viz.aviation,
com.raytheon.viz.aviation.xml
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.edex.plugin.bufrmos.common,
com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.dataplugin.acarssounding,
com.raytheon.uf.common.dataplugin.gfe.point,
com.raytheon.uf.common.dataplugin.gfe.request,

View file

@ -54,8 +54,8 @@ 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.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.viz.aviation.climatology.ClimateMenuDlg;
import com.raytheon.viz.aviation.model.ForecastModel;
import com.raytheon.viz.aviation.observer.TafMonitorDlg;

View file

@ -25,6 +25,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingRecord;
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
import com.raytheon.uf.common.dataplugin.radar.util.RadarConstants;
@ -32,7 +33,6 @@ import com.raytheon.uf.common.dataplugin.radar.util.RadarConstants.MapValues;
import com.raytheon.uf.common.dataplugin.radar.util.RadarDataRetriever;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.viz.core.HDF5Util;
/**
* TODO Add Description

View file

@ -28,6 +28,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
@ -38,7 +39,6 @@ import com.raytheon.uf.common.datastorage.records.LongDataRecord;
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.HDF5Util;
import com.raytheon.viz.avnconfig.ITafSiteConfig;
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
import com.raytheon.viz.avnconfig.TafSiteData;

View file

@ -29,6 +29,7 @@ import java.util.Map;
import java.util.TimeZone;
import com.raytheon.edex.plugin.ccfp.CcfpRecord;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.acarssounding.ACARSSoundingRecord;
import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord;
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
@ -41,9 +42,9 @@ 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.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* Utility functions for data requesting.
@ -189,7 +190,13 @@ public class MonitorDataUtil {
return records;
} catch (VizException e) {
statusHandler.handle(Priority.ERROR,
"Error retrieving radar vertical wind profile data", e);
"Error making server request for radar vertical wind profile data",
e);
} catch (DataCubeException e) {
statusHandler
.handle(Priority.ERROR,
"Error performing time query for radar vertical wind profile data",
e);
}
return null;
}
@ -231,7 +238,13 @@ public class MonitorDataUtil {
return records;
} catch (VizException e) {
statusHandler.handle(Priority.ERROR,
"Error retrieving Acars Sounding Records data", e);
"Error making server request for Acars Sounding Records data",
e);
} catch (DataCubeException e) {
statusHandler
.handle(Priority.ERROR,
"Error performing time query for Acars Sounding Records data",
e);
}
return null;
}

View file

@ -28,14 +28,14 @@ import java.util.Map;
import java.util.TimeZone;
import com.raytheon.edex.plugin.taf.common.TafRecord;
import com.raytheon.uf.common.inventory.exception.DataCubeException;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
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.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
/**
* Utility functions related to TAFs
@ -140,7 +140,7 @@ public class TafUtil {
}));
return tafs;
} catch (VizException e) {
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM, "Error retrieving TAFs", e);
}
return null;

View file

@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.core.runtime,
com.raytheon.uf.common.geospatial,
com.raytheon.uf.common.datastorage,
com.raytheon.uf.common.dataplugin,
com.raytheon.uf.common.util
com.raytheon.uf.common.util,
com.raytheon.uf.viz.datacube
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.viz.awipstools,
com.raytheon.viz.awipstools.capabilities,
@ -32,7 +33,8 @@ Export-Package: com.raytheon.viz.awipstools,
com.raytheon.viz.awipstools.ui.display,
com.raytheon.viz.awipstools.ui.layer
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.viz.core,
Import-Package: com.raytheon.uf.common.inventory.exception,
com.raytheon.viz.core,
com.raytheon.viz.core.interval,
com.raytheon.viz.core.rsc,
com.raytheon.viz.core.rsc.jts

View file

@ -51,6 +51,7 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import com.raytheon.uf.common.dataplugin.HDF5Util;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
import com.raytheon.uf.common.dataplugin.radar.util.RadarDataRetriever;
@ -65,13 +66,12 @@ 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.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.VizConstants;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.globals.VizGlobalsManager;
import com.raytheon.uf.viz.core.requests.ThriftClient;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.points.IPointChangedListener;
import com.raytheon.uf.viz.points.PointsDataManager;
import com.raytheon.viz.awipstools.IToolChangedListener;

View file

@ -22,7 +22,6 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.8.0",
com.raytheon.uf.common.dataplugin.radar;bundle-version="1.14.0",
com.raytheon.uf.viz.points,
com.raytheon.uf.common.colormap,
com.raytheon.uf.viz.derivparam;bundle-version="1.14.0",
com.raytheon.uf.common.style,
com.raytheon.uf.common.localization;bundle-version="1.14.0",
com.raytheon.uf.common.status,
@ -30,19 +29,24 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.8.0",
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.dataquery,
com.raytheon.uf.common.comm,
com.raytheon.uf.common.derivparam,
com.raytheon.uf.common.derivparam;bundle-version="1.14.0",
com.raytheon.uf.common.pointdata;bundle-version="1.13.0",
com.raytheon.uf.viz.d2d.core,
com.raytheon.uf.common.topo;bundle-version="1.14.0",
com.raytheon.uf.common.numeric;bundle-version="1.14.0",
javax.measure
javax.measure,
com.raytheon.uf.viz.datacube;bundle-version="1.14.0"
Export-Package: com.raytheon.viz.grid,
com.raytheon.viz.grid.inv,
com.raytheon.viz.grid.rsc,
com.raytheon.viz.grid.rsc.general,
com.raytheon.viz.grid.util,
com.raytheon.viz.grid.xml
Import-Package: com.raytheon.viz.alerts,
Import-Package: com.raytheon.uf.common.inventory.data,
com.raytheon.uf.common.inventory.exception,
com.raytheon.uf.common.inventory,
com.raytheon.uf.common.inventory.tree,
com.raytheon.viz.alerts,
com.raytheon.viz.alerts.observers,
com.raytheon.viz.core.rsc,
com.raytheon.viz.core.units

View file

@ -1 +0,0 @@
com.raytheon.viz.grid.util.GridDataCubeAdapter

View file

@ -3,4 +3,5 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
localization/
localization/,\
res/

View file

@ -0,0 +1,13 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="gridDataCubeAdapter" class="com.raytheon.viz.grid.util.GridDataCubeAdapter" />
<bean id="gridDataCubeAdapterRegistered"
factory-bean="dataCubeAdapterRegistry"
factory-method="registerAdapter">
<constructor-arg ref="gridDataCubeAdapter" />
</bean>
</beans>

View file

@ -43,12 +43,12 @@ import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
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.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.drawables.ResourcePair;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.DisplayType;
import com.raytheon.uf.viz.core.rsc.ResourceProperties;
import com.raytheon.uf.viz.core.rsc.ResourceType;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.productbrowser.AbstractRequestableProductBrowserDataDefinition;
import com.raytheon.uf.viz.productbrowser.ProductBrowserLabel;
import com.raytheon.uf.viz.productbrowser.ProductBrowserPreference;

View file

@ -32,8 +32,8 @@ import com.raytheon.uf.common.dataplugin.grid.dataset.DatasetInfoLookup;
import com.raytheon.uf.common.dataplugin.level.Level;
import com.raytheon.uf.common.dataplugin.level.LevelFactory;
import com.raytheon.uf.common.dataplugin.level.MasterLevel;
import com.raytheon.uf.viz.derivparam.library.DerivParamDesc;
import com.raytheon.uf.viz.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.common.derivparam.library.DerivParamDesc;
import com.raytheon.uf.common.derivparam.library.DerivedParameterGenerator;
import com.raytheon.uf.viz.productbrowser.ProductBrowserLabel;
import com.raytheon.viz.grid.inv.GridInventory;

Some files were not shown because too many files have changed in this diff Show more