>();
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);
}
}
diff --git a/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DataCubeAdapters.java b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DataCubeAdapters.java
new file mode 100644
index 0000000000..d950098138
--- /dev/null
+++ b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DataCubeAdapters.java
@@ -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
+ *
+ *
+ *
+ * SOFTWARE HISTORY
+ *
+ * Date Ticket# Engineer Description
+ * ------------ ---------- ----------- --------------------------
+ * Apr 1, 2014 ekladstrup Initial creation
+ *
+ *
+ *
+ * @author ekladstrup
+ * @version 1.0
+ */
+
+public class DataCubeAdapters {
+
+ private static final transient IUFStatusHandler statusHandler = UFStatus
+ .getHandler(DataCubeAdapters.class);
+
+ protected Map adapters = new HashMap();
+
+ protected Map initializedMap = new HashMap();
+
+ 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;
+ }
+}
diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/DataCubeContainer.java b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DataCubeContainer.java
similarity index 85%
rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/DataCubeContainer.java
rename to cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DataCubeContainer.java
index 5efaea01d1..fed7817833 100644
--- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/DataCubeContainer.java
+++ b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DataCubeContainer.java
@@ -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 adapters = new ArrayList();
-
- private static Map initializedMap = new HashMap();
-
- static {
- Iterator 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 containers = new HashMap();
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 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 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 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 queryParams, boolean latestOnly)
- throws VizException {
+ throws DataCubeException {
return performTimeQuery(queryParams, latestOnly, null);
}
@@ -226,7 +197,7 @@ public class DataCubeContainer {
*/
public static DataTime[] performTimeQuery(
Map 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> performTimeQueries(String pluginName,
- List requests) throws VizException {
+ List requests) throws DataCubeException {
if (requests.isEmpty()) {
return Collections.emptyList();
}
@@ -264,7 +235,7 @@ public class DataCubeContainer {
* @return
*/
public static List> 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> 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> performTimeQueries(
- List requests) throws VizException {
+ List requests) throws DataCubeException {
Map> requestMap = new HashMap>();
for (TimeQueryRequest request : requests) {
String pluginName = request.getPluginName();
@@ -330,7 +301,8 @@ public class DataCubeContainer {
* @throws VizException
*/
public static PluginDataObject[] getData(
- Map constraints) throws VizException {
+ Map constraints)
+ throws DataCubeException {
return getData(constraints, (DataTime[]) null);
}
@@ -344,7 +316,7 @@ public class DataCubeContainer {
*/
public static PluginDataObject[] getData(
Map 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 constraints, DataTime[] times)
- throws VizException {
+ throws DataCubeException {
String pluginName = constraints.get(PluginDataObject.PLUGIN_NAME_ID)
.getConstraintValue();
return getInstance(pluginName).adapter.getData(constraints, times);
diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/DefaultDataCubeAdapter.java b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DefaultDataCubeAdapter.java
similarity index 83%
rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/DefaultDataCubeAdapter.java
rename to cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DefaultDataCubeAdapter.java
index 166ef36e6a..12118390c0 100644
--- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/DefaultDataCubeAdapter.java
+++ b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/DefaultDataCubeAdapter.java
@@ -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> timeQuery(List requests)
- throws VizException {
+ throws DataCubeException {
TimeQueryRequestSet set = new TimeQueryRequestSet();
set.setRequests(requests.toArray(new TimeQueryRequest[0]));
- @SuppressWarnings("unchecked")
- List> result = (List>) ThriftClient
- .sendRequest(set);
+ List> result;
+ try {
+ result = (List>) 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 queryParams) throws VizException {
+ Map 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 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 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 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);
}
diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/IDataCubeAdapter.java b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/IDataCubeAdapter.java
similarity index 92%
rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/IDataCubeAdapter.java
rename to cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/IDataCubeAdapter.java
index 8348c61f6e..dcd9f8a53c 100644
--- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/datastructure/IDataCubeAdapter.java
+++ b/cave/com.raytheon.uf.viz.datacube/src/com/raytheon/uf/viz/datacube/IDataCubeAdapter.java
@@ -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> timeQuery(List 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 queryParams) throws VizException;
+ Map 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 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 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 constraints, DataTime[] selectedTimes)
- throws VizException;
+ throws DataCubeException;
/**
* If the inventory for a particular data type is large (for example, Grib),
diff --git a/cave/com.raytheon.uf.viz.derivparam.ui/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.derivparam.ui/META-INF/MANIFEST.MF
index edc27aded8..6815064c39 100644
--- a/cave/com.raytheon.uf.viz.derivparam.ui/META-INF/MANIFEST.MF
+++ b/cave/com.raytheon.uf.viz.derivparam.ui/META-INF/MANIFEST.MF
@@ -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
diff --git a/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewDefinitionPage.java b/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewDefinitionPage.java
index 61a6273335..a9152d8a35 100644
--- a/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewDefinitionPage.java
+++ b/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewDefinitionPage.java
@@ -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;
diff --git a/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewFunctionPage.java b/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewFunctionPage.java
index bb55ecf341..66d589da67 100644
--- a/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewFunctionPage.java
+++ b/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamNewFunctionPage.java
@@ -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;
diff --git a/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamWizard.java b/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamWizard.java
index 04aeb1124b..0c70175d33 100644
--- a/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamWizard.java
+++ b/cave/com.raytheon.uf.viz.derivparam.ui/src/com/raytheon/uf/viz/derivparam/ui/dialogs/DerivedParamWizard.java
@@ -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) {
diff --git a/cave/com.raytheon.uf.viz.derivparam/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.derivparam/META-INF/MANIFEST.MF
deleted file mode 100644
index 03491ae63c..0000000000
--- a/cave/com.raytheon.uf.viz.derivparam/META-INF/MANIFEST.MF
+++ /dev/null
@@ -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
diff --git a/cave/com.raytheon.uf.viz.derivparam/build.properties b/cave/com.raytheon.uf.viz.derivparam/build.properties
deleted file mode 100644
index 73cf567d29..0000000000
--- a/cave/com.raytheon.uf.viz.derivparam/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- schema/,\
- plugin.xml,\
- localization/
diff --git a/cave/com.raytheon.uf.viz.derivparam/plugin.xml b/cave/com.raytheon.uf.viz.derivparam/plugin.xml
deleted file mode 100644
index 7f3d6f747b..0000000000
--- a/cave/com.raytheon.uf.viz.derivparam/plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java
index 7d9332ce12..3e56c1a329 100644
--- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java
+++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java
@@ -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;
diff --git a/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/resource/FogResourceData.java b/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/resource/FogResourceData.java
index 342c11d514..c5f35775f9 100644
--- a/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/resource/FogResourceData.java
+++ b/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/ui/resource/FogResourceData.java
@@ -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;
diff --git a/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/resources/SafeSeasResourceData.java b/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/resources/SafeSeasResourceData.java
index 3a99f433eb..9ba761fddd 100644
--- a/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/resources/SafeSeasResourceData.java
+++ b/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/resources/SafeSeasResourceData.java
@@ -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;
diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/ScanMonitor.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/ScanMonitor.java
index ce7581875c..814202a4d9 100644
--- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/ScanMonitor.java
+++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/ScanMonitor.java
@@ -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;
diff --git a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java
index 862cf478f0..4e1d8a4694 100644
--- a/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java
+++ b/cave/com.raytheon.uf.viz.monitor.scan/src/com/raytheon/uf/viz/monitor/scan/resource/ScanResourceData.java
@@ -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;
diff --git a/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF
index 15cc4f1de4..5105c66534 100644
--- a/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF
+++ b/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF
@@ -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,
diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java
index db32399705..960569b01d 100644
--- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java
+++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java
@@ -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 constraints, DataTime[] times)
- throws VizException {
+ throws DataCubeException {
if (times != null) {
String[] timeStrs = new String[times.length];
for (int i = 0; i < times.length; ++i) {
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.npp.viirs/META-INF/MANIFEST.MF
index 9a5c0d3a2f..244787887f 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/MANIFEST.MF
+++ b/cave/com.raytheon.uf.viz.npp.viirs/META-INF/MANIFEST.MF
@@ -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
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/services/com.raytheon.uf.viz.core.datastructure.IDataCubeAdapter b/cave/com.raytheon.uf.viz.npp.viirs/META-INF/services/com.raytheon.uf.viz.core.datastructure.IDataCubeAdapter
deleted file mode 100644
index 9bf3ccea45..0000000000
--- a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/services/com.raytheon.uf.viz.core.datastructure.IDataCubeAdapter
+++ /dev/null
@@ -1 +0,0 @@
-com.raytheon.uf.viz.npp.viirs.data.VIIRSDataCubeAdapter
\ No newline at end of file
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/build.properties b/cave/com.raytheon.uf.viz.npp.viirs/build.properties
index 6e2f847b66..847bfa511f 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/build.properties
+++ b/cave/com.raytheon.uf.viz.npp.viirs/build.properties
@@ -3,4 +3,5 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
- localization/
+ localization/,\
+ res/
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/res/spring/viirs-datacube-spring.xml b/cave/com.raytheon.uf.viz.npp.viirs/res/spring/viirs-datacube-spring.xml
new file mode 100644
index 0000000000..afc5e62b5e
--- /dev/null
+++ b/cave/com.raytheon.uf.viz.npp.viirs/res/spring/viirs-datacube-spring.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataCubeAdapter.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataCubeAdapter.java
index 285dbd6e96..a410a82070 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataCubeAdapter.java
+++ b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataCubeAdapter.java
@@ -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 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 timeAgnosticQuery(
- Map queryTerms) throws VizException {
+ Map queryTerms) throws DataCubeException {
return inventory.timeAgnosticQuery(queryTerms);
}
@@ -202,7 +196,7 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
protected List getData(
Map constraints,
DataTime[] selectedTimes, List requesters)
- throws VizException {
+ throws DataCubeException {
List results = new ArrayList(
requesters.size());
for (AbstractRequestableData requester : requesters) {
@@ -278,7 +272,8 @@ public class VIIRSDataCubeAdapter extends AbstractDataCubeAdapter {
*/
@Override
public PointDataContainer getPoints(String plugin, String[] parameters,
- Map queryParams) throws VizException {
+ Map 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 queryParams)
- throws VizException {
+ throws DataCubeException {
throw new UnsupportedOperationException(
"getPoints is not supported by viirs");
}
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataInventory.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataInventory.java
index 9784f2088a..445102994b 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataInventory.java
+++ b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDataInventory.java
@@ -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 timeAgnosticQuery(Map query)
- throws VizException {
+ throws DataCubeException {
return null;
}
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDynamicParameters.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDynamicParameters.java
index eba4c10f57..2713f975b1 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDynamicParameters.java
+++ b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSDynamicParameters.java
@@ -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
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableData.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableData.java
index 999cb7a774..3ef18872ba 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableData.java
+++ b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableData.java
@@ -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);
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableDataRecord.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableDataRecord.java
index 33419d81ac..0da2468f2d 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableDataRecord.java
+++ b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableDataRecord.java
@@ -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
diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableLevelNode.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableLevelNode.java
index 72a23784ef..cf89e74010 100644
--- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableLevelNode.java
+++ b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/data/VIIRSRequestableLevelNode.java
@@ -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 getAvailability(
Map originalConstraints, Object response)
- throws VizException {
+ throws DataCubeException {
Set result = new HashSet();
DbQueryResponse dbresponse = (DbQueryResponse) response;
for (Map map : dbresponse.getResults()) {
@@ -180,7 +180,7 @@ public class VIIRSRequestableLevelNode extends AbstractBaseDataNode {
public Set getData(
Map orignalConstraints,
Set availability, Object response)
- throws VizException {
+ throws DataCubeException {
DbQueryResponse queryResponse = (DbQueryResponse) response;
List