Package org.opentripplanner.api.model

Examples of org.opentripplanner.api.model.TimeSurfaceShort


                    // include only the first instance of each query parameter
                    surface.params.put(e.getKey(), e.getValue().get(0));
                }
                surface.cutoffMinutes = cutoffMinutes;
                server.surfaceCache.add(surface);
                return Response.ok().entity(new TimeSurfaceShort(surface)).build(); // .created(URI)
            } else {
                return Response.noContent().entity("NO SPT").build();
            }
        } catch (ParameterException pex) {
            return Response.status(Response.Status.BAD_REQUEST).entity("BAD USER").build();
View Full Code Here


    /** Describe a specific surface. */
    @GET @Path("/{surfaceId}")
    public Response getTimeSurfaceList (@PathParam("surfaceId") Integer surfaceId) {
        TimeSurface surface = server.surfaceCache.get(surfaceId);
        if (surface == null) return Response.status(Response.Status.NOT_FOUND).entity("Invalid surface ID.").build();
        return Response.ok().entity(new TimeSurfaceShort(surface)).build();
        // DEBUG return Response.ok().entity(surface).build();
    }
View Full Code Here

            ProfileResponse response = router.route();
            if (req.analyst) {
                surfaceCache.add(router.minSurface);
                surfaceCache.add(router.maxSurface);
                List<TimeSurfaceShort> surfaceShorts = Lists.newArrayList();
                surfaceShorts.add(new TimeSurfaceShort(router.minSurface));
                surfaceShorts.add(new TimeSurfaceShort(router.maxSurface));
                return Response.status(Status.OK).entity(surfaceShorts).build();
            } else {
                return Response.status(Status.OK).entity(response).build();
            }
        } finally {
View Full Code Here

TOP

Related Classes of org.opentripplanner.api.model.TimeSurfaceShort

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.