Package org.onebusaway.gtfs.model.calendar

Examples of org.onebusaway.gtfs.model.calendar.ServiceInterval


        2010, 9, 12));
    addServiceDates(data, "sC", new ServiceDate(2010, 9, 12), new ServiceDate(
        2010, 9, 13));
    addServiceDates(data, "sD", new ServiceDate(2010, 9, 13));

    interval = new ServiceInterval(time(9, 00), time(9, 05), time(10, 00),
        time(10, 05));

    _transitGraphDao = Mockito.mock(TransitGraphDao.class);

    _service = new ExtendedCalendarServiceImpl();
View Full Code Here


    _service.start();

    ServiceIdActivation serviceIds = serviceIds(lsids("sA"), lsids());
    int inFrom = time(8, 00);
    int inTo = time(20, 00);
    ServiceInterval interval = new ServiceInterval(inFrom, inFrom, inTo, inTo);
    long time = dateAsLong("2010-09-10 09:30");

    List<Date> dates = _service.getNextServiceDatesForDepartureInterval(
        serviceIds, interval, time);
View Full Code Here

    _service.start();

    ServiceIdActivation serviceIds = serviceIds(lsids("sA"), lsids());
    int inFrom = time(8, 00);
    int inTo = time(20, 00);
    ServiceInterval interval = new ServiceInterval(inFrom, inFrom, inTo, inTo);
    long time = dateAsLong("2010-09-11 21:30");

    List<Date> dates = _service.getPreviousServiceDatesForArrivalInterval(
        serviceIds, interval, time);
View Full Code Here

    return endTimes;
  }

  public ServiceInterval getRange() {
    int n = startTimes.length - 1;
    return new ServiceInterval(startTimes[0], startTimes[0], endTimes[n],
        endTimes[n]);
  }
View Full Code Here

      blockConfigs.add(trip.getBlockConfiguration());

    int[] stopIndices = new int[n];
    Arrays.fill(stopIndices, blockSequence);

    ServiceInterval serviceInterval = computeServiceInterval(blockTripIndex,
        blockSequence);

    return new BlockStopTimeIndex(blockConfigs, stopIndices, serviceInterval);
  }
View Full Code Here

            + _serviceIds);
      }
    }

    public ServiceInterval getInterval() {
      return new ServiceInterval(_fromStopTime, _toStopTime);
    }
View Full Code Here

          sourceStopIndex.getServiceInterval(), slackAdjustedTime,
          findDepartures);

      for (Date serviceDate : serviceDates) {

        ServiceInterval destServiceInterval = destStopIndex.getServiceInterval();

        if (serviceDateIsBeyondRangeOfQueue(nBestQueue, serviceDate,
            destServiceInterval, resultCount, findDepartures, slack)) {

          /**
 
View Full Code Here

          sourceStopIndex.getServiceInterval(), slackAdjustedTime,
          findDepartures);

      for (Date serviceDate : serviceDates) {

        ServiceInterval destServiceInterval = destStopIndex.getServiceInterval();

        if (serviceDateIsBeyondRangeOfQueue(nBestQueue, serviceDate,
            destServiceInterval, resultCount, findDepartures, slack)) {

          /**
 
View Full Code Here

  private void extendIntervalWithIndex(ServiceDate serviceDate, Range interval,
      AbstractBlockStopTimeIndex index) {
    ServiceIdActivation serviceIds = index.getServiceIds();
    Date date = serviceDate.getAsDate(serviceIds.getTimeZone());
    if (_calendarService.areServiceIdsActiveOnServiceDate(serviceIds, date)) {
      ServiceInterval in = index.getServiceInterval();
      long tFrom = date.getTime() + in.getMinDeparture() * 1000;
      long tTo = date.getTime() + in.getMaxDeparture() * 1000;
      interval.addValue(tFrom);
      interval.addValue(tTo);
    }
  }
View Full Code Here

    return maxDepartures;
  }
 
  public ServiceInterval getRange() {
    int n = maxArrivals.length-1;
    return new ServiceInterval(minArrivals[0], minDepartures[0], maxArrivals[n], maxDepartures[n]);
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.gtfs.model.calendar.ServiceInterval

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.