Example #1
0
 @GET // OK
 @Path("/{sensorId}/measures/{measureId}")
 @Produces("application/json")
 public MeasureDTO getMeasureById(
     @PathParam("sensorId") String sensorId, @PathParam("measureId") String measureId) {
   return convertMeasuresToMeasuresDTO(
           mesDAO.findMeasureBySensorIdAndMeasureId(
               Long.parseLong(sensorId), Long.parseLong(measureId)))
       .get(0);
 }
Example #2
0
 @GET // OK
 @Path("/{sensorId}/measures")
 @Produces("application/json")
 public List<MeasureDTO> getMeasures(@PathParam("sensorId") String sensorId) {
   return convertMeasuresToMeasuresDTO(mesDAO.findMeasureBySensorId(Long.parseLong(sensorId)));
 }