Skip to content

Commit

Permalink
including format parameter in more resources
Browse files Browse the repository at this point in the history
so /share|ratio/groupBy/boundary can also return geojson
  • Loading branch information
kowatsch committed Jul 20, 2018
1 parent fe79a4d commit 97e984e
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ public RatioShareResponse getAreaShareGroupByBoundary(
required = false) String[] userids,
@ApiParam(hidden = true) @RequestParam(value = "time", defaultValue = "",
required = false) String[] time,
@ApiParam(hidden = true) @RequestParam(value = "format", defaultValue = "",
required = false) String format,
@ApiParam(hidden = true) @RequestParam(value = "showMetadata",
defaultValue = "false") String showMetadata,
@RequestParam(value = "keys2", defaultValue = "", required = false) String[] keys2,
Expand All @@ -391,8 +393,8 @@ public RatioShareResponse getAreaShareGroupByBoundary(

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.AREA, new RequestParameters(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
RequestResource.AREA, RequestParameters.of(false, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types, keys2, values2, true);
}

Expand Down Expand Up @@ -628,18 +630,19 @@ public RatioShareResponse getAreaRatioGroupByBoundary(
required = false) String[] userids,
@ApiParam(hidden = true) @RequestParam(value = "time", defaultValue = "",
required = false) String[] time,
@ApiParam(hidden = true) @RequestParam(value = "format", defaultValue = "",
required = false) String format,
@ApiParam(hidden = true) @RequestParam(value = "showMetadata",
defaultValue = "false") String showMetadata,
@RequestParam(value = "types2", defaultValue = "", required = false) String[] types2,
@RequestParam(value = "keys2", defaultValue = "", required = false) String[] keys2,
@RequestParam(value = "values2", defaultValue = "", required = false) String[] values2)
throws UnsupportedOperationException, Exception {

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.AREA, new RequestParameters(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
types2, keys2, values2, false);
return ElementsRequestExecutor.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.AREA, RequestParameters.of(false, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types2, keys2, values2, false);
}

