From 77d0661861374121d2182c52b1c4288ccbb2d083 Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Thu, 31 Jul 2014 09:45:01 -0500 Subject: [PATCH] Omaha #3184 renamed valid identifiers to optional Change-Id: I9653f9e00b3c693b46b516bc52ff029cd4fe1a81 Former-commit-id: 857179e08dd9a3a15bdf2e9ae2b80e7a7c9b5fc5 [formerly d0e68c2fa1cc531263622410e4364b87f222139f] Former-commit-id: 3c1ae47a760e694a73f9d796d13625891b3c7dde --- .../dataaccess/BinLightningAccessFactory.java | 19 ++++--------------- .../ffmp/dataaccess/FFMPGeometryFactory.java | 11 +++++++++++ .../gfe/dataaccess/GFEGridFactory.java | 12 +++++++----- .../dataaccess/GridDataAccessFactory.java | 4 ++-- .../radar/dataaccess/RadarGridFactory.java | 8 +++++++- .../dataaccess/SatelliteGridFactory.java | 9 ++++++--- .../dataaccess/HydroGeometryFactory.java | 13 ++++++------- .../.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 7 ------- .../META-INF/MANIFEST.MF | 8 ++++---- .../res/spring/dataaccess-request.xml | 8 ++++---- ...ava => GetOptionalIdentifiersHandler.java} | 13 +++++++------ .../base/python/dataaccess/JepRouter.py | 5 +++-- ...st.py => GetOptionalIdentifiersRequest.py} | 5 +++-- .../uf/common/dataaccess/request/__init__.py | 4 ++-- .../ufpy/dataaccess/DataAccessLayer.py | 11 ++++++----- .../ufpy/dataaccess/ThriftClientRouter.py | 7 ++++--- 17 files changed, 77 insertions(+), 69 deletions(-) delete mode 100644 edexOsgi/com.raytheon.uf.edex.dataaccess/.settings/org.eclipse.jdt.core.prefs rename edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/{GetValidIdentifiersHandler.java => GetOptionalIdentifiersHandler.java} (72%) rename pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/{GetValidIdentifiersRequest.py => GetOptionalIdentifiersRequest.py} (86%) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/dataaccess/BinLightningAccessFactory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/dataaccess/BinLightningAccessFactory.java index 5fdc6b1747..83ae3205d3 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/dataaccess/BinLightningAccessFactory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/dataaccess/BinLightningAccessFactory.java @@ -72,6 +72,7 @@ import com.vividsolutions.jts.geom.GeometryFactory; * Jan 21, 2014 2667 bclement Initial creation * Feb 06, 2014 2672 bsteffen Add envelope support * Jul 07, 2014 3333 bclement now uses lightning constants + * Jul 30, 2014 3184 njensen Removed getValidIdentifiers() * * * @@ -79,7 +80,7 @@ import com.vividsolutions.jts.geom.GeometryFactory; * @version 1.0 */ public class BinLightningAccessFactory extends AbstractDataPluginFactory { - + private static final String sourceKey = LightningConstants.SOURCE; private static final IUFStatusHandler log = UFStatus @@ -119,17 +120,6 @@ public class BinLightningAccessFactory extends AbstractDataPluginFactory { 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) * @@ -179,7 +169,6 @@ public class BinLightningAccessFactory extends AbstractDataPluginFactory { return rval.toArray(new IGeometryData[rval.size()]); } - /** * Add geometry data elements to dataList from data store * @@ -296,7 +285,7 @@ public class BinLightningAccessFactory extends AbstractDataPluginFactory { private Map> getSourceDatasets(IDataRequest request, List recList) { List includedDatasets = getIncludedDatasets(request); - + Map> rval = new HashMap>(); for (BinLightningRecord record : recList) { String src = record.getSource(); @@ -319,7 +308,7 @@ public class BinLightningAccessFactory extends AbstractDataPluginFactory { * @param request * @return */ - private List getIncludedDatasets(IDataRequest request){ + private List getIncludedDatasets(IDataRequest request) { String[] parameters = request.getParameters(); List rval = new ArrayList(parameters.length + requiredKeys.length); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/dataaccess/FFMPGeometryFactory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/dataaccess/FFMPGeometryFactory.java index b70ec75948..6b250e369f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/dataaccess/FFMPGeometryFactory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/dataaccess/FFMPGeometryFactory.java @@ -73,6 +73,7 @@ import com.vividsolutions.jts.geom.Geometry; * data request locationNames list is empty. * Jun 24, 2014 3170 mnash Get the accumulated time if multiple times are requested * Jul 14, 2014 3184 njensen Overrode getAvailableLevels() + * Jul 30, 2014 3184 njensen Overrode required and optional identifiers * * * @@ -363,4 +364,14 @@ public class FFMPGeometryFactory extends AbstractDataPluginFactory { throw new IncompatibleRequestException(request.getDatatype() + " 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 }; + } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/dataaccess/GFEGridFactory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/dataaccess/GFEGridFactory.java index 1ea678873c..dd707c4f56 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/dataaccess/GFEGridFactory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/dataaccess/GFEGridFactory.java @@ -73,6 +73,7 @@ import com.raytheon.uf.common.util.StringUtil; * Framework. * Oct 31, 2013 2508 randerso Change to use DiscreteGridSlice.getKeys() * Feb 04, 2014 2672 bsteffen Enable requesting subgrids. + * Jul 30, 2014 3184 njensen Renamed valid identifiers to optional * * * @@ -91,14 +92,15 @@ public class GFEGridFactory extends AbstractGridDataPluginFactory implements 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. - private static final String[] VALID_IDENTIFIERS = { MODEL_NAME, MODEL_TIME, - SITE_ID }; + private static final String[] OPTIONAL_IDENTIFIERS = { + GFEDataAccessUtil.MODEL_NAME, GFEDataAccessUtil.MODEL_TIME, + GFEDataAccessUtil.SITE_ID, MODEL_NAME, MODEL_TIME, SITE_ID }; @Override - public String[] getValidIdentifiers() { - return VALID_IDENTIFIERS; + public String[] getOptionalIdentifiers() { + return OPTIONAL_IDENTIFIERS; } @Override diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataaccess/GridDataAccessFactory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataaccess/GridDataAccessFactory.java index c6060fb40c..63236b8518 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataaccess/GridDataAccessFactory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.grid/src/com/raytheon/uf/common/dataplugin/grid/dataaccess/GridDataAccessFactory.java @@ -64,6 +64,7 @@ import com.raytheon.uf.common.util.mapping.Mapper; * Feb 14, 2013 1614 bsteffen Refactor data access framework to use * single request. * Feb 04, 2014 2672 bsteffen Enable requesting subgrids. + * Jul 30, 2014 3184 njensen Ranemd valid identifiers to optional * * * @@ -82,7 +83,7 @@ public class GridDataAccessFactory extends AbstractGridDataPluginFactory GridConstants.ENSEMBLE_ID, NAMESPACE }; @Override - public String[] getValidIdentifiers() { + public String[] getOptionalIdentifiers() { return VALID_IDENTIFIERS; } @@ -276,5 +277,4 @@ public class GridDataAccessFactory extends AbstractGridDataPluginFactory return getAvailableLocationNames(request, GridConstants.DATASET_ID); } - } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/dataaccess/RadarGridFactory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/dataaccess/RadarGridFactory.java index 471a33770d..00fcc88370 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/dataaccess/RadarGridFactory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/dataaccess/RadarGridFactory.java @@ -79,6 +79,7 @@ import com.vividsolutions.jts.geom.Envelope; * Feb 14, 2013 1614 bsteffen Refactor data access framework to use * single request. * Feb 04, 2014 2672 bsteffen Enable requesting icaos within envelope. + * Jul 30, 2014 3184 njensen Overrode optional identifiers * * * @@ -164,7 +165,7 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements * a record. * @return A unique location name */ - protected String generateLocationName(RadarRecord radarRecord){ + protected String generateLocationName(RadarRecord radarRecord) { StringBuilder locationName = new StringBuilder(32); locationName.append(radarRecord.getIcao()); locationName.append("_"); @@ -416,6 +417,11 @@ public class RadarGridFactory extends AbstractGridDataPluginFactory implements 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. diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/dataaccess/SatelliteGridFactory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/dataaccess/SatelliteGridFactory.java index a31a571250..0931a137ad 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/dataaccess/SatelliteGridFactory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/dataaccess/SatelliteGridFactory.java @@ -56,6 +56,7 @@ import com.raytheon.uf.common.numeric.source.DataSource; * Feb 14, 2013 1614 bsteffen Refactor data access framework to use * single request. * Feb 04, 2014 2672 bsteffen Enable requesting subgrids. + * Jul 30, 2014 3184 njensen Renamed valid identifiers to optional * * * @@ -69,7 +70,7 @@ public class SatelliteGridFactory extends AbstractGridDataPluginFactory 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 }; public SatelliteGridFactory() { @@ -77,10 +78,11 @@ public class SatelliteGridFactory extends AbstractGridDataPluginFactory } @Override - public String[] getValidIdentifiers() { - return VALID_IDENTIFIERS; + public String[] getOptionalIdentifiers() { + return OPTIONAL_IDENTIFIERS; } + @Override protected DefaultGridData constructGridDataResponse(IDataRequest request, PluginDataObject pdo, GridGeometry2D gridGeometry, DataSource dataSource) { @@ -125,6 +127,7 @@ public class SatelliteGridFactory extends AbstractGridDataPluginFactory * multiple factories will be building a base constraint map using the same * technique */ + @Override protected Map buildConstraintsFromRequest( IDataRequest request) { Map constraints = new HashMap(); diff --git a/edexOsgi/com.raytheon.uf.common.hydro/src/com/raytheon/uf/common/hydro/dataaccess/HydroGeometryFactory.java b/edexOsgi/com.raytheon.uf.common.hydro/src/com/raytheon/uf/common/hydro/dataaccess/HydroGeometryFactory.java index b67b6a5533..df5962ebd3 100644 --- a/edexOsgi/com.raytheon.uf.common.hydro/src/com/raytheon/uf/common/hydro/dataaccess/HydroGeometryFactory.java +++ b/edexOsgi/com.raytheon.uf.common.hydro/src/com/raytheon/uf/common/hydro/dataaccess/HydroGeometryFactory.java @@ -54,6 +54,7 @@ import com.vividsolutions.jts.geom.GeometryFactory; * single request. * Mar 03, 2014 2673 bsteffen Add ability to query only ref times. * Jul 14, 2014 3184 njensen Overrode getAvailableLevels() + * Jul 30, 2014 3184 njensen Added optional identifiers * * * @@ -77,7 +78,7 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory { private static final String IHFS_DATABASE = "ihfs"; 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) */ @Override - protected String assembleGetTimes(IDataRequest request, - BinOffset binOffset) { + protected String assembleGetTimes(IDataRequest request, BinOffset binOffset) { return null; } @@ -166,8 +166,7 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory { * com.raytheon.uf.common.time.DataTime[]) */ @Override - protected String assembleGetData(IDataRequest request, - DataTime... times) { + protected String assembleGetData(IDataRequest request, DataTime... times) { return HydroQueryAssembler.assembleGetData(request, times); } @@ -180,8 +179,7 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory { * com.raytheon.uf.common.time.TimeRange) */ @Override - protected String assembleGetData(IDataRequest request, - TimeRange timeRange) { + protected String assembleGetData(IDataRequest request, TimeRange timeRange) { return HydroQueryAssembler.assembleGetData(request, timeRange); } @@ -203,4 +201,5 @@ public class HydroGeometryFactory extends AbstractGeometryDatabaseFactory { throw new IncompatibleRequestException(request.getDatatype() + " data does not support the concept of levels"); } + } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/.classpath b/edexOsgi/com.raytheon.uf.edex.dataaccess/.classpath index ad32c83a78..1fa3e6803d 100644 --- a/edexOsgi/com.raytheon.uf.edex.dataaccess/.classpath +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/.classpath @@ -1,6 +1,6 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.edex.dataaccess/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index c537b63063..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.dataaccess/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -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 diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.dataaccess/META-INF/MANIFEST.MF index 1e70f1f2a5..b808019811 100644 --- a/edexOsgi/com.raytheon.uf.edex.dataaccess/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Data Access Framework EDEX Bundle-SymbolicName: com.raytheon.uf.edex.dataaccess -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.14.0.qualifier Bundle-Vendor: RAYTHEON Require-Bundle: com.raytheon.uf.common.dataaccess, - com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", - com.raytheon.uf.common.util;bundle-version="1.12.1174" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 + com.raytheon.uf.common.serialization.comm, + com.raytheon.uf.common.util +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/res/spring/dataaccess-request.xml b/edexOsgi/com.raytheon.uf.edex.dataaccess/res/spring/dataaccess-request.xml index 4795449cd1..ebf09bc2d8 100644 --- a/edexOsgi/com.raytheon.uf.edex.dataaccess/res/spring/dataaccess-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/res/spring/dataaccess-request.xml @@ -43,12 +43,12 @@ - + - + value="com.raytheon.uf.common.dataaccess.request.GetOptionalIdentifiersRequest" /> + GetValidIdentifiersRequest. + * Request handler for GetOptionalIdentifiersRequest. * *
  * 
