Package slash.navigation.googlemaps.elevation

Examples of slash.navigation.googlemaps.elevation.ElevationResponse$Result$Location


   
   
    new ValidateSubscriptionListener().validateNotification(body);
     
    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    dr.getResult().add(res);
    return dr;
  }
View Full Code Here


      log.error(e.getMessage(),e);
      throw new DispositionReportFaultMessage(e.getMessage(), null);
    }

    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    dr.getResult().add(res);

    return dr;
  }
View Full Code Here

            keyResultArr = new Result[resultList.size()];
            resultList.toArray(keyResultArr);
           
            log.debug("After deleting Business. Obtained vector size:" + keyResultArr != null ? keyResultArr.length : 0);
            for (int i = 0; keyResultArr != null && i < keyResultArr.length; i++) {
                Result result = (Result) keyResultArr[i];
                int errno = result.getErrno();
                if (errno == 0) {
                    coll.addAll(keys);
                }
                else {
                    ErrInfo errinfo = result.getErrInfo();
                    DeleteException de = new DeleteException(errinfo.getErrCode() + ":" + errinfo.getValue());
                    bulk.setStatus(JAXRResponse.STATUS_FAILURE);
                    exceptions.add(de);
                }
            }
View Full Code Here

    } catch (Exception e) {
      e.printStackTrace();
    }
     
    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    dr.getResult().add(res);
    return dr;
  }
View Full Code Here

    return ResourceConfig.getGlobalMessage(errCode);
  }   

  public static final DispositionReport buildDispositionReport(int errNo) {
    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    res.setErrno(errNo);
   
    ErrInfo ei = new ErrInfo();
    ei.setErrCode(lookupErrCode(errNo));
    ei.setValue(lookupErrText(errNo));
   
    res.setErrInfo(ei);
   
    dr.getResult().add(res);
       
    return dr;
  }
View Full Code Here

      log.error(e.getMessage(),e);
      throw new DispositionReportFaultMessage(e.getMessage(), null);
    }
   
    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    dr.getResult().add(res);
   
    return dr;
  }
View Full Code Here

   
   
    new ValidateSubscriptionListener().validateNotification(body);
     
    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    dr.getResult().add(res);
    return dr;
  }
View Full Code Here

    } catch (Exception e) {
      e.printStackTrace();
    }
     
    DispositionReport dr = new DispositionReport();
    Result res = new Result();
    dr.getResult().add(res);
    return dr;
  }
View Full Code Here

    private static Unmarshaller newUnmarshallerGeocode() {
        return JAXBHelper.newUnmarshaller(newContext(slash.navigation.googlemaps.geocode.ObjectFactory.class));
    }

    private static ElevationResponse unmarshalElevation(StringReader reader) throws JAXBException {
        ElevationResponse result = null;
        try {
            result = (ElevationResponse) newUnmarshallerElevation().unmarshal(reader);
        } catch (ClassCastException e) {
            throw new JAXBException("Parse error: " + e, e);
        } finally {
View Full Code Here

        String url = getElevationUrl("locations=" + latitude + "," + longitude); // TODO could be up to 512 locations
        Get get = get(url);
        String result = get.executeAsString();
        if (get.isSuccessful())
            try {
                ElevationResponse elevationResponse = unmarshalElevation(result);
                if (elevationResponse != null) {
                    String status = elevationResponse.getStatus();
                    if (status.equals(OK)) {
                        List<Double> elevations = extractElevations(elevationResponse.getResult());
                        return elevations != null && elevations.size() > 0 ? elevations.get(0) : null;
                    }
                    if (status.equals(OVER_QUERY_LIMIT))
                        throw new ServiceUnavailableException("maps.googleapis.com", url);
                }
View Full Code Here

TOP

Related Classes of slash.navigation.googlemaps.elevation.ElevationResponse$Result$Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.