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
ConstructorDescriptionContributionsExecutor
(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isDensity) Initializes a newly createdContributionsExecutor
object. -
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 createdContributionsExecutor
object.- Parameters:
isDensity
- the boolean value relative to the density resourceservletRequest
-HttpServletRequest
of the incoming requestservletResponse
-HttpServletResponse
of 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) processParameters
andcount
UnsupportedOperationException
- thrown by#usersCount(MapReducer) usersCount
and#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) processParameters
andcount
-