Class ContributionsExecutor
java.lang.Object
org.heigit.ohsome.ohsomeapi.executor.RequestExecutor
org.heigit.ohsome.ohsomeapi.executor.ContributionsExecutor
Includes the execute method for requests mapped to /contributions/count,
/contributions/count/density, /contributions/latest/count, /contributions/latest/count/density
and /users/count.
-
Field Summary
Fields inherited from class org.heigit.ohsome.ohsomeapi.executor.RequestExecutor
ATTRIBUTION, df, servletRequest, servletResponse, TEXT, URL -
Constructor Summary
ConstructorsConstructorDescriptionContributionsExecutor(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isDensity) Initializes a newly createdContributionsExecutorobject. -
Method Summary
Modifier and TypeMethodDescriptioncount(boolean isUsersRequest, boolean isContributionsLatestCount) Handler method for count calculation of the endpoints /contributions/count, /contributions/density, /contributions/latest/count, /contributions/latest/count/density or /users/count.<P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal,V extends Comparable<V> & Serializable>
ResponsecountGroupByBoundary(boolean isUsersRequest) Handler method for count calculation of the endpoints /contributions/count/[density/]groupBy/boundary and /users/count/[density/]groupBy/boundary.
-
Constructor Details
-
ContributionsExecutor
public ContributionsExecutor(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isDensity) Initializes a newly createdContributionsExecutorobject.- Parameters:
isDensity- the boolean value relative to the density resourceservletRequest-HttpServletRequestof the incoming requestservletResponse-HttpServletResponseof the outgoing response
-
-
Method Details
-
count
public Response count(boolean isUsersRequest, boolean isContributionsLatestCount) throws UnsupportedOperationException, Exception Handler method for count calculation of the endpoints /contributions/count, /contributions/density, /contributions/latest/count, /contributions/latest/count/density or /users/count.- Parameters:
isUsersRequest- the boolean value relative to the endpoint /users/countisContributionsLatestCount- the boolean value relative to the endpoint /contributions/latest- Returns:
- DefaultAggregationResponse
Response - Throws:
Exception- thrown byprocessParameters,#processParameters(ComputeMode) processParametersandcountUnsupportedOperationException- thrown by#usersCount(MapReducer) usersCountand#contributionsCount(MapReducer, boolean) contributionsCount
-
countGroupByBoundary
public <P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal,V extends Comparable<V> & Serializable> Response countGroupByBoundary(boolean isUsersRequest) throws Exception Handler method for count calculation of the endpoints /contributions/count/[density/]groupBy/boundary and /users/count/[density/]groupBy/boundary.- Returns:
- GroupByResponse
Response - Throws:
Exception- thrown byprocessParameters,#processParameters(ComputeMode) processParametersandcount
-