python-awips/awips/dataaccess/PyData.py

41 lines
952 B
Python
Raw Permalink Normal View History

2018-09-05 15:52:38 -06:00
##
##
#
# Implements IData for use by native Python clients to the Data Access
# Framework.
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 06/03/13 dgilling Initial Creation.
#
#
from awips.dataaccess import IData
class PyData(IData):
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]
def getAttributes(self):
2018-09-06 18:51:43 -06:00
return list(self.__attributes.keys())
2018-09-05 15:52:38 -06:00
def getDataTime(self):
return self.__time
def getLevel(self):
return self.__level
def getLocationName(self):
return self.__locationName