Class AttributeStatisticsAdminController

java.lang.Object
org.tailormap.api.controller.admin.AttributeStatisticsAdminController

@RestController public class AttributeStatisticsAdminController extends Object
  • Constructor Details

  • Method Details

    • handleException

      @ExceptionHandler(org.springframework.web.server.ResponseStatusException.class) public org.springframework.http.ResponseEntity<?> handleException(org.springframework.web.server.ResponseStatusException ex)
    • getStatistics

      @GetMapping(path="${tailormap-api.admin.base-path}/statistics/{featureTypeId}/{attributeName}", produces="application/json") public org.springframework.http.ResponseEntity<AttributeStatisticsResponse> getStatistics(@PathVariable Long featureTypeId, @PathVariable String attributeName, @RequestParam(required=false) String filter)
      Retrieve attribute statistics for a feature type.
      Parameters:
      featureTypeId - the feature type id for which to retrieve statistics
      attributeName - the name of the attribute
      filter - an optional CQL filter to apply to the features before calculating statistics
      Returns:
      @return the calculated statistics; fields may be null when not applicable or when no features match
      Throws:
      org.springframework.web.server.ResponseStatusException - if the feature type or attribute does not exist, or if a bad request was submitted