@@ -33,6 +33,7 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler;
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Jul 23, 2014 3185       njensen     Initial creation
+ * Jul 30, 2014 3185       njensen     Renamed valid to optional
  * 
  * 
* @@ -40,13 +41,13 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler; * @version 1.0 */ -public class GetValidIdentifiersHandler implements - IRequestHandler { +public class GetOptionalIdentifiersHandler implements + IRequestHandler { @Override - public String[] handleRequest(GetValidIdentifiersRequest request) + public String[] handleRequest(GetOptionalIdentifiersRequest request) throws Exception { - return DataAccessLayer.getValidIdentifiers(request.getDatatype()); + return DataAccessLayer.getOptionalIdentifiers(request.getDatatype()); } } diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JepRouter.py b/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JepRouter.py index 729c96f265..beeedcc658 100644 --- a/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JepRouter.py +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JepRouter.py @@ -35,6 +35,7 @@ # 03/03/14 2673 bsteffen Add ability to query only ref times. # 07/22/14 3185 njensen Added optional/default args to newDataRequest # 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) return JUtil.javaObjToPyVal(jids) -def getValidIdentifiers(datatype): - jids = JavaDataAccessLayer.getValidIdentifiers(datatype) +def getOptionalIdentifiers(datatype): + jids = JavaDataAccessLayer.getOptionalIdentifiers(datatype) return JUtil.javaObjToPyVal(jids) def newDataRequest(datatype, parameters=[], levels=[], locationNames = [], envelope=None, **kwargs): diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetValidIdentifiersRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetOptionalIdentifiersRequest.py similarity index 86% rename from pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetValidIdentifiersRequest.py rename to pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetOptionalIdentifiersRequest.py index 1fb7fe7ee6..e303d7c75d 100644 --- a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetValidIdentifiersRequest.py +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetOptionalIdentifiersRequest.py @@ -27,13 +27,14 @@ # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 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 -class GetValidIdentifiersRequest(AbstractIdentifierRequest): +class GetOptionalIdentifiersRequest(AbstractIdentifierRequest): def __init__(self): - super(GetValidIdentifiersRequest, self).__init__() + super(GetOptionalIdentifiersRequest, self).__init__() diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/__init__.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/__init__.py index de272f84c6..92e531966a 100644 --- a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/__init__.py +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/__init__.py @@ -31,7 +31,7 @@ __all__ = [ 'GetGridDataRequest', 'GetRequiredIdentifiersRequest', 'GetSupportedDatatypesRequest', - 'GetValidIdentifiersRequest' + 'GetOptionalIdentifiersRequest' ] from AbstractDataAccessRequest import AbstractDataAccessRequest @@ -44,5 +44,5 @@ from GetGeometryDataRequest import GetGeometryDataRequest from GetGridDataRequest import GetGridDataRequest from GetRequiredIdentifiersRequest import GetRequiredIdentifiersRequest from GetSupportedDatatypesRequest import GetSupportedDatatypesRequest -from GetValidIdentifiersRequest import GetValidIdentifiersRequest +from GetOptionalIdentifiersRequest import GetOptionalIdentifiersRequest diff --git a/pythonPackages/ufpy/dataaccess/DataAccessLayer.py b/pythonPackages/ufpy/dataaccess/DataAccessLayer.py index edd75aaad2..1bda6fd02a 100644 --- a/pythonPackages/ufpy/dataaccess/DataAccessLayer.py +++ b/pythonPackages/ufpy/dataaccess/DataAccessLayer.py @@ -34,6 +34,7 @@ # 05/29/13 2023 dgilling Hook up ThriftClientRouter. # 03/03/14 2673 bsteffen Add ability to query only ref times. # 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) -def getValidIdentifiers(datatype): +def getOptionalIdentifiers(datatype): """ - Gets the valid identifiers for this datatype. + Gets the optional identifiers for this datatype. Args: - datatype: the datatype to find valid identifiers for + datatype: the datatype to find optional identifiers for 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): """" diff --git a/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py b/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py index 42f2234acb..6c96301604 100644 --- a/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py +++ b/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py @@ -32,6 +32,7 @@ # 03/03/14 #2673 bsteffen Add ability to query only ref times. # 07/22/14 #3185 njensen Added optional/default args to newDataRequest # 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 GetAvailableLevelsRequest 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 ufpy import ThriftClient @@ -143,8 +144,8 @@ class ThriftClientRouter(object): response = self._client.sendRequest(idReq) return response - def getValidIdentifiers(self, datatype): - idReq = GetValidIdentifiersRequest() + def getOptionalIdentifiers(self, datatype): + idReq = GetOptionalIdentifiersRequest() idReq.setDatatype(datatype) response = self._client.sendRequest(idReq) return response