Package org.opentripplanner.api.model

Examples of org.opentripplanner.api.model.RouterInfo


     */
    @GET @Path("{routerId}")
    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML + Q, MediaType.TEXT_XML + Q })
    public RouterInfo getGraphId(@PathParam("routerId") String routerId) {
        // factor out build one entry
        RouterInfo routerInfo = getRouterInfo(routerId);
        if (routerInfo == null)
            throw new WebApplicationException(Response.status(Status.NOT_FOUND)
                    .entity("Graph id '" + routerId + "' not registered.\n").type("text/plain")
                    .build());
        return routerInfo;
View Full Code Here


    }
   
    private RouterInfo getRouterInfo(String routerId) {
        Graph graph = server.graphService.getGraph(routerId);
        if (graph == null) return null;
        RouterInfo routerInfo = new RouterInfo();
        routerInfo.routerId = routerId;
        routerInfo.polygon = graph.getHull();
        routerInfo.buildTime = graph.buildTime;
        return routerInfo;
    }
View Full Code Here

        Routers routerApi = new Routers();
        routerApi.server = otpServer;
        RouterList routers = routerApi.getRouterIds();
        assertEquals(2, routers.routerInfo.size());
        RouterInfo router0 = routers.routerInfo.get(0);
        RouterInfo router1 = routers.routerInfo.get(1);
        RouterInfo otherRouter;
        RouterInfo defaultRouter;
        if (router0.routerId.equals("")) {
            defaultRouter = router0;
            otherRouter = router1;
        } else {
            defaultRouter = router1;
View Full Code Here

TOP

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

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.