/**
  * Check if result times should be added
  *
  * @param request GetDataAvailability request
  * @return <code>true</code>, if result times should be added
  */
 private boolean isIncludeResultTime(GetDataAvailabilityRequest request) {
   if (request.isSetExtensions()) {
     return request.getExtensions().isBooleanExtensionSet(INCLUDE_RESULT_TIMES)
         || hasPhenomenonTimeFilter(request.getExtensions());
   }
   return false;
 }
 /**
  * Get the result times for the timeseries
  *
  * @param seriesObservationDAO DAO
  * @param series time series
  * @param request GetDataAvailability request
  * @param session Hibernate session
  * @return List of result times
  * @throws OwsExceptionReport if the requested temporal filter is not supported
  */
 private List<TimeInstant> getResultTimesFromSeriesObservation(
     AbstractSeriesObservationDAO seriesObservationDAO,
     Series series,
     GetDataAvailabilityRequest request,
     Session session)
     throws OwsExceptionReport {
   Criterion filter = null;
   if (hasPhenomenonTimeFilter(request.getExtensions())) {
     filter = TemporalRestrictions.filter(getPhenomenonTimeFilter(request.getExtensions()));
   }
   List<Date> dateTimes =
       seriesObservationDAO.getResultTimesForSeriesObservation(
           series, request.getOfferings(), filter, session);
   List<TimeInstant> resultTimes = Lists.newArrayList();
   for (Date date : dateTimes) {
     resultTimes.add(new TimeInstant(date));
   }
   return resultTimes;
 }
 /**
  * Check if optional count should be added
  *
  * @param request GetDataAvailability request
  * @return <code>true</code>, if optional count should be added
  */
 private boolean isShowCount(GetDataAvailabilityRequest request) {
   if (request.isSetExtensions()) {
     return request.getExtensions().isBooleanExtensionSet(SHOW_COUNT);
   }
   return isForceValueCount();
 }