Examples of TimetableSnapshotSource


Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

        // the graph's snapshot may be frequently updated.
        // Grab a reference to ensure a coherent view of the timetables throughout this search.
        if (routingRequest.ignoreRealtimeUpdates) {
            timetableSnapshot = null;
        } else {
            TimetableSnapshotSource timetableSnapshotSource = graph.timetableSnapshotSource;

            if (timetableSnapshotSource == null) {
                timetableSnapshot = null;
            } else {
                timetableSnapshot = timetableSnapshotSource.getTimetableSnapshot();
            }
        }
        calendarService = graph.getCalendarService();
        setServiceDays();
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

        updaterManager.executeBlocking(new GraphWriterRunnable() {
            @Override
            public void run(Graph graph) {
                // Only create a realtime data snapshot source if none exists already
                if (graph.timetableSnapshotSource == null) {
                    TimetableSnapshotSource snapshotSource = new TimetableSnapshotSource(graph);
                    // Add snapshot source to graph
                    graph.timetableSnapshotSource = (snapshotSource);
                }
            }
        });
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

  }

  @Override
    public void run(Graph graph) {
        // Apply updates to graph using realtime snapshot source
        TimetableSnapshotSource snapshotSource = graph.timetableSnapshotSource;
        if (snapshotSource != null) {
            snapshotSource.applyTripUpdates(updates, feedId);
        } else {
            LOG.error("Could not find realtime data snapshot source in graph."
                    + " The following updates are not applied: {}", updates);
        }
    }
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

        // Create a realtime data snapshot source and wait for runnable to be executed
        updaterManager.executeBlocking(new GraphWriterRunnable() {
            @Override
            public void run(Graph graph) {
                // Only create a realtime data snapshot source if none exists already
                TimetableSnapshotSource snapshotSource = graph.timetableSnapshotSource;
                if (snapshotSource == null) {
                    snapshotSource = new TimetableSnapshotSource(graph);
                    // Add snapshot source to graph
                    graph.timetableSnapshotSource = (snapshotSource);
                }

                // Set properties of realtime data snapshot source
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

        // Create dummy TimetableResolver
        TimetableResolver resolver = new TimetableResolver();
       
        // Mock TimetableSnapshotSource to return dummy TimetableResolver
        TimetableSnapshotSource timetableSnapshotSource = mock(TimetableSnapshotSource.class);

        when(timetableSnapshotSource.getTimetableSnapshot()).thenReturn(resolver);

        timetableSnapshotSource.getTimetableSnapshot().update(
                thirdTripPattern, tripUpdate, "Ferry", timeZone, serviceDate);

        // Further graph initialization
        graph.putService(CalendarServiceData.class, calendarServiceData);
        graph.putService(FareService.class, fareServiceStub);
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

       
        // Create dummy TimetableResolver
        TimetableResolver resolver = new TimetableResolver();
       
        // Mock TimetableSnapshotSource to return dummy TimetableResolver
        TimetableSnapshotSource source = mock(TimetableSnapshotSource.class);
        when(source.getTimetableSnapshot()).thenReturn(resolver);
        graph.timetableSnapshotSource = (source);
       
        // Create routing context
        RoutingContext rctx = new RoutingContext(options, graph, from, to);
       
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

        // Create dummy TimetableResolver
        TimetableResolver resolver = new TimetableResolver();

        // Mock TimetableSnapshotSource to return dummy TimetableResolver
        TimetableSnapshotSource timetableSnapshotSource = mock(TimetableSnapshotSource.class);

        when(timetableSnapshotSource.getTimetableSnapshot()).thenReturn(resolver);

        graph.timetableSnapshotSource = (timetableSnapshotSource);
    }
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

        // Create dummy TimetableResolver
        TimetableResolver resolver = new TimetableResolver();

        // Mock TimetableSnapshotSource to return dummy TimetableResolver
        TimetableSnapshotSource timetableSnapshotSource = mock(TimetableSnapshotSource.class);

        when(timetableSnapshotSource.getTimetableSnapshot()).thenReturn(resolver);

        graph.timetableSnapshotSource = (timetableSnapshotSource);
    }
View Full Code Here

Examples of org.opentripplanner.updater.stoptime.TimetableSnapshotSource

        gtfsGraphBuilderImpl.buildGraph(graph, null);
        // Set the agency ID to be used for tests to the first one in the feed.
        agencyId = graph.getAgencyIds().iterator().next();
        System.out.printf("Set the agency ID for this test to %s\n", agencyId);
        graph.index(new DefaultStreetVertexIndexFactory());
        timetableSnapshotSource = new TimetableSnapshotSource(graph);
        timetableSnapshotSource.purgeExpiredData = (false);
        graph.timetableSnapshotSource = (timetableSnapshotSource);
        alertPatchServiceImpl = new AlertPatchServiceImpl(graph);
        alertsUpdateHandler.setAlertPatchService(alertPatchServiceImpl);
        alertsUpdateHandler.setDefaultAgencyId("MMRI");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.