2015-06-12 11:57:06 -06:00
|
|
|
##
|
|
|
|
##
|
|
|
|
|
|
|
|
#
|
|
|
|
# Implements IData for use by native Python clients to the Data Access
|
|
|
|
# Framework.
|
2016-03-16 16:32:17 -05:00
|
|
|
#
|
|
|
|
#
|
2015-06-12 11:57:06 -06:00
|
|
|
# SOFTWARE HISTORY
|
2016-03-16 16:32:17 -05:00
|
|
|
#
|
2015-06-12 11:57:06 -06:00
|
|
|
# Date Ticket# Engineer Description
|
|
|
|
# ------------ ---------- ----------- --------------------------
|
|
|
|
# 06/03/13 dgilling Initial Creation.
|
2016-03-16 16:32:17 -05:00
|
|
|
#
|
2015-06-12 11:57:06 -06:00
|
|
|
#
|
|
|
|
|
2016-03-11 15:05:01 -07:00
|
|
|
from awips.dataaccess import IData
|
2015-06-12 11:57:06 -06:00
|
|
|
|
|
|
|
class PyData(IData):
|
2016-03-16 16:32:17 -05:00
|
|
|
|
2015-06-12 11:57:06 -06:00
|
|
|
def __init__(self, dataRecord):
|
|
|
|
self.__time = dataRecord.getTime()
|
|
|
|
self.__level = dataRecord.getLevel()
|
|
|
|
self.__locationName = dataRecord.getLocationName()
|
|
|
|
self.__attributes = dataRecord.getAttributes()
|
|
|
|
|
|
|
|
def getAttribute(self, key):
|
|
|
|
return self.__attributes[key]
|
2016-03-16 16:32:17 -05:00
|
|
|
|
2015-06-12 11:57:06 -06:00
|
|
|
def getAttributes(self):
|
2016-04-16 17:00:50 -06:00
|
|
|
return list(self.__attributes.keys())
|
2016-03-16 16:32:17 -05:00
|
|
|
|
2015-06-12 11:57:06 -06:00
|
|
|
def getDataTime(self):
|
|
|
|
return self.__time
|
2016-03-16 16:32:17 -05:00
|
|
|
|
2015-06-12 11:57:06 -06:00
|
|
|
def getLevel(self):
|
|
|
|
return self.__level
|
2016-03-16 16:32:17 -05:00
|
|
|
|
2015-06-12 11:57:06 -06:00
|
|
|
def getLocationName(self):
|
|
|
|
return self.__locationName
|