Issue #15 Wes2Bridge time settings

Former-commit-id: b03b324ead [formerly 61cb464263b06c01f4ea0b7270628f03e9e48d5a]
Former-commit-id: 594412a5b5
This commit is contained in:
Dave Hladky 2012-01-25 10:53:51 -06:00
parent a37509adf3
commit 66fbee3e04
12 changed files with 55 additions and 19 deletions

View file

@ -36,6 +36,7 @@ import com.raytheon.uf.common.status.UFStatus;
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.common.time.SimulatedTime;
import com.raytheon.uf.viz.core.comm.Connector;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.requests.ThriftClient;
@ -232,7 +233,9 @@ public class CatalogQuery {
req.setMaxQuery(max);
req.setPluginName(pluginName);
req.setBinOffset(binOffset);
req.setSimDate(SimulatedTime.getSystemTime().getTime());
req.setQueryTerms(constraintMap);
return req;
}
@ -251,6 +254,7 @@ public class CatalogQuery {
* @return the available times that meet the constraints
* @throws VizException
*/
@SuppressWarnings("unchecked")
public static DataTime[] performTimeQuery(
Map<String, RequestConstraint> constraintMap, boolean max,
BinOffset binOffset) throws VizException {

View file

@ -39,6 +39,7 @@ import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.time.SimulatedTime;
import com.raytheon.uf.common.util.FileUtil;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.monitor.ffmp.FFMPMonitor;
@ -474,7 +475,7 @@ public class FFMPDataLoader extends Thread {
FFMPBasinData basinData = null;
if (file.exists()) {
if (file.exists() && SimulatedTime.getSystemTime().isRealTime()) {
System.out.println("File path: " + file.getName());

View file

@ -35,6 +35,7 @@ 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.common.time.SimulatedTime;
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.URICatalog;
@ -122,6 +123,7 @@ public class ThinClientURICatalog extends URICatalog implements
TimeQueryRequest request = new TimeQueryRequest();
request.setPluginName(pluginName);
request.setMaxQuery(true);
request.setSimDate(SimulatedTime.getSystemTime().getTime());
request.setQueryTerms(map);
List<TimeQueryRequest> requestList = requests.get(pluginName);
if (requestList == null) {
@ -182,6 +184,7 @@ public class ThinClientURICatalog extends URICatalog implements
}
}
}
rebuildTree();
}
@Override
@ -192,11 +195,13 @@ public class ThinClientURICatalog extends URICatalog implements
}
public void requeryAllMenuTimes() {
Map<Map<String, RequestConstraint>, List<IURIRefreshCallback>> map = new HashMap<Map<String, RequestConstraint>, List<IURIRefreshCallback>>();
for (DataPair pair : getDataPairs()) {
map.put(pair.metadata, pair.data);
if (enableMenuTimes) {
Map<Map<String, RequestConstraint>, List<IURIRefreshCallback>> map = new HashMap<Map<String, RequestConstraint>, List<IURIRefreshCallback>>();
for (DataPair pair : getDataPairs()) {
map.put(pair.metadata, pair.data);
}
queryMenuTimes(map, null, false);
}
queryMenuTimes(map, null, false);
}
}

View file

@ -58,6 +58,7 @@ import com.raytheon.uf.common.geospatial.MapUtil;
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.common.time.SimulatedTime;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.catalog.CatalogQuery;
import com.raytheon.uf.viz.core.catalog.LayerProperty;
@ -541,6 +542,7 @@ public class SatelliteDataCubeAdapter implements IDataCubeAdapter {
DerivParamField field = (DerivParamField) ifield;
TimeQueryRequest newRequest = new TimeQueryRequest();
newRequest.setBinOffset(binOffset);
newRequest.setSimDate(SimulatedTime.getSystemTime().getTime());
newRequest.setMaxQuery(false);
newRequest.setQueryTerms(modifyQuery(queryParams, field));
newRequest.setPluginName("satellite");

View file

@ -1,19 +1,19 @@
##
# 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
# 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
#
# 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.
##
@ -62,7 +62,8 @@ class ObsRequest(PointDataQuery.PointDataQuery):
self._pdq.setParameters(MetarPointDataTransform.ALL_PARAMS_LIST)
self.queryResults = self._pdq.execute()
if self.queryResults is None:
self.makeNullResponse()
response = ArrayList()
return response
else:
records = MetarPointDataTransform.toMetarRecords(self.queryResults)
size = len(records)

View file

@ -1,4 +1,4 @@
## Core includes file generated on 2012-01-20 17:08:45 GMT
## Core includes file generated on 2012-01-24 20:30:22 GMT
com.raytheon.edex.rpgenvdata/component-deploy.xml
com.raytheon.uf.common.jms/component-deploy.xml
com.raytheon.uf.edex.database/component-deploy.xml

View file

@ -1,4 +1,4 @@
## Cots includes file generated on 2012-01-20 17:08:45 GMT
## Cots includes file generated on 2012-01-24 20:30:22 GMT
com.sun.jndi.nis/*.jar
net.sf.ehcache/*.jar
javax.persistence/*.jar

View file

@ -1,4 +1,4 @@
## Plug-in includes file generated on 2012-01-20 17:08:45 GMT
## Plug-in includes file generated on 2012-01-24 20:30:22 GMT
com.raytheon.uf.edex.plugin.satellite.mcidas/component-deploy.xml
com.raytheon.edex.plugin.ldadhydro/component-deploy.xml
com.raytheon.uf.edex.plugin.loctables/component-deploy.xml

View file

@ -19,6 +19,7 @@
**/
package com.raytheon.uf.common.dataquery.requests;
import java.util.Date;
import java.util.Map;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -53,6 +54,9 @@ public class TimeQueryRequest implements IServerRequest {
@DynamicSerializeElement
private boolean maxQuery;
@DynamicSerializeElement
private Date simDate;
@DynamicSerializeElement
private Map<String, RequestConstraint> queryTerms;
@ -91,11 +95,19 @@ public class TimeQueryRequest implements IServerRequest {
return queryTerms;
}
public void setSimDate(Date simDate) {
this.simDate = simDate;
}
public Date getSimDate() {
return simDate;
}
@Override
public String toString() {
return "TimeQueryRequest [pluginName=" + pluginName + ", maxQuery="
+ maxQuery + ", queryTerms=" + queryTerms + ", binOffset="
+ binOffset + "]";
+ binOffset + " simDate=" + simDate + " ]";
}
}

View file

@ -70,6 +70,16 @@ public class TimeQueryHandler implements IRequestHandler<TimeQueryRequest> {
map.remove("pluginName");
}
// Simulated Date is the date set in the CAVE calling this
if (request.getSimDate() != null) {
RequestConstraint timeConstraint = new RequestConstraint();
timeConstraint.setConstraintType(ConstraintType.LESS_THAN);
timeConstraint
.setConstraintValue(new DataTime(request.getSimDate())
.toString());
map.put(REF_TIME, timeConstraint);
}
String database = PluginFactory.getInstance().getDatabase(
request.getPluginName());
String classname = PluginFactory.getInstance()
@ -136,6 +146,7 @@ public class TimeQueryHandler implements IRequestHandler<TimeQueryRequest> {
constraint.getConstraintType().getOperand(), classname);
}
//System.out.println("TimeQuery: " + query.createHQLQuery());
return query;
}