Package org.onebusaway.transit_data_federation.services.tripplanner

Examples of org.onebusaway.transit_data_federation.services.tripplanner.StopTimeInstance


      InstanceState state = new InstanceState(serviceDate.getTime(), frequency);

      switch (frequencyBehavior) {

        case INCLUDE_UNSPECIFIED: {
          stopTimeInstances.add(new StopTimeInstance(bst, state));
          offsetsIntoIndex.add(in);
          break;
        }
        case INCLUDE_INTERPOLATED: {

          int stopTimeOffset = entry.getStopTimeOffset();

          int tFrom = Math.max(relativeFrom, frequency.getStartTime());
          int tTo = Math.min(relativeTo, frequency.getEndTime());

          tFrom = snapToFrequencyStopTime(frequency, tFrom, stopTimeOffset,
              true);
          tTo = snapToFrequencyStopTime(frequency, tTo, stopTimeOffset, false);

          for (int t = tFrom; t <= tTo; t += frequency.getHeadwaySecs()) {
            int frequencyOffset = t - bst.getStopTime().getDepartureTime();
            stopTimeInstances.add(new StopTimeInstance(bst, state,
                frequencyOffset));
            offsetsIntoIndex.add(in);
          }
          break;
        }
View Full Code Here


        AgencyAndId routeCollectionId = trip.getRouteCollection().getId();

        FrequencyEntry frequencyLabel = trip.getFrequencyLabel();
        InstanceState state = new InstanceState(serviceDate.getTime(),
            frequencyLabel);
        StopTimeInstance sti = new StopTimeInstance(stopTime, state);

        if (frequencyLabel == null) {
          stopTimesByRouteCollectionId.get(routeCollectionId).add(sti);
        } else if (frequencyLabelsByRouteCollectionId.get(routeCollectionId).add(
            frequencyLabel)) {
View Full Code Here

        TripEntry trip = blockTrip.getTrip();
        AgencyAndId routeCollectionId = trip.getRouteCollection().getId();
        InstanceState state = new InstanceState(serviceDate.getTime(),
            entry.getFrequency());

        StopTimeInstance sti = new StopTimeInstance(stopTime, state);

        frequenciesByRouteCollectionId.get(routeCollectionId).add(sti);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.services.tripplanner.StopTimeInstance

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.