Package org.opentripplanner.routing.alertpatch

Examples of org.opentripplanner.routing.alertpatch.TimePeriod


                v58, v60);

        // Alert for testing GTFS-RT
        AlertPatch alertPatch = new AlertPatch();

        alertPatch.setTimePeriods(Collections.singletonList(new TimePeriod(0, Long.MAX_VALUE)));
        alertPatch.setAlert(Alert.createSimpleAlerts(alertsExample));

        // Edge initialization that can't be done using the constructor
        e3.setElevationProfile(elevation3, false);
        e17.add(firstTrip, secondTrip);
View Full Code Here


                final long start = activePeriod.hasStart() ? realStart - earlyStart : 0;
                if (realStart > 0 && realStart < bestStartTime) {
                    bestStartTime = realStart;
                }
                final long end = activePeriod.hasEnd() ? activePeriod.getEnd() : Long.MAX_VALUE;
                periods.add(new TimePeriod(start, end));
            }
            if (bestStartTime != Long.MAX_VALUE) {
                alertText.effectiveStartDate = new Date(bestStartTime * 1000);
            }
        } else {
            // Per the GTFS-rt spec, if an alert has no TimeRanges, than it should always be shown.
            periods.add(new TimePeriod(0, Long.MAX_VALUE));
        }
        for (EntitySelector informed : alert.getInformedEntityList()) {
            String patchId = createId(id, informed);

            String routeId = null;
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.alertpatch.TimePeriod

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.