mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-24 06:57:56 -05:00
40 lines
952 B
Python
40 lines
952 B
Python
##
|
|
##
|
|
|
|
#
|
|
# 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):
|
|
return list(self.__attributes.keys())
|
|
|
|
def getDataTime(self):
|
|
return self.__time
|
|
|
|
def getLevel(self):
|
|
return self.__level
|
|
|
|
def getLocationName(self):
|
|
return self.__locationName
|