Skip to content
Snippets Groups Projects
Commit 63c26139 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

GZIP service output

Upgrade jts2geojson output
parent aa29e5b7
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<groupId>com.github.bjornharrtell</groupId> <groupId>com.github.bjornharrtell</groupId>
<!--groupId>org.wololo</groupId--> <!--groupId>org.wololo</groupId-->
<artifactId>jts2geojson</artifactId> <artifactId>jts2geojson</artifactId>
<version>0.9.0</version> <version>0.10.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
......
...@@ -73,6 +73,7 @@ import no.nibio.vips.util.weather.ALabDataParser; ...@@ -73,6 +73,7 @@ import no.nibio.vips.util.weather.ALabDataParser;
import no.nibio.vips.util.weather.FruitWebDavisDataParser; import no.nibio.vips.util.weather.FruitWebDavisDataParser;
import no.nibio.vips.util.weather.MetosDataParser; import no.nibio.vips.util.weather.MetosDataParser;
import no.nibio.vips.util.weather.ParseWeatherDataException; import no.nibio.vips.util.weather.ParseWeatherDataException;
import org.jboss.resteasy.annotations.GZIP;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget; import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.jboss.resteasy.spi.HttpRequest; import org.jboss.resteasy.spi.HttpRequest;
...@@ -91,6 +92,7 @@ public class LogicService { ...@@ -91,6 +92,7 @@ public class LogicService {
@GET @GET
@Path("forecastresults/{forecastConfigurationId}") @Path("forecastresults/{forecastConfigurationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getForecastResults( public Response getForecastResults(
@PathParam("forecastConfigurationId") Long forecastConfigurationId, @PathParam("forecastConfigurationId") Long forecastConfigurationId,
...@@ -114,6 +116,7 @@ public class LogicService { ...@@ -114,6 +116,7 @@ public class LogicService {
@GET @GET
@Path("forecastresults/{forecastConfigurationId}/{latestDays}") @Path("forecastresults/{forecastConfigurationId}/{latestDays}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getForecastResults( public Response getForecastResults(
@PathParam("forecastConfigurationId") Long forecastConfigurationId, @PathParam("forecastConfigurationId") Long forecastConfigurationId,
...@@ -138,6 +141,7 @@ public class LogicService { ...@@ -138,6 +141,7 @@ public class LogicService {
@GET @GET
@Path("forecastconfigurationsummaries/{organizationId}") @Path("forecastconfigurationsummaries/{organizationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getForecastSummaries( public Response getForecastSummaries(
@PathParam("organizationId") Integer organizationId, @PathParam("organizationId") Integer organizationId,
...@@ -150,6 +154,7 @@ public class LogicService { ...@@ -150,6 +154,7 @@ public class LogicService {
@GET @GET
@Path("forecastconfigurationsummaries/private/{userUUID}") @Path("forecastconfigurationsummaries/private/{userUUID}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getForecastSummaries( public Response getForecastSummaries(
@PathParam("userUUID") String userUUID @PathParam("userUUID") String userUUID
...@@ -226,6 +231,7 @@ public class LogicService { ...@@ -226,6 +231,7 @@ public class LogicService {
*/ */
@GET @GET
@Path("organizationforecastconfigurations/{organizationId}") @Path("organizationforecastconfigurations/{organizationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getForecastConfigurationsForOrganization( public Response getForecastConfigurationsForOrganization(
@PathParam("organizationId") Integer organizationId, @PathParam("organizationId") Integer organizationId,
...@@ -295,6 +301,7 @@ public class LogicService { ...@@ -295,6 +301,7 @@ public class LogicService {
@GET @GET
@Path("forecastresults/aggregate/{organizationId}") @Path("forecastresults/aggregate/{organizationId}")
@GZIP
@Produces("application/vnd.google-earth.kml+xml;charset=utf-8") @Produces("application/vnd.google-earth.kml+xml;charset=utf-8")
public Response getForecastResultsAggregate( public Response getForecastResultsAggregate(
@PathParam("organizationId") Integer organizationId, @PathParam("organizationId") Integer organizationId,
...@@ -314,6 +321,7 @@ public class LogicService { ...@@ -314,6 +321,7 @@ public class LogicService {
@GET @GET
@Path("forecastresults/latest/poi/{poiId}") @Path("forecastresults/latest/poi/{poiId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getLatestForecastResultsForPoi(@PathParam("poiId") Integer poiId) public Response getLatestForecastResultsForPoi(@PathParam("poiId") Integer poiId)
{ {
...@@ -401,6 +409,7 @@ public class LogicService { ...@@ -401,6 +409,7 @@ public class LogicService {
@GET @GET
@Path("message/list/{organizationId}") @Path("message/list/{organizationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getMessageList( public Response getMessageList(
@QueryParam("publishedFrom") String publishedFrom , @QueryParam("publishedTo") String publishedTo, @QueryParam("publishedFrom") String publishedFrom , @QueryParam("publishedTo") String publishedTo,
...@@ -434,6 +443,7 @@ public class LogicService { ...@@ -434,6 +443,7 @@ public class LogicService {
@GET @GET
@Path("message/list/{organizationId}/tagfilter") @Path("message/list/{organizationId}/tagfilter")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getMessageListWithTags(@QueryParam("tagId") List<Integer> tagIds, @PathParam("organizationId") Integer organizationId) public Response getMessageListWithTags(@QueryParam("tagId") List<Integer> tagIds, @PathParam("organizationId") Integer organizationId)
{ {
...@@ -454,6 +464,7 @@ public class LogicService { ...@@ -454,6 +464,7 @@ public class LogicService {
@GET @GET
@Path("observation") @Path("observation")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getObservationList(@QueryParam("organizationId") Integer organizationId) public Response getObservationList(@QueryParam("organizationId") Integer organizationId)
{ {
...@@ -547,6 +558,7 @@ public class LogicService { ...@@ -547,6 +558,7 @@ public class LogicService {
@GET @GET
@POST @POST
@Path("weather/proxy/metos/{stationId}") @Path("weather/proxy/metos/{stationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getMetosWeatherData( public Response getMetosWeatherData(
@PathParam("stationId") String stationId, @PathParam("stationId") String stationId,
...@@ -575,6 +587,7 @@ public class LogicService { ...@@ -575,6 +587,7 @@ public class LogicService {
@GET @GET
@POST @POST
@Path("weather/proxy/fruitwebdavis/{stationId}") @Path("weather/proxy/fruitwebdavis/{stationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getFruitWebDavisWeatherData( public Response getFruitWebDavisWeatherData(
@PathParam("stationId") String stationId, @PathParam("stationId") String stationId,
...@@ -604,6 +617,7 @@ public class LogicService { ...@@ -604,6 +617,7 @@ public class LogicService {
@GET @GET
@POST @POST
@Path("weather/proxy/alab/{stationId}") @Path("weather/proxy/alab/{stationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getALabWeatherData( public Response getALabWeatherData(
@PathParam("stationId") String stationId, @PathParam("stationId") String stationId,
......
...@@ -32,6 +32,7 @@ import javax.ws.rs.core.Response; ...@@ -32,6 +32,7 @@ import javax.ws.rs.core.Response;
import no.nibio.vips.logic.entity.Observation; import no.nibio.vips.logic.entity.Observation;
import no.nibio.vips.logic.util.Globals; import no.nibio.vips.logic.util.Globals;
import no.nibio.vips.logic.util.SessionControllerGetter; import no.nibio.vips.logic.util.SessionControllerGetter;
import org.jboss.resteasy.annotations.GZIP;
/** /**
* @copyright 2016 <a href="http://www.nibio.no/">NIBIO</a> * @copyright 2016 <a href="http://www.nibio.no/">NIBIO</a>
...@@ -57,6 +58,7 @@ public class ObservationService { ...@@ -57,6 +58,7 @@ public class ObservationService {
*/ */
@GET @GET
@Path("filter/{organizationId}") @Path("filter/{organizationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getFilteredObservations( public Response getFilteredObservations(
@PathParam("organizationId") Integer organizationId, @PathParam("organizationId") Integer organizationId,
...@@ -128,6 +130,7 @@ public class ObservationService { ...@@ -128,6 +130,7 @@ public class ObservationService {
*/ */
@GET @GET
@Path("list/{organizationId}") @Path("list/{organizationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getObservations(@PathParam("organizationId") Integer organizationId){ public Response getObservations(@PathParam("organizationId") Integer organizationId){
return Response.ok().entity(SessionControllerGetter.getObservationBean().getObservations(organizationId, Observation.STATUS_TYPE_ID_APPROVED)).build(); return Response.ok().entity(SessionControllerGetter.getObservationBean().getObservations(organizationId, Observation.STATUS_TYPE_ID_APPROVED)).build();
...@@ -140,6 +143,7 @@ public class ObservationService { ...@@ -140,6 +143,7 @@ public class ObservationService {
*/ */
@GET @GET
@Path("broadcast/list/{organizationId}") @Path("broadcast/list/{organizationId}")
@GZIP
@Produces("application/json;charset=UTF-8") @Produces("application/json;charset=UTF-8")
public Response getBroadcastObservations(@PathParam("organizationId") Integer organizationId){ public Response getBroadcastObservations(@PathParam("organizationId") Integer organizationId){
return Response.ok().entity(SessionControllerGetter.getObservationBean().getBroadcastObservations(organizationId)).build(); return Response.ok().entity(SessionControllerGetter.getObservationBean().getBroadcastObservations(organizationId)).build();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment