Package org.opentripplanner.routing.impl

Examples of org.opentripplanner.routing.impl.GraphServiceImpl


        return server;
    }

    /** Create a cached GraphService that will be shared between all OTP components. */
    public void makeGraphService(Graph graph) {
        GraphServiceImpl graphService = new GraphServiceImpl(params.autoReload);
        this.graphService = graphService;
        InputStreamGraphSource.FileFactory graphSourceFactory = new InputStreamGraphSource.FileFactory();
        graphService.graphSourceFactory = graphSourceFactory;
        if (params.graphDirectory != null) {
            graphSourceFactory.basePath = new File(params.graphDirectory);
View Full Code Here


import static org.junit.Assert.assertTrue;

public class RoutersTest {
    @Test
    public void testRouters() {
        OTPServer otpServer = new OTPServer(new CommandLineParameters(), new GraphServiceImpl());
        otpServer.graphService.registerGraph("", new MemoryGraphSource(null, new Graph()));
        otpServer.graphService.registerGraph("A", new MemoryGraphSource("", new Graph()));
        otpServer.graphService.getGraph("A").addVertex(new ExitVertex(null, "A", 0, 0));
        otpServer.graphService.getGraph("A").addVertex(new ExitVertex(null, "B", 0, 1));
        otpServer.graphService.getGraph("A").addVertex(new ExitVertex(null, "C", 1, 1));
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.impl.GraphServiceImpl

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.