Package org.onebusaway.transit_data_federation.services.transit_graph

Examples of org.onebusaway.transit_data_federation.services.transit_graph.TripEntry


  @Override
  public ScheduleDeviationHistogram getScheduleDeviationHistogramForArrivalAndDepartureInstance(
      ArrivalAndDepartureInstance instance, int stepSizeInSeconds) {

    BlockTripEntry blockTrip = instance.getBlockTrip();
    TripEntry trip = blockTrip.getTrip();
    AgencyAndId tripId = trip.getId();

    ScheduleDeviationHistory history = _scheduleDeviationHistoryDao.getScheduleDeviationHistoryForTripId(tripId);
   
    if( history == null)
      return null;
View Full Code Here


   
    if( true )
      return null;

    BlockTripEntry blockTrip = scheduledBlockLocation.getActiveTrip();
    TripEntry trip = blockTrip.getTrip();

    ScheduleDeviationHistory history = _scheduleDeviationHistoryDao.getScheduleDeviationHistoryForTripId(trip.getId());

    if (history == null)
      return null;

    ScheduleDeviationHistory resampledHistory = resampleHistory(history,
View Full Code Here

    public BlockStopTimeEntry get(int index) {

      int tripIndex = tripIndices[index];

      BlockTripEntry blockTrip = trips.get(tripIndex);
      TripEntry trip = blockTrip.getTrip();

      List<StopTimeEntry> stopTimes = trip.getStopTimes();
      int stopTimeIndex = index - accumulatedStopTimeIndices[tripIndex];
      StopTimeEntry stopTime = stopTimes.get(stopTimeIndex);

      boolean hasNextStop = index + 1 < tripIndices.length;
View Full Code Here

  }

  @Override
  public Map<AgencyAndIdInstance, List<BlockLocationArchiveRecord>> getHistoryForTripId(AgencyAndId tripId) {

    TripEntry trip = _transitGraphDao.getTripEntryForId(tripId);

    if (trip == null)
      return null;

    BlockEntry block = trip.getBlock();

    List<File> files = getFilesForBlockId(block.getId());

    CsvEntityReader reader = new CsvEntityReader();
    reader.setTokenizerStrategy(new DelimiterTokenizerStrategy("\t"));
View Full Code Here

    AgencyAndId stopId = AgencyAndIdLibrary.convertFromString(query.getStopId());
    StopEntry stop = _transitGraphDao.getStopEntryForId(stopId, true);

    AgencyAndId tripId = AgencyAndIdLibrary.convertFromString(query.getTripId());
    TripEntry trip = _transitGraphDao.getTripEntryForId(tripId);
    if (trip == null)
      throw new NoSuchTripServiceException(query.getTripId());

    adQuery.setStop(stop);
    adQuery.setStopSequence(query.getStopSequence());
View Full Code Here

    if (mappedTripId != null)
      tripId = mappedTripId;

    for (String aid : _agencyIds) {
      AgencyAndId fullTripId = new AgencyAndId(aid, tripId);
      TripEntry tripEntry = _transitGraph.getTripEntryForId(fullTripId);
      if (tripEntry != null)
        return tripEntry;
    }

    return null;
View Full Code Here

    for (BlockStopTimeIndex stopTimeIndex : stopTimeIndices) {
      for (BlockStopTimeEntry blockStopTime : stopTimeIndex.getStopTimes()) {

        StopTimeEntry stopTime = blockStopTime.getStopTime();
        TripEntry trip = stopTime.getTrip();
        AgencyAndId shapeId = trip.getShapeId();

        if (shapeId == null)
          continue;

        ShapePoints shapePoints = provider.getShapePointsForId(shapeId);
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.services.transit_graph.TripEntry

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.