org.heigit.ohsome.ohsomeapi.output.ratio.RatioGroupByBoundaryResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ohsome-api Show documentation
Show all versions of ohsome-api Show documentation
A public Web-RESTful-API for "ohsome" OpenStreetMap history data.
package org.heigit.ohsome.ohsomeapi.output.ratio;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import io.swagger.annotations.ApiModelProperty;
import org.geojson.Feature;
import org.heigit.ohsome.ohsomeapi.output.Attribution;
import org.heigit.ohsome.ohsomeapi.output.Metadata;
import org.heigit.ohsome.ohsomeapi.output.Response;
/**
* Represents the whole JSON response object for the data aggregation response using the
* /ratio/groupBy/boundary resource. It contains an optional {@link
* org.heigit.ohsome.ohsomeapi.output.Metadata Metadata} object, the requested {@link
* org.heigit.ohsome.ohsomeapi.output.ratio.RatioGroupByResult RatioGroupByResult} for a JSON
* response and an identifier of the object. If the output format is GeoJSON, the response includes
* a {@link org.geojson.Feature Feature} array, which holds the respective objects with their
* timestamp-value pairs.
*/
@JsonInclude(Include.NON_NULL)
public class RatioGroupByBoundaryResponse implements Response {
@ApiModelProperty(notes = "License and copyright info", required = true)
private Attribution attribution;
@ApiModelProperty(notes = "Version of this api", required = true)
private String apiVersion;
@ApiModelProperty(notes = "Metadata describing the output")
private Metadata metadata;
@ApiModelProperty(notes = "Type of the GeoJSON", required = true)
private String type;
@ApiModelProperty(notes = "GeoJSON Features", required = true)
private Feature[] features;
@ApiModelProperty(notes = "RatioGroupByResult array holding the respective objects " + "with their timestamp-value-value2-ratio values", required = true)
private RatioGroupByResult[] groupByBoundaryResult;
public RatioGroupByBoundaryResponse(Attribution attribution, String apiVersion, Metadata metadata, RatioGroupByResult[] groupByBoundaryResult) {
this.attribution = attribution;
this.apiVersion = apiVersion;
this.metadata = metadata;
this.groupByBoundaryResult = groupByBoundaryResult;
}
/**
* Static factory method returning the whole GeoJSON response.
*/
public static RatioGroupByBoundaryResponse of(Attribution attribution, String apiVersion, Metadata metadata, String type, Feature[] features) {
RatioGroupByBoundaryResponse response = new RatioGroupByBoundaryResponse();
response.attribution = attribution;
response.apiVersion = apiVersion;
response.metadata = metadata;
response.type = type;
response.features = features;
return response;
}
@java.lang.SuppressWarnings("all")
public Attribution getAttribution() {
return this.attribution;
}
@java.lang.SuppressWarnings("all")
public String getApiVersion() {
return this.apiVersion;
}
@java.lang.SuppressWarnings("all")
public Metadata getMetadata() {
return this.metadata;
}
@java.lang.SuppressWarnings("all")
public String getType() {
return this.type;
}
@java.lang.SuppressWarnings("all")
public Feature[] getFeatures() {
return this.features;
}
@java.lang.SuppressWarnings("all")
public RatioGroupByResult[] getGroupByBoundaryResult() {
return this.groupByBoundaryResult;
}
@java.lang.SuppressWarnings("all")
private RatioGroupByBoundaryResponse() {
}
}