Omaha #3184 renamed valid identifiers to optional
Change-Id: I9653f9e00b3c693b46b516bc52ff029cd4fe1a81 Former-commit-id:857179e08d
[formerly d0e68c2fa1cc531263622410e4364b87f222139f] Former-commit-id:3c1ae47a76
This commit is contained in:
parent
5a7765628b
commit
77d0661861
17 changed files with 77 additions and 69 deletions
|
@ -72,6 +72,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
|
||||||
* Jan 21, 2014 2667 bclement Initial creation
|
* Jan 21, 2014 2667 bclement Initial creation
|
||||||
* Feb 06, 2014 2672 bsteffen Add envelope support
|
* Feb 06, 2014 2672 bsteffen Add envelope support
|
||||||
* Jul 07, 2014 3333 bclement now uses lightning constants
|
* Jul 07, 2014 3333 bclement now uses lightning constants
|
||||||
|
* Jul 30, 2014 3184 njensen Removed getValidIdentifiers()
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -119,17 +120,6 @@ public class BinLightningAccessFactory extends AbstractDataPluginFactory {
|
||||||
return new String[] { sourceKey };
|
return new String[] { sourceKey };
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.raytheon.uf.common.dataaccess.impl.AbstractDataFactory#
|
|
||||||
* getValidIdentifiers()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String[] getValidIdentifiers() {
|
|
||||||
return new String[] { sourceKey };
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -179,7 +169,6 @@ public class BinLightningAccessFactory extends AbstractDataPluginFactory {
|
||||||
return rval.toArray(new IGeometryData[rval.size()]);
|
return rval.toArray(new IGeometryData[rval.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add geometry data elements to dataList from data store
|
* Add geometry data elements to dataList from data store
|
||||||
*
|
*
|
||||||
|
|
|
@ -73,6 +73,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
||||||
* data request locationNames list is empty.
|
* data request locationNames list is empty.
|
||||||
* Jun 24, 2014 3170 mnash Get the accumulated time if multiple times are requested
|
* Jun 24, 2014 3170 mnash Get the accumulated time if multiple times are requested
|
||||||
* Jul 14, 2014 3184 njensen Overrode getAvailableLevels()
|
* Jul 14, 2014 3184 njensen Overrode getAvailableLevels()
|
||||||
|
* Jul 30, 2014 3184 njensen Overrode required and optional identifiers
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -363,4 +364,14 @@ public class FFMPGeometryFactory extends AbstractDataPluginFactory {
|
||||||
throw new IncompatibleRequestException(request.getDatatype()
|
throw new IncompatibleRequestException(request.getDatatype()
|
||||||
+ " data does not support the concept of levels");
|
+ " data does not support the concept of levels");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getRequiredIdentifiers() {
|
||||||
|
return new String[] { SITE_KEY, WFO, HUC };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getOptionalIdentifiers() {
|
||||||
|
return new String[] { DATA_KEY };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ import com.raytheon.uf.common.util.StringUtil;
|
||||||
* Framework.
|
* Framework.
|
||||||
* Oct 31, 2013 2508 randerso Change to use DiscreteGridSlice.getKeys()
|
* Oct 31, 2013 2508 randerso Change to use DiscreteGridSlice.getKeys()
|
||||||
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
|
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
|
||||||
|
* Jul 30, 2014 3184 njensen Renamed valid identifiers to optional
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -91,14 +92,15 @@ public class GFEGridFactory extends AbstractGridDataPluginFactory implements
|
||||||
|
|
||||||
private static final String KEYS = "keys";
|
private static final String KEYS = "keys";
|
||||||
|
|
||||||
// The more full version from GFEDataAccessUtil is prefered but the smaller
|
// The more full version from GFEDataAccessUtil is preferred but the smaller
|
||||||
// keys are needed for backwards compatibility.
|
// keys are needed for backwards compatibility.
|
||||||
private static final String[] VALID_IDENTIFIERS = { MODEL_NAME, MODEL_TIME,
|
private static final String[] OPTIONAL_IDENTIFIERS = {
|
||||||
SITE_ID };
|
GFEDataAccessUtil.MODEL_NAME, GFEDataAccessUtil.MODEL_TIME,
|
||||||
|
GFEDataAccessUtil.SITE_ID, MODEL_NAME, MODEL_TIME, SITE_ID };
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getValidIdentifiers() {
|
public String[] getOptionalIdentifiers() {
|
||||||
return VALID_IDENTIFIERS;
|
return OPTIONAL_IDENTIFIERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -64,6 +64,7 @@ import com.raytheon.uf.common.util.mapping.Mapper;
|
||||||
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
|
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
|
||||||
* single request.
|
* single request.
|
||||||
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
|
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
|
||||||
|
* Jul 30, 2014 3184 njensen Ranemd valid identifiers to optional
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -82,7 +83,7 @@ public class GridDataAccessFactory extends AbstractGridDataPluginFactory
|
||||||
GridConstants.ENSEMBLE_ID, NAMESPACE };
|
GridConstants.ENSEMBLE_ID, NAMESPACE };
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getValidIdentifiers() {
|
public String[] getOptionalIdentifiers() {
|
||||||
return VALID_IDENTIFIERS;
|
return VALID_IDENTIFIERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,5 +277,4 @@ public class GridDataAccessFactory extends AbstractGridDataPluginFactory
|
||||||
return getAvailableLocationNames(request, GridConstants.DATASET_ID);
|
return getAvailableLocationNames(request, GridConstants.DATASET_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@ import com.vividsolutions.jts.geom.Envelope;
|
||||||
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
|
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
|
||||||
* single request.
|
* single request.
|
||||||
* Feb 04, 2014 2672 bsteffen Enable requesting icaos within envelope.
|
* Feb 04, 2014 2672 bsteffen Enable requesting icaos within envelope.
|
||||||
|
* Jul 30, 2014 3184 njensen Overrode optional identifiers
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -416,6 +417,11 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements
|
||||||
return getAvailableLocationNames(request, ICAO);
|
return getAvailableLocationNames(request, ICAO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getOptionalIdentifiers() {
|
||||||
|
return new String[] { ICAO };
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This is used to convert data from bin,radial format to radial bin format.
|
* This is used to convert data from bin,radial format to radial bin format.
|
||||||
|
|
|
@ -56,6 +56,7 @@ import com.raytheon.uf.common.numeric.source.DataSource;
|
||||||
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
|
* Feb 14, 2013 1614 bsteffen Refactor data access framework to use
|
||||||
* single request.
|
* single request.
|
||||||
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
|
* Feb 04, 2014 2672 bsteffen Enable requesting subgrids.
|
||||||
|
* Jul 30, 2014 3184 njensen Renamed valid identifiers to optional
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -69,7 +70,7 @@ public class SatelliteGridFactory extends AbstractGridDataPluginFactory
|
||||||
|
|
||||||
private static final String FIELD_SECTOR_ID = "sectorID";
|
private static final String FIELD_SECTOR_ID = "sectorID";
|
||||||
|
|
||||||
private static final String[] VALID_IDENTIFIERS = { "source",
|
private static final String[] OPTIONAL_IDENTIFIERS = { "source",
|
||||||
"creatingEntity", FIELD_SECTOR_ID, FIELD_PYHSICAL_ELEMENT };
|
"creatingEntity", FIELD_SECTOR_ID, FIELD_PYHSICAL_ELEMENT };
|
||||||
|
|
||||||
public SatelliteGridFactory() {
|
public SatelliteGridFactory() {
|
||||||
|
@ -77,10 +78,11 @@ public class SatelliteGridFactory extends AbstractGridDataPluginFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getValidIdentifiers() {
|
public String[] getOptionalIdentifiers() {
|
||||||
return VALID_IDENTIFIERS;
|
return OPTIONAL_IDENTIFIERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected DefaultGridData constructGridDataResponse(IDataRequest request,
|
protected DefaultGridData constructGridDataResponse(IDataRequest request,
|
||||||
PluginDataObject pdo, GridGeometry2D gridGeometry,
|
PluginDataObject pdo, GridGeometry2D gridGeometry,
|
||||||
DataSource dataSource) {
|
DataSource dataSource) {
|
||||||
|
@ -125,6 +127,7 @@ public class SatelliteGridFactory extends AbstractGridDataPluginFactory
|
||||||
* multiple factories will be building a base constraint map using the same
|
* multiple factories will be building a base constraint map using the same
|
||||||
* technique
|
* technique
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected Map<String, RequestConstraint> buildConstraintsFromRequest(
|
protected Map<String, RequestConstraint> buildConstraintsFromRequest(
|
||||||
IDataRequest request) {
|
IDataRequest request) {
|
||||||
Map<String, RequestConstraint> constraints = new HashMap<String, RequestConstraint>();
|
Map<String, RequestConstraint> constraints = new HashMap<String, RequestConstraint>();
|
||||||
|
|
|
@ -54,6 +54,7 @@ import com.vividsolutions.jts.geom.GeometryFactory;
|
||||||
* single request.
|
* single request.
|
||||||
* Mar 03, 2014 2673 bsteffen Add ability to query only ref times.
|
* Mar 03, 2014 2673 bsteffen Add ability to query only ref times.
|
||||||
* Jul 14, 2014 3184 njensen Overrode getAvailableLevels()
|
* Jul 14, 2014 3184 njensen Overrode getAvailableLevels()
|
||||||
|
* Jul 30, 2014 3184 njensen Added optional identifiers
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -77,7 +78,7 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory {
|
||||||
private static final String IHFS_DATABASE = "ihfs";
|
private static final String IHFS_DATABASE = "ihfs";
|
||||||
|
|
||||||
public HydroGeometryFactory() {
|
public HydroGeometryFactory() {
|
||||||
super(IHFS_DATABASE, REQUIRED);
|
super(IHFS_DATABASE, REQUIRED, new String[] { COL_NAME_OPTION });
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -152,8 +153,7 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory {
|
||||||
* com.raytheon.uf.common.time.BinOffset)
|
* com.raytheon.uf.common.time.BinOffset)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String assembleGetTimes(IDataRequest request,
|
protected String assembleGetTimes(IDataRequest request, BinOffset binOffset) {
|
||||||
BinOffset binOffset) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,8 +166,7 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory {
|
||||||
* com.raytheon.uf.common.time.DataTime[])
|
* com.raytheon.uf.common.time.DataTime[])
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String assembleGetData(IDataRequest request,
|
protected String assembleGetData(IDataRequest request, DataTime... times) {
|
||||||
DataTime... times) {
|
|
||||||
return HydroQueryAssembler.assembleGetData(request, times);
|
return HydroQueryAssembler.assembleGetData(request, times);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,8 +179,7 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory {
|
||||||
* com.raytheon.uf.common.time.TimeRange)
|
* com.raytheon.uf.common.time.TimeRange)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String assembleGetData(IDataRequest request,
|
protected String assembleGetData(IDataRequest request, TimeRange timeRange) {
|
||||||
TimeRange timeRange) {
|
|
||||||
return HydroQueryAssembler.assembleGetData(request, timeRange);
|
return HydroQueryAssembler.assembleGetData(request, timeRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,4 +201,5 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory {
|
||||||
throw new IncompatibleRequestException(request.getDatatype()
|
throw new IncompatibleRequestException(request.getDatatype()
|
||||||
+ " data does not support the concept of levels");
|
+ " data does not support the concept of levels");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
|
@ -2,10 +2,10 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Data Access Framework EDEX
|
Bundle-Name: Data Access Framework EDEX
|
||||||
Bundle-SymbolicName: com.raytheon.uf.edex.dataaccess
|
Bundle-SymbolicName: com.raytheon.uf.edex.dataaccess
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.14.0.qualifier
|
||||||
Bundle-Vendor: RAYTHEON
|
Bundle-Vendor: RAYTHEON
|
||||||
Require-Bundle: com.raytheon.uf.common.dataaccess,
|
Require-Bundle: com.raytheon.uf.common.dataaccess,
|
||||||
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174",
|
com.raytheon.uf.common.serialization.comm,
|
||||||
com.raytheon.uf.common.util;bundle-version="1.12.1174"
|
com.raytheon.uf.common.util
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
|
|
|
@ -43,12 +43,12 @@
|
||||||
<constructor-arg ref="requiredIdentifiersHandler" />
|
<constructor-arg ref="requiredIdentifiersHandler" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="validIdentifiersHandler"
|
<bean id="optionalIdentifiersHandler"
|
||||||
class="com.raytheon.uf.edex.dataaccess.handler.GetValidIdentifiersHandler" />
|
class="com.raytheon.uf.edex.dataaccess.handler.GetOptionalIdentifiersHandler" />
|
||||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||||
<constructor-arg
|
<constructor-arg
|
||||||
value="com.raytheon.uf.common.dataaccess.request.GetValidIdentifiersRequest" />
|
value="com.raytheon.uf.common.dataaccess.request.GetOptionalIdentifiersRequest" />
|
||||||
<constructor-arg ref="validIdentifiersHandler" />
|
<constructor-arg ref="optionalIdentifiersHandler" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="supportedDatatypesHandler"
|
<bean id="supportedDatatypesHandler"
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
package com.raytheon.uf.edex.dataaccess.handler;
|
package com.raytheon.uf.edex.dataaccess.handler;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataaccess.DataAccessLayer;
|
import com.raytheon.uf.common.dataaccess.DataAccessLayer;
|
||||||
import com.raytheon.uf.common.dataaccess.request.GetValidIdentifiersRequest;
|
import com.raytheon.uf.common.dataaccess.request.GetOptionalIdentifiersRequest;
|
||||||
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request handler for <code>GetValidIdentifiersRequest</code>.
|
* Request handler for <code>GetOptionalIdentifiersRequest</code>.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
|
@ -33,6 +33,7 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jul 23, 2014 3185 njensen Initial creation
|
* Jul 23, 2014 3185 njensen Initial creation
|
||||||
|
* Jul 30, 2014 3185 njensen Renamed valid to optional
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -40,13 +41,13 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetValidIdentifiersHandler implements
|
public class GetOptionalIdentifiersHandler implements
|
||||||
IRequestHandler<GetValidIdentifiersRequest> {
|
IRequestHandler<GetOptionalIdentifiersRequest> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] handleRequest(GetValidIdentifiersRequest request)
|
public String[] handleRequest(GetOptionalIdentifiersRequest request)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
return DataAccessLayer.getValidIdentifiers(request.getDatatype());
|
return DataAccessLayer.getOptionalIdentifiers(request.getDatatype());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -35,6 +35,7 @@
|
||||||
# 03/03/14 2673 bsteffen Add ability to query only ref times.
|
# 03/03/14 2673 bsteffen Add ability to query only ref times.
|
||||||
# 07/22/14 3185 njensen Added optional/default args to newDataRequest
|
# 07/22/14 3185 njensen Added optional/default args to newDataRequest
|
||||||
# and added new methods
|
# and added new methods
|
||||||
|
# 07/30/14 3185 njensen Renamed valid identifiers to optional
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -110,8 +111,8 @@ def getRequiredIdentifiers(datatype):
|
||||||
jids = JavaDataAccessLayer.getRequiredIdentifiers(datatype)
|
jids = JavaDataAccessLayer.getRequiredIdentifiers(datatype)
|
||||||
return JUtil.javaObjToPyVal(jids)
|
return JUtil.javaObjToPyVal(jids)
|
||||||
|
|
||||||
def getValidIdentifiers(datatype):
|
def getOptionalIdentifiers(datatype):
|
||||||
jids = JavaDataAccessLayer.getValidIdentifiers(datatype)
|
jids = JavaDataAccessLayer.getOptionalIdentifiers(datatype)
|
||||||
return JUtil.javaObjToPyVal(jids)
|
return JUtil.javaObjToPyVal(jids)
|
||||||
|
|
||||||
def newDataRequest(datatype, parameters=[], levels=[], locationNames = [], envelope=None, **kwargs):
|
def newDataRequest(datatype, parameters=[], levels=[], locationNames = [], envelope=None, **kwargs):
|
||||||
|
|
|
@ -27,13 +27,14 @@
|
||||||
# Date Ticket# Engineer Description
|
# Date Ticket# Engineer Description
|
||||||
# ------------ ---------- ----------- --------------------------
|
# ------------ ---------- ----------- --------------------------
|
||||||
# 07/23/14 #3185 njensen Initial Creation.
|
# 07/23/14 #3185 njensen Initial Creation.
|
||||||
|
# 07/30/14 #3185 njensen Renamed valid to optional
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import AbstractIdentifierRequest
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import AbstractIdentifierRequest
|
||||||
|
|
||||||
class GetValidIdentifiersRequest(AbstractIdentifierRequest):
|
class GetOptionalIdentifiersRequest(AbstractIdentifierRequest):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(GetValidIdentifiersRequest, self).__init__()
|
super(GetOptionalIdentifiersRequest, self).__init__()
|
||||||
|
|
|
@ -31,7 +31,7 @@ __all__ = [
|
||||||
'GetGridDataRequest',
|
'GetGridDataRequest',
|
||||||
'GetRequiredIdentifiersRequest',
|
'GetRequiredIdentifiersRequest',
|
||||||
'GetSupportedDatatypesRequest',
|
'GetSupportedDatatypesRequest',
|
||||||
'GetValidIdentifiersRequest'
|
'GetOptionalIdentifiersRequest'
|
||||||
]
|
]
|
||||||
|
|
||||||
from AbstractDataAccessRequest import AbstractDataAccessRequest
|
from AbstractDataAccessRequest import AbstractDataAccessRequest
|
||||||
|
@ -44,5 +44,5 @@ from GetGeometryDataRequest import GetGeometryDataRequest
|
||||||
from GetGridDataRequest import GetGridDataRequest
|
from GetGridDataRequest import GetGridDataRequest
|
||||||
from GetRequiredIdentifiersRequest import GetRequiredIdentifiersRequest
|
from GetRequiredIdentifiersRequest import GetRequiredIdentifiersRequest
|
||||||
from GetSupportedDatatypesRequest import GetSupportedDatatypesRequest
|
from GetSupportedDatatypesRequest import GetSupportedDatatypesRequest
|
||||||
from GetValidIdentifiersRequest import GetValidIdentifiersRequest
|
from GetOptionalIdentifiersRequest import GetOptionalIdentifiersRequest
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
# 05/29/13 2023 dgilling Hook up ThriftClientRouter.
|
# 05/29/13 2023 dgilling Hook up ThriftClientRouter.
|
||||||
# 03/03/14 2673 bsteffen Add ability to query only ref times.
|
# 03/03/14 2673 bsteffen Add ability to query only ref times.
|
||||||
# 07/22/14 3185 njensen Added optional/default args to newDataRequest
|
# 07/22/14 3185 njensen Added optional/default args to newDataRequest
|
||||||
|
# 07/30/14 3185 njensen Renamed valid identifiers to optional
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -157,17 +158,17 @@ def getRequiredIdentifiers(datatype):
|
||||||
"""
|
"""
|
||||||
return router.getRequiredIdentifiers(datatype)
|
return router.getRequiredIdentifiers(datatype)
|
||||||
|
|
||||||
def getValidIdentifiers(datatype):
|
def getOptionalIdentifiers(datatype):
|
||||||
"""
|
"""
|
||||||
Gets the valid identifiers for this datatype.
|
Gets the optional identifiers for this datatype.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
datatype: the datatype to find valid identifiers for
|
datatype: the datatype to find optional identifiers for
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
a list of strings of valid identifiers
|
a list of strings of optional identifiers
|
||||||
"""
|
"""
|
||||||
return router.getValidIdentifiers(datatype)
|
return router.getOptionalIdentifiers(datatype)
|
||||||
|
|
||||||
def newDataRequest(datatype=None, **kwargs):
|
def newDataRequest(datatype=None, **kwargs):
|
||||||
""""
|
""""
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
# 03/03/14 #2673 bsteffen Add ability to query only ref times.
|
# 03/03/14 #2673 bsteffen Add ability to query only ref times.
|
||||||
# 07/22/14 #3185 njensen Added optional/default args to newDataRequest
|
# 07/22/14 #3185 njensen Added optional/default args to newDataRequest
|
||||||
# 07/23/14 #3185 njensen Added new methods
|
# 07/23/14 #3185 njensen Added new methods
|
||||||
|
# 07/30/14 #3185 njensen Renamed valid identifiers to optional
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import G
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetAvailableParametersRequest
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetAvailableParametersRequest
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetAvailableLevelsRequest
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetAvailableLevelsRequest
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetRequiredIdentifiersRequest
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetRequiredIdentifiersRequest
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetValidIdentifiersRequest
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetOptionalIdentifiersRequest
|
||||||
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetSupportedDatatypesRequest
|
from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetSupportedDatatypesRequest
|
||||||
|
|
||||||
from ufpy import ThriftClient
|
from ufpy import ThriftClient
|
||||||
|
@ -143,8 +144,8 @@ class ThriftClientRouter(object):
|
||||||
response = self._client.sendRequest(idReq)
|
response = self._client.sendRequest(idReq)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
def getValidIdentifiers(self, datatype):
|
def getOptionalIdentifiers(self, datatype):
|
||||||
idReq = GetValidIdentifiersRequest()
|
idReq = GetOptionalIdentifiersRequest()
|
||||||
idReq.setDatatype(datatype)
|
idReq.setDatatype(datatype)
|
||||||
response = self._client.sendRequest(idReq)
|
response = self._client.sendRequest(idReq)
|
||||||
return response
|
return response
|
||||||
|
|
Loading…
Add table
Reference in a new issue