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 cd76162782..4795449cd1 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 @@ -19,6 +19,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetAvailableLevelsHandler.java b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetAvailableLevelsHandler.java new file mode 100644 index 0000000000..1ea3cc75bc --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetAvailableLevelsHandler.java @@ -0,0 +1,54 @@ +/** + * 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.edex.dataaccess.handler; + +import com.raytheon.uf.common.dataaccess.DataAccessLayer; +import com.raytheon.uf.common.dataaccess.request.GetAvailableLevelsRequest; +import com.raytheon.uf.common.dataplugin.level.Level; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; + +/** + * Request handler for GetAvailableLevelsRequest. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 23, 2014 3185       njensen     Initial creation
+ * 
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class GetAvailableLevelsHandler implements + IRequestHandler { + + @Override + public Level[] handleRequest(GetAvailableLevelsRequest request) + throws Exception { + return DataAccessLayer.getAvailableLevels(request + .getRequestParameters()); + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetAvailableParametersHandler.java b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetAvailableParametersHandler.java new file mode 100644 index 0000000000..03a435d545 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetAvailableParametersHandler.java @@ -0,0 +1,53 @@ +/** + * 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.edex.dataaccess.handler; + +import com.raytheon.uf.common.dataaccess.DataAccessLayer; +import com.raytheon.uf.common.dataaccess.request.GetAvailableParametersRequest; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; + +/** + * Request handler for GetAvailableParametersRequest. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 23, 2014 3185       njensen     Initial creation
+ * 
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class GetAvailableParametersHandler implements + IRequestHandler { + + @Override + public String[] handleRequest(GetAvailableParametersRequest request) + throws Exception { + return DataAccessLayer.getAvailableParameters(request + .getRequestParameters()); + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetRequiredIdentifiersHandler.java b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetRequiredIdentifiersHandler.java new file mode 100644 index 0000000000..fb136fe7bc --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetRequiredIdentifiersHandler.java @@ -0,0 +1,52 @@ +/** + * 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.edex.dataaccess.handler; + +import com.raytheon.uf.common.dataaccess.DataAccessLayer; +import com.raytheon.uf.common.dataaccess.request.GetRequiredIdentifiersRequest; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; + +/** + * Request handler for GetRequiredIdentifiersRequest. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 23, 2014 3185       njensen     Initial creation
+ * 
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class GetRequiredIdentifiersHandler implements + IRequestHandler { + + @Override + public String[] handleRequest(GetRequiredIdentifiersRequest request) + throws Exception { + return DataAccessLayer.getRequiredIdentifiers(request.getDatatype()); + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetSupportedDatatypesHandler.java b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetSupportedDatatypesHandler.java new file mode 100644 index 0000000000..23851555ba --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetSupportedDatatypesHandler.java @@ -0,0 +1,52 @@ +/** + * 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.edex.dataaccess.handler; + +import com.raytheon.uf.common.dataaccess.DataAccessLayer; +import com.raytheon.uf.common.dataaccess.request.GetSupportedDatatypesRequest; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; + +/** + * Request handler for GetSupportedDatatypesRequest. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 23, 2014 3185       njensen     Initial creation
+ * 
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class GetSupportedDatatypesHandler implements + IRequestHandler { + + @Override + public String[] handleRequest(GetSupportedDatatypesRequest request) + throws Exception { + return DataAccessLayer.getSupportedDatatypes(); + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetValidIdentifiersHandler.java b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetValidIdentifiersHandler.java new file mode 100644 index 0000000000..20fbb91ac0 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/src/com/raytheon/uf/edex/dataaccess/handler/GetValidIdentifiersHandler.java @@ -0,0 +1,52 @@ +/** + * 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.edex.dataaccess.handler; + +import com.raytheon.uf.common.dataaccess.DataAccessLayer; +import com.raytheon.uf.common.dataaccess.request.GetValidIdentifiersRequest; +import com.raytheon.uf.common.serialization.comm.IRequestHandler; + +/** + * Request handler for GetValidIdentifiersRequest. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Jul 23, 2014 3185       njensen     Initial creation
+ * 
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class GetValidIdentifiersHandler implements + IRequestHandler { + + @Override + public String[] handleRequest(GetValidIdentifiersRequest request) + throws Exception { + return DataAccessLayer.getValidIdentifiers(request.getDatatype()); + } + +} diff --git a/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JDataRequest.py b/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JDataRequest.py index 733a102857..73cd6d514f 100644 --- a/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JDataRequest.py +++ b/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JDataRequest.py @@ -102,6 +102,7 @@ class JDataRequest(IDataRequest, JUtil.JavaWrapperClass): env = None jenv = self.jobj.getEnvelope() if jenv: + import shapely from com.vividsolutions.jts.geom import GeometryFactory env = shapely.wkt.loads(GeometryFactory().toGeometry(jenv).toText()) return env diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/AbstractIdentifierRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/AbstractIdentifierRequest.py new file mode 100644 index 0000000000..75e9129386 --- /dev/null +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/AbstractIdentifierRequest.py @@ -0,0 +1,45 @@ +## +# 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. +## + +# File auto-generated against equivalent DynamicSerialize Java class +# and then modified post-generation to make it a abstract base class. +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 07/23/14 #3185 njensen Initial Creation. +# +# + +import abc + +class AbstractIdentifierRequest(object): + __metaclass__ = abc.ABCMeta + + def __init__(self): + self.datatype = None + + def getDatatype(self): + return self.datatype + + def setDatatype(self, datatype): + self.datatype = datatype + diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetAvailableLevelsRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetAvailableLevelsRequest.py new file mode 100644 index 0000000000..3cbb7afde5 --- /dev/null +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetAvailableLevelsRequest.py @@ -0,0 +1,38 @@ +## +# 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. +## + +# File auto-generated against equivalent DynamicSerialize Java class +# and then modified post-generation to make it sub class +# AbstractDataAccessRequest. +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 07/23/14 #3185 njensen Initial Creation. +# +# + +from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import AbstractDataAccessRequest + +class GetAvailableLevelsRequest(AbstractDataAccessRequest): + + def __init__(self): + super(GetAvailableLevelsRequest, self).__init__() diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetAvailableParametersRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetAvailableParametersRequest.py new file mode 100644 index 0000000000..94dd439027 --- /dev/null +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetAvailableParametersRequest.py @@ -0,0 +1,38 @@ +## +# 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. +## + +# File auto-generated against equivalent DynamicSerialize Java class +# and then modified post-generation to make it sub class +# AbstractDataAccessRequest. +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 07/23/14 #3185 njensen Initial Creation. +# +# + +from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import AbstractDataAccessRequest + +class GetAvailableParametersRequest(AbstractDataAccessRequest): + + def __init__(self): + super(GetAvailableParametersRequest, self).__init__() diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetRequiredIdentifiersRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetRequiredIdentifiersRequest.py new file mode 100644 index 0000000000..0f4264f8a9 --- /dev/null +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetRequiredIdentifiersRequest.py @@ -0,0 +1,38 @@ +## +# 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. +## + +# File auto-generated against equivalent DynamicSerialize Java class +# and then modified post-generation to make it sub class +# AbstractIdentifierRequest. +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 07/23/14 #3185 njensen Initial Creation. +# +# + +from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import AbstractIdentifierRequest + +class GetRequiredIdentifiersRequest(AbstractIdentifierRequest): + + def __init__(self): + super(GetRequiredIdentifiersRequest, self).__init__() diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetSupportedDatatypesRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetSupportedDatatypesRequest.py new file mode 100644 index 0000000000..0309e61e2f --- /dev/null +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetSupportedDatatypesRequest.py @@ -0,0 +1,36 @@ +## +# 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. +## + +# File auto-generated against equivalent DynamicSerialize Java class +# and then modified to do nothing on __init__. +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 07/23/14 #3185 njensen Initial Creation. +# +# + +class GetSupportedDatatypesRequest(object): + + def __init__(self): + pass + diff --git a/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetValidIdentifiersRequest.py b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetValidIdentifiersRequest.py new file mode 100644 index 0000000000..1fb7fe7ee6 --- /dev/null +++ b/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataaccess/request/GetValidIdentifiersRequest.py @@ -0,0 +1,39 @@ +## +# 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. +## + +# File auto-generated against equivalent DynamicSerialize Java class +# and then modified post-generation to make it sub class +# AbstractIdentifierRequest. +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 07/23/14 #3185 njensen Initial Creation. +# +# + +from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import AbstractIdentifierRequest + +class GetValidIdentifiersRequest(AbstractIdentifierRequest): + + def __init__(self): + super(GetValidIdentifiersRequest, 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 6369b05b14..de272f84c6 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 @@ -22,15 +22,27 @@ __all__ = [ 'AbstractDataAccessRequest', + 'AbstractIdentifierRequest', + 'GetAvailableLevelsRequest', 'GetAvailableLocationNamesRequest', + 'GetAvailableParametersRequest', 'GetAvailableTimesRequest', 'GetGeometryDataRequest', - 'GetGridDataRequest' + 'GetGridDataRequest', + 'GetRequiredIdentifiersRequest', + 'GetSupportedDatatypesRequest', + 'GetValidIdentifiersRequest' ] from AbstractDataAccessRequest import AbstractDataAccessRequest +from AbstractIdentifierRequest import AbstractIdentifierRequest +from GetAvailableLevelsRequest import GetAvailableLevelsRequest from GetAvailableLocationNamesRequest import GetAvailableLocationNamesRequest +from GetAvailableParametersRequest import GetAvailableParametersRequest from GetAvailableTimesRequest import GetAvailableTimesRequest from GetGeometryDataRequest import GetGeometryDataRequest from GetGridDataRequest import GetGridDataRequest +from GetRequiredIdentifiersRequest import GetRequiredIdentifiersRequest +from GetSupportedDatatypesRequest import GetSupportedDatatypesRequest +from GetValidIdentifiersRequest import GetValidIdentifiersRequest diff --git a/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py b/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py index 3c0b24d188..42f2234acb 100644 --- a/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py +++ b/pythonPackages/ufpy/dataaccess/ThriftClientRouter.py @@ -30,7 +30,8 @@ # 05/21/13 #2023 dgilling Initial Creation. # 01/06/14 #2537 bsteffen Share geometry WKT. # 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 # @@ -42,6 +43,11 @@ from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import G from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetAvailableTimesRequest from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetGeometryDataRequest from dynamicserialize.dstypes.com.raytheon.uf.common.dataaccess.request import GetGridDataRequest +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 GetSupportedDatatypesRequest from ufpy import ThriftClient from ufpy.dataaccess import PyGeometryData @@ -120,20 +126,28 @@ class ThriftClientRouter(object): return response def getAvailableParameters(self, request): - # TODO - raise Exception('Not implemented yet') + paramReq = GetAvailableParametersRequest() + paramReq.setRequestParameters(request) + response = self._client.sendRequest(paramReq) + return response def getAvailableLevels(self, request): - # TODO - raise Exception('Not implemented yet') + levelReq = GetAvailableLevelsRequest() + levelReq.setRequestParameters(request) + response = self._client.sendRequest(levelReq) + return response def getRequiredIdentifiers(self, datatype): - # TODO - raise Exception('Not implemented yet') + idReq = GetRequiredIdentifiersRequest() + idReq.setDatatype(datatype) + response = self._client.sendRequest(idReq) + return response def getValidIdentifiers(self, datatype): - # TODO - raise Exception('Not implemented yet') + idReq = GetValidIdentifiersRequest() + idReq.setDatatype(datatype) + response = self._client.sendRequest(idReq) + return response def newDataRequest(self, datatype, parameters=[], levels=[], locationNames = [], envelope=None, **kwargs): req = DefaultDataRequest() @@ -152,6 +166,6 @@ class ThriftClientRouter(object): req.identifiers = kwargs return req - def getSupportedDatatypes(self): - # TODO - raise Exception('Not implemented yet') + def getSupportedDatatypes(self): + response = self._client.sendRequest(GetSupportedDatatypesRequest()) + return response