示例#1
0
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
示例#2
0
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
示例#3
0
def getAvailableTimes(request, refTimeOnly):
    javaTimes = JavaDataAccessLayer.getAvailableTimes(request.toJavaObj(),
                                                      refTimeOnly)
    times = []
    for jt in javaTimes:
        times.append(DataTime.DataTime(jt))
    return times
示例#4
0
def getAvailableParameters(request):
    jparams = JavaDataAccessLayer.getAvailableParameters(request.toJavaObj())
    return JUtil.javaObjToPyVal(jparams)
示例#5
0
def getAvailableLocationNames(request):
    jlocs = JavaDataAccessLayer.getAvailableLocationNames(request.toJavaObj()) 
    return JUtil.javaObjToPyVal(jlocs)
示例#6
0
def getSupportedDatatypes():
    jsupported = JavaDataAccessLayer.getSupportedDatatypes()
    return JUtil.javaObjToPyVal(jsupported)
示例#7
0
def getOptionalIdentifiers(datatype):
    jids = JavaDataAccessLayer.getOptionalIdentifiers(datatype)
    return JUtil.javaObjToPyVal(jids)
示例#8
0
def getRequiredIdentifiers(datatype):
    jids = JavaDataAccessLayer.getRequiredIdentifiers(datatype)
    return JUtil.javaObjToPyVal(jids)
示例#9
0
def getAvailableLevels(request):
    jlevels = JavaDataAccessLayer.getAvailableLevels(request.toJavaObj())
    pylevs = []
    for jlev in jlevels:
        pylevs.append(str(jlev))
    return pylevs
示例#10
0
def getIdentifierValues(request, identifierKey):
    jvals = JavaDataAccessLayer.getIdentifierValues(request.toJavaObj(), identifierKey)
    return JUtil.javaObjToPyVal(jvals)
示例#11
0
def getOptionalIdentifiers(request):
    if str(request) == request:
        # Handle old version getOptionalIdentifiers(str)
        request = newDataRequest(request)
    jids = JavaDataAccessLayer.getOptionalIdentifiers(request.toJavaObj())
    return JUtil.javaObjToPyVal(jids)
示例#12
0
def getAvailableTimes(request):
    javaTimes = JavaDataAccessLayer.getAvailableTimes(request.toJavaObj())
    times = []
    for jt in javaTimes:
        times.append(DataTime.DataTime(jt))
    return times
示例#13
0
def getAvailableLocationNames(request):
    return JavaDataAccessLayer.getAvailableLocationNames(request.toJavaObj())