def getGeometryData(request, times): if type(times) is list: # presuming list of DataTimes jtimes = jep.jarray(len(times), JavaDataTime) for i in xrange(len(times)): jtimes[i] = times[i].toJavaObj() javaData = JavaDataAccessLayer.getGeometryData(request.toJavaObj(), jtimes) else: # presuming TimeRange javaData = JavaDataAccessLayer.getGeometryData(request.toJavaObj(), times.toJavaObj()) data = [] for jd in javaData: data.append(JGeometryData.JGeometryData(jd)) return data
def getAvailableTimes(request, refTimeOnly): javaTimes = JavaDataAccessLayer.getAvailableTimes(request.toJavaObj(), refTimeOnly) times = [] for jt in javaTimes: times.append(DataTime.DataTime(jt)) return times
def getAvailableParameters(request): jparams = JavaDataAccessLayer.getAvailableParameters(request.toJavaObj()) return JUtil.javaObjToPyVal(jparams)
def getAvailableLocationNames(request): jlocs = JavaDataAccessLayer.getAvailableLocationNames(request.toJavaObj()) return JUtil.javaObjToPyVal(jlocs)
def getSupportedDatatypes(): jsupported = JavaDataAccessLayer.getSupportedDatatypes() return JUtil.javaObjToPyVal(jsupported)
def getOptionalIdentifiers(datatype): jids = JavaDataAccessLayer.getOptionalIdentifiers(datatype) return JUtil.javaObjToPyVal(jids)
def getRequiredIdentifiers(datatype): jids = JavaDataAccessLayer.getRequiredIdentifiers(datatype) return JUtil.javaObjToPyVal(jids)
def getAvailableLevels(request): jlevels = JavaDataAccessLayer.getAvailableLevels(request.toJavaObj()) pylevs = [] for jlev in jlevels: pylevs.append(str(jlev)) return pylevs
def getIdentifierValues(request, identifierKey): jvals = JavaDataAccessLayer.getIdentifierValues(request.toJavaObj(), identifierKey) return JUtil.javaObjToPyVal(jvals)
def getOptionalIdentifiers(request): if str(request) == request: # Handle old version getOptionalIdentifiers(str) request = newDataRequest(request) jids = JavaDataAccessLayer.getOptionalIdentifiers(request.toJavaObj()) return JUtil.javaObjToPyVal(jids)
def getAvailableTimes(request): javaTimes = JavaDataAccessLayer.getAvailableTimes(request.toJavaObj()) times = [] for jt in javaTimes: times.append(DataTime.DataTime(jt)) return times
def getAvailableLocationNames(request): return JavaDataAccessLayer.getAvailableLocationNames(request.toJavaObj())