/**
Expand Down Expand Up @@ -1050,6 +1053,8 @@ public RatioShareResponse postAreaShare(String bboxes, String bcircles, String b
@ApiImplicitParam(name = "time", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.TIME, required = false,
value = ParameterDescriptions.TIME_DESCR),
@ApiImplicitParam(name = "format", paramType = "form", dataType = "string", required = false,
value = ParameterDescriptions.FORMAT_DESCR),
@ApiImplicitParam(name = "showMetadata", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.SHOW_METADATA, required = false,
value = ParameterDescriptions.SHOW_METADATA_DESCR),
Expand All @@ -1063,13 +1068,14 @@ public RatioShareResponse postAreaShare(String bboxes, String bcircles, String b
produces = "application/json", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public RatioShareResponse postAreaShareGroupByBoundary(String bboxes, String bcircles,
String bpolys, String[] types, String[] keys, String[] values, String[] userids,
String[] time, String showMetadata, String[] keys2, String[] values2)
String[] time, String format, String showMetadata, String[] keys2, String[] values2)
throws UnsupportedOperationException, Exception, BadRequestException {

return ElementsRequestExecutor.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.AREA, new RequestParameters(true, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, showMetadata),
types, keys2, values2, true);
return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.AREA, RequestParameters.of(true, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types, keys2, values2, true);
}

/**
Expand Down Expand Up @@ -1325,6 +1331,8 @@ public RatioShareResponse postAreaRatio(String bboxes, String bcircles, String b
@ApiImplicitParam(name = "time", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.TIME, required = false,
value = ParameterDescriptions.TIME_DESCR),
@ApiImplicitParam(name = "format", paramType = "form", dataType = "string", required = false,
value = ParameterDescriptions.FORMAT_DESCR),
@ApiImplicitParam(name = "showMetadata", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.SHOW_METADATA, required = false,
value = ParameterDescriptions.SHOW_METADATA_DESCR),
Expand All @@ -1339,12 +1347,12 @@ public RatioShareResponse postAreaRatio(String bboxes, String bcircles, String b
produces = "application/json", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public RatioShareResponse postAreaRatioGroupByBoundary(String bboxes, String bcircles,
String bpolys, String[] types, String[] keys, String[] values, String[] userids,
String[] time, String showMetadata, String[] types2, String[] keys2, String[] values2)
throws UnsupportedOperationException, Exception {
String[] time, String format, String showMetadata, String[] types2, String[] keys2,
String[] values2) throws UnsupportedOperationException, Exception {

return ElementsRequestExecutor.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.AREA, new RequestParameters(true, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, showMetadata),
RequestResource.AREA, RequestParameters.of(true, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types2, keys2, values2, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ public RatioShareResponse getCountShareGroupByBoundary(
required = false) String[] userids,
@ApiParam(hidden = true) @RequestParam(value = "time", defaultValue = "",
required = false) String[] time,
@ApiParam(hidden = true) @RequestParam(value = "format", defaultValue = "",
required = false) String format,
@ApiParam(hidden = true) @RequestParam(value = "showMetadata",
defaultValue = "false") String showMetadata,
@RequestParam(value = "keys2", defaultValue = "", required = false) String[] keys2,
Expand All @@ -416,8 +418,8 @@ public RatioShareResponse getCountShareGroupByBoundary(

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.COUNT, new RequestParameters(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
RequestResource.COUNT, RequestParameters.of(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, format, showMetadata),
types, keys2, values2, true);
}

Expand Down Expand Up @@ -650,18 +652,19 @@ public RatioShareResponse getCountRatioGroupByBoundary(
required = false) String[] userids,
@ApiParam(hidden = true) @RequestParam(value = "time", defaultValue = "",
required = false) String[] time,
@ApiParam(hidden = true) @RequestParam(value = "format", defaultValue = "",
required = false) String format,
@ApiParam(hidden = true) @RequestParam(value = "showMetadata",
defaultValue = "false") String showMetadata,
@RequestParam(value = "types2", defaultValue = "", required = false) String[] types2,
@RequestParam(value = "keys2", defaultValue = "", required = false) String[] keys2,
@RequestParam(value = "values2", defaultValue = "", required = false) String[] values2)
throws UnsupportedOperationException, Exception {

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.COUNT, new RequestParameters(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
types2, keys2, values2, false);
return ElementsRequestExecutor.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.COUNT, RequestParameters.of(false, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types2, keys2, values2, false);
}

/**
Expand Down Expand Up @@ -1072,6 +1075,8 @@ RequestResource.COUNT, new RequestParameters(true, true, false, bboxes, bcircles
@ApiImplicitParam(name = "time", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.TIME, required = false,
value = ParameterDescriptions.TIME_DESCR),
@ApiImplicitParam(name = "format", paramType = "form", dataType = "string", required = false,
value = ParameterDescriptions.FORMAT_DESCR),
@ApiImplicitParam(name = "showMetadata", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.SHOW_METADATA, required = false,
value = ParameterDescriptions.SHOW_METADATA_DESCR),
Expand All @@ -1084,13 +1089,13 @@ RequestResource.COUNT, new RequestParameters(true, true, false, bboxes, bcircles
produces = "application/json", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public RatioShareResponse postCountShareGroupByBoundary(String bboxes, String bcircles,
String bpolys, String[] types, String[] keys, String[] values, String[] userids,
String[] time, String showMetadata, String[] keys2, String[] values2)
String[] time, String format, String showMetadata, String[] keys2, String[] values2)
throws UnsupportedOperationException, Exception, BadRequestException {

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.COUNT, new RequestParameters(true, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
RequestResource.COUNT, RequestParameters.of(true, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types, keys2, values2, true);
}

Expand Down Expand Up @@ -1342,6 +1347,8 @@ RequestResource.COUNT, new RequestParameters(true, true, false, bboxes, bcircles
@ApiImplicitParam(name = "time", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.TIME, required = false,
value = ParameterDescriptions.TIME_DESCR),
@ApiImplicitParam(name = "format", paramType = "form", dataType = "string", required = false,
value = ParameterDescriptions.FORMAT_DESCR),
@ApiImplicitParam(name = "showMetadata", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.SHOW_METADATA, required = false,
value = ParameterDescriptions.SHOW_METADATA_DESCR),
Expand All @@ -1356,14 +1363,13 @@ RequestResource.COUNT, new RequestParameters(true, true, false, bboxes, bcircles
produces = "application/json", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public RatioShareResponse postCountRatioGroupByBoundary(String bboxes, String bcircles,
String bpolys, String[] types, String[] keys, String[] values, String[] userids,
String[] time, String showMetadata, String[] types2, String[] keys2, String[] values2)
throws UnsupportedOperationException, Exception {
String[] time, String format, String showMetadata, String[] types2, String[] keys2,
String[] values2) throws UnsupportedOperationException, Exception {

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.COUNT, new RequestParameters(true, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
types2, keys2, values2, false);
return ElementsRequestExecutor.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.COUNT, RequestParameters.of(true, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types2, keys2, values2, false);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ public RatioShareResponse getLengthShareGroupByBoundary(
required = false) String[] userids,
@ApiParam(hidden = true) @RequestParam(value = "time", defaultValue = "",
required = false) String[] time,
@ApiParam(hidden = true) @RequestParam(value = "format", defaultValue = "",
required = false) String format,
@ApiParam(hidden = true) @RequestParam(value = "showMetadata",
defaultValue = "false") String showMetadata,
@RequestParam(value = "keys2", defaultValue = "", required = false) String[] keys2,
Expand All @@ -351,8 +353,8 @@ public RatioShareResponse getLengthShareGroupByBoundary(

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.LENGTH, new RequestParameters(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
RequestResource.LENGTH, RequestParameters.of(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, format, showMetadata),
types, keys2, values2, true);
}

Expand Down Expand Up @@ -548,18 +550,19 @@ public RatioShareResponse getLengthRatioGroupByBoundary(
required = false) String[] userids,
@ApiParam(hidden = true) @RequestParam(value = "time", defaultValue = "",
required = false) String[] time,
@ApiParam(hidden = true) @RequestParam(value = "format", defaultValue = "",
required = false) String format,
@ApiParam(hidden = true) @RequestParam(value = "showMetadata",
defaultValue = "false") String showMetadata,
@RequestParam(value = "types2", defaultValue = "", required = false) String[] types2,
@RequestParam(value = "keys2", defaultValue = "", required = false) String[] keys2,
@RequestParam(value = "values2", defaultValue = "", required = false) String[] values2)
throws UnsupportedOperationException, Exception {

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.LENGTH, new RequestParameters(false, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
types2, keys2, values2, false);
return ElementsRequestExecutor.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.LENGTH, RequestParameters.of(false, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types2, keys2, values2, false);
}

/**
Expand Down Expand Up @@ -925,6 +928,8 @@ RequestResource.LENGTH, new RequestParameters(true, true, false, bboxes, bcircle
@ApiImplicitParam(name = "time", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.TIME, required = false,
value = ParameterDescriptions.TIME_DESCR),
@ApiImplicitParam(name = "format", paramType = "form", dataType = "string", required = false,
value = ParameterDescriptions.FORMAT_DESCR),
@ApiImplicitParam(name = "showMetadata", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.SHOW_METADATA, required = false,
value = ParameterDescriptions.SHOW_METADATA_DESCR),
Expand All @@ -938,13 +943,13 @@ RequestResource.LENGTH, new RequestParameters(true, true, false, bboxes, bcircle
produces = "application/json", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public RatioShareResponse postLengthShareGroupByBoundary(String bboxes, String bcircles,
String bpolys, String[] types, String[] keys, String[] values, String[] userids,
String[] time, String showMetadata, String[] keys2, String[] values2)
String[] time, String format, String showMetadata, String[] keys2, String[] values2)
throws UnsupportedOperationException, Exception, BadRequestException {

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.LENGTH, new RequestParameters(true, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
RequestResource.LENGTH, RequestParameters.of(true, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, format, showMetadata),
types, keys2, values2, true);
}

Expand Down Expand Up @@ -1155,6 +1160,8 @@ RequestResource.LENGTH, new RequestParameters(true, true, false, bboxes, bcircle
@ApiImplicitParam(name = "time", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.TIME, required = false,
value = ParameterDescriptions.TIME_DESCR),
@ApiImplicitParam(name = "format", paramType = "form", dataType = "string", required = false,
value = ParameterDescriptions.FORMAT_DESCR),
@ApiImplicitParam(name = "showMetadata", paramType = "form", dataType = "string",
defaultValue = DefaultSwaggerParameters.SHOW_METADATA, required = false,
value = ParameterDescriptions.SHOW_METADATA_DESCR),
Expand All @@ -1169,14 +1176,13 @@ RequestResource.LENGTH, new RequestParameters(true, true, false, bboxes, bcircle
produces = "application/json", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public RatioShareResponse postLengthRatioGroupByBoundary(String bboxes, String bcircles,
String bpolys, String[] types, String[] keys, String[] values, String[] userids,
String[] time, String showMetadata, String[] types2, String[] keys2, String[] values2)
throws UnsupportedOperationException, Exception {
String[] time, String format, String showMetadata, String[] types2, String[] keys2,
String[] values2) throws UnsupportedOperationException, Exception {

return ElementsRequestExecutor
.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.LENGTH, new RequestParameters(true, true, false, bboxes, bcircles,
bpolys, types, keys, values, userids, time, showMetadata),
types2, keys2, values2, false);
return ElementsRequestExecutor.executeCountLengthPerimeterAreaRatioGroupByBoundary(
RequestResource.LENGTH, RequestParameters.of(true, true, false, bboxes, bcircles, bpolys,
types, keys, values, userids, time, format, showMetadata),
types2, keys2, values2, false);
}

}
Loading

0 comments on commit 97e984e

Please sign in to comment.