Merge "Issue #15 Wes2Bridge time settings" into 9-Wes2Bridge
Former-commit-id: 2cf5b32769a0873d5e55c2548964e928c7f020cb
This commit is contained in:
commit
3d83bf95de
12 changed files with 55 additions and 19 deletions
|
@ -36,6 +36,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.common.time.BinOffset;
|
import com.raytheon.uf.common.time.BinOffset;
|
||||||
import com.raytheon.uf.common.time.DataTime;
|
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.comm.Connector;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||||
|
@ -232,7 +233,9 @@ public class CatalogQuery {
|
||||||
req.setMaxQuery(max);
|
req.setMaxQuery(max);
|
||||||
req.setPluginName(pluginName);
|
req.setPluginName(pluginName);
|
||||||
req.setBinOffset(binOffset);
|
req.setBinOffset(binOffset);
|
||||||
|
req.setSimDate(SimulatedTime.getSystemTime().getTime());
|
||||||
req.setQueryTerms(constraintMap);
|
req.setQueryTerms(constraintMap);
|
||||||
|
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,6 +254,7 @@ public class CatalogQuery {
|
||||||
* @return the available times that meet the constraints
|
* @return the available times that meet the constraints
|
||||||
* @throws VizException
|
* @throws VizException
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static DataTime[] performTimeQuery(
|
public static DataTime[] performTimeQuery(
|
||||||
Map<String, RequestConstraint> constraintMap, boolean max,
|
Map<String, RequestConstraint> constraintMap, boolean max,
|
||||||
BinOffset binOffset) throws VizException {
|
BinOffset binOffset) throws VizException {
|
||||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.common.serialization.SerializationException;
|
||||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
|
import com.raytheon.uf.common.time.SimulatedTime;
|
||||||
import com.raytheon.uf.common.util.FileUtil;
|
import com.raytheon.uf.common.util.FileUtil;
|
||||||
import com.raytheon.uf.viz.core.VizApp;
|
import com.raytheon.uf.viz.core.VizApp;
|
||||||
import com.raytheon.uf.viz.monitor.ffmp.FFMPMonitor;
|
import com.raytheon.uf.viz.monitor.ffmp.FFMPMonitor;
|
||||||
|
@ -474,7 +475,7 @@ public class FFMPDataLoader extends Thread {
|
||||||
|
|
||||||
FFMPBasinData basinData = null;
|
FFMPBasinData basinData = null;
|
||||||
|
|
||||||
if (file.exists()) {
|
if (file.exists() && SimulatedTime.getSystemTime().isRealTime()) {
|
||||||
|
|
||||||
System.out.println("File path: " + file.getName());
|
System.out.println("File path: " + file.getName());
|
||||||
|
|
||||||
|
|
|
@ -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.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.time.DataTime;
|
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.datastructure.DataCubeContainer;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.uf.viz.core.rsc.URICatalog;
|
import com.raytheon.uf.viz.core.rsc.URICatalog;
|
||||||
|
@ -122,6 +123,7 @@ public class ThinClientURICatalog extends URICatalog implements
|
||||||
TimeQueryRequest request = new TimeQueryRequest();
|
TimeQueryRequest request = new TimeQueryRequest();
|
||||||
request.setPluginName(pluginName);
|
request.setPluginName(pluginName);
|
||||||
request.setMaxQuery(true);
|
request.setMaxQuery(true);
|
||||||
|
request.setSimDate(SimulatedTime.getSystemTime().getTime());
|
||||||
request.setQueryTerms(map);
|
request.setQueryTerms(map);
|
||||||
List<TimeQueryRequest> requestList = requests.get(pluginName);
|
List<TimeQueryRequest> requestList = requests.get(pluginName);
|
||||||
if (requestList == null) {
|
if (requestList == null) {
|
||||||
|
@ -182,6 +184,7 @@ public class ThinClientURICatalog extends URICatalog implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
rebuildTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -192,11 +195,13 @@ public class ThinClientURICatalog extends URICatalog implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public void requeryAllMenuTimes() {
|
public void requeryAllMenuTimes() {
|
||||||
Map<Map<String, RequestConstraint>, List<IURIRefreshCallback>> map = new HashMap<Map<String, RequestConstraint>, List<IURIRefreshCallback>>();
|
if (enableMenuTimes) {
|
||||||
for (DataPair pair : getDataPairs()) {
|
Map<Map<String, RequestConstraint>, List<IURIRefreshCallback>> map = new HashMap<Map<String, RequestConstraint>, List<IURIRefreshCallback>>();
|
||||||
map.put(pair.metadata, pair.data);
|
for (DataPair pair : getDataPairs()) {
|
||||||
|
map.put(pair.metadata, pair.data);
|
||||||
|
}
|
||||||
|
queryMenuTimes(map, null, false);
|
||||||
}
|
}
|
||||||
queryMenuTimes(map, null, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,7 @@ import com.raytheon.uf.common.geospatial.MapUtil;
|
||||||
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
import com.raytheon.uf.common.pointdata.PointDataContainer;
|
||||||
import com.raytheon.uf.common.time.BinOffset;
|
import com.raytheon.uf.common.time.BinOffset;
|
||||||
import com.raytheon.uf.common.time.DataTime;
|
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.HDF5Util;
|
||||||
import com.raytheon.uf.viz.core.catalog.CatalogQuery;
|
import com.raytheon.uf.viz.core.catalog.CatalogQuery;
|
||||||
import com.raytheon.uf.viz.core.catalog.LayerProperty;
|
import com.raytheon.uf.viz.core.catalog.LayerProperty;
|
||||||
|
@ -541,6 +542,7 @@ public class SatelliteDataCubeAdapter implements IDataCubeAdapter {
|
||||||
DerivParamField field = (DerivParamField) ifield;
|
DerivParamField field = (DerivParamField) ifield;
|
||||||
TimeQueryRequest newRequest = new TimeQueryRequest();
|
TimeQueryRequest newRequest = new TimeQueryRequest();
|
||||||
newRequest.setBinOffset(binOffset);
|
newRequest.setBinOffset(binOffset);
|
||||||
|
newRequest.setSimDate(SimulatedTime.getSystemTime().getTime());
|
||||||
newRequest.setMaxQuery(false);
|
newRequest.setMaxQuery(false);
|
||||||
newRequest.setQueryTerms(modifyQuery(queryParams, field));
|
newRequest.setQueryTerms(modifyQuery(queryParams, field));
|
||||||
newRequest.setPluginName("satellite");
|
newRequest.setPluginName("satellite");
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -62,7 +62,8 @@ class ObsRequest(PointDataQuery.PointDataQuery):
|
||||||
self._pdq.setParameters(MetarPointDataTransform.ALL_PARAMS_LIST)
|
self._pdq.setParameters(MetarPointDataTransform.ALL_PARAMS_LIST)
|
||||||
self.queryResults = self._pdq.execute()
|
self.queryResults = self._pdq.execute()
|
||||||
if self.queryResults is None:
|
if self.queryResults is None:
|
||||||
self.makeNullResponse()
|
response = ArrayList()
|
||||||
|
return response
|
||||||
else:
|
else:
|
||||||
records = MetarPointDataTransform.toMetarRecords(self.queryResults)
|
records = MetarPointDataTransform.toMetarRecords(self.queryResults)
|
||||||
size = len(records)
|
size = len(records)
|
||||||
|
|
|
@ -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.edex.rpgenvdata/component-deploy.xml
|
||||||
com.raytheon.uf.common.jms/component-deploy.xml
|
com.raytheon.uf.common.jms/component-deploy.xml
|
||||||
com.raytheon.uf.edex.database/component-deploy.xml
|
com.raytheon.uf.edex.database/component-deploy.xml
|
||||||
|
|
|
@ -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
|
com.sun.jndi.nis/*.jar
|
||||||
net.sf.ehcache/*.jar
|
net.sf.ehcache/*.jar
|
||||||
javax.persistence/*.jar
|
javax.persistence/*.jar
|
||||||
|
|
|
@ -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.uf.edex.plugin.satellite.mcidas/component-deploy.xml
|
||||||
com.raytheon.edex.plugin.ldadhydro/component-deploy.xml
|
com.raytheon.edex.plugin.ldadhydro/component-deploy.xml
|
||||||
com.raytheon.uf.edex.plugin.loctables/component-deploy.xml
|
com.raytheon.uf.edex.plugin.loctables/component-deploy.xml
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -19,6 +19,7 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.uf.common.dataquery.requests;
|
package com.raytheon.uf.common.dataquery.requests;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
|
@ -53,6 +54,9 @@ public class TimeQueryRequest implements IServerRequest {
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private boolean maxQuery;
|
private boolean maxQuery;
|
||||||
|
|
||||||
|
@DynamicSerializeElement
|
||||||
|
private Date simDate;
|
||||||
|
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private Map<String, RequestConstraint> queryTerms;
|
private Map<String, RequestConstraint> queryTerms;
|
||||||
|
|
||||||
|
@ -91,11 +95,19 @@ public class TimeQueryRequest implements IServerRequest {
|
||||||
return queryTerms;
|
return queryTerms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSimDate(Date simDate) {
|
||||||
|
this.simDate = simDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getSimDate() {
|
||||||
|
return simDate;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "TimeQueryRequest [pluginName=" + pluginName + ", maxQuery="
|
return "TimeQueryRequest [pluginName=" + pluginName + ", maxQuery="
|
||||||
+ maxQuery + ", queryTerms=" + queryTerms + ", binOffset="
|
+ maxQuery + ", queryTerms=" + queryTerms + ", binOffset="
|
||||||
+ binOffset + "]";
|
+ binOffset + " simDate=" + simDate + " ]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,16 @@ public class TimeQueryHandler implements IRequestHandler<TimeQueryRequest> {
|
||||||
map.remove("pluginName");
|
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(
|
String database = PluginFactory.getInstance().getDatabase(
|
||||||
request.getPluginName());
|
request.getPluginName());
|
||||||
String classname = PluginFactory.getInstance()
|
String classname = PluginFactory.getInstance()
|
||||||
|
@ -136,6 +146,7 @@ public class TimeQueryHandler implements IRequestHandler<TimeQueryRequest> {
|
||||||
constraint.getConstraintType().getOperand(), classname);
|
constraint.getConstraintType().getOperand(), classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//System.out.println("TimeQuery: " + query.createHQLQuery());
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue