awips2/edexOsgi/com.raytheon.uf.edex.dataaccess/utility/common_static/base/python/dataaccess/JData.py
Nate Jensen 2d6737f52c Issue #2032 move build.edex's common-static files to appropriate plugins
Change-Id: I15fa37459c34dd40b253a97b99d62c5fc8ff4d15

Former-commit-id: 87bfe94322 [formerly 188d76ea71] [formerly 5264d3a5b8] [formerly 87bfe94322 [formerly 188d76ea71] [formerly 5264d3a5b8] [formerly b767760a9c [formerly 5264d3a5b8 [formerly e2feb9de0c2d7e1d7fb5dac1b0878aabe79f9ab2]]]]
Former-commit-id: b767760a9c
Former-commit-id: 0509e362b9 [formerly 93713d9698] [formerly 85f35fc0d31289c55393eeee4cf0917b4eabadb0 [formerly c77936c6c0]]
Former-commit-id: 0d2fa08b78da80bd2050c50580bfb6d7564771fc [formerly 175a28da9a]
Former-commit-id: 06502f57ef
2013-07-18 09:53:53 -05:00

66 lines
1.9 KiB
Python

##
# 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.
##
#
# Implements IData and wraps around a Java IData
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 12/10/12 njensen Initial Creation.
# 06/03/13 #2023 dgilling Implement getAttributes().
#
#
from ufpy.dataaccess import IData
import JUtil, DataTime
class JData(IData, JUtil.JavaWrapperClass):
def __init__(self, wrappedObject):
self.jobj = wrappedObject
def getAttribute(self, key):
return self.jobj.getAttribute(key)
def getAttributes(self):
attributes = []
jattribs = self.jobj.getAttributes()
itr = jattribs.iterator()
while itr.hasNext():
attributes.append(str(itr.next()))
return attributes
def getDataTime(self):
return DataTime.DataTime(self.jobj.getDataTime())
def getLevel(self):
return str(self.jobj.getLevel())
def getLocationName(self):
return self.jobj.getLocationName()
def toJavaObj(self):
return self.jobj