Package org.opentripplanner.graph_builder.model

Examples of org.opentripplanner.graph_builder.model.GtfsBundles


        // allowed.
        MockGtfs gtfs = getSimpleGtfs();
        gtfs.putTrips(2, "r0", "sid0", "bikes_allowed=0,1");
        gtfs.putStopTimes("t0,t1", "s0,s1");

        GtfsBundles bundles = getGtfsAsBundles(gtfs);
        bundles.getBundles().get(0).setDefaultBikesAllowed(false);
        _builder.setGtfsBundles(bundles);

        Graph graph = new Graph();
        _builder.buildGraph(graph, _extra);
        graph.index(new DefaultStreetVertexIndexFactory());
View Full Code Here


        // allowed.
        MockGtfs gtfs = getSimpleGtfs();
        gtfs.putTrips(2, "r0", "sid0", "bikes_allowed=0,2");
        gtfs.putStopTimes("t0,t1", "s0,s1");

        GtfsBundles bundles = getGtfsAsBundles(gtfs);
        bundles.getBundles().get(0).setDefaultBikesAllowed(true);
        _builder.setGtfsBundles(bundles);

        Graph graph = new Graph();
        _builder.buildGraph(graph, _extra);
        graph.index(new DefaultStreetVertexIndexFactory());
View Full Code Here

    }

    private static GtfsBundles getGtfsAsBundles(MockGtfs gtfs) {
        GtfsBundle bundle = new GtfsBundle();
        bundle.setPath(gtfs.getPath());
        GtfsBundles bundles = new GtfsBundles();
        bundles.getBundles().add(bundle);
        return bundles;
    }
View Full Code Here

        GtfsBundle bundle = new GtfsBundle();
        bundle.setPath(new File("src/test/resources/google_transit.zip"));

        ArrayList<GtfsBundle> bundleList = new ArrayList<GtfsBundle>();
        bundleList.add(bundle);
        GtfsBundles bundles = new GtfsBundles();
        bundles.setBundles(bundleList);
        gtfsBuilder.setGtfsBundles(bundles);

        HashMap<Class<?>, Object> extra = new HashMap<Class<?>, Object>();
        gtfsBuilder.buildGraph(graph, extra);
View Full Code Here

     * Construct and set bundles all at once.
     * TODO why is there a wrapper class around a list of GTFS files?
     * TODO why is there a wrapper around GTFS files at all?
     */
    public GtfsGraphBuilderImpl (List<GtfsBundle> gtfsBundles) {
        GtfsBundles gtfsb = new GtfsBundles();
        gtfsb.setBundles(gtfsBundles);
        this.setGtfsBundles(gtfsb);
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.graph_builder.model.GtfsBundles

